File quilt.spec of Package quilt

# spec file for package quilt (Version 0.47)
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# norootforbuild

Name:           quilt
BuildRequires:  diffstat ed procmail
Summary:        A Tool for Working with Many Patches
License:        GPL v2 or later
Group:          Productivity/Text/Utilities
Version:        0.47
Release:        14
Requires:       coreutils diffutils patch gzip bzip2 perl mktemp diffstat
Recommends:     procmail
AutoReqProv:    off
Source:         %{name}-%{version}.tar.bz2
Source1:        suse-start-quilt-mode.el
Patch1:         expand.diff
Patch2:         docdir.diff
Patch3:         patch-wrapper-rpm.diff
Patch4:         %{name}-fix-completion.diff
Patch5:         %{name}-improve-formail-error.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Quilt allows you to easily manage large numbers of patches by keeping
track of the changes each patch makes. Patches can be applied,
un-applied, refreshed, and more.

Quilt originally was based on Andrew Morton's patch scripts found at

    Andreas Gruenbacher <>

%setup -q
%patch -p1 -P 1 -P 2 -P 3 -P 4 -P 5

# --with-rpmbuild=/usr/lib/rpm/rpmb:
#   SUSE Autobuild uses a version of /usr/bin/rpmbuild that sources
#   /etc/profile to reset the PATH. We must not do that: the
#   inspect script needs to pass an additional path component to
#   rpmbuild for the tar and patch wrappers.
./configure --prefix=/usr \
    --mandir=%{_mandir} \
    --with-sendmail=/usr/sbin/sendmail \
    --with-diffstat=/usr/bin/diffstat \
    --with-patch-wrapper \
    --with-patch=/usr/bin/patch \

make check

# /usr/share/quilt/compat/mta will be a stale symlink: we don't want to add
# sendmail to neededforbuild just because of this.
mv $RPM_BUILD_ROOT/etc/bash_completion.d/quilt{,.sh}
#make rpmlint happy
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/quilt/scripts/patchfns
# We only needed the /usr/bin/patch compatibility symlink for the
# test suite.
[ $RPM_BUILD_ROOT/usr/share/quilt/compat/patch -ef /usr/bin/patch ] \
    && rm -f $RPM_BUILD_ROOT/usr/share/quilt/compat/patch
[ $RPM_BUILD_ROOT/usr/share/quilt/compat/awk -ef /usr/bin/awk ] \
    && rm -f $RPM_BUILD_ROOT/usr/share/quilt/compat/awk
%{find_lang} %{name}
# Make "vi" an alias for the edit command
ln -s edit $RPM_BUILD_ROOT/usr/share/quilt/vi
# Autoload quilt-mode in the SuSE emacs package
install -m 644 %_sourcedir/suse-start-quilt-mode.el \


%files -f %{name}.lang
%defattr(-, root, root)
%config /etc/quilt.quiltrc
%config /etc/bash_completion.d/
%doc %{_mandir}/man1/guards.1.gz
%doc %{_mandir}/man1/quilt.1.gz
%doc doc/README
%doc doc/README.MAIL
%doc doc/quilt.pdf

