From 670db8f99d9509f908a2b8aacb513ee8d4b56870 Mon Sep 17 00:00:00 2001 From: Siegfried-Angel Gevatter Pujals Date: Mon, 25 Feb 2008 21:11:24 +0100 Subject: [PATCH] Add pbuilder-dist-simple. --- debian/changelog | 3 ++- doc/pbuilder-dist-simple.1 | 49 ++++++++++++++++++++++++++++++++++++++ doc/pbuilder-dist.1 | 4 ---- pbuilder-dist-simple | 44 ++++++++++++++++++++++++++++++++++ setup.py | 1 + 5 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 doc/pbuilder-dist-simple.1 create mode 100755 pbuilder-dist-simple diff --git a/debian/changelog b/debian/changelog index 5721722..c399be7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ubuntu-dev-tools (0.28) UNRELEASED; urgency=low - * + * pbuilder-dist-simple, doc/pbuilder-dist-simple.1, setup.py: + - Add the original pbuilder-dist script as pbuilder-dist-simple. -- Siegfried-Angel Gevatter Pujals (RainCT) Sun, 24 Feb 2008 19:52:06 +0100 diff --git a/doc/pbuilder-dist-simple.1 b/doc/pbuilder-dist-simple.1 new file mode 100644 index 0000000..1ed6954 --- /dev/null +++ b/doc/pbuilder-dist-simple.1 @@ -0,0 +1,49 @@ +.TH PBUILDER\-DIST 1 "February 25, 2008" "ubuntu-dev-tools" + +.SH NAME +pbuilder\-dist\-simple \- simple multi-distribution pbuilder wrapper + +.SH SYNOPSIS +\fBpbuilder\-\fI\fR\fP \fIoperation\fR [\fI...\fR] + +.SH DESCRIPTION +\fBpbuilder\-dist\fP is a wrapper that makes it easy to use pbuilder with +chroots for many different Ubuntu/Debian distributions. If you need more +features than \fBpbuilder\-dist\-simple\fP provides, have a look at +\fBpbuilder\-dist\fP. + +.SH USAGE +Create one symlink to \fBpbuilder\-dist\-simple\fP for each distribution +for which you want a build environment, naming them like "pbuilder-hardy", +"pbuilder-gutsy", etc. +.PP +Replace \fIoperation\fP with the action you want \fBpbuilder\-dist\-simple\fP +to do (create, update, build, clean, login or execute). + +.SH EXAMPLES +.TP +pbuilder\-gutsy create +Creates a \fBpbuilder\fP environment for Ubuntu Gutsy. +.TP +pbuilder\-sid update +Updates an existing Debian Sid environment. +.TP +pbuilder\-hardy build ./sample_1.0\-0ubuntu1.dsc +Builds the specified package on an already existing Ubuntu Hardy environment. + +.SH FILES +By default, \fBpbuilder\-dist\-simple\fP will store all the files it +generates in \fB~/pbuilder/\fP. This can be changed by modifying the +BASE_DIR value on the top of the script to any other directory you want. +If the directory doesn't exit, it will be created at runtime. + +.SH SEE ALSO +\fBpbuilder\fR, \fBpbuilderrc\fR + +.SH AUTHORS +\fBpbuilder\-dist\fP was originally written by Jamin W. Collins + and Jordan Mantha , and +this manpage by Siegfried-A. Gevatter . +.PP +Both are released under the GNU General Public License, version 2 or +later. diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index d271128..1cbd1a6 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -1,7 +1,3 @@ -.\" Title: pbuilder-dist -.\" Author: Siegfried-Angel Gevatter Pujals -.\" Contact details: rainct@ubuntu.com - .TH PBUILDER\-DIST 1 "August 16, 2007" "ubuntu-dev-tools" .SH NAME diff --git a/pbuilder-dist-simple b/pbuilder-dist-simple new file mode 100755 index 0000000..3210226 --- /dev/null +++ b/pbuilder-dist-simple @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Copyright (C) Jamin W. Collins +# Copyright (C) Jordan Mantha +# +# License: GPLv2 or later +# +# This script is a wrapper to be able to easily use pbuilder for +# different distributions (eg, Gutsy, Hardy, Debian unstable, etc). +# +# Create symlinks to this script naming them 'pbuilder-feisty', 'pbuilder- +# gutsy', 'pbuilder-hardy', etc. If you want additional features try +# out the more advanced script 'pbuilder-dist'. + +OPERATION=$1 +DISTRIBUTION=`basename $0 | cut -f2 -d '-'` +PROCEED=false +BASE_DIR="$HOME/pbuilder" +case $OPERATION in + create|update|build|clean|login|execute ) + PROCEED=true + ;; +esac +if [ $PROCEED = true ]; then + shift + if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ] + then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/ + fi + sudo pbuilder $OPERATION \ + --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \ + --distribution $DISTRIBUTION \ + --buildresult $BASE_DIR/$DISTRIBUTION_result \ + --othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" $@ +else + echo "Invalid command..." + echo "Valid commands are:" + echo " create" + echo " update" + echo " build" + echo " clean" + echo " login" + echo " execute" + exit 1 +fi diff --git a/setup.py b/setup.py index 2a7bd96..1c71cf0 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ setup(name='ubuntu-dev-tools', 'check-symbols', 'get-branches', 'pbuilder-dist', + 'pbuilder-dist-simple', 'update-maintainer', 'dch-repeat', 'mk-sbuild-lv',