~ubuntu-branches/debian/squeeze/sbuild/squeeze

« back to all changes in this revision

Viewing changes to chroot/README.chroot

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2005-04-01 21:23:30 UTC
  • mfrom: (1.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050401212330-lnjvuwrm9urpy54l
Tags: 0.35
Michael Banck:

* bin/abort-current-build: Remove the `-B' from the grep line as
  `sbuild -s' does not pass that option to dpkg-configure and abort-
  current-build fails in that case.
* sbuild: Set the locale to `POSIX' to make debconf and debhelper calls in
  the chroot not spew out locale warnings all the time.
  (closes: #287672)
* sbuild: Removed check for specific distributions. Instead, fail if
  build/chroot-$dist is not there.
* sbuild: Only override Distribution in .changes if specified as option on
  the command-line.
  (closes: #300145)
* sbuild: Specify full path for Dir::Etc::main and Dir::Etc::parts.
* example.sbuildrc: Clarify that $maintainer_name is not mandatory and
  overrides Maintainer: field, whereas $uploader_name overrides
  the Changed-By: field in changes.
* Applied patch by Santiago Vila:
  - Moves scripts from /usr/lib/sbuild to /usr/share/sbuild and modifies
    all callers accordingly.
  - Add -n option to tail to comply with POSIX.
  - Call /usr/sbin/sendmail instead of /usr/lib/sendmail.
  (closes: #292717)
* sbuild: Tolerate '0' as version number, thanks Santiago Vila.
  (closes: #300205)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
This should be more automated and should probably use debootstrap.
3
 
For now it's a manual setup best suited for those experienced with
4
 
Debian.  /usr/local/chroot/stable/ is expected to be empty if it
5
 
exists.  It will be created otherwise.
6
 
 
7
 
The chroots can be anywhere you like.  Only the
8
 
~/chroot-{stable,unstable} symlinks count as far as sbuild is
9
 
concerned.
10
 
 
11
 
-------------------------------------------------------------------------
12
 
Make a potato chroot
13
 
====================
14
 
 
15
 
makechroot script
16
 
-----------------
17
 
  - in doc/sbuild/chroot/ directory; builds a potato chroot in
18
 
    /usr/local/chroot/stable
19
 
  
20
 
    1. it fetches potato base2_2.tgz for your arch.  Uses existing
21
 
       one if it's in /usr/local/chroot.
22
 
    2. untars it in /usr/local/chroot/stable
23
 
        - this must be done as root.  wget the base2_2.tgz as non-root
24
 
        first if you like and put it in /usr/local/chroot.
25
 
    3. copies over some config files from the base install
26
 
    4. puts you in the chroot so you can upgrade it to current potato
27
 
         - you may want to "apt-get clean" after updating...before
28
 
         copying to /usr/local/chroot/unstable for sure
29
 
 
30
 
fixchroot script
31
 
----------------
32
 
  - in doc/sbuild/bin/; makes some files/dirs in the chroot and copies
33
 
    over some config files from base
34
 
 
35
 
    mkdir -p $CHROOT/build/$USER
36
 
    chown $USER $CHROOT/build/$USER
37
 
    chgrp -R sbuild $CHROOT/build
38
 
    chmod -R 775 $CHROOT/build
39
 
 
40
 
    # add a lockdir in the chroot for sbuild
41
 
    mkdir -p $CHROOT/var/lib/sbuild/srcdep-lock
42
 
    chgrp -R sbuild $CHROOT/var/lib/sbuild
43
 
    chmod -R 775 $CHROOT/var/lib/sbuild
44
 
 
45
 
    # copy some base files over
46
 
    cd $CHROOT
47
 
    cp \
48
 
        /etc/fstab \
49
 
        /etc/group \
50
 
        /etc/host.conf \
51
 
        /etc/hostname \
52
 
        /etc/hosts \
53
 
        /etc/hosts.allow \
54
 
        /etc/hosts.deny \
55
 
        /etc/mailname \
56
 
        /etc/nsswitch.conf \
57
 
        /etc/passwd \
58
 
        /etc/resolv.conf \
59
 
        /etc/services \
60
 
        /etc/shadow \
61
 
        /etc/sudoers \
62
 
        /etc/timezone \
63
 
        etc/
64
 
 
65
 
-------------------------------------------------------------------------
66
 
Make a sid chroot
67
 
=================
68
 
 
69
 
  - no script for this.  You'll want to delete the debs in
70
 
    /var/cache/apt/archives and umount proc before copying the
71
 
    chroot over.
72
 
  - you should also run the checkchroot script to see what has to
73
 
    be installed to and removed from the chroot.  The stable chroot
74
 
    /proc has to be mounted to purge ppp, but you don't want it
75
 
    mounted when you copy stable -> unstable.
76
 
 
77
 
1. Copy over the stable chroot to unstable as root:
78
 
 
79
 
    # cp -ax /usr/local/chroot/stable /usr/local/chroot/unstable
80
 
 
81
 
2. edit /usr/local/chroot/unstable/etc/apt/sources.list URIs from
82
 
   stable to unstable:
83
 
 
84
 
    deb http://http.us.debian.org/debian unstable main contrib non-free
85
 
    deb-src http://http.us.debian.org/debian unstable main contrib non-free
86
 
    deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
87
 
    deb-src http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
88
 
 
89
 
3. do the upgrade
90
 
 
91
 
    # gochroot -u
92
 
    # apt-get update
93
 
    # apt-get -fu dist-upgrade
94
 
 
95
 
4. optionally, copy the ref-* files to the chroot base
96
 
 
97
 
   The ref-* files are used by the checkchroot script to show the
98
 
   differences between the programs installed in the chroots and
99
 
   the standard clean references.  The only packages listed in
100
 
   ref-{stable,unstable} (and installed in the chroots) should be
101
 
   essential & build-essential and the additional packages that
102
 
   sbuild needs -- apt, fakeroot, ssmtp, sudo.  Please check.
103
 
 
104
 
    # cp /usr/share/doc/sbuild/configs/ref-{stable,unstable} /usr/local/chroot
105
 
 
106
 
 
107
 
Please let me know of any problems; I don't have a suitable
108
 
connection for testing this currently.  If memory serves,
109
 
dpkg-dev and build-essential may have to be (re-)installed
110
 
manually after the dist-upgrade.  The checkchroot script will
111
 
tell you if anything's missing.
112
 
 
113
 
 
114
 
# vim:et