diff --git a/dont-substitute-release.patch b/dont-substitute-release.patch index a213357..23cf88d 100644 --- a/dont-substitute-release.patch +++ b/dont-substitute-release.patch @@ -1,6 +1,6 @@ From: Jean Delvare Subject: mail: Don't include the release number in User-Agent -Upstream: Submitted (2015-01-26) +Upstream: Committed (2c8ddc751606ad7c36381269af1f64b4c62ba44c) @RELEASE@ is replaced with the package-level release number in two places: the spec file, where it is legitimate, and the mail command's diff --git a/hackweek-11-15-setup-missing-escape-in-normalize_path.patch b/hackweek-11-15-setup-missing-escape-in-normalize_path.patch new file mode 100644 index 0000000..eab0306 --- /dev/null +++ b/hackweek-11-15-setup-missing-escape-in-normalize_path.patch @@ -0,0 +1,27 @@ +From: Jean Delvare +Subject: setup: Fix removal of "." components in normalize_path +Upstream: Submitted (2015-02-03) + +The code was broken in 3 ways: +* I forgot to escape the "." so it would match any character. +* The g flag is not enough to catch consecutive "." components, + because pattern matches can't overlap. +* A trailing "." component would not be removed. + +This fixes commit 3fd706a50b7dbb4f8db6e5db014729db51e6beb0 +("setup: Let normalize_path deal with "."".) +--- + quilt/setup.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/quilt/setup.in ++++ b/quilt/setup.in +@@ -75,7 +75,7 @@ check_for_existing_files() + normalize_path() + { + echo "$1" | sed -r -e 's://:/:g' \ +- -e 's:/./:/:g' \ ++ -e 's:/\.(/\.)*(/|$):\2:g' \ + -e ':again' \ + -e 's:/[^/]+/\.\.(/|$):\1:g' \ + -e 'tagain' diff --git a/hackweek-11-16-setup-fix-create_symlink-corner-case.patch b/hackweek-11-16-setup-fix-create_symlink-corner-case.patch new file mode 100644 index 0000000..6477e0d --- /dev/null +++ b/hackweek-11-16-setup-fix-create_symlink-corner-case.patch @@ -0,0 +1,25 @@ +From: Jean Delvare +Subject: setup: Fix a corner case in create_symlink +Upstream: Submitted (2015-02-03) +References: boo#916007 + +When a link's target is the directory it lives in, create_symlink +would erroneously link to "..". Fix the code to properly link to "." +instead. + +Credits to Robert Milasan for spotting the bug. +--- + quilt/setup.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/quilt/setup.in ++++ b/quilt/setup.in +@@ -97,7 +97,7 @@ create_symlink() + do + set -- "${1#*/}" "${2#*/}" + done +- up=$(echo "${2%/*}" | sed -re 's:[^/]+:..:g') ++ up=$(echo "$2" | sed -r -e 's:(^|/)[^/]*$::' -e 's:[^/]+:..:g') + set -- "${up:+$up/}$1" + set -- "${1%/}" + ln -s "${1:-.}" "$link" diff --git a/quilt.changes b/quilt.changes index 5422b87..c6b4ff9 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Feb 4 08:52:03 CET 2015 - jdelvare@suse.de + +- dont-substitute-release.patch: Update upstream reference. +- hackweek-11-15-setup-missing-escape-in-normalize_path.patch: + setup: Fix removal of "." components in normalize_path. +- hackweek-11-16-setup-fix-create_symlink-corner-case.patch: setup: + Fix a corner case in create_symlink (boo#916007). + ------------------------------------------------------------------- Wed Jan 28 12:15:51 CET 2015 - jdelvare@suse.de diff --git a/quilt.spec b/quilt.spec index c1bdf4b..9b270cf 100644 --- a/quilt.spec +++ b/quilt.spec @@ -69,6 +69,8 @@ Patch71: hackweek-11-11-setup-trace-call-first.patch Patch72: hackweek-11-12-setup-alternative-implementation-v2.patch Patch73: hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch Patch74: hackweek-11-14-setup-fix-link-creation.patch +Patch75: hackweek-11-15-setup-missing-escape-in-normalize_path.patch +Patch76: hackweek-11-16-setup-fix-create_symlink-corner-case.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %if 0%{?suse_version} @@ -120,6 +122,8 @@ http://www.zip.com.au/~akpm/linux/patches/. %patch72 -p1 %patch73 -p1 %patch74 -p1 +%patch75 -p1 +%patch76 -p1 %build # --with-rpmbuild=/usr/lib/rpm/rpmb: