Accepting request 25288 from devel:tools:scm
Copy from devel:tools:scm/quilt based on submit request 25288 from user jdelvare OBS-URL: https://build.opensuse.org/request/show/25288 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quilt?expand=0&rev=26
This commit is contained in:
parent
de409e3ce7
commit
804535f4e5
50
inspect-lzma-xz.patch
Normal file
50
inspect-lzma-xz.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From: Jean Delvare <jdelvare@suse.de>
|
||||||
|
References: bnc#555273
|
||||||
|
|
||||||
|
Add support for lzma and xz compressed files to the inspect script.
|
||||||
|
Based on preliminary work by Philipp Thomas.
|
||||||
|
|
||||||
|
---
|
||||||
|
quilt/scripts/inspect.in | 24 +++++++++++++++++++++++-
|
||||||
|
1 file changed, 23 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- quilt-0.48.orig/quilt/scripts/inspect.in
|
||||||
|
+++ quilt-0.48/quilt/scripts/inspect.in
|
||||||
|
@@ -87,7 +87,17 @@ do
|
||||||
|
echo "md5sum < $file" >&2
|
||||||
|
set -- $(md5sum < "$file")
|
||||||
|
echo "$1 $basename"
|
||||||
|
- case "$(file -b "$file")" in
|
||||||
|
+
|
||||||
|
+ case "$file" in
|
||||||
|
+ *.lzma)
|
||||||
|
+ filetype="lzma"
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ filetype="$(file -b "$file")"
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
+
|
||||||
|
+ case "$filetype" in
|
||||||
|
compress*|gzip*)
|
||||||
|
echo -n "g" >&4
|
||||||
|
echo "gzip -cd $file | md5sum" >&2
|
||||||
|
@@ -100,6 +110,18 @@ do
|
||||||
|
set -- $(bzip2 -cd "$file" | md5sum)
|
||||||
|
echo "$1 $basename"
|
||||||
|
;;
|
||||||
|
+ lzma*)
|
||||||
|
+ echo -n "l" >&4
|
||||||
|
+ echo "lzma -cd $file | md5sum" >&2
|
||||||
|
+ set -- $(lzma -cd "$file" | md5sum)
|
||||||
|
+ echo "$1 $basename"
|
||||||
|
+ ;;
|
||||||
|
+ xz*)
|
||||||
|
+ echo -n "x" >&4
|
||||||
|
+ echo "xz -cd $file | md5sum" >&2
|
||||||
|
+ set -- $(xz -cd "$file" | md5sum)
|
||||||
|
+ echo "$1 $basename"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
done > $tmpdir/md5sums
|
||||||
|
echo >&4
|
124
lzma-xz-support.patch
Normal file
124
lzma-xz-support.patch
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
From: Philipp Thomas <pth@suse.de>
|
||||||
|
References: bnc#555273
|
||||||
|
|
||||||
|
Enable quilt to handle compressed tarballs and patches that were
|
||||||
|
compressed with lzma or xz.
|
||||||
|
|
||||||
|
Acked-by: Jean Delvare <jdelvare@suse.de>
|
||||||
|
---
|
||||||
|
quilt/expand.in | 2 +-
|
||||||
|
quilt/push.in | 14 ++++++++++++++
|
||||||
|
quilt/scripts/parse-patch.in | 18 ++++++++++++++++++
|
||||||
|
quilt/scripts/patchfns.in | 12 ++++++++++--
|
||||||
|
4 files changed, 43 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- quilt-0.48.orig/quilt/expand.in
|
||||||
|
+++ quilt-0.48/quilt/expand.in
|
||||||
|
@@ -134,7 +134,7 @@ else
|
||||||
|
fi
|
||||||
|
|
||||||
|
combined_series=$(patch_file_name $combined_patch \
|
||||||
|
- | sed -e 's:\.gz$::' -e 's:\.bz2$::').series
|
||||||
|
+ | sed -e 's:\.gz$::' -e 's:\.bz2$::' -e 's:\.xz$::' -e 's:\.lzma$::').series
|
||||||
|
|
||||||
|
if ! [ -f "$combined_series" ]
|
||||||
|
then
|
||||||
|
--- quilt-0.48.orig/quilt/push.in
|
||||||
|
+++ quilt-0.48/quilt/push.in
|
||||||
|
@@ -123,6 +123,20 @@ apply_patch()
|
||||||
|
--backup --prefix="$QUILT_PC/$patch/" \
|
||||||
|
$no_reject_files \
|
||||||
|
-E $silent $force_apply 2>&1
|
||||||
|
+ elif [ "${patch_file:(-5)}" = ".lzma" ]
|
||||||
|
+ then
|
||||||
|
+ lzma -cd $patch_file \
|
||||||
|
+ | patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
|
||||||
|
+ --backup --prefix="$QUILT_PC/$patch/" \
|
||||||
|
+ $no_reject_files \
|
||||||
|
+ -E $silent $force_apply 2>&1
|
||||||
|
+ elif [ "${patch_file:(-3)}" = ".xz" ]
|
||||||
|
+ then
|
||||||
|
+ xz -cd $patch_file \
|
||||||
|
+ | patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
|
||||||
|
+ --backup --prefix="$QUILT_PC/$patch/" \
|
||||||
|
+ $no_reject_files \
|
||||||
|
+ -E $silent $force_apply 2>&1
|
||||||
|
else
|
||||||
|
patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
|
||||||
|
--backup --prefix="$QUILT_PC/$patch/" \
|
||||||
|
--- quilt-0.48.orig/quilt/scripts/parse-patch.in
|
||||||
|
+++ quilt-0.48/quilt/scripts/parse-patch.in
|
||||||
|
@@ -60,6 +60,10 @@ foreach my $arg (@ARGV) {
|
||||||
|
$fh = new FileHandle("gzip -cd $arg |");
|
||||||
|
} elsif ($arg =~ /\.bz2$/) {
|
||||||
|
$fh = new FileHandle("bzip2 -cd $arg |");
|
||||||
|
+ } elsif ($arg =~ /\.lzma$/) {
|
||||||
|
+ $fh = new FileHandle("lzma -cd $arg |");
|
||||||
|
+ } elsif ($arg =~ /\.xz$/ {
|
||||||
|
+ $fh = new FileHandle("xz -cd $arg |");
|
||||||
|
} else {
|
||||||
|
$fh = new FileHandle("< $arg");
|
||||||
|
}
|
||||||
|
@@ -104,6 +108,20 @@ _("File %s disappeared!\n"), $tempname);
|
||||||
|
_("File %s disappeared!\n"), $tempname);
|
||||||
|
}
|
||||||
|
$fh2 = new FileHandle("| bzip2 -c > $tempname");
|
||||||
|
+ } elsif ($arg =~ /\.xz$/) {
|
||||||
|
+ $fh2->close();
|
||||||
|
+ if (! -e $tempname) {
|
||||||
|
+ die sprintf(
|
||||||
|
+_("File %s disappeared!\n"), $tempname);
|
||||||
|
+ }
|
||||||
|
+ $fh2 = new FileHandle("| xz -c > $tempname");
|
||||||
|
+ } elsif ($arg =~ /\.lzma$/) {
|
||||||
|
+ $fh2->close();
|
||||||
|
+ if (! -e $tempname) {
|
||||||
|
+ die sprintf(
|
||||||
|
+_("File %s disappeared!\n"), $tempname);
|
||||||
|
+ }
|
||||||
|
+ $fh2 = new FileHandle("| lzma -c > $tempname");
|
||||||
|
}
|
||||||
|
unless ($fh2) {
|
||||||
|
die "$tempname: $!\n";
|
||||||
|
--- quilt-0.48.orig/quilt/scripts/patchfns.in
|
||||||
|
+++ quilt-0.48/quilt/scripts/patchfns.in
|
||||||
|
@@ -518,7 +518,7 @@ find_patch()
|
||||||
|
then
|
||||||
|
local patch=${1#$SUBDIR_DOWN$QUILT_PATCHES/}
|
||||||
|
local bre=$(quote_bre "$patch")
|
||||||
|
- set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\)\([ "$'\t'"]\|$\)/!d" \
|
||||||
|
+ set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\|\.xz\|\.lzma\)\([ "$'\t'"]\|$\)/!d" \
|
||||||
|
-e 's/[ '$'\t''].*//' $SERIES)
|
||||||
|
if [ $# -eq 1 ]
|
||||||
|
then
|
||||||
|
@@ -772,6 +772,10 @@ cat_file()
|
||||||
|
gzip -cd "$filename" ;;
|
||||||
|
*.bz2)
|
||||||
|
bzip2 -cd "$filename" ;;
|
||||||
|
+ *.lzma)
|
||||||
|
+ lzma -cd "$filename" ;;
|
||||||
|
+ *.xz)
|
||||||
|
+ xz -cd "$filename" ;;
|
||||||
|
*)
|
||||||
|
cat "$filename" ;;
|
||||||
|
esac
|
||||||
|
@@ -790,6 +794,10 @@ cat_to_new_file()
|
||||||
|
gzip -c ;;
|
||||||
|
*.bz2)
|
||||||
|
bzip2 -c ;;
|
||||||
|
+ *.xz)
|
||||||
|
+ xz -c ;;
|
||||||
|
+ *.lzma)
|
||||||
|
+ lzma -c ;;
|
||||||
|
*)
|
||||||
|
cat ;;
|
||||||
|
esac \
|
||||||
|
@@ -915,7 +923,7 @@ next_filename()
|
||||||
|
{
|
||||||
|
local patch=$1 base num
|
||||||
|
base=$(echo "$patch" \
|
||||||
|
- | sed -r -e 's:(\.gz|\.bz2)$::' -e 's:(\.diff?|\.patch)$::')
|
||||||
|
+ | sed -r -e 's:(\.gz|\.bz2|\.xz|\.lzma)$::' -e 's:(\.diff?|\.patch)$::')
|
||||||
|
num=$(echo "$base" | sed -nre 's:.*-([0-9]+)$:\1:'p)
|
||||||
|
[ -n "$num" ] || num=1
|
||||||
|
echo "${base%-$num}-$((num+1))${patch#$base}"
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 27 13:56:32 CET 2009 - jdelvare@suse.de
|
||||||
|
|
||||||
|
- lzma-xz-support.patch: Add support for lzma/xz-compressed files
|
||||||
|
(bnc#555273). Patch from Philipp Thomas.
|
||||||
|
- inspect-lzma-xz.patch: Add support for lzma/xz-compressed files
|
||||||
|
to inspect (bnc#555273).
|
||||||
|
- Add dependency on "file", inspect (and thus "quilt setup") needs
|
||||||
|
it.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 9 11:41:28 CEST 2009 - jdelvare@suse.de
|
Wed Sep 9 11:41:28 CEST 2009 - jdelvare@suse.de
|
||||||
|
|
||||||
|
10
quilt.spec
10
quilt.spec
@ -21,11 +21,11 @@
|
|||||||
Name: quilt
|
Name: quilt
|
||||||
BuildRequires: diffstat ed procmail
|
BuildRequires: diffstat ed procmail
|
||||||
Summary: A Tool for Working with Many Patches
|
Summary: A Tool for Working with Many Patches
|
||||||
License: GPL v2 or later
|
License: GPLv2+
|
||||||
Group: Productivity/Text/Utilities
|
Group: Productivity/Text/Utilities
|
||||||
Version: 0.48
|
Version: 0.48
|
||||||
Release: 3
|
Release: 4
|
||||||
Requires: coreutils diffutils patch gzip bzip2 perl mktemp diffstat
|
Requires: coreutils diffutils patch gzip bzip2 perl mktemp diffstat file
|
||||||
%if %{suse_version} > 910
|
%if %{suse_version} > 910
|
||||||
Recommends: procmail
|
Recommends: procmail
|
||||||
%endif
|
%endif
|
||||||
@ -40,6 +40,8 @@ Patch5: hide-git-desc-error.diff
|
|||||||
Patch6: mail-dont-use-equal-tilde.diff
|
Patch6: mail-dont-use-equal-tilde.diff
|
||||||
Patch7: revert-should-not-hard-link.diff
|
Patch7: revert-should-not-hard-link.diff
|
||||||
Patch8: fix-fr-import-message.diff
|
Patch8: fix-fr-import-message.diff
|
||||||
|
Patch9: lzma-xz-support.patch
|
||||||
|
Patch10: inspect-lzma-xz.patch
|
||||||
Url: http://savannah.nongnu.org/projects/quilt
|
Url: http://savannah.nongnu.org/projects/quilt
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch -p1 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8
|
%patch -p1 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -P 8 -P 9 -P 10
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoconf
|
autoconf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user