From BCCD 3.0
- Why is it necessary to allow a hard-coded setting for debmirror when we have a configuration file?
- HARD-CODED SETTINGS
- Can any/all of these be moved into the configuration file?
- FILE COPIES
- Can these be packaged up?
- Can we ship man pages?
Re-working using custom scripts
BCCD is a Debian distribution with some customizations:
- Custom kernel for stackable filesystem (aufs)
- Lots of custom files that are pulled from SVN during ISO build
- Two custom run modes:
- Live (transient, off ISO)
- Liberated (persistent, off HDD)
- Write a build driver that produces a stock Debian live ISO w/ custom kernel for aufs
- Package up the contents of SVN as one or more deb packages
- Install deb packages as part of build
The following Jenkins projects will be used:
- Build the
- Build the ISO image after fpm, using
Jenkins can call Makefile targets:
- Builds the .deb package, triggers ISO build
- Builds the ISO image in a temporary directory
- Requires that a fresh checkout (or simulation) be done so the temporary directory is removed
- Bootstraps a chroot'd Debian system, removes directory if it fails
Assign the following SVN attributes to files:
- User name for file after packaging
- Group name for file after packaging
- Permissions mode for file after packaging
The process that builds the
deb package will produce a YAML dictionary of dictionaries, keyed on file name. Each key will then point to a second dictionary, with entries for the above attributes.
A post-install script can set the permissions and ownership for each file based on the array.
File conflicts b/w packages
BCCD will install files that conflict with other packages. While it does its best to avoid the situation via include files or
.d directoriews, some packages do not support this (i.e.
The legacy build process simply overwrites files, but our goal here is to package all files. To that goal, look into using diversions:
In testing, the
--local causes conflicts even if the file is renamed. Running just with
--rename solves the problem.
A for loop in the before-install script will have a list of conflicting files and generate a list of files to divert, which can then be used by the after-install script to remove the diversions.
These are configurations that can be removed:
- This used to be used to generate host SSH keys. Presumably at some point this didn't happen automatically, but it does now
Scripts executed by the
deb package should be placed in
bin/deb and referenced in the Makefile via
Pinning packages to BCCD repo
/etc/apt/preferences.d/100_bccd file will set a high (900) priority for all packages that can be found in the BCCD apt repo (keying on Origin in Reprepro).
https://wiki.debian.org/AptPreferences for more details.
Probably not anything useful for us, kept for posterity
- How to maintain version control?
- How to continue using CI?
Used to maintain the
--create- Create a new changelog file
--append- Add changelog entry
--increment- Increment version number
--edit- Interactive editor mode
--release- Finalize changelog on release
--closes- Closes particular bug
- Depends on various environment variables:
DEBEMAIL="firstname.lastname@example.org" DEBFULLNAME="Firstname Lastname" export DEBEMAIL DEBFULLNAME
- live-build seems to be pretty immature; I (and a number of other people) have been unable to get it to work on modern Debian or Ubuntu
lb_config(1)) makes a config skeleton. Useful options:
--architecture: Specify ISA (i.e. amd64)
--binary-images: Specify output format (i.e. iso)
--apt: Set to apt or aptitude (probably aptitude)
--bootstrap-flavour: Minimal or standard, probably want minimal so we can select our own packages *this option does not appear to exist in the wheezy build*
--distribution: Set to current Debian codename
--interactive: Specify interactive shell to use for testing purposes
--archive-areas: Specify archive areas of a package repo to include
--linux-packages: Supply custom linux .deb package name
--apt-indices: Set to false to remove apt indices after build
--apt-recommends: Set to false to install only prioritized packages
--apt-options / --aptitude-options: Pass in apt/aptitude options directly
--bootappend-live "boot=live components username=live-user": Customize live user name
- Provide custom package lists in
#ifpragma can match distribution, architecture, and archive area
- live/chroot includes can provide files directly in live image w/o packaging them
- hook scripts can be run after applying configuration
- live user made dynamically at boot time
lb build will start the build process.
- Use Python logging module
Vagrant/LXC + Jenkins
The goal is to isolate the build host from the build process. See https://wiki.debian.org/VagrantLXC
/etc/default/lxc-netand then restart
USE_LXC_BRIDGE="true" LXC_BRIDGE="lxcbr0" LXC_ADDR="10.0.3.1" LXC_NETMASK="255.255.255.0" LXC_NETWORK="10.0.3.0/24" LXC_DHCP_RANGE="10.0.3.2,10.0.3.254" LXC_DHCP_MAX="253" LXC_DHCP_CONFILE="" LXC_DOMAIN=""
lxc.network.type = veth lxc.network.flags = up lxc.network.link = lxc-bridge-nat
/etc/dnsmasqand then restart
- Initialize vagrant environment:
vagrant init debian/stretch64
VAGRANT_HOME=/var/tmp vagrant up --provider=lxc