From ca62e88c1fd2574426cc228aef4a1c5064dd2853 Mon Sep 17 00:00:00 2001 From: dancer Date: Mon, 10 Mar 2003 10:02:11 +0000 Subject: +2003-03-10 Junichi Uekawa + + * pbuilder-satisfydepends: quote some strings... trying to be pedantic + + * pbuilder-buildpackage-funcs: unset LOGNAME for when building with + real root privilage. + thanks Barak Pearlmutter + + * pbuilder.8: document X hooks which were previously undocumented. + + * pbuilder-user-mode-linux (BUILDING_DSC_FILE): use readlink on real existing files. + GNU "readlink -f " exits with an exit code of 1 when the file does not + exist, debianutils readlink did not. + + * pbuilder-runhooks (hooks): do not call readlink here, + since the file may not exist. + + * pbuilder-checkparams (USE_PKGNAME_LOGFILE): use readlink on real existing files. + + * pbuilder-buildpackage (PACKAGENAME): use readlink on real existing files. + --- ChangeLog | 21 +++++++++++++++++++++ THANKS | 1 + debian/changelog | 11 +++++++++-- pbuilder-buildpackage | 3 ++- pbuilder-buildpackage-funcs | 2 ++ pbuilder-checkparams | 2 +- pbuilder-runhooks | 25 ++++++++++++++++++++++++- pbuilder-satisfydepends | 10 +++++----- pbuilder-user-mode-linux | 4 ++-- pbuilder.8 | 4 ++++ 10 files changed, 71 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9811b0..e8dd262 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2003-03-10 Junichi Uekawa + + * pbuilder-satisfydepends: quote some strings... trying to be pedantic + + * pbuilder-buildpackage-funcs: unset LOGNAME for when building with + real root privilage. + thanks Barak Pearlmutter + + * pbuilder.8: document X hooks which were previously undocumented. + + * pbuilder-user-mode-linux (BUILDING_DSC_FILE): use readlink on real existing files. + GNU "readlink -f " exits with an exit code of 1 when the file does not + exist, debianutils readlink did not. + + * pbuilder-runhooks (hooks): do not call readlink here, + since the file may not exist. + + * pbuilder-checkparams (USE_PKGNAME_LOGFILE): use readlink on real existing files. + + * pbuilder-buildpackage (PACKAGENAME): use readlink on real existing files. + 2003-03-09 Junichi Uekawa * pbuilder.8: fix typo diff --git a/THANKS b/THANKS index a3a8235..57fa456 100644 --- a/THANKS +++ b/THANKS @@ -26,6 +26,7 @@ Mark Eichin Michel Dänzer Barak Pearlmutter Tommaso Moroni +Barak Pearlmutter I thank them all! diff --git a/debian/changelog b/debian/changelog index f12a34c..769a07e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,15 @@ pbuilder (0.67) UNRELEASED; urgency=low thanks Barak Pearlmutter * fix typo in pbuilder.8 manual page (closes: #184049) thanks Tommaso Moroni - - -- Junichi Uekawa Sun, 9 Mar 2003 22:55:02 +0900 + * make the code work with GNU readlink, which errors out when + "readlink -f " is called with non-existing filename. + (closes: #183492, #184116) + * document the undocumented X hooks, which are ran after update/create + * unset LOGNAME for root-build cases, it was only fixed on + fakeroot builds. + thanks Barak Pearlmutter (closes: #183862) + + -- Junichi Uekawa Mon, 10 Mar 2003 18:58:35 +0900 pbuilder (0.66) unstable; urgency=low diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index d1d1089..47d08a1 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -54,9 +54,10 @@ createbuilduser if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then if [ "${USE_PKGNAME_LOGFILE}" = "yes" ]; then - PBUILDER_BUILD_LOGFILE=$(readlink -f "${BUILDRESULT}/"$(basename "${PACKAGENAME}" .dsc).log) + PBUILDER_BUILD_LOGFILE="${BUILDRESULT}/"$(basename "${PACKAGENAME}" .dsc) exec > "${PBUILDER_BUILD_LOGFILE}" exec 2>&1 + PBUILDER_BUILD_LOGFILE=$(readlink -f "${PBUILDER_BUILD_LOGFILE}") echo "I: Using pkgname logfile" showbuildbanner '$Id$' echobacktime diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs index 19bb35e..04bef48 100644 --- a/pbuilder-buildpackage-funcs +++ b/pbuilder-buildpackage-funcs @@ -71,5 +71,7 @@ function createbuilduser () { echo "$BUILDUSERNAME:*:$BUILDUSERID:" >> $BUILDPLACE/etc/group echo "$BUILDUSERNAME:!:::::::" >> $BUILDPLACE/etc/shadow unset LOGNAME + else + unset LOGNAME fi } diff --git a/pbuilder-checkparams b/pbuilder-checkparams index caca4ee..dc6ac86 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -87,7 +87,7 @@ while [ -n "$1" ]; do shift; shift; ;; --logfile) - exec > $(readlink -f "$2"); + exec > "$2"; exec 2>&1 PBUILDER_BUILD_LOGFILE=$(readlink -f "$2") shift; shift; diff --git a/pbuilder-runhooks b/pbuilder-runhooks index 3c2f4a9..e6e662e 100644 --- a/pbuilder-runhooks +++ b/pbuilder-runhooks @@ -18,6 +18,29 @@ # # HISTORY: # $Log$ +# Revision 1.15 2003/03/10 10:02:11 dancer +# +2003-03-10 Junichi Uekawa +# + +# + * pbuilder-satisfydepends: quote some strings... trying to be pedantic +# + +# + * pbuilder-buildpackage-funcs: unset LOGNAME for when building with +# + real root privilage. +# + thanks Barak Pearlmutter +# + +# + * pbuilder.8: document X hooks which were previously undocumented. +# + +# + * pbuilder-user-mode-linux (BUILDING_DSC_FILE): use readlink on real existing files. +# + GNU "readlink -f " exits with an exit code of 1 when the file does not +# + exist, debianutils readlink did not. +# + +# + * pbuilder-runhooks (hooks): do not call readlink here, +# + since the file may not exist. +# + +# + * pbuilder-checkparams (USE_PKGNAME_LOGFILE): use readlink on real existing files. +# + +# + * pbuilder-buildpackage (PACKAGENAME): use readlink on real existing files. +# + +# # Revision 1.14 2002/09/25 08:55:44 dancer # + * pbuilder-runhooks (hooks): do not error out if there are no hooks in the hookdir. # @@ -136,7 +159,7 @@ function executehooks () { $CHROOTEXEC "$hooks/"$(basename "$fn") echo " -> user script $fn finished" else - filetype=$(readlink -f $(basename "$fn" ) ) + filetype=$(basename "$fn" ) echo "W: execute priv not set on file $filetype, not executing." fi ;; diff --git a/pbuilder-satisfydepends b/pbuilder-satisfydepends index 2370a43..fec9f58 100644 --- a/pbuilder-satisfydepends +++ b/pbuilder-satisfydepends @@ -97,26 +97,26 @@ tolower($0) ~ /^'"${BD_REGEXP}"':/ {p=1} fi if echo "$INSTALLPKG" | grep '[(]' > /dev/null; then #echo "Debug: $INSTALLPKG" - if ! checkbuilddep_versiondeps ${CURRENTREALPKGNAME} \ + if ! checkbuilddep_versiondeps "${CURRENTREALPKGNAME}" \ $(echo "$INSTALLPKG" | tr "/" " " | sed 's/^.*([ ]*\(<<\|<=\|>=\|=\|<\|>>\|>\)[ ]*\(.*\)).*$/\1/') \ $(echo "$INSTALLPKG" | tr "/" " " | sed 's/^.*([ ]*\(<<\|<=\|>=\|=\|<\|>>\|>\)[ ]*\(.*\)).*$/\2/') ; then echo " -> Does not satisfy version, not trying" continue; fi fi - echo " -> Trying "${CURRENTREALPKGNAME} + echo " -> Trying ${CURRENTREALPKGNAME}" if $CHROOTEXEC /usr/bin/apt-get -s install ${INSTALLPKGLIST} ${CURRENTREALPKGNAME} >& /dev/null; then SATISFIED="yes" INSTALLPKGLIST="${INSTALLPKGLIST} ${CURRENTREALPKGNAME}" else echo " -> Cannot install ${CURRENTREALPKGNAME}; apt errors follow:" - if $CHROOTEXEC /usr/bin/apt-get -s install ${INSTALLPKGLIST} ${CURRENTREALPKGNAME}; then + if $CHROOTEXEC /usr/bin/apt-get -s install ${INSTALLPKGLIST} "${CURRENTREALPKGNAME}"; then : fi # package could not be found. -- looking for alternative. PROVIDED="" - checkbuilddep_provides ${CURRENTREALPKGNAME} + checkbuilddep_provides "${CURRENTREALPKGNAME}" if [ -n "$PROVIDED" ]; then # something provides this package echo " -> Considering $PROVIDED to satisfy the dependency " @@ -168,7 +168,7 @@ tolower($0) ~ /^'"${BC_REGEXP}"':/ {p=1} tr " " "/" | \ awk 'BEGIN{RS=","} {print}'); do CURRENTREALPKGNAME=$(echo "$INSTALLPKG" | sed -e 's/^[/]*//' -e 's/[[/(].*//') - echo " -> Considering "${CURRENTREALPKGNAME} + echo " -> Considering ${CURRENTREALPKGNAME}" if echo "$INSTALLPKG" | grep '\[' > /dev/null ; then # this package has arch-conflicts. diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 0b62fc2..26dd576 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -202,7 +202,7 @@ while [ -n "$1" ] ; do UML_BUILDRESULT=$(readlink -f "$2") shift;shift;; --logfile) - exec > $(readlink -f "$2"); + exec > "$2"; exec 2>&1 PBUILDER_BUILD_LOGFILE=$(readlink -f "$2") shift;shift;; @@ -220,7 +220,7 @@ while [ -n "$1" ] ; do esac done -BUILDING_DSC_FILE=$(readlink -f "$1") +BUILDING_DSC_FILE=$(readlink -f "$1") || true # ignore failure here EXTRACLEANUP= UML_EXITCODE=1 case "${OPERATION}" in diff --git a/pbuilder.8 b/pbuilder.8 index e1a0a33..464b736 100644 --- a/pbuilder.8 +++ b/pbuilder.8 @@ -260,6 +260,10 @@ after setting up the chroot environment. Create $TMP, and $TMPDIR if necessary. This can be used for calling apt-get update. +.B "X" +is executed after pbuilder update and pbuilder create +terminates, before creating the tarball. + \" End of hookdir description .TP -- cgit v1.2.3