summaryrefslogtreecommitdiff
path: root/core/ports/post_update_patches.patch.new
diff options
context:
space:
mode:
Diffstat (limited to 'core/ports/post_update_patches.patch.new')
-rw-r--r--core/ports/post_update_patches.patch.new17
1 files changed, 10 insertions, 7 deletions
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