--- quilt-0.44.orig/quilt/old +++ quilt-0.44/quilt/old @@ -0,0 +1,385 @@ +#! @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 + +setup_colors + +usage() +{ + printf $"Usage: quilt push [-afqv] [--leave-rejects] [--interactive] [--color[=always|auto|never]] [num|patch]\n" + if [ x$1 = x-h ] + then + printf $" +Apply patch(es) from the series file. Without options, the next patch +in the series file is applied. When a number is specified, apply the +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. + +-a Apply all patches in the series file. + +-f Force apply, even if the patch has rejects. + +-q Quiet operation. + +-v Verbose operation. + +--leave-rejects + Leave around the reject files patch produced, even if the patch + is not actually applied. + +--interactive + Allow the patch utility to ask how to deal with conflicts. If + this option is not given, the -f option will be passed to the + patch program. + +--color[=always|auto|never] + Use syntax coloring. +" + exit 0 + else + exit 1 + fi +} + +interrupt() +{ + rollback_patch $1 + printf $"Interrupted by user; patch %s was not applied.\n" \ + "$(print_patch $patch)" >&2 + exit 1 +} + +colorize() +{ + if [ -n "$opt_color" ]; then + awk ' + { if (/FAILED|hunks? ignored|can'\''t find file|file .* already exists/) + print "'$color_patch_fail'" $0 "'$color_clear'" + else if (/is already applied$/) + print "'$color_patch_applied'" $0 "'$color_clear'" + else if (/^Hunk/) { + sub(/^Hunk .* with fuzz [0-9]*/, + "'$color_patch_fuzz'&'$color_clear'") + sub(/offset -?[0-9]* lines?/, + "'$color_patch_offs'&'$color_clear'") + print + } else + print + }' + else + cat + fi +} + +push_patch_args() +{ + local patch=$1 + + if [ -z "$opt_reverse" ] + then + patch_args "$patch" + else + set -- $(patch_args "$patch") + if [ "${*#-R}" != "$*" ] + then + echo "${*#-R}" + else + echo "$*" -R + fi + fi +} + +apply_patch() +{ + local patch=$1 patch_file=$2 + local output + + [ -s $patch_file ] || return 0 + + if [ "${patch_file:(-3)}" = ".gz" ] + then + gzip -cd $patch_file \ + | patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \ + --backup --prefix="$QUILT_PC/$patch/" \ + $no_reject_files \ + -E $silent $force_apply 2>&1 + elif [ "${patch_file:(-4)}" = ".bz2" ] + then + bzip2 -cd $patch_file \ + | patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \ + --backup --prefix="$QUILT_PC/$patch/" \ + $no_reject_files \ + -E $silent $force_apply 2>&1 + else + patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \ + --backup --prefix="$QUILT_PC/$patch/" \ + $no_reject_files \ + -E $silent $force_apply -i $patch_file 2>&1 + fi +} + +rollback_patch() +{ + local patch=$1 + + $QUILT_DIR/scripts/backup-files $silent_unless_verbose -r -B $QUILT_PC/$patch/ - +} + +cleanup_patch_output() { + if [ -z "$opt_leave_rejects" ] + then + if [ -n "$opt_quiet" ]; then + # In this case, patch does not allow us to find out + # which file contains the rejects; it only tells us + # which reject file is used. We use a single temporary + # reject file, so this does not help us. + + awk ' + { gsub(/ -- saving rejects to (file )?.*/, "") } + { print } + ' + else + awk ' + /^patching file / { filename = substr($0, 15) } + { gsub(/ -- saving rejects to (file )?.*/, + " -- rejects in file " filename) } + { print } + ' + fi + else + cat + fi +} + +add_patch() +{ + local patch=$1 + local patch_file=$(patch_file_name $patch) + local file status tmp + + printf $"Applying patch %s\n" "$(print_patch $patch)" + trap "interrupt $patch" SIGINT + + no_reject_files= + if [ -z "$opt_leave_rejects" ]; then + tmp="$(gen_tempfile)" + 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 + + [ -n "$tmp" ] && rm -f $tmp + + if [ $status -eq 0 -o -n "$opt_force" ] + then + add_to_db $patch + if [ $status -eq 0 ] + then + rm -f $QUILT_PC/$patch~refresh + else + touch $QUILT_PC/$patch~refresh + fi + + if [ -e "$QUILT_PC/$patch" ] + then + touch $QUILT_PC/$patch/.timestamp + fi + + 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/"*)" ] + then + printf $"Patch %s appears to be empty; applied\n" \ + "$(print_patch $patch)" + elif [ $status -ne 0 ] + then + printf $"Applied patch %s (forced; needs refresh)\n" \ + "$(print_patch $patch)" + fi + else + rollback_patch $patch + tmp="$(gen_tempfile)" + no_reject_files="-r $tmp" + opt_reverse=1 + if apply_patch $patch "$patch_file" > /dev/null 2> /dev/null + then + printf $"Patch %s can be reverse-applied\n" \ + "$(print_patch "$patch")" + else + printf $"Patch %s does not apply (enforce with -f)\n" \ + "$(print_patch $patch)" + fi + rollback_patch $patch + rm -f $tmp + status=1 + fi + trap - SIGINT + return $status +} + +list_patches() +{ + local top=$(top_patch) n=0 patch + if [ -n "$top" ] + then + patches_after $top + else + cat_series + fi \ + | if [ -n "$opt_all" ] + then + cat + else + while read patch + do + if [ -n "$number" ] + then + if [ $n -eq $number ] + then + break + fi + n=$[$n+1] + fi + echo "$patch" + if [ -z "$number" -a "$patch" = "$stop_at_patch" ] + then + break + fi + done + fi +} + +options=`getopt -o fqvah --long leave-rejects,interactive,color:: -- "$@"` + +if [ $? -ne 0 ] +then + usage +fi + +eval set -- "$options" + +while true +do + case "$1" in + -f) + opt_force=1 + shift ;; + -q) + opt_quiet=1 + shift ;; + -v) + opt_verbose=1 + shift ;; + -a) + opt_all=1 + shift ;; + -h) + usage -h ;; + --leave-rejects) + opt_leave_rejects=1 + shift ;; + --interactive) + opt_interactive=1 + shift ;; + --color) + case "$2" in + "" | always) + opt_color=1 ;; + auto | tty) + opt_color= + [ -t 1 ] && opt_color=1 ;; + never) + opt_color= ;; + *) + usage ;; + esac + shift 2 ;; + --) + shift + break ;; + esac +done + +if [ $# -gt 1 -o \( -n "$opt_all" -a $# -ne 0 \) ] +then + usage +fi + +if [ $# -eq 1 ] +then + if is_numeric $1 + then + number=$1 + else + stop_at_patch="$1" + fi +else + [ -z "$opt_all" ] && number=1 +fi + +stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit $? + +[ -n "$opt_quiet" ] && silent=-s +[ -z "$opt_verbose" ] && silent_unless_verbose=-s +[ -z "$opt_interactive" ] && force_apply=-f +[ -n "$opt_force" ] && opt_leave_rejects=1 + +top=$(top_patch) +if [ -n "$top" -a -e $QUILT_PC/$top~refresh ] +then + printf $"The topmost patch %s needs to be refreshed first.\n" \ + "$(print_patch $top)" + exit 1 +fi + +patches=$(list_patches) +create_db +for patch in $patches +do + if ! add_patch $patch + then + exit 1 + fi + [ -n "$opt_quiet" ] || echo +done \ +| cleanup_patch_output \ +| colorize + +if [ ${PIPESTATUS[0]} -eq 0 ]; then + set -- $patches + printf $"Now at patch %s\n" "$(print_patch ${!#})" +else + exit 1 +fi +### Local Variables: +### mode: shell-script +### End: +# vim:filetype=sh --- quilt-0.44.orig/po/quilt.pot +++ quilt-0.44/po/quilt.pot @@ -512,27 +512,27 @@ "\tAppend a recipient to the To, Cc, or Bcc header.\n" msgstr "" -#: quilt/mail.in:166 +#: quilt/mail.in:176 msgid "Could not determine the envelope sender address. Please use --sender." msgstr "" -#: quilt/mail.in:304 +#: quilt/mail.in:314 msgid "Unable to extract a subject header from %s\\n" msgstr "" -#: quilt/mail.in:327 +#: quilt/mail.in:337 msgid "Patches %s have duplicate subject headers.\\n" msgstr "" -#: quilt/mail.in:369 +#: quilt/mail.in:379 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "" -#: quilt/mail.in:372 +#: quilt/mail.in:382 msgid "Introduction has no subject header\\n" msgstr "" -#: quilt/mail.in:462 +#: quilt/mail.in:472 msgid "Introduction saved as %s\\n" msgstr "" @@ -641,7 +641,7 @@ msgid "No patches applied\\n" msgstr "" -#: quilt/pop.in:273 quilt/push.in:371 +#: quilt/pop.in:273 quilt/push.in:378 msgid "Now at patch %s\\n" msgstr "" @@ -701,27 +701,31 @@ msgid "Applying patch %s\\n" msgstr "" -#: quilt/push.in:209 +#: quilt/push.in:188 quilt/scripts/patchfns.in:577 +msgid "Patch %s does not exist\\n" +msgstr "" + +#: quilt/push.in:216 msgid "Patch %s does not exist; applied empty patch\\n" msgstr "" -#: quilt/push.in:213 +#: quilt/push.in:220 msgid "Patch %s appears to be empty; applied\\n" msgstr "" -#: quilt/push.in:217 +#: quilt/push.in:224 msgid "Applied patch %s (forced; needs refresh)\\n" msgstr "" -#: quilt/push.in:227 +#: quilt/push.in:234 msgid "Patch %s can be reverse-applied\\n" msgstr "" -#: quilt/push.in:230 +#: quilt/push.in:237 msgid "Patch %s does not apply (enforce with -f)\\n" msgstr "" -#: quilt/push.in:351 +#: quilt/push.in:358 msgid "The topmost patch %s needs to be refreshed first.\\n" msgstr "" @@ -899,10 +903,6 @@ msgid "File series fully applied, ends at patch %s\\n" msgstr "" -#: quilt/scripts/patchfns.in:577 -msgid "Patch %s does not exist\\n" -msgstr "" - #: quilt/scripts/patchfns.in:832 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " --- quilt-0.44.orig/po/fr.po +++ quilt-0.44/po/fr.po @@ -783,28 +783,28 @@ "\tAjoute un destinataire dans le champ d'en-tte A, Copie ou Copie\n" "\tcache, respectivement.\n" -#: quilt/mail.in:166 +#: quilt/mail.in:176 msgid "Could not determine the envelope sender address. Please use --sender." msgstr "Impossible de dterminer l'adresse d'expditeur. Utilisez --sender." -#: quilt/mail.in:304 +#: quilt/mail.in:314 msgid "Unable to extract a subject header from %s\\n" msgstr "Impossible d'extraire une ligne de sujet de %s\\n" -#: quilt/mail.in:327 +#: quilt/mail.in:337 msgid "Patches %s have duplicate subject headers.\\n" msgstr "Les patches %s ont des sujets dupliqus.\\n" -#: quilt/mail.in:369 +#: quilt/mail.in:379 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "" "L'introduction n'a pas de ligne de sujet (sauvegard en tant que %s)\\n" -#: quilt/mail.in:372 +#: quilt/mail.in:382 msgid "Introduction has no subject header\\n" msgstr "L'introduction ne contient pas de ligne de sujet\\n" -#: quilt/mail.in:462 +#: quilt/mail.in:472 msgid "Introduction saved as %s\\n" msgstr "Introduction sauvegarde en tant que %s\\n" @@ -957,7 +957,7 @@ msgid "No patches applied\\n" msgstr "Aucun patch n'est appliqu\\n" -#: quilt/pop.in:273 quilt/push.in:371 +#: quilt/pop.in:273 quilt/push.in:378 msgid "Now at patch %s\\n" msgstr "Le patch %s est maintenant au sommet\\n" @@ -1054,28 +1054,32 @@ msgid "Applying patch %s\\n" msgstr "Application de %s\\n" -#: quilt/push.in:209 +#: quilt/push.in:188 quilt/scripts/patchfns.in:577 +msgid "Patch %s does not exist\\n" +msgstr "Le patch %s n'existe pas\\n" + +#: quilt/push.in:216 msgid "Patch %s does not exist; applied empty patch\\n" msgstr "Le patch %s n'existe pas ; patch vide appliqu\\n" -#: quilt/push.in:213 +#: quilt/push.in:220 msgid "Patch %s appears to be empty; applied\\n" msgstr "Le patch %s semble vide. Il a t appliqu.\\n" -#: quilt/push.in:217 +#: quilt/push.in:224 msgid "Applied patch %s (forced; needs refresh)\\n" msgstr "%s a t appliqu (forc ; vous devriez le rafrachir)\\n" -#: quilt/push.in:227 +#: quilt/push.in:234 msgid "Patch %s can be reverse-applied\\n" msgstr "Le patch %s peut tre appliqu l'envers\\n" -#: quilt/push.in:230 +#: quilt/push.in:237 msgid "Patch %s does not apply (enforce with -f)\\n" msgstr "" "Le patch %s ne s'applique pas proprement (forcez l'application avec -f)\\n" -#: quilt/push.in:351 +#: quilt/push.in:358 msgid "The topmost patch %s needs to be refreshed first.\\n" msgstr "Le patch au sommet %s doit tre rafraichi au pralable.\\n" @@ -1316,10 +1320,6 @@ msgid "File series fully applied, ends at patch %s\\n" msgstr "La srie est compltement applique. Le dernier patch est %s.\\n" -#: quilt/scripts/patchfns.in:577 -msgid "Patch %s does not exist\\n" -msgstr "Le patch %s n'existe pas\\n" - #: quilt/scripts/patchfns.in:832 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " --- quilt-0.44.orig/po/de.po +++ quilt-0.44/po/de.po @@ -776,28 +776,28 @@ "--to, --cc, --bcc\n" "\tFüre einen Empfänger an die To, Cc, or Bcc-Kopfzeilen an.\n" -#: quilt/mail.in:166 +#: quilt/mail.in:176 msgid "Could not determine the envelope sender address. Please use --sender." msgstr "" "Konnte die Envelope-Adresse nicht feststellen. Bitte verwenden Sie --sender." -#: quilt/mail.in:304 +#: quilt/mail.in:314 msgid "Unable to extract a subject header from %s\\n" msgstr "Konnte keine Subject-Kopfzeile aus %s extrahieren\\n" -#: quilt/mail.in:327 +#: quilt/mail.in:337 msgid "Patches %s have duplicate subject headers.\\n" msgstr "Die Patches %s haben die selben Subject-Kopfzeilen.\\n" -#: quilt/mail.in:369 +#: quilt/mail.in:379 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "Die Einleitung hat keine Subject-Kopfzeile (gespeichert als %s)\\n" -#: quilt/mail.in:372 +#: quilt/mail.in:382 msgid "Introduction has no subject header\\n" msgstr "Die Einleitung hat keine Subject-Kopfzeile\\n" -#: quilt/mail.in:462 +#: quilt/mail.in:472 msgid "Introduction saved as %s\\n" msgstr "Einleitung gespeichert als %s\\n" @@ -945,7 +945,7 @@ msgid "No patches applied\\n" msgstr "Keine Patches angewandt\\n" -#: quilt/pop.in:273 quilt/push.in:371 +#: quilt/pop.in:273 quilt/push.in:378 msgid "Now at patch %s\\n" msgstr "Jetzt in Patch %s\\n" @@ -1035,27 +1035,31 @@ msgid "Applying patch %s\\n" msgstr "Wende Patch %s an\\n" -#: quilt/push.in:209 +#: quilt/push.in:188 quilt/scripts/patchfns.in:577 +msgid "Patch %s does not exist\\n" +msgstr "Patch %s existiert nicht\\n" + +#: quilt/push.in:216 msgid "Patch %s does not exist; applied empty patch\\n" msgstr "Patch %s existiert nicht; wende leeren patch an\\n" -#: quilt/push.in:213 +#: quilt/push.in:220 msgid "Patch %s appears to be empty; applied\\n" msgstr "Patch %s scheint leer zu sein; angewandt\\n" -#: quilt/push.in:217 +#: quilt/push.in:224 msgid "Applied patch %s (forced; needs refresh)\\n" msgstr "Patch %s angewandt (erzwungen, muss aufgefrischt werden (Refresh))\\n" -#: quilt/push.in:227 +#: quilt/push.in:234 msgid "Patch %s can be reverse-applied\\n" msgstr "Patch %s kann verkehrt angewandt werden\\n" -#: quilt/push.in:230 +#: quilt/push.in:237 msgid "Patch %s does not apply (enforce with -f)\\n" msgstr "Patch %s lässt sich nicht anwenden (erzwingen mit -f)\\n" -#: quilt/push.in:351 +#: quilt/push.in:358 msgid "The topmost patch %s needs to be refreshed first.\\n" msgstr "Der oberste Patch %s muss zuerst aufgefrischt werden (Refresh).\\n" @@ -1301,10 +1305,6 @@ msgid "File series fully applied, ends at patch %s\\n" msgstr "series-Datei vollständig angewandt, endet in Patch %s\\n" -#: quilt/scripts/patchfns.in:577 -msgid "Patch %s does not exist\\n" -msgstr "Patch %s existiert nicht\\n" - #: quilt/scripts/patchfns.in:832 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " --- quilt-0.44.orig/po/ja.po +++ quilt-0.44/po/ja.po @@ -753,29 +753,29 @@ "--to, --cc, --bcc\n" "\tToやCC、BCCへの受信者の追加。\n" -#: quilt/mail.in:166 +#: quilt/mail.in:176 msgid "Could not determine the envelope sender address. Please use --sender." msgstr "" "エンベロープの送信者アドレスを確定できませんでした。--senderオプション\n" "を使用してください。" -#: quilt/mail.in:304 +#: quilt/mail.in:314 msgid "Unable to extract a subject header from %s\\n" msgstr "%s から件名を取り出せません。\\n" -#: quilt/mail.in:327 +#: quilt/mail.in:337 msgid "Patches %s have duplicate subject headers.\\n" msgstr "パッチ %s の件名が重複しています。\\n" -#: quilt/mail.in:369 +#: quilt/mail.in:379 msgid "Introduction has no subject header (saved as %s)\\n" msgstr "序文に件名がありません(%s として保存されました)\\n" -#: quilt/mail.in:372 +#: quilt/mail.in:382 msgid "Introduction has no subject header\\n" msgstr "序文に件名がありません\\n" -#: quilt/mail.in:462 +#: quilt/mail.in:472 msgid "Introduction saved as %s\\n" msgstr "序文は %s という名前で保存されました\\n" @@ -923,7 +923,7 @@ msgid "No patches applied\\n" msgstr "適用されているパッチはありません\\n" -#: quilt/pop.in:273 quilt/push.in:371 +#: quilt/pop.in:273 quilt/push.in:378 msgid "Now at patch %s\\n" msgstr "現在位置はパッチ %s です\\n" @@ -1015,28 +1015,32 @@ msgid "Applying patch %s\\n" msgstr "パッチ %s を適用しています\\n" -#: quilt/push.in:209 +#: quilt/push.in:188 quilt/scripts/patchfns.in:577 +msgid "Patch %s does not exist\\n" +msgstr "パッチ %s が存在しません\\n" + +#: quilt/push.in:216 msgid "Patch %s does not exist; applied empty patch\\n" msgstr "パッチ %s は存在しません。空のパッチを適用しました\\n" -#: quilt/push.in:213 +#: quilt/push.in:220 msgid "Patch %s appears to be empty; applied\\n" msgstr "パッチ %s は空のようですが、適用しました\\n" -#: quilt/push.in:217 +#: quilt/push.in:224 msgid "Applied patch %s (forced; needs refresh)\\n" msgstr "" "パッチ %s を適用しました (強制適用したために、リフレッシュが必要です)\\n" -#: quilt/push.in:227 +#: quilt/push.in:234 msgid "Patch %s can be reverse-applied\\n" msgstr "パッチ %s は、反転して適用することができます\\n" -#: quilt/push.in:230 +#: quilt/push.in:237 msgid "Patch %s does not apply (enforce with -f)\\n" msgstr "パッチ %s が適用できません (強制適用する場合は -fを付けてください)\\n" -#: quilt/push.in:351 +#: quilt/push.in:358 msgid "The topmost patch %s needs to be refreshed first.\\n" msgstr "最上位パッチのリフレッシュが最初に必要です。\\n" @@ -1272,10 +1276,6 @@ msgstr "" "seriesファイルのパッチはすべて適用されています。最終パッチは %s です。\\n" -#: quilt/scripts/patchfns.in:577 -msgid "Patch %s does not exist\\n" -msgstr "パッチ %s が存在しません\\n" - #: quilt/scripts/patchfns.in:832 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " --- quilt-0.44.orig/test/symlink_pc.test.ignoreme +++ quilt-0.44/test/symlink_pc.test.ignoreme @@ -0,0 +1,183 @@ +This test is very similar to one.test, except that it uses a symlinked .pc +directory. + + $ rm -rf d pc + $ mkdir -p d/patches pc + $ cd d + $ ln -s ../pc .pc + $ mkdir dir + $ echo "This is file one." > dir/file1 + $ quilt new patch1.diff + > Patch %{P}patch1.diff is now on top + + $ quilt add dir/file1 + > File dir/file1 added to patch %{P}patch1.diff + + $ quilt add file2 + > File file2 added to patch %{P}patch1.diff + + $ quilt diff + $ quilt diff -z + $ quilt refresh + > Nothing in patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ echo "This is file two." > file2 + $ quilt diff + > Index: d/file2 + > =================================================================== + > --- /dev/null + > +++ d/file2 + > @@ -0,0 +1 @@ + > +This is file two. + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt diff -z + > Index: d/file2 + > =================================================================== + > --- /dev/null + > +++ d/file2 + > @@ -0,0 +1 @@ + > +This is file two. + + $ quilt refresh + > Refreshed patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt diff -z + $ echo "Another line has been added." >> dir/file1 + $ quilt diff -z + > Index: d/dir/file1 + > =================================================================== + > --- d.orig/dir/file1 + > +++ d/dir/file1 + > @@ -1 +1,2 @@ + > This is file one. + > +Another line has been added. + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt diff -z dir/file1 + > Index: d/dir/file1 + > =================================================================== + > --- d.orig/dir/file1 + > +++ d/dir/file1 + > @@ -1 +1,2 @@ + > This is file one. + > +Another line has been added. + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt refresh + > Refreshed patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt new patch2.diff + > Patch %{P}patch2.diff is now on top + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt add dir/file3 + > File dir/file3 added to patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ echo "This is file three." > dir/file3 + $ quilt refresh + > Refreshed patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt add -P patch1 dir/file3 + > File dir/file3 modified by patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt pop -R + > Removing patch %{P}patch2.diff + > Removing dir/file3 + > + > Now at patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt add file4 + > File file4 added to patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ echo "This is file 4." > file4 + $ quilt refresh + > Refreshed patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt push + > Applying patch %{P}patch2.diff + >~ patching file `?dir/file3'? + > + > Now at patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt new subdir/patch3.diff + > Patch %{P}subdir/patch3.diff is now on top + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt add file4 + > File file4 added to patch %{P}subdir/patch3.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ rm file4 + $ quilt diff + > Index: d/file4 + > =================================================================== + > --- d.orig/file4 + > +++ /dev/null + > @@ -1 +0,0 @@ + > -This is file 4. + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt add -P patch2 file4 + > File file4 modified by patch %{P}subdir/patch3.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt refresh + > Refreshed patch %{P}subdir/patch3.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ echo "Another line here, too." >> dir/file3 + $ quilt refresh patch2 + > Refreshed patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ echo "Another line added." >> file2 + $ quilt diff -z -P patch1 + > Index: d/file2 + > =================================================================== + > --- d.orig/file2 + > +++ d/file2 + > @@ -1 +1,2 @@ + > This is file two. + > +Another line added. + > Warning: more recent patches modify files in patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt refresh patch1 + > More recent patches modify files in patch %{P}patch1.diff. Enforce refresh with -f. + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt refresh -f patch1 + > Refreshed patch %{P}patch1.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ echo "Another line here, too." >> dir/file3 + $ quilt pop -R + > Removing patch %{P}subdir/patch3.diff + > Restoring file4 + > + > Now at patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt refresh patch2 + > Refreshed patch %{P}patch2.diff + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ quilt pop -qaR + > Removing patch %{P}patch2.diff + > Removing patch %{P}patch1.diff + > No patches applied + + $ test -L .pc || echo ".pc isn't a symlink anymore" + $ cd .. +# $ rm -rf d pc --- quilt-0.44.orig/debian/patchsys-quilt.mk +++ quilt-0.44/debian/patchsys-quilt.mk @@ -0,0 +1,125 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright 2003 Martin Quinson +# 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: +# + +# +# 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 + +# DEB_PATCHDIRS: directory containing your source file for patches. +DEB_PATCHDIRS = $(shell pwd)/debian/patches + +# DEB_QUILT_PATCHDIR_LINK +# By default, quilt expects to find the patch files into the /patches directory. +# Since it is often more pleasant to place them into /debian/patches, a link +# is created by this makefile chunk to fix it. +# In the case where you already have a /patches directory in your package, +# redefine this variable to somewhere else, and set QUILT_PATCHES in your +# $HOME/.quiltrc (so that quilt knows where to search for this) +DEB_QUILT_PATCHDIR_LINK = patches + +# Internal variables, do not change it unless you know what you're doing +DEB_QUILT_CMD = cd $(DEB_SRCDIR) && $(if $(DEB_QUILT_PATCHDIR_LINK),QUILT_PATCHES=$(DEB_QUILT_PATCHDIR_LINK)) 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-1) + +evil_patches_that_do_nasty_things := $(shell \ +if lsdiff=`which lsdiff` ; then \ + patchlist=`$(DEB_QUILT_CMD) series \ + | sed 's|^|$(if $(DEB_QUILT_PATCHDIR_LINK),$(DEB_QUILT_PATCHDIR_LINK)/)|' \ + | 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 + + if [ -n "$(DEB_QUILT_PATCHDIR_LINK)" ] ; then \ + if [ -L $(DEB_SRCDIR)/$(DEB_QUILT_PATCHDIR_LINK) ] ; then : ; else \ + (cd $(DEB_SRCDIR); ln -s $(DEB_PATCHDIRS) $(DEB_QUILT_PATCHDIR_LINK)) ; \ + fi ; \ + fi + # 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_SRCDIR)" ] ; then \ + $(DEB_QUILT_CMD) pop -a -R || test $$? = 2 ; \ + fi + if [ -n "$(DEB_QUILT_PATCHDIR_LINK)" ] ; then \ + if [ -L $(DEB_SRCDIR)/$(DEB_QUILT_PATCHDIR_LINK) ] ; then \ + rm $(DEB_SRCDIR)/$(DEB_QUILT_PATCHDIR_LINK) ; \ + fi ; \ + fi + rm -rf $(DEB_SRCDIR)/.pc + rm -f debian/stamp-patch* + +endif --- quilt-0.44.orig/debian/changelog +++ quilt-0.44/debian/changelog @@ -0,0 +1,488 @@ +quilt (0.44-6.1) unstable; urgency=low + + * Non-maintainer upload with permission of the maintainer. + * Fix handling of recursive directory removal in the backup-files + shell script to account for path elements being symlinks instead of + directories. Closes: #364834. + + -- Steve Langasek Fri, 26 May 2006 00:35:14 -0700 + +quilt (0.44-6) unstable; urgency=low + + * Split the debian patch in several ones. Use quilt *when available* + to deal with it. + pbuilds well here. Let's see what the buildd think of it. + + * Avoid infinite loops in backup-files when patching inexistant files. + Thanks to Dan for reporting and sorting the problem out. + (Closes: #366424). + * New patch: test_broken_patches: + Adds test/file-not-found.test pushing a patch touching a inexistant + file (yeah, that's the previous bug) + + -- Martin Quinson Tue, 9 May 2006 08:55:02 +0200 + +quilt (0.44-5) unstable; urgency=low + + * add '--quiltrc /dev/null' to quilt invocations in patchsys-quilt.mk. + (Closes: #362054) + * Make backup-files a shell script instead of a binary, so we can make + quilt arch: all [Steve Langasek, thanks so much] + (Closes: #363659) + * Do run "make check" when building the package. + + -- Martin Quinson Wed, 12 Apr 2006 02:23:27 +0200 + +quilt (0.44-4) unstable; urgency=low + + * Build-depend on diffstat so that diffstat support gets compiled in + (Closes: #361191). + * Register quilt documentation with doc-base [Nicolas François] + (Closes: #344793). + * Ship sample quilt.quiltrc along with the documentation + (Closes: #356249). + + -- Martin Quinson Fri, 7 Apr 2006 22:52:23 +0200 + +quilt (0.44-3) unstable; urgency=low + + * Make sure that quilt returns 2 when there is nothing to do so that + patchsys-quilt.mk works again. Upstream regression since 0.33. + (Closes: #358792). + * Make sure that quilt fails when trying to push a non existant patch (ie + if there is a typo in the serie file) unless -f is provided. + (Closes: #358875). + * Let /etc/mailname override the hostname in the mail command + (Closes: #356348). + + -- Martin Quinson Wed, 22 Mar 2006 16:14:51 +0100 + +quilt (0.44-2) unstable; urgency=low + + * Re-upload as non-native package (stupid me). + + -- Martin Quinson Wed, 22 Mar 2006 09:40:41 +0100 + +quilt (0.44-1) unstable; urgency=low + + * New upstream release (tons of bug fixes, no new major feature). + - bin/guards.in: s/ocnfiguration/configuration/ + (Closes: #341518) + - doc/quilt.1.in: Document common options to all commands + (Closes: #334408) + * Remove spurious ccache suggests (Closes: #354547). + * Rewrite the package description (Closes: #347499). + * Let the manpage make clearer that literal QUILT_COMMAND_ARGS is + not read (Closes: #354997) + * Let the manpage give the exact path to the pdf documentation + (Closes: #352324) + + -- Martin Quinson Tue, 21 Mar 2006 21:29:06 +0100 + +quilt (0.42-2) unstable; urgency=low + + * Add a missing semi-colon in quilt.debbuild.mk (Closes: #343893) + + -- Martin Quinson Fri, 30 Dec 2005 23:43:06 +0100 + +quilt (0.42-1) unstable; urgency=low + + * New upstream release. + - New commands: + annotate: to see which patch modify which line of a file + header: to print or change the patch header + rename: to rename patches + - New options: + {diff,refresh} --no-index: suppress Index: lines in patch + delete -n: delete the next patch after topmost + --version: print the program version + - Rework the german translation (Closes: #313827). + * [Makefile.in]: in Debian, the docdir is /usr/share/doc/quilt, without + the version number. (Closes: #321155) + * Use the full path to /usr/sbin/sendmail (Closes: #318924) + * Add text and html versions of the pdf documentation (Closes: #320294) + Build-dep on hevea and lynx to get it working. Damn, that's huge deps + + -- Martin Quinson Wed, 29 Jun 2005 18:52:42 +0200 + +quilt (0.40-6) unstable; urgency=low + + [patchsys-quilt.mk] + * Don't call update-config after reverting patches. (Closes: #299010) + + -- Martin Quinson Wed, 29 Jun 2005 18:52:42 +0200 + +quilt (0.40-5) unstable; urgency=low + + [Packaging] + * Do not automatically generate debian/control.in since it is now + forbidden by policy. + [quilt.debbuild.mk] + * also cleanup arch cruft from debian dirs (patch stolen from cdbs) + * Pass the -nd flag to wget when fetching upstream source to avoid + by all means creating a dirctory structure. + + -- Martin Quinson Wed, 29 Jun 2005 10:36:57 +0200 + +quilt (0.40-4) unstable; urgency=low + + * Do depend on patchutils only when using cdbs + (dependency moved from control.in to patchsys-quilt.mk) + * quilt.debuild.mk: Also cleanup svn stuff from debian dirs + + -- Martin Quinson Sun, 22 May 2005 11:23:27 +0200 + +quilt (0.40-3) unstable; urgency=low + + * Depend on patchutils (>= 0.2.25) since we use lsdiff -H to fix #295913 + + -- Martin Quinson Fri, 13 May 2005 18:43:23 +0200 + +quilt (0.40-2) unstable; urgency=low + + * Add /usr/share/quilt/quilt.debbuild.mk to ease the build from the cvs + of debian packages using quilt. Read its header for documentation. + + -- Martin Quinson Thu, 12 May 2005 23:02:13 +0200 + +quilt (0.40-1) unstable; urgency=low + + * New upstream version + * Add /usr/share/quilt/quilt.make for the ones not using CDBS. + The "patch" and "unpatch" targets are implemented. + + -- Martin Quinson Wed, 11 May 2005 15:51:51 +0200 + +quilt (0.39-3) unstable; urgency=low + + * Add a word in the man page about how to display compressed pdf files + since this non-bug got reported twice now (Closes: #304848). + + -- Martin Quinson Tue, 26 Apr 2005 16:02:16 +0200 + +quilt (0.39-2) unstable; urgency=low + + * Pass -p $opt_strip_level option to diffstat in refresh command. + (Closes: #298785) + * fixes from upstream cvs: + - Add a missing "exit 1" to quilt/fold.in when no patches are applied. + - typo in graph help message. + + -- Martin Quinson Wed, 23 Mar 2005 11:10:07 +0100 + +quilt (0.39-1) unstable; urgency=low + + * New upstream release. + 0.38 were mostly bugfixes, and those bugs were also reported against + debian package, so I had to steal most of the cvs content already. + 0.39 is also mainly bugfixes. There is a new "mail" command I didn't + test yet. ;) + + * Refuse to add symlinks into patches since we fail to backup them + properly. (Closes: #294424). Will be in 0.40 ;) + * Take care of the lost souls patching their config.* files. + Cdbs updates them automatically. Thanks to Robert Millan for detecting + the issue (in cdbs) and proposing a fix (in quilt). (Closes: #295913). + + This implies a versionned depend on cdbs (>=0.4.27-1) for using packages, + since part of the fix is in there. quilt itself suggests this version. + + -- Martin Quinson Thu, 24 Feb 2005 13:51:10 +0100 + +quilt (0.37-5) unstable; urgency=low + + * Let cdbs track the build-dep automatically. + * Make sure people letting cdbs tracking the builddeps for them will get + the one on quilt when using the quilt patchsys. + Fix upstream bugs: + * Strip out the letters from the bash version before [numerical] comparison + (Closes: #288839) + * Make sure directories are completed with the trailing '/' (for further + completion) where quilt expects a file and refuses any directory. + (Closes: #281256) + + -- Martin Quinson Thu, 6 Jan 2005 07:51:02 +0100 + +quilt (0.37-4) unstable; urgency=low + + * Fix the 'patches' command (print the patch names again). + (Closes: #286293). + + -- Martin Quinson Thu, 23 Dec 2004 14:48:35 +0100 + +quilt (0.37-3) unstable; urgency=low + + * Fix extra trailing space in series file after quilt refresh. + (Closes: #285865) + + -- Martin Quinson Thu, 16 Dec 2004 21:33:54 +0100 + +quilt (0.37-2) unstable; urgency=low + + * Fix a quoting issue in bash_autocompletion. Patch from upstream CVS. + (Closes: #285322) + + -- Martin Quinson Mon, 13 Dec 2004 14:54:25 +0100 + +quilt (0.37-1) unstable; urgency=low + + * New upstream release(s. I missed the 0.36, sorry): + - "quilt new" now work from a sub-dir (instead of creating a new + patches/ dir in the current one). + - allow to list all modified files (within patch ranges). + - japaneese translation. + - touch files after they are restored to not confuse make and friends. + - various bug fixes. + * Fix a bashism in patchsys-quilt.mk (Closes: #275253) + * Useless cleanup in debian/rules (Closes: #268967) + * Acknoledge NMU. Thanks Matt! (Closes: #264053) + * Use my Debian address as maintainer. + * Fix two typos in description. Thanks Matt (Kraii) ! (Closes: #266195) + + -- Martin Quinson Wed, 8 Dec 2004 16:12:21 +0100 + +quilt (0.35-1.1) unstable; urgency=low + + * NMU at maintainer's request + * Add ${shlibs:Depends} to debian/control:Depends (Closes: #264053) + + -- Matt Zimmerman Fri, 6 Aug 2004 18:41:46 -0700 + +quilt (0.35-1) unstable; urgency=low + + * New upstream version. + - bash completion made usable (even out of Debian). + - New configuration variables: QUILT__ARGS amongst others. + - Reintroduction of the diffstat feature (--diffstat option of refresh). + - Setting QUILT_PATCHES_PREFIX asks quilt to display the full path to + the patches instead of the patch names (for copy/paste). + - Ability to specify the type of patch, and the context length (-u, -U + num, -c, and -C num options of diff and refresh). + - Syntax highlighting (--color option of diff). + - Various bug fixes. + + -- Martin Quinson Thu, 15 Jul 2004 15:06:43 -0700 + +quilt (0.34-2) unstable; urgency=low + + * [patchsys-quilt.mk] Fix a stupid bug preventing to work on empty + patch series + + -- Martin Quinson Fri, 11 Jun 2004 10:45:08 -0700 + +quilt (0.34-1) unstable; urgency=low + + * New upstream release. + - Backward compatibility of .pc directory implemented + * Get ride of the now useless big fat warning in NEWS.Debian about that. + * Use the manpage generated by the upstream makefile, and remove the + one embeeded in the debian dir. + + -- Martin Quinson Thu, 10 Jun 2004 16:35:00 -0700 + +quilt (0.33-1) unstable; urgency=low + + * New upstream release. + - Return exit status 2 when commands go beyond the series (push when + already on top, and so on) + - Bunch of bug fixes. + * [patchsys-quilt.mk] quilt return 2 when there was nothing to do. + + -- Martin Quinson Tue, 8 Jun 2004 11:54:58 -0700 + +quilt (0.32-3) unstable; urgency=low + + * push exits 0 when no patch is to be pushed. + + -- Martin Quinson Thu, 3 Jun 2004 08:46:23 -0700 + +quilt (0.32-2) unstable; urgency=low + + * Use relative link for debian/patches. Closes: #242342 + * Specify we want to use gawk since mawk causes trouble. Closes: #251972. + * Add an entry to NEWS.Debian warning about the breakage in opened tree + occuring between 0.30 and 0.32 versions. At least people using + apt-listchanges will be warned about that. It looks like the best we can + do for now. + * pop exits 0 when no patch is to be removed. + + -- Martin Quinson Tue, 1 Jun 2004 11:41:51 -0700 + +quilt (0.32-1) unstable; urgency=low + + * New upstream release. + - It is now possible to use quilt from within sub-directories of the + working tree. Quilt will automatically find the root of the tree. + - New 'graph' command to display neat graphics of patch dependencies. + - 'fork' semantic reverted to previous one: the forked patch is the + topmost one, not the next in the series. + - documentation update. + - man page (provided by your servitor ;) + * Fix a typo in output of setup -l. Closes #236933 + * Rephrase package description. Closes #236221 + + -- Martin Quinson Fri, 19 Mar 2004 10:00:03 -0800 + +quilt (0.30-4) unstable; urgency=low + + * patchsys-quilt.mk: + Various improvements from David Kimdon. Closes: #234449 + - rm debian/stamp-patch in reverse-patches (instead of clean) so that this + target can be called directly. + - Make those rules usable along with the cdbs tarball.mk ones. + - remove a dupplicated useless line + + -- Martin Quinson Wed, 25 Feb 2004 10:22:39 -0800 + +quilt (0.30-3) unstable; urgency=low + + * Add a man page from the upstream CVS. Closes: #219318 + + -- Martin Quinson Mon, 23 Feb 2004 08:43:08 -0800 + +quilt (0.30-2) unstable; urgency=low + + * [debian/control] + - Remove the dependency on bash since it's an essential package. + - Upgrade the dependency on debhelper to (>= 4.1.0) as requested by cdbs. + * [debian/quilt.install] + - Reput quilt.pdf in the package back, and make sure it won't disapear + anymore. + + -- Martin Quinson Mon, 2 Feb 2004 16:45:12 -0800 + +quilt (0.30-1) unstable; urgency=low + + * New upstream release. + * Fix the URL of the project (Closes #223387). + * add a dependency on gawk (Closes #227111). + + -- Martin Quinson Fri, 30 Jan 2004 16:10:23 -0800 + +quilt (0.29-3) unstable; urgency=low + + * force the shell to be bash, since we use tons of bashism + + -- Martin Quinson Mon, 24 Nov 2003 11:24:15 +0100 + +quilt (0.29-2) unstable; urgency=low + + * Add the patchsys-quilt.mk file achieving the integration of quilt within + cdbs. + * Install the upstream changelog under the changelog.gz name. + * Remove several files left over in the debian/ dir. + * Bump standard-version to 3.6.1.0: convert all control files to utf8. + + -- Martin Quinson Mon, 24 Nov 2003 10:24:15 +0100 + +quilt (0.29-1) unstable; urgency=low + + * New upstream version. + * Repackage to use cdbs. + + -- Martin Quinson Thu, 20 Nov 2003 11:04:34 +0100 + +quilt (0.25-4) unstable; urgency=low + + * Various cleanup in the packaging (like removing a `pwd` in the debian/rules) + + -- Martin Quinson Thu, 6 Nov 2003 16:27:15 +0100 + +quilt (0.25-3) unstable; urgency=low + + * Do not invoque autoconf during the build process since I do not change this file. + That way, autobuilder will be happy even without build-depend (Closes: #217055). + + -- Martin Quinson Fri, 31 Oct 2003 00:18:43 +0100 + +quilt (0.25-2) unstable; urgency=low + + * Do not install anything under /usr/share/doc/quilt-version/ + Thanks to Daniel Jacobowitz for reporting that bug. + + -- Martin Quinson Fri, 12 Sep 2003 08:18:29 +0200 + +quilt (0.25-1) unstable; urgency=low + + * New upstream release. + * Set LC_ALL to C during the build so that the README.gz becomes in + english and not french. Thanks to Jan-Benedict Glaw for reporting that + issue. + + -- Martin Quinson Tue, 9 Sep 2003 08:30:52 +0200 + +quilt (0.24-1) unstable; urgency=low + + * New upstream release + * debquilt.mk: Makefile chunk to manage debian packages using quilt + + -- Martin Quinson Thu, 26 Jun 2003 15:26:16 +0200 + +quilt (0.23-1) unstable; urgency=low + + * New upstream release + * Hardcode location of bash + + -- Martin Quinson Wed, 9 Apr 2003 09:54:30 +0200 + +quilt (0.22-1) unstable; urgency=low + + * New upstream release + + -- Martin Quinson Fri, 14 Feb 2003 14:12:31 +0100 + +quilt (0.21-2) unstable; urgency=low + + * Fight lintian warnings and error: + - Format copyright file properly + - Don't depend on essential packages + - Change Build-Depends-Indep: to Build-Depends: since the package is + now arch-dependent. + - Update to lastest standards + * The documentation did move one more time. + + -- Martin Quinson Fri, 31 Jan 2003 09:21:03 +0100 + +quilt (0.21-1) unstable; urgency=low + + * New upstream release. + * Change from architecture: all to architecture: any, since we now have a + compiled C programm. + * Add the new documentation provided. + + -- Martin Quinson Wed, 29 Jan 2003 10:19:31 +0100 + +quilt (0.11-1) unstable; urgency=low + + * New upstream release. New upstream author. Developement moved to savannah. + * Some functionnalities were removed, but all the scripts are much more robust now. + + -- Martin Quinson Sat, 18 Jan 2003 23:36:29 +0100 + +quilt (0.8.1-1) unstable; urgency=low + + * New upstream release + * Should now work if installed in /usr/lib or if unpacked in the current + directory. + + -- Martin Quinson Wed, 11 Dec 2002 09:31:28 +0100 + +quilt (0.8-1) unstable; urgency=low + + * New upstream release + + -- Martin Quinson Wed, 6 Nov 2002 22:48:32 +0100 + +quilt (0.6-1) unstable; urgency=low + + * New upstream release + + -- Martin Quinson Wed, 6 Nov 2002 22:48:32 +0100 + +quilt (0.4-1) unstable; urgency=low + + * Initial Release. + + -- Martin Quinson Tue, 29 Oct 2002 09:29:20 +0100 + +# -*- coding: utf-8 -*- --- quilt-0.44.orig/debian/compat +++ quilt-0.44/debian/compat @@ -0,0 +1 @@ +4 --- quilt-0.44.orig/debian/control +++ quilt-0.44/debian/control @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +Source: quilt +Section: devel +Priority: optional +Maintainer: Martin Quinson +Build-Depends-Indep: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0), gettext, hevea, lynx, gawk, diffstat +Standards-Version: 3.6.1.0 + +Package: quilt +Architecture: all +Depends: patch, diffstat, bzip2, gettext, gawk, ${shlibs:Depends} +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 completely integrates into the CDBS, allowing maintainers + using this new paradigm for their packaging scripts to benefit from the + comfort of quilt when editing their diff against upstream. The package + also provides some basic support those not using CDBS. + . + http://savannah.nongnu.org/projects/quilt is the current best approximation + of an upstream homepage. --- quilt-0.44.orig/debian/copyright +++ quilt-0.44/debian/copyright @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +This package was debianized by Martin Quinson on +Tue, 29 Oct 2002 09:29:20 +0100. + +It was downloaded from: + +https://savannah.nongnu.org/projects/quilt/ + +Upstream Authors: + Andrew Morton + Andreas Gruenbacher + +Copyright: + +These scripts are released under the GPL, available on any Debian box at: +/usr/share/common-licenses/GPL --- quilt-0.44.orig/debian/quilt.debbuild.mk +++ quilt-0.44/debian/quilt.debbuild.mk @@ -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 --- quilt-0.44.orig/debian/quilt.docs +++ quilt-0.44/debian/quilt.docs @@ -0,0 +1,3 @@ +AUTHORS +TODO + --- quilt-0.44.orig/debian/quilt.install +++ quilt-0.44/debian/quilt.install @@ -0,0 +1,14 @@ +etc/bash_completion.d/quilt +usr/bin/* +#usr/lib/quilt/* +usr/share/doc/quilt-*/* usr/share/doc/quilt/ +usr/share/locale/* +usr/share/man/* +usr/share/quilt/* +../quilt.debbuild.mk usr/share/quilt +../quilt.make usr/share/quilt +../patchsys-quilt.mk /usr/share/cdbs/1/rules/ + +../../doc/quilt.html usr/share/doc/quilt +../../doc/quilt.txt usr/share/doc/quilt +../../quilt.quiltrc usr/share/doc/quilt --- quilt-0.44.orig/debian/quilt.make +++ quilt-0.44/debian/quilt.make @@ -0,0 +1,24 @@ +# +# This file tries to mimick /usr/share/dpatch/dpatch.make +# + +# -*- Makefile -*-, you silly Emacs! +# vim: set ft=make: + +# QUILT_STAMPFN: stamp file to use +QUILT_STAMPFN ?= 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 (but it's usefull to break loops in crude scripts) + QUILT_PATCHES=$(QUILT_PATCH_DIR) quilt push -a || test $$? = 2 + touch debian/$(QUILT_STAMPFN) + +unpatch: + QUILT_PATCHES=$(QUILT_PATCH_DIR) quilt pop -a -R || test $$? = 2 + rm -rf .pc debian/$(QUILT_STAMPFN) + --- quilt-0.44.orig/debian/rules +++ quilt-0.44/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- + +# $Id: rules,v 1.15 2005/01/06 19:32:53 mquinson Exp $ + +# Import Common Debian Build System (CDBS). +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk + +# Here is a badly nammed changelog file +DEB_INSTALL_CHANGELOGS_ALL = quilt.changes + +# installing under debian/tmp... +DEB_MAKE_ENVVARS := BUILD_ROOT=$(CURDIR)/debian/tmp LC_ALL=C +DEB_MAKE_CHECK_TARGET = check + +# ... and moving it to the right dir using dh_install +DEB_DH_INSTALL_SOURCEDIR := debian/tmp + +# force awk to be gawk, since mawk causes trouble +# also specify the full path to sendmail, as requested by policy +DEB_CONFIGURE_EXTRA_FLAGS := --with-awk=/usr/bin/gawk --with-mta=/usr/sbin/sendmail + +# distribute a text version of the doc +common-build-indep:: + mkdir doc/tmp || true + cd doc/tmp; LC_ALL=C hevea ../main.tex ; LC_ALL=C hevea ../main.tex; LC_ALL=C hevea ../main.tex + cp doc/tmp/main.html doc/quilt.html + LC_ALL=C perl -e '$$/ = undef; $$f=<>; $$f =~ s|]*?HREF="[^"]*#[^"]*">(.*?)|$$1|msg; print $$f;' < doc/tmp/main.html > doc/tmp/tmp.html + LC_ALL=C lynx doc/tmp/tmp.html -dump > doc/quilt.txt + +clean:: + rm -rf doc/quilt.txt doc/quilt.html doc/tmp test/.pc test/d + +# I fail to see where this comes from, but it lands in the diff if not killed. +clean:: + rm -f compat/awk + +### +### Auto-patching stuff. +### +### Some extra love is needed to use ourselves without builddepending on us. + +post-patches:: apply-patches +clean:: reverse-patches + +#_cdbs_patch_system_apply_rule := apply-patches +#_cdbs_patch_system_unapply_rule := reverse-patches + +QUILTBIN=/usr/bin/quilt +QUILTOPT=--quiltrc debian/quiltrc.build + +apply-patches: pre-build debian/stamp-patched +debian/stamp-patched: + if [ -e $(QUILTBIN) ] ; then \ + $(QUILTBIN) $(QUILTOPT) push -a || test $$? = 2; \ + else \ + echo "WARNING: quilt not installed. DO NOT MODIFY THE PACKAGE WITHOUT INSTALLING QUILT.";\ + echo "building quilt without quilt is good for autobuilders only, not for humans.";\ + list=`cat debian/patches/series|sed 's/#.*$$//'|grep -v '^$$'`; \ + if [ -n "$$list" ] ; then \ + for patch in `echo $$list` ; do \ + patch -p1 < debian/patches/$$patch ; \ + done ; \ + fi ; \ + fi + touch debian/stamp-patched + +reverse-patches: + if [ -e $(QUILTBIN) ] ; then \ + $(QUILTBIN) $(QUILTOPT) pop -a || test $$? = 2; \ + else if [ -e debian/stamp-patched ] ; then \ + echo "WARNING: quilt not installed. DO NOT MODIFY THE PACKAGE WITHOUT INSTALLING QUILT.";\ + echo "building quilt without quilt is good for autobuilders only, not for humans.";\ + list=`cat debian/patches/series|sed 's/#.*$$//'|grep -v '^$$'|tac`; \ + if [ -n "$$list" ] ; then \ + for patch in `echo $$list` ; do \ + patch -p1 -R < debian/patches/$$patch ; \ + done; \ + fi;fi; \ + fi + rm -rf .pc + rm -f debian/stamp-patch* + --- quilt-0.44.orig/debian/patches/arch_all +++ quilt-0.44/debian/patches/arch_all @@ -0,0 +1,469 @@ + * Make backup-files a shell script instead of a binary, so we can make + quilt arch: all [Steve Langasek, thanks so much] + (Closes: #363659) + +Upstream status: Submitted 060427 + +--- + Makefile.in | 25 +--- + quilt/add.in | 2 + quilt/pop.in | 4 + quilt/push.in | 2 + quilt/remove.in | 2 + quilt/scripts/backup-files.in | 245 ++++++++++++++++++++++++++++++++++++++++++ + quilt/snapshot.in | 2 + 7 files changed, 257 insertions(+), 25 deletions(-) + +Index: quilt-0.44/Makefile.in +=================================================================== +--- quilt-0.44.orig/Makefile.in 2006-02-11 14:31:51.000000000 -0800 ++++ quilt-0.44/Makefile.in 2006-05-26 00:33:41.000000000 -0700 +@@ -6,7 +6,6 @@ + prefix := @prefix@ + exec_prefix := @exec_prefix@ + bindir := @bindir@ +-libdir := @libdir@ + datadir := @datadir@ + docdir := @docdir@ + mandir := $(datadir)/man +@@ -81,7 +80,7 @@ + DIRT += $(QUILT_IN:%=quilt/%) + + SCRIPTS_IN := patchfns parse-patch inspect dependency-graph edmail \ +- remove-trailing-ws ++ remove-trailing-ws backup-files + + SCRIPTS_SRC := $(SCRIPTS_IN:%=%.in) + SCRIPTS := $(SCRIPTS_IN) +@@ -92,10 +91,6 @@ + DIRT += $(patsubst %.in,%,$(wildcard compat/*.in)) + + COMPAT := $(COMPAT_PROGRAMS:%=compat/%) $(COMPAT_SYMLINKS:%=compat/%) +-LIB_SRC := backup-files.c +-LIB := backup-files$(EXEEXT) +-SRC += $(LIB_SRC:%=lib/%) +-DIRT += lib/backup-files$(EXEEXT) $(LIB_SRC:%.c=lib/%.o) + + DOC_IN := README + DOC_SRC := $(DOC_IN:%=doc/%.in) +@@ -126,16 +121,13 @@ + # Settings for running the uninstalled version of quilt in the source tree: + PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH) + QUILT_DIR := $(CURDIR)/quilt +-QUILT_LIB := $(CURDIR)/lib + QUILTRC := $(CURDIR)/test/test.quiltrc +-export QUILT_DIR QUILT_LIB QUILTRC ++export QUILT_DIR QUILTRC + + #----------------------------------------------------------------------- + + all : configure scripts compat $(DOC:%=doc/%) $(MAN1) mofiles + +-$(LIB:%=lib/%) :: $(LIBOBJS) +- + ifeq ($(USE_NLS),yes) + mofiles : $(LINGUAS:%=po/%.mo) + else +@@ -149,7 +141,7 @@ + $(MSGMERGE) -o $@ $@ $^ + + scripts : $(BIN:%=bin/%) $(QUILT:%=quilt/%) \ +- $(SCRIPTS:%=quilt/scripts/%) $(LIB:%=lib/%) \ ++ $(SCRIPTS:%=quilt/scripts/%) \ + $(if $(PATCH_WRAPPER),bin/patch-wrapper) + + dist : clean $(PACKAGE)-$(VERSION).tar.gz +@@ -248,8 +240,7 @@ + $(patsubst %.in,%,$(wildcard bin/*.in quilt/*.in quilt/scripts/*.in)) :: Makefile + % :: %.in + @echo "$< -> $@" >&2 +- @$(SED) -e 's:@QUILT_LIB''@:$(libdir)/$(PACKAGE):g' \ +- -e 's:@QUILT_DIR''@:$(datadir)/$(PACKAGE):g' \ ++ @$(SED) -e 's:@QUILT_DIR''@:$(datadir)/$(PACKAGE):g' \ + -e 's:@PERL''@:$(PERL):g' \ + -e 's:@BASH''@:$(BASH):g' \ + -e 's:@PATCH''@:$(PATCH):g' \ +@@ -260,7 +251,7 @@ + $< > $@ + @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@) + +-lib/backup-files.o :: Makefile ++#lib/backup-files.o :: Makefile + + configure : configure.ac + autoconf +@@ -317,9 +308,6 @@ + $(BUILD_ROOT)$(datadir)/$(PACKAGE)/wrapper/patch + endif + +- $(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE) +- $(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/ +- + $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/ + $(INSTALL) -m 644 doc/README \ + $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/ +@@ -361,7 +349,6 @@ + + uninstall :: + rm -rf $(BIN:%=$(BUILD_ROOT)$(bindir)/%) \ +- $(BUILD_ROOT)$(libdir)/$(PACKAGE) \ + $(BUILD_ROOT)$(datadir)/$(PACKAGE) \ + $(patsubst %,$(BUILD_ROOT)$(mandir)/man1/%, \ + $(notdir $(MAN1))) \ +@@ -386,7 +373,7 @@ + + # Include a run-time generated list of dependencies for each test case + test/.depend : Makefile $(TESTS) +- @( printf "%s : bin/quilt quilt/scripts/patchfns $(LIB:%=lib/%) $(COMPAT)\n" $(TESTS); \ ++ @( printf "%s : bin/quilt quilt/scripts/patchfns $(COMPAT)\n" $(TESTS); \ + $(AWK) 'sub(/.*\$$ *quilt /, "") \ + { print FILENAME, ":", "quilt/"$$1}' $(TESTS); \ + $(AWK) 'sub(/.*\&2 + status=1 +Index: quilt-0.44/quilt/pop.in +=================================================================== +--- quilt-0.44.orig/quilt/pop.in 2006-02-14 10:31:44.000000000 -0800 ++++ quilt-0.44/quilt/pop.in 2006-05-26 00:30:21.000000000 -0700 +@@ -167,7 +167,7 @@ + status=0 + else + printf $"Removing patch %s\n" "$(print_patch $patch)" +- $QUILT_LIB/backup-files $silent -r -t -B $QUILT_PC/$patch/ - ++ $QUILT_DIR/scripts/backup-files $silent -r -t -B $QUILT_PC/$patch/ - + status=$? + fi + remove_from_db $patch +@@ -269,7 +269,7 @@ + # of one: This will automatically be the case in the usual + # situations, but we don't want to risk file corruption in weird + # corner cases such as files added to a patch but not modified. +- $QUILT_LIB/backup-files -L -s -B $QUILT_PC/$patch/ - ++ $QUILT_DIR/scripts/backup-files -L -s -B $QUILT_PC/$patch/ - + printf $"Now at patch %s\n" "$(print_patch $patch)" + fi + ### Local Variables: +Index: quilt-0.44/quilt/push.in +=================================================================== +--- quilt-0.44.orig/quilt/push.in 2006-02-14 10:31:44.000000000 -0800 ++++ quilt-0.44/quilt/push.in 2006-05-26 00:33:40.000000000 -0700 +@@ -139,7 +139,7 @@ + { + local patch=$1 + +- $QUILT_LIB/backup-files $silent_unless_verbose -r -B $QUILT_PC/$patch/ - ++ $QUILT_DIR/scripts/backup-files $silent_unless_verbose -r -B $QUILT_PC/$patch/ - + } + + cleanup_patch_output() { +Index: quilt-0.44/quilt/remove.in +=================================================================== +--- quilt-0.44.orig/quilt/remove.in 2006-02-14 10:31:44.000000000 -0800 ++++ quilt-0.44/quilt/remove.in 2006-05-26 00:30:21.000000000 -0700 +@@ -86,7 +86,7 @@ + fi + + # Restore file from backup +- if ! $QUILT_LIB/backup-files -r -t -s -B $QUILT_PC/$patch/ $SUBDIR$file ++ if ! $QUILT_DIR/scripts/backup-files -r -t -s -B $QUILT_PC/$patch/ $SUBDIR$file + then + printf $"Failed to remove file %s from patch %s\n" \ + "$SUBDIR$file" "$(print_patch $patch)" >&2 +Index: quilt-0.44/quilt/snapshot.in +=================================================================== +--- quilt-0.44.orig/quilt/snapshot.in 2006-02-14 10:31:44.000000000 -0800 ++++ quilt-0.44/quilt/snapshot.in 2006-05-26 00:30:21.000000000 -0700 +@@ -85,7 +85,7 @@ + } + { print } + ' \ +-| $QUILT_LIB/backup-files -b -s -L -f - -B "$QUILT_PC/$snap_subdir/" ++| $QUILT_DIR/scripts/backup-files -b -s -L -f - -B "$QUILT_PC/$snap_subdir/" + + ### Local Variables: + ### mode: shell-script +Index: quilt-0.44/quilt/scripts/backup-files.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ quilt-0.44/quilt/scripts/backup-files.in 2006-05-26 00:33:30.000000000 -0700 +@@ -0,0 +1,269 @@ ++#! @BASH@ ++ ++set -e ++ ++# File: backup-files.sh ++ ++# Copyright (C) 2006 Steve Langasek ++# portions Copyright (C) 2003, 2004, 2005, 2006 Andreas Gruenbacher ++# , SuSE Labs ++ ++# 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; version 2 dated June, 1991. ++ ++# 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., 51 Franklin St, Fifth Floor, Boston, ++# MA 02110-1301, USA. ++ ++ ++# Create backup files of a list of files similar to GNU patch. A path ++# name prefix and suffix for the backup file can be specified with the ++# -B and -z options. ++ ++usage () { ++ progname="$1" ++ printf "Usage: %s [-B prefix] [-z suffix] [-f {file|-}] [-s] [-b|-r|-x] [-t] [-L] {file|-} ...\n"\ ++ "\n"\ ++ "\tCreate hard linked backup copies of a list of files\n"\ ++ "\tread from standard input.\n"\ ++ "\n"\ ++ "\t-b\tCreate backup\n"\ ++ "\t-r\tRestore the backup\n"\ ++ "\t-x\tRemove backup files and empty parent directories\n"\ ++ "\t-B\tPath name prefix for backup files\n"\ ++ "\t-z\tPath name suffix for backup files\n"\ ++ "\t-s\tSilent operation; only print error messages\n"\ ++ "\t-f\tRead the filenames to process from file (- = standard input)\n"\ ++ "\t-t\tTouch original files after restore (update their mtimes)\n\n"\ ++ "\t-L\tEnsure that when finished, the source file has a link count of 1\n\n", \ ++ "$progname" ++} ++ ++link_or_copy_file() { ++ from="$1" ++ to="$2" ++ if ! ln "$from" "$to" || [ -d "$to" ]; then ++ cp -dp --remove-destination "$from" "$to" ++ fi ++} ++ ++ensure_nolinks() { ++ filename="$1" ++ ++ link_count=$(stat -c '%h' "$filename") ++ if [ -z "$link_count" ] || [ "$link_count" -gt 1 ]; then ++ dirname=$(dirname "$filename") ++ basename=$(basename "$filename") ++ # Temp file name is "path/to/.file.XXXXXX" ++ tmpname=$(mktemp "${dirname}/.${basename}.XXXXXX") ++ cp -dp "$filename" "$tmpname" ++ mv "$tmpname" "$filename" ++ fi ++} ++ ++process_file() { ++ file="$1" ++ backup="${OPT_PREFIX}${file}${OPT_SUFFIX}" ++ ++ if [ "$OPT_WHAT" == "backup" ]; then ++ if [ -e "$backup" ]; then ++ rm "$backup" ++ else ++ mkdir -p "$(dirname "$backup")" ++ fi ++ if [ ! -e "$file" ]; then ++ $ECHO "New file $file" ++ touch "$backup" ++ chmod 000 "$backup" ++ else ++ $ECHO "Copying $file" ++ link_or_copy_file "$file" "$backup" ++ if [ -n "$OPT_NOLINKS" ]; then ++ ensure_nolinks "$file" ++ fi ++ if [ -n "OPT_TOUCH" ]; then ++ touch "$backup" ++ fi ++ fi ++ elif [ "$OPT_WHAT" == "restore" ]; then ++ mkdir -p "$(dirname "$file")" ++ ++ if [ ! -e "$backup" ]; then ++ return 1 ++ fi ++ if [ ! -s "$backup" ]; then ++ if [ -e "$file" ]; then ++ rm "$file" ++ fi ++ $ECHO "Removing $file" ++ rm "$backup" ++ while [ -d "${backup%/*}" ] && ! [ -L "${backup%/*}" ] ++ do ++ backup="${backup%/*}" ++ rmdir --ignore-fail-on-non-empty "$backup" 2>/dev/null ++ if [ -d "$backup" ]; then ++ break ++ fi ++ done ++ else ++ $ECHO "Restoring $file" ++ if [ -e "$file" ]; then ++ rm "$file" ++ fi ++ link_or_copy_file "$backup" "$file" ++ rm "$backup" ++ while [ -d "${backup%/*}" ] && ! [ -L "${backup%/*}" ] ++ do ++ backup="${backup%/*}" ++ rmdir --ignore-fail-on-non-empty "$backup" 2>/dev/null ++ if [ -d "$backup" ]; then ++ break ++ fi ++ done ++ if [ -n "$OPT_NOLINKS" ]; then ++ ensure_nolinks "$file" ++ fi ++ if [ -n "$OPT_TOUCH" ]; then ++ touch "$file" ++ fi ++ fi ++ elif [ "$OPT_WHAT" == "remove" ]; then ++ if [ -e "$backup" ]; then ++ rm "$backup" ++ fi ++ while [ -d "${backup%/*}" ] && ! [ -L "${backup%/*}" ] ++ do ++ backup="${backup%/*}" ++ rmdir --ignore-fail-on-non-empty "$backup" 2>/dev/null ++ if [ -d "$backup" ]; then ++ break ++ fi ++ done ++ elif [ "$OPT_WHAT" == "noop" ]; then ++ if [ -e "$file" ] && [ -n "$OPT_NOLINKS" ]; then ++ ensure_nolinks "$file" ++ fi ++ else ++ return 1 ++ fi ++} ++ ++walk() { ++ path="$1" ++ if [ ! -f "$path" ]; then ++ return 0 ++ fi ++ ++ if [ "${path#$OPT_PREFIX}" == "$path" ] ++ then ++ # prefix does not match ++ return 0 ++ fi ++ path="${path#$OPT_PREFIX}" ++ ++ if [ -n "$OPT_SUFFIX" ] && [ "${path%$OPT_SUFFIX}" == "$path" ] ++ then ++ # suffix does not match ++ return 0 ++ fi ++ path="${path%$OPT_SUFFIX}" ++ ++ process_file "$path" ++} ++ ++ ++ECHO=echo ++declare -a FILELIST ++progname="$0" ++while [ $# -gt 0 ]; do ++ case $1 in ++ -b) OPT_WHAT=backup ++ ;; ++ -r) OPT_WHAT=restore ++ ;; ++ -x) OPT_WHAT=remove ++ ;; ++ -B) OPT_PREFIX=$2 ++ shift ++ ;; ++ -f) OPT_FILE=$2 ++ shift ++ ;; ++ -z) OPT_SUFFIX=$2 ++ shift ++ ;; ++ -s) ECHO=: ++ ;; ++ -L) OPT_NOLINKS=1 ++ ;; ++ -t) OPT_TOUCH=1 ++ ;; ++ -?*) usage "$progname" ++ exit 0 ++ ;; ++ *) FILELIST=($1) ++ ;; ++ esac ++ ++ shift ++done ++ ++if [ -z "${OPT_PREFIX}${OPT_SUFFIX}" ]; then ++ usage "$progname" ++ exit 1 ++fi ++if [ ${#FILELIST[@]} == 0 ] && [ -z "$OPT_FILE" ]; then ++ usage "$progname" ++ exit 1 ++fi ++ ++if [ -n "$OPT_FILE" ]; then ++ cat "$OPT_FILE" \ ++ | while read nextfile; do ++ process_file "$nextfile" ++ done ++fi ++ ++I=0 ++while [ $I -lt ${#FILELIST[@]} ]; do ++ ++ case "${FILELIST[$I]}" in ++ -) ++ path="${OPT_PREFIX%/*}" ++ if ! [ -n "$path" ] && [ -d "$path" ] ; then ++ I=$(($I+1)) ++ continue ++ fi ++ ++ find "$path" -mindepth 1 \( -type f -o -type d \) -print 2>/dev/null \ ++ | while read ++ do ++ if [ -d "$REPLY" ] ++ then ++ if ! [ -r "$REPLY" ] || ! [ -x "$REPLY" ] ++ then ++ echo "$REPLY: Permission denied" ++ exit 1 ++ fi ++ else ++ walk "$REPLY" ++ fi ++ done ++ if [ $? != 0 ]; then ++ exit 1 ++ fi ++ ;; ++ *) ++ process_file "${FILELIST[$I]}" ++ ;; ++ esac ++ ++ I=$(($I+1)) ++done --- quilt-0.44.orig/debian/patches/series +++ quilt-0.44/debian/patches/series @@ -0,0 +1,9 @@ +arch_all +debianize +fail_on_missing +return2 +mailname +testsuite_cleanups +doc_improvement +makefile_glitche +test_broken_patches --- quilt-0.44.orig/debian/patches/mailname +++ quilt-0.44/debian/patches/mailname @@ -0,0 +1,30 @@ + * Let /etc/mailname override the hostname in the mail command + (Closes: #356348) + +Upstream status: Submitted 060427 + +--- + quilt/mail.in | 12 +++++++++++- + 1 files changed, 11 insertions(+), 1 deletion(-) + +--- quilt-0.44.orig/quilt/mail.in ++++ quilt-0.44/quilt/mail.in +@@ -154,7 +154,17 @@ + fi + + if [ -z "$opt_sender" ]; then +- hostname=$(hostname -f 2>/dev/null) ++ hostname=nowhere ++ if [ -e /etc/mailname ] ; ++ then ++ hostname=`cat /etc/mailname` ++ fi ++ ++ if [ "$hostname" = "${hostname/.}" ] ++ then ++ hostname=$(hostname -f 2>/dev/null) ++ fi ++ + if [ "$hostname" = "${hostname/.}" ] + then + hostname=$(hostname) --- quilt-0.44.orig/debian/patches/fail_on_missing +++ quilt-0.44/debian/patches/fail_on_missing @@ -0,0 +1,40 @@ + * Make sure that quilt fails when trying to push a non existant patch (ie + if there is a typo in the serie file) unless -f is provided. + (Closes: #358875). + +Upstream status: they asked for some cleanups, which are done. To be submitted. + +--- + quilt/push.in | 7 +++++++ + test/missing.test | 4 ++++ + 2 files changed, 11 insertions(+) + +--- quilt-0.44.orig/quilt/push.in ++++ quilt-0.44/quilt/push.in +@@ -183,6 +183,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 +--- quilt-0.44.orig/test/missing.test ++++ quilt-0.44/test/missing.test +@@ -7,6 +7,10 @@ + < missing2.diff + + $ quilt push -qa ++ > Patch patches/missing1.diff does not exist ++ > Applying patch patches/missing1.diff ++ ++ $ quilt push -qaf + > Applying patch patches/missing1.diff + > Patch patches/missing1.diff does not exist; applied empty patch + > Applying patch patches/missing2.diff --- quilt-0.44.orig/debian/patches/doc_improvement +++ quilt-0.44/debian/patches/doc_improvement @@ -0,0 +1,23 @@ + * Let the manpage make clearer that literal QUILT_COMMAND_ARGS is + not read (Closes: #354997) + +Upstream status: not submitted + +--- + Makefile.in | 1 + + doc/quilt.1.in | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- quilt-0.44.orig/doc/quilt.1.in ++++ quilt-0.44/doc/quilt.1.in +@@ -141,8 +141,8 @@ + + Upon startup, quilt evaluates the file .quiltrc in the user's home + directory, or the file specified with the --quiltrc option. This file +-is a regular bash script. Default options can be passed to any command +-by defining a QUILT_COMMAND_ARGS variable. For example, ++is a regular bash script. Default options can be passed to any COMMAND ++by defining a QUILT_${COMMAND}_ARGS variable. For example, + QUILT_DIFF_ARGS="--color=auto" causes the output of quilt diff to be + syntax colored when writing to a terminal. + --- quilt-0.44.orig/debian/patches/debianize +++ quilt-0.44/debian/patches/debianize @@ -0,0 +1,32 @@ +Change some little glitches to fit better the Debian conventions. + +Upstream status: not applicable + +--- + Makefile.in | 2 +- + doc/quilt.1.in | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +--- quilt-0.44.orig/Makefile.in ++++ quilt-0.44/Makefile.in +@@ -247,7 +247,7 @@ + -e 's:@VERSION''@:$(VERSION):g' \ + -e 's:@RELEASE''@:$(RELEASE):g' \ + -e 's:@LOCALEDIR''@:$(localedir):g' \ +- -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \ ++ -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g' \ + $< > $@ + @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@) + +--- quilt-0.44.orig/doc/quilt.1.in ++++ quilt-0.44/doc/quilt.1.in +@@ -189,8 +189,7 @@ + + .SH SEE ALSO + +-The pdf documentation, which should be under /usr/share/doc/quilt/quilt.pdf. +-Note that some distributors compress this file. ++The pdf documentation, under /usr/share/doc/quilt/quilt.pdf.gz + .BR zxpdf ( 1 ) + can be used to display compressed pdf files. + --- quilt-0.44.orig/debian/patches/return2 +++ quilt-0.44/debian/patches/return2 @@ -0,0 +1,58 @@ + * Make sure that quilt returns 2 when there is nothing to do so that + patchsys-quilt.mk works again. Upstream regression since 0.33. + (Closes: #358792). + +Upstream status: Submitted 060427 + +--- + quilt/push.in | 2 +- + quilt/scripts/patchfns.in | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +--- quilt-0.44.orig/quilt/push.in ++++ quilt-0.44/quilt/push.in +@@ -345,7 +345,7 @@ + [ -z "$opt_all" ] && number=1 + fi + +-stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit 1 ++stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit $? + + [ -n "$opt_quiet" ] && silent=-s + [ -z "$opt_verbose" ] && silent_unless_verbose=-s +--- quilt-0.44.orig/quilt/scripts/patchfns.in ++++ quilt-0.44/quilt/scripts/patchfns.in +@@ -440,7 +440,7 @@ + if [ -z "$patch" ] + then + printf $"No patches in series\n" >&2 +- return 1 ++ return 2 + fi + + echo "$patch" +@@ -538,7 +538,7 @@ + then + printf $"Patch %s is currently applied\n" \ + "$(print_patch $patch)" >&2 +- return 1 ++ return 2 + fi + echo "$patch" + else +@@ -548,13 +548,13 @@ + then + patch_after "$start" + else +- find_first_patch || return 1 ++ find_first_patch || return 2 + fi + if [ $? -ne 0 ] + then + printf $"File series fully applied, ends at patch %s\n" \ + "$(print_patch $start)" >&2 +- return 1 ++ return 2 + fi + fi + } --- quilt-0.44.orig/debian/patches/test_broken_patches +++ quilt-0.44/debian/patches/test_broken_patches @@ -0,0 +1,47 @@ +Index: quilt-0.44/test/file-not-found.test +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ quilt-0.44/test/file-not-found.test 2006-05-09 09:21:45.000000000 +0200 +@@ -0,0 +1,42 @@ ++# 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 ++> can't find file to patch at input line 3 ++> Perhaps you used the wrong -p or --strip option? ++> The text leading up to this was: ++> -------------------------- ++> |--- subdir/file.txt ++> |+++ subdir/other.txt ++> -------------------------- ++> No file to patch. Skipping patch. ++> 1 out of 1 hunk ignored ++> Patch patches/patch does not apply (enforce with -f) ++ ++$ quilt push -qf ++> Applying patch patches/patch ++> The text leading up to this was: ++> -------------------------- ++> |--- subdir/file.txt ++> |+++ subdir/other.txt ++> -------------------------- ++> No file to patch. Skipping patch. ++> 1 out of 1 hunk ignored ++> Patch patches/patch appears to be empty; applied ++ ++$ cd .. ++$ rm -rf d --- quilt-0.44.orig/debian/patches/makefile_glitche +++ quilt-0.44/debian/patches/makefile_glitche @@ -0,0 +1,19 @@ +Fixes a small issue in the generated manpage. + +Upstream status: not submitted + +--- + Makefile.in | 1 + + doc/quilt.1.in | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- quilt-0.44.orig/Makefile.in ++++ quilt-0.44/Makefile.in +@@ -188,6 +188,7 @@ + case "$$line" in \ + '@REFERENCE''@') \ + $(MAKE) -s reference | \ ++ $(GREP) -v -e 'make\[[0-9]\]: [^ ]* directory ‘' | \ + $(SED) -e 's/^quilt \([^ ]*\)\(.*\)/.IP "\\fB\1\\fP\2 " 4/' \ + -e $$'s/^ \\(-[^\t]*\\)\t\\?/.IP " \\1" 8\\\n/' \ + -e $$'s/^ \t\\?//' \ --- quilt-0.44.orig/debian/patches/testsuite_cleanups +++ quilt-0.44/debian/patches/testsuite_cleanups @@ -0,0 +1,63 @@ +Cleanup a bit the environment handling around the testsuite. + +Upstream status: Submitted 060427 + +--- + Makefile.in | 9 +-------- + test/run | 20 ++++++++++++++++++++ + 2 files changed, 21 insertions(+), 8 deletions(-) + +--- quilt-0.44.orig/test/run ++++ quilt-0.44/test/run +@@ -35,6 +35,26 @@ + my $lineno; + my $width = ($ENV{COLUMNS} || 80) >> 1; + ++# cleanup the environment ++map { ++ undef $ENV{$_} if defined($ENV{$_}); ++} qw(QUILT_PATCHES QUILT_PC LANG LC_MESSAGES LC_CTYPE LC_ALL LANGUAGE); ++ ++$ENV{'LC_ALL'} = 'C'; ++open RC,"test.quiltrc" || die "cannot read RC file: $?\n"; ++while () { ++ s/#.*$//; ++ if (m/^([^=]*)=(.*)$/) { ++ $ENV{$1}=$2; ++ } ++} ++ ++if (defined($ENV{'QUILT_PATCHES_PREFIX'}) && length($ENV{'QUILT_PATCHES_PREFIX'})) { ++ $ENV{'P'}='patches/'; ++ $ENV{'_P'}='../patches/'; ++} ++ ++# Run the tests + for (;;) { + my $line = <>; $lineno++; + if (defined $line) { +--- quilt-0.44.orig/Makefile.in ++++ quilt-0.44/Makefile.in +@@ -380,10 +380,6 @@ + { print FILENAME, ":", "quilt/"$$1 }' quilt/*.in; \ + ) | sort -u | $(SED) -re 's:^test/(.*)\.test:test/.\1.ok:' > $@ + +-ifneq ($(shell . $(QUILTRC) ; echo $$QUILT_PATCHES_PREFIX),) +-CHECK_ENV := P=patches/; _P=../patches/; export P _P +-endif +- + # Each tests dependencies are stored in test/.depend + ifneq ($(findstring check-,$(MAKECMDGOALS)),) + test/.%.ok : test/%.test FORCE +@@ -391,10 +387,7 @@ + test/.%.ok : test/%.test + endif + @echo "[$( +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: Apps/Text + +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.gz --- quilt-0.44.orig/debian/README.debian-package-building +++ quilt-0.44/debian/README.debian-package-building @@ -0,0 +1,7 @@ +This package sort of build-depend on itself. + +It is safe to build it without having itself installed (and that's good for +the autobuilders), but if you plan to hack on quilt, you'd better install +quilt so that your changes get properly saved in debian/quilt/patches. + +Then, to hack happily around, just export QUILT_PATCHES=debian/patches --- quilt-0.44.orig/debian/quiltrc.build +++ quilt-0.44/debian/quiltrc.build @@ -0,0 +1,4 @@ +# This is the quiltrc used to build the package when the quilt program is found + +# find our friends +QUILT_PATCHES=debian/patches