Installing packages

This is an old revision of the document!


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

gcc 5.2.0

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=i486-linux-musl --host=i486-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="-static -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

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 4.1

./configure --prefix=/usr
sh build.sh
./make DESTDIR=/pkg install

dropbear 2015.67

./configure --disable-zlib --disable-wtmp  
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 

bin86 0.16.21

 make
 mkdir -p /path/for/staging/{bin,man}
 make PREFIX=/path/for/staging install

vitetris 0.57

 ./configure --prefix=/usr/bin
 make
 make DESTDIR=/path/for/staging install

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  
 
 

lilo 24.1

 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

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
 
 

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
 
 

dialog 1.2

 LDFLAGS="-static" ./configure --with-ncurses --prefix=/usr --disable-nls 
 make
 make PREFIX=/path/to/staging install

m4 1.4.17

./configure --prefix=/usr
make
make PREFIX=/path/to/staging install

bzip 1.0.6

 sed -i 's/gcc/musl-gcc -static/' Makefile
 make
 make PREFIX=/path/to/staging install

freetype 2.5.5

 ./configure --prefix=/usr --disable-shared
 make
 make DESTDIR=/path/to/staging install 
 

tree 1.7.0

 make CC="musl-gcc -static"
 make prefix=/path/to/staging install

zlib 1.2.8

 ./configure --prefix=/usr --static
 make
 make DESTDIR=/path/to/staging install 
 

ngircd 22.1

 ./configure --prefix=/ --enable-ipv6
 make
 make DESTDIR=/path/to/staging install 

libjpeg 9a

 ./configure --prefix=/usr
 make
 make DESTDIR=/path/to/staging install 

libpng 1.6.17

 LDFLAGS="-L/usr/lib" ./configure --prefix=/usr --disable-shared
 make
 make DESTDIR=/path/to/staging install

lua 5.3.1

make posix test CFLAGS="-static"
make local

nginx 1.9.0

 ./configure --prefix=/usr --with-ipv6 --with-threads --without-http_rewrite_module
 make
 make DESTDIR=/path/to/staging install

musl 1.1.14

 ./configure --prefix=/ --disable-shared
 CFLAGS=-static make
 make DESTDIR=/path/to/staging install 

nano 2.4.1

 ./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

epoch 1.2.2

 ./buildepoch.sh --outpath /path/to/staging --disable-backtraces
 

libressl 2.1.6

 ./configure --prefix=/usr
 make
 make DESTDIR=/path/to/staging install   
 

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
 

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 
 

ucpp 1.3.2 (mirror)

 make CC=gcc CFLAGS=-static LDFLAGS=-static
 

Example usage: ln -s /usr/bin/ucpp /lib/cpp tar 1.28 CFLAGS=-static LDFLAGS=-static CPPFLAGS=“-I/include -I/usr/include” \ ./configure –prefix=/usr make make DESTDIR=/path/to/staging install