SHA256
1
0
forked from pool/quilt

Accepting request 210033 from devel:tools:scm

- Recompress the source archive with bzip2 (to remove a rpmlint warning.)
- Change bzip2 from required to recommended. Quilt works just fine without it and xz compression if becoming more popular than bzip2.
- update to 0.61

OBS-URL: https://build.opensuse.org/request/show/210033
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quilt?expand=0&rev=50
This commit is contained in:
Stephan Kulow 2013-12-10 15:03:28 +00:00 committed by Git OBS Bridge
commit a3a02065b8
15 changed files with 45 additions and 463 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d72a292e432beb9a73f9d0acfe3a77c9b4d7e42209919bb244e9958c7cfe64b
size 442369

3
quilt-0.61.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92ddb850e84cee29b97cde53537591b648402aaba6686c358857fb9597a0f6bc
size 389944

View File

@ -1,20 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Date: Mon, 30 Sep 2013 12:21:16 +0000
Subject: delete.test: Cope with new quoting style in find error message
Git-commit: ab6c69664664ec66b097aeba113288f341f34e5d
---
test/delete.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/test/delete.test
+++ b/test/delete.test
@@ -77,7 +77,7 @@ Test the delete command.
$ quilt delete "test3"
> Removing patch %{P}test3
- >~ find: `?\./dir'?: Permission denied
+ >~ .*find: [`']?\./dir'?: Permission denied
$ chmod a+rx .pc/test3/dir

View File

@ -1,19 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Date: Mon, 30 Sep 2013 12:22:45 +0000
Subject: Makefile.in: Fix support for configure --with-xargs
Git-commit: 4e09264d3cbbfc49761a36635f1662b9d38358eb
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
--- a/Makefile.in
+++ b/Makefile.in
@@ -30,6 +30,7 @@ TR := @TR@
SED := @SED@
AWK := @AWK@
FIND := @FIND@
+XARGS := @XARGS@
DIFF := @DIFF@
PATCH := @PATCH@
MKTEMP := @MKTEMP@

View File

@ -1,27 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Date: Fri, 24 May 2013 13:13:55 +0000
Subject: Makefile: Fix "find -perm" usage
Git-commit: bc340b709b866f50273d4ef125e1ae3cbc44c6ac
Support for obsolete find -perm +MODE syntax was removed from GNU
findutils by commit
v4.5.10-144-g90f0c5d24153ad3327edd6f2249fc95a5cfb72e0.
Reported by Dmitry V. Levin.
Also -maxdepth is not portable and not needed so drop it.
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile.in
+++ b/Makefile.in
@@ -277,7 +277,7 @@ Makefile : Makefile.in configure
@echo "Please run ./configure"
@false
-compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -maxdepth 1 -type f -perm +111))
+compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -type f -perm -0100))
.PHONY :: compat
compat :: $(COMPAT)

View File

@ -1,35 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: setup: Check for existing files after unpacking
setup: check for existing files after unpacking the tar files, not
before, otherwise we check too early and a tar file containing a
"patches" directory will not be handled properly.
---
Originally (commit b704611d) existing files were checked for both
before and after unpacking the tar files. Commit 639f2f9c dropped
the second check, while I believe it should have dropped the first.
Andreas, is there any reason to check before unpacking too?
quilt/setup.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -183,8 +183,6 @@ case "$1" in
;;
esac
-check_for_existing_files || exit 1
-
while read tag dir arg1 arg2
do
case "$tag" in
@@ -203,6 +201,8 @@ do
esac
done < $tmpfile
+check_for_existing_files || exit 1
+
while read tag dir arg1 arg2
do
case "$tag" in

View File

@ -1,26 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: setup: Try alternative patches/series names
setup: If a tar file contains a patches directory or a series file,
automatically try alternative names which are less likely to collide.
---
quilt/setup.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -201,7 +201,13 @@ do
esac
done < $tmpfile
-check_for_existing_files || exit 1
+if ! check_for_existing_files
+then
+ echo "Trying alternative patches and series names..." >&2
+ QUILT_PATCHES=quilt_patches
+ QUILT_SERIES=quilt_series
+ check_for_existing_files || exit 1
+fi
while read tag dir arg1 arg2
do

View File

