Package: gzip Version: 1.3.5-15 Severity: wishlist Tags: patch Hi
Because of a problem with cmdline size limits in Linux, win32-loader needs to make use of cpio and gzip binaries to append its preseeding information to D-I when running on win32 (see bug #442474 for details). Please, could you provide a win32 binary of gzip as a "gzip-win32" binary package, so that win32-loader can use it as build-dependency? You'll find attached: - debian.diff: Arranges the package to produce a gzip-win32 binary. - mingw32.diff: Fix in upstream code to allow compilation of win32 binaries via mingw32. This has been merged upstream: http://lists.gnu.org/archive/html/bug-gzip/2007-11/msg00008.html Note: as a side-effect, it might turn out that the ftp-masters will find this gzip.exe build useful for automated maintenance of debian/tools/gzip124.exe ;-) Thanks! -- System Information: Debian Release: lenny/sid APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-5-amd64 Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8) Versions of packages gzip depends on: ii debianutils 2.17.2 Miscellaneous utilities specific t ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries gzip recommends no packages. -- no debconf information
diff -x gzip.c -Nurp gzip-1.3.12/debian/control gzip-1.3.12.new/debian/control --- gzip-1.3.12/debian/control 2007-12-26 18:13:45.000000000 +0100 +++ gzip-1.3.12.new/debian/control 2007-12-26 18:15:30.000000000 +0100 @@ -19,3 +19,10 @@ Description: The GNU compression utility . This package can also decompress '.Z' files created with 'compress'. +Package: gzip-win32 +Architecture: all +Priority: extra +Suggests: wine +Description: The GNU compression utility (win32 build) + This is a win32 version of gzip. It's meant to be used by the win32-loader + component of Debian-Installer. diff -x gzip.c -Nurp gzip-1.3.12/debian/gzip-win32.dirs gzip-1.3.12.new/debian/gzip-win32.dirs --- gzip-1.3.12/debian/gzip-win32.dirs 1970-01-01 01:00:00.000000000 +0100 +++ gzip-1.3.12.new/debian/gzip-win32.dirs 2007-12-26 18:33:00.000000000 +0100 @@ -0,0 +1 @@ +usr/share/win32 diff -x gzip.c -Nurp gzip-1.3.12/debian/rules gzip-1.3.12.new/debian/rules --- gzip-1.3.12/debian/rules 2007-12-26 18:13:45.000000000 +0100 +++ gzip-1.3.12.new/debian/rules 2007-12-26 18:35:31.000000000 +0100 @@ -21,58 +21,83 @@ endif configure: configure-stamp configure-stamp: dh_testdir - CFLAGS=$(CFLAGS) ./configure \ + mkdir -p build + cd build && CFLAGS=$(CFLAGS) ../configure \ --prefix=/usr --bindir=/bin \ --infodir=`pwd`/debian/gzip/usr/share/info \ --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS) touch configure-stamp -build: configure-stamp build-stamp -build-stamp: +configure-win32: configure-win32-stamp +configure-win32-stamp: dh_testdir - $(MAKE) + mkdir -p build-win32 + cd build-win32 && ../configure --host=i586-mingw32msvc + touch configure-win32-stamp + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + $(MAKE) -C build touch build-stamp +build-win32: build-win32-stamp +build-win32-stamp: configure-win32-stamp + dh_testdir + $(MAKE) -C build-win32 + touch build-win32-stamp + clean: dh_testdir dh_testroot - -rm -f build-stamp configure-stamp - make distclean || exit 0 + -rm -f build-stamp build-win32-stamp configure-stamp configure-win32-stamp + -rm -rf build build-win32 dh_clean -install: build +install: build build-win32 dh_testdir dh_testroot dh_clean -k dh_installdirs - make install prefix=debian/gzip/usr bindir=debian/gzip/bin + $(MAKE) -C build install prefix=`pwd`/debian/gzip/usr bindir=`pwd`/debian/gzip/bin install -o root -g root -m 0644 debian/gzip.lintian \ debian/gzip/usr/share/lintian/overrides/gzip + install -m 0755 build-win32/gzip.exe debian/gzip-win32/usr/share/win32/ -binary-indep: build install +binary-indep: build-win32 install + dh_testdir -i + dh_testroot -i + dh_installdocs -i README* TODO + dh_installchangelogs -i ChangeLog + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs README* TODO - dh_installmanpages - dh_installinfo doc/gzip.info - dh_installchangelogs ChangeLog - dh_link - dh_strip - dh_compress + dh_testdir -s + dh_testroot -s + dh_installdocs -s README* TODO + dh_installmanpages -s + dh_installinfo -s doc/gzip.info + dh_installchangelogs -s ChangeLog + dh_link -s + dh_strip -s + dh_compress -s ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz - dh_fixperms + dh_fixperms -s # You may want to make some executables suid here. - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb + dh_makeshlibs -s + dh_installdeb -s + dh_shlibdeps -s + dh_gencontrol -s + dh_md5sums -s + dh_builddeb -s binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure
2007-11-25 Paul Eggert <[EMAIL PROTECTED]> * gzip.c (handled_sig): Move out of install_signal_handlers, and move previous to all uses of SIGPIPE, to fix a bug encountered when porting to mingw32. Reported by Robert Millan in <http://lists.gnu.org/archive/html/bug-gzip/2007-11/msg00007.html>. Index: gzip.c =================================================================== RCS file: /cvsroot/gzip/gzip/gzip.c,v retrieving revision 1.20 retrieving revision 1.21 diff -p -u -r1.20 -r1.21 --- gzip.c 3 Jul 2007 20:37:08 -0000 1.20 +++ gzip.c 25 Nov 2007 17:19:46 -0000 1.21 @@ -232,6 +232,30 @@ unsigned insize; /* valid byte unsigned inptr; /* index of next byte to be processed in inbuf */ unsigned outcnt; /* bytes in output buffer */ +static int handled_sig[] = + { + /* SIGINT must be first, as 'foreground' depends on it. */ + SIGINT + +#ifdef SIGHUP + , SIGHUP +#endif +#ifdef SIGPIPE + , SIGPIPE +#else +# define SIGPIPE 0 +#endif +#ifdef SIGTERM + , SIGTERM +#endif +#ifdef SIGXCPU + , SIGXCPU +#endif +#ifdef SIGXFSZ + , SIGXFSZ +#endif + }; + struct option longopts[] = { /* { name has_arg *flag val } */ @@ -1755,30 +1779,7 @@ local void treat_dir (fd, dir) static void install_signal_handlers () { - static int sig[] = - { - /* SIGINT must be first, as 'foreground' depends on it. */ - SIGINT - -#ifdef SIGHUP - , SIGHUP -#endif -#ifdef SIGPIPE - , SIGPIPE -#else -# define SIGPIPE 0 -#endif -#ifdef SIGTERM - , SIGTERM -#endif -#ifdef SIGXCPU - , SIGXCPU -#endif -#ifdef SIGXFSZ - , SIGXFSZ -#endif - }; - int nsigs = sizeof sig / sizeof sig[0]; + int nsigs = sizeof handled_sig / sizeof handled_sig[0]; int i; #if SA_NOCLDSTOP @@ -1787,9 +1788,9 @@ install_signal_handlers () sigemptyset (&caught_signals); for (i = 0; i < nsigs; i++) { - sigaction (sig[i], NULL, &act); + sigaction (handled_sig[i], NULL, &act); if (act.sa_handler != SIG_IGN) - sigaddset (&caught_signals, sig[i]); + sigaddset (&caught_signals, handled_sig[i]); } act.sa_handler = abort_gzip_signal; @@ -1797,20 +1798,20 @@ install_signal_handlers () act.sa_flags = 0; for (i = 0; i < nsigs; i++) - if (sigismember (&caught_signals, sig[i])) + if (sigismember (&caught_signals, handled_sig[i])) { if (i == 0) foreground = 1; - sigaction (sig[i], &act, NULL); + sigaction (handled_sig[i], &act, NULL); } #else for (i = 0; i < nsigs; i++) - if (signal (sig[i], SIG_IGN) != SIG_IGN) + if (signal (handled_sig[i], SIG_IGN) != SIG_IGN) { if (i == 0) foreground = 1; - signal (sig[i], abort_gzip_signal); - siginterrupt (sig[i], 1); + signal (handled_sig[i], abort_gzip_signal); + siginterrupt (handled_sig[i], 1); } #endif }