wok-current rev 369

Slitaz-loram: version 1.2, access r/w to /usr
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 08 01:10:18 2008 +0000 (2008-03-08)
parents f49d39ab0b56
children fc9f573e8ac8
files slitaz-loram/receipt slitaz-loram/stuff/loram.rootfs
line diff
     1.1 --- a/slitaz-loram/receipt	Sat Mar 08 01:16:26 2008 +0100
     1.2 +++ b/slitaz-loram/receipt	Sat Mar 08 01:10:18 2008 +0000
     1.3 @@ -1,11 +1,11 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="slitaz-loram"
     1.7 -VERSION="1.1"
     1.8 +VERSION="1.2"
     1.9  CATEGORY="misc"
    1.10  SHORT_DESC="Rules to build low ram rootfs.gz."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 -DEPENDS="squashfs"
    1.13 +DEPENDS="cromfs"
    1.14  
    1.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.16  genpkg_rules()
    1.17 @@ -19,12 +19,17 @@
    1.18      cat <<EOF
    1.19  --- /etc/init.d/rcS
    1.20  +++ /etc/init.d/rcS
    1.21 -@@ -58,2 +58,9 @@
    1.22 +@@ -58,2 +58,14 @@
    1.23   
    1.24  +# Mount compressed /usr
    1.25 -+if [ -f /.usr.sqfs ]; then
    1.26 ++if [ -f /.usr.cromfs ]; then
    1.27  +	echo -n "Mounting compressed /usr read-only... "
    1.28 -+	/bin/mount -o loop,ro -t squashfs /.usr.sqfs /usr
    1.29 ++	if [ -d /.usr.rw ]; then
    1.30 ++		/bin/cromfs-driver /.usr.cromfs /.usr.ro
    1.31 ++		/bin/funionfs -o dirs=/.usr.ro=RO:/.usr.rw -o allow_other NONE /usr
    1.32 ++	else
    1.33 ++		/bin/cromfs /.usr.cromfs /usr
    1.34 ++	fi
    1.35  +	status
    1.36  +fi
    1.37  +
     2.1 --- a/slitaz-loram/stuff/loram.rootfs	Sat Mar 08 01:16:26 2008 +0100
     2.2 +++ b/slitaz-loram/stuff/loram.rootfs	Sat Mar 08 01:10:18 2008 +0000
     2.3 @@ -17,8 +17,12 @@
     2.4  done
     2.5  echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
     2.6  echo "$(du -hs ./usr | cut -f1) were used by /usr before compression"
     2.7 -usr/sbin/mksquashfs usr .usr.sqfs
     2.8 +usr/bin/mkcromfs -qq -f 262144 -b 16384 usr .usr.cromfs
     2.9 +if [ -x bin/funionfs ]; then
    2.10 +  mkdir .usr.ro .usr.rw
    2.11 +  ln -s /.usr.ro/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
    2.12 +fi
    2.13  rm -rf usr
    2.14  mkdir usr
    2.15  COMPRESSION="none"
    2.16 -echo "$(du -hs ./.usr.sqfs | cut -f1) are used by /usr after compression"
    2.17 +echo "$(du -hs ./.usr.cromfs | cut -f1) are used by /usr after compression"