@ -1,70 +0,0 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: setup: Run create_db
Run create_db() as part of quilt setup, so that $QUILT_PATCHES and
$QUILT_SERIES are recorded for future quilt commands.
---
quilt/setup.in | 8 ++++++--
test/setup.test | 26 ++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 2 deletions(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -218,8 +218,12 @@ do
tar_file="$arg1"
;;
patch)
- [ -e "$prefix$dir/$QUILT_PATCHES" ] \
- || create_symlink "$sourcedir" "$prefix$dir/$QUILT_PATCHES"
+ if [ ! -e "$prefix$dir/$QUILT_PATCHES" ]
+ then
+ create_symlink "$sourcedir" "$prefix$dir/$QUILT_PATCHES"
+ (cd "$prefix$dir" && create_db)
+ fi
+
if [ -n "$series_file" ]
then
[ -e "$prefix$dir/$QUILT_SERIES" ] \
--- a/test/setup.test
+++ b/test/setup.test
@@ -7,7 +7,11 @@ $ diff -u dir/foo.orig dir/foo > revert.
$ diff -u dir/foo.orig dir/foo > again.diff
$ mv dir/foo.orig dir/foo
$ tar cf - dir | gzip > dir.tar.gz
+$ mkdir dir/patches
+$ echo crap > dir/patches/foo.diff
+$ tar cf - dir | gzip > dir_with_patches.tar.gz
$ rm -rf dir
+
$ cat > series
< # Source: dir.tar.gz
< # Patchdir: dir
@@ -57,6 +61,28 @@ $ quilt push -qa
> Applying patch patches/revert.diff
> Applying patch patches/again.diff
> Now at patch patches/again.diff
+$ cd ../..
+$ rm -rf "dir"
+
+# Now test the case where the tarball contains a patches directory
+$ cat > series_with_patches
+< # Source: dir_with_patches.tar.gz
+< # Patchdir: dir
+< #
+< foo.diff
+$ quilt setup series_with_patches
+> Unpacking archive dir_with_patches.tar.gz
+> Directory dir/patches exists
+> Trying alternative patches and series names...
+$ cd dir
+$ ls -l quilt_patches quilt_series | sed -e 's:.* -> ::'
+> ..
+> ../series_with_patches
+$ quilt push -qa
+> Applying patch quilt_patches/foo.diff
+> Now at patch quilt_patches/foo.diff
+$ cd ..
+$ rm -rf "dir"
# Now a basic test with space in dir name
$ mkdir "space [dir]"

View File

@ -1,118 +0,0 @@
Let quilt setup handle zip archives referenced in spec files.
---
quilt/scripts/inspect.in | 28 ++++++++++++++++++++++++++++
quilt/setup.in | 23 +++++++++++++++++++++--
2 files changed, 49 insertions(+), 2 deletions(-)
--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -251,6 +251,21 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
esac
}
+ unzip_input_file() {
+ while [ $# -gt 0 ]; do
+ case "$1" in
+ -*)
+ shift
+ ;;
+ *)
+ echo "$1"
+ return
+ ;;
+ esac
+ done
+ return 1
+ }
+
tar_opt_C() {
case "$1" in
*C*f*)
@@ -270,6 +285,9 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
# For tar, file - means read from stdin
[ "$inputfile" = "-" ] && inputfile=
;;
+ unzip)
+ inputfile=$(unzip_input_file "$@")
+ ;;
esac
if [ -z "$inputfile" ]; then
# put data from stdin into tmpfile
@@ -309,6 +327,14 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
dir=${dir// /\\ }
echo "${0##*/} ${dir:-.} $unpackfile" >&3
;;
+ unzip)
+ echo -n Z >&4
+ dir=$PWD
+ dir=${dir/$RPM_BUILD_DIR}
+ dir=${dir##/}
+ dir=${dir// /\\ }
+ echo "${0##*/} ${dir:-.} $unpackfile" >&3
+ ;;
esac
fi
@@ -333,6 +359,7 @@ fi
ln -s wrapper $tmpdir/bin/patch
ln -s wrapper $tmpdir/bin/tar
+ln -s wrapper $tmpdir/bin/unzip
# let rpm do all the dirty specfile stuff ...
echo -n "### rpmbuild: " >&4
@@ -343,6 +370,7 @@ rpmbuild --eval "%define _sourcedir $sou
--eval "%define _builddir $tmpdir/build" \
--eval "%define __patch $tmpdir/bin/patch" \
--eval "%define __tar $tmpdir/bin/tar" \
+ --eval "%define __unzip $tmpdir/bin/unzip" \
--eval "$DEFINE_FUZZ" \
--nodeps \
-bp "$specdir/$specfile" < /dev/null >&5 2>&5
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -167,7 +167,15 @@ case "$1" in
"# Source: "*)
shift 2
source="$@"
- echo "tar ${tar_dir:-.} ${source// /\\ }"
+ filetype="$(file -b "$source")"
+ case "$filetype" in
+ Zip*)
+ echo "unzip ${tar_dir:-.} ${source// /\\ }"
+ ;;
+ *)
+ echo "tar ${tar_dir:-.} ${source// /\\ }"
+ ;;
+ esac
;;
"# Patchdir: "*)
shift 2
@@ -198,6 +206,17 @@ do
cat_file "$tarball" \
| tar xf - -C "$prefix$dir"
;;
+ unzip)
+ tarball=$sourcedir$arg1
+ if [ ! -e "$tarball" ]
+ then
+ printf $"File %s not found\n" "$tarball" >&2
+ exit 1
+ fi
+ printf $"Unpacking archive %s\n" "$tarball"
+ mkdir -p "${prefix:-.}" "$prefix$dir"
+ unzip -qqo "$tarball" -d "$prefix$dir"
+ ;;
esac
done < $tmpfile
@@ -212,7 +231,7 @@ fi
while read tag dir arg1 arg2
do
case "$tag" in
- tar)
+ tar|unzip)
tar_dir="$dir"
[ "$tar_dir" = . ] && tar_dir=
tar_file="$arg1"

