1 | This hierarchy contains Debian/Ubuntu-specific materials, also known |
---|
2 | as "Debathena". The contents are: |
---|
3 | |
---|
4 | * debathena - Debathena-specific software packages such as PAM and NSS |
---|
5 | modules. |
---|
6 | |
---|
7 | * config - Packages for configuring native system software in a manner |
---|
8 | appropriate for Athena. |
---|
9 | |
---|
10 | * meta - Packages which contain nothing but dependencies on other |
---|
11 | packages and serve as an installation convenience. |
---|
12 | |
---|
13 | * scripts - Build scripts and supporting materials. |
---|
14 | |
---|
15 | Debathena is a SIPB project, and its infrastructure and procedures |
---|
16 | will need to be adapted for Athena 10. For the moment this file will |
---|
17 | document the Debathena procedures as they are, not as they will be. |
---|
18 | The current procedures do not even use this svn repository yet. |
---|
19 | |
---|
20 | Debian software used by Debathena: |
---|
21 | |
---|
22 | * schroot - Used to manage build chroot environments for each |
---|
23 | Debian/Ubuntu version. We use the lvm-snapshot schroot type, |
---|
24 | which allows rapid construction of ephemeral copies of template |
---|
25 | "source" chroots, so that every binary package build is done in a |
---|
26 | clean environment. |
---|
27 | |
---|
28 | * debuild - Used to create Debian source packages from package |
---|
29 | source directories. |
---|
30 | |
---|
31 | * sbuild - Used to build binary packages from source packages inside |
---|
32 | schroot environments. |
---|
33 | |
---|
34 | * equivs - Used to create packages which only contain dependency |
---|
35 | information. Somewhat of a dirty hack, since it doesn't keep |
---|
36 | proper changelogs, but it reduces overhead. |
---|
37 | |
---|
38 | * CDBS (Common Debian Build System) - Referenced by debian/rules |
---|
39 | files in packages. Contains standard build rules to cut down on |
---|
40 | per-package boilerplate. |
---|
41 | |
---|
42 | * reprepro - Used to upload packages into the apt repositories. |
---|
43 | |
---|
44 | * approx - Used to create a local cache of Debian packages on the |
---|
45 | build server. This cache is referenced by the build chroots for |
---|
46 | improved performance. |
---|
47 | |
---|
48 | Procedures used by Debathena for handling day-to-day package changes |
---|
49 | for regular packages: |
---|
50 | |
---|
51 | * To prepare a change to a regular package, the contents are edited |
---|
52 | directly in the /mit/debathena/packages subdir. |
---|
53 | |
---|
54 | * To record the prepared change in the changelog: |
---|
55 | (From inside the package source directory) |
---|
56 | dadch |
---|
57 | |
---|
58 | * To build and deploy the changed package for all environments: |
---|
59 | (From inside the package source directory, on debuild.mit.edu) |
---|
60 | debuild -S |
---|
61 | cd .. |
---|
62 | da sbuildhack <filename>.dsc |
---|
63 | |
---|
64 | * Generally the package is tested by manually installing it on test |
---|
65 | machines with dpkg -i. |
---|
66 | |
---|
67 | * To deploy the package to the repository: |
---|
68 | (From the package source parent directory, on debuild.mit.edu as |
---|
69 | the debuild user) |
---|
70 | daupload-release <filename>_source.changes |
---|
71 | |
---|
72 | * If the package is architecture-independent, the -A option is |
---|
73 | passed to da and daupload-release. |
---|
74 | |
---|
75 | For an equivs-built package, the process is simpler since there is no |
---|
76 | source package and only one binary package: |
---|
77 | |
---|
78 | * To prepare a change to the control file, the contents are edited |
---|
79 | directly in the /mit/debathena/packages subdir. |
---|
80 | |
---|
81 | * To build the binary package: |
---|
82 | (From the package directory, on debuild.mit.edu) |
---|
83 | equivs-build --full <filename>.equivs |
---|
84 | |
---|
85 | * To deploy the package to the repository: |
---|
86 | daequivsupload <filename>.changes |
---|
87 | |
---|
88 | Adding a new distribution: |
---|
89 | |
---|
90 | <not yet written> |
---|
91 | |
---|
92 | Bootstrapping a build area, build server, and apt repository: |
---|
93 | (Adapted for Athena 10) |
---|
94 | |
---|
95 | 1. Create the package repository (detailed instructions on this |
---|
96 | pending). Set the DEBATHENA_APT environment variable to point to |
---|
97 | the package repository. Put a copy of the debathena "scripts" |
---|
98 | subdir in your path. |
---|
99 | |
---|
100 | 2. Create the build area. |
---|
101 | |
---|
102 | 3. Build each equivs package under meta/ using "equivs-build --full |
---|
103 | *.equivs" and upload each with "daequivsupload *.changes". This |
---|
104 | has the side-effect of creating the basic structure of the |
---|
105 | package repository. |
---|
106 | |
---|
107 | 4. Set up the build server. The basic structure of the apt |
---|
108 | repository must work for make-chroot to succeed, so this must |
---|
109 | happen after step 3. |
---|
110 | |
---|
111 | 5. For each normal Debian package in dependency order, cd into its |
---|
112 | directory in the build area and run "da sbuildhack *.dsc" and |
---|
113 | "daupload-release *_source.changes". |
---|
114 | |
---|
115 | The all-packages script can generate an approximation of the |
---|
116 | package list in dependency order, but it doesn't work right yet, |
---|
117 | and ideally it would be possible to do several builds in parallel |
---|
118 | using a Makefile like the one in scripts/build-server/build-all. |
---|
119 | Improvements to this machinery are pending. |
---|
120 | |
---|
121 | 6. Build the packages under third (instructions pending). |
---|
122 | |
---|
123 | Setting up a build server: |
---|
124 | (Adapted for Athena 10) |
---|
125 | |
---|
126 | 1. The build server must be installed with free space in an LVM |
---|
127 | volume group. The build chroots consume 2GB each. |
---|
128 | |
---|
129 | 2. Install debathena-standard as per the the instructions in |
---|
130 | http://debathena.mit.edu/install. |
---|
131 | |
---|
132 | 3. apt-key add /afs/dev.mit.edu/system/athena10/apt/athena10-archive.asc |
---|
133 | |
---|
134 | 4. Install the packages listed in |
---|
135 | scripts/build-server/packages (using "aptitude install") |
---|
136 | |
---|
137 | 5. Install debathena-login, debathena-ssh-server, and |
---|
138 | debathena-build-depends (using "aptitude install"). |
---|
139 | |
---|
140 | (Depending on how recently debathena-build-depends was rebuilt, |
---|
141 | additional packages might need to be installed to satisfy the |
---|
142 | build-depends of newer packages. This can be taken care of later |
---|
143 | when an error occurs building a source package.) |
---|
144 | |
---|
145 | 6. Edit /etc/security/access.conf and add a first line: |
---|
146 | -:ALL EXCEPT root <developer usernames>:ALL |
---|
147 | |
---|
148 | 7. Edit /etc/group and add the developers to the sbuild group. |
---|
149 | |
---|
150 | 8. Create /etc/passwd entries for each developer with "hesinfo |
---|
151 | username passwd >> /etc/passwd" and then run pwconv. |
---|
152 | |
---|
153 | (This is not necessary for the login system on the main root |
---|
154 | environment, but is for the chroot environments.) |
---|
155 | |
---|
156 | 9. Append to /etc/approx/approx.conf the contents of |
---|
157 | scripts/build-server/approx.conf.tail. |
---|
158 | Change the last line from http://debathena.mit.edu/apt to |
---|
159 | file:///afs/dev.mit.edu/system/athena10/apt |
---|
160 | Add "$interval 0" above the repository lines (only necessary if |
---|
161 | the version of approx as reported by "dpkg -l approx" is less |
---|
162 | than 3.0) |
---|
163 | Run: /etc/init.d/approx restart |
---|
164 | |
---|
165 | 10. Apply scripts/build-server/10mount.patch. |
---|
166 | |
---|
167 | 11. For each supported DIST (see scripts/debian-versions.sh) run: |
---|
168 | |
---|
169 | VG=/dev/blah scripts/build-server/make-chroot DIST i386 |
---|
170 | VG=/dev/blah scripts/build-server/make-chroot DIST amd64 |
---|
171 | |
---|
172 | substituting the name of the volume group for blah. Omit the |
---|
173 | amd64 line if DIST is sarge. |
---|
174 | |
---|
175 | Example: VG=/dev/dink scripts/build-server/make-chroot gutsy i386 |
---|
176 | |
---|
177 | Removing a build chroot on the build server: |
---|
178 | |
---|
179 | 1. Run VG=/dev/blah scripts/clean-schroots to make sure that the |
---|
180 | build chroot is not mounted, substituting the name of the volume |
---|
181 | group for blah. |
---|
182 | |
---|
183 | 2. Edit /etc/schroot/schroot.conf and delete the section |
---|
184 | corresponding to the chroot. |
---|
185 | |
---|
186 | 3. Run lvchange -an blah/chrootname |
---|
187 | substituting the name of the volume group for blah and the chroot |
---|
188 | name for chroot. Example: lvchange -an dink/gutsy-i386-sbuild |
---|
189 | |
---|
190 | 4. Run lvremove blah/chrootname |
---|
191 | |
---|
192 | Setting up a build area: |
---|
193 | (Adapted for Athena 10) |
---|
194 | |
---|
195 | 1. Create an empty directory and cd into it. The canonical build |
---|
196 | area lives in /afs/dev.mit.edu/project/release/10/build. |
---|
197 | |
---|
198 | 2. Run scripts/gen-packages to create the table of normal Debian |
---|
199 | packages. |
---|
200 | |
---|
201 | 3. Run scripts/dasource to create subdirs and source packages for |
---|
202 | each normal Debian package. |
---|
203 | |
---|
204 | 4. Create checkouts of the meta and third directories: |
---|
205 | |
---|
206 | svn co svn+ssh://svn.mit.edu/athena/trunk/debathena/meta |
---|
207 | svn co svn+ssh://svn.mit.edu/athena/trunk/debathena/third |
---|
208 | |
---|
209 | (A couple of subdirectories of debathena/meta are normal Debian |
---|
210 | packages, so this will create redundant copies of those. Ignore |
---|
211 | them; they won't be used.) |
---|