3
# Copyright © 2006-2007 Roger Leigh <rleigh@debian.org>
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation, either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program. If not, see
17
# <http://www.gnu.org/licenses/>.
19
#######################################################################
27
print STDERR "Usage: $0 <username>\n";
31
usage() if (@ARGV < 1);
36
my $user = getpwnam($_);
39
$status += system("/usr/sbin/adduser", "$_", "sbuild");
41
print STDERR "W: User \"$_\" does not exist\n";
49
Next, copy the example sbuildrc file to the home directory of each user and
50
set the variables for your system:
55
my $home = (getpwnam($_))[7];
56
print STDERR " cp /usr/share/doc/sbuild/examples/example.sbuildrc $home/.sbuildrc\n";
63
/usr/share/sbuild/chrapt <distribution> apt-get update
64
/usr/share/sbuild/chrapt <distribution> apt-get upgrade
65
(or "/usr/share/sbuild/chrapt <distribution> apt-get -f install"
66
first if the chroot is broken)
67
sbuild -d <distribution> <package>_<version>