Quote:
Originally Posted by 62chevy
|
root用户
添加用户buildd
# cd /home
# chmod 2775 buildd
buildd 用户
$ su - buildd
$ install --directory --mode=2770 --owner=buildd --group=buildd build logs old-logs upload-security
$ install --directory --mode=2775 --owner=buildd --group=buildd stats stats/graphs upload
$ echo '|/usr/bin/buildd-mail' > ~/.forward
$ install --directory --mode=2770 --owner=buildd --group=buildd ~buildd/chroot
root用户
# apt-get install apt-transport-https
# echo "deb
https://buildd.debian.org/apt/ squeeze main" >> /etc/apt/sources.list
# wget -O buildd-apt.archive-key.asc
https://buildd.debian.org/apt/archive-key.asc
# apt-get install buildd-builder-meta
# sbuild-adduser buildd
# echo "debian_mirror=http://ftp.debian.org/debian/" > /etc/schroot/conf.buildd
# echo "buildd ALL=(ALL) ALL" >>/etc/sudoers
buildd 用户
$ touch dist.sh
#!/bin/sh
DISTS="oldstable oldstable-security stable stable-security testing testing-security unstable"
for d in $DISTS
do
/usr/share/sbuild/create-chroot $d
done
$ sh dist.sh
$ cp /etc/dupload.conf ~/.dupload.conf
$ cp /usr/share/doc/sbuild/examples/example.sbuildrc .sbuildrc
$ touch crontab.sh
/15 * * * * /usr/bin/buildd-uploader
/30 * * * * /usr/bin/buildd-watcher
$ ln -sv build/chroot-unstable /chroots/sid
$ ssh-keys
root用户
# reboot
$ buildd
thks
i'm want to set up buildd
i do it like this:
# apt-get install apt-transport-https
# echo "deb
https://buildd.debian.org/apt/ squeeze main" >> /etc/apt/sources.list
# wget -O buildd-apt.archive-key.asc
https://buildd.debian.org/apt/archive-key.asc
# apt-get install buildd-builder-meta
# echo "debian_mirror=http://ftp.us.debian.org/debian/" > /etc/schroot/conf.buildd
echo "buildd ALL=NOPASSWD: /sbin/lvcreate, /sbin/mkfs.ext3, /bin/mount, /bin/umount, /sbin/lvremove, /usr/sbin/debootstrap, /bin/mkdir, /bin/mv,
/bin/chown, /bin/chmod, /bin/bash" >> /etc/sudoers
# su - buildd
buildd$ cp /usr/share/doc/sbuild/examples/example.sbuildrc .sbuildrc
buildd$ cp /etc/dupload.conf ~/.dupload.conf
buildd$ touch dist.sh
#!/bin/sh
DISTS="oldstable oldstable-security stable stable-security testing testing-security unstable"
for d in $DISTS
do
/usr/share/sbuild/create-chroot $d
done
buildd$ sh dist.sh
buildd$ buildd
buildds $ ps aux | grep buildd
111 1019 0.0 1.7 7888 5440 ? Ss 14:50 0:00 /usr/bin/perl /usr/bin/buildd
buildd 1983 0.0 0.2 6540 900 ? Ss 14:51 0:00 /usr/sbin/exim4 -bd -q30m
buildd 4843 0.0 0.3 2500 1072 pts/0 S 14:53 0:00 su - buildd
buildd 4867 0.0 0.5 3008 1644 pts/0 S 14:53 0:00 -su
buildd 11639 0.0 0.2 2396 936 pts/0 R+ 14:56 0:00 ps aux
buildd 11640 0.0 0.1 1828 524 pts/0 S+ 14:56 0:00 grep buildd
buildd$ cat daemon.log
distribution list is empty, aborting. at /usr/share/perl5/Buildd/Daemon.pm line 95.
buildd$ vi /etc/buildd/buildd.conf
# buildd.conf: global buildd settings that will survive -*- Perl -*-
# an upgrade.
#
# Default settings are commented out.
# Note that all possible settings are listed here.
# Some may be set by each individual user in their
# ~/.builddrc, but are listed here for completeness.
##
## LOGGING
##
# Set to 1 to enable verbose messages.
#$verbose = 0;
# Set to a number >= 1 to enable debugging messages.
#$debug = 0;
# Disable becoming a daemon, for debugging purposes.
# Set to 1 to stop daemonising, otherwise set to 0 to become a daemon.
$no_detach = 0;
##
## WANNA-BUILD DATABASE
##
# Configure SSH to connect to a remote wanna-build host. If wanna-build
# is running locally, set $wanna_build_ssh_host to an empty string.
# SSH program
$ssh = "/usr/bin/ssh";
# nice level to run sbuild. Dedicated build daemons should not be
# niced.
$nice_level = 10;
# tell the packages build system to run in parallel
# check the number of available CPUs first
$ENV{'DEB_BUILD_OPTIONS'} = 'parallel=2';
# time to sleep when idle (between wanna-build --list=needs-build calls)
#$idle_sleep_time = 5*60;
# Minimum free space (in KiB) on build filesystem
$min_free_space = 50*1024; # 50 MiB
# how long to avoid packages that have automatically been given back by sbuild
# (in minutes)
$delay_after_give_back = 8 * 60; # 8 hours
# how many days until to archive package logs
$pkg_log_keep = 7;
# how many days until to archive build logs
$build_log_keep = 2;
# Main buildd daemon log file
$daemon_log_file = "$HOME/daemon.log";
# how many days until to rotate daemon logs (one is kept as daemon.log.old,
# others are moved to old-logs and gzipped)
$daemon_log_rotate = 1;
# Whether or not to email rotated daemon logs via mail to the admin
$daemon_log_send = 1;
# how many days until to archive old daemon logs in a .tar.gz
$daemon_log_keep = 7;
# age (in days) after which a warning is issued for file in upload and
# dirs in build
$warning_age = 7;
# if more than 5 error mails are received within that time, they're
# not forwarded to avoid possible mail loops
$error_mail_window = 8*60*60;
# period for making of statistic summary
$statistics_period = 7;
# buildd-watcher doesn't complain about old files if they match the regexp
# below
$no_warn_pattern = '^build/(SKIP|REDO|SBUILD-GIVEN-BACK|buildd\.pid|[^/]*.ssh|chroot-[^/]*)$';
# Should buildd send "Should I build" messages?
$should_build_msgs = 1;
$autoclean_interval = 86400;
# threshold for a secondary daemon to start (number of Needs-Build packages)
$secondary_daemon_threshold = 70;
# mail addr of admin
$admin_mail = "root";
# mail address where to send statistics summaries
$statistics_mail = 'root';
# log success messages from upload queue daemon?
$log_queued_messages = 0;
# PID file to identify running daemon
$pidfile = "$HOME/build/daemon.pid";
# list of distributions that buildd should take packages from
@distributions = (
{
# # name of the suite to build (also used to query wanna-build)
dist_name => ["unstable", "testing"],
#
# # architecture to be built (will be passed to sbuild and can be)
# # used to compute wanna_build_db_name
built_architecture => undef,
#
# # host on which wanna-build is run
wanna_build_ssh_host => "buildd.debian.org",
#
# # user as who we are going to connect to the host running wanna-build
wanna_build_ssh_user => "buildd_arch",
#
# # SSH control socket path for ssh -S option
wanna_build_ssh_socket => '',
#
# # Additional SSH options used when connecting
wanna_build_ssh_options => [],
#
# # database used for wanna-build
wanna_build_db_name => "arch/build-db",
#
# # Username to use for wanna-build.
wanna_build_db_user => $Buildd::username,
#
# # Local queue directory where binaries are stored before uploaded
# # by dupload. You need to configure this directory in
# # @upload_queues to get packages uploaded from there.
dupload_local_queue_dir => "upload",
#
# # list of packages which shouldn't be picked up by buildd
no_auto_build => [],
#
# # list of packages which should only be taken if there absolutely
# # nothing else to do (probably packages included in no_auto_build
# # because they take too long)
weak_no_auto_build => [],
#
# # regex used to filter out unwanted packages:
# #no_build_regex => "^(contrib/|non-free/)?non-US/",
#
# # regex used to filter packages to build:
# #build_regex => "",
#
# # mail addr of buildd admin handling packages from this distribution
logs_mailed_to => $admin_mail,
#
# # schroot name (or alias) of the chrooted environment to use for
# # building (will be passed to sbuild). sbuild's default is
# # the first of $distribution-$arch-sbuild, $distribution-sbuild,
# # $distribution-$arch and $distribution.
sbuild_chroot => undef,
}
);
@upload_queues = (
{
# # Local queue directory where binaries are stored before uploaded
# # by dupload.
dupload_local_queue_dir => "upload",
#
# # Upload site for buildd-upload to pass to dupload(1); see
# # /etc/dupload.conf for possible values.
dupload_archive_name => "anonymous-ftp-master",
},
#
{
# # Local queue directory where binaries are stored before uploaded
# # by dupload.
dupload_local_queue_dir => "upload-security",
#
# # Upload site for buildd-upload to pass to dupload(1); see
# # /etc/dupload.conf for possible values.
dupload_archive_name => "security",
}
);
# don't remove this, Perl needs it
1;
buildd$ cd chroots
buildd$ ln -s squeeze stable
buildd$ ln -s wheezy testing
buildd$ ln -s sid unstable
buildd$ cat daemon.log
Jul 15 15:22:07 buildd[17855]: Daemon started. (pid=17855)
Jul 15 15:22:15 buildd[17855]: wanna-build --list=needs-build --dist=unstable failed; status 255/0
Jul 15 15:22:22 buildd[17855]: wanna-build --list=needs-build --dist=testing failed; status 255/0
Jul 15 15:22:22 buildd[17855]: Nothing to do -- sleeping 300 seconds
now i don't know how to