--- genromfs-0.5.2.orig/Makefile +++ genromfs-0.5.2/Makefile @@ -6,8 +6,9 @@ PACKAGE = genromfs VERSION = 0.5.2 CC = gcc -CFLAGS = -O2 -Wall -DVERSION=\"$(VERSION)\"#-g# -LDFLAGS = -s#-g +CPPFLAGS = -DVERSION=\"$(VERSION)\" +CFLAGS = -O2 -Wall -g +#LDFLAGS = -s#-g DISTDIR = $(PACKAGE)-$(VERSION) @@ -24,7 +25,7 @@ $(CC) $(LDFLAGS) genromfs.o -o genromfs .c.o: - $(CC) $(CFLAGS) $< -c -o $@ + $(CC) $(CPPFLAGS) $(CFLAGS) $< -c -o $@ clean: rm -f genromfs *.o --- genromfs-0.5.2.orig/debian/copyright +++ genromfs-0.5.2/debian/copyright @@ -0,0 +1,32 @@ +This is the Debian GNU/Linux's prepackaged version of the romfs +filesystem generator ``genromfs''. + +This package was put together from sources obtained from: + http://sourceforge.net/projects/romfs/ + + +Copyrights +---------- +Copyright (C) 1997-2007 Janos Farkas + +Modifications for Debian: + Copyright (C) 1998-2007 Juan Cespedes + + +License +------- +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +A copy of the GNU General Public License is available as +`/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +You can also obtain it by writing to the Free Software Foundation, +Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. --- genromfs-0.5.2.orig/debian/rules +++ genromfs-0.5.2/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +# +# Copyright 1997-2007 Juan Cespedes + +CFLAGS = -g -Wall + +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O2 +endif + +build: + dh_testdir + $(MAKE) CFLAGS="$(CFLAGS)" + touch build + +clean: + dh_testdir + dh_testroot + $(RM) -f build + $(MAKE) clean + $(RM) -rf debian/tmp debian/files debian/substvars + dh_clean + +binary: binary-indep binary-arch + +binary-indep: + +binary-arch: build + dh_testdir + dh_testroot + dh_installdirs usr/bin + install genromfs debian/genromfs/usr/bin/genromfs + dh_installchangelogs ChangeLog + dh_installdocs romfs.txt NEWS + dh_installman genromfs.8 + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + --- genromfs-0.5.2.orig/debian/compat +++ genromfs-0.5.2/debian/compat @@ -0,0 +1 @@ +5 --- genromfs-0.5.2.orig/debian/control +++ genromfs-0.5.2/debian/control @@ -0,0 +1,16 @@ +Source: genromfs +Section: admin +Priority: extra +Maintainer: Juan Cespedes +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: genromfs +Architecture: any +Depends: ${shlibs:Depends} +Description: This is the mkfs equivalent for romfs filesystem + You need it to build a romfs filesystem. romfs is a small, + read-only filesystem intended for installation/rescue + disks or "embedded" applications. + . + This filesystem is supported by Linux 2.1.25 and later. --- genromfs-0.5.2.orig/debian/changelog +++ genromfs-0.5.2/debian/changelog @@ -0,0 +1,126 @@ +genromfs (0.5.2-2) unstable; urgency=low + + * Check for errors when writing image (closes: Bug#240522) + * Switched to debhelper + + -- Juan Cespedes Wed, 26 Sep 2007 15:52:04 +0200 + +genromfs (0.5.2-1) unstable; urgency=low + + * New upstream version: + + file names may contain "-", "_", and "+" (closes: Bug#320852) + * Get rid of bashisms in debian/rules (closes: Bug#379573) + * New Standards-Version: 3.7.2 + * /usr/doc transition in finished (closes: Bug#359407) + * Handle DEB_BUILD_OPTIONS correctly (closes: Bug#436969) + + -- Juan Cespedes Wed, 22 Aug 2007 15:03:16 +0200 + +genromfs (0.5.1-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Get rid of the /usr/doc link in postinst (Closes: #359407). + + -- Amaya Rodrigo Sastre Fri, 14 Jul 2006 21:16:39 +0200 + +genromfs (0.5.1-3) unstable; urgency=low + + * Really move genromfs to /usr/bin (thanks to Miles Bader) + + -- Juan Cespedes Tue, 26 Nov 2002 16:30:40 +0100 + +genromfs (0.5.1-2) unstable; urgency=medium + + * Moved genromfs binary to /usr/bin (closes: Bug#138415) + + -- Juan Cespedes Thu, 20 Jun 2002 13:51:19 +0200 + +genromfs (0.5.1-1) unstable; urgency=medium + + * New upstream release, new upstream location (thanks to Miles Bader + for making me notice) + + -- Juan Cespedes Tue, 5 Feb 2002 23:58:36 +0100 + +genromfs (0.3-6) unstable; urgency=medium + + * Fixed lintian warnings: "no-priority-field" and "no-section-field" + + -- Juan Cespedes Sun, 15 Oct 2000 10:15:30 +0200 + +genromfs (0.3-5) unstable; urgency=medium + + * Fixed lintian bugs + + -- Juan Cespedes Tue, 21 Dec 1999 18:04:28 +0100 + +genromfs (0.3-4) unstable; urgency=medium + + * New Standards-Version: 3.1.1 + + -- Juan Cespedes Sat, 18 Dec 1999 16:29:20 +0100 + +genromfs (0.3-3) unstable; urgency=medium + + * FHS support + * New Standards-Version: 3.0.1 + + -- Juan Cespedes Sun, 17 Oct 1999 16:51:49 +0200 + +genromfs (0.3-2) unstable; urgency=medium + + * Expected `char' instead of `int' as the response of `getpot()' + (Fixes:Bug#34866) + + -- Juan Cespedes Mon, 22 Mar 1999 12:22:22 +0100 + +genromfs (0.3-1) unstable; urgency=low + + * New upstream version (Bug#27555) + + -- Juan Cespedes Wed, 7 Oct 1998 18:55:13 +0200 + +genromfs (0.1-5) unstable; urgency=low + + * Fixed copyright file + * New Standards-Version + * Added patch for 2.0.35 kernel + * Endianness fixes + * Make it compile undex glibc_2.0.7 + * Used pristine source + + -- Juan Cespedes Thu, 3 Sep 1998 22:33:15 +0200 + +genromfs (0.1-4) unstable; urgency=low + + * Fixed FSF postal address + * New maintainer address + * New Standards-Version + * Preserve modif times of doc files + + -- Juan Cespedes Thu, 11 Sep 1997 22:29:41 +0200 + +genromfs (0.1-3) unstable; urgency=low + + * New maintainer + * Fixes in documentation + * Added patch for 2.0.30 kernel + * Built with libc6 + + -- Juan Cespedes Sun, 3 Aug 1997 23:29:01 +0200 + +genromfs (0.1-2) unstable; urgency=low + + * ROMFS is part of linux 2.1.25. Note that in the description. + + -- Christoph Lameter Fri, 7 Feb 1997 12:34:18 -0800 + +genromfs (0.1-1) unstable; urgency=low + + * Initial Release. + + -- Christoph Lameter Wed, 8 Jan 1997 13:19:15 -0800 + +Local variables: +mode: debian-changelog +End: --- genromfs-0.5.2.orig/genromfs.c +++ genromfs-0.5.2/genromfs.c @@ -75,6 +75,7 @@ #include #endif +char *outf = NULL; struct romfh { int32_t nextfh; @@ -254,10 +255,16 @@ if (atoffs==512) { ri = (struct romfh *)&fixbuf; fixsum(ri, atoffssize)?atoffs:ntohl(ri->size)); - fwrite(fixbuf, atoffs, 1, f); + if (fwrite(fixbuf, atoffs, 1, f) != 1) { + perror(outf); + exit(1); + } } if (len) { - fwrite(addr, len, 1, f); + if (fwrite(addr, len, 1, f) != 1) { + perror(outf); + exit(1); + } atoffs+=len; } } @@ -702,7 +709,6 @@ { int c; char *dir = "."; - char *outf = NULL; char *volname = NULL; int verbose=0; char buf[256];