summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-03-07 10:29:21 +0100
committerErich Eckner <git@eckner.net>2017-03-07 10:29:21 +0100
commit19c08fe50933f7fb43b9112f950fecc84df19c4b (patch)
tree45ba4943c73219cd089eabb0ce1add8f438df7df
parent34b9c1acdcf8cead50adfe45e73becbb17f879b3 (diff)
downloadcrux-patches-19c08fe50933f7fb43b9112f950fecc84df19c4b.tar.xz
pkgmk: permissions-test-patch new (should be accepted upstream soon)
-rw-r--r--core/pkgutils/Pkgfile-apply-patch2.patch16
-rw-r--r--core/pkgutils/pkgmk-permissions-test.patch.new68
2 files changed, 84 insertions, 0 deletions
diff --git a/core/pkgutils/Pkgfile-apply-patch2.patch b/core/pkgutils/Pkgfile-apply-patch2.patch
new file mode 100644
index 0000000..d8cddeb
--- /dev/null
+++ b/core/pkgutils/Pkgfile-apply-patch2.patch
@@ -0,0 +1,16 @@
+--- Pkgfile 2016-06-01 21:50:22.035228588 +0200
++++ Pkgfile 2016-06-01 21:50:47.785297105 +0200
+@@ -7,10 +7,12 @@
+ version=5.40.1
+ release=1
+ source=(http://crux.nu/files/$name-$version.tar.xz
+- PKGMK_FULL_SOURCE_MIRRORS.patch)
++ PKGMK_FULL_SOURCE_MIRRORS.patch
++ pkgmk-permissions-test.patch)
+
+ build () {
+ cd $name-$version
+ patch -p1 -i ../PKGMK_FULL_SOURCE_MIRRORS.patch
++ patch -p1 -i ../pkgmk-permissions-test.patch
+ make DESTDIR=$PKG install
+ }
diff --git a/core/pkgutils/pkgmk-permissions-test.patch.new b/core/pkgutils/pkgmk-permissions-test.patch.new
new file mode 100644
index 0000000..d94705a
--- /dev/null
+++ b/core/pkgutils/pkgmk-permissions-test.patch.new
@@ -0,0 +1,68 @@
+--- a/pkgmk.in 2017-03-01 20:04:24.792329517 +0100
++++ b/pkgmk.in 2017-03-01 20:09:20.608612750 +0100
+@@ -103,9 +103,14 @@
+ error "File '$1' is not writable."
+ exit 1
+ fi
++ if [ ! -e $1 ]; then
++ check_directory `dirname $1`
++ fi
+ }
+
+ download_file() {
++ check_directory "$PKGMK_SOURCE_DIR"
++
+ info "Downloading '$1'."
+
+ PKGMK_DOWNLOAD_PROG=${PKGMK_DOWNLOAD_PROG:-wget}
+@@ -631,10 +636,13 @@
+ local FILE LOCAL_FILENAME
+
+ if [ -f $TARGET ]; then
++ check_directory "$PKGMK_PACKAGE_DIR"
+ info "Removing $TARGET"
+ rm -f $TARGET
+ fi
+
++ check_directory "$PKGMK_SOURCE_DIR"
++
+ for FILE in ${source[@]}; do
+ LOCAL_FILENAME=`get_filename $FILE`
+ if [ -e $LOCAL_FILENAME ] && [ "$LOCAL_FILENAME" != "$FILE" ]; then
+@@ -652,7 +660,6 @@
+
+ check_file "$PKGMK_FOOTPRINT"
+ make_footprint > $PKGMK_FOOTPRINT
+- touch $TARGET
+
+ info "Footprint updated."
+ }
+@@ -822,10 +829,6 @@
+ . $FILE
+ done
+
+- check_directory "$PKGMK_SOURCE_DIR"
+- check_directory "$PKGMK_PACKAGE_DIR"
+- check_directory "`dirname $PKGMK_WORK_DIR`"
+-
+ check_pkgfile
+
+ case $PKGMK_COMPRESSION_MODE in
+@@ -878,6 +881,8 @@
+
+ if [ "$PKGMK_EXTRACT_ONLY" = "yes" ]; then
+ download_source
++ check_directory "$PKGMK_PACKAGE_DIR"
++ check_directory "`dirname $PKGMK_WORK_DIR`"
+ make_work_dir
+ info "Extracting sources of package '$name-$version'."
+ unpack_source
+@@ -897,6 +902,8 @@
+ info "Package '$TARGET' is up to date."
+ else
+ download_source
++ check_directory "$PKGMK_PACKAGE_DIR"
++ check_directory "`dirname $PKGMK_WORK_DIR`"
+ build_package
+ fi
+