kristi edited this page Jun 4, 2012 · 2 revisions
Clone this wiki locally

Welcome to the spackle wiki!

Spackle Specs

Create a local system at $HOME/local. (So you have a $HOME/local/etc folder for config files, $HOME/local/usr/bin for binary executables, $HOME/local/usr/lib for libraries, etc.)

Activating spackle tells your system about these new paths.

  • add $HOME/local/usr/bin to $PATH
  • setup MANPATH
  • setup pkg-config path
  • setup CFLAGS and LDFLAGS for compiling C code

Package Management

Update list of installable packages at $HOME/local/var/cache/spackle/sync

  • ArchLinux official binary packages: download the core.db, extra.db, and community.db indices (these are tarballs of package desc and depends files.)
  • ArchLinux build scripts (ABS): generate file list from ABS rsync server or svn repo
  • ArchLinux user repo (AUR) scripts: generate file list from AUR git repo's cgit interface. (Alternative is to use aur3.org to download PKGBUILD tarball)
  • Debian binary packages
  • Debian source packages

Package cache

  • Store built packages at $HOME/local/var/cache/spackle/packages
  • Build source packages inside $HOME/local/var/cache/spackle/build

Package installation

  • Installed packages have a folder at $HOME/local/var/cache/local/package_name
  • Retain file list (for uninstallation) and package info at $HOME/local/var/cache/local/package_name/files
  • Retain package info (version, description, dependencies) at $HOME/local/var/cache/local/package_name/desc
  • If the package is installed as a dependency for another explicitly installed parent package, record the parent package name in $HOME/local/var/cache/local/package_name/installed_for

Package uninstallation

  • Delete files listed in $HOME/local/var/cache/local/package_name/files
  • Remove self from child dependencies
  • Ask to remove children which are no longer needed
  • Remove $HOME/local/var/cache/local/package_name

Dependency resolution

  • Use a config file to ignore some dependencies like glibc for system libraries which are already installed.

Package hacking

  • For binary packages of executables and libraries, try to use patchelf to modify the RPATH in the elf header so that the dynamic linker can find shared libraries in our '$HOME/local' folder.
  • For C/C++ source packages set environment variables CFLAGS="-I$HOME/local/usr/include" CXXFLAGS="-I$HOME/local/usr/include" LDFLAGS="-L$HOME/local/usr/lib -Wl,-rpath,$HOME/local/usr/lib" LD_RUN_PATH="$HOME/local/usr/lib" Also consider trying to set rpath to a relative location $ORIGIN/../lib so that packages are redistributable to different users