mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 00:21:08 +00:00
* Merge Siegfried-Angel Gevatter Pujals' branch.
This commit is contained in:
commit
2f692b0857
2
debian/rules
vendored
2
debian/rules
vendored
@ -4,3 +4,5 @@ DEB_PYTHON_SYSTEM := pycentral
|
||||
|
||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||
include /usr/share/cdbs/1/class/python-distutils.mk
|
||||
|
||||
DEB_INSTALL_MANPAGES_ubuntu-dev-tools = doc/*.1
|
||||
|
104
doc/pbuilder-dist.1
Normal file
104
doc/pbuilder-dist.1
Normal file
@ -0,0 +1,104 @@
|
||||
.\" Title: pbuilder-dist
|
||||
.\" Author: Siegfried-Angel Gevatter Pujals
|
||||
.\" Contact details: siggi.gevatter@gmail.com
|
||||
.\" August 16, 2007
|
||||
.\"
|
||||
.TH PBUILDER-DIST 1 "August 16, 2007"
|
||||
.\"
|
||||
.SH NAME
|
||||
pbuilder-dist \- multi-distribution pbuilder wrapper
|
||||
.\"
|
||||
.SH SYNOPSIS
|
||||
\fBpbuilder-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP] [\fBmainonly\fP|\fBallcomp\fP]
|
||||
[\fBwithlog\fP|\fBnolog\fP] \fIoperation\fR [\fI...\fR]
|
||||
.\"
|
||||
.SH DESCRIPTION
|
||||
\fBpbuilder-dist\fP is a wrapper that makes it easy to use pbuilder with many different
|
||||
versions of Ubuntu and / or Debian.
|
||||
.PP
|
||||
It is common to symlink this script in order to give it many names in the form of
|
||||
\fBpbuilder-\fIdistribution\fP\fR (\fBpbuilder-\fIdistribution\fR-\fIarchitecture\fP\fR on amd64
|
||||
systems), like for example \fBpbuilder-feisty\fP, \fBpbuilder-sid\fP, \fBpbuilder-gutsy-i386\fP, etc.
|
||||
.\"
|
||||
.SH USAGE
|
||||
There are many arguments listed on the synopsis. Each of them, if used, has to be used
|
||||
exactly in the same order as it appears there. In case you renamed the script to
|
||||
\fBpbuilder-\fIdistribution\fP\fR, do not use the \fBdistribution\fP parameter; same with
|
||||
\fBi386\fP / \fBamd64\fP if the name also contains -\fIarchitecture\fR.
|
||||
.TP
|
||||
\fBdistribution\fP
|
||||
Replace this with the codename of the version of Ubuntu or Debian you want to use.
|
||||
.TP
|
||||
\fBi386\fP / \fBamd64\fP
|
||||
Only available on amd64 systems. This is optional; default is \fBamd64\fP. If \fBi386\fP is
|
||||
specified, an i386 environment will be used.
|
||||
.TP
|
||||
\fBmainonly\fP / \fBallcomp\fP
|
||||
This is optional; default is \fBallcomp\fP. If you specify \fBmainonly\fP, only packages from
|
||||
the main (in Debian) or main and restricted (in Ubuntu) components will be used. With the
|
||||
later one, all official components will be enabled. This only has effect when creating a new
|
||||
environment.
|
||||
.TP
|
||||
\fBwithlog\fP / \fBnolog\fP
|
||||
This is optional; default is \fBnolog\fP. When \fBwithlog\fP is used, \fBpbuilder\fP will save the
|
||||
output produced by the current action in a dot-file called \fB.lastlog\fP in it's base directory
|
||||
(see the FILES section). If this file already exists, it will be overwritten.
|
||||
.TP
|
||||
\fBoperation\fP
|
||||
Replace this with the action you want \fBpbuilder\fP to do (create, update, build, clean, login
|
||||
or execute). Check it's manpage for more details.
|
||||
.TP
|
||||
\fB[...]\fP
|
||||
.br
|
||||
Replace this with other parameters, if needed. For example, if \fBbuild\fP is the option,
|
||||
you will need to also specify a .dsc file.
|
||||
.PP
|
||||
The default value of all optional parameters (except the architecture) can be changed by
|
||||
editing the first lines of the script.
|
||||
.\"
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
pbuilder-dist gutsy create
|
||||
Creates a \fBpbuilder\fP environment for Ubuntu Gutsy, with all components enabled.
|
||||
.TP
|
||||
pbuilder-sid mainonly create
|
||||
Creates a \fBpbuilder\fP environment for Debian Sid, with only the main component.
|
||||
.TP
|
||||
pbuilder-feisty build ./sample_1.0-0ubuntu1.dsc
|
||||
Builds the specified package on an already existing Ubuntu Feisty environment.
|
||||
.TP
|
||||
pbuilder-dist feisty withlog build ./sample_1.0-0ubuntu1.dsc
|
||||
Same as above, but stores \fBpbuilder\fP's output on a file.
|
||||
.TP
|
||||
pbuilder-etch i386 update
|
||||
Updates an existing i386-architecture Debian Etch environment on an amd64 system.
|
||||
.\"
|
||||
.SH FILES
|
||||
By default, \fBpbuilder-dist\fP will store all the files it generates in \fB~/pbuilder/\fP. This can
|
||||
be changed modifying the BASE_DIR value on the top of the script to any other directory you
|
||||
want. If it doesn't exist, it will be created on the run.
|
||||
.\"
|
||||
.SH BUGS
|
||||
There are no known bugs at the moment. If you experience any problem with this script
|
||||
contact me on siggi.gevatter@gmail.com. Please ensure first that the problem is really this
|
||||
script and not an issue with \fBpbuilder\fP.
|
||||
.\"
|
||||
.SH AUTHORS
|
||||
\fBpbuilder-dist\fP was originally written by Jamin W. Collins <jcollins@asgardsrealm.net> and
|
||||
Jordan Mantha <mantha@ubuntu.com>.
|
||||
.PP
|
||||
On August 2007 it was mostly rewritten, and extended, by Siegfried-Angel Gevatter Pujals
|
||||
<siggi.gevatter@gmail.com>.
|
||||
.\"
|
||||
.SH SEE ALSO
|
||||
\fBpbuilder\fR, \fBpbuilderrc\fR
|
||||
.\"
|
||||
.SH COPYRIGHT
|
||||
This manual page was written by Siegfried-Angel Gevatter Pujals (RainCT)
|
||||
<siggi.gevatter@gmail.com> for YOU.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU General Public License,
|
||||
Version 2 or any later version published by the Free Software Foundation.
|
||||
.PP
|
||||
On Debian based systems, the complete text of the GNU General Public
|
||||
License can be found in \fB/usr/share/common-licenses/GPL\fP.
|
@ -12,9 +12,6 @@
|
||||
# / version, rename it to 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy',
|
||||
# or whatever it is. If you have an amd64, you can also use names like
|
||||
# 'pbuilder-feisty-i386', etc.
|
||||
#
|
||||
# The only variable you really might need to change is BASE_DIR, if you
|
||||
# don't want pbuilder stuff in your home directory.
|
||||
|
||||
# Base directory where pbuilder will put all the files it creates
|
||||
BASE_DIR="$HOME/pbuilder"
|
||||
@ -23,13 +20,22 @@ BASE_DIR="$HOME/pbuilder"
|
||||
# contrib and non-free in Debian.)
|
||||
EXTRACOMP=1
|
||||
|
||||
# Save the log of the last operation in a dot-file? ('.lastlog' in BASE_DIR)
|
||||
SAVELOG=0
|
||||
|
||||
ARCH=`dpkg-architecture | grep "DEB_HOST_ARCH=" | cut -f2 -d '='`
|
||||
# Allow this script to use /var/cache/apt/archives/ when possible
|
||||
SYSCACHE=1
|
||||
|
||||
|
||||
################################
|
||||
|
||||
ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
|
||||
SYSDIST=`lsb_release -cs`
|
||||
|
||||
help()
|
||||
{
|
||||
echo "Insufficient number of arguments."
|
||||
echo "Usage: $0 "$( [ "$1" != 'show-dist-flag' ] || echo "<distribution> " )$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"[mainonly|allcomp] <operation>"
|
||||
echo "Usage: $0 "$( [ "$1" != 'show-dist-flag' ] || echo "<distribution> " )$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"[mainonly|allcomp] [withlog|nolog] <operation>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -55,8 +61,7 @@ fi
|
||||
|
||||
if [ $1 = "i386" ] || [ $1 = "amd64" ]
|
||||
then
|
||||
if [ $ARCH = "amd64" ]
|
||||
then
|
||||
if [ $ARCH = "amd64" ]; then
|
||||
BINARCH=$1
|
||||
else
|
||||
echo "Warning: Architecture switching is not supported on your system; ignoring argument."
|
||||
@ -66,17 +71,24 @@ then
|
||||
fi
|
||||
|
||||
|
||||
if [ $1 = "mainonly" ]
|
||||
then
|
||||
if [ $1 = "mainonly" ]; then
|
||||
EXTRACOMP=0
|
||||
shift 1
|
||||
elif [ $1 = "allcomp" ]
|
||||
then
|
||||
elif [ $1 = "allcomp" ]; then
|
||||
EXTRACOMP=1
|
||||
shift 1
|
||||
fi
|
||||
|
||||
|
||||
if [ $1 = "withlog" ]; then
|
||||
SAVELOG=1
|
||||
shift 1
|
||||
elif [ $1 = "nolog" ]; then
|
||||
SAVELOG=0
|
||||
shift 1
|
||||
fi
|
||||
|
||||
|
||||
distdata()
|
||||
{
|
||||
if [ "$1" = "debian" ]
|
||||
@ -122,6 +134,7 @@ OPERATION=$1
|
||||
|
||||
case $OPERATION in
|
||||
create|update|build|clean|login|execute)
|
||||
shift 1
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -136,15 +149,24 @@ case $OPERATION in
|
||||
;;
|
||||
esac
|
||||
|
||||
FOLDERBASE="${DISTRIBUTION}-$( ([ "$BINARCH" != "" ] && echo $BINARCH) || echo $ARCH )"
|
||||
|
||||
if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]
|
||||
if [ ! -d $BASE_DIR/${FOLDERBASE}_result ]
|
||||
then
|
||||
mkdir -p $BASE_DIR/${DISTRIBUTION}_result
|
||||
mkdir -p $BASE_DIR/${FOLDERBASE}_result
|
||||
fi
|
||||
|
||||
if [ $SYSCACHE != 0 ] && [ "$SYSDIST" = "$DISTRIBUTION" ] && [ "$ARCH" = "$BINARCH" -o -z $BINARCH ]
|
||||
then
|
||||
DEBCACHE='/var/cache/apt/archives/'
|
||||
fi
|
||||
|
||||
sudo pbuilder $OPERATION \
|
||||
--basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
|
||||
--basetgz $BASE_DIR/$FOLDERBASE-base.tgz \
|
||||
--distribution $DISTRIBUTION \
|
||||
$( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \
|
||||
--buildresult $BASE_DIR/${DISTRIBUTION}_result \
|
||||
--othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@
|
||||
$( [ -z $BINARCH ] || echo "--debootstrapopts \"--arch\" --debootstrapopts \"$BINARCH\"" ) \
|
||||
$( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \
|
||||
$( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \
|
||||
--buildresult $BASE_DIR/${FOLDERBASE}_result \
|
||||
--othermirror "\"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\"" \
|
||||
$@
|
||||
|
Loading…
x
Reference in New Issue
Block a user