sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Thomas Orgis (5a313b8c477a487d8c01f5d6a65da7cd5d83cd8c)
- From: Thomas Orgis <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Thomas Orgis (5a313b8c477a487d8c01f5d6a65da7cd5d83cd8c)
- Date: Mon, 22 Jan 2018 16:27:25 +0000
GIT changes to master grimoire by Thomas Orgis <sobukus AT sourcemage.org>:
devel/patch/0001-Create-git-diff-files-with-indicated-mode.patch | 110
++++++++++
devel/patch/CONFIGURE | 4
devel/patch/DETAILS | 1
devel/patch/HISTORY | 6
devel/patch/PRE_BUILD | 6
5 files changed, 127 insertions(+)
New commits:
commit 5a313b8c477a487d8c01f5d6a65da7cd5d83cd8c
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>
patch: add optional patch for file creation mode fix
This might be neeed for the linux spell to work (an executable
script needed during build being created by patch-4.xx.yy.xz).
See upstream bug report at
http://savannah.gnu.org/bugs/index.php?52950
diff --git a/devel/patch/0001-Create-git-diff-files-with-indicated-mode.patch
b/devel/patch/0001-Create-git-diff-files-with-indicated-mode.patch
new file mode 100644
index 0000000..78c8d5c
--- /dev/null
+++ b/devel/patch/0001-Create-git-diff-files-with-indicated-mode.patch
@@ -0,0 +1,110 @@
+From cf5163d314c3ef403f79b2d83a673959e259545b Mon Sep 17 00:00:00 2001
+From: Thomas Orgis <thomas AT orgis.org>
+Date: Mon, 22 Jan 2018 16:46:38 +0100
+Subject: [PATCH] Create git diff files with indicated mode.
+
+This enables correct mode for newly created files as indicated in
+git diffs. The lack of this will hurt people trying to build current
+Linux 4.14.x from the signed tarball and patch file, as it creates
+a script which breaks the build if it is not created with the executable
+bit.
+---
+ src/patch.c | 8 ++++++--
+ tests/Makefile.am | 1 +
+ tests/file-create-modes | 53
+++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 60 insertions(+), 2 deletions(-)
+ create mode 100644 tests/file-create-modes
+
+diff --git a/src/patch.c b/src/patch.c
+index bba7e0e..0120aa6 100644
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -590,8 +590,12 @@ main (int argc, char **argv)
+ }
+
+ if (inerrno)
+- set_file_attributes (TMPOUTNAME, attr, NULL, NULL,
+- mode, &new_time);
++ {
++ if(set_mode)
++ attr |= FA_MODE; /* Create files with proper mode
given in git diffs. */
++ set_file_attributes (TMPOUTNAME, attr, NULL, NULL,
++ mode, &new_time);
++ }
+ else
+ {
+ attr |= FA_IDS | FA_MODE | FA_XATTRS;
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 9ae6916..6b6df63 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -35,6 +35,7 @@ TESTS = \
+ empty-files \
+ false-match \
+ fifo \
++ file-create-modes \
+ file-modes \
+ filename-choice \
+ git-binary-diff \
+diff --git a/tests/file-create-modes b/tests/file-create-modes
+new file mode 100644
+index 0000000..7f3c9e8
+--- /dev/null
++++ b/tests/file-create-modes
+@@ -0,0 +1,53 @@
++# Copyright (C) 2010-2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++# Test if git diffs can create filess with proper modes
++
++. $srcdir/test-lib.sh
++
++require cat
++require sed
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > f.diff <<EOF
++diff --git a/f b/f
++new file mode 100710
++index 0000000..3e75765
++--- /dev/null
+++++ b/f
++@@ -0,0 +1 @@
+++new
++
++diff --git a/g b/g
++new file mode 100654
++index 0000000..3e75765
++--- /dev/null
+++++ b/g
++@@ -0,0 +1 @@
+++new
++EOF
++
++check 'patch -p1 < f.diff' <<EOF
++patching file f
++patching file g
++EOF
++
++check 'ls -l f g | sed "s,\(..........\).*,\1,"' <<EOF
++-rwx--x---
++-rw-r-xr--
++EOF
++
++check 'patch -p1 -R < f.diff' <<EOF
++patching file f
++patching file g
++EOF
++
++check 'test -e f || test -e g && echo fail || echo pass' <<EOF
++pass
++EOF
+--
+2.15.1
+
diff --git a/devel/patch/CONFIGURE b/devel/patch/CONFIGURE
new file mode 100755
index 0000000..95b9f2a
--- /dev/null
+++ b/devel/patch/CONFIGURE
@@ -0,0 +1,4 @@
+# Needed for patch-2.7.5, later releases hopefully integrate the fix.
+config_query PATCH_CREATE_MODE \
+ 'Apply patch to fix mode of newly created files from git diffs?' n
+
diff --git a/devel/patch/DETAILS b/devel/patch/DETAILS
index 8a540fc..0f14f49 100755
--- a/devel/patch/DETAILS
+++ b/devel/patch/DETAILS
@@ -1,6 +1,7 @@
SPELL=patch
VERSION=2.7.5
SECURITY_PATCH=2
+ PATCHLEVEL=1
SOURCE=$SPELL-$VERSION.tar.xz
SOURCE2=$SOURCE.sig
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
diff --git a/devel/patch/HISTORY b/devel/patch/HISTORY
index 8130e8b..2cff018 100644
--- a/devel/patch/HISTORY
+++ b/devel/patch/HISTORY
@@ -1,3 +1,9 @@
+2018-01-22 Thomas Orgis <sobukus AT sourcemage.org>
+ * PRE_BUILD, CONFIGURE,
+ 0001-Create-git-diff-files-with-indicated-mode.patch: optional
+ fix for file creation mode
+ * DETAILS: PATCHLEVEL++
+
2016-11-07 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 2.7.5
diff --git a/devel/patch/PRE_BUILD b/devel/patch/PRE_BUILD
new file mode 100755
index 0000000..4d04312
--- /dev/null
+++ b/devel/patch/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+if [[ $PATCH_CREATE_MODE == y ]]; then
+ cd "$SOURCE_DIRECTORY" &&
+ patch -Np1 <
"$SCRIPT_DIRECTORY/0001-Create-git-diff-files-with-indicated-mode.patch" &&
+ autoreconf -iv
+fi
- [SM-Commit] GIT changes to master grimoire by Thomas Orgis (5a313b8c477a487d8c01f5d6a65da7cd5d83cd8c), Thomas Orgis, 01/22/2018
Archive powered by MHonArc 2.6.24.