Difference between revisions of "Build Server"
From stoney cloud
[unchecked revision] | [unchecked revision] |
Line 19: | Line 19: | ||
|PORTAGE_RSYNC_EXTRA_OPTS{{=}}"--exclude{{=}}/.git" PORTDIR{{=}}"${PWD}" emerge-webrsync | |PORTAGE_RSYNC_EXTRA_OPTS{{=}}"--exclude{{=}}/.git" PORTDIR{{=}}"${PWD}" emerge-webrsync | ||
|output=<pre> | |output=<pre> | ||
− | Trying to retrieve | + | Fetching most recent snapshot ... |
− | Fetching file portage- | + | Trying to retrieve 20140821 snapshot from http://mirror.switch.ch/mirror/gentoo ... |
− | Fetching file portage- | + | Fetching file portage-20140821.tar.xz.md5sum ... |
− | Fetching file portage- | + | Fetching file portage-20140821.tar.xz.gpgsig ... |
+ | Fetching file portage-20140821.tar.xz ... | ||
Checking digest ... | Checking digest ... | ||
Getting snapshot timestamp ... | Getting snapshot timestamp ... | ||
Line 29: | Line 30: | ||
</pre>}} | </pre>}} | ||
− | If you | + | {{Warning|If you get the following instead then there is no newer snapshot available}} |
+ | |||
{{Cmd | {{Cmd | ||
− | |PORTDIR{{=}}"${PWD} | + | |PORTAGE_RSYNC_EXTRA_OPTS{{=}}"--exclude{{=}}/.git" PORTDIR{{=}}"${PWD}" emerge-webrsync |
|output=<pre> | |output=<pre> | ||
Fetching most recent snapshot ... | Fetching most recent snapshot ... | ||
Line 49: | Line 51: | ||
|cd portage/ | |cd portage/ | ||
|git add -A | |git add -A | ||
− | |snapshot_date{{=}}$(date --date{{=}}@$(cut -f 1 -d " " | + | |snapshot_date{{=}}$(date --date{{=}}@$(cut -f 1 -d " " metadata/timestamp.x) +%Y-%m-%d) |
− | |git commit -m "Update tree to ${snapshot_date}" | + | |git commit -m "Update portage tree to ${snapshot_date}" |
|git tag -a -m "Tagging ${snapshot_date}" ${snapshot_date} | |git tag -a -m "Tagging ${snapshot_date}" ${snapshot_date} | ||
|git push && git push --tags | |git push && git push --tags |
Revision as of 14:52, 22 August 2014
Contents
Overview
- Base chroot environment for the creation of most binary packages which will be copied to the Binary Package Server.
- Packages, which don't need to be built, for example Oracle's Java SE Development Kit (JDK), can be fetched from the Mirror Server.
- Software stacks built upon specialized binary packages, require their own chroot environment. If possible, avoid this.
- For reproducibility, Portage and Profiles are frozen with the help of version control system (git in our case). This is only done on the Mirror Server.
- When building packages in a chroot environment, the portage and overlay versions need to set.
Portage Snapshotting
To be able to reliably rebuild packages, we are working with a snapshotted/versioned portage tree.
Updating the snapshot to latest
We are using emerge-webrsync
since it features an already determined version, checksum- and gpg-validation.
Warning
If you get the following instead then there is no newer snapshot available
Set the tag and push if there was an update:
Chroot Setup
Preparation
At least the following is required beforehand to ensure reproducible building:
- a versioned portage tree
- versioned overlays (if any)
Setup
- Create a staging root and extract a stage3 or stage4 tarball
- Mount proc, sys and dev (required for portage to control the tty, determine available storage space, etc.)
- Copy /etc/resolv.conf
- Enter the chroot
Note
We are deliberately using a special command to enter the chroot to avoid leaking environment variables