https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203873
Bug ID: 203873 Summary: [patch] make gzip(1) embedded-friendly and more compatible with GNU gzip Product: Base System Version: 10.2-STABLE Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: eu...@grosbein.net Keywords: patch Created attachment 162210 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=162210&action=edit patch for gzip While running FreeBSD using space-constrained embedded platform like MIPS32 router, one may not have enough flash space for full-blown file system to keep variable configuration files persistent between reboots. For example, there may be only 64K or so flash space seen as /dev/map/cfg. This is not enough for newfs(1) but enough to write gzip-compressed tar archive that can store hundreds kilobytes of text configs like SSH host keys etc. We need a way to check integrity of those raw 64Kbytes of data and "gzip -qt" would do the job. However, "gzip -qt < /dev/map/cfg" does not work due to hardware limitations and we need to use "dd bs=64k if=/dev/map/cfg | gzip -qt". That feeds gzip with our compressed data and some trailing garbage. Our gzip ignores trailing garbage but returns exit status 1 (fatal error) even if CRC matches. GNU gzip returns exit status 2 (just warning) in such case. Attached patch makes our gzip return 2 in case of ignored trailing garbage. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"