SHA256
1
0
forked from pool/quilt

- 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).

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=97
This commit is contained in:
Jean Delvare 2015-02-04 07:55:16 +00:00 committed by Git OBS Bridge
parent 888112a4df
commit 8a2058fdaf
5 changed files with 66 additions and 1 deletions

View File

@ -1,6 +1,6 @@
From: Jean Delvare <jdelvare@suse.de> From: Jean Delvare <jdelvare@suse.de>
Subject: mail: Don't include the release number in User-Agent 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 @RELEASE@ is replaced with the package-level release number in two
places: the spec file, where it is legitimate, and the mail command's places: the spec file, where it is legitimate, and the mail command's

View File

@ -0,0 +1,27 @@
From: Jean Delvare <jdelvare@suse.de>
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'

View File

@ -0,0 +1,25 @@
From: Jean Delvare <jdelvare@suse.de>
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"

View File

@ -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 Wed Jan 28 12:15:51 CET 2015 - jdelvare@suse.de

View File

@ -69,6 +69,8 @@ Patch71: hackweek-11-11-setup-trace-call-first.patch
Patch72: hackweek-11-12-setup-alternative-implementation-v2.patch Patch72: hackweek-11-12-setup-alternative-implementation-v2.patch
Patch73: hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch Patch73: hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch
Patch74: hackweek-11-14-setup-fix-link-creation.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 BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
%if 0%{?suse_version} %if 0%{?suse_version}
@ -120,6 +122,8 @@ http://www.zip.com.au/~akpm/linux/patches/.
%patch72 -p1 %patch72 -p1
%patch73 -p1 %patch73 -p1
%patch74 -p1 %patch74 -p1
%patch75 -p1
%patch76 -p1
%build %build
# --with-rpmbuild=/usr/lib/rpm/rpmb: # --with-rpmbuild=/usr/lib/rpm/rpmb: