diff -Nru schroot-1.6.13/debian/changelog schroot-1.6.13/debian/changelog --- schroot-1.6.13/debian/changelog 2022-09-09 17:14:33.000000000 +0000 +++ schroot-1.6.13/debian/changelog 2022-09-25 18:34:42.000000000 +0000 @@ -1,3 +1,14 @@ +schroot (1.6.13-3) unstable; urgency=medium + + * Add Spanish debconf translation. Closes: #1019483 + * Update French translation. Closes: #1020255 + * Cherry-pick "copyfiles: Replace dangling symlink during cp". + Closes: #1020277 + * Cherry-pick copyfiles improvement from the 1.7 development branch + * Fix variable usage in copyfiles copy_file() function + + -- Christoph Biedl Sun, 25 Sep 2022 20:34:42 +0200 + schroot (1.6.13-2) unstable; urgency=medium * Add German debconf translation. Closes: #1017943 diff -Nru schroot-1.6.13/debian/patches/1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch schroot-1.6.13/debian/patches/1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch --- schroot-1.6.13/debian/patches/1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/patches/1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch 2022-09-25 17:28:29.000000000 +0000 @@ -0,0 +1,63 @@ +Subject: Setup.d: 20copyfiles: canonicalize destination path +Origin: release/schroot-1.7.2-72-gbf30a928 +Upstream-Author: Yann Soubeyrand +Date: Mon Nov 30 14:38:34 2015 +0100 + + When parts of the destination path are symlinks, these symlinks are followed + in the context of the host filesystem instead of the context of the chroot + filesystem. This patch should fix it. + +--- a/etc/setup.d/20copyfiles ++++ b/etc/setup.d/20copyfiles +@@ -75,6 +75,42 @@ + fi + } + ++# Resolve a relative path inside the chroot to its absolute path on the host ++# $1: base path of the chroot ++# $2: relative path to resolve ++resolve_path() ++{ ++ base_path="$(realpath "$1")" ++ relative_destination="${2#/}" ++ absolute_destination="$base_path" ++ ++ while [ -n "$relative_destination" ]; do ++ first_component="${relative_destination%%/*}" ++ relative_destination="${relative_destination#$first_component}" ++ relative_destination="${relative_destination#/}" ++ ++ # If the first component is a link ++ if link="$(readlink "$absolute_destination/$first_component")"; then ++ # If the first component is a relative link ++ if [ "${link#/}" = "$link" ]; then ++ relative_destination="$link/$relative_destination" ++ else ++ absolute_destination="$base_path" ++ relative_destination="${link#/}/$relative_destination" ++ fi ++ else ++ absolute_destination="$(realpath "$absolute_destination/$first_component")" ++ ++ # If the absolute destination gets out of the chroot ++ if [ "${absolute_destination#$base_path}" = "$absolute_destination" ]; then ++ absolute_destination="$base_path" ++ fi ++ fi ++ done ++ ++ echo "$absolute_destination" ++} ++ + if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then + + if [ -n "$SETUP_COPYFILES" ]; then +@@ -84,7 +120,7 @@ + continue + fi + if echo "$file" | grep -q '^/'; then +- copy_file "$file" "${CHROOT_PATH}$file" ++ copy_file "$file" "$(resolve_path "${CHROOT_PATH}" "$file")" + else + warn "Not copying file with relative path: $file" + fi diff -Nru schroot-1.6.13/debian/patches/1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch schroot-1.6.13/debian/patches/1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch --- schroot-1.6.13/debian/patches/1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/patches/1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch 2022-09-25 17:28:29.000000000 +0000 @@ -0,0 +1,33 @@ +Subject: Etc/setup.d/20copyfiles: Replace dangling symlink during cp. #1 +Origin: release/schroot-1.7.2-72-g11587fd8 +Upstream-Author: Samson Yeung +Date: Fri Jan 22 15:33:03 2016 -0800 + + Add --remove-destination to the cp calls in etc/setup.d/20copyfiles to + fix problems with dangling symlinks. + + Error message from cp is: + cp: not writing through dangling symlink ‘asymlinkfile’ + + This is useful since /etc/resolv.conf may be a dangling symlink ( which + happens if resolvconf is installed in the schroot, or if the schroot + uses systemd and /etc/resolv.conf points to the non-existant + /run/systemd/resolve/resolv.conf ). + + Adding --remove-destination fixes this. (cp -f doesn't fix it.) + +--- a/etc/setup.d/20copyfiles ++++ b/etc/setup.d/20copyfiles +@@ -63,10 +63,10 @@ + # Copy only if files are different + if [ "$COPY" = "true" ]; then + if [ -f "$1" ]; then +- cp --preserve=all $CP_VERBOSE "$1" "$2" ++ cp --remove-destination --preserve=all $CP_VERBOSE "$1" "$2" + else + # Copy non-regular file directly +- cp -a $CP_VERBOSE "$1" "$2" ++ cp --remove-destination -a $CP_VERBOSE "$1" "$2" + fi + fi + diff -Nru schroot-1.6.13/debian/patches/1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch schroot-1.6.13/debian/patches/1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch --- schroot-1.6.13/debian/patches/1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/patches/1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch 2022-09-25 17:28:29.000000000 +0000 @@ -0,0 +1,20 @@ +Subject: Support copyfiles installation into non-existent directories +Origin: release/schroot-1.7.2-137-g5c36362b +Upstream-Author: Guillem Jover +Date: Thu Feb 23 19:02:25 2017 +0100 + + Trying to copy a file into a non-existent directory is currently fatal, + and thus makes the whole schroot invocation fail. This means one cannot + unconditionally add files if the chroot is possibly not going to have + the containing directory. + +--- a/etc/setup.d/20copyfiles ++++ b/etc/setup.d/20copyfiles +@@ -62,6 +62,7 @@ + + # Copy only if files are different + if [ "$COPY" = "true" ]; then ++ mkdir -p $(dirname $2) + if [ -f "$1" ]; then + cp --remove-destination --preserve=all $CP_VERBOSE "$1" "$2" + else diff -Nru schroot-1.6.13/debian/patches/1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch schroot-1.6.13/debian/patches/1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch --- schroot-1.6.13/debian/patches/1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/patches/1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch 2022-09-25 17:28:29.000000000 +0000 @@ -0,0 +1,51 @@ +Subject: Support copyfiles specifications +Origin: release/schroot-1.7.2-138-g5a611c49 +Upstream-Author: Guillem Jover +Date: Thu Feb 23 19:03:19 2017 +0100 + + This makes it possible to store local files in the schroot configuration + directory that will get installed on the chroot. For example a local + policy-rc.d script. + +--- a/etc/profile-templates/all/all/copyfiles ++++ b/etc/profile-templates/all/all/copyfiles +@@ -1,4 +1,4 @@ + # Files to copy into the chroot from the host system. + # +-# ++# [ ] + /etc/resolv.conf +--- a/etc/profile-templates/buildd/all/copyfiles ++++ b/etc/profile-templates/buildd/all/copyfiles +@@ -1,6 +1,6 @@ + # Files to copy into the chroot from the host system. + # +-# ++# [ ] + /etc/hosts + /etc/resolv.conf + /etc/networks +--- a/etc/setup.d/20copyfiles ++++ b/etc/setup.d/20copyfiles +@@ -116,14 +116,16 @@ + + if [ -n "$SETUP_COPYFILES" ]; then + if [ -f "$SETUP_COPYFILES" ]; then +- while read file; do +- if echo "$file" | egrep -q '^(#|$)' ; then ++ while read src dst; do ++ : ${dst:=$src} ++ if echo "$src" | egrep -q '^(#|$)' ; then + continue + fi +- if echo "$file" | grep -q '^/'; then +- copy_file "$file" "$(resolve_path "${CHROOT_PATH}" "$file")" ++ if echo "$src" | grep -q '^/' && ++ echo "$dst" | grep -q '^/'; then ++ copy_file "$src" "$(resolve_path "${CHROOT_PATH}" "$dst")" + else +- warn "Not copying file with relative path: $file" ++ warn "Not copying file with relative path: $src -> $dst" + fi + done < "$SETUP_COPYFILES" + else diff -Nru schroot-1.6.13/debian/patches/1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch schroot-1.6.13/debian/patches/1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch --- schroot-1.6.13/debian/patches/1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/patches/1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch 2022-09-25 17:28:35.000000000 +0000 @@ -0,0 +1,25 @@ +Subject: Fix variable usage in copyfiles copy_file() function +Origin: release/reschroot-1.6.12-2-g2045008e + +Upstream-Author: Guillem Jover +Date: Mon Jul 25 04:38:58 2022 +0200 + + The function was using $file to refer to the source file of the copy, + instead of $1. This happens to currently work because in shell the + function has access to the global variables defined from the call site, + but this makes it dependent on the global state and the call site + semantics. If these variables change name then this specific code will + stop working, which will be the case with the upcoming source and + optional destination specification in copyfiles. + +--- a/etc/setup.d/20copyfiles ++++ b/etc/setup.d/20copyfiles +@@ -71,7 +71,7 @@ + fi + + else +- fatal "Not copying nonexistent file: $file" ++ fatal "Not copying nonexistent file: $1" + fi + } + diff -Nru schroot-1.6.13/debian/patches/1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch schroot-1.6.13/debian/patches/1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch --- schroot-1.6.13/debian/patches/1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch 2022-09-09 14:53:59.000000000 +0000 +++ schroot-1.6.13/debian/patches/1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch 2022-09-25 17:28:29.000000000 +0000 @@ -55,15 +55,15 @@ # root (for efficiency) --- a/etc/setup.d/20copyfiles +++ b/etc/setup.d/20copyfiles -@@ -80,7 +80,7 @@ - if [ -n "$SETUP_COPYFILES" ]; then +@@ -118,7 +118,7 @@ if [ -f "$SETUP_COPYFILES" ]; then - while read file; do -- if echo "$file" | egrep -q '^(#|$)' ; then -+ if echo "$file" | grep -Eq '^(#|$)' ; then + while read src dst; do + : ${dst:=$src} +- if echo "$src" | egrep -q '^(#|$)' ; then ++ if echo "$src" | grep -Eq '^(#|$)' ; then continue fi - if echo "$file" | grep -q '^/'; then + if echo "$src" | grep -q '^/' && --- a/etc/setup.d/20nssdatabases +++ b/etc/setup.d/20nssdatabases @@ -37,7 +37,7 @@ diff -Nru schroot-1.6.13/debian/patches/1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch schroot-1.6.13/debian/patches/1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch --- schroot-1.6.13/debian/patches/1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/patches/1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch 2022-09-24 09:34:19.000000000 +0000 @@ -0,0 +1,115 @@ +Subject: Update French translation +Origin: release/reschroot-1.6.13-4-g93017cff +Upstream-Author: Christoph Biedl +Date: Sat Sep 24 11:23:12 2022 +0200 + + Thanks Martin Quinson + + Debian bug: https://bugs.debian.org/1020255 + +--- a/man/po/fr.po ++++ b/man/po/fr.po +@@ -337,7 +337,7 @@ + "utilisant le même mécanisme, mais avec plusieurs caractéristiques " + "supplémentaires. Alors que schroot utilise un répertoire comme chroot " + "exactement comme B(8), il n'a pas besoin que celui-ci soit un " +-"répertoire ordinnaire du système de fichier. Bien que cela soit la valeur " ++"répertoire ordinaire du système de fichier. Bien que cela soit la valeur " + "par défaut, le chroot peut également être créé à partir d'un fichier, d'un " + "système de fichiers, incluant les instantanés LVM et Btrfs et les montages " + "« loopback », ou composé d'une surcouche unionfs. B étant " +@@ -976,7 +976,7 @@ + "between namespace and chroot names, it is not permitted to use this " + "character in chroot names." + msgstr "" +-"Il y a trois types de chroot différents : les chroots ordinnaires, les " ++"Il y a trois types de chroot différents : les chroots ordinaires, les " + "chroots source et les chroots session. Ces différents types de chroot sont " + "séparés dans différents I. Un espace de noms est un préfixe " + "à un nom de chroot. Pour le moment, il y a trois espaces de noms : " +@@ -1086,7 +1086,7 @@ + "chroots session. Le résultat est que l'espace de noms n'est normalement " + "jamais requis, sauf quand vous avez besoin de travailler avec un chroot dans " + "un espace de noms différent de celui par défaut, comme lorsque vous utilisez " +-"un chroot source. Pour effectuer une sélection de chroot sans ambigüité, il " ++"un chroot source. Pour effectuer une sélection de chroot sans ambiguïté, il " + "est toujours possible d'utiliser le nom complet incluant l'espace de noms, " + "même quand cela n'est pas strictement nécessaire." + +@@ -2205,7 +2205,7 @@ + "once, for example on failure." + msgstr "" + "Notez que les scripts devraient être I. Ils B être " +-"idempotentsd pendant la phase \\[oq]setup-stop\\[cq], car ils pourraient être " ++"idempotents pendant la phase \\[oq]setup-stop\\[cq], car ils pourraient être " + "exécutés plus d'une fois, par exemple en cas d'échec." + + #. type: SS +@@ -2327,7 +2327,7 @@ + "\\[oq]verbose\\[cq] if all messages may be printed. Previously called " + "AUTH_VERBOSITY." + msgstr "" +-"Définir à \\[oq]quiet\\[cq] si seuls les messages d'erreur doivent être " ++"Défini à \\[oq]quiet\\[cq] si seuls les messages d'erreur doivent être " + "affichés, \\[oq]normal\\[cq] pour afficher plus de messages et \\[oq]verbose" + "\\[cq] si tous les messages doivent être affichés. Précédemment appelée " + "AUTH_VERBOSITY." +@@ -2344,7 +2344,7 @@ + "Set to \\[oq]true\\[cq] if a session will be created, otherwise \\[oq]false" + "\\[cq]." + msgstr "" +-"Définir à \\[oq]true\\[cq] si une session sera créée, sinon \\[oq]false" ++"Défini à \\[oq]true\\[cq] si une session doit être créée, sinon \\[oq]false" + "\\[cq]." + + #. type: TP +@@ -2359,7 +2359,7 @@ + "Set to \\[oq]true\\[cq] if a session will be cloned, otherwise \\[oq]false" + "\\[cq]." + msgstr "" +-"Définir à \\[oq]true\\[cq] si une session sera clonée, sinon \\[oq]false" ++"Défini à \\[oq]true\\[cq] si une session doit être clonée, sinon \\[oq]false" + "\\[cq]." + + #. type: TP +@@ -2374,19 +2374,18 @@ + "Set to \\[oq]true\\[cq] if a session will be purged, otherwise \\[oq]false" + "\\[cq]." + msgstr "" +-"Définir à \\[oq]true\\[cq] si une session sera purgée, sinon \\[oq]false" ++"Défini à \\[oq]true\\[cq] si une session doit être purgée, sinon \\[oq]false" + "\\[cq]." + + #. type: TP + #: schroot-setup.5.man:95 +-#, fuzzy, no-wrap ++#, no-wrap + #| msgid "CHROOT_SESSION_PURGE" + msgid "CHROOT_SESSION_SOURCE" +-msgstr "CHROOT_SESSION_PURGE" ++msgstr "CHROOT_SESSION_SOURCE" + + #. type: Plain text + #: schroot-setup.5.man:99 +-#, fuzzy + #| msgid "" + #| "Set to \\[oq]true\\[cq] if a session will be created, otherwise " + #| "\\[oq]false\\[cq]." +@@ -2394,7 +2393,7 @@ + "Set to \\[oq]true\\[cq] if a session will be created from a source chroot, " + "otherwise \\[oq]false\\[cq]." + msgstr "" +-"Définir à \\[oq]true\\[cq] si une session sera créée, sinon \\[oq]false" ++"Défini à \\[oq]true\\[cq] si une session doit être créée depuis un chroot source, sinon \\[oq]false" + "\\[cq]." + + #. type: TP +@@ -2543,7 +2542,7 @@ + "Set to \\[oq]true\\[cq] to repack the chroot into an archive file on ending " + "a session, otherwise \\[oq]false\\[cq]." + msgstr "" +-"Définir à \\[oq]true\\[cq] pour recompacter le chroot dans une archive à la " ++"Défini à \\[oq]true\\[cq] pour recompacter le chroot dans une archive à la " + "fin de la session, sinon \\[oq]false\\[cq]." + + #. type: SS diff -Nru schroot-1.6.13/debian/patches/series schroot-1.6.13/debian/patches/series --- schroot-1.6.13/debian/patches/series 2022-09-09 14:54:08.000000000 +0000 +++ schroot-1.6.13/debian/patches/series 2022-09-25 17:28:35.000000000 +0000 @@ -1,11 +1,17 @@ # cherry-picked from upstream 1539621689.revert.schroot-1.6.10-48-g2600bcab.revert-environment-preserve-empty-values.patch +1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch +1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch 1496783678.schroot-1.7.2-127-ga5e5d8d9.fix-bash-completion.patch 1530433671.schroot-1.7.2-129-g00c0a972.cmake-use-soelim-r-option.patch +1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch +1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch 1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch 1662656169.reschroot-1.6.13-3-ga9e100e5.clean-up-mess-created-in-the-portuguese-translations.patch +1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch # to be upstreamed +1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch # specific to Debian diff -Nru schroot-1.6.13/debian/po/es.po schroot-1.6.13/debian/po/es.po --- schroot-1.6.13/debian/po/es.po 1970-01-01 00:00:00.000000000 +0000 +++ schroot-1.6.13/debian/po/es.po 2022-09-10 15:42:55.000000000 +0000 @@ -0,0 +1,66 @@ +# Translation of schroot debconf templates to Spanish. +# Copyright (C) 2022 Christoph Biedl +# This file is distributed under the same license as the schroot package. +# 2022 Christoph Biedl , 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: schroot\n" +"Report-Msgid-Bugs-To: schroot@packages.debian.org\n" +"POT-Creation-Date: 2022-08-15 20:51+0200\n" +"PO-Revision-Date: 2022-08-27 14:56+0200\n" +"Language-Team: Debian L10n Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" +"Last-Translator: Camaleón \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: es\n" + +#. Type: note +#. Description +#: ../schroot.templates:1001 +msgid "Stricter rule on chroot names" +msgstr "Reglas más restrictivas para los nombres en entornos chroot" + +#. Type: note +#. Description +#: ../schroot.templates:1001 +msgid "" +"Due to stricter rules on the name, the chroots listed below are no longer " +"supported." +msgstr "" +"Debido a reglas más estrictas en los nombres, los siguientes chroot ya no " +"se admiten." + +#. Type: note +#. Description +#: ../schroot.templates:1001 +msgid " ${LIST}" +msgstr " ${LIST}" + +#. Type: note +#. Description +#: ../schroot.templates:1001 +msgid "" +"Chroot names must begin with an letter or digit, the remaining characters " +"may additionally be dash ('-'), dot ('.'), or underscore ('_')." +msgstr "" +"Los nombres chroot deben comenzar con una letra o un número, para el resto " +"de caracteres también puede usar guión («-»), punto («.») o guión bajo " +"(«_»)." + +#. Type: note +#. Description +#: ../schroot.templates:1001 +msgid "" +"Please rename or remove them before installing a newer version of schroot. " +"For instructions, see /usr/share/doc/schroot/NEWS.gz or , starting at \"Major changes in " +"1.6.13\"." +msgstr "" +"Cambiéles el nombre o elimínelos antes de instalar una nueva versión de " +"schroot. Para más información, consulte «/usr/share/doc/schroot/NEWS.gz» o " +"«https://codeberg.org/shelter/reschroot/src/branch/main/NEWS», empezando " +"por «Cambios importantes en la versión 1.6.13»."