View File

@ -1,37 +0,0 @@
Fix handling of directory names including white spaces by
check_for_existing_files. awk can't deal with tokens which include
white spaces, so use bash's read function instead.
As a side bonus, we get rid of the undocumented dependency to "uniq".
---
quilt/setup.in | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -23,9 +23,12 @@ then
fi
check_for_existing_files() {
- local dir status=0
- for dir in $(awk ' $1 == "patch" { print $2 }' $tmpfile | uniq)
+ local tag dir last_dir arg status=0
+
+ while read tag dir arg
do
+ [ "$tag" = "patch" -a "$dir" != "$last_dir" ] || continue
+
if [ -e "$prefix$dir/$QUILT_PATCHES" ]
then
printf $"Directory %s exists\n" \
@@ -38,7 +41,9 @@ check_for_existing_files() {
"$prefix$dir/$QUILT_SERIES" >&2
status=1
fi
- done
+ last_dir=$dir
+ done < $tmpfile
+
return $status
}

View File

@ -1,65 +0,0 @@
Check for existing directories before unpacking.
---
quilt/setup.in | 22 ++++++++++++++++++++++
test/setup.test | 7 ++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -22,6 +22,25 @@ then
fi
fi
+check_for_existing_directories() {
+ local tag dir last_dir arg status=0
+
+ while read tag dir arg
+ do
+ [ "$dir" != "." -a "$dir" != "$last_dir" ] || continue
+
+ if [ -e "$prefix$dir" ]
+ then
+ printf $"Directory %s exists\n" \
+ "$prefix$dir" >&2
+ status=1
+ fi
+ last_dir=$dir
+ done < $tmpfile
+
+ return $status
+}
+
check_for_existing_files() {
local tag dir last_dir arg status=0
@@ -196,6 +215,9 @@ case "$1" in
;;
esac
+# Make sure that unpacking will not overwrite anything
+check_for_existing_directories || exit 1
+
while read tag dir arg1 arg2
do
case "$tag" in
--- a/test/setup.test
+++ b/test/setup.test
@@ -64,12 +64,17 @@ $ quilt push -qa
$ cd ../..
$ rm -rf "dir"
-# Now test the case where the tarball contains a patches directory
+# Now test the cases where the directory already exists, or the tarball
+# contains a patches directory
$ cat > series_with_patches
< # Source: dir_with_patches.tar.gz
< # Patchdir: dir
< #
< foo.diff
+$ mkdir dir
+$ quilt setup series_with_patches
+> Directory dir exists
+$ rmdir dir
$ quilt setup series_with_patches
> Unpacking archive dir_with_patches.tar.gz
> Directory dir/patches exists

View File

@ -1,19 +0,0 @@
---
Makefile.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- quilt-0.60.orig/Makefile.in
+++ quilt-0.60/Makefile.in
@@ -215,8 +215,11 @@ doc/reference : bin/quilt $(QUILT:%=quil
@unset LANG LC_MESSAGES LC_CTYPE LC_ALL; \
for i in $(QUILT); \
do \
+ echo $$i; \
+ done | sort | while read j ; \
+ do \
echo; \
- QUILT_PC=.fake_pc quilt $$i -h; \
+ QUILT_PC=.fake_pc quilt $$j -h; \
echo; \
done | \
$(SED) -e 's/\$$EDITOR ([^)]*)/$$EDITOR/' \

View File

@ -23,7 +23,7 @@ non-interactive alternative diff viewers must exist too.
+ quilt, you will have to unset QUILT_PAGER for proper result.
--color[=always|auto|never]
Use syntax coloring.
Use syntax coloring (auto activates it only if the output is a tty).
@@ -211,6 +213,13 @@ done
QUILT_DIFF_OPTS="$QUILT_DIFF_OPTS $opt_format"

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Mon Dec 9 13:36:41 CET 2013 - jdelvare@suse.de
- Recompress the source archive with bzip2 (to remove a rpmlint
warning.)
-------------------------------------------------------------------
Mon Dec 9 11:20:32 CET 2013 - jdelvare@suse.de
- Change bzip2 from required to recommended. Quilt works just fine
without it and xz compression if becoming more popular than
bzip2.
-------------------------------------------------------------------
Mon Dec 9 10:44:43 CET 2013 - jdelvare@suse.de
- update to 0.61
o No new feature, but almost two years of fixes and minor
improvements.
o Many fixes and improvements to quilt.el (emacs integration.)
o Many fixes and improvements to the setup command, which we
already had as patches.
o Parameter quoting fixes to many commands.
o Several fixes and improvements to remove-trailing-ws, together
with a dedicated test case.
o Various fixes to the pop, push, refresh and patches commands.
o Translation fixes and updates.
o Obsoletes quilt-find-quoting-style.patch.
o Obsoletes quilt-makefile-fix-configure-with-xargs.patch.
o Obsoletes quilt-makefile-fix-find-perm-usage.patch.
o Obsoletes quilt-setup-01-check-existing-files-after-unpack.patch.
o Obsoletes quilt-setup-02-try-alternative-names.patch.
o Obsoletes quilt-setup-03-remember-alternative-names.patch.
o Obsoletes quilt-setup-04-handle-zip-files.patch.
o Obsoletes quilt-setup-05-fix-check_for_existing_files.patch.
o Obsoletes quilt-setup-06-check-for-directories-too.patch.
o Obsoletes quilt-stable-rebuild.patch.
-------------------------------------------------------------------
Mon Sep 30 14:36:03 CEST 2013 - jdelvare@suse.de

View File

@ -17,7 +17,7 @@
Name: quilt
Version: 0.60
Version: 0.61
Release: 0
Summary: A Tool for Working with Many Patches
License: GPL-2.0+
@ -26,7 +26,6 @@ BuildRequires: diffstat
BuildRequires: ed
BuildRequires: emacs-nox
BuildRequires: procmail
Requires: bzip2
Requires: coreutils
Requires: diffstat
Requires: diffutils
@ -37,25 +36,16 @@ Requires: mktemp
Requires: patch
Requires: perl
Url: http://savannah.nongnu.org/projects/quilt
Source: http://download.savannah.gnu.org/releases/quilt/%{name}-%{version}.tar.gz
Source: %{name}-%{version}.tar.bz2
Source1: suse-start-quilt-mode.el
Patch1: expand.diff
Patch2: quilt-support-vimdiff.patch
Patch3: patch-wrapper-rpm.diff
Patch5: suse-workaround-pseudo-release.patch
Patch6: quilt-stable-rebuild.patch
Patch7: quilt-setup-01-check-existing-files-after-unpack.patch
Patch8: quilt-setup-02-try-alternative-names.patch
Patch9: quilt-setup-03-remember-alternative-names.patch
Patch10: quilt-setup-04-handle-zip-files.patch
Patch11: quilt-setup-05-fix-check_for_existing_files.patch
Patch12: quilt-setup-06-check-for-directories-too.patch
Patch13: quilt-makefile-fix-find-perm-usage.patch
Patch14: quilt-makefile-fix-configure-with-xargs.patch
Patch15: quilt-find-quoting-style.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Recommends: procmail
Recommends: bzip2
%if 0%{?suse_version} > 1120
Recommends: xz
%endif
@ -74,16 +64,6 @@ http://www.zip.com.au/~akpm/linux/patches/.
%patch2 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%build
# --with-rpmbuild=/usr/lib/rpm/rpmb: