Changes

Jump to: navigation, search

Build Server

1,666 bytes added, 13:43, 22 August 2014
* 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 <code>emerge-webrsync</code> since it features an already determined version, checksum- and gpg-validation.
 
{{Cmd
|git clone $YOURGITREPO portage
|cd portage
|PORTAGE_RSYNC_EXTRA_OPTS{{=}}"--exclude{{=}}/.git" PORTDIR{{=}}"${PWD}" emerge-webrsync
|output=<pre>
Trying to retrieve 20140819 snapshot from http://mirror.switch.ch/mirror/gentoo ...
Fetching file portage-20140819.tar.xz.md5sum ...
Fetching file portage-20140819.tar.xz.gpgsig ...
Fetching file portage-20140819.tar.xz ...
Checking digest ...
Getting snapshot timestamp ...
Syncing local tree ...
 
</pre>}}
 
If you instead get the following then there is no newer snapshot available:
{{Cmd
|PORTDIR{{=}}"${PWD}/portage" emerge-webrsync
|output=<pre>
Fetching most recent snapshot ...
* Latest snapshot date: 20140821
*
* Approximate snapshot timestamp: 1408668300
* Current local timestamp: 1408667701
*
* The current local timestamp is possibly identical to the
* timestamp of the latest snapshot. In order to force sync, use
* the --revert option or remove the timestamp file located at
* '/run/user/1000/portage/metadata/timestamp.x'.
</pre>}}
 
Set the tag and push if there was an update:
{{Cmd
|cd portage/
|git add -A
|snapshot_date{{=}}$(date --date{{=}}@$(cut -f 1 -d " " portage/metadata/timestamp.x) +%Y-%m-%d)
|git commit -m "Update tree to ${snapshot_date}"
|git tag -a -m "Tagging ${snapshot_date}" ${snapshot_date}
|git push && git push --tags
|echo "snapshot date: ${snapshot_date}"
}}
 
== Chroot Setup ==