* Mon Nov 10 2008
- Remove "Recommends: bash-completion" (bnc#443203).
* Tue Oct 28 2008
- Use 'type' instead of 'which' in last change to avoid dependency
  of 'which' package.
* Mon Oct 27 2008
- Only recommend 'procmail' (contains the 'formail' binary) instead
  of requiring it. It's only needed for the 'mail' command.
* Thu Aug 21 2008
- update to 0.47
  o quilt/scripts/ (cat_series): Handle lines properly
  that only contain whitespace.
  o Add a new "publish" makefile target for pushing releases to
- mark /etc/bash_completion.d/ as %%config (rpmlint)
* Mon Aug 18 2008
- Fix name of completions file.
* Tue Aug 12 2008
- fix completion of "quilt fold" (bnc#415762)
- mark /etc/quilt.quiltrc as %%config (rpmlint)
- mark /etc/bash_completion.d/quilt as %%config (rpmlint)
* Fri Jun 13 2008
- recommend bash-completion (bnc#399615)
* Fri Jun 13 2008
- quilt/ When importing multiple patches at once, make
  sure that they won't end up in the series file in reverse order.
  This happened because each new patch was inserted before the
  "next" patch, which made it the new "next" patch.
* Tue May 20 2008
- Stop using cp -l: it doesn't fall back to doing a regular copy
  when hardlinks are not supported; on some types of filesystems
  like AFS and in some situtions, this is annoying.
* Wed Mar 26 2008
- Assume patches are in unified format by default when applying
  them. (For working with other patch formats, make sure to remove
  "--unified" from QUILT_PATCH_OPTS in ~/.quiltrc or
* Tue Feb 12 2008
- Added dependency on procmail (formail)
* Mon Nov 05 2007
- quilt/ Remove the Recipient-* and Replace-* headers
  used internally from the resulting emails; not sure how that
  was missed so far.
- Fix `make snapshot'.
- Make the changelog file chronological again.
* Mon Oct 29 2007
- quilt mail: Work around a ``Broken pipe'' problem in
* Fri Oct 26 2007
- change version to '0.46_cvs20071026' to make it clear to the
  user that this is a CVS version
- fix some rpmlint warnings
* Thu Oct 25 2007
- quilt/ Make sure that shell meta-characters like * in
  subjects won't get expanded by accident (this was broken). Add
  test case.
- quilt/ ``formail -x Foo'' will extract all Foo* headers,
  so use ``formail -x Foo:'' instead.
- quilt/ Recognize sequences of common subject prefixes
  like Fwd:, Fw:, Re:, Aw:, Tr:, [foo] only at the beginning of
* Mon Oct 15 2007
- Update to latest CVS version.
* Thu Jul 26 2007
- quilt diff: don't colorize the output when the --diff=... option
  is used (allows diff utilities to use terminal IO).
- QUILT_SERIES and series file search algorithm bugfix.
* Sat Apr 28 2007
- mail: allow to specify a range of patches.
- remove: rename this command to revert.
- push, fold: clean up the force-apply and interactive logic.
* Wed Apr 18 2007
- Add emacs quilt mode.
* Mon Mar 26 2007
- Quilt refresh: fix existing patch check.
* Thu Feb 15 2007
- force mandir to fix build in sles10
* Thu Oct 19 2006
- Switch to the upstream 0.46 tarball.
- Add a few missing pieces in the "refresh -z" patch.
* Wed Oct 11 2006
- Update to version 0.46.
- Add patch for "refresh -z".
* Wed Sep 27 2006
- Remove a duplicate hunk from the last update.
* Thu Sep 21 2006
- Fix the docdir in the man page.
* Wed May 31 2006
- Fix `quilt setup' in build environments.
* Mon Apr 24 2006
- import-compressed.diff: Fix replacement of compressed patches.
* Wed Apr 19 2006
- pop-error-path-fix.diff: Fix bogus error message.
* Sat Mar 25 2006
- mail command: Use -gt instead of > in [ ... ] expression.
  Fix quoting of recipients.
* Tue Mar 21 2006
- edit2.diff: The last fix broke another way of using edit.
* Wed Mar 15 2006
- edit.diff: Fix editing files in subdirectories.
* Thu Feb 16 2006
- Setup command: also recognize archive files passed to tar on the
  command line.
* Wed Feb 15 2006
- Bump to official version to 0.44.
- Stop using bash's =~ operator: older versions don't support it.
- Translation update.
- patch-wrapper-rpm.diff: Some fixes to make the patch names that
  quilt shows more convenient.
- Remove unnecessary gawk wrapper.
* Tue Feb 14 2006
- Fix a critical bug in the push command that causes parts of
  patches to end up half-reversed.
* Mon Feb 13 2006
- quiltrc.diff: Change the default patch options to
  --ignore-whitespace --unified-reject.
* Sun Feb 12 2006
- Fix two bash 3.1 compatibility bugs.
- Run the test suite after building.
* Sat Feb 11 2006
- Fix bug when working in subdirectories.
- setup command: Improvements when a series file is given.
- Improve help of new command, add two test cases.
- Fix expand command.
* Wed Feb 08 2006
- GNU patch wrapper: Fix permissions of installed file. Call
  GNU patch by absolute patch to avoid recursion. Don't print an
  error message when a patch contains no files.
- setup command: Improve recognition of patch's -i and --input
* Mon Feb 06 2006
- Add GNU patch wrapper for Autobuild.
* Sat Feb 04 2006
- aclocal.m4 is missing from the tarball.
- quilt mail: Remove a broken check.
* Wed Feb 01 2006
- Update to version 0.43.
- Translations update; more portability improvements.
* Mon Jan 30 2006
- Mail command: add heuristic for automatically extracting
  subjects. Check for duplicate subjects. Add some checks.
- Lots of smaller fixes and portability improvements here and
* Wed Jan 25 2006
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006
- When a patch doesn't apply, check and report when it applies
  in the reverse order (which probably means it already has been
- Put "---" markers above when inserting a diffstat section.
- A lot more portability fixes.
* Sun Jan 22 2006
- Lots of improvements: command parameter handling, input command,
  portability, test suite.
* Wed Jan 18 2006
- setup command: add heuristic to check for input files specified
  on the command line in the tar/patch wrapper.
- Translation update.
- Fix heuristic for splitting a patch into header and body for
- Makefile and test suite improvements.
* Mon Jan 09 2006
- Use the --with-sendmail configure option for sendmail, instead
  of the removed --with-mta.
* Thu Dec 01 2005
- Specify where diffstat will end up so that it will be supported
  even though it is missing in the build environment.
* Mon Nov 28 2005
- CVS update, including a bugfix with -p0 style patches that
  remove files.
- Add an expand command that is not yet upstream.
* Thu Sep 29 2005
- Add README.MAIL and fix the documentation path that appears in
* Wed Sep 28 2005
* Sun Sep 18 2005
- CVS update.
- doc/quilt.quiltrc no longer exists.
- Skip the dead-symlink check: the mta symlink points to sendmail,
  which we don't want to depend on.
* Fri Sep 16 2005
- Remove obsolete doc/sample.quiltrc.
* Thu Sep 15 2005
- CVS update.
* Wed Aug 24 2005
- CVS update.
* Wed Aug 17 2005
- CVS update.
* Wed Jul 27 2005
- Update to version 0.42.
* Mon Jul 18 2005
- Update to version 0.41: new header command, several fixes.
* Fri Jun 17 2005
- cvs.diff: Update to CVS head.
- annotate.diff: Add experimental annotate command.
* Fri Apr 29 2005
- Update to version 0.40.
* Fri Feb 25 2005
- Remove unneeded requirement on the gettext package.
* Fri Feb 18 2005
- quilt add: Add check to ensure that no files below patches/
  or .pc/ will be added.
* Thu Feb 10 2005
- Update to version 0.39.
* Wed Feb 02 2005
- Use color defaults so that QUILT_COLORS can be used to only
  override some colors.
- When checking for remaining changes (refresh forgotten), use
  $QUILT_PATCH_OPTS as in the push command to get identical
  results. Don't generate the actually diff; it doesn't get
  printed anyway. This should speed up things.
* Tue Jan 25 2005
- Fix pop command for recent coreutils (cp dir dir2/ no longer
  works if dir2 doesn't yet exist).
* Mon Jan 24 2005
- Make "vi" an alias for the edit command.
* Sun Jan 23 2005
- Add color support for push command output and allow to customize
  colors via the QUILT_COLORS environment variable (for reverse
  video, etc.).
* Sun Jan 23 2005
- Add mail command, doc/README.MAIL and example ``mail'' command
  filter in quilt.quiltrc.
- Bump version to 0.38.
* Tue Jan 11 2005
- Add a default /etc/quilt.quiltrc file that is sourced if no
  ~/.quiltrc file exists.
* Fri Nov 19 2004
- Push command: Write out output of patch process immediately
  instead of reading into a variable and then printing that
  variable. This helps to see what's happening with large patches.
* Wed Nov 17 2004
- Get rid of the apatch and rpatch helper scripts: Integrate them
  in the push and pop commands. This should bring a small
  performance improvement.
* Mon Nov 15 2004
- Fix extra trailing space in series file after quilt refresh
  (David Vrabel <>).
- Missing quotation in bash_completion
  (Axel Grossklaus <>).
- Fix patches command (Brent Casavant <>).
* Sun Oct 17 2004
- Touch timestamps of files in ``quilt pop'' so that tools like
  make don't get confused.
- Various minor fixes; update to version 0.37.
* Wed Sep 22 2004
- Various fixes; update to version 0.36.
* Fri Sep 03 2004
- Fix ``quilt setup'' command when used inside Autobuild: Make
  sure rpmbuild does not reset PATH.
* Fri Aug 13 2004
- Improvements to setup command.
* Thu Jul 15 2004
- Improve messages and update translations.
- Update and improve the bash completion script.
- Add syntax coloring to diff command.
- Add support for QUILT_${COMMAND}_ARGS in .quiltrc.
- Add QUILT_PATCHES_PREFIX option to .quiltrc.
- Support combined diff format and allow the user to adjust
  the number of context lines.
- Re-add diffstat support to refresh command.
- Documentation update.
- Bump version to 0.35.
* Thu Jun 10 2004
- Add meta-data version check/upgrade code from Martin Quinson and
  me; new `quilt upgrade' command.
- Handle new/removed files correctly in generated patches: If the
  old or new file is missing, the file name in the patch should
  be /dev/null. Fix test suite accordingly, and add
  test/create-delete.diff. GNU patch recognizes this, and does
  additional file existance tests when a patch creates/deletes a
  file. Also use the --label option of GNU diff instead of
  hand-editing file name headers.
- Add test/Makefile for running the test suite. Note: The tests
  run against the installed version of quilt!
- Bump version to 0.34.
* Sun Jun 06 2004
- Preserve the order of files in patches in the diff and refresh
  commands. Files added to a patch appear at the end of a patch.
  The files command also lists the files in the order in which
  they appear in patches.
- Update to version 0.33.
* Sun Jun 06 2004
- dependency-graph: Fix for --lines option in patcher mode;
  restrict to applied patches.
* Sun Jun 06 2004
- import: Create patches/ and parent directories to patch to be
  imported. Insert the correct patch name in the series file.
* Sun Jun 06 2004
- backup-file.c: Add code to recursively search .pc directories.
  Add a "no-op" mode as default, and allow to just unlink files.
- apatch/rpatch: let backup-files search .pc directories instead
  of generating temporary file lists.
- rpatch/pop: unlink files of topmost patch after popping instead
  of unlinking at each step.
- If QUILTRC is set in the environment, use this as the
  configuration file.
* Sat Jun 05 2004
- Return exit status 2 when commands go beyond the series (top
  with no series, push/next when all patches are applied, pop/
  previous when no patches are applied).
- From  John Lenz <>: Add compatibility
  code to the dependency-graph script for reading the meta-data
  of Holger Schurig's patcher tool,
- Update German translation.
* Tue Jun 01 2004
- Fix from Dean Roehrich <>: Preserve file mode
  of original file when creating backup files.
* Tue Jun 01 2004
- document common options to all scripts (--trace and --quiltrc)
- update french translation
* Mon May 31 2004
- Rewrite spec2series to return what the new `quilt setup' needs,
  and rename it to inspect.
- `quilt setup': Rewrite so that it supports multiple archives
  per spec file. Always make the patches directory a symlink to
  the original patch files instead of copying the patches.
* Sun May 16 2004
- Allow passing path arguments to `quilt grep' as well.
* Mon May 10 2004
- Add `quilt grep': Grep over all files, recursively, skipping
  the $QUILT_PATCHES and $QUILT_PC directories.
* Tue Apr 27 2004
- Fix `quilt fork': It destroys .pc/applied patches; that bug got
  introduced when reverting it to its previous semantics.
* Sat Mar 20 2004
- Fix an algorithmic bug in `quilt graph --lines': Edges were
  sometimes lost.
* Mon Mar 15 2004
- CVS update:
  + Add `quilt graph' command for generating a dependency graph
  between patches. This requires the graphviz package for
  removing transitive edges (optional) and for rendering the
  graph. Please note that the graph command itself is minimal,
  while the underlying scripts/dependency+graph is more
  + Complete one more detail in scripts/dependency-graph.
  + Revert `quilt fork' to how it originally worked: fork the
  *topmost* patch, not the next unapplied patch. Adapt the
  test suite accordingly.
  + Add flag to backup-files.c to make sure that files in the
  working tree have a link count of at most one. Use this where
  + Fix a bug in `quilt snapshot': Taking snapshots caused files
  to get link counts bigger than one, so modifying them could
  cause multiple files to get modified. Speed up the command,
  + Update the documentation. Add example1.test from the
  + Change `quilt import' to allow importing multiple patches
  at once.
  + Update to version 0.32.
* Wed Mar 10 2004
- Quilt push/pop: exit with a non-zero status when beyond series.
- Ignore empty lines in series file.
- Add man page to tarball and to spec file; add make dependencies.
- Sort the commands in the man page command reference.
- Add completion to the edit command in bash
- Add a man page (generated automatically from -h)
- Sub-directory support: `quilt setup' could get confused, too.
* Tue Mar 09 2004
- Fix typo: use chmod instead of chown...
* Fri Mar 05 2004
- Make files writeable in `quilt add' (and `quilt edit') for
  working with read-only trees.
* Fri Feb 20 2004
- Sub-directory support:
  + Fix another bug that triggers when /patches exists.
  + Working in sub-directories: Force `quilt new' to always create
  the new patch in the current working directory even if there
  is a patches/ sub-directory further up the directory tree.
  This should restore the behavior from before Jan 28 very well.
- quilt files, diff, refresh: Sort the files in the patch
- Update to version 0.31.
* Wed Feb 04 2004
- Add --quiltrc={rcfile|-} option. Remove some superfluous quoting
  from quilt wrapper.
- Extra tests in `quilt refresh' did not check if the old patch
  was missing.
* Mon Feb 02 2004
- Update from CVS (several improvements and fixes).
* Wed Jan 28 2004
- Fix bugs introduced while merging Chris's patch.
- Update to version 0.30.
* Wed Jan 28 2004
- Patch from Chris Mason <>: Add support for working
  in subdirectories of the base directory that contains patches/
  and .pc/. In the unlikely case that quilt shall operate in the
  sub-directory itself, it is sufficient to create a patches/
  directory there.
- Add a small testcase for subdirectory support.
* Sun Jan 25 2004
- Add QUILT_PATCH_OPTS setting.
* Wed Jan 21 2004
- Add QUILT_NO_DIFF_TIMESTAMPS option in .quiltrc.
* Thu Jan 08 2004
- Also accept `quilt diff -z ./file' (ignore the ./ prefix that
  is often produced by find etc.)
* Wed Dec 24 2003
- Minor documentation tweak.
* Thu Nov 27 2003
- `quilt fold' did not create directories for additional files,
  and the code for recovering from failures was wrong.
* Wed Nov 26 2003
- Update from CVS.
* Tue Nov 25 2003
- Error check for `quilt diff -z filelist' was too strict; relax.
- Add sample.quiltrc file in /usr/share/doc/packages/quilt.
- Update quilt paper.
* Mon Nov 17 2003
- Update from CVS: Adds fold command; minor fixes and cleanups.
* Wed Nov 12 2003
- Update to version 0.29 (adds quilt.pdf, Introduction to Quilt).
* Tue Nov 04 2003
- cvs.diff: Fix check for modified patches in `quilt pop'.
* Sat Nov 01 2003
- Update to version 0.28.
* Tue Oct 28 2003
- Update to version 0.27.
* Tue Oct 28 2003
- Update to remove-pc-files-3.diff patch (minor fixes).
* Mon Oct 27 2003
- Update to remove-pc-files-2.diff patch (minor fixes).
* Mon Oct 27 2003
- Sync with CVS:
  + Add `quilt edit' command.
  + Get rid of patches_per_file cache.
- Add remove-pc-files.diff patch.
* Sun Oct 26 2003
- Get rid of patches_per cache_in `quilt patches'. Remove
  patches_per_file and associated functions. `quilt patches'
  now is a bit slow for unapplied patches.
* Sun Oct 26 2003
- Rename snapshot directory from ".snap0" to ".snap".
- `quilt diff: Speed up file list generation in `quilt diff'.
  Don't use modified_files anymore. Instead, add first_modified_by
  function. I want to get rid of the patches_per_file cache;
  it sometimes was not brought up to date. Some cleanups.
- Add test/snapshot.test.
- Fix two errors in the date format in quilt.changes.
* Thu Oct 23 2003
- `quilt add': Return exit code 2 when a file has already been
- Add `quilt edit' command: Does a `quilt add' and then invokes
  $EDITOR (fallback is `vi'). Files that don't exist after editing
  are again removed from the patch.
* Wed Oct 22 2003
- Change semantics of `quilt fork', and fix a bug in updating the
  series file.
* Tue Oct 21 2003
- Update to version 0.26. This adds `quilt fork' and
  `quilt snapshot'.
* Tue Sep 02 2003
- Pipe rpmbuild output to /dev/null in spec2series (seems to be
  necessary since rpm4).
* Mon Jul 28 2003
- Remove obsolete #neededforbuild entry bash-completion.
* Sun Jul 27 2003
- Update to version 0.24 + cvs.
- Install /etc/bash_completions.d/quilt.
* Wed Jun 11 2003
- Use %%{find_lang} macro
* Fri May 16 2003
- Include recent changes from CVS head.
* Fri Apr 11 2003
- Include recent changes from CVS head.
* Mon Apr 07 2003
- Include head -1 / tail -1 fixes from CVS head.
* Mon Mar 24 2003
- Include recent CVS changes.
* Fri Feb 14 2003
- Initial package.