===== Installing packages ======
For a list of all packages available see: http://snacklinux.geekness.eu/repo/pub/packageslist.txt (x86)
''[[https://github.com/snacsnoc/fbpkg|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|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 =====
**Note**: It is easier to use pre-built toolchains from here: https://musl.cc/#binaries (native builds)
**[[http://ftp.gnu.org/gnu/gcc/gcc-5.2.0/|gcc 5.2.0]]**
Required patches:
* http://snacklinux.org/tars/patches/gcc-5.2.0/gcc-5.2.0-musl.patch
* http://snacklinux.org/tars/patches/gcc-5.2.0/gmp-config.patch
* http://snacklinux.org/tars/patches/gcc-5.2.0/mpc-config.patch
* http://snacklinux.org/tars/patches/gcc-5.2.0/mpfr-config.patch
* http://snacklinux.org/tars/patches/gcc-5.2.0/x86.diff
//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|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**
//[[https://github.com/snacsnoc/snacklinux/blob/master/configs/linux/.config|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
** dropbear 2022.82**
CC=i486-linux-musl-gcc CROSS_COMPILE=i486-linux-musl- ./configure --disable-zlib --host=i486-linux-musl --enable-static
CC=i486-linux-musl-gcc make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 SCPPROGRESS=1 strip
===== Native =====
**[[http://ftp.gnu.org/gnu/make/|make 4.2]]**
./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
**[[https://matt.ucc.asn.au/dropbear/dropbear.html|dropbear 2022.82]]**
./configure --disable-zlib --enable-static
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
**[[https://code.google.com/p/ucpp/|ucpp 1.3.2]]** ([[https://bitbucket.org/snacsnoc/ucpp|mirror]])
make CC=x86_64-linux-musl-gcc CFLAGS=-s LDFLAGS=-s
Example usage: ln -s /usr/bin/ucpp /lib/cpp
** [[http://www.musl-libc.org/|musl 1.1.18]]**
./configure --prefix=/
make
make DESTDIR=/path/to/staging install
** [[http://mama.indstate.edu/users/ice/tree/|tree 1.7.0]]**
make
make prefix=/path/to/staging install
----
**[[http://ftp.gnu.org/gnu/binutils/|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
** [[http://v3.sk/~lkundrak/dev86/|bin86 0.16.21]]**
make
mkdir -p /path/for/staging/{bin,man}
make PREFIX=/path/for/staging install
** [[http://www.victornils.net/tetris/|vitetris 0.57]]**
./configure --prefix=/usr/bin
make
make DESTDIR=/path/for/staging install
** [[http://elinks.or.cz/|elinks 0.11.7]]**
./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
** [[http://lilo.alioth.debian.org/|lilo 24.2]] **
See: https://bugs.gentoo.org/792567
wget http://snacklinux.geekness.eu/tars/patches/lilo-geometry.patch
sed -i 's/CC=gcc/CC=musl-gcc -static/' src/Makefile
#Remove glibc specific line
sed -i '185d' src/lilo.c
patch -p1 < lilo-geometry.patch
make alles
cp src/lilo.static /staging/bin/lilo
**[[http://ftp.gnu.org/pub/gnu/ncurses/|ncurses 5.9]]**
./configure --prefix=/usr --without-cxx-binding --without-shared --with-normal --without-debug --with-termlib --enable-widec
make
make DESTDIR=/path/to/staging install
**[[http://redis.io/|redis 3.0.0]]**
//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
**[[http://invisible-island.net/dialog/dialog.html|dialog 1.2]]**
LDFLAGS="-static" ./configure --with-ncurses --prefix=/usr --disable-nls
make
make PREFIX=/path/to/staging install
** [[http://ftp.gnu.org/gnu/m4/|m4 1.4.17]] **
./configure --prefix=/usr
make
make PREFIX=/path/to/staging install
** [[http://www.bzip.org/|bzip 1.0.6]]**
sed -i 's/gcc/musl-gcc -static/' Makefile
make
make PREFIX=/path/to/staging install
** [[http://freetype.org/|freetype 2.5.5]]**
./configure --prefix=/usr --disable-shared
make
make DESTDIR=/path/to/staging install
** [[http://www.zlib.net/|zlib 1.2.8]]**
./configure --prefix=/usr --static
make
make DESTDIR=/path/to/staging install
** [[http://ngircd.barton.de/|ngircd 22.1]]**
./configure --prefix=/ --enable-ipv6
make
make DESTDIR=/path/to/staging install
** [[http://libjpeg.sourceforge.net/|libjpeg 9a]]**
./configure --prefix=/usr
make
make DESTDIR=/path/to/staging install
** [[http://www.libpng.org/pub/png/libpng.html|libpng 1.6.17]]**
LDFLAGS="-L/usr/lib" ./configure --prefix=/usr --disable-shared
make
make DESTDIR=/path/to/staging install
** [[http://www.lua.org/|lua 5.3.1]]**
make posix test CFLAGS="-static"
make local
** [[http://nginx.org/|nginx 1.9.0]]**
./configure --prefix=/usr --with-ipv6 --with-threads --without-http_rewrite_module
make
make DESTDIR=/path/to/staging install
** [[http://www.nano-editor.org/|nano 2.4.1]]**
./configure --disable-extra --enable-tiny --prefix=/usr
make
make DESTDIR=/path/to/staging install
** [[http://bellard.org/tcc/|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//
** [[http://universe2.us/epoch.html|epoch 1.2.2]]**
./buildepoch.sh --outpath /path/to/staging --disable-backtraces
** [[http://www.libressl.org/|libressl 2.1.6]]**
./configure --prefix=/usr
make
make DESTDIR=/path/to/staging install
** [[https://github.com/pkgconf/pkgconf|pkgconf 0.9.11]]**
//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
** [[https://www.python.org/|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 _ssl audioop
bz2 dl future_builtins
imageop linuxaudiodev ossaudiodev
readline syslog
**[[http://www.gnu.org/software/tar/|tar 1.28]]**
CFLAGS=-static LDFLAGS=-static CPPFLAGS="-I/include -I/usr/include" \
./configure --prefix=/usr
make
make DESTDIR=/path/to/staging install