mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +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 ]
|
[ Stephan Hermann ]
|
||||||
* mk-sbuild-lv: check for debootstrap release names in
|
* mk-sbuild-lv: check for debootstrap release names in
|
||||||
/usr/share/debootstreap/releases and not in /usr/lib/debootstrap/releases
|
/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 ]
|
[ Daniel Holbach ]
|
||||||
* hugdaylist: drop one Ubuntu filter statement.
|
* 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::
|
build/ubuntu-dev-tools::
|
||||||
docbook2x-man doc/ppaput.1.docbook; mv ppaput.1 doc
|
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::
|
clean::
|
||||||
rm -f doc/ppaput.1
|
rm -f doc/ppaput.1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
# Copyright by:
|
# Copyright by:
|
||||||
# Jamin W. Collins <jcollins@asgardsrealm.net>
|
# Jamin W. Collins <jcollins@asgardsrealm.net>
|
||||||
# Jordan Mantha <mantha@ubuntu.com>
|
# Jordan Mantha <mantha@ubuntu.com>
|
||||||
@ -26,7 +27,10 @@ EXTRACOMP=1
|
|||||||
SAVELOG=0
|
SAVELOG=0
|
||||||
|
|
||||||
# Allow this script to use /var/cache/apt/archives/ when possible
|
# 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
|
then
|
||||||
# Set Debian specific data
|
# Set Debian specific data
|
||||||
ISDEBIAN=True
|
ISDEBIAN=True
|
||||||
|
if [ -z $ARCHIVE ]
|
||||||
|
then
|
||||||
ARCHIVE="http://ftp.debian.org"
|
ARCHIVE="http://ftp.debian.org"
|
||||||
|
fi
|
||||||
COMPONENTS="main"$( [ $EXTRACOMP = 0 ] || echo " contrib non-free" )
|
COMPONENTS="main"$( [ $EXTRACOMP = 0 ] || echo " contrib non-free" )
|
||||||
else
|
else
|
||||||
# Set Ubuntu specific data
|
# Set Ubuntu specific data
|
||||||
ISDEBIAN=False
|
ISDEBIAN=False
|
||||||
|
if [ -z $ARCHIVE ]
|
||||||
|
then
|
||||||
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
||||||
|
fi
|
||||||
COMPONENTS="main restricted"$( [ $EXTRACOMP = 0 ] || echo " universe multiverse" )
|
COMPONENTS="main restricted"$( [ $EXTRACOMP = 0 ] || echo " universe multiverse" )
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -175,6 +185,7 @@ then
|
|||||||
DEBCACHE='/var/cache/apt/archives/'
|
DEBCACHE='/var/cache/apt/archives/'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check what version of pbuilder is installed, and if
|
# Check what version of pbuilder is installed, and if
|
||||||
# it's supported, use the --components option
|
# it's supported, use the --components option
|
||||||
if dpkg --compare-versions $(dpkg-query -W -f='${Version}' pbuilder) ge 0.174
|
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\""
|
COMPONENTS_LINE="--othermirror \"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo pbuilder $OPERATION \
|
if [ -n $http_proxy ] || [ -n $HTTP_PROXY ]
|
||||||
--basetgz $BASE_DIR/$FOLDERBASE-base.tgz \
|
then
|
||||||
--distribution $DISTRIBUTION \
|
if [ -n $http_proxy ]
|
||||||
$( [ -z $BINARCH ] || echo "--debootstrapopts \"--arch\" --debootstrapopts \"$BINARCH\"" ) \
|
then
|
||||||
$( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \
|
PROXY=$http_proxy
|
||||||
$( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \
|
else
|
||||||
--buildresult $BASE_DIR/${FOLDERBASE}_result \
|
PROXY=$HTTP_PROXY
|
||||||
--mirror "$ARCHIVE" \
|
fi
|
||||||
$COMPONENTS_LINE \
|
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