diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 14 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rwxr-xr-x | debian/pbuilder.postinst | 106 | ||||
-rw-r--r-- | debian/pbuilder.templates | 26 | ||||
-rw-r--r-- | debian/po/POTFILES.in | 1 | ||||
-rw-r--r-- | debian/po/ro.po | 84 | ||||
-rw-r--r-- | debian/po/templates.pot | 78 | ||||
-rwxr-xr-x | debian/rules | 1 |
8 files changed, 311 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index b76c51a..797b5df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,19 @@ pbuilder (0.179~1.gbpfaef96) UNRELEASED; urgency=low * UNRELEASED - -- Junichi Uekawa <dancer@debian.org> Sat, 02 Feb 2008 12:27:36 +0900 + [ Eddy Petrișor ] + * added support for detection of the default mirror in postinst + (Closes: #333294) + - /etc/pbuilderrc is no longer a conffile + - detection of the default MIRRORSITE relies on the information from + /etc/apt/sources.list and /etc/apt/sources.list.d/ + * bumped versioned dependency on debhelper to (>= 4.1.16) as indicated in + po-debconf manual + + [ po-debconf translations ] + * iniatial Romanian translation (by Eddy Petrișor) + + -- Eddy Petrișor <eddy.petrisor@gmail.com> Sun, 02 Mar 2008 08:50:48 +0200 pbuilder (0.178) unstable; urgency=low diff --git a/debian/control b/debian/control index f943fb5..2110a71 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,14 @@ Section: devel Priority: extra Maintainer: Debian pbuilder maintenance team <pbuilder-maint@lists.alioth.debian.org> Uploaders: Junichi Uekawa <dancer@debian.org>, Matt Kraai <kraai@debian.org> -Build-Depends: debhelper (>= 4.1.0), docbook-xsl, ldp-docbook-xsl (>= 0.0.20040321-0.1), xsltproc, dpkg-dev (>= 1.13.19), dblatex, rootstrap [i386 amd64] +Build-Depends: debhelper (>= 4.1.16), docbook-xsl, ldp-docbook-xsl (>= 0.0.20040321-0.1), xsltproc, dpkg-dev (>= 1.13.19), dblatex, rootstrap [i386 amd64], debconf|debconf-2.0, po-debconf Standards-Version: 3.7.2 Vcs-Git: git://git.debian.org/git/pbuilder/pbuilder.git Vcs-Browser: http://git.debian.org/?p=pbuilder/pbuilder.git Package: pbuilder Architecture: all -Depends: cdebootstrap|debootstrap, wget, gcc, debianutils (>= 1.13.1), coreutils (>= 4.5.8-1) +Depends: cdebootstrap|debootstrap, wget, gcc, debianutils (>= 1.13.1), coreutils (>= 4.5.8-1), ${misc:Depends} Recommends: fakeroot, sudo, devscripts, cowdancer Suggests: pbuilder-uml Description: personal package builder for Debian packages diff --git a/debian/pbuilder.postinst b/debian/pbuilder.postinst new file mode 100755 index 0000000..ae1cb3d --- /dev/null +++ b/debian/pbuilder.postinst @@ -0,0 +1,106 @@ +#!/bin/sh +# postinst script for pbuilder +# +# see: dh_installdeb(1) + +. /usr/share/debconf/confmodule + +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + + CONFFILE=/etc/pbuilderrc + PLACEHOLDER='http://you-have-broken-debconf-configuration.example.com/' + + # if there is a custom file, then we shouldn't touch it + if [ -f "$CONFFILE" ] ; then + CURRENTMIRROR=$(grep -E "^[ ]*MIRRORSITE=" "$CONFFILE" | sed 's#MIRRORSITE=##g') + if [ "$CURRENTMIRROR" ] ; then + db_input low pbuilder/rewrite || [ $? = 30 ] + db_go + + db_get pbuilder/rewrite + [ "$RET" = "true" ] || exit 0 + + # make sure latter calls do not overwrite stuff silently + db_set pbuilder/rewrite "false" + else + # no MIRRORSITE line found in the pbuilderrc file + echo "MIRRORSITE=$PLACEHOLDER" >> "$CONFFILE" + MIRRORSITE="" + db_set pbuilder/mirrorsite "" + fi + else + echo "MIRRORSITE=$PLACEHOLDER" > "$CONFFILE" + MIRRORSITE="" + db_set pbuilder/mirrorsite "" + fi + + db_get pbuilder/mirrorsite + [ "$RET" = "$PLACEHOLDER" ] && db_set pbuilder/mirrorsite "" || true + db_input medium pbuilder/mirrorsite || [ $? = 30 ] + db_go + + db_get pbuilder/mirrorsite + MIRRORSITE="$RET" + + # the "$PLACEHOLDER" alternative is just a safety net, + # but that should really never happen + if [ -z "$MIRRORSITE" ] || [ "$MIRRORSITE" = "$PLACEHOLDER" ] ; then + SRCLISTDIR=/etc/apt/sources.list.d + MIRRORSITE=$( + ( [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list || true ; + [ -f $SRCLISTDIR/*.sources.list ] && cat $SRCLISTDIR/*.sources.list || true ) \ + | grep -E '^deb ' | head -n 1 | awk '{print $2;}' + ) + while [ -z "$MIRRORSITE" ] ; do + db_input high pbuilder/nomirror || true + db_input high pbuilder/mirrorsite && RETCODE=$? || RETCODE=$? + db_go + + # if the interface is non-interactive, still set a valid mirror + if [ $RETCODE = 30 ] ; then + MIRRORSITE="http://ftp.debian.org/debian" + else + db_get pbuilder/mirrorsite + MIRRORSITE="$RET" + fi + done + db_set pbuilder/mirrorsite "$MIRRORSITE" + fi + + sed -i "s#^\s*MIRRORSITE=.*\$#MIRRORSITE=$MIRRORSITE#" "$CONFFILE" + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/pbuilder.templates b/debian/pbuilder.templates new file mode 100644 index 0000000..e160b3d --- /dev/null +++ b/debian/pbuilder.templates @@ -0,0 +1,26 @@ +Template: pbuilder/mirrorsite +Type: string +Default: http://you-have-broken-debconf-configuration.example.com/ +_Description: Default mirror site: + Please enter the default mirror you want to be used by pbuilder. + . + If you leave this field blank, there will be one attempt to autodetect + this information. If this attempt fails, you will be prompted again + to insert some valid mirror information. + . + Here is a valid mirror example: http://ftp.debian.org/debian + +Template: pbuilder/nomirror +Type: error +_Description: Default mirror not found + Mirror information detection failed and the user provided no mirror information. + . + Please enter valid mirror information. + +Template: pbuilder/rewrite +Type: boolean +Default: false +_Description: Overwrite current configuration? + Your system seems to have already pbuilder configuration. + Proceeding might discard or overwrite part or the entire + pbuilder's configuration. diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..86d57fa --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] pbuilder.templates diff --git a/debian/po/ro.po b/debian/po/ro.po new file mode 100644 index 0000000..bb52e2b --- /dev/null +++ b/debian/po/ro.po @@ -0,0 +1,84 @@ +# translation of ro.po to Romanian +# Romanian translations for PACKAGE package +# Traducerea în limba română pentru pachetul PACKAGE. +# Copyright (C) 2007 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Eddy Petrisor <eddy.petrisor@gmail.com>, 2007. +# Eddy Petrișor <eddy.petrisor@gmail.com>, 2007, 2008. +msgid "" +msgstr "" +"Project-Id-Version: ro\n" +"Report-Msgid-Bugs-To: pbuilder@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 08:23+0200\n" +"PO-Revision-Date: 2008-03-02 08:50+0200\n" +"Last-Translator: Eddy Petrișor <eddy.petrisor@gmail.com>\n" +"Language-Team: Romanian <debian-l10n-romanian@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "Default mirror site:" +msgstr "Saitul oglindă implicit:" + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "Please enter the default mirror you want to be used by pbuilder." +msgstr "Introduceți saitul oglindă implicit pe care doriți să-l folosească pbuilder." + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "" +"If you leave this field blank, there will be one attempt to autodetect this " +"information. If this attempt fails, you will be prompted again to insert " +"some valid mirror information." +msgstr "Dacă lăsați liber acest câmp, se va încerca o singură dată să se detecteze automat această informație. Dacă această încercare eșuează, vi se va cere, din nou să introduceți niște informații valide despre saitul-oglindă." + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "Here is a valid mirror example: http://ftp.debian.org/debian" +msgstr "Iată un exemplu valid de sait-oglindă: http://ftp.ro.debian.org/debian" + +#. Type: error +#. Description +#: ../pbuilder.templates:2001 +#| msgid "Default mirror site:" +msgid "Default mirror not found" +msgstr "Saitul oglindă implicit nu a fost găsit" + +#. Type: error +#. Description +#: ../pbuilder.templates:2001 +msgid "" +"Mirror information detection failed and the user provided no mirror " +"information." +msgstr "Detectarea informațiilor despre saitul-oglindă a eșuat și utilizatorul nu a furnizat nici o informație despre saitul-oglindă." + +#. Type: error +#. Description +#: ../pbuilder.templates:2001 +msgid "Please enter valid mirror information." +msgstr "Introduceți informație validă referitoare la saituri ." + +#. Type: boolean +#. Description +#: ../pbuilder.templates:3001 +msgid "Overwrite current configuration?" +msgstr "Se suprascrie actualul fișier de configurație?" + +#. Type: boolean +#. Description +#: ../pbuilder.templates:3001 +msgid "" +"Your system seems to have already pbuilder configuration. Proceeding might " +"discard or overwrite part or the entire pbuilder's configuration." +msgstr "Sistemul pare să aibă deja o configurație pentru pbuilder. Continuarea cu această acțiune ar putea duce la ștergerea sau suprascrierea parțială sau totală a fișierului de configurare aparținând lui pbuilder." + diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..ab08b04 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: pbuilder@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 08:23+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "Default mirror site:" +msgstr "" + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "Please enter the default mirror you want to be used by pbuilder." +msgstr "" + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "" +"If you leave this field blank, there will be one attempt to autodetect this " +"information. If this attempt fails, you will be prompted again to insert " +"some valid mirror information." +msgstr "" + +#. Type: string +#. Description +#: ../pbuilder.templates:1001 +msgid "Here is a valid mirror example: http://ftp.debian.org/debian" +msgstr "" + +#. Type: error +#. Description +#: ../pbuilder.templates:2001 +msgid "Default mirror not found" +msgstr "" + +#. Type: error +#. Description +#: ../pbuilder.templates:2001 +msgid "" +"Mirror information detection failed and the user provided no mirror " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../pbuilder.templates:2001 +msgid "Please enter valid mirror information." +msgstr "" + +#. Type: boolean +#. Description +#: ../pbuilder.templates:3001 +msgid "Overwrite current configuration?" +msgstr "" + +#. Type: boolean +#. Description +#: ../pbuilder.templates:3001 +msgid "" +"Your system seems to have already pbuilder configuration. Proceeding might " +"discard or overwrite part or the entire pbuilder's configuration." +msgstr "" diff --git a/debian/rules b/debian/rules index d69391d..40d082e 100755 --- a/debian/rules +++ b/debian/rules @@ -49,6 +49,7 @@ binary-indep: build install dh_installdocs -i dh_installman pbuilder.8 pbuilderrc.5 pdebuild.1 debuild-pbuilder.1 dh_installchangelogs -i + dh_installdebconf dh_link -i dh_compress -i -X.pdf dh_fixperms -i |