On Fri, Mar 02, 2007 at 02:58:26PM +0000, Thorsten Glaser wrote:
> Dirk Nehring dixit:
>
> >as I understand, fwcf uses lzo as compressor. Do we really need the tar
> >and gzip dependency for busybox? We deselect it normally since we have
> >not enough space for openvpn and openswan (on a 4 MByte flash)!
>
> The following parts of fwcf.sh use it:
>
> |     (cd /tmp/.fwcf/root; tar cf - .) | (cd /tmp/.fwcf/temp; tar xpf -)
> |     (cd /etc; tar cf - .) | (cd /tmp/.fwcf/temp; tar xpf -)
>
> Quick copying of files while preserving *all* attributes; could be
> replaced with pax, but busybox doesn't even have that.
>
> |     find . -type f | grep -v -e '^./.fwcf' -e '^./.rnd$' | sort | \
> |         xargs md5sum | sed 's!  ./! !' | gzip -9 >/tmp/.fwcf/status.gz
> |     find . -type f | grep -v -e '^./.fwcf' -e '^./.rnd$' | sort | \
> |         xargs md5sum | sed 's!  ./! !' | gzip -9 >/tmp/.fwcf/status.gz
> |             gzip -d <$f.gz >$f || rm -f $f
>
> This is for ???fwcf status???, to save (lots of) space in the tmpfs.
> After all, the status file contains 34+n bytes per file, where n
> is the length of the file name.

Hi Thorsten,

isn't it possible to use lzo as compressor to save additional space
since you have a minilzo implementation already? We are very small of
space and need currently nearly every byte. tar can be replaced by cpio
but that can you decide (gzip: ~ 40-50k additional).

>
> There is theoreticaly no reason to prevent throwing it out; if we
> have, say, 300 files in /etc, the status file would be at about
> 16 KiB uncompressed; if you can justify the RAM use???
>
> |     tar -czf "$fn" dump seed
> |     if ! tar -xzf "$fn"; then
>
> This is for ???fwcf dump??? and ???fwcf restore???; while I'd like to keep
> them, I could replace that by not gzipping them or even just catting
> them together if we chose to remove the tar and/or gzip uses above
> (although I don't really think we could get rid of tar).
>
> Note that the last of the three use cases must be decided upon before
> we release fwcf 1.03, because it defines the backup format.

Yes, I would prefer a format without the need of gzip. 2 Suggestions:
tar-only or tar.lzo.

Dirk
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to