debian/0000755000000000000000000000000012117526626007176 5ustar debian/examples0000644000000000000000000000001212117526626010730 0ustar test-flip debian/dirs0000644000000000000000000000001012117526626010051 0ustar usr/bin debian/postinst0000755000000000000000000000030112117526626011001 0ustar #!/bin/sh set -e if [ "$1" = "configure" ]; then if [ -d /usr/doc -a -h /usr/doc/flip -a -d /usr/share/doc/flip ]; then rm -f /usr/doc/flip fi fi #DEBHELPER# debian/install0000644000000000000000000000001512117526626010563 0ustar flip usr/bin debian/watch0000644000000000000000000000010512117526626010223 0ustar version=3 # This project does not have a homepage (old 1989 sources) debian/rules0000755000000000000000000000071612117526626010262 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -DBSD -DIX -DSTDINCLUDE export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed override_dh_auto_install: # See debian/install override_dh_installman: dh_installman cd debian/flip/usr/bin && { ln -s flip toix; ln -s flip toms; } cd debian/flip/usr/share/man/man1 && \ { ln -s flip.1 toix.1 ; ln -s flip.1 toms.1 ; } %: dh $@ # End of file debian/changelog0000644000000000000000000001150012117526626011045 0ustar flip (1.20-2) unstable; urgency=low * New maintainer (Closes: #636410). - Move to packaging format "3.0 (quilt)". - Use hardened build flags http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags * debian/changelog - Clean up extra newlines and white spaces. * debian/compat - Update to 9. * debian/control - (Build-Depends): update to debhelper . - (Depends): Add ${misc:Depends}. - (Homepage): Update to Freshmeat. - (Standards-Version): Update to 3.9.4. - (Vcs-*): New. * debian/copyright - Update to format 1. * debian/install - New file. * debian/manpages - New file. * debian/patches - (10): New. Add support for hardened build flags. - (20): New. Manual page corrections. - (30): New. do not stat on stdio (Closes: #518311). * debian/postinst - Lintian fix maintainer-script-ignores-errors. * debian/rules - Update to dh(1). * debian/source/format - New file. * debian/watch - New file. -- Jari Aalto Sat, 02 Mar 2013 17:05:57 +0200 flip (1.20-1) unstable; urgency=low * New upstream release. Preserve file permissions (closes:Bug#122435). New self-test script. * debian/rules: obey DEB_BUILD_OPTIONS flags noopt, nostrip, and parallel. Don't ignore errors on "make clean". Package test-flip as an example. * debian/control: bump policy level to 3.8.0 * debian/dirs: don't package /usr/sbin -- James R. Van Zandt Sat, 26 Jul 2008 11:14:25 -0400 flip (1.19-6) unstable; urgency=low * remove /usr/doc/flip symlink if it exists (thanks to Amaya , closes:Bug#359405) * debian/control: bump policy level to 3.7.2 (no changes needed) -- James R. Van Zandt Fri, 14 Jul 2006 21:28:22 -0400 flip (1.19-5) unstable; urgency=low * repackage using debhelper. Don't install doc symlink (fixes:#359405) * install symlinks for toms and toix (fixes:#153324,#278391) -- James R. Van Zandt Tue, 28 Mar 2006 21:29:46 -0500 flip (1.19-4) unstable; urgency=low * recompile with current libc * #include to quiet some warnings. * policy 3.6.2 * debian/rules: install symlinks "toix" and "toms" mentioned in help printout (closes:Bug#153324,Bug#278391) (2nd try) -- James R. Van Zandt Sat, 24 Sep 2005 18:49:51 -0400 flip (1.19-3) unstable; urgency=low * debian/rules: install symlinks "toix" and "toms" mentioned in help printout (closes:Bug#153324) -- James R. Van Zandt Sat, 20 Jul 2002 17:28:20 -0400 flip (1.19-2) unstable; urgency=low * debian/control: spelling fixes (Closes:Bug#124619) -- James R. Van Zandt Fri, 21 Dec 2001 19:57:55 -0500 flip (1.19-1) unstable; urgency=low * new upstream version: preserve file permissions, accept input from stdin (thanks to "Dwayne C. Litzenberger" ) (Closes:Bug#102391) * new maintainer email -- James R. Van Zandt Sun, 15 Jul 2001 11:26:21 -0400 flip (1.18-9) unstable; urgency=low * debian/copyright: remove reference to old copyright directory -- James R. Van Zandt Thu, 17 May 2001 22:04:44 -0400 flip (1.18-8) unstable; urgency=low * debian/control: move build-depends line to source section. Update policy to 3.5.2. * debian/rules: honor DEB_BUILD_OPTIONS -- James R. Van Zandt Fri, 27 Apr 2001 21:25:16 -0400 flip (1.18-7) unstable; urgency=low * install test with "install" instead of non-existant "dh_installtests" (Closes:Bug#74379) -- James R. Van Zandt Mon, 9 Oct 2000 22:50:00 -0400 flip (1.18-6) unstable; urgency=low * build-depends on debhelper and debmake * package description: flip only handles lineendings, not character codes (Closes:Bug#72907) -- James R. Van Zandt Sun, 3 Sep 2000 11:54:01 -0400 flip (1.18-5) unstable frozen; urgency=low * Really add the /usr/doc/flip symlink. -- James R. Van Zandt Sat, 23 Oct 1999 22:04:49 -0400 flip (1.18-4) unstable frozen; urgency=low * Add /usr/doc/flip symlink. -- James R. Van Zandt Tue, 14 Sep 1999 21:42:25 -0400 flip (1.18-3) unstable frozen; urgency=low * link against glibc 2.1.2. * Update to FHS. -- James R. Van Zandt Thu, 2 Sep 1999 19:27:42 -0400 flip (1.18-2) unstable frozen; urgency=high * Build with "make bsd", so rename() is used and executing on a VFAT fs does not delete the file (Bug#30691). -- James R. Van Zandt Sat, 26 Dec 1998 12:48:44 -0500 flip (1.18-1) unstable; urgency=low * Initial Release. * Manual page source reconstructed from supplied formatted page. -- Jim Van Zandt Thur, 17 Apr 1998 8:00:00 -0500 debian/patches/0000755000000000000000000000000012117526626010625 5ustar debian/patches/20-manpage.patch0000644000000000000000000000420612117526626013477 0ustar From: Jari Aalto Subject: Correct hyphens --- flip.1 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) --- a/flip.1 +++ b/flip.1 @@ -53,7 +53,7 @@ .sp .nf .\" flip -u *.* (under MS-DOS) - flip -u * + flip \-u * .\" (under **IX) .fi .sp @@ -92,15 +92,15 @@ .sp \fBflip\fP is normally invoked as: .nf - flip -umhvtb file ... + flip \-umhvtb file ... .fi -One of -u, -m, or -h is required. Switches may be given +One of \-u, \-m, or \-h is required. Switches may be given separately or combined together after a dash. For example, the three command lines given below are equivalent: .nf - flip -uvt *.c - flip -u -v -t *.c - flip -u -vt *.c + flip \-uvt *.c + flip \-u \-v \-t *.c + flip \-u \-vt *.c .fi On systems that allow a program to know its own name, \fBflip\fP @@ -109,7 +109,7 @@ for conversion to **IX format, or to a file called toms .\" (or toms.exe under MS-DOS) for conversion to MS-DOS format. When invoked with the name toix or -toms, \fBflip\fP will act as if it were invoked with the -u or -m +toms, \fBflip\fP will act as if it were invoked with the \-u or \-m option respectively. .\" .\" .SH RETURN VALUE @@ -117,22 +117,22 @@ .\" On error, it returns \-1, and \fIerrno\fP is set appropriately. .SH OPTIONS -.IP -u +.IP \-u Convert to **IX format (CR LF => LF, lone CR or LF unchanged, trailing control Z removed, embedded control Z unchanged). -.IP -m +.IP \-m Convert to MS-DOS format (lone LF => CR LF, lone CR unchanged). -.IP -h +.IP \-h Give a help message. -.IP -v +.IP \-v Be verbose, print filenames as they are processed. -.IP -t +.IP \-t Touch files (don't preserve timestamps). -.IP -s +.IP \-s Strip high bit. -.IP -b +.IP \-b Convert binary files too (else binary files are left unchanged). -.IP -z +.IP \-z Truncate file at first control Z encountered. .SH AUTHOR Rahul Dhesi . debian/patches/30-stdin.patch0000644000000000000000000000150512117526626013210 0ustar From: Jari Aalto Subject: Ignore files stat on stdio (CloseS: #518311). --- flip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/flip.c +++ b/flip.c @@ -317,7 +317,7 @@ #endif } - if (!touch) + if (!touch && ! use_stdio) GETFT (infile, fname, timestamp); /* save current timestamp */ assert (which == IXTOMS || which == MSTOIX); @@ -362,6 +362,8 @@ if (!ferror(outfile) && fflush(outfile) != EOF && fclose(outfile) != EOF) { int moved; + if (use_stdio) + goto stdio_skip; #ifdef IX if (stat (tfname, &ofilestat)) { /* can't get the file's permissions */ @@ -391,6 +393,10 @@ } } #endif /* IX */ + + + stdio_skip: + // DELFILE (fname); if (!use_stdio) { moved = MVFILE (tfname, fname); debian/patches/series0000644000000000000000000000006212117526626012040 0ustar 10-makefile.patch 20-manpage.patch 30-stdin.patch debian/patches/10-makefile.patch0000644000000000000000000000173212117526626013644 0ustar From: Jari Aalto Subject: Add support for user set flags --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/Makefile +++ b/Makefile @@ -34,10 +34,10 @@ # (relatively unchanging) flags for compiler CC = cc -CFLAGS = +# CFLAGS = CFMORE = -c -DNDEBUG -O -DVERSION=\"$(VERSION)\" LD = cc -LDFLAGS = -o flip +# LDFLAGS = -o flip # If your system does not supply getopt as a library function, # add getopt.o to the RHS list on the next line and uncomment the @@ -47,6 +47,8 @@ #getopt.o: getopt.c flip.h # $(CC) $(CFLAGS) $(CFMORE) $*.c +all: flip + nothing: @echo \ 'Please type "make sys_v", "make bsd", "make uport", or "make ultrix"' @@ -64,10 +66,10 @@ make "CFLAGS=-DBSD -DULTRIX_BUG" flip flip: $(OBJS) - $(LD) $(LDFLAGS) $(OBJS) + $(LD) $(LDFLAGS) $(OBJS) -o flip flip.o: flip.c flip.h - $(CC) $(CFLAGS) $(CFMORE) $*.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(CFMORE) $*.c clean: rm -f *.o core flip debian/source/0000755000000000000000000000000012117526626010476 5ustar debian/source/format0000644000000000000000000000001412117526626011704 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212117526626010374 0ustar 9 debian/copyright0000644000000000000000000000537312117526626011141 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: flip Upstream-Contact: None Source: nowhere Comment: Dead upstream. . The original sources were downloaded from comp.sources.misc Volume 7, Issue 68 (9 Jul 89 00:36:02 GMT) by Van Zandt License: GPL-1.0 Files: getopt.c Copyright: 1985 AT&T License: Public-Domain [ From the beginning of file getopt.c ] /* * Here's something you've all been waiting for: the AT&T public domain * source for getopt(3). It is the code which was given out at the 1985 * UNIFORUM conference in Dallas. I obtained it by electronic mail * directly from AT&T. The people there assure me that it is indeed * in the public domain. * * There is no manual page. That is because the one they gave out at * UNIFORUM was slightly different from the current System V Release 2 * manual page. The difference apparently involved a note about the * famous rules 5 and 6, recommending using white space between an option * and its first argument, and not grouping options that have arguments. * Getopt itself is currently lenient about both of these things White * space is allowed, but not mandatory, and the last option in a group can * have an argument. That particular version of the man page evidently * has no official existence, and my source at AT&T did not send a copy. * The current SVR2 man page reflects the actual behavor of this getopt. * However, I am not about to post a copy of anything licensed by AT&T. */ . /* Minor modifications by Rahul Dhesi 1989/03/06 */ Files: debian/* Copyright: 2013 Jari Aalto License: GPL-2+ License: GPL-2+ This package 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 of the License, or (at your option) any later version. . This package 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. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". License: GPL-1.0 Both this documentation and flip are Copyright 1989 Rahul Dhesi, all rights reserved. Permission is granted to copy, use, and distribute for any commercial or noncommercial purpose in accordance with the requirements of version 1.0 of the GNU General Public license. debian/manpages0000644000000000000000000000000412117526626010706 0ustar *.1 debian/control0000644000000000000000000000175112117526626010605 0ustar Source: flip Section: text Priority: extra Maintainer: Jari Aalto Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 Vcs-Browser: http://git.debian.org/?p=collab-maint/flip.git Vcs-Git: git://git.debian.org/git/collab-maint/flip.git Package: flip Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: convert text file line endings between Unix and DOS formats The program converts line endings of text files between MS-DOS and *nix formats. It detects binary files in a nearly foolproof way and leaves them alone unless you override this. It will also leave files alone that are already in the right format and preserves file timestamps. User interrupts are handled gracefully and no garbage or corrupted files left behind. . The program does not convert files to a different character set, and it can not handle old Apple Macintosh line endings that use CR only. For that (and more), you can use the 'recode' program (package 'recode').