diff options
author | Erich Eckner <git@eckner.net> | 2017-02-26 22:52:51 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-02-26 22:52:51 +0100 |
commit | 2bbd8c80c567ceeea6debcda031f3061d0a2e698 (patch) | |
tree | 6fa739995194077d698c0a9b92a2076d8c98885b | |
parent | 7b31524b13ad9e9fab8081f6019770b6d8fa7fd8 (diff) | |
download | crux-patches-2bbd8c80c567ceeea6debcda031f3061d0a2e698.tar.xz |
ports: kann nun auch signieren
-rw-r--r-- | core/ports/post_update_patches.Pkgfile.patch | 13 | ||||
-rw-r--r-- | core/ports/post_update_patches.patch.new | 17 |
2 files changed, 17 insertions, 13 deletions
diff --git a/core/ports/post_update_patches.Pkgfile.patch b/core/ports/post_update_patches.Pkgfile.patch index 618237f..709f203 100644 --- a/core/ports/post_update_patches.Pkgfile.patch +++ b/core/ports/post_update_patches.Pkgfile.patch @@ -1,11 +1,12 @@ ---- Pkgfile 2015-11-25 17:13:38.556662829 +0100 -+++ Pkgfile 2016-04-27 22:36:58.230001880 +0200 -@@ -8,10 +8,12 @@ +--- Pkgfile 2017-02-26 22:04:47.977370941 +0100 ++++ Pkgfile 2017-02-26 22:05:04.834041199 +0100 +@@ -8,11 +8,12 @@ source=(http://crux.nu/files/tools/ports/$name-$version.tar.gz \ - core.rsync opt.rsync xorg.rsync compat-32.rsync.inactive \ -+ post_update_patches.patch \ - contrib.rsync.inactive) + core.pub opt.pub xorg.pub compat-32.pub contrib.pub \ +- core.rsync opt.rsync xorg.rsync \ ++ core.rsync opt.rsync xorg.rsync post_update_patches.patch \ + compat-32.rsync.inactive contrib.rsync.inactive) build () { cd $name-$version diff --git a/core/ports/post_update_patches.patch.new b/core/ports/post_update_patches.patch.new index 85993b0..7326176 100644 --- a/core/ports/post_update_patches.patch.new +++ b/core/ports/post_update_patches.patch.new @@ -1,10 +1,11 @@ --- ports.in 2004-03-07 21:55:24.000000000 +0100 +++ ports.in 2016-04-27 22:41:06.030194539 +0200 -@@ -22,6 +22,51 @@ +@@ -22,6 +22,54 @@ VERSION="#VERSION#" PORTS_DIR="/usr/ports" +PATCHES_DIR="/usr/patches" ++MASTER_KEY="/etc/ports/$(ls -1 "/etc/ports" | grep -m1 '\.sec$')" + +post_update_hooks() { + ( @@ -24,35 +25,37 @@ + exit 1 + esac + [ -d $PATCHES_DIR$CURRENT_DIR ] || exit 0 -+ for PATCH_PORT in $PATCHES_DIR$CURRENT_DIR/* -+ do ++ for PATCH_PORT in $PATCHES_DIR$CURRENT_DIR/*; do + [ -d $PATCH_PORT ] || continue + [ -d $PORTS_DIR${PATCH_PORT#$PATCHES_DIR} ] || continue + cd $PORTS_DIR${PATCH_PORT#$PATCHES_DIR} -+ for DATEI in $(find $PATCH_PORT \( -name ".*" -prune -false \) -o \( -type f -not -name ".*" \) ) -+ do ++ pkgmk -do -cs || exit $? ++ for DATEI in $(find $PATCH_PORT \( -name ".*" -prune -false \) -o \( -type f -not -name ".*" \) ); do + case $DATEI in + *.patch) + echo "$(pwd): patching '$DATEI' ..." + patch -p0 -i $DATEI || exit $? ++ sed -i '/^SHA256 (Pkgfile) = /d' .signature + ;; + *.new) + echo "$(pwd): copying '$DATEI'" + cp $DATEI $(basename $DATEI .new) + md5sum $(basename $DATEI .new) >> .md5sum ++ sha512sum --tag $(basename $DATEI .new) >> .signature + ;; + *) + echo "$COMMAND: patch file '$DATEI' has unknown extension" + exit 1 + esac + done ++ pkgmk -rs -sk $MASTER_KEY + done + ) || exit $? +} check_ports_dir() { if [ ! -d "$PORTS_DIR" ]; then -@@ -53,6 +98,7 @@ +@@ -53,6 +101,7 @@ file=/etc/ports/$collection.$suffix if [ -f $file ]; then $driver $file @@ -60,7 +63,7 @@ fi fi done -@@ -67,6 +113,7 @@ +@@ -67,6 +116,7 @@ suffix=`basename $driver` for file in /etc/ports/*.$suffix; do $driver $file |