wok-backports rev 6
Add lxc,linux-lxc,dpkg,debootstrap
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sat Dec 21 14:42:10 2013 +0100 (2013-12-21) |
parents | b3f60b195d7a |
children | cc08b218b93c |
files | debootstrap/receipt dpkg/receipt linux-lxc/receipt lxc/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/debootstrap/receipt Sat Dec 21 14:42:10 2013 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +# SliTaz package receipt 1.5 + 1.6 +PACKAGE="debootstrap" 1.7 +VERSION="1.0.48" 1.8 +CATEGORY="misc" 1.9 +SHORT_DESC="Bootstrap a basic Debian system" 1.10 +MAINTAINER="shann@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +WEB_SITE="https://wiki.debian.org/Debootstrap" 1.13 +WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL" 1.14 + 1.15 +DEPENDS="dpkg tar" 1.16 + 1.17 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.18 +genpkg_rules() 1.19 +{ 1.20 + mkdir -p $fs/usr/sbin $fs/usr/share 1.21 + cp -a $src/usr/sbin/* $fs/usr/sbin 1.22 + cp -a $src/usr/share/* $fs/usr/share 1.23 + chown -R root.root $fs 1.24 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/dpkg/receipt Sat Dec 21 14:42:10 2013 +0100 2.3 @@ -0,0 +1,27 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="dpkg" 2.7 +VERSION="1.16.12" 2.8 +CATEGORY="misc" 2.9 +SHORT_DESC="Debian package management system" 2.10 +MAINTAINER="shann@slitaz.org" 2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.12 +WEB_SITE="https://wiki.debian.org/dpkg" 2.13 +WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL" 2.14 +DEPENDS="bzlib liblzma zlib" 2.15 + 2.16 +CONFIG_FILES="/etc/logrotate.d/dpkg 2.17 +/etc/cron.daily/dpkg 2.18 +/etc/alternatives/README 2.19 +/etc/dpkg/dpkg.cfg" 2.20 + 2.21 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.22 +genpkg_rules() 2.23 +{ 2.24 + mkdir -p $fs/etc/alternatives $fs/etc/dpkg $fs/etc/cron.daily $fs/etc/logrotate.d 2.25 + mkdir -p $fs/usr/share $fs/usr/sbin $fs/usr/sbin $fs/sbin 2.26 + cp -a $src/etc/* $fs/etc 2.27 + cp -a $src/sbin/* $fs/sbin 2.28 + cp -a $src/usr/* $fs/usr 2.29 + chown -R root.root $fs 2.30 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/linux-lxc/receipt Sat Dec 21 14:42:10 2013 +0100 3.3 @@ -0,0 +1,57 @@ 3.4 +# SliTaz package receipt 3.5 + 3.6 +PACKAGE="linux-lxc" 3.7 +VERSION="2.6.37" 3.8 +CATEGORY="misc" 3.9 +SHORT_DESC="The Linux kernel and modules with LXC support." 3.10 +MAINTAINER="shann@slitaz.org" 3.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 3.12 +WEB_SITE="http://linuxcontainers.org/" 3.13 +WGET_URL="http://people.slitaz.org/~shann/packages/$PACKAGE/$TARBALL" 3.14 +PROVIDE="linux" 3.15 + 3.16 +DEPENDS="lxc" 3.17 + 3.18 +# Rules to gen a SliTaz package suitable for Tazpkg. 3.19 +genpkg_rules() 3.20 +{ 3.21 + mkdir -p $fs/lib/firmware $fs/lib/modules 3.22 + cp -a $src/boot $fs 3.23 + cp -a $src/lib/modules/* $fs/lib/modules 3.24 + cp -a $src/lib/firmware/* $fs/lib/firmware 3.25 + chown -R root.root $fs 3.26 +} 3.27 + 3.28 +# Pre and post install commands for Tazpkg. 3.29 +post_install() 3.30 +{ 3.31 + echo "Update /etc/fstab for use cgroup..." 3.32 + echo "none /cgroup cgroup defaults 0 0" >> /etc/fstab 3.33 + 3.34 + echo "Processing post-install commands..." 3.35 + chroot "$1/" depmod -a $VERSION-lxc-slitaz 3.36 + # GRUB stuff. 3.37 + if [ -f "$1/boot/grub/menu.lst" ]; then 3.38 + root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` 3.39 + grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1` 3.40 + # Add new kernel entry in case of upgrade for installed system. 3.41 + if ! grep -q $PACKAGE-$VERSION-lxc-slitaz $1/boot/grub/menu.lst; then 3.42 + cat >> $1/boot/grub/menu.lst << EOT 3.43 + 3.44 +title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz) 3.45 +$grub_dev 3.46 +kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev 3.47 +EOT 3.48 + fi 3.49 + # Display information message. 3.50 + cat <<EOT 3.51 +---- 3.52 +GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: 3.53 + 3.54 +title SliTaz GNU/Linux (Kernel $VERSION-lxc-slitaz) 3.55 +$grub_dev 3.56 +kernel /boot/vmlinuz-$VERSION-lxc-slitaz root=$root_dev 3.57 +---- 3.58 +EOT 3.59 + fi 3.60 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/lxc/receipt Sat Dec 21 14:42:10 2013 +0100 4.3 @@ -0,0 +1,54 @@ 4.4 +# SliTaz package receipt. 4.5 + 4.6 +PACKAGE="lxc" 4.7 +VERSION="0.7.4.1" 4.8 +CATEGORY="system-tools" 4.9 +SHORT_DESC="Userspace control package for Linux Containers." 4.10 +MAINTAINER="pascal.bellard@slitaz.org" 4.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 4.12 +WEB_SITE="http://lxc.sourceforge.net/" 4.13 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 4.14 + 4.15 +DEPENDS="libcap perl util-linux-ng-getopt linux-lxc" 4.16 +BUILD_DEPENDS="libcap-dev util-linux-ng-getopt" 4.17 + 4.18 +# Rules to configure and make the package. 4.19 +compile_rules() 4.20 +{ 4.21 + cd $src 4.22 + ./configure --prefix=/usr --mandir=/usr/share/man \ 4.23 + --localstatedir=/var \ 4.24 + $CONFIGURE_ARGS && 4.25 + make && 4.26 + make DESTDIR=$DESTDIR install 4.27 +} 4.28 + 4.29 +# Rules to gen a SliTaz package suitable for Tazpkg. 4.30 +genpkg_rules() 4.31 +{ 4.32 + mkdir -p $fs/usr $fs/var/lib/lxc 4.33 + cp -a $_pkg/usr/bin $fs/usr 4.34 + cp -a $_pkg/usr/lib $fs/usr 4.35 + sed -i 's|/usr/var/lib/lxc|/var/lib/lxc|;s|/bin/bash|/bin/ash|' \ 4.36 + $fs/usr/bin/lxc-version $fs/usr/bin/lxc-netstat \ 4.37 + $fs/usr/bin/lxc-destroy $fs/usr/bin/lxc-create \ 4.38 + $fs/usr/bin/lxc-setcaps $fs/usr/bin/lxc-setuid \ 4.39 + $fs/usr/bin/lxc-ls $fs/usr/lib/lxc/templates/lxc* 4.40 + sed -i -e 's/^is_set(/zgrep() { zcat | grep "$@"; }\n\n&/' \ 4.41 + -e 's/\(.*\$GREP .*\)\(\$CONFIG.*\)/\1< \2/' \ 4.42 + -e 's/ < 3/ -lt 3/;s/ > 3/ -gt 3/' -e 's|/bin/bash|/bin/ash|' \ 4.43 + $fs/usr/bin/lxc-checkconfig 4.44 + sed -i "s/--preserve-root//" $fs/usr/bin/lxc-destroy $fs/usr/lib/lxc/templates/lxc-* 4.45 + sed -i "s/(arch)/(uname -m)/" $fs/usr/lib/lxc/templates/lxc-* 4.46 + chmod +x $fs/usr/bin/lxc-* 4.47 +} 4.48 + 4.49 +post_install() 4.50 +{ 4.51 + [ -n "$1" ] && return 4.52 + lxc-checkconfig | tee /dev/stderr | grep -q required && cat <<EOT 4.53 + 4.54 +You have to fix your kernel configuration first to use lxc ! 4.55 + 4.56 +EOT 4.57 +}