mirror of https://gitee.com/openkylin/quilt.git
Import Debian changes 0.67+really0.67-ok1
quilt (0.67+really0.67-ok1) nile; urgency=medium * Build for openKylin.
This commit is contained in:
parent
2c503ae047
commit
31db9a4238
|
@ -0,0 +1,38 @@
|
|||
Using quilt with debhelper
|
||||
--------------------------
|
||||
If you use the dh command provided by debhelper 7, you can simply
|
||||
call it with "dh --with quilt" and dh_quilt_patch/dh_quilt_unpatch
|
||||
will be called at the right time.
|
||||
|
||||
Otherwise you can manually call dh_quilt_patch / dh_quilt_unpatch
|
||||
at the right place, see their respective manpages for examples.
|
||||
|
||||
dh supports the --with parameter since debhelper (>= 7.0.8) and quilt
|
||||
provides the required debhelper plugin since quilt (>= 0.46-7).
|
||||
|
||||
Using quilt with CDBS
|
||||
---------------------
|
||||
|
||||
You can include /usr/share/cdbs/1/rules/patchsys-quilt.mk
|
||||
in debian/rules and be done with it.
|
||||
|
||||
If you use DEB_SRCDIR you might want to set DEB_QUILT_TOPDIR to "."
|
||||
so that quilt patches are applied in the current directory and
|
||||
not in DEB_SRCDIR. This will ensure compatibility with the
|
||||
"3.0 (quilt)" source format.
|
||||
|
||||
Using quilt in other packages
|
||||
-----------------------------
|
||||
|
||||
You can include /usr/share/quilt/quilt.make in debian/rules and modify
|
||||
your rules to depend on the targets provided by this Makefile (unpatch and
|
||||
$(QUILT_STAMPFN)). Here's an example:
|
||||
|
||||
include /usr/share/quilt/quilt.make
|
||||
|
||||
clean: unpatch
|
||||
...
|
||||
|
||||
build: $(QUILT_STAMPFN)
|
||||
...
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
This package uses quilt to manage all modifications to the upstream
|
||||
source. Changes are stored in the source package as diffs in
|
||||
debian/patches and applied during the build.
|
||||
|
||||
To configure quilt to use debian/patches instead of patches, you want
|
||||
either to export QUILT_PATCHES=debian/patches in your environment
|
||||
or use this snippet in your ~/.quiltrc:
|
||||
|
||||
for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
|
||||
if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
|
||||
export QUILT_PATCHES=debian/patches
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
To get the fully patched source after unpacking the source package, cd to
|
||||
the root level of the source package and run:
|
||||
|
||||
quilt push -a
|
||||
|
||||
The last patch listed in debian/patches/series will become the current
|
||||
patch.
|
||||
|
||||
To add a new set of changes, first run quilt push -a, and then run:
|
||||
|
||||
quilt new <patch>
|
||||
|
||||
where <patch> is a descriptive name for the patch, used as the filename in
|
||||
debian/patches. Then, for every file that will be modified by this patch,
|
||||
run:
|
||||
|
||||
quilt add <file>
|
||||
|
||||
before editing those files. You must tell quilt with quilt add what files
|
||||
will be part of the patch before making changes or quilt will not work
|
||||
properly. After editing the files, run:
|
||||
|
||||
quilt refresh
|
||||
|
||||
to save the results as a patch.
|
||||
|
||||
Alternately, if you already have an external patch and you just want to
|
||||
add it to the build system, run quilt push -a and then:
|
||||
|
||||
quilt import -P <patch> /path/to/patch
|
||||
quilt push -a
|
||||
|
||||
(add -p 0 to quilt import if needed). <patch> as above is the filename to
|
||||
use in debian/patches. The last quilt push -a will apply the patch to
|
||||
make sure it works properly.
|
||||
|
||||
To remove an existing patch from the list of patches that will be applied,
|
||||
run:
|
||||
|
||||
quilt delete <patch>
|
||||
|
||||
You may need to run quilt pop -a to unapply patches first before running
|
||||
this command.
|
|
@ -0,0 +1,5 @@
|
|||
quilt (0.67+really0.67-ok1) nile; urgency=medium
|
||||
|
||||
* Build for openKylin.
|
||||
|
||||
-- openKylinBot <openKylinBot@openkylin.top> Tue, 07 May 2024 14:39:46 +0800
|
|
@ -0,0 +1,6 @@
|
|||
doc/quilt.txt
|
||||
doc/quilt.html
|
||||
compat/awk
|
||||
compat/sendmail
|
||||
debian/dh_quilt_patch.1
|
||||
debian/dh_quilt_unpatch.1
|
|
@ -0,0 +1,71 @@
|
|||
Source: quilt
|
||||
Maintainer: openKylin Developers <packaging@lists.openkylin.top>
|
||||
Uploaders: Dr. Tobias Quathamer <toddy@debian.org>,
|
||||
Section: vcs
|
||||
Priority: optional
|
||||
Build-Depends: bash-completion,
|
||||
debhelper-compat (= 13),
|
||||
Build-Depends-Indep: diffstat,
|
||||
ed,
|
||||
gawk,
|
||||
gettext,
|
||||
hevea,
|
||||
html2text,
|
||||
perl,
|
||||
procmail,
|
||||
Standards-Version: 4.6.2
|
||||
Vcs-Browser: https://salsa.debian.org/debian/quilt
|
||||
Vcs-Git: https://salsa.debian.org/debian/quilt.git
|
||||
Homepage: https://savannah.nongnu.org/projects/quilt
|
||||
|
||||
Package: quilt
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: bsdextrautils | bsdmainutils,
|
||||
bzip2,
|
||||
diffstat,
|
||||
ed,
|
||||
gettext,
|
||||
patch,
|
||||
sensible-utils,
|
||||
${misc:Depends},
|
||||
${perl:Depends},
|
||||
Recommends: less,
|
||||
Suggests: default-mta | mail-transport-agent,
|
||||
graphviz,
|
||||
procmail,
|
||||
Enhances: cdbs,
|
||||
debhelper,
|
||||
Description: Tool to work with series of patches
|
||||
Quilt manages a series of patches by keeping track of the changes
|
||||
each of them makes. They are logically organized as a stack, and you can
|
||||
apply, un-apply, refresh them easily by traveling into the stack (push/pop).
|
||||
.
|
||||
Quilt is good for managing additional patches applied to a package received
|
||||
as a tarball or maintained in another version control system. The stacked
|
||||
organization is proven to be efficient for the management of very large patch
|
||||
sets (more than hundred patches). As matter of fact, it was designed by and
|
||||
for Linux kernel hackers (Andrew Morton, from the -mm branch, is the
|
||||
original author), and its main use by the current upstream maintainer is to
|
||||
manage the (hundreds of) patches against the kernel made for the SUSE
|
||||
distribution.
|
||||
.
|
||||
This package provides seamless integration into Debhelper or CDBS,
|
||||
allowing maintainers to easily add a quilt-based patch management system in
|
||||
their packages. The package also provides some basic support for those not
|
||||
using those tools. See README.Debian for more information.
|
||||
|
||||
Package: quilt-el
|
||||
Architecture: all
|
||||
Depends: emacs | emacsen,
|
||||
quilt,
|
||||
${misc:Depends},
|
||||
Description: simple Emacs interface of quilt
|
||||
This is an Emacs minor mode for quilt. By using this,
|
||||
it becomes easy to edit files controlled by quilt.
|
||||
The main features are as follows:
|
||||
.
|
||||
- Automatically detects files that are in a quilt hierarchy
|
||||
and enables itself.
|
||||
- Only files in topmost patch can be writable.
|
||||
- Some handy shortcut keys of quilt commands.
|
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
This package was debianized by Martin Quinson <mquinson@blaise.ens-lyon.fr> on
|
||||
Tue, 29 Oct 2002 09:29:20 +0100.
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
https://savannah.nongnu.org/projects/quilt/
|
||||
|
||||
Upstream Authors:
|
||||
Andrew Morton <akpm@digeo.com>
|
||||
Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
Copyright:
|
||||
Copyright (C) 2003, 2004, 2005, 2006 Andreas Gruenbacher <agruen@suse.de>, SuSE Labs
|
||||
Copyright (C) 2006 Steve Langasek <vorlon@debian.org>
|
||||
|
||||
These scripts are released under the GPL version 2 (or any later version),
|
||||
available on any Debian box at: /usr/share/common-licenses/GPL-2
|
|
@ -0,0 +1,198 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
# COPYRIGHT
|
||||
#
|
||||
# (c) Osamu Aoki, 2010, GPL2+
|
||||
#
|
||||
# dpatch2quilt.sh is used as the base of this program.
|
||||
# parts from http://blog.orebokech.com/2007/08/converting-debian-packages-from-dpatch.html
|
||||
# (c) gregor herrmann, 2007-2008, GPL2+
|
||||
# (c) Damyan Ivanov, 2007-2008, GPL2+
|
||||
# (c) Martin Quinson, 2008, GPL2+
|
||||
|
||||
# NAME
|
||||
#
|
||||
# deb3 - convert debian source package to new 3.0 (quilt) format
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# deb3 [quilt|dpatch|0|1|2|]
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# deb3 converts debian source packages which use series of patches from
|
||||
# 1.0 format to new 3.0 (quilt) format while adjusting contents in
|
||||
# debian/patches. This is run from the package top level directory.
|
||||
# If run without argument, deb3 guesses source structure. Following
|
||||
# formats are auto detected.
|
||||
#
|
||||
# * dh_quilt_patch/dh_quilt_unpatch
|
||||
# * dpatch
|
||||
# * cdbs (simple-patchsys.mk)
|
||||
# * dbs (dbs-build.mk)
|
||||
#
|
||||
# ARGUMENT
|
||||
#
|
||||
# You can force particular conversion using argument.
|
||||
#
|
||||
# quilt conversion for dh_quilt_patch/dh_quilt_unpatch
|
||||
# dpatch conversion for dpatch
|
||||
# 0 conversion for dbs and cdbs made with -p 0 patches (default)
|
||||
# 1 conversion for dbs and cdbs made with -p 1 patches
|
||||
# 2 conversion for dbs and cdbs made with -p 2 patches
|
||||
|
||||
# Default patch level for cdbs and dbs
|
||||
# This may be overriden via environment variable or argument
|
||||
: ${PATCH_LEVEL=0}
|
||||
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_PATCH_OPTS="--reject-format=unified"
|
||||
export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
|
||||
export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
|
||||
export QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
|
||||
|
||||
dummy_git()
|
||||
{
|
||||
# Do nothing if it is not under Git
|
||||
:
|
||||
}
|
||||
|
||||
convert_quilt()
|
||||
{
|
||||
COUNT_OLD=$(ls -1 debian/patches/* | wc -l)
|
||||
COUNT_NEW=$(ls -1 debian/patches/* | wc -l)
|
||||
}
|
||||
|
||||
convert_dpatch()
|
||||
{
|
||||
for p in $(dpatch list-all); do
|
||||
quilt import -P $p.patch debian/patches/$p.dpatch
|
||||
AUTHOR=$(dpatch cat --author-only $p.dpatch)
|
||||
DESC=$(dpatch cat --desc-only $p.dpatch)
|
||||
echo "Author: $AUTHOR" | quilt header -r $p.patch
|
||||
echo "Description: $DESC" | quilt header -a $p.patch
|
||||
quilt push
|
||||
quilt refresh
|
||||
$GITCOM add debian/patches/$p.patch
|
||||
done
|
||||
quilt pop -a
|
||||
COUNT_OLD=$(ls -1 debian/patches/*.dpatch | wc -l)
|
||||
COUNT_NEW=$(ls -1 debian/patches/*.patch | wc -l)
|
||||
$GITCOM add debian/patches/series
|
||||
$GITCOM rm debian/patches/00list debian/patches/*.dpatch
|
||||
rm -rf debian/patches/*.dpatch
|
||||
rm -rf debian/patches/00list
|
||||
}
|
||||
|
||||
convert_simple()
|
||||
{
|
||||
mv debian/patches debian/patches-old
|
||||
for p in debian/patches-old/* ; do
|
||||
# normalize patch filename extension to *.patch
|
||||
q=${p##*/}
|
||||
q=${q%.*}.patch
|
||||
# normally $PATCH_LEVEL is 0
|
||||
quilt import -p $PATCH_LEVEL -P $q $p
|
||||
# no good data to use. Just provide template entries.
|
||||
quilt push
|
||||
quilt refresh
|
||||
$GITCOM add $p
|
||||
done
|
||||
quilt pop -a
|
||||
COUNT_OLD=$(ls -1 debian/patches-old/* | wc -l)
|
||||
COUNT_NEW=$(ls -1 debian/patches/* | wc -l)
|
||||
rm -rf debian/patches-old
|
||||
$GITCOM add debian/patches/series
|
||||
}
|
||||
|
||||
#
|
||||
# BEGIN
|
||||
#
|
||||
|
||||
dh_testdir
|
||||
if [ -d ".git" ]; then
|
||||
GITCOM=git
|
||||
else
|
||||
GITCOM=dummy_git
|
||||
fi
|
||||
|
||||
# set package source format
|
||||
mkdir -p debian/source
|
||||
$GITCOM add debian/source
|
||||
echo "3.0 (quilt)" >debian/source/format
|
||||
$GITCOM add debian/source/format
|
||||
|
||||
# make debian/rules template
|
||||
mv debian/rules debian/rules-old
|
||||
cat >debian/rules <<EOF
|
||||
#!/usr/bin/make -f
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
#export DH_OPTIONS=-v
|
||||
|
||||
%:
|
||||
dh \$@
|
||||
|
||||
# Use override_dh_* targets to customize this.
|
||||
# ---------------------------------------------------
|
||||
# Followings are the old debian/rules
|
||||
#
|
||||
EOF
|
||||
|
||||
sed -e 's/^/# /' <debian/rules-old >>debian/rules
|
||||
rm debian/rules-old
|
||||
chmod 755 debian/rules
|
||||
$GITCOM add debian/rules
|
||||
|
||||
# change patch queue format
|
||||
if [ "$1" = quilt ]; then
|
||||
convert_quilt
|
||||
elif [ "$1" = dpatch ]; then
|
||||
convert_dpatch
|
||||
elif [ "$1" = "0" ] || [ "$1" = "1" ] || [ "$1" = "2" ]; then
|
||||
PATCH_LEVEL=$1
|
||||
convert_simple
|
||||
elif [ -f debian/patches/series ]; then
|
||||
convert_quilt
|
||||
elif [ -f debian/patches/00list ]; then
|
||||
convert_dpatch
|
||||
elif grep "include.*\/cdbs\/.*\/simple-patchsys\.mk" debian/rules ; then
|
||||
convert_simple
|
||||
elif grep "include.*\/dbs\/dbs-build\.mk" debian/rules ; then
|
||||
convert_simple
|
||||
else
|
||||
echo "deb3 [quilt|dpatch|0|1|2|]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: The numbers of files in old debian/patches: $COUNT_OLD" >&2
|
||||
echo "INFO: The numbers of files in new debian/patches: $COUNT_NEW" >&2
|
||||
|
||||
echo "... Auto conversion completed!" >&2
|
||||
|
||||
cat <<EOF
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
You need to make further modification to your package following
|
||||
debhelper(7) manpage. This deb3 script only provides starting point to
|
||||
you. Typical modifications are:
|
||||
|
||||
* "Build-Depends:" should remove "cdbs", "dpatch", and "quilt".
|
||||
* "Build-Depends:" should list "debhelper (>= 7.0.50~)"
|
||||
* Add "override_dh_*:" targets to debian/rules to address special
|
||||
cases.
|
||||
* Remove "--with quilt" in debian/rules, if it uses "dh \$@" syntax.
|
||||
|
||||
You can find tutorial for packaging using this new "dh \$@" style and
|
||||
new 3.0 (quilt) source format in the maint-guide package. It is also
|
||||
available at:
|
||||
|
||||
http://www.debian.org/doc/manuals/maint-guide/index.en.html
|
||||
|
||||
|
||||
Check the deb3(1) manual to see this help message again.
|
||||
-----------------------------------------------------------------------
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
.TH deb3 1 "Dec 25, 2012" "deb3"
|
||||
|
||||
.SH NAME
|
||||
deb3 \- convert debian source package to new 3.0 (quilt) format
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B deb3
|
||||
[quilt|dpatch|0|1|2]
|
||||
|
||||
.SH DESCRIPTION
|
||||
deb3 converts debian source packages which use series of patches from
|
||||
1.0 format to new 3.0 (quilt) format while adjusting contents in
|
||||
debian/patches. This is run from the package top level directory.
|
||||
If run without argument, deb3 guesses source structure. Following
|
||||
formats are auto detected.
|
||||
|
||||
.IP o 3
|
||||
dh_quilt_patch/dh_quilt_unpatch
|
||||
.IP o 3
|
||||
dpatch
|
||||
.IP o 3
|
||||
cdbs (simple-patchsys.mk)
|
||||
.IP o 3
|
||||
dbs (dbs-build.mk)
|
||||
|
||||
.SH ARGUMENT
|
||||
|
||||
You can force particular conversion using argument.
|
||||
|
||||
.IP quilt 10
|
||||
conversion for dh_quilt_patch/dh_quilt_unpatch
|
||||
.IP dpatch 10
|
||||
conversion for dpatch
|
||||
.IP 0 10
|
||||
conversion for dbs and cdbs made with -p 0 patches (default)
|
||||
.IP 1 10
|
||||
conversion for dbs and cdbs made with -p 1 patches
|
||||
.IP 2 10
|
||||
conversion for dbs and cdbs made with -p 2 patches
|
||||
|
||||
.SH TERMINATING THE CONVERSION
|
||||
|
||||
This deb3 program only provides a starting point. After its execution,
|
||||
further modifications are needed to your package. Typical changes are:
|
||||
|
||||
.IP o 3
|
||||
.BR Build-Depends :
|
||||
you should remove
|
||||
.IR cdbs , " dpatch " and " quilt" .
|
||||
Instead, you should add
|
||||
.I debhelper (>= 7.0.50~)
|
||||
.IP o 3
|
||||
Add
|
||||
.B override_dh_*
|
||||
targets to debian/rules to address special cases.
|
||||
.IP o 3
|
||||
Remove
|
||||
.B --with quilt
|
||||
from the debian/rules, if it uses the
|
||||
.B dh $@
|
||||
syntax.
|
||||
|
||||
.PP
|
||||
You can find tutorial for packaging using this new
|
||||
.B dh $@
|
||||
style and new 3.0 (quilt) source format in the maint-guide package.
|
||||
It is also available at:
|
||||
|
||||
http://www.debian.org/doc/manuals/maint-guide/index.en.html
|
||||
|
||||
.SH COPYRIGHT
|
||||
(c) Osamu Aoki, 2010, GPL2+
|
||||
|
||||
dpatch2quilt.sh is used as the base of this program;
|
||||
Parts from http://blog.orebokech.com/2007/08/converting-debian-packages-from-dpatch.html
|
||||
|
||||
(c) gregor herrmann, 2007-2008, GPL2+
|
||||
(c) Damyan Ivanov, 2007-2008, GPL2+
|
||||
(c) Martin Quinson, 2008, GPL2+
|
|
@ -0,0 +1,78 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
=head1 NAME
|
||||
|
||||
dh_quilt_patch - apply patches listed in debian/patches/series
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use Debian::Debhelper::Dh_Lib;
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<dh_quilt_patch> [S<I<debhelper options>>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
dh_quilt_patch simply calls B<quilt push -a> after having set
|
||||
the environment variable B<QUILT_PATCHES> to B<debian/patches>.
|
||||
All patches listed in B<debian/patches/series> are then applied in the
|
||||
current directory. The command does not fail if the patches have
|
||||
already been applied.
|
||||
|
||||
If the file B<debian/patches/series> does not exist or is empty,
|
||||
dh_quilt_patch returns without doing anything.
|
||||
|
||||
You can use another directory instead of B<debian/patches> by setting
|
||||
(and exporting) the environment variable B<QUILT_PATCH_DIR>.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
dh_quilt_patch is usually called indirectly in a rules file via the
|
||||
dh command.
|
||||
|
||||
%:
|
||||
dh $@ --with quilt
|
||||
|
||||
It can also be direcly called at the start of the build (or configure)
|
||||
rule.
|
||||
|
||||
build:
|
||||
dh_quilt_patch
|
||||
./configure
|
||||
$(MAKE)
|
||||
|
||||
=cut
|
||||
|
||||
init();
|
||||
|
||||
$ENV{"QUILT_PATCHES"} = $ENV{"QUILT_PATCH_DIR"} ?
|
||||
$ENV{"QUILT_PATCH_DIR"} : "debian/patches";
|
||||
|
||||
# Since v0.67, quilt returns the error code 1 instead of 2,
|
||||
# if the series file does not exist or is empty.
|
||||
# So check if the series file contains data before
|
||||
# running quilt to avoid returning an error.
|
||||
# See Debian bug reports #1030781, #1053444, #1053500 for details.
|
||||
if ( -s $ENV{"QUILT_PATCHES"} . "/series" ) {
|
||||
complex_doit('quilt --quiltrc /dev/null push -a || test $? = 2');
|
||||
}
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
This tool is useless if you use the source package format B<3.0 (quilt)>.
|
||||
Consider switching to this source format if you haven't done it yet.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<debhelper(7)>, L<dh(1)>.
|
||||
|
||||
This program is meant to be used together with debhelper.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Raphael Hertzog <hertzog@debian.org>
|
||||
|
||||
=cut
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
=head1 NAME
|
||||
|
||||
dh_quilt_unpatch - unapply patches listed in debian/patches/series
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use Debian::Debhelper::Dh_Lib;
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<dh_quilt_unpatch> [S<I<debhelper options>>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
dh_quilt_unpatch simply calls B<quilt pop -a> after having set
|
||||
the environment variable B<QUILT_PATCHES> to B<debian/patches>.
|
||||
All patches listed in B<debian/patches/series> are then unapplied in the
|
||||
current directory. The command does not fail if the patches have
|
||||
already been unapplied.
|
||||
|
||||
If the file B<debian/patches/series> does not exist or is empty,
|
||||
dh_quilt_unpatch returns without doing anything.
|
||||
|
||||
You can use another directory instead of B<debian/patches> by setting
|
||||
(and exporting) the environment variable B<QUILT_PATCH_DIR>.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
dh_quilt_unpatch is usually called indirectly in a rules file via the
|
||||
dh command.
|
||||
|
||||
%:
|
||||
dh $@ --with quilt
|
||||
|
||||
It can also be direcly called in the clean rule.
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
[ ! -f Makefile ] || $(MAKE) clean
|
||||
dh_quilt_unpatch
|
||||
dh_clean
|
||||
|
||||
=cut
|
||||
|
||||
init();
|
||||
|
||||
$ENV{"QUILT_PATCHES"} = $ENV{"QUILT_PATCH_DIR"} ?
|
||||
$ENV{"QUILT_PATCH_DIR"} : "debian/patches";
|
||||
|
||||
# Since v0.67, quilt returns the error code 1 instead of 2,
|
||||
# if the series file does not exist or is empty.
|
||||
# So check if the series file contains data before
|
||||
# running quilt to avoid returning an error.
|
||||
# See Debian bug reports #1030781, #1053444, #1053500 for details.
|
||||
if ( -s $ENV{"QUILT_PATCHES"} . "/series" ) {
|
||||
complex_doit('quilt --quiltrc /dev/null pop -a || test $? = 2');
|
||||
complex_doit('rm -rf .pc');
|
||||
}
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
This tool is useless if you use the source package format B<3.0 (quilt)>.
|
||||
Consider switching to this source format if you haven't done it yet.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<debhelper(7)>, L<dh(1)>.
|
||||
|
||||
This program is meant to be used together with debhelper.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Raphael Hertzog <hertzog@debian.org>
|
||||
|
||||
=cut
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/sh
|
||||
|
||||
# to be run from the package top level directory
|
||||
# parts taken from http://blog.orebokech.com/2007/08/converting-debian-packages-from-dpatch.html
|
||||
# (c) gregor herrmann, 2007-2008, GPL2+
|
||||
# (c) Damyan Ivanov, 2007-2008, GPL2+
|
||||
|
||||
# (c) Martin Quinson, 2008, GPL2+
|
||||
# svn-related lines commented out by Martin Quinson.
|
||||
|
||||
set -e
|
||||
|
||||
export QUILT_PATCHES=debian/patches
|
||||
|
||||
dh_testdir
|
||||
|
||||
[ -f debian/patches/00list ] || exit 1
|
||||
|
||||
for p in $(dpatch list-all); do
|
||||
quilt import -P $p.patch debian/patches/$p.dpatch
|
||||
AUTHOR=$(dpatch cat --author-only $p.dpatch)
|
||||
DESC=$(dpatch cat --desc-only $p.dpatch)
|
||||
echo "Author: $AUTHOR" | quilt header -r $p.patch
|
||||
echo "Description: $DESC" | quilt header -a $p.patch
|
||||
|
||||
|
||||
quilt push
|
||||
quilt refresh --no-timestamps --no-index --strip-trailing-whitespace
|
||||
# svn add debian/patches/$p.patch
|
||||
done
|
||||
quilt pop -a
|
||||
|
||||
COUNT_D=$(ls -1 debian/patches/*.dpatch | wc -l)
|
||||
COUNT_Q=$(ls -1 debian/patches/*.patch | wc -l)
|
||||
|
||||
# svn add debian/patches/series
|
||||
# svn rm debian/patches/00list debian/patches/*.dpatch
|
||||
|
||||
sed -i -e 's;/usr/share/dpatch/dpatch\.make;/usr/share/quilt/quilt.make;' debian/rules
|
||||
sed -i -e 's;DPATCH_STAMPFN;QUILT_STAMPFN;' debian/rules
|
||||
sed -i -e 's;patch-stamp;$(QUILT_STAMPFN);' debian/rules
|
||||
|
||||
# same as "sed s/dpatch/quilt", but supports multi-line Build-Depends
|
||||
perl -i -pe '
|
||||
if( /^Build-Depends: / ) {
|
||||
$do_replace = 1;
|
||||
s/dpatch ?(?:\(.+\))?/quilt (>= 0.40)/;
|
||||
next;
|
||||
}
|
||||
if( /^ / ) {
|
||||
s/dpatch ?(?:\(.+\))?/quilt (>= 0.40)/ if $do_replace;
|
||||
} else {
|
||||
$do_replace = 0;
|
||||
}' debian/control
|
||||
|
||||
echo
|
||||
echo "The next commit would remove $COUNT_D dpatch patches and add $COUNT_Q quilt patches."
|
||||
|
||||
if [ "$COUNT_D" != "$COUNT_Q" ] ; then
|
||||
echo "WARNING: The numbers of removed dpatch patches and added quilt patches differ!"
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,9 @@
|
|||
[DEFAULT]
|
||||
debian-branch = debian/latest
|
||||
upstream-branch = upstream/latest
|
||||
pristine-tar = True
|
||||
debian-tag = %(version)s
|
||||
builder = debuild
|
||||
|
||||
[buildpackage]
|
||||
sign-tags = True
|
|
@ -0,0 +1,10 @@
|
|||
# See https://salsa.debian.org/salsa-ci-team/pipeline
|
||||
|
||||
---
|
||||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
||||
|
||||
variables:
|
||||
SALSA_CI_REPROTEST_ENABLE_DIFFOSCOPE: 1
|
||||
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: '1'
|
|
@ -0,0 +1,22 @@
|
|||
Description: verbose error message when the series file does not exist
|
||||
patchfns.in(cat_series): Displays an error message when the $SERIES
|
||||
file does not exist, and when run in verbose mode.
|
||||
Bug-Debian: https://bugs.debian.org/369908
|
||||
Upstream-status: submitted https://lists.nongnu.org/archive/html/quilt-dev/2020-03/msg00000.html
|
||||
|
||||
---
|
||||
quilt/scripts/patchfns.in | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/quilt/scripts/patchfns.in
|
||||
+++ b/quilt/scripts/patchfns.in
|
||||
@@ -352,6 +352,9 @@
|
||||
sed -e '/^#/d' -e 's/^[ '$'\t'']*//' \
|
||||
-e 's/[ '$'\t''].*//' -e '/^$/d' "$SERIES"
|
||||
else
|
||||
+ if [ "$opt_verbose" ]; then
|
||||
+ printf $"No series file found\n" >&2
|
||||
+ fi
|
||||
return 1
|
||||
fi
|
||||
}
|
126
debian/patches/cherry-pick.v0.67-29-gf73f8d7.avoid-warnings-with-grep-3-8.patch
vendored
Normal file
126
debian/patches/cherry-pick.v0.67-29-gf73f8d7.avoid-warnings-with-grep-3-8.patch
vendored
Normal file
|
@ -0,0 +1,126 @@
|
|||
Subject: Avoid warnings with grep 3.8
|
||||
Origin: v0.67-29-gf73f8d7 <https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f>
|
||||
Upstream-Author: Jean Delvare <jdelvare@suse.de>
|
||||
Date: Fri Sep 9 10:10:37 2022 +0200
|
||||
Bug-Debian: https://bugs.debian.org/1020108
|
||||
|
||||
GNU grep version 3.8 became more strict about needless quoting in
|
||||
patterns. We have one occurrence of that in quilt, where "/"
|
||||
characters are being quoted by default. There are cases where they
|
||||
indeed need to be quoted (typically when used in a sed s/// command)
|
||||
but most of the time they do not, and this results in the following
|
||||
warning:
|
||||
|
||||
grep: warning: stray \ before /
|
||||
|
||||
So rename quote_bre() to quote_sed_re(), and introduce
|
||||
quote_grep_re() which does not quote "/".
|
||||
|
||||
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
|
||||
--- a/quilt/diff.in
|
||||
+++ b/quilt/diff.in
|
||||
@@ -255,7 +255,7 @@
|
||||
# Add all files in the snapshot into the file list (they may all
|
||||
# have changed).
|
||||
files=( $(find $QUILT_PC/$snap_subdir -type f \
|
||||
- | sed -e "s/^$(quote_bre $QUILT_PC/$snap_subdir/)//" \
|
||||
+ | sed -e "s/^$(quote_sed_re $QUILT_PC/$snap_subdir/)//" \
|
||||
| sort) )
|
||||
printf "%s\n" "${files[@]}" >&4
|
||||
unset files
|
||||
--- a/quilt/patches.in
|
||||
+++ b/quilt/patches.in
|
||||
@@ -60,7 +60,7 @@
|
||||
# Quote each file name only once
|
||||
for file in "${opt_files[@]}"
|
||||
do
|
||||
- files_bre[${#files_bre[@]}]=$(quote_bre "$file")
|
||||
+ files_bre[${#files_bre[@]}]=$(quote_grep_re "$file")
|
||||
done
|
||||
|
||||
# "Or" all files in a single pattern
|
||||
--- a/quilt/scripts/patchfns.in
|
||||
+++ b/quilt/scripts/patchfns.in
|
||||
@@ -78,8 +78,14 @@
|
||||
done
|
||||
}
|
||||
|
||||
-# Quote a string for use in a basic regular expression.
|
||||
-quote_bre()
|
||||
+# Quote a string for use in a regular expression for a grep pattern.
|
||||
+quote_grep_re()
|
||||
+{
|
||||
+ echo "$1" | sed -e 's:\([][^$.*\\]\):\\\1:g'
|
||||
+}
|
||||
+
|
||||
+# Quote a string for use in a regular expression for a sed s/// command.
|
||||
+quote_sed_re()
|
||||
{
|
||||
echo "$1" | sed -e 's:\([][^$/.*\\]\):\\\1:g'
|
||||
}
|
||||
@@ -215,7 +221,7 @@
|
||||
|
||||
if [ -e "$SERIES" ]
|
||||
then
|
||||
- grep -q "^$(quote_bre $patch)\([ \t]\|$\)" "$SERIES"
|
||||
+ grep -q "^$(quote_grep_re $patch)\([ \t]\|$\)" "$SERIES"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
@@ -365,7 +371,7 @@
|
||||
{
|
||||
local patch=$1
|
||||
[ -e $DB ] || return 1
|
||||
- grep -q "^$(quote_bre $patch)\$" $DB
|
||||
+ grep -q "^$(quote_grep_re $patch)\$" $DB
|
||||
}
|
||||
|
||||
applied_patches()
|
||||
@@ -465,7 +471,7 @@
|
||||
local tmpfile
|
||||
if tmpfile=$(gen_tempfile)
|
||||
then
|
||||
- grep -v "^$(quote_bre $patch)\$" $DB > $tmpfile
|
||||
+ grep -v "^$(quote_grep_re $patch)\$" $DB > $tmpfile
|
||||
cat $tmpfile > $DB
|
||||
rm -f $tmpfile
|
||||
[ -s $DB ] || rm -f $DB
|
||||
@@ -520,7 +526,7 @@
|
||||
fi
|
||||
|
||||
local patch=${1#$SUBDIR_DOWN$QUILT_PATCHES/}
|
||||
- local bre=$(quote_bre "$patch")
|
||||
+ local bre=$(quote_sed_re "$patch")
|
||||
set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\|\.xz\|\.lzma\|\.lz\)\([ "$'\t'"]\|$\)/!d" \
|
||||
-e 's/[ '$'\t''].*//' "$SERIES")
|
||||
if [ $# -eq 1 ]
|
||||
@@ -631,7 +637,7 @@
|
||||
then
|
||||
find "$path" -type f \
|
||||
-a ! -path "$(quote_glob "$path")/.timestamp" |
|
||||
- sed -e "s/$(quote_bre "$path")\///"
|
||||
+ sed -e "s/$(quote_sed_re "$path")\///"
|
||||
fi
|
||||
}
|
||||
|
||||
--- a/quilt/upgrade.in
|
||||
+++ b/quilt/upgrade.in
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
for patch in $(applied_patches)
|
||||
do
|
||||
- proper_name="$(grep "^$(quote_bre $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
|
||||
+ proper_name="$(grep "^$(quote_grep_re $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
|
||||
proper_name=${proper_name#$QUILT_PATCHES/}
|
||||
proper_name=${proper_name%% *}
|
||||
if [ -z "$proper_name" ]
|
||||
@@ -84,7 +84,7 @@
|
||||
fi
|
||||
|
||||
if [ "$patch" != "$proper_name" -a -d $QUILT_PC/$patch ] \
|
||||
- && grep -q "^$(quote_bre $patch)\$" \
|
||||
+ && grep -q "^$(quote_grep_re $patch)\$" \
|
||||
$QUILT_PC/applied-patches
|
||||
then
|
||||
mv $QUILT_PC/$patch $QUILT_PC/$proper_name \
|
|
@ -0,0 +1,92 @@
|
|||
Description: Adds the --dep3 option to include a DEP-3 template in the header.
|
||||
.
|
||||
Intensively using quilt for Debian packages and trying to adopt the
|
||||
DEP-3 Patch Tagging Guidelines for my patches, I often get to go on
|
||||
http://dep.debian.net/ to find the correct fields.
|
||||
.
|
||||
The proposed patch adds a --dep3 option to "quilt -e header" that
|
||||
adds a template fed to $EDITOR if the header is empty. The
|
||||
template contains all fields and documents them, with indications of
|
||||
required/optional.
|
||||
Origin: vendor
|
||||
Author: Didier Raboud <didier@raboud.com>
|
||||
Reviewed-by: Martin Quinson <mquinson@debian.org>
|
||||
Last-Update: 2012-02-02
|
||||
Bug-Debian: https://bugs.debian.org/543355
|
||||
|
||||
---
|
||||
NOTE: Even if DEP-3 has started within Debian, it has been written as a
|
||||
vendor neutral specification and this patch should be forwarded upstream
|
||||
too. --Raphael Hertzog
|
||||
|
||||
---
|
||||
quilt/header.in | 30 ++++++++++++++++++++++++++++--
|
||||
1 file changed, 28 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/quilt/header.in
|
||||
+++ b/quilt/header.in
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
usage()
|
||||
{
|
||||
- printf $"Usage: quilt header [-a|-r|-e] [--backup] [--strip-diffstat] [--strip-trailing-whitespace] [patch]\n"
|
||||
+ printf $"Usage: quilt header [-a|-r|-e] [--backup] [--dep3] [--strip-diffstat] [--strip-trailing-whitespace] [patch]\n"
|
||||
|
||||
if [ x$1 = x-h ]
|
||||
then
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
--backup
|
||||
Create a backup copy of the old version of a patch as patch~.
|
||||
+
|
||||
+--dep3
|
||||
+ When editing (-e), insert a template with DEP-3 headers.
|
||||
+ DEP-3 is http://dep.debian.net/deps/dep3/ Patch Tagging Guidelines.
|
||||
" "$EDITOR"
|
||||
exit 0
|
||||
else
|
||||
@@ -57,7 +61,7 @@
|
||||
fi
|
||||
}
|
||||
|
||||
-options=`getopt -o areh --long backup,strip-trailing-whitespace,strip-diffstat -- "$@"`
|
||||
+options=`getopt -o areh --long backup,dep3,strip-trailing-whitespace,strip-diffstat -- "$@"`
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
@@ -81,6 +85,9 @@
|
||||
--backup)
|
||||
QUILT_BACKUP=1
|
||||
shift ;;
|
||||
+ --dep3)
|
||||
+ opt_use_dep3_headers=1
|
||||
+ shift ;;
|
||||
--strip-diffstat)
|
||||
opt_strip_diffstat=1
|
||||
shift ;;
|
||||
@@ -146,6 +153,25 @@
|
||||
fi
|
||||
) > $tmp
|
||||
|
||||
+ # If triggered and file is empty, cat dep-3 headers into it
|
||||
+ if [ -n "$opt_use_dep3_headers" -a ! -s $tmp ]
|
||||
+ then
|
||||
+ cat >$tmp <<-END
|
||||
+ Description: <short description, required>
|
||||
+ <long description that can span multiple lines, optional>
|
||||
+ Author: <name and email of author, optional>
|
||||
+ Origin: <upstream|backport|vendor|other>, <URL, required except if Author is present>
|
||||
+ Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
|
||||
+ Bug-<Vendor>: <URL to the vendor bug report if any, optional>
|
||||
+ Forwarded: <URL|no|not-needed, useless if you have a Bug field, optional>
|
||||
+ Applied-Upstream: <version|URL|commit, identifies patches merged upstream, optional>
|
||||
+ Reviewed-by: <name and email of a reviewer, optional>
|
||||
+ Last-Update: $(LC_ALL=C date +%Y-%m-%d) <YYYY-MM-DD, last update of the meta-information, optional>
|
||||
+ ---
|
||||
+ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
+ END
|
||||
+ fi
|
||||
+
|
||||
if [ -n "$opt_edit" ]
|
||||
then
|
||||
LANG=$ORIGINAL_LANG $EDITOR "$tmp" || exit 1
|
|
@ -0,0 +1,55 @@
|
|||
Description: allow mail command to grab the mail title from dep3 formalism
|
||||
If the patch is formatted according to http://dep.debian.net/deps/dep3/
|
||||
then the mail subcommand will manage to extract a mail subject and
|
||||
description out of this formalism.
|
||||
Forwarded: Sent 2014-01-18
|
||||
|
||||
---
|
||||
quilt/mail.in | 22 +++++++++++++++++++---
|
||||
1 file changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/quilt/mail.in
|
||||
+++ b/quilt/mail.in
|
||||
@@ -349,6 +349,18 @@
|
||||
' $tmpdir/patch > $tmpdir/body
|
||||
fi
|
||||
|
||||
+ # Does this patch have a Description: block?
|
||||
+ if [ -z "$subject" ]
|
||||
+ then
|
||||
+ subject=$(formail -x Description: < $tmpdir/header |head -n 1)
|
||||
+ if [ -n "$subject" ]
|
||||
+ then
|
||||
+ # Get all dep3 pseudo-headers (but the first line of the description, already used as a subject)
|
||||
+ # into the body of the generated mail, plus the patch.
|
||||
+ sed -e 's/^Description:.*$/Description:/' $tmpdir/patch > $tmpdir/body
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
# Does this patch have DESC // subject // EDESC?
|
||||
if [ -z "$subject" ]
|
||||
then
|
||||
@@ -454,15 +466,18 @@
|
||||
subject=$(extract_header_value Replace-Subject: < "$tmpdir/$patch" | join_lines)
|
||||
if [ $status -ne 0 -o -z "$subject" ]
|
||||
then
|
||||
- if [ ! -r "$patch_file" ]
|
||||
+ subject=$(formail -x Description: < "$tmpdir/$patch" | head -n 1)
|
||||
+ if [ $status -ne 0 -o -z "$subject" ]
|
||||
then
|
||||
- printf \
|
||||
+ if [ ! -r "$patch_file" ]
|
||||
+ then
|
||||
+ printf \
|
||||
$"Patch %s does not exist\n" "$(print_patch "$patch")" >&2
|
||||
- else
|
||||
- printf \
|
||||
+ else
|
||||
+ printf \
|
||||
$"Unable to extract a subject header from %s\n" "$(print_patch "$patch")" >&2
|
||||
+ fi
|
||||
fi
|
||||
-
|
||||
rm -rf $tmpdir
|
||||
exit 1
|
||||
fi
|
|
@ -0,0 +1,46 @@
|
|||
Description: Verbosly fail when trying to push a non existant patch
|
||||
Useful if there is a typo in the serie file.
|
||||
This can be overriden by providing -f.
|
||||
.
|
||||
This patch was refused by upstream:
|
||||
https://lists.nongnu.org/archive/html/quilt-dev/2013-01/msg00014.html
|
||||
.
|
||||
We need to think again about it to see how to rework it to make it
|
||||
more acceptable.
|
||||
Bug-Debian: https://bugs.debian.org/358875
|
||||
Forwarded: sent 2012-12-19
|
||||
|
||||
---
|
||||
quilt/push.in | 7 +++++++
|
||||
test/missing.test | 4 ++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
--- a/quilt/push.in
|
||||
+++ b/quilt/push.in
|
||||
@@ -179,6 +179,13 @@
|
||||
no_reject_files="-r $tmp"
|
||||
fi
|
||||
|
||||
+ if [ ! -e "$patch_file" -a -z "$opt_force" ]
|
||||
+ then
|
||||
+ printf $"Patch %s does not exist\n" \
|
||||
+ "$(print_patch $patch)" >&2
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
apply_patch "$patch" "$patch_file"
|
||||
status=$?
|
||||
trap "" SIGINT
|
||||
--- a/test/missing.test
|
||||
+++ b/test/missing.test
|
||||
@@ -5,6 +5,10 @@
|
||||
< missing2.diff
|
||||
|
||||
$ quilt push -qa
|
||||
++ > Patch patches/missing1.diff does not exist
|
||||
++ > Applying patch patches/missing1.diff
|
||||
++
|
||||
++ $ quilt push -qaf
|
||||
> Applying patch %{P}missing1.diff
|
||||
> Patch %{P}missing1.diff does not exist; applied empty patch
|
||||
> Applying patch %{P}missing2.diff
|
|
@ -0,0 +1,17 @@
|
|||
Description: Fix intermittently failing test
|
||||
Due to an exchanged output order of stdout and stderr,
|
||||
the test sometimes fails.
|
||||
Author: Simon McVittie <smcv@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/913246
|
||||
|
||||
--- a/test/faildiff.test
|
||||
+++ b/test/faildiff.test
|
||||
@@ -27,7 +27,7 @@
|
||||
> File test.bin added to patch %{P}test.diff
|
||||
|
||||
$ printf "\\003\\000\\001" > test.bin
|
||||
- $ quilt diff -pab --no-index
|
||||
+ $ quilt diff -pab --no-index 2>&1
|
||||
>~ (Files|Binary files) a/test\.bin and b/test\.bin differ
|
||||
> Diff failed on file 'test.bin', aborting
|
||||
$ echo %{?}
|
|
@ -0,0 +1,53 @@
|
|||
Description: Fix failing tests with Debian version of quilt
|
||||
Due to the patch "fail_on_missing", Debian's quilt will not
|
||||
return the expected output if a patch is empty. Therefore,
|
||||
we need to pass "-f" to make it apply the patch anyway.
|
||||
Author: Dr. Tobias Quathamer <toddy@debian.org>
|
||||
Forwarded: not-needed
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
---
|
||||
test/altered-series.test | 2 +-
|
||||
test/missing.test | 8 ++++----
|
||||
test/three.test | 2 +-
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/test/altered-series.test
|
||||
+++ b/test/altered-series.test
|
||||
@@ -6,7 +6,7 @@
|
||||
< 02.patch
|
||||
< 03.patch
|
||||
|
||||
-$ quilt push -q 2
|
||||
+$ quilt push -fq 2
|
||||
> Applying patch %{P}01.patch
|
||||
> Patch %{P}01.patch does not exist; applied empty patch
|
||||
> Applying patch %{P}02.patch
|
||||
--- a/test/three.test
|
||||
+++ b/test/three.test
|
||||
@@ -169,7 +169,7 @@
|
||||
> Removing patch %{P}patch1.diff
|
||||
> No patches applied
|
||||
|
||||
- $ quilt push -q 10
|
||||
+ $ quilt push -fq 10
|
||||
> Applying patch %{P}patch1.diff
|
||||
> Applying patch %{P}patch2.diff
|
||||
> Applying patch %{P}patch3.diff
|
||||
--- a/test/missing.test
|
||||
+++ b/test/missing.test
|
||||
@@ -5,10 +5,10 @@
|
||||
< missing2.diff
|
||||
|
||||
$ quilt push -qa
|
||||
-+ > Patch patches/missing1.diff does not exist
|
||||
-+ > Applying patch patches/missing1.diff
|
||||
-+
|
||||
-+ $ quilt push -qaf
|
||||
+ > Patch patches/missing1.diff does not exist
|
||||
+ > Applying patch patches/missing1.diff
|
||||
+
|
||||
+ $ quilt push -qaf
|
||||
> Applying patch %{P}missing1.diff
|
||||
> Patch %{P}missing1.diff does not exist; applied empty patch
|
||||
> Applying patch %{P}missing2.diff
|
|
@ -0,0 +1,23 @@
|
|||
Description: Manpage typo
|
||||
--- a/quilt/header.in
|
||||
+++ b/quilt/header.in
|
||||
@@ -18,7 +18,7 @@
|
||||
Print or change the header of the topmost or specified patch.
|
||||
|
||||
-a, -r, -e
|
||||
- Append to (-a) or replace (-r) the exiting patch header, or
|
||||
+ Append to (-a) or replace (-r) the existing patch header, or
|
||||
edit (-e) the header in \$EDITOR (%s). If none of these options is
|
||||
given, print the patch header.
|
||||
|
||||
--- a/doc/quilt.1.in
|
||||
+++ b/doc/quilt.1.in
|
||||
@@ -214,7 +214,7 @@
|
||||
You may also want to add the "-E" option if you have issues with quilt
|
||||
not deleting empty files when you think it should. The documentation of
|
||||
GNU patch says that "normally this option is unnecessary", but when patch
|
||||
-is in POSIX mode or if the patch format doesn't allow to distinguish
|
||||
+is in POSIX mode or if the patch format doesn't allow one to distinguish
|
||||
empty files from deleted files, patch deletes empty files only if the
|
||||
-E option is given. Beware that when passing -E to patch, quilt will
|
||||
no longer be able to deal with empty files, which is why using -E is
|
|
@ -0,0 +1,39 @@
|
|||
Subject: patchfns: Compatibility fix for BSD awk
|
||||
Origin: https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=ce9c68abb7cee0b4fb0d5a7ff7048d0ab3b726f8
|
||||
Upstream-Author: Jean Delvare <jdelvare@suse.de>
|
||||
Date: Thu, 23 Jun 2022 14:36:58 +0200
|
||||
Bug-Debian: https://bugs.debian.org/1053463
|
||||
Forwarded: not-needed
|
||||
|
||||
"+" needs to be quoted to be considered as a literal "+" by BSD awk.
|
||||
|
||||
Without this fix, patch_header() fails to find the beginning of the
|
||||
changes and treats the whole patch as a header, subsequently causing
|
||||
"quilt refresh" to append the refreshed patch after the original one
|
||||
instead of replacing it.
|
||||
|
||||
Bug reported and fix suggested by Dominic Evans.
|
||||
|
||||
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
Fixes: 1d94980dbdd4 ("Tighten the patch format parsing")
|
||||
|
||||
--- a/quilt/scripts/patchfns.in
|
||||
+++ b/quilt/scripts/patchfns.in
|
||||
@@ -857,7 +857,7 @@
|
||||
MAYBE_CONTEXT=0
|
||||
}
|
||||
MAYBE_UNIFIED {
|
||||
- if (/^+++[ \t][^ \t]/)
|
||||
+ if (/^\+\+\+[ \t][^ \t]/)
|
||||
exit
|
||||
print eaten
|
||||
MAYBE_UNIFIED=0
|
||||
@@ -890,7 +890,7 @@
|
||||
MAYBE_CONTEXT=0
|
||||
}
|
||||
MAYBE_UNIFIED {
|
||||
- if (/^+++[ \t][^ \t]/) {
|
||||
+ if (/^\+\+\+[ \t][^ \t]/) {
|
||||
print eaten
|
||||
body=1
|
||||
}
|
|
@ -0,0 +1,163 @@
|
|||
Description: ensure that all mtime of modified files are equal when pushing
|
||||
This is intended to avoid time skew in build systems in some cases.
|
||||
.
|
||||
See the discussion
|
||||
https://lists.debian.org/debian-policy/2008/02/msg00030.html for more
|
||||
context information.
|
||||
Bug-Debian: https://bugs.debian.org/466360
|
||||
Upstream-status: to be submitted
|
||||
|
||||
---
|
||||
quilt/push.in | 22 ++++++++--
|
||||
quilt/scripts/backup-files.in | 3 -
|
||||
test/push_timeskew.test | 86 ++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 105 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/quilt/push.in
|
||||
+++ b/quilt/push.in
|
||||
@@ -17,7 +17,8 @@
|
||||
specified number of patches. When a patch name is specified, apply
|
||||
all patches up to and including the specified patch. Patch names may
|
||||
include the patches/ prefix, which means that filename completion can
|
||||
-be used.
|
||||
+be used. The mtime of all touched files will be exactly the same to
|
||||
+prevent time skews.
|
||||
|
||||
-a Apply all patches in the series file.
|
||||
|
||||
@@ -202,18 +203,29 @@
|
||||
touch "$QUILT_PC/$patch~refresh"
|
||||
fi
|
||||
|
||||
- if [ -e "$QUILT_PC/$patch" ]
|
||||
+ if ! [ -e "$QUILT_PC/$patch" ]
|
||||
then
|
||||
- touch "$QUILT_PC/$patch/.timestamp"
|
||||
- else
|
||||
mkdir "$QUILT_PC/$patch"
|
||||
fi
|
||||
+ touch "$QUILT_PC/$patch/.timestamp"
|
||||
+
|
||||
+ # Store the list of files to process
|
||||
+ NONEMPTY_FILES=$(gen_tempfile)
|
||||
+ trap "rm -f \"$NONEMPTY_FILES\"" EXIT
|
||||
+ find "$QUILT_PC/$patch" -type f \
|
||||
+ -a ! -path "$QUILT_PC/$patch/.timestamp" -size +0 -print0 > "$NONEMPTY_FILES"
|
||||
+
|
||||
+ if [ -s "$NONEMPTY_FILES" ]; then
|
||||
+ xargs -0 touch -c -r "$QUILT_PC/$patch/.timestamp" < "$NONEMPTY_FILES"
|
||||
+ fi
|
||||
+
|
||||
+ rm -f $NONEMPTY_FILES
|
||||
|
||||
if ! [ -e "$patch_file" ]
|
||||
then
|
||||
printf $"Patch %s does not exist; applied empty patch\n" \
|
||||
"$(print_patch "$patch")"
|
||||
- elif [ -z "$(shopt -s nullglob ; echo "$QUILT_PC/$patch/"*)" ]
|
||||
+ elif [ "$(shopt -s nullglob ; echo "$QUILT_PC/$patch/"*)" = "$QUILT_PC/$patch/.timestamp" ]
|
||||
then
|
||||
printf $"Patch %s appears to be empty; applied\n" \
|
||||
"$(print_patch "$patch")"
|
||||
--- a/quilt/scripts/backup-files.in
|
||||
+++ b/quilt/scripts/backup-files.in
|
||||
@@ -190,8 +190,9 @@
|
||||
done < "$NONEMPTY_FILES"
|
||||
fi
|
||||
|
||||
+ modif_time=`date +%m%d%H%M.%S`
|
||||
if [ -n "$OPT_TOUCH" ]; then
|
||||
- xargs -0 touch -c < "$NONEMPTY_FILES"
|
||||
+ xargs -0 touch -t $modif_time -c < "$NONEMPTY_FILES"
|
||||
fi
|
||||
fi
|
||||
|
||||
--- /dev/null
|
||||
+++ b/test/push_timeskew.test
|
||||
@@ -0,0 +1,86 @@
|
||||
+This test enforces that files touched by a patch have the exact same
|
||||
+mtime when pushing and poping the patch.
|
||||
+(To run, type `./run push_timeskew.test' in this directory.)
|
||||
+
|
||||
+ $ mkdir patches d
|
||||
+
|
||||
+ $ quilt new patch1
|
||||
+ > Patch %{P}patch1 is now on top
|
||||
+
|
||||
+ $ cd d
|
||||
+ $ mkdir dir
|
||||
+ $ echo "This is file one." > dir/file1
|
||||
+ $ quilt add dir/file1
|
||||
+ > File d/dir/file1 added to patch %{_P}patch1
|
||||
+
|
||||
+ $ echo "This is file two." > dir/file2
|
||||
+ $ quilt add dir/file2
|
||||
+ > File d/dir/file2 added to patch %{_P}patch1
|
||||
+
|
||||
+ $ echo "More content to file one." >> dir/file1
|
||||
+ $ echo "More content to file two." >> dir/file2
|
||||
+ $ quilt refresh
|
||||
+ > Refreshed patch %{_P}patch1
|
||||
+
|
||||
+ $ quilt pop -q
|
||||
+ > Removing patch %{_P}patch1
|
||||
+ > No patches applied
|
||||
+
|
||||
+ $ test dir/file1 -nt dir/file2 && echo "timeskew!"
|
||||
+ $ test dir/file2 -nt dir/file1 && echo "timeskew!"
|
||||
+
|
||||
+ $ quilt push -q
|
||||
+ > Applying patch %{_P}patch1
|
||||
+ > Now at patch %{_P}patch1
|
||||
+
|
||||
+ $ test dir/file1 -nt dir/file2 && echo "timeskew!"
|
||||
+ $ test dir/file2 -nt dir/file1 && echo "timeskew!"
|
||||
+
|
||||
+
|
||||
+
|
||||
+ # And now, enforces that this timestamp fixup don't create unwanted files
|
||||
+ $ quilt new patch2.diff
|
||||
+ > Patch %{_P}patch2.diff is now on top
|
||||
+
|
||||
+ $ echo "some content" > dir/file_removed
|
||||
+ $ quilt add dir/file_removed
|
||||
+ > File d/dir/file_removed added to patch %{_P}patch2.diff
|
||||
+
|
||||
+ $ quilt add dir/file_created
|
||||
+ > File d/dir/file_created added to patch %{_P}patch2.diff
|
||||
+
|
||||
+ $ rm dir/file_removed
|
||||
+ $ echo "some content" > dir/file_created
|
||||
+ $ quilt refresh
|
||||
+ > Refreshed patch %{_P}patch2.diff
|
||||
+
|
||||
+ $ quilt diff --no-timestamps --no-index -p ab
|
||||
+ > --- /dev/null
|
||||
+ > +++ b/d/dir/file_created
|
||||
+ > @@ -0,0 +1 @@
|
||||
+ > +some content
|
||||
+ > --- a/d/dir/file_removed
|
||||
+ > +++ /dev/null
|
||||
+ > @@ -1 +0,0 @@
|
||||
+ > -some content
|
||||
+
|
||||
+ $ quilt pop
|
||||
+ > Removing patch %{_P}patch2.diff
|
||||
+ > Removing d/dir/file_created
|
||||
+ > Restoring d/dir/file_removed
|
||||
+ >
|
||||
+ > Now at patch %{_P}patch1
|
||||
+
|
||||
+ $ test -e dir/file_created && echo "Created file should not exist when patch is poped!"
|
||||
+ $ test ! -e dir/file_removed && echo "Deleted file should exist when patch is poped!"
|
||||
+
|
||||
+ $ quilt push
|
||||
+ > Applying patch %{_P}patch2.diff
|
||||
+ > patching file d/dir/file_created
|
||||
+ > patching file d/dir/file_removed
|
||||
+ >
|
||||
+ > Now at patch %{_P}patch2.diff
|
||||
+
|
||||
+ $ test ! -e dir/file_created && echo "Created file should exist when patch is pushed!"
|
||||
+ $ test -e dir/file_removed && echo "Deleted file should not exist when patch is pushed!"
|
||||
+
|
|
@ -0,0 +1,84 @@
|
|||
Description: adds a simple "quilt init" that creates the needed meta-data
|
||||
Origin: Vendor
|
||||
Author: Martin Quinson <mquinson@debian.org>
|
||||
---
|
||||
bash_completion | 2 +-
|
||||
quilt/init.in | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
test/one.test | 3 +++
|
||||
3 files changed, 53 insertions(+), 1 deletion(-)
|
||||
|
||||
--- /dev/null
|
||||
+++ b/quilt/init.in
|
||||
@@ -0,0 +1,49 @@
|
||||
+#! @BASH@
|
||||
+
|
||||
+# This script is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License version 2 as
|
||||
+# published by the Free Software Foundation.
|
||||
+#
|
||||
+# See the COPYING and AUTHORS files for more details.
|
||||
+
|
||||
+# Read in library functions
|
||||
+if [ "$(type -t patch_file_name)" != function ]
|
||||
+then
|
||||
+ if ! [ -r $QUILT_DIR/scripts/patchfns ]
|
||||
+ then
|
||||
+ echo "Cannot read library $QUILT_DIR/scripts/patchfns" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ . $QUILT_DIR/scripts/patchfns
|
||||
+fi
|
||||
+
|
||||
+usage()
|
||||
+{
|
||||
+ printf $"Usage: quilt init\n"
|
||||
+ if [ x$1 = x-h ]
|
||||
+ then
|
||||
+ printf $"
|
||||
+Initializes the quilt meta-data in the current sub-directory. This
|
||||
+command is optional as any quilt command creates these meta-data on
|
||||
+need, but it can still be interesting to specify easily the directory
|
||||
+that should be used as root directory before working from a
|
||||
+sub-directory."
|
||||
+ exit 0
|
||||
+ else
|
||||
+ exit 1
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+if [ $? -ne 0 ]
|
||||
+then
|
||||
+ usage
|
||||
+fi
|
||||
+
|
||||
+create_db
|
||||
+
|
||||
+printf $"The quilt meta-data is now initialized.\n"
|
||||
+
|
||||
+### Local Variables:
|
||||
+### mode: shell-script
|
||||
+### End:
|
||||
+# vim:filetype=sh
|
||||
--- a/test/one.test
|
||||
+++ b/test/one.test
|
||||
@@ -10,6 +10,9 @@
|
||||
$ quilt new patch1.diff
|
||||
> Patch %{P}patch1.diff is now on top
|
||||
|
||||
+ $ quilt init
|
||||
+ > The quilt meta-data is now initialized.
|
||||
+
|
||||
$ quilt add dir/file1
|
||||
> File dir/file1 added to patch %{P}patch1.diff
|
||||
|
||||
--- a/bash_completion
|
||||
+++ b/bash_completion
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
# quilt sub commands
|
||||
cmds='add annotate applied delete diff edit files fold fork graph \
|
||||
- grep header import mail new next patches pop previous push refresh \
|
||||
+ grep header import init mail new next patches pop previous push refresh \
|
||||
remove rename revert series setup snapshot top unapplied upgrade'
|
||||
|
||||
# if no command were given, complete on commands
|
|
@ -0,0 +1,146 @@
|
|||
Description: Enforce valid patch names
|
||||
Allowing patch names to contain spaces would require major changes
|
||||
(such as the format of the series file), so we'd better detect that
|
||||
the user tries to use spaces in the patch name, and refuse it.
|
||||
.
|
||||
Also, refuse patches named series, as it would result in awful
|
||||
corruptions of the internal state.
|
||||
Author: Martin Quinson
|
||||
---
|
||||
quilt/fork.in | 2 +
|
||||
quilt/import.in | 2 +
|
||||
quilt/new.in | 2 +
|
||||
quilt/rename.in | 2 +
|
||||
quilt/scripts/patchfns.in | 17 ++++++++++++
|
||||
test/restrict-patch-names.test | 56 +++++++++++++++++++++++++++++++++++++++++
|
||||
6 files changed, 81 insertions(+)
|
||||
|
||||
--- a/quilt/scripts/patchfns.in
|
||||
+++ b/quilt/scripts/patchfns.in
|
||||
@@ -1051,6 +1051,23 @@
|
||||
fi
|
||||
}
|
||||
|
||||
+# We don't want patch with spaces in their name
|
||||
+check_potential_patchname()
|
||||
+{
|
||||
+ local patch="$1"
|
||||
+ if echo "$patch" | grep -q ' '
|
||||
+ then
|
||||
+ printf $"Patch name '%s' invalid: cannot contain spaces.\n" "$patch" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
+ if [ "$patch" = "$QUILT_SERIES" ]
|
||||
+ then
|
||||
+ printf $"No patch can be named '%s' as this would conflict with the\nseries file used internally by quilt.\n" "$QUILT_SERIES" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
print_patch()
|
||||
{
|
||||
echo "${QUILT_PATCHES_PREFIX:+$SUBDIR_DOWN$QUILT_PATCHES/}$1"
|
||||
--- a/quilt/new.in
|
||||
+++ b/quilt/new.in
|
||||
@@ -92,6 +92,8 @@
|
||||
|
||||
patch=${1#$QUILT_PATCHES/}
|
||||
|
||||
+check_potential_patchname "$patch"
|
||||
+
|
||||
if patch_in_series $patch
|
||||
then
|
||||
printf $"Patch %s exists already\n" "$(print_patch $patch)" >&2
|
||||
--- a/quilt/import.in
|
||||
+++ b/quilt/import.in
|
||||
@@ -187,6 +187,8 @@
|
||||
patch=${orig_patch_file##*/}
|
||||
fi
|
||||
|
||||
+ check_potential_patchname "$patch"
|
||||
+
|
||||
patch_file=$(find_patch_file "$orig_patch_file") || exit 1
|
||||
merged_patch_file="$patch_file"
|
||||
|
||||
--- a/quilt/fork.in
|
||||
+++ b/quilt/fork.in
|
||||
@@ -74,6 +74,8 @@
|
||||
|
||||
new_patch=${new_patch#$QUILT_PATCHES/}
|
||||
|
||||
+check_potential_patchname "$new_patch"
|
||||
+
|
||||
if patch_in_series $new_patch || \
|
||||
[ -d "$QUILT_PC/$new_patch" ] || \
|
||||
[ -e "$(patch_file_name $new_patch)" ]
|
||||
--- a/quilt/rename.in
|
||||
+++ b/quilt/rename.in
|
||||
@@ -74,6 +74,8 @@
|
||||
|
||||
new_patch=${1#$QUILT_PATCHES/}
|
||||
|
||||
+check_potential_patchname "$new_patch"
|
||||
+
|
||||
if patch_in_series "$new_patch" || \
|
||||
[ -d "$QUILT_PC/$new_patch" ] || \
|
||||
[ -e "$(patch_file_name "$new_patch")" ]
|
||||
--- /dev/null
|
||||
+++ b/test/restrict-patch-names.test
|
||||
@@ -0,0 +1,56 @@
|
||||
+$ mkdir patches
|
||||
+
|
||||
+$ quilt new "name with spaces"
|
||||
+> Patch name 'name with spaces' invalid: cannot contain spaces.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+$ quilt new series
|
||||
+> No patch can be named 'series' as this would conflict with the
|
||||
+> series file used internally by quilt.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+
|
||||
+
|
||||
+$ echo "+toto" > patchfile
|
||||
+
|
||||
+$ quilt import -P 'name2 with spaces' patchfile
|
||||
+> Patch name 'name2 with spaces' invalid: cannot contain spaces.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+$ quilt import -P series patchfile
|
||||
+> No patch can be named 'series' as this would conflict with the
|
||||
+> series file used internally by quilt.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+
|
||||
+
|
||||
+$ quilt new patch1
|
||||
+> Patch patches/patch1 is now on top
|
||||
+
|
||||
+$ quilt fork "patch 1"
|
||||
+> Patch name 'patch 1' invalid: cannot contain spaces.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+$ quilt fork series
|
||||
+> No patch can be named 'series' as this would conflict with the
|
||||
+> series file used internally by quilt.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+
|
||||
+
|
||||
+$ quilt rename "patch 1"
|
||||
+> Patch name 'patch 1' invalid: cannot contain spaces.
|
||||
+$ echo %{?}
|
||||
+> 1
|
||||
+
|
||||
+$ quilt rename series
|
||||
+> No patch can be named 'series' as this would conflict with the
|
||||
+> series file used internally by quilt.
|
||||
+$ echo %{?}
|
||||
+> 1
|
|
@ -0,0 +1,18 @@
|
|||
cherry-pick.v0.67-29-gf73f8d7.avoid-warnings-with-grep-3-8.patch
|
||||
quilt-init
|
||||
dep3mail ### Sent 2014-01-18
|
||||
check_SERIES_exists ### Sent 2014-01-18
|
||||
|
||||
restrict-patch-names
|
||||
fail_on_missing
|
||||
# Works only with patch 2.6 and newer currently and we don't want to break
|
||||
# backports (see #560621 for discussion)
|
||||
# test_broken_patches
|
||||
shell-subcommand
|
||||
use-sensible-editor
|
||||
dep3_headers
|
||||
push_timeskew
|
||||
manpage-typo.patch
|
||||
fix-failing-tests
|
||||
fix-faildiff-test.patch
|
||||
patchfns-compatibility-fix-for-bsd-awk.patch
|
|
@ -0,0 +1,94 @@
|
|||
Description: Implement a new "quilt shell" command
|
||||
The command launches a shell in a duplicate environment. After exiting
|
||||
the shell, any modifications made in this environment are applied to the
|
||||
topmost patch.
|
||||
Author: Josselin Mouette <joss@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/526141
|
||||
Forwarded: submitted 2012-12-19
|
||||
|
||||
---
|
||||
bash_completion | 2 -
|
||||
quilt/shell.in | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 68 insertions(+), 1 deletion(-)
|
||||
|
||||
--- /dev/null
|
||||
+++ b/quilt/shell.in
|
||||
@@ -0,0 +1,67 @@
|
||||
+#! @BASH@
|
||||
+
|
||||
+# This script is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License version 2 as
|
||||
+# published by the Free Software Foundation.
|
||||
+#
|
||||
+# See the COPYING and AUTHORS files for more details.
|
||||
+
|
||||
+# Read in library functions
|
||||
+if [ "$(type -t patch_file_name)" != function ]
|
||||
+then
|
||||
+ if ! [ -r $QUILT_DIR/scripts/patchfns ]
|
||||
+ then
|
||||
+ echo "Cannot read library $QUILT_DIR/scripts/patchfns" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ . $QUILT_DIR/scripts/patchfns
|
||||
+fi
|
||||
+
|
||||
+if [ "$1" = "-h" ]; then
|
||||
+ printf $"Usage: quilt shell [command]\n"
|
||||
+ printf $"
|
||||
+Launch a shell in a duplicate environment. After exiting the shell, any
|
||||
+modifications made in this environment are applied to the topmost patch.
|
||||
+
|
||||
+If a command is specified, it is executed instead of launching the shell.
|
||||
+"
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
+tmpdir=$(mktemp -d /tmp/quilt-XXXXXX)
|
||||
+
|
||||
+cp -a . $tmpdir
|
||||
+
|
||||
+(
|
||||
+ cd $tmpdir/"$SUBDIR"
|
||||
+ if [ $# -gt 0 ]; then
|
||||
+ exec "$@"
|
||||
+ else
|
||||
+ $SHELL
|
||||
+ fi
|
||||
+)
|
||||
+
|
||||
+# Find new directories
|
||||
+( cd $tmpdir; find . -type d ! -path ./"$QUILT_PC"/\* ! -path ./"$QUILT_PATCHES"/\* ) | while read dir; do
|
||||
+ if [ ! -d "$dir" ]; then
|
||||
+ mkdir -p "$dir"
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+# New and modified files
|
||||
+( cd $tmpdir; find . -type f ! -path ./"$QUILT_PC"/\* ! -path ./"$QUILT_PATCHES"/\* ) | while read file; do
|
||||
+ if [ ! -f "$file" ] || ! diff -q "$file" $tmpdir/"$file" > /dev/null 2>&1; then
|
||||
+ quilt_command add "$file"
|
||||
+ cp -a $tmpdir/"$file" "$file"
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+# Removed files
|
||||
+( find . -type f ! -path ./"$QUILT_PC"/\* ! -path ./"$QUILT_PATCHES"/\* ) | while read file; do
|
||||
+ if [ ! -f $tmpdir/"$file" ]; then
|
||||
+ quilt_command add "$file"
|
||||
+ rm -f "$file"
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+rm -rf $tmpdir
|
||||
--- a/bash_completion
|
||||
+++ b/bash_completion
|
||||
@@ -30,7 +30,7 @@
|
||||
# quilt sub commands
|
||||
cmds='add annotate applied delete diff edit files fold fork graph \
|
||||
grep header import init mail new next patches pop previous push refresh \
|
||||
- remove rename revert series setup snapshot top unapplied upgrade'
|
||||
+ remove rename revert series setup shell snapshot top unapplied upgrade'
|
||||
|
||||
# if no command were given, complete on commands
|
||||
if [[ $COMP_CWORD -eq 1 ]] ; then
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
test/file-not-found.test | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
Index: b/test/file-not-found.test
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/test/file-not-found.test
|
||||
@@ -0,0 +1,30 @@
|
||||
+# Try to push a patch touching a file which does not exist in this tree
|
||||
+
|
||||
+$ rm -rf d
|
||||
+$ mkdir -p d/patches
|
||||
+$ cd d
|
||||
+
|
||||
+$ mkdir subdir
|
||||
+$ echo foo > subdir/file.txt
|
||||
+$ echo bar > subdir/other.txt
|
||||
+$ diff -u subdir/file.txt subdir/other.txt > patches/patch
|
||||
+# simulate --no-timestamp
|
||||
+$ sed 's|subdir/file.txt.*|subdir/file.txt|' patches/patch > patches/patch2
|
||||
+$ sed 's|subdir/other.txt.*|subdir/other.txt|' patches/patch2 > patches/patch
|
||||
+$ rm subdir/other.txt patches/patch2
|
||||
+$ echo patch > patches/series
|
||||
+
|
||||
+$ quilt push
|
||||
+> Applying patch patches/patch
|
||||
+> patching file other.txt
|
||||
+> Hunk #1 FAILED at 1.
|
||||
+> 1 out of 1 hunk FAILED -- rejects in file other.txt
|
||||
+> Patch patches/patch does not apply (enforce with -f)
|
||||
+
|
||||
+$ quilt push -qf
|
||||
+> Applying patch patches/patch
|
||||
+> 1 out of 1 hunk FAILED -- saving rejects to file other.txt.rej
|
||||
+> Applied patch patches/patch (forced; needs refresh)
|
||||
+
|
||||
+$ cd ..
|
||||
+$ rm -rf d
|
|
@ -0,0 +1,56 @@
|
|||
Description: default the value of EDITOR with Debian's sensible-editor instead of vi
|
||||
the original bug that triggered this change was that quilt doesn't honour $VISUAL
|
||||
Bug-Debian: https://bugs.debian.org/509076
|
||||
Forwarded: not-needed
|
||||
Author: Ryan Niebur <ryanryan52@gmail.com>
|
||||
|
||||
---
|
||||
quilt/edit.in | 2 +-
|
||||
quilt/header.in | 2 +-
|
||||
quilt/mail.in | 2 +-
|
||||
test/edit.test | 1 +
|
||||
4 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/quilt/edit.in
|
||||
+++ b/quilt/edit.in
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# See the COPYING and AUTHORS files for more details.
|
||||
|
||||
-: ${EDITOR:=vi}
|
||||
+: ${EDITOR:=sensible-editor}
|
||||
|
||||
usage()
|
||||
{
|
||||
--- a/quilt/header.in
|
||||
+++ b/quilt/header.in
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# See the COPYING and AUTHORS files for more details.
|
||||
|
||||
-: ${EDITOR:=vi}
|
||||
+: ${EDITOR:=sensible-editor}
|
||||
|
||||
usage()
|
||||
{
|
||||
--- a/quilt/mail.in
|
||||
+++ b/quilt/mail.in
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# See the COPYING and AUTHORS files for more details.
|
||||
|
||||
-: ${EDITOR:=vi}
|
||||
+: ${EDITOR:=sensible-editor}
|
||||
|
||||
usage()
|
||||
{
|
||||
--- a/test/edit.test
|
||||
+++ b/test/edit.test
|
||||
@@ -7,6 +7,7 @@
|
||||
< sed -e 's:foo:bar:' $1 > $1.new
|
||||
< mv $1.new $1
|
||||
$ chmod +x editor
|
||||
+$ unset VISUAL
|
||||
$ export EDITOR=%{PWD}/editor
|
||||
|
||||
$ quilt new patch
|
|
@ -0,0 +1,131 @@
|
|||
# -*- mode: makefile; coding: utf-8 -*-
|
||||
# Copyright © 2003 Martin Quinson <mquinson@debian.org>
|
||||
# Description: An advanced patch system based on the quilt facilities.
|
||||
# please refere to the documentation of the quilt package for more information.
|
||||
#
|
||||
# Used variables for configuration:
|
||||
#
|
||||
|
||||
####
|
||||
# If you use autotools.mk, or any other rule/class which uses it,
|
||||
# include this file (patchsys-quilt.mk) *after* those.
|
||||
####
|
||||
|
||||
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
# 02111-1307 USA.
|
||||
|
||||
ifndef _cdbs_bootstrap
|
||||
_cdbs_scripts_path ?= /usr/lib/cdbs
|
||||
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
|
||||
_cdbs_class_path ?= /usr/share/cdbs/1/class
|
||||
endif
|
||||
|
||||
ifndef _cdbs_rules_patchsys_quilt
|
||||
_cdbs_rules_patchsys_quilt := 1
|
||||
|
||||
ifdef _cdbs_rules_patchsys
|
||||
$(error cannot load two patch systems at the same time)
|
||||
endif
|
||||
|
||||
include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
|
||||
|
||||
DEB_SRCDIR ?= .
|
||||
_cdbs_patch_system_apply_rule := apply-patches
|
||||
_cdbs_patch_system_unapply_rule := reverse-patches
|
||||
|
||||
# standard targets, as recommended by Debian policy 3.8.0
|
||||
.PHONY: patch unpatch
|
||||
patch: apply-patches
|
||||
unpatch: reverse-patches
|
||||
|
||||
# DEB_PATCHDIRS: directory containing your source file for patches.
|
||||
#
|
||||
# You might find it convenient to add the snippet below to your
|
||||
# $HOME/.quiltrc so that you can use quilt without having to reset
|
||||
# QUILT_PATCHES when you switch from one project to the other:
|
||||
# for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
|
||||
# if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
|
||||
# export QUILT_PATCHES=debian/patches
|
||||
# fi
|
||||
# done
|
||||
QUILT_PATCH_DIR ?= $(CURDIR)/debian/patches
|
||||
DEB_PATCHDIRS = $(QUILT_PATCH_DIR)
|
||||
|
||||
# DEB_QUILT_TOPDIR: directory where patches will be applied
|
||||
# Use it only to override back to "." when CDBS sets DEB_SRCDIR
|
||||
# and you don't want the quilt patching to happen in a subdirectory
|
||||
DEB_QUILT_TOPDIR ?= $(DEB_SRCDIR)
|
||||
|
||||
# Internal variables, do not change it unless you know what you're doing
|
||||
DEB_QUILT_CMD = cd $(DEB_QUILT_TOPDIR) && QUILT_PATCHES=$(DEB_PATCHDIRS) quilt --quiltrc /dev/null
|
||||
|
||||
# Declare Build-Dep of packages using this file onto quilt
|
||||
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), quilt
|
||||
|
||||
# Build-Dep on patchutils to check for fool souls patching config.* files
|
||||
# This is a Bad Thing since cdbs updates those files automatically.
|
||||
# (code stolen from cdbs itself, in dpatch.mk)
|
||||
|
||||
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), patchutils (>= 0.2.25)
|
||||
|
||||
# target reverse-config, which we use, don't exist in old cdbs
|
||||
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.27)
|
||||
|
||||
evil_patches_that_do_nasty_things := $(shell \
|
||||
if lsdiff=`which lsdiff` ; then \
|
||||
patchlist=`$(DEB_QUILT_CMD) series \
|
||||
| sed 's|^|$(DEB_PATCHDIRS)/|' \
|
||||
| tr "\n" " "`; \
|
||||
if [ "x$$patchlist" != x ] ; then \
|
||||
$$lsdiff -H $$patchlist \
|
||||
| egrep "/config\.(guess|sub|rpath)$$" | tr "\n" " " ; \
|
||||
fi;\
|
||||
fi)
|
||||
ifneq (, $(evil_patches_that_do_nasty_things))
|
||||
$(warning WARNING: The following patches are modifying auto-updated files. This can result in serious trouble: $(evil_patches_that_do_nasty_things))
|
||||
endif
|
||||
|
||||
|
||||
post-patches:: apply-patches
|
||||
|
||||
clean:: reverse-patches
|
||||
|
||||
# The patch subsystem
|
||||
apply-patches: pre-build debian/stamp-patched
|
||||
debian/stamp-patched:
|
||||
# reverse-config must be first
|
||||
$(MAKE) -f debian/rules reverse-config
|
||||
|
||||
# quilt exits with 2 as return when there was nothing to do.
|
||||
# That's not an error here (but it's usefull to break loops in crude scripts)
|
||||
$(DEB_QUILT_CMD) push -a || test $$? = 2
|
||||
touch debian/stamp-patched
|
||||
|
||||
$(MAKE) -f debian/rules update-config
|
||||
# update-config must be last
|
||||
|
||||
reverse-patches:
|
||||
# reverse-config must be first
|
||||
$(MAKE) -f debian/rules reverse-config
|
||||
|
||||
if [ -d "$(DEB_QUILT_TOPDIR)" ]; then \
|
||||
$(DEB_QUILT_CMD) pop -a -R || test $$? = 2 ; \
|
||||
fi
|
||||
rm -rf $(DEB_QUILT_TOPDIR)/.pc
|
||||
rm -f debian/stamp-patch*
|
||||
|
||||
endif
|
|
@ -0,0 +1 @@
|
|||
0
|
|
@ -0,0 +1,47 @@
|
|||
#! /bin/sh -e
|
||||
# /usr/lib/emacsen-common/packages/install/quilt-el
|
||||
|
||||
# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
|
||||
# from the install scripts for gettext by Santiago Vila
|
||||
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=quilt-el
|
||||
|
||||
if [ ${FLAVOR} = emacs ]; then exit 0; fi
|
||||
|
||||
echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
|
||||
|
||||
#FLAVORTEST=`echo $FLAVOR | cut -c-6`
|
||||
#if [ ${FLAVORTEST} = xemacs ] ; then
|
||||
# SITEFLAG="-no-site-file"
|
||||
#else
|
||||
# SITEFLAG="--no-site-file"
|
||||
#fi
|
||||
FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
|
||||
|
||||
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
|
||||
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
ELRELDIR=../../../emacs/site-lisp/${PACKAGE}
|
||||
|
||||
# Install-info-altdir does not actually exist.
|
||||
# Maybe somebody will write it.
|
||||
if test -x /usr/sbin/install-info-altdir; then
|
||||
echo install/${PACKAGE}: install Info links for ${FLAVOR}
|
||||
install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
|
||||
fi
|
||||
|
||||
install -m 755 -d ${ELCDIR}
|
||||
cd ${ELDIR}
|
||||
FILES=`echo *.el`
|
||||
cd ${ELCDIR}
|
||||
ln -sf ${ELRELDIR}/*.el .
|
||||
|
||||
cat << EOF > path.el
|
||||
(debian-pkg-add-load-path-item ".")
|
||||
(setq byte-compile-warnings nil)
|
||||
EOF
|
||||
${FLAVOR} ${FLAGS} ${FILES}
|
||||
rm -f path.el
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh -e
|
||||
# /usr/lib/emacsen-common/packages/remove/quilt-el
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=quilt-el
|
||||
|
||||
if [ ${FLAVOR} != emacs ]; then
|
||||
if test -x /usr/sbin/install-info-altdir; then
|
||||
echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
|
||||
install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/quilt.info.gz
|
||||
fi
|
||||
|
||||
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
|
||||
rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
fi
|
|
@ -0,0 +1,26 @@
|
|||
;; -*-emacs-lisp-*-
|
||||
;;
|
||||
;; Emacs startup file, e.g. /etc/emacs/site-start.d/50quilt-el.el
|
||||
;; for the Debian quilt-el package
|
||||
;;
|
||||
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
|
||||
;; Modified by Dirk Eddelbuettel <edd@debian.org>
|
||||
;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
|
||||
|
||||
;; The quilt-el package follows the Debian/GNU Linux 'emacsen' policy and
|
||||
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
|
||||
;; xemacs19, emacs20, xemacs20...). The compiled code is then
|
||||
;; installed in a subdirectory of the respective site-lisp directory.
|
||||
;; We have to add this to the load-path:
|
||||
(let ((package-dir (concat "/usr/share/"
|
||||
(symbol-name debian-emacs-flavor)
|
||||
"/site-lisp/quilt-el")))
|
||||
;; If package-dir does not exist, the quilt-el package must have
|
||||
;; removed but not purged, and we should skip the setup.
|
||||
(when (file-directory-p package-dir)
|
||||
(if (fboundp 'debian-pkg-add-load-path-item)
|
||||
(debian-pkg-add-load-path-item package-dir)
|
||||
(setq load-path (cons package-dir load-path)))
|
||||
(autoload 'quilt-mode "quilt-mode"
|
||||
"Minor mode for editing files on quilt hierarchy."
|
||||
t)))
|
|
@ -0,0 +1,2 @@
|
|||
# Install the upstream bash_completion script as "quilt"
|
||||
bash_completion quilt
|
|
@ -0,0 +1,256 @@
|
|||
#
|
||||
# This makefile chunk is intended to ease my work on packages. I hope it can
|
||||
# reveal useful to other people too. But if you see some cruft here and
|
||||
# there, you'll know why ;)
|
||||
#
|
||||
# Several of the package I work on (shadow, most of the pkg-grid alioth
|
||||
# project) use quilt to manage diff onto upstream tarball.
|
||||
#
|
||||
# We only store the debian directory in the SCM since all changes must be
|
||||
# done as patch managed by quilt.
|
||||
#
|
||||
# This makefile is intended to be copied in the directory containing the
|
||||
# debian/ tree. It can:
|
||||
#
|
||||
# - Download the upstream tarball and open it on need
|
||||
# * Define the SITE variable to tell it where to search for it (with wget)
|
||||
# * The package name is guessed from the current directory, but can be
|
||||
# explicitely given as the PKG variable.
|
||||
# * The verion number must be given as VER variable
|
||||
#
|
||||
# - Copy the debian directory onto the working directory
|
||||
# (yeah, cp debian/ $(PKG)-$(VER)/debian. I see you're following)
|
||||
#
|
||||
# - Build the package, capturing the output with script
|
||||
#
|
||||
# - Ensure that just after the package build, we have such a link:
|
||||
# $(PKG)-$(VER)/debian/patches -> debian/patches
|
||||
# So, changes to the patches with quilt gets saved out of the
|
||||
# $(PKG)-$(VER) tree, which can be erased at any time without loss.
|
||||
# Of course, just before the build, the makefile ensures that this link
|
||||
# is replaced by a copy of the debian/patches directory to make
|
||||
# dpkg-buildpackage happy
|
||||
|
||||
# TARGETS:
|
||||
#
|
||||
# deb: Do what's documented above.
|
||||
#
|
||||
# debsign: don't add -us -uc to dpkg-buildpackage invocation
|
||||
# check-complet: for multi-binary packages, make sure that all the content
|
||||
# of debian/tmp gets moved away [to the right place] by dh_install
|
||||
# check-lintian:
|
||||
# check-linda:
|
||||
# check: all of the check-* above
|
||||
# scan or watch: watch for new upstream tarballs
|
||||
|
||||
# VARIABLES which you can use to configure stuff:
|
||||
#
|
||||
# PKG: package name (defaults to the current directory name)
|
||||
# VER: package version (defaults to the changelog entry in debian/changelog)
|
||||
# UP_TAR: name of the tarfile, as called upstream
|
||||
# Defaults to $(PKG)-$(UP_VER).tar.gz where UP_VER is VER without -nn part
|
||||
# Useful to get it downloaded and/or opened automatically
|
||||
# EXTRA_OPEN_CMD: what to do after untarring upstream tarball.
|
||||
# When upstream tarball doesn't contain a gentle $(PKG)-$(UP_VER) as
|
||||
# expected by dpkg-buildpackage, do this:
|
||||
# EXTRA_OPEN_CMD=mv the_funky_dir_name_given_upstream $(PKG)-$(UP_VER)
|
||||
# SITE: where to get the upstream tarball (we do "wget $(SITE)/$(UP_TAR)")
|
||||
#
|
||||
|
||||
# CAVEATS:
|
||||
#
|
||||
# - $(PKG)-$(VER) is not considered as precious at all. Don't change
|
||||
# anything in it. In particular, don't change $(PKG)-$(VER)/debian files.
|
||||
|
||||
##############
|
||||
### That's it.
|
||||
### The actual makefile chunk follows, but you shouldn't need to dig into it
|
||||
##############
|
||||
|
||||
PKG?=$(shell pwd |sed 's|.*/||')
|
||||
VER?=$(shell dpkg-parsechangelog -ldebian/changelog|grep '^Version'|sed -e 's/[^ ]* //' -e 's/[^:]://')
|
||||
UP_VER=$(shell echo $(VER)|sed 's/-.*$$//')
|
||||
UP_TAR?=$(PKG)-$(UP_VER).tar.gz
|
||||
|
||||
########################################################
|
||||
##################### BUILD TARGET #####################
|
||||
########################################################
|
||||
|
||||
deb:: $(PKG)-$(UP_VER) stamp-debdir $(PKG)_$(UP_VER).orig.tar.gz
|
||||
@echo XXXXXXXXXXX Build the deb
|
||||
rm -rf $(PKG)-$(UP_VER)/debian/patches
|
||||
@if [ -e debian/patches ] ; then \
|
||||
echo "cp -r debian/patches $(PKG)-$(UP_VER)/debian"; \
|
||||
cp -r debian/patches $(PKG)-$(UP_VER)/debian; \
|
||||
fi
|
||||
-cd $(PKG)-$(UP_VER) && script -c "dpkg-buildpackage -rfakeroot -uc -us" ../build.log
|
||||
@if [ -e debian/patches ] ; then \
|
||||
rm -rf $(PKG)-$(UP_VER)/debian/patches ; \
|
||||
echo "Link patches/ to ../debian/patches" ; \
|
||||
cd $(PKG)-$(UP_VER)/debian ; \
|
||||
ln -s ../../debian/patches .; \
|
||||
fi
|
||||
|
||||
debsign:: $(PKG)-$(UP_VER) stamp-debdir $(PKG)_$(UP_VER).orig.tar.gz
|
||||
@echo XXXXXXXXXXX Build the deb
|
||||
rm -rf $(PKG)-$(UP_VER)/debian/patches
|
||||
@if [ -e debian/patches ] ; then \
|
||||
echo "cp -r debian/patches $(PKG)-$(UP_VER)/debian"; \
|
||||
cp -r debian/patches $(PKG)-$(UP_VER)/debian; \
|
||||
fi
|
||||
cd $(PKG)-$(UP_VER) && script -c "dpkg-buildpackage -rfakeroot" ../build.log
|
||||
@if [ -e debian/patches ] ; then \
|
||||
rm -rf $(PKG)-$(UP_VER)/debian/patches ; \
|
||||
echo "Link patches/ to ../debian/patches" ; \
|
||||
cd $(PKG)-$(UP_VER)/debian ; \
|
||||
ln -s ../../debian/patches .; \
|
||||
fi
|
||||
|
||||
$(PKG)-$(UP_VER):: $(UP_TAR)
|
||||
@echo XXXXXXXXXXX Open the tarball
|
||||
rm -rf $(PKG)-$(UP_VER)
|
||||
tar xfz $(UP_TAR)
|
||||
$(EXTRA_OPEN_CMD)
|
||||
|
||||
$(UP_TAR)::
|
||||
@echo XXXXXXXXXXX Download the tarball
|
||||
@if test -e $(UP_TAR) ; then \
|
||||
echo "Tarball found; no download needed."; \
|
||||
else \
|
||||
if test "x$(SITE)" = x ; then \
|
||||
echo "Unable to download $(UP_TAR) since no SITE is provided";\
|
||||
echo "Either edit Makefile or download the tarball yourself";\
|
||||
exit 1;\
|
||||
else \
|
||||
wget -nd $(SITE)/$(UP_TAR);\
|
||||
fi;\
|
||||
fi
|
||||
|
||||
stamp-debdir: FORCE
|
||||
@echo XXXXXXXXXXX Put the debian dir in position
|
||||
rm -rf $(PKG)-$(UP_VER)/debian
|
||||
cp -Lr debian $(PKG)-$(UP_VER)/debian
|
||||
for i in CVS .svn \{arch\} .arch-ids ; do \
|
||||
find $(PKG)-$(UP_VER)/debian -type d -name $$i | xargs rm -rf ; \
|
||||
done
|
||||
for i in .cvsignore svn-commit.tmp .arch-inventory ; do \
|
||||
find $(PKG)-$(UP_VER)/debian -type f -name $$i | xargs rm -f ; \
|
||||
done
|
||||
touch stamp-debdir
|
||||
|
||||
$(PKG)_$(UP_VER).orig.tar.gz: $(UP_TAR)
|
||||
@echo XXXXXXXXXXX Copy the orig.tar.gz
|
||||
cp $(UP_TAR) $(PKG)_$(UP_VER).orig.tar.gz
|
||||
|
||||
FORCE:
|
||||
|
||||
########################################################
|
||||
##################### CHECK TARGET #####################
|
||||
########################################################
|
||||
check-complet: FORCE
|
||||
@echo XXXXXXXXXXX Check the package for completness
|
||||
@for file in `find $(PKG)-$(UP_VER)/debian/tmp -type f|\
|
||||
sed 's|$(PKG)-$(UP_VER)/debian/tmp/||'` ; do \
|
||||
where=`find $(PKG)-$(UP_VER)/debian/*|\
|
||||
grep -v '$(PKG)-$(UP_VER)/debian/tmp'|\
|
||||
grep $$file|\
|
||||
sed -e "s|$(PKG)-$(UP_VER)/debian/||" \
|
||||
-e 's|\([^/]*\)/.*|\1|' `; \
|
||||
if [ "x$$where" = x ] ; then \
|
||||
base=`basename $$file`; \
|
||||
where=`find $(PKG)-$(UP_VER)/debian/*|\
|
||||
grep -v '$(PKG)-$(UP_VER)/debian/tmp'|\
|
||||
grep $$base|\
|
||||
sed -e "s|$(PKG)-$(UP_VER)/debian/||" `; \
|
||||
if [ "x$$where" = x ] ; then \
|
||||
echo "Not Found $$file"; \
|
||||
else \
|
||||
echo "NOT FOUND $$file (beside $$where)"; \
|
||||
fi \
|
||||
else \
|
||||
echo Found $$file in $$where >/dev/null; \
|
||||
fi;\
|
||||
done
|
||||
|
||||
check-relocation: FORCE
|
||||
@echo XXXXXXXXXXX Check the relocation of the package
|
||||
@for pkg in `grep Package $(PKG)-$(UP_VER)/debian/control|\
|
||||
sed 's|Package: ||'` ; do \
|
||||
echo "XXX check $$pkg"; \
|
||||
LC_ALL=C grep -r $(PWD) $(PKG)-$(UP_VER)/debian/$$pkg |\
|
||||
while read line ; do \
|
||||
if echo $$line|grep -q 'Binary file' >/dev/null ; then \
|
||||
name=`echo $$line|sed 's/Binary file \([^ ]*\) .*$$/\1/'`; \
|
||||
echo " Binary $$name =>";\
|
||||
strings $$name |grep $(PWD)|\
|
||||
grep -v '.c$$'|sed 's/^/ /';\
|
||||
else \
|
||||
echo " $$line"; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
check-relocation-old: FORCE
|
||||
@echo XXXXXXXXXXX Check the relocation of the package
|
||||
@for pkg in `grep Package $(PKG)-$(UP_VER)/debian/control|\
|
||||
sed 's|Package: ||'` ; do \
|
||||
echo "XXX check $$pkg"; \
|
||||
LC_ALL=C grep -r $(PWD) $(PKG)-$(UP_VER)/debian/$$pkg|\
|
||||
sed 's/^/ /';\
|
||||
done
|
||||
|
||||
check-lintian: FORCE
|
||||
@echo XXXXXXXXXXX Check the package with lintian
|
||||
lintian -i *.deb
|
||||
lintian -i *.dsc
|
||||
|
||||
check-linda: FORCE
|
||||
@echo XXXXXXXXXXX Check the package with linda
|
||||
linda -i *.deb
|
||||
linda -i *.dsc
|
||||
|
||||
check: check-complet check-linda check-lintian
|
||||
|
||||
########################################################
|
||||
##################### CLEAN TARGET #####################
|
||||
########################################################
|
||||
|
||||
clean-dsc: FORCE
|
||||
@echo XXXXXXXXXXX Clean the old versions
|
||||
@while [ `ls *.dsc |wc -l` -gt 1 -o `ls *.changes |wc -l` -gt 1 ] ; do \
|
||||
if [ `ls *.changes |wc -l` -gt 1 ] ; then \
|
||||
echo "XXX Cleanup binaries";ls;\
|
||||
changes=`ls *.changes|head -1`; \
|
||||
list=`grep-dctrl -s Files -n . $$changes|\
|
||||
sed 's/^ *//'|\
|
||||
cut -d' ' -f5|\
|
||||
egrep -v '\.dsc$$'`;\
|
||||
rm -i $$list $$changes; \
|
||||
fi; \
|
||||
\
|
||||
if [ `ls *.dsc |wc -l` -gt 1 ] ; then \
|
||||
echo "XXX Cleanup source";ls;\
|
||||
dsc=`ls *.dsc|head -1`; \
|
||||
list=`grep-dctrl -s Files -n . $$dsc|\
|
||||
sed 's/^ *//'|\
|
||||
cut -d' ' -f3|\
|
||||
egrep -v '\.orig.tar.gz$$'`; \
|
||||
rm -i $$list $$dsc; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
clean: clean-dsc
|
||||
@echo XXXXXXXXXXX Clean the stamps
|
||||
rm -rf stamp-*
|
||||
|
||||
maintainerclean: clean
|
||||
rm -rf *.deb *.diff.gz *.dsc *.changes *.upload
|
||||
rm -rf $(PKG)_$(UP_VER).orig.tar.gz $(PKG)-$(UP_VER)
|
||||
|
||||
scan watch:
|
||||
uscan --check-dirname-regex 'PACKAGE' --check-dirname-level 2 --report
|
||||
|
||||
.PHONY: FORCE scan watch clean clean-dsc
|
||||
ifneq (,$(wildcard makefile.override))
|
||||
include makefile.override
|
||||
endif
|
|
@ -0,0 +1,19 @@
|
|||
Document: quilt
|
||||
Title: Introduction to Quilt
|
||||
Author: Andreas Grünbacher, SuSE Labs <agruen@suse.de>
|
||||
Abstract: After looking at different strategies for dealing with
|
||||
software packages that consist of a base software package on top of
|
||||
which a number of patches are applied, this document introduces the
|
||||
script collection quilt, which was specifically written to help
|
||||
deal with multiple patches and common patch management tasks.
|
||||
Section: Programming
|
||||
|
||||
Format: text
|
||||
Files: /usr/share/doc/quilt/quilt.txt.gz
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/quilt/quilt.html
|
||||
Files: /usr/share/doc/quilt/quilt.html
|
||||
|
||||
Format: PDF
|
||||
Files: /usr/share/doc/quilt/quilt.pdf
|
|
@ -0,0 +1,6 @@
|
|||
AUTHORS
|
||||
NEWS
|
||||
TODO
|
||||
debian/README.source
|
||||
doc/quilt.html
|
||||
doc/quilt.txt
|
|
@ -0,0 +1,8 @@
|
|||
debian/deb3 usr/bin
|
||||
debian/dh_quilt_patch usr/bin
|
||||
debian/dh_quilt_unpatch usr/bin
|
||||
debian/dpatch2quilt usr/bin
|
||||
debian/patchsys-quilt.mk usr/share/cdbs/1/rules
|
||||
debian/quilt.debbuild.mk usr/share/quilt
|
||||
debian/quilt.make usr/share/quilt
|
||||
debian/quilt.pm usr/share/perl5/Debian/Debhelper/Sequence
|
|
@ -0,0 +1,27 @@
|
|||
# -*- Makefile -*-, you silly Emacs!
|
||||
# vim: set ft=make:
|
||||
|
||||
#
|
||||
# This file tries to mimick /usr/share/dpatch/dpatch.make
|
||||
#
|
||||
|
||||
# QUILT_STAMPFN: stamp file to use
|
||||
QUILT_STAMPFN ?= debian/stamp-patched
|
||||
|
||||
# QUILT_PATCH_DIR: where the patches live
|
||||
QUILT_PATCH_DIR ?= debian/patches
|
||||
|
||||
patch: $(QUILT_STAMPFN)
|
||||
$(QUILT_STAMPFN):
|
||||
@# quilt exits with 2 as return when there was nothing to do.
|
||||
@# That's not an error here
|
||||
QUILT_PATCHES=$(QUILT_PATCH_DIR) \
|
||||
quilt --quiltrc /dev/null push -a || test $$? = 2
|
||||
touch $(QUILT_STAMPFN)
|
||||
|
||||
unpatch:
|
||||
QUILT_PATCHES=$(QUILT_PATCH_DIR) \
|
||||
quilt --quiltrc /dev/null pop -a -R || test $$? = 2
|
||||
rm -rf .pc $(QUILT_STAMPFN)
|
||||
|
||||
.PHONY: patch unpatch
|
|
@ -0,0 +1,3 @@
|
|||
debian/deb3.1
|
||||
debian/dh_quilt_patch.1
|
||||
debian/dh_quilt_unpatch.1
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/perl
|
||||
use warnings;
|
||||
use strict;
|
||||
use Debian::Debhelper::Dh_Lib;
|
||||
|
||||
insert_before("dh_update_autotools_config", "dh_quilt_patch");
|
||||
insert_before("dh_clean", "dh_quilt_unpatch");
|
||||
|
||||
# Eval to avoid problem with debhelper < 7.3.12
|
||||
eval {
|
||||
add_command("dh_quilt_patch", "patch");
|
||||
};
|
||||
|
||||
1;
|
|
@ -0,0 +1,9 @@
|
|||
# This is the quiltrc used to build the package when the quilt program is found
|
||||
|
||||
# find our friends
|
||||
QUILT_PATCHES=debian/patches
|
||||
QUILT_REFRESH_ARGS="--diffstat -p ab"
|
||||
QUILT_DIFF_OPTS='-p'
|
||||
|
||||
# do not polute patches with timestamps
|
||||
QUILT_NO_DIFF_TIMESTAMPS=1
|
|
@ -0,0 +1,63 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
# Where we want quilt to install files
|
||||
export BUILD_ROOT=$(CURDIR)/debian/quilt
|
||||
|
||||
%:
|
||||
dh $@ --with=bash-completion
|
||||
|
||||
override_dh_auto_clean:
|
||||
test ! -e Makefile || touch Makefile # Avoids auto-rebuild rule to kick-in
|
||||
dh_auto_clean
|
||||
# Restore pristine l10n files
|
||||
for po in po/*.backup; do test ! -e $$po || mv $$po $${po%%.backup}; done
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- --with-docdir=/usr/share/doc/quilt --with-sendmail=/usr/sbin/sendmail --with-awk=/usr/bin/awk --with-bash=/bin/bash
|
||||
|
||||
override_dh_auto_build:
|
||||
# Backup a pristine copy of l10n files
|
||||
for po in po/*.po po/quilt.pot; do cp $$po $$po.backup; done
|
||||
# Build quilt
|
||||
dh_auto_build
|
||||
# Build a HTML/txt copy of the documentation
|
||||
mkdir -p doc/tmp
|
||||
ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
|
||||
cd doc/tmp; LC_ALL=C hevea ../main.tex ; LC_ALL=C hevea ../main.tex; LC_ALL=C hevea ../main.tex
|
||||
perl -pe 'if (/\\sh\{.*}/) {s:\\sh\{(.*)}:<I>$$1</I>:}' \
|
||||
< doc/tmp/main.html > doc/quilt.html
|
||||
LC_ALL=C html2text -style pretty -o doc/quilt.txt doc/quilt.html
|
||||
else
|
||||
touch doc/quilt.html doc/quilt.txt
|
||||
endif
|
||||
rm -rf doc/tmp
|
||||
pod2man -c Debhelper debian/dh_quilt_patch debian/dh_quilt_patch.1
|
||||
pod2man -c Debhelper debian/dh_quilt_unpatch debian/dh_quilt_unpatch.1
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
install -d -m 0755 $(CURDIR)/debian/quilt-el/usr/share/emacs/site-lisp/quilt-el
|
||||
install -m 0644 $(BUILD_ROOT)/usr/share/emacs/site-lisp/quilt.el \
|
||||
$(CURDIR)/debian/quilt-el/usr/share/emacs/site-lisp/quilt-el/quilt-mode.el
|
||||
rm -fr $(BUILD_ROOT)/usr/share/emacs
|
||||
# Remove the bash_completion script from upstream,
|
||||
# it's installed in an obsolete directory.
|
||||
rm -fr $(BUILD_ROOT)/etc/bash_completion.d
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs --link-doc=quilt
|
||||
|
||||
override_dh_compress:
|
||||
# Don't compress the .pdf, it's annoying and brings almost nothing
|
||||
# since the format is already compressed
|
||||
dh_compress -X.pdf
|
||||
|
||||
override_dh_auto_test:
|
||||
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
|
||||
@if ! [ -d /proc/1 ]; then \
|
||||
echo "quilt needs a mounted /proc to correctly build";\
|
||||
echo "If you really want to build without /proc, add nocheck to DEB_BUILD_OPTIONS"; \
|
||||
exit 1; \
|
||||
fi
|
||||
dh_auto_test
|
||||
endif
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1,3 @@
|
|||
Name: quilt
|
||||
Bug-Submit: quilt-dev@nongnu.org
|
||||
Repository: git://git.savannah.nongnu.org/quilt.git
|
|
@ -0,0 +1,53 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.6
|
||||
Comment: Hostname: keys2.kfwebs.net
|
||||
|
||||
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
|
||||
XV4nETQAnRQyjDPAc5mY9f3kc2t58ERE5s0I
|
||||
=Yubb
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -0,0 +1,3 @@
|
|||
version=4
|
||||
opts="pgpmode=auto" \
|
||||
https://download.savannah.gnu.org/releases/quilt/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@
|
Loading…
Reference in New Issue