This is an old revision of the document!
Installing packages
fbpkg
is the package manager for SnackLinux.
Update the packages list by running fbpkg update
Search for packages fbpkg search tetris
Install a package
fbpkg install vitetris
You can also set the installation directory by running
FB_INSTALL_PATH=/tmp/fb fbpkg install vitetris
Remove a package
fbpkg remove vitetris
Upgade the system (currently only supports one package at a time)
fbpkg update && fbpkg upgrade
For instructions on building a package, see the building packages page. Below are the current compilation options for SnackLinux packages. For reference /path/to/staging
is a placeholder path when packaging.
Non-native
Required patches:
Note: gcc-5.2.0-musl.patch is a merged patch from these patches: https://bitbucket.org/GregorR/musl-gcc-patches
patch -p1 -i ./gcc-5.2.0-musl.patch patch -p1 -i ./gmp-config.patch patch -p1 -i ./mpc-config.patch patch -p1 -i ./mpfr-config.patch patch -p1 -i ./x86.diff
(Out of tree build)
$PWD/../gcc-5.2.0/configure --prefix=/usr --target=x86_64-linux-musl --host=x86_64-linux-musl \ --enable-languages=c,c++ --disable-debug --enable-threads=posix --disable-multilib --disable-nls \ --disable-shared --disable-bootstrap --without-cloog --disable-lto-plugin --disable-libmudflap \ --disable-libsanitizer --with-sysroot=/opt/snacklinux_rootfs
Note: extracted Docker images can be extracted for use as the sysroot if a full build of SnackLinux is undesireable
make LDFLAGS="-s" CFLAGS="-s"
make DESTDIR=/path/to/staging \ install-gcc \ install-target-libgcc \ install-target-libssp \ install-target-libstdc++-v3
Note: this specs file is included by default: http://snacklinux.org/tars/patches/gcc-5.2.0/specs
linux-headers Using this .config
make headers_install ARCH=x86_64 INSTALL_HDR_PATH=/path/to/install/headers/to
linux-modules
make modules make modules_install ARCH=x86_64 INSTALL_MOD_PATH=/path/to/install/headers/to
Native
./configure --prefix=/usr sh build.sh
Currently a bug running ./make install
./make DESTDIR=/__pkg install
So for now, the binary is just copied in a tarball
./configure --disable-zlib make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 SCPPROGRESS=1 strip cp dropbearmulti /path/to/staging/usr/bin && cd /path/to/staging/usr/bin ln -s dropbearmulti dropbearkey ln -s dropbearmulti dbclient ln -s dropbearmulti scp ln -s dropbearmulti dropbear
Usage:
mkdir /etc/dropbear && cd /etc/dropbear dropbearkey -t rsa -f dropbear_rsa_host_key dropbearkey -t dss -f dropbear_dss_host_key dropbear
make CC=x86_64-linux-musl-gcc CFLAGS=-s LDFLAGS=-s
Example usage: ln -s /usr/bin/ucpp /lib/cpp
./configure --prefix=/ make make DESTDIR=/path/to/staging install
binutils 2.26 Note: binutils is first compiled using the cross compiler, so this is using the cross-compiled binutuls to compile a native binutils
LDFLAGS="-Wl,-static" \ CFLAGS="-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -s -static" \ ./configure --disable-shared --disable-multilib --disable-nls --prefix=/usr --with-sysroot=/ make make DESTDIR=/path/for/staging install
make mkdir -p /path/for/staging/{bin,man} make PREFIX=/path/for/staging install
./configure --prefix=/usr/bin make make DESTDIR=/path/for/staging install
./configure --disable-bibp-urls --disable-dired --with-screen=slang --disable-finger --disable-gopher --disable-news --prefix=/usr/bin make make DESTDIR=/path/for/staging install
sed -i 's/CC=gcc/CC=musl-gcc -static/' src/Makefile #Remove glibc specific line sed -i '185d' src/lilo.c make alles cp src/lilo.static /staging/bin/lilo
./configure --prefix=/usr --without-cxx-binding --without-shared --with-normal --without-debug --with-termlib --enable-widec make make DESTDIR=/path/to/staging install
The patch is made from this commit https://github.com/ncopa/redis/commit/6056a76392b52a5b38e57aec2c7ca46b748df298 against redis stable 3.0.0
cd src/ && wget http://snacklinux.org/tars/patches/redis-3.0.0-c99-musl.patch patch < redis-3.0.0-c99-musl.patch cd .. make make PREFIX=/path/to/staging install
LDFLAGS="-static" ./configure --with-ncurses --prefix=/usr --disable-nls make make PREFIX=/path/to/staging install
./configure --prefix=/usr make make PREFIX=/path/to/staging install
sed -i 's/gcc/musl-gcc -static/' Makefile make make PREFIX=/path/to/staging install
./configure --prefix=/usr --disable-shared make make DESTDIR=/path/to/staging install
make CC="musl-gcc -static" make prefix=/path/to/staging install
./configure --prefix=/usr --static make make DESTDIR=/path/to/staging install
./configure --prefix=/ --enable-ipv6 make make DESTDIR=/path/to/staging install
./configure --prefix=/usr make make DESTDIR=/path/to/staging install
LDFLAGS="-L/usr/lib" ./configure --prefix=/usr --disable-shared make make DESTDIR=/path/to/staging install
make posix test CFLAGS="-static" make local
./configure --prefix=/usr --with-ipv6 --with-threads --without-http_rewrite_module make make DESTDIR=/path/to/staging install
./configure --disable-extra --enable-tiny --prefix=/usr make make DESTDIR=/path/to/staging install
tcc 0.9.26 Get this patch http://snacklinux.org/tars/patches/tcc-0.9.26.patch
patch -p1 -i ./tcc-0.9.26.patch ./configure --cc=musl-gcc --extra-cflags=-static --prefix=/usr --strip-binaries make make DESTDIR=/path/to/staging install
Note: Use the '-static' flag in usage
./buildepoch.sh --outpath /path/to/staging --disable-backtraces
./configure --prefix=/usr make make DESTDIR=/path/to/staging install
//Note: Automake is needed which requires Perl which isn't available yet. The following files are needed to compile pkgconf: http://snacklinux.org/tars/scripts/pkgconf-0.9.11.config.h.in http://snacklinux.org/tars/scripts/pkgconf-0.9.11.configure ./configure --prefix=/usr make make DESTDIR=/path/to/staging install
Usage:
export PKG_CONFIG=/usr/bin/pkgconf
python 2.7.9 Note: libressl is required to build the ssl modules Required patches: http://snacklinux.org/tars/patches/python-2.7.9/datetime.patch
http://snacklinux.org/tars/patches/python-2.7.9/rand-egd.patch
Required Modules/Setup file: http://snacklinux.org/tars/patches/python-2.7.9/Setup
patch -p1 -i ./datetime.patch patch -p1 -i ./rand-egd.patch ./configure --prefix=/usr --enable-ipv6 --enable-unicode --disable-shared LDFLAGS="-static -static-libgcc" CPPFLAGS="-static" make make DESTDIR=/path/to/staging install
Note: Python is experimental and several modules fail to build. See below for the failed modules.
_codecs_cn _codecs_hk _codecs_iso2022 _codecs_jp _codecs_kr _codecs_tw _ctypes _ctypes_test _curses _curses_panel _hashlib _hotshot _json _lsprof _multibytecodec _multiprocessing <del>_ssl</del> audioop bz2 dl future_builtins imageop linuxaudiodev ossaudiodev readline syslog
CFLAGS=-static LDFLAGS=-static CPPFLAGS="-I/include -I/usr/include" \ ./configure --prefix=/usr make make DESTDIR=/path/to/staging install