diff options
author | Erich Eckner <git@eckner.net> | 2016-04-13 10:07:32 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-13 10:24:28 +0200 |
commit | 3d40ed862557775b9cf46dcaf83482a39111d781 (patch) | |
tree | 350925b38ab0bfe24db101c78c18f750dc5074d0 | |
parent | e5666e4572f2273f8d3dd4443cf48566517a8f52 (diff) | |
download | archlinuxewe-3d40ed862557775b9cf46dcaf83482a39111d781.tar.xz |
enable signed packages
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | archPackagesUpdate | 50 |
2 files changed, 41 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore index e2edb16d4..d0b7dabaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.tar.xz +*.tar.xz.sig *.tar.gz *.zip *.tgz diff --git a/archPackagesUpdate b/archPackagesUpdate index 89a387fec..a630d8bbf 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -166,7 +166,7 @@ then echo '\ sudo pacman -Sy && \ cd "'"${tmpDir}/${paket}"'" && \ - _targetHost='\''--host=i686-pc-linux-gnu'\'' makepkg --config "'"${tmpDir}"'/makepkg32.conf" -fcsr --noconfirm && \ + _targetHost='\''--host=i686-pc-linux-gnu'\'' makepkg --config "'"${tmpDir}"'/makepkg32.conf" --sign -fcsr --noconfirm && \ exit\ ' | \ chrootUnpriv @@ -174,7 +174,7 @@ then else # everything else is built directly sudo pacman -Sy - makepkg --config "${tmpDir}/makepkg.conf" -fcsr --noconfirm + makepkg --config "${tmpDir}/makepkg.conf" --sign -fcsr --noconfirm err[${i}]=$? fi if ${abortOnMakepkgError} && [ ${err[${i}]} -ne 0 ] @@ -188,12 +188,14 @@ then then # upload package and update db - cat "${tmpDir}/${paket}/${paket}-${vers}-${arch}.pkg.tar.xz" | + cd "${tmpDir}/${paket}" + tar -cf - ${paket}-${vers}-${arch}.pkg.tar.xz{,.sig} | ssh paule@127.0.0.1 ' rmPaket() { repo-remove archlinuxewe.db.tar.gz "${1%-*-*-*.pkg.tar.xz}" rm "$1" + [ -e "$1.sig" ] && rm "$1.sig" } addPaket() { @@ -211,7 +213,7 @@ then then rmPaket "'${paket}-${vers}-${arch}.pkg.tar.xz'" fi - cat > '${paket}-${vers}-${arch}.pkg.tar.xz' + tar -xf - addPaket "'${paket}-${vers}-${arch}.pkg.tar.xz'" if [ "'${arch}'" == "any" ] @@ -228,6 +230,10 @@ then rmPaket "'${paket}-${vers}-${arch}.pkg.tar.xz'" fi ln -s "'${pkgDir}/any/${paket}-${vers}-${arch}.pkg.tar.xz'" "'${paket}-${vers}-${arch}.pkg.tar.xz'" + if [ -e "'${pkgDir}/any/${paket}-${vers}-${arch}.pkg.tar.xz.sig'" ] + then + ln -s "'${pkgDir}/any/${paket}-${vers}-${arch}.pkg.tar.xz.sig'" "'${paket}-${vers}-${arch}.pkg.tar.xz.sig'" + fi addPaket "'${paket}-${vers}-${arch}.pkg.tar.xz'" cd .. @@ -249,7 +255,7 @@ then [ ! -d "${arch}" ] && continue [ "${arch}" == "any" ] && continue - for warnungen in $( \ + for paketFehler in $( \ ( tar -Oxzf '${pkgDir}'/${arch}/archlinuxewe.db.tar.gz | \ grep -A1 "^%FILENAME%\$" | \ @@ -260,13 +266,37 @@ then ) | \ sort | \ uniq -u - ) - do + ) + do - err=1 - >&2 echo "FEHLER: Paket '${pkgDir}'/${arch}/${warnungen} ist entweder nur in der Datenbank oder nur im Verzeichnisbaum vorhanden." + err=1 + if [ -e "'${pkgDir}'/${arch}/${paketFehler}" ] + then + >&2 echo "FEHLER: Paket '${pkgDir}'/${arch}/${paketFehler} ist entweder nur im Verzeichnisbaum vorhanden." + else + >&2 echo "FEHLER: Paket '${pkgDir}'/${arch}/${paketFehler} ist entweder nur in der Datenbank vorhanden." + fi - done + done + + for signaturWarnungen in $( \ + ls '${pkgDir}'/${arch} | \ + grep "^.*\.pkg\.tar\.xz\(\.sig\)\?\$" | \ + sed "s|\.sig\$||" | \ + sort | \ + uniq -u + ) + do + + if [ -e "'${pkgDir}'/${arch}/${signaturWarnungen}" ] + then + >&2 echo "WARNUNG: Paket '${pkgDir}'/${arch}/${signaturWarnungen} hat keine Signatur." + else + err=1 + >&2 echo "FEHLER: Zur Signatur '${pkgDir}'/${arch}/${signaturWarnungen}.sig gibt es kein Paket." + fi + + done done |