mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
* pbuilder-dist:
- check if $SYSCACHE is not set and stay with the default, if SYSCACHE = 0 use the default from pbuilderrc or honor $DEBCACHE (LP: #156183) - removed $BINARCH check in pbuilder call, and set --debootstrapopts directly, it doesn't matter when it's always set. The Subshell call didn't work (LP: #175183) - added support for --http-proxy, honours now $http_proxy or $HTTP_PROXY - removed $COMPONENTS_LINE from pbuilder call, data is crippled in the pbuilder chroot. Instead of this behaviour add $BASE_DIR/etc/$DISTRIBUTION/apt.conf/ directory and install a sane sources.list, depending on the releases of Ubuntu and add --aptconfdir to pbuilder call (LP: #175183) - add support for gksudo|kdesudo|sudo depending on $DESKTOP_SESSION. (LP: #172943) * pbuilder-dist.bash_completion: (LP: #175728) - added bash_completion instructions * debian/rules: - install pbuilder-dist.bash_completion to /etc/bash_completion.d/
This commit is contained in:
parent
36cd6cd742
commit
519d99d407
19
debian/changelog
vendored
19
debian/changelog
vendored
@ -33,6 +33,25 @@ ubuntu-dev-tools (0.25) UNRELEASED; urgency=low
|
||||
[ Stephan Hermann ]
|
||||
* mk-sbuild-lv: check for debootstrap release names in
|
||||
/usr/share/debootstreap/releases and not in /usr/lib/debootstrap/releases
|
||||
* pbuilder-dist:
|
||||
- check if $SYSCACHE is not set and stay with the default, if
|
||||
SYSCACHE = 0 use the default from pbuilderrc or honor $DEBCACHE
|
||||
(LP: #156183)
|
||||
- removed $BINARCH check in pbuilder call, and set --debootstrapopts
|
||||
directly, it doesn't matter when it's always set. The Subshell call
|
||||
didn't work (LP: #175183)
|
||||
- added support for --http-proxy, honours now $http_proxy or $HTTP_PROXY
|
||||
- removed $COMPONENTS_LINE from pbuilder call, data is crippled in the
|
||||
pbuilder chroot.
|
||||
Instead of this behaviour add $BASE_DIR/etc/$DISTRIBUTION/apt.conf/
|
||||
directory and install a sane sources.list, depending on the releases of Ubuntu
|
||||
and add --aptconfdir to pbuilder call (LP: #175183)
|
||||
- add support for gksudo|kdesudo|sudo depending on $DESKTOP_SESSION.
|
||||
(LP: #172943)
|
||||
* pbuilder-dist.bash_completion: (LP: #175728)
|
||||
- added bash_completion instructions
|
||||
* debian/rules:
|
||||
- install pbuilder-dist.bash_completion to /etc/bash_completion.d/
|
||||
|
||||
[ Daniel Holbach ]
|
||||
* hugdaylist: drop one Ubuntu filter statement.
|
||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -10,5 +10,9 @@ DEB_INSTALL_MANPAGES_ubuntu-dev-tools = doc/*.1
|
||||
build/ubuntu-dev-tools::
|
||||
docbook2x-man doc/ppaput.1.docbook; mv ppaput.1 doc
|
||||
|
||||
install/ubuntu-dev-tools::
|
||||
mkdir -p debian/ubuntu-dev-tools/etc/bash_completion.d/
|
||||
cp -v pbuilder-dist.bash_completion debian/ubuntu-dev-tools/etc/bash_completion.d/pbuilder-dist
|
||||
|
||||
clean::
|
||||
rm -f doc/ppaput.1
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
# Copyright by:
|
||||
# Jamin W. Collins <jcollins@asgardsrealm.net>
|
||||
# Jordan Mantha <mantha@ubuntu.com>
|
||||
@ -26,7 +27,10 @@ EXTRACOMP=1
|
||||
SAVELOG=0
|
||||
|
||||
# Allow this script to use /var/cache/apt/archives/ when possible
|
||||
SYSCACHE=1
|
||||
if [ -z $SYSCACHE ]
|
||||
then
|
||||
SYSCACHE=1
|
||||
fi
|
||||
|
||||
|
||||
################################
|
||||
@ -102,12 +106,18 @@ distdata()
|
||||
then
|
||||
# Set Debian specific data
|
||||
ISDEBIAN=True
|
||||
ARCHIVE="http://ftp.debian.org"
|
||||
if [ -z $ARCHIVE ]
|
||||
then
|
||||
ARCHIVE="http://ftp.debian.org"
|
||||
fi
|
||||
COMPONENTS="main"$( [ $EXTRACOMP = 0 ] || echo " contrib non-free" )
|
||||
else
|
||||
# Set Ubuntu specific data
|
||||
ISDEBIAN=False
|
||||
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
||||
if [ -z $ARCHIVE ]
|
||||
then
|
||||
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
||||
fi
|
||||
COMPONENTS="main restricted"$( [ $EXTRACOMP = 0 ] || echo " universe multiverse" )
|
||||
fi
|
||||
}
|
||||
@ -172,9 +182,10 @@ fi
|
||||
|
||||
if [ $SYSCACHE != 0 ] && [ "$SYSDIST" = "$DISTRIBUTION" ] && [ "$ARCH" = "$BINARCH" -o -z $BINARCH ]
|
||||
then
|
||||
DEBCACHE='/var/cache/apt/archives/'
|
||||
DEBCACHE='/var/cache/apt/archives/'
|
||||
fi
|
||||
|
||||
|
||||
# Check what version of pbuilder is installed, and if
|
||||
# it's supported, use the --components option
|
||||
if dpkg --compare-versions $(dpkg-query -W -f='${Version}' pbuilder) ge 0.174
|
||||
@ -189,13 +200,62 @@ else
|
||||
COMPONENTS_LINE="--othermirror \"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\""
|
||||
fi
|
||||
|
||||
sudo pbuilder $OPERATION \
|
||||
--basetgz $BASE_DIR/$FOLDERBASE-base.tgz \
|
||||
--distribution $DISTRIBUTION \
|
||||
$( [ -z $BINARCH ] || echo "--debootstrapopts \"--arch\" --debootstrapopts \"$BINARCH\"" ) \
|
||||
$( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \
|
||||
$( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \
|
||||
--buildresult $BASE_DIR/${FOLDERBASE}_result \
|
||||
--mirror "$ARCHIVE" \
|
||||
$COMPONENTS_LINE \
|
||||
$@
|
||||
if [ -n $http_proxy ] || [ -n $HTTP_PROXY ]
|
||||
then
|
||||
if [ -n $http_proxy ]
|
||||
then
|
||||
PROXY=$http_proxy
|
||||
else
|
||||
PROXY=$HTTP_PROXY
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $ISDEBIAN = "False" ]
|
||||
then
|
||||
if [ ! -d $BASE_DIR/etc/$DISTRIBUTION/apt.conf/ ]
|
||||
then
|
||||
mkdir -p $BASE_DIR/etc/$DISTRIBUTION/apt.conf
|
||||
fi
|
||||
echo "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" > $BASE_DIR/etc/$DISTRIBUTION/apt.conf/sources.list
|
||||
case $DISTRIBUTION in
|
||||
dapper|edgy|feisty|gutsy )
|
||||
cat >> $BASE_DIR/etc/$DISTRIBUTION/apt.conf/sources.list <<EOF
|
||||
deb $ARCHIVE $DISTRIBUTION-security $COMPONENTS
|
||||
deb $ARCHIVE $DISTRIBUTION-updates $COMPONENTS
|
||||
EOF
|
||||
;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n $DESKTOP_SESSION ]
|
||||
then
|
||||
case $DESKTOP_SESSION in
|
||||
gnome )
|
||||
SUDOREPLACE="gksudo -D \"Pbuilder\" "
|
||||
;;
|
||||
kde|kde4 )
|
||||
SUDOREPLACE="kdesudo -d --comment \"Pbuilder\""
|
||||
;;
|
||||
* )
|
||||
SUDOREPLACE="sudo"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
SUDOREPLACE="sudo"
|
||||
fi
|
||||
|
||||
|
||||
$SUDOREPLACE "pbuilder $OPERATION \
|
||||
--basetgz $BASE_DIR/$FOLDERBASE-base.tgz \
|
||||
--distribution $DISTRIBUTION \
|
||||
--debootstrapopts --arch --debootstrapopts $BINARCH \
|
||||
$( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \
|
||||
$( [ -z $PROXY ] || echo "--http-proxy $PROXY" ) \
|
||||
$( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \
|
||||
--buildresult $BASE_DIR/$FOLDERBASE_result \
|
||||
--mirror "$ARCHIVE" \
|
||||
--aptconfdir $BASE_DIR/etc/$DISTRIBUTION/apt.conf/ \
|
||||
$@"
|
||||
|
31
pbuilder-dist.bash_completion
Normal file
31
pbuilder-dist.bash_completion
Normal file
@ -0,0 +1,31 @@
|
||||
# Debian GNU/Linux cowbuilder(1) completion
|
||||
# Copyright 2007 Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>
|
||||
#
|
||||
# This script can be distributed under the same license as the
|
||||
# cowdancer or bash packages.
|
||||
#
|
||||
# adapted to pbuilder, the license is GPLv2 or later.
|
||||
# Copyright 2007 Junichi Uekawa <dancer@debian.org>
|
||||
|
||||
have pbuilder-dist &&
|
||||
_pbuilder-dist()
|
||||
{
|
||||
local cur prev options
|
||||
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
options='create update build login execute dumpconfig'
|
||||
|
||||
case $prev in
|
||||
build)
|
||||
COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
[ "$have" ] && complete -F _pbuilder-dist -o filenames pbuilder-dist
|
Loading…
x
Reference in New Issue
Block a user