Skip to content

Package Management Policy

glaucus uses the filesystem tree as its database to store package metadata and recipes.

Cerata

ceras

  • Avoid versions in nom
  • Avoid -e and -x in the shebang (vague behavior)
  • Do not add common packages that are expected to exist at build-time as build dependencies (e.g. make, linux-headers and so on)

prepare

  • Updating config.guess, config.sub and config.rpath is not enough; use autoreconf -vfis instead
  • Packages that use autoreconf, need runstatedir (copied from the system)
  • Prefer autogen.sh and bootstrap.sh and provided autoreconf upstream scripts instead of manually running the command
  • Disable po4a generation and gtkdocize if the autoreconf scripts allow that
  • Patches are typically applied in prepare
  • Patches should use -p0
  • Packages should not deal with $SRCD, only with $TMPD
  • Do not store commands inside variables
  • Avoid modifications to manual pages as they render autoreconf harder; require more stuff

configure

  • Avoid substituting flag strings with variables like nom
  • Use glaucus-configure for autoconf build systems
  • Use glaucus-cmake for cmake build systems
  • Use glaucus-muon for muon and meson build systems
  • Use full paths to glaucus-* files in build.cross

Disable

  • Disable assert
  • Disable audit
  • Disable dbus
  • Disable debug
  • Disable doc
  • Disable examples
  • Disable gettext
  • Disable i18n
  • Disable iconv
  • Disable idn
  • Disable intltool
  • Disable l10n
  • Disable logind
  • Disable man
  • Disable nls
  • Disable pam
  • Disable polkit
  • Disable rpath
  • Disable selinux
  • Disable static
  • Disable symvers
  • Disable systemd
  • Disable tests
  • Disable x11
  • Disable year2038

Enable

  • Enable acl
  • Enable attr
  • Enable ipv6
  • Enable lto
  • Enable pic
  • Enable pie
  • Enable pthreads
  • Enable shared
  • Enable threads=posix
  • Enable tls
  • Enable xattr

build

  • PassCFLAGS, CXXFLAGS and LDFLAGS as arguments to make and not as environment variables, so they are propagated correctly:
Terminal window
## Correct
make foo=bar
## Incorrect, might get unexported in the Makefile and not get passed to submakes
foo=bar make

check

  • Report packages without a test suite
  • Report failing tests
  • Try VERBOSE=1 V=1 for make check
  • Prefer make -k check to keep going until all tests are checked
  • If tests fail in parallel, try -j1
  • Compare failing tests with Alpine and LFS

package

  • Do not install to the following directories: /boot, /dev, /mnt, /run, /sys, /tmp
  • Brace expansion is not POSIX
  • Use mkdir -pv over install -dv
  • cp -a implies -R/-r/--recursive
  • ln -r is not POSIX
  • touch is faster than :>
  • Group commands that deal with multiple arguments into one (e.g. cp, rm, mkdir (if same permissions)…)
  • Group commands that are repeated 3 or more times into for loops
  • Everything related to s6 should reside under /etc/s6
  • All text files must end with a newline (POSIX)
  • Prefer strip targets install-strip to manually running strip
  • Do not create fifo files in build.cross as they can’t be copied

Repository Layout

  • /var/cache/rad/pkg (binary packages, contains sac (DESTDIR) + tarball + sum)
  • /var/cache/rad/src (source tarballs, read-only, equals SRCD)
  • /var/lib/rad/clusters/cerata (official cluster, equals CERD)
  • /var/lib/rad/clusters/custom (custom cluster)
  • /var/lib/rad/pkg (track installed packages using another form of metadata, with checksums and files)
  • /var/log/rad (log files, equals LOGD)
  • /var/tmp/rad (temporary build files)

Local

Remove additional files:

  • .a (static libraries)
  • .alias
  • .bs (perl files)
  • .cmd (kernel files)
  • .dbg
  • .install (kernel files)
  • .la (libtool archives)
  • .packlist (perl files) (alpine)
  • .pod (perl files) (void)
  • .py (python files)
  • .pyc (python files) (ewe)
  • .pyo (python files) (ewe)
  • alias
  • application (kiss)
  • charset
  • consolekit (kiss)
  • completion
  • dbus
  • doc (kiss)
  • extralibs (perl files)
  • gdb (kiss)
  • gettext (kiss)
  • gtk-doc (kiss)
  • i18n
  • icon (kiss)
  • info (kiss)
  • intl (kiss)
  • locale
  • logind (kiss)
  • man (kiss)
  • pam
  • polkit (kiss)
  • pulse (kiss)
  • sound (kiss)
  • systemd
  • test (ewe)
  • zsh (kiss)

Resources