From 7e639b510c06b270d0f9ac2f849f0b3843ccd626 Mon Sep 17 00:00:00 2001 From: =?utf8?q?H=C3=A9ctor=20Or=C3=B3n=20Mart=C3=ADnez?= Date: Sun, 16 Jun 2013 10:57:20 +0200 Subject: [PATCH] Replace dchroot porterbox setup and usage by schroot MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Héctor Orón Martínez --- input/doc/install-req.mdwn | 41 ----------- input/doc/schroot.mdwn | 16 ++++ input/howto/dchroot.creole | 146 ------------------------------------- input/index.mdwn | 8 +- 4 files changed, 17 insertions(+), 194 deletions(-) delete mode 100644 input/doc/install-req.mdwn create mode 100644 input/doc/schroot.mdwn delete mode 100644 input/howto/dchroot.creole diff --git a/input/doc/install-req.mdwn b/input/doc/install-req.mdwn deleted file mode 100644 index 79e5a42..0000000 --- a/input/doc/install-req.mdwn +++ /dev/null @@ -1,41 +0,0 @@ -Chroot Install Request Guidelines -================================= - -(stored here for reference, -[original announcement is available](http://lists.debian.org/debian-devel-announce/2010/05/msg00002.html)) - -In order to make dealing with install requests easier for us please -observe the following guidelines: - -1. Install requests should be directed to `debian-admin@lists.debian.org` (and - only there) and the subject should be formed as following: - - Subject: [b-d][$arch|$machine] foobar ($chroot) - - Please start all mails concerning porting chroots with the [b-d] (short for - build-depends) tag. - - Either choose [$arch] (eg. hppa) or a specific [$machine] (eg. paer) and tell - us which package's build dependencies should be installed. - - If you omit $chroot we will assume you meant sid/unstable. - - So build-deps for openoffice.org on smetana in the lenny chroot would look - like this: - - Subject: [b-d][smetana] openoffice.org (lenny) - - This kind of subject tagging will make it easier for us to quickly classify - mail in the admin mailbox, allowing us to sort it into heaps that DSA has to - handle and into requests that our helpers can most likely deal with. - -2. Please refrain giving us a long list of packages to install if possible. - That is, if a simple `apt-get build-dep $foo` will satisfy your request then - all we require is the value of $foo. - - If however the source package isn't yet listed in the chroot's Sources· file - (because it's new or in experimental for instance) that won't be possible. In - that case you will have to provide a list of packages for us to install. - Please cut it down so that it is copy/pastable to an apt-get install command - line, i.e. do not include any `foo | bar` constructs or version constraints - (>= 2.71828). diff --git a/input/doc/schroot.mdwn b/input/doc/schroot.mdwn new file mode 100644 index 0000000..6266cc4 --- /dev/null +++ b/input/doc/schroot.mdwn @@ -0,0 +1,16 @@ +using schroot in debian.org porterboxes +======================================= + +Welcome to porterbox.debian.org, the Debian arch porterbox. + +See 'schroot -l' for a list of available chroots. Start new sessions +with 'schroot --begin-session -c ', run commands in sessions using +'schroot --run-session -c [-- command]', and tear down sessions +using 'schroot --end-session -c '. You can run a limited set of +privileged commands, for instance some of apt-get, using +'dd-schroot-cmd -c '. +Use 'schroot --list --all-sessions' or 'schroot-list-sessions []' +to list (your) open sessions. + +This server is hosted at data centre. + diff --git a/input/howto/dchroot.creole b/input/howto/dchroot.creole deleted file mode 100644 index 4db4160..0000000 --- a/input/howto/dchroot.creole +++ /dev/null @@ -1,146 +0,0 @@ - -== HOWTO set up a porting dchroot on a debian.org machine == - -The script 'upgrade-porter-chroots' has expectations about naming conventions -for new porter chroots. The current list it searches for are: - -{{{ -lenny squeeze wheezy sid \ -lenny_i386 squeeze_i386 wheezy_i386 sid_i386 \ -lenny_amd64 squeeze_amd64 wheezy_amd64 sid_amd64 \ -sid_s390x \ -}}} - -Please make sure that new chroots meet the expectations of the script, or update -the script accordingly (it lives in the debian.org.git repo) - - - -This example is for setting up a $DIST dchroot on paer.debian.org, -adjust accordingly. - -Do the following as root: - -{{{ - echo -n 'Dist: ' && read DIST && export DIST && - echo -n 'Mirror: ' && read MIRROR && export MIRROR && - default_arch="$(dpkg --print-architecture)" && - echo -n "Arch [$default_arch]: " && read ARCH && - if [ -z "$ARCH" ]; then ARCH="$default_arch"; fi && - export ARCH -}}} - - -* create the chroot -{{{ - cd /srv/chroot && - mkdir "${DIST}_${ARCH}" && - debootstrap --keyring /usr/share/keyrings/debian-archive-keyring.gpg --include="apt" --variant=buildd $DIST ./"${DIST}_${ARCH}" http://$MIRROR/debian && - cp /etc/hosts "${DIST}_${ARCH}"/etc/ -}}} - -* enter the chroot and create the chroot tag: -{{{ -chroot "${DIST}_${ARCH}" -echo $DIST > /etc/debian_chroot - -#*) - echo 'Acquire::PDiffs "false";' > /etc/apt/apt.conf.d/local-pdiff - echo 'APT::Install-Recommends 0;' > /etc/apt/apt.conf.d/local-recommends - echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/local-no-lang -# # not sure this one's a good idea, -- weasel 20080829 -# ##echo 'DPkg::Post-Invoke { "(sleep 1; apt-get clean) &"; };' > /etc/apt/apt.conf.d/local-cleanup -# -#*) deploy a policy-rc.d script: - apt-get update && - apt-get install policyrcd-script-zg2 && - cat > /usr/local/sbin/policy-rc.d << EOF && -#!/bin/sh - -# policy-rc.d script for chroots. -# Copyright (c) 2007 Peter Palfrader - -while true; do - case "$1" in - -*) shift ;; - makedev) exit 0;; - *) - echo "Not running services in chroot." - exit 101 - ;; - esac -done -EOF - chmod +x /usr/local/sbin/policy-rc.d - -#*) install and setup locales and install libnss-db - apt-get install locales-all - -# (if locales-all is not feasible on the machine because of say -# disk constraints then install just locales and enable at -# least "en_US.UTF-8 UTF-8" and "en_US ISO-8859-1".) -# -#*) setup nsswitch.conf to properly use the ldap stuff - # [dchroot]: apt-get install libnss-db && - # sed -i -e 's/^passwd:\[[:space:]]\+compat$/passwd: compat db/; - # s/^group:\[[:space:]]\+compat$/group: db compat/; - # s/^shadow:\[[:space:]]\+compat$/shadow: compat db/' \ - # /etc/nsswitch.conf -# -# -# *) - apt-get install vim fakeroot devscripts gdb zsh dialog tcsh -# edit the sources.list in the chroot and add contrib/non-free to the -# primary source, a security updates source, and deb-src entries for both. -# It should end up looking something like - ( - echo "deb http://$MIRROR/debian $DIST main contrib non-free" - echo "deb-src http://$MIRROR/debian $DIST main contrib non-free" - if [ "$DIST" != "sid" ] ; then - echo "deb http://security.debian.org $DIST/updates main contrib non-free" - echo "deb-src http://security.debian.org $DIST/updates main contrib non-free" - fi - ) > /etc/apt/sources.list - apt-get update && apt-get upgrade -# -# -# *) -# exit the chroot - exit -}}} - -* [dchroot only] edit /etc/fstab on the system root and add entries to mount /proc and /home -in the chroot, there will be existing ones for the other chroots, just copy and -adjust. Then mount them (from the system root). -{{{ - :e.g: - : proc-etch /srv/albeniz.debian.org/chroot/etch/proc proc defaults,nosuid,nodev,noexec 0 0 - : proc-lenny /srv/albeniz.debian.org/chroot/lenny/proc proc defaults,nosuid,nodev,noexec 0 0 - : proc-sid /srv/albeniz.debian.org/chroot/sid/proc proc defaults,nosuid,nodev,noexec 0 0 - : - : home /srv/albeniz.debian.org/chroot/etch/home none bind,defaults - : home /srv/albeniz.debian.org/chroot/lenny/home none bind,defaults - : home /srv/albeniz.debian.org/chroot/sid/home none bind,defaults - : - : devpts-etch /srv/albeniz.debian.org/chroot/etch/dev/pts devpts defaults,noexec,nosuid 0 0 - : devpts-lenny /srv/albeniz.debian.org/chroot/lenny/dev/pts devpts defaults,noexec,nosuid 0 0 - : devpts-sid /srv/albeniz.debian.org/chroot/sid/dev/pts devpts defaults,noexec,nosuid 0 0 - : - : shm-etch /srv/albeniz.debian.org/chroot/etch/dev/shm tmpfs defaults,nosuid,nodev 0 0 - : shm-lenny /srv/albeniz.debian.org/chroot/lenny/dev/shm tmpfs defaults,nosuid,nodev 0 0 - : shm-sid /srv/albeniz.debian.org/chroot/sid/dev/shm tmpfs defaults,nosuid,nodev 0 0 - : - : tmp /srv/albeniz.debian.org/chroot/etch/tmp none bind,defaults - : tmp /srv/albeniz.debian.org/chroot/lenny/tmp none bind,defaults - : tmp /srv/albeniz.debian.org/chroot/sid/tmp none bind,defaults -}}} - -* [schroot] set up /etc/schroot/chroot.d/ correctly. - [dchroot]: edit /etc/dchroot.conf in the system root, add an entry for $DIST, and update the stable and testing pointers - -* [dchroot]: run ud-replicate so the new chroot is setup (this would happen via cron eventually, this is just to speed things up) -{{{ - ud-replicate -}}} - -* as a normal user, test that the new chroot works: "dchroot $DIST" or "schroot $DIST", test that the stable and testing pointers work. diff --git a/input/index.mdwn b/input/index.mdwn index 9f5fdbf..de6d632 100644 --- a/input/index.mdwn +++ b/input/index.mdwn @@ -6,10 +6,6 @@ which as some howto mainly targeted for the team members. To contact us, mail debian-admin@lists.debian.org. -To request installation of build dependencies please -[mail us following some guidelines](doc/install-req). -For other things you can also create a ticket in [RT](http://wiki.debian.org/Teams/DSA/RTUsage). - For a list of servers check [ud-ldap](https://db.debian.org/machines.cgi), or [munin](http://munin.debian.org/), or @@ -30,8 +26,7 @@ ticket. * [RT Usage](http://wiki.debian.org/Teams/DSA/RTUsage) - offsite * [DSA usertagged bugreports](http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=debian-admin@lists.debian.org) - offsite * [[user/sudo]]: How to set sudo passwords. -* [[doc/install-req]]: guidelines to request package installation in chroots -* [dchroot documentation](http://www.debian.org/doc/developers-reference/resources.html#dchroot): How dchroot can be used on porter machines +* [[doc/schroot]]: How schroot can be used on porter machines * [[doc/guest-account]]: guest account access to porter machines * [[doc/subdomains]]: facilities offered to teams with a dedicated subdomain @@ -56,7 +51,6 @@ ticket. * [[howto/add-account]]: How to add accounts to ud-ldap / upgrade guest accounts * [[howto/swarm-kernel]]: How to build kernels for our swarm boxes * [[howto/drac-reset]]: How to beat the radacm rootk^Wbinary only software. -* [[howto/dchroot]]: porter chroots setup * [[howto/new-dpl]]: What to do when we have a new DPL * [New DSA manual](http://dsa.debian.org/dsa-manual/_build/html/) -- 2.20.1