From 6e70a73afd176cbe62429ffecde9acebebc786bf Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 18 May 2007 10:49:03 +0000 Subject: [PATCH 01/17] Initialize branch F-7 for unix2dos --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..c48525c --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-7 From a1e810327e06f5438344db648d0ad1d03ebbac6b Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 29 Aug 2007 14:43:16 +0000 Subject: [PATCH 02/17] - Rebuilt. --- unix2dos.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unix2dos.spec b/unix2dos.spec index eff91c2..b4bbe0c 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,7 +1,7 @@ Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 -Release: 28%{?dist} +Release: 29%{?dist} License: Distributable Group: Applications/Text Source: unix2dos-2.2.src.tar.gz @@ -44,6 +44,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Aug 29 2007 Tim Waugh 2.2-29 +- Rebuilt. + * Wed Feb 7 2007 Tim Waugh 2.2-28 - Fixed license tag (bug #226514). From 8594cd18d19c1deb018ab5f046b89862fe3c2de5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 15 Oct 2007 19:29:21 +0000 Subject: [PATCH 03/17] makefile update to properly grab makefile.common --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2f6496d..20956e3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,21 @@ # Makefile for source rpm: unix2dos -# $Id$ +# $Id: Makefile,v 1.1 2004/09/09 13:44:49 cvsdist Exp $ NAME := unix2dos SPECFILE = $(firstword $(wildcard *.spec)) -include ../common/Makefile.common +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attempt a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) From e9607f5957f55b11034be52a20e585e459632499 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 13 Feb 2008 10:57:24 +0000 Subject: [PATCH 04/17] - Rebuild for GCC 4.3. --- unix2dos.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unix2dos.spec b/unix2dos.spec index b4bbe0c..3515171 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,7 +1,7 @@ Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 -Release: 29%{?dist} +Release: 30%{?dist} License: Distributable Group: Applications/Text Source: unix2dos-2.2.src.tar.gz @@ -44,6 +44,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Feb 13 2008 Tim Waugh 2.2-30 +- Rebuild for GCC 4.3. + * Wed Aug 29 2007 Tim Waugh 2.2-29 - Rebuilt. From d1f2d7b9d57d2dadef503ebc28a4a4a70f8484ca Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 8 Sep 2008 08:48:06 +0000 Subject: [PATCH 05/17] - Explicitly apply patch0. --- unix2dos.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unix2dos.spec b/unix2dos.spec index 3515171..38d6a8e 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,7 +1,7 @@ Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 -Release: 30%{?dist} +Release: 31%{?dist} License: Distributable Group: Applications/Text Source: unix2dos-2.2.src.tar.gz @@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %prep %setup -q -c -%patch -p1 -b .sec +%patch0 -p1 -b .sec %patch1 -p1 -b .segf %patch2 -p1 -b .man %patch3 -p1 -b .mode @@ -44,6 +44,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Mon Sep 8 2008 Tim Waugh 2.2-31 +- Explicitly apply patch0. + * Wed Feb 13 2008 Tim Waugh 2.2-30 - Rebuild for GCC 4.3. From 18dfe2db242248813393a77924f42a55a8699d6e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 8 Sep 2008 08:50:37 +0000 Subject: [PATCH 06/17] - Fixed grammar in man page (bug #460731). --- unix2dos-2.2-manpage.patch | 20 +++++++++++++++----- unix2dos.spec | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/unix2dos-2.2-manpage.patch b/unix2dos-2.2-manpage.patch index f6ae1b8..1172e2f 100644 --- a/unix2dos-2.2-manpage.patch +++ b/unix2dos-2.2-manpage.patch @@ -1,6 +1,7 @@ ---- unix2dos-2.2/unix2dos.1.man Thu Jan 17 17:25:08 2002 -+++ unix2dos-2.2/unix2dos.1 Thu Jan 17 17:25:35 2002 -@@ -16,7 +16,7 @@ +diff -up unix2dos-2.2/unix2dos.1.man unix2dos-2.2/unix2dos.1 +--- unix2dos-2.2/unix2dos.1.man 1995-03-30 17:03:22.000000000 +0100 ++++ unix2dos-2.2/unix2dos.1 2008-09-08 09:49:19.000000000 +0100 +@@ -16,7 +16,7 @@ Options: .SH DESCRIPTION .PP @@ -9,7 +10,7 @@ files in UNIX format to DOS format. .SH OPTIONS -@@ -40,7 +40,7 @@ +@@ -40,7 +40,7 @@ Prints version information. .TP .B \-c --convmode convmode @@ -18,7 +19,16 @@ .TP .B \-o --oldfile file ... -@@ -71,9 +71,9 @@ +@@ -51,7 +51,7 @@ default to run in this mode. Wildcard na + .B \-n --newfile infile outfile ... + New file mode. Convert the infile and write output to outfile. File names + must be given in pairs and wildcard names should NOT be used or you WILL +-lost your files. ++lose your files. + + .SH EXAMPLES + +@@ -71,9 +71,9 @@ Convert and replace a.txt. Convert and r Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode. .IP diff --git a/unix2dos.spec b/unix2dos.spec index 38d6a8e..1bde7a1 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -45,6 +45,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Mon Sep 8 2008 Tim Waugh 2.2-31 +- Fixed grammar in man page (bug #460731). - Explicitly apply patch0. * Wed Feb 13 2008 Tim Waugh 2.2-30 From d7f7995a2bb657b949654ede58a7f22013611abc Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 8 Sep 2008 08:57:00 +0000 Subject: [PATCH 07/17] - Preserve file modes (bug #437469). --- unix2dos-preserve-file-modes.patch | 29 +++++++++++++++++++++++++++++ unix2dos.spec | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 unix2dos-preserve-file-modes.patch diff --git a/unix2dos-preserve-file-modes.patch b/unix2dos-preserve-file-modes.patch new file mode 100644 index 0000000..e824044 --- /dev/null +++ b/unix2dos-preserve-file-modes.patch @@ -0,0 +1,29 @@ +diff -up unix2dos-2.2/unix2dos.c~ unix2dos-2.2/unix2dos.c +--- unix2dos-2.2/unix2dos.c~ 2008-03-03 13:16:34.000000000 +0000 ++++ unix2dos-2.2/unix2dos.c 2008-03-03 13:22:10.000000000 +0000 +@@ -244,10 +244,11 @@ int ConvertUnixToDosNewFile(char *ipInFN + char *TempPath; + struct stat StatBuf; + struct utimbuf UTimeBuf; ++ mode_t mask; + int fd; + + /* retrieve ipInFN file date stamp */ +- if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) ++ if (stat(ipInFN, &StatBuf)) + RetVal = -1; + + if((fd = MakeTempFileFrom (ipOutFN, &TempPath)) < 0) { +@@ -271,6 +272,12 @@ int ConvertUnixToDosNewFile(char *ipInFN + RetVal = -1; + } + ++ /* preserve original mode as modified by umask */ ++ mask = umask(0); ++ umask(mask); ++ if (!RetVal && fchmod(fd, StatBuf.st_mode & ~mask)) ++ RetVal = -1; ++ + /* conversion sucessful? */ + if ((!RetVal) && (ConvertUnixToDos(InF, TempF, ipFlag))) + RetVal = -1; diff --git a/unix2dos.spec b/unix2dos.spec index 1bde7a1..35c1bb0 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -10,6 +10,7 @@ Patch1: unix2dos-2.2-segfault.patch Patch2: unix2dos-2.2-manpage.patch Patch3: unix2dos-2.2-mode.patch Patch4: unix2dos-2.2-tmppath.patch +Patch5: unix2dos-preserve-file-modes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %prep @@ -19,6 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %patch2 -p1 -b .man %patch3 -p1 -b .mode %patch4 -p1 -b .tmppath +%patch5 -p1 -b .preserve-file-modes perl -pi -e "s/^#endif.*/#endif/g;s/^#else.*/#else/g" *.[ch] %description @@ -45,6 +47,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Mon Sep 8 2008 Tim Waugh 2.2-31 +- Preserve file modes (bug #437469). - Fixed grammar in man page (bug #460731). - Explicitly apply patch0. From b3f63a75ab9590eff7597f73576702f65034967a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 8 Sep 2008 09:15:22 +0000 Subject: [PATCH 08/17] - Removed patch fuzz. --- unix2dos-2.2-mode.patch | 11 ++++++----- unix2dos-2.2-tmppath.patch | 28 +++++++++++++++------------- unix2dos.spec | 1 + 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/unix2dos-2.2-mode.patch b/unix2dos-2.2-mode.patch index 4f35ed2..f5ff62a 100644 --- a/unix2dos-2.2-mode.patch +++ b/unix2dos-2.2-mode.patch @@ -1,6 +1,7 @@ ---- unix2dos-2.2/unix2dos.c.mode 2004-10-11 14:20:07.194483616 +0100 -+++ unix2dos-2.2/unix2dos.c 2004-10-11 14:20:30.752966221 +0100 -@@ -292,11 +292,14 @@ +diff -up unix2dos-2.2/unix2dos.c.mode unix2dos-2.2/unix2dos.c +--- unix2dos-2.2/unix2dos.c.mode 2008-09-08 10:13:39.000000000 +0100 ++++ unix2dos-2.2/unix2dos.c 2008-09-08 10:13:39.000000000 +0100 +@@ -292,11 +292,14 @@ int ConvertUnixToDosOldFile(char* ipInFN char TempPath[16]; struct stat StatBuf; struct utimbuf UTimeBuf; @@ -16,7 +17,7 @@ strcpy (TempPath, "./u2dtmpXXXXXX"); if((fd=mkstemp (TempPath)) < 0) { -@@ -304,6 +307,9 @@ +@@ -304,6 +307,9 @@ int ConvertUnixToDosOldFile(char* ipInFN RetVal = -1; } @@ -25,4 +26,4 @@ + #ifdef DEBUG fprintf(stderr, "unix2dos: using %s as temp file\n", TempPath); - #endif + #endif DEBUG diff --git a/unix2dos-2.2-tmppath.patch b/unix2dos-2.2-tmppath.patch index 53938da..f8ad138 100644 --- a/unix2dos-2.2-tmppath.patch +++ b/unix2dos-2.2-tmppath.patch @@ -1,5 +1,6 @@ ---- unix2dos-2.2/unix2dos.c.tmppath 2004-10-20 16:10:06.941343976 +0200 -+++ unix2dos-2.2/unix2dos.c 2004-10-20 16:17:52.199613968 +0200 +diff -up unix2dos-2.2/unix2dos.c.tmppath unix2dos-2.2/unix2dos.c +--- unix2dos-2.2/unix2dos.c.tmppath 2008-09-08 10:14:30.000000000 +0100 ++++ unix2dos-2.2/unix2dos.c 2008-09-08 10:14:30.000000000 +0100 @@ -57,7 +57,10 @@ #ifdef __MSDOS__ @@ -11,7 +12,7 @@ #include #include #include -@@ -195,6 +198,40 @@ +@@ -195,6 +198,40 @@ int ConvertUnixToDos(FILE* ipInF, FILE* } @@ -52,7 +53,7 @@ /* convert file ipInFN to DOS format text and write to file ipOutFN * RetVal: 0 if success * -1 otherwise -@@ -204,7 +241,7 @@ +@@ -204,7 +241,7 @@ int ConvertUnixToDosNewFile(char *ipInFN int RetVal = 0; FILE *InF = NULL; FILE *TempF = NULL; @@ -61,7 +62,8 @@ struct stat StatBuf; struct utimbuf UTimeBuf; int fd; -@@ -214,7 +251,6 @@ +@@ -213,8 +250,7 @@ int ConvertUnixToDosNewFile(char *ipInFN + if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) RetVal = -1; - strcpy (TempPath, "./u2dtmpXXXXXX"); @@ -70,7 +72,7 @@ perror("Can't open output temp file"); RetVal = -1; } -@@ -231,6 +267,7 @@ +@@ -231,6 +267,7 @@ int ConvertUnixToDosNewFile(char *ipInFN if ((!RetVal) && (InF) && ((TempF=OpenOutFile(fd)) == NULL)) { fclose (InF); @@ -78,7 +80,7 @@ RetVal = -1; } -@@ -265,9 +302,6 @@ +@@ -265,9 +302,6 @@ int ConvertUnixToDosNewFile(char *ipInFN /* can rename temp file to out file? */ if (!RetVal) { @@ -88,7 +90,7 @@ if ((rename(TempPath, ipOutFN) == -1) && (!ipFlag->Quiet)) { fprintf(stderr, "unix2dos: problems renaming '%s' to '%s'\n", TempPath, ipOutFN); -@@ -275,6 +309,7 @@ +@@ -275,6 +309,7 @@ int ConvertUnixToDosNewFile(char *ipInFN RetVal = -1; } } @@ -96,7 +98,7 @@ return RetVal; } -@@ -289,7 +324,7 @@ +@@ -289,7 +324,7 @@ int ConvertUnixToDosOldFile(char* ipInFN int RetVal = 0; FILE *InF = NULL; FILE *TempF = NULL; @@ -105,7 +107,7 @@ struct stat StatBuf; struct utimbuf UTimeBuf; mode_t mode = S_IRUSR | S_IWUSR; -@@ -301,8 +336,7 @@ +@@ -301,8 +336,7 @@ int ConvertUnixToDosOldFile(char* ipInFN else mode = StatBuf.st_mode; @@ -115,7 +117,7 @@ perror("Can't open output temp file"); RetVal = -1; } -@@ -322,6 +356,7 @@ +@@ -322,6 +356,7 @@ int ConvertUnixToDosOldFile(char* ipInFN if ((!RetVal) && (InF) && ((TempF=OpenOutFile(fd)) == NULL)) { fclose (InF); @@ -123,7 +125,7 @@ RetVal = -1; } -@@ -349,10 +384,6 @@ +@@ -349,10 +384,6 @@ int ConvertUnixToDosOldFile(char* ipInFN RetVal = -1; } @@ -134,7 +136,7 @@ /* any error? */ if ((RetVal) && (unlink(TempPath))) RetVal = -1; -@@ -367,6 +398,7 @@ +@@ -367,6 +398,7 @@ int ConvertUnixToDosOldFile(char* ipInFN } RetVal = -1; } diff --git a/unix2dos.spec b/unix2dos.spec index 35c1bb0..34f3c37 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -47,6 +47,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Mon Sep 8 2008 Tim Waugh 2.2-31 +- Removed patch fuzz. - Preserve file modes (bug #437469). - Fixed grammar in man page (bug #460731). - Explicitly apply patch0. From ead8ef5d9239bb0c114445394c456afd5c1e3b64 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 9 Sep 2008 02:57:52 +0000 Subject: [PATCH 09/17] fix license tag --- unix2dos.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unix2dos.spec b/unix2dos.spec index 34f3c37..9715c39 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,8 +1,8 @@ Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 -Release: 31%{?dist} -License: Distributable +Release: 32%{?dist} +License: BSD Group: Applications/Text Source: unix2dos-2.2.src.tar.gz Patch0: unix2dos-mkstemp.patch @@ -46,6 +46,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Mon Sep 8 2008 Tom "spot" Callaway 2.2-32 +- fix license tag + * Mon Sep 8 2008 Tim Waugh 2.2-31 - Removed patch fuzz. - Preserve file modes (bug #437469). From 6c45e8a62820f2d9fdb506fbc7394f67fb2b867e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 23:08:15 +0000 Subject: [PATCH 10/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- unix2dos.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unix2dos.spec b/unix2dos.spec index 9715c39..f5b2f2b 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,7 +1,7 @@ Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 -Release: 32%{?dist} +Release: 33%{?dist} License: BSD Group: Applications/Text Source: unix2dos-2.2.src.tar.gz @@ -46,6 +46,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 2.2-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Sep 8 2008 Tom "spot" Callaway 2.2-32 - fix license tag From f8b4f13cceda7b5a34bc69d18d4f619865e5c1b1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 06:33:45 +0000 Subject: [PATCH 11/17] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- unix2dos.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unix2dos.spec b/unix2dos.spec index f5b2f2b..fb5d0cd 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,7 +1,7 @@ Summary: UNIX to DOS text file format converter Name: unix2dos Version: 2.2 -Release: 33%{?dist} +Release: 34%{?dist} License: BSD Group: Applications/Text Source: unix2dos-2.2.src.tar.gz @@ -46,6 +46,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 2.2-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Feb 25 2009 Fedora Release Engineering - 2.2-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 2bc791f85c14339faf04d7d5112e3244658f7831 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:52:47 +0000 Subject: [PATCH 12/17] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20956e3..eb0e5e3 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: unix2dos -# $Id: Makefile,v 1.1 2004/09/09 13:44:49 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:29:21 notting Exp $ NAME := unix2dos SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 1070a5a156c1a203560feb4ff21c247ec292e1f8 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 22 Jan 2010 10:41:47 +0000 Subject: [PATCH 13/17] - 4.1.1. New upstream. --- .cvsignore | 1 + sources | 2 +- unix2dos-2.2-manpage.patch | 42 --------- unix2dos-2.2-mode.patch | 29 ------ unix2dos-2.2-segfault.patch | 94 ------------------- unix2dos-2.2-tmppath.patch | 146 ----------------------------- unix2dos-CFLAGS.patch | 30 ++++++ unix2dos-mkstemp.patch | 20 ---- unix2dos-preserve-file-modes.patch | 18 ++-- unix2dos.spec | 43 ++++----- 10 files changed, 62 insertions(+), 363 deletions(-) delete mode 100644 unix2dos-2.2-manpage.patch delete mode 100644 unix2dos-2.2-mode.patch delete mode 100644 unix2dos-2.2-segfault.patch delete mode 100644 unix2dos-2.2-tmppath.patch create mode 100644 unix2dos-CFLAGS.patch delete mode 100644 unix2dos-mkstemp.patch diff --git a/.cvsignore b/.cvsignore index 0258812..5ec93f4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ unix2dos-2.2.src.tar.gz +unix2dos-4.1.1.tar.gz diff --git a/sources b/sources index 3a9992b..83b5fdb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4488c241fa9067a48a7534a21d4babb unix2dos-2.2.src.tar.gz +6abf8be34def111286918c599a53a73c unix2dos-4.1.1.tar.gz diff --git a/unix2dos-2.2-manpage.patch b/unix2dos-2.2-manpage.patch deleted file mode 100644 index 1172e2f..0000000 --- a/unix2dos-2.2-manpage.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up unix2dos-2.2/unix2dos.1.man unix2dos-2.2/unix2dos.1 ---- unix2dos-2.2/unix2dos.1.man 1995-03-30 17:03:22.000000000 +0100 -+++ unix2dos-2.2/unix2dos.1 2008-09-08 09:49:19.000000000 +0100 -@@ -16,7 +16,7 @@ Options: - .SH DESCRIPTION - - .PP --This manual page documents dos2unix, the program that converts text -+This manual page documents unix2dos, the program that converts text - files in UNIX format to DOS format. - - .SH OPTIONS -@@ -40,7 +40,7 @@ Prints version information. - - .TP - .B \-c --convmode convmode --Sets conversion mode. Simulates dos2unix under SunOS. -+Sets conversion mode. Simulates unix2dos under SunOS. - - .TP - .B \-o --oldfile file ... -@@ -51,7 +51,7 @@ default to run in this mode. Wildcard na - .B \-n --newfile infile outfile ... - New file mode. Convert the infile and write output to outfile. File names - must be given in pairs and wildcard names should NOT be used or you WILL --lost your files. -+lose your files. - - .SH EXAMPLES - -@@ -71,9 +71,9 @@ Convert and replace a.txt. Convert and r - Convert and replace a.txt in ASCII conversion mode. - Convert and replace b.txt in ISO conversion mode. - .IP --.B dos2unix a.txt -c iso b.txt -+.B unix2dos a.txt -c iso b.txt - .IP --.B dos2unix -c ascii a.txt -c iso b.txt -+.B unix2dos -c ascii a.txt -c iso b.txt - - .LP - Convert and replace a.txt while keeping original date stamp. diff --git a/unix2dos-2.2-mode.patch b/unix2dos-2.2-mode.patch deleted file mode 100644 index f5ff62a..0000000 --- a/unix2dos-2.2-mode.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up unix2dos-2.2/unix2dos.c.mode unix2dos-2.2/unix2dos.c ---- unix2dos-2.2/unix2dos.c.mode 2008-09-08 10:13:39.000000000 +0100 -+++ unix2dos-2.2/unix2dos.c 2008-09-08 10:13:39.000000000 +0100 -@@ -292,11 +292,14 @@ int ConvertUnixToDosOldFile(char* ipInFN - char TempPath[16]; - struct stat StatBuf; - struct utimbuf UTimeBuf; -+ mode_t mode = S_IRUSR | S_IWUSR; - int fd; - - /* retrieve ipInFN file date stamp */ -- if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) -+ if (stat(ipInFN, &StatBuf)) - RetVal = -1; -+ else -+ mode = StatBuf.st_mode; - - strcpy (TempPath, "./u2dtmpXXXXXX"); - if((fd=mkstemp (TempPath)) < 0) { -@@ -304,6 +307,9 @@ int ConvertUnixToDosOldFile(char* ipInFN - RetVal = -1; - } - -+ if (!RetVal && fchmod (fd, mode) && fchmod (fd, S_IRUSR | S_IWUSR)) -+ RetVal = -1; -+ - #ifdef DEBUG - fprintf(stderr, "unix2dos: using %s as temp file\n", TempPath); - #endif DEBUG diff --git a/unix2dos-2.2-segfault.patch b/unix2dos-2.2-segfault.patch deleted file mode 100644 index a92f57c..0000000 --- a/unix2dos-2.2-segfault.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- unix2dos-2.2/unix2dos.c.segf Thu Jan 17 17:09:49 2002 -+++ unix2dos-2.2/unix2dos.c Thu Jan 17 17:12:47 2002 -@@ -131,9 +131,9 @@ - * RetVal: NULL if failure - * file stream otherwise - */ --FILE* OpenOutFile(char *ipFN) -+FILE* OpenOutFile(int fd) - { -- return (fopen(ipFN, W_CNTRL)); -+ return (fdopen(fd, W_CNTRL)); - } - - -@@ -207,14 +207,17 @@ - char TempPath[16]; - struct stat StatBuf; - struct utimbuf UTimeBuf; -+ int fd; - - /* retrieve ipInFN file date stamp */ - if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) - RetVal = -1; - -- strcpy (TempPath, "./u2dtmp"); -- strcat (TempPath, "XXXXXX"); -- mkstemp (TempPath); -+ strcpy (TempPath, "./u2dtmpXXXXXX"); -+ if((fd=mkstemp (TempPath)) < 0) { -+ perror("Can't open output temp file"); -+ RetVal = -1; -+ } - - #ifdef DEBUG - fprintf(stderr, "unix2dos: using %s as temp file\n", TempPath); -@@ -225,7 +228,7 @@ - RetVal = -1; - - /* can open out file? */ -- if ((!RetVal) && (InF) && ((TempF=OpenOutFile(TempPath)) == NULL)) -+ if ((!RetVal) && (InF) && ((TempF=OpenOutFile(fd)) == NULL)) - { - fclose (InF); - RetVal = -1; -@@ -243,6 +246,9 @@ - if ((TempF) && (fclose(TempF) == EOF)) - RetVal = -1; - -+ if(fd>=0) -+ close(fd); -+ - if ((!RetVal) && (ipFlag->KeepDate)) - { - UTimeBuf.actime = StatBuf.st_atime; -@@ -286,14 +292,17 @@ - char TempPath[16]; - struct stat StatBuf; - struct utimbuf UTimeBuf; -+ int fd; - - /* retrieve ipInFN file date stamp */ - if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) - RetVal = -1; - -- strcpy (TempPath, "./u2dtmp"); -- strcat (TempPath, "XXXXXX"); -- mkstemp (TempPath); -+ strcpy (TempPath, "./u2dtmpXXXXXX"); -+ if((fd=mkstemp (TempPath)) < 0) { -+ perror("Can't open output temp file"); -+ RetVal = -1; -+ } - - #ifdef DEBUG - fprintf(stderr, "unix2dos: using %s as temp file\n", TempPath); -@@ -304,7 +313,7 @@ - RetVal = -1; - - /* can open out file? */ -- if ((!RetVal) && (InF) && ((TempF=OpenOutFile(TempPath)) == NULL)) -+ if ((!RetVal) && (InF) && ((TempF=OpenOutFile(fd)) == NULL)) - { - fclose (InF); - RetVal = -1; -@@ -322,6 +331,9 @@ - if ((TempF) && (fclose(TempF) == EOF)) - RetVal = -1; - -+ if(fd>=0) -+ close(fd); -+ - if ((!RetVal) && (ipFlag->KeepDate)) - { - UTimeBuf.actime = StatBuf.st_atime; diff --git a/unix2dos-2.2-tmppath.patch b/unix2dos-2.2-tmppath.patch deleted file mode 100644 index f8ad138..0000000 --- a/unix2dos-2.2-tmppath.patch +++ /dev/null @@ -1,146 +0,0 @@ -diff -up unix2dos-2.2/unix2dos.c.tmppath unix2dos-2.2/unix2dos.c ---- unix2dos-2.2/unix2dos.c.tmppath 2008-09-08 10:14:30.000000000 +0100 -+++ unix2dos-2.2/unix2dos.c 2008-09-08 10:14:30.000000000 +0100 -@@ -57,7 +57,10 @@ - - #ifdef __MSDOS__ - # include -+#else -+# include - #endif __MSDOS -+#include - #include - #include - #include -@@ -195,6 +198,40 @@ int ConvertUnixToDos(FILE* ipInF, FILE* - } - - -+static int MakeTempFileFrom(const char *OutFN, char **fname_ret) -+{ -+ char *cpy = strdup(OutFN); -+ char *dir = NULL; -+ size_t fname_len = 0; -+ char *fname_str = NULL; -+ int fd = -1; -+ -+ *fname_ret = NULL; -+ -+ if (!cpy) -+ goto make_failed; -+ -+ dir = dirname(cpy); -+ -+ fname_len = strlen(dir) + strlen("/u2dtmpXXXXXX") + sizeof (char); -+ if (!(fname_str = malloc(fname_len))) -+ goto make_failed; -+ sprintf(fname_str, "%s%s", dir, "/u2dtmpXXXXXX"); -+ *fname_ret = fname_str; -+ -+ free(cpy); -+ -+ if ((fd = mkstemp(fname_str)) == -1) -+ goto make_failed; -+ -+ return (fd); -+ -+ make_failed: -+ free(*fname_ret); -+ *fname_ret = NULL; -+ return (-1); -+} -+ - /* convert file ipInFN to DOS format text and write to file ipOutFN - * RetVal: 0 if success - * -1 otherwise -@@ -204,7 +241,7 @@ int ConvertUnixToDosNewFile(char *ipInFN - int RetVal = 0; - FILE *InF = NULL; - FILE *TempF = NULL; -- char TempPath[16]; -+ char *TempPath; - struct stat StatBuf; - struct utimbuf UTimeBuf; - int fd; -@@ -213,8 +250,7 @@ int ConvertUnixToDosNewFile(char *ipInFN - if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) - RetVal = -1; - -- strcpy (TempPath, "./u2dtmpXXXXXX"); -- if((fd=mkstemp (TempPath)) < 0) { -+ if((fd = MakeTempFileFrom (ipOutFN, &TempPath)) < 0) { - perror("Can't open output temp file"); - RetVal = -1; - } -@@ -231,6 +267,7 @@ int ConvertUnixToDosNewFile(char *ipInFN - if ((!RetVal) && (InF) && ((TempF=OpenOutFile(fd)) == NULL)) - { - fclose (InF); -+ InF = NULL; - RetVal = -1; - } - -@@ -265,9 +302,6 @@ int ConvertUnixToDosNewFile(char *ipInFN - /* can rename temp file to out file? */ - if (!RetVal) - { -- if (stat(ipOutFN, &StatBuf) == 0) -- unlink(ipOutFN); -- - if ((rename(TempPath, ipOutFN) == -1) && (!ipFlag->Quiet)) - { - fprintf(stderr, "unix2dos: problems renaming '%s' to '%s'\n", TempPath, ipOutFN); -@@ -275,6 +309,7 @@ int ConvertUnixToDosNewFile(char *ipInFN - RetVal = -1; - } - } -+ free(TempPath); - - return RetVal; - } -@@ -289,7 +324,7 @@ int ConvertUnixToDosOldFile(char* ipInFN - int RetVal = 0; - FILE *InF = NULL; - FILE *TempF = NULL; -- char TempPath[16]; -+ char *TempPath; - struct stat StatBuf; - struct utimbuf UTimeBuf; - mode_t mode = S_IRUSR | S_IWUSR; -@@ -301,8 +336,7 @@ int ConvertUnixToDosOldFile(char* ipInFN - else - mode = StatBuf.st_mode; - -- strcpy (TempPath, "./u2dtmpXXXXXX"); -- if((fd=mkstemp (TempPath)) < 0) { -+ if((fd = MakeTempFileFrom(ipInFN, &TempPath)) < 0) { - perror("Can't open output temp file"); - RetVal = -1; - } -@@ -322,6 +356,7 @@ int ConvertUnixToDosOldFile(char* ipInFN - if ((!RetVal) && (InF) && ((TempF=OpenOutFile(fd)) == NULL)) - { - fclose (InF); -+ InF = NULL; - RetVal = -1; - } - -@@ -349,10 +384,6 @@ int ConvertUnixToDosOldFile(char* ipInFN - RetVal = -1; - } - -- /* can delete in file? */ -- if ((!RetVal) && (unlink(ipInFN) == -1)) -- RetVal = -1; -- - /* any error? */ - if ((RetVal) && (unlink(TempPath))) - RetVal = -1; -@@ -367,6 +398,7 @@ int ConvertUnixToDosOldFile(char* ipInFN - } - RetVal = -1; - } -+ free(TempPath); - return RetVal; - } - diff --git a/unix2dos-CFLAGS.patch b/unix2dos-CFLAGS.patch new file mode 100644 index 0000000..2079819 --- /dev/null +++ b/unix2dos-CFLAGS.patch @@ -0,0 +1,30 @@ +diff -up unix2dos-4.1.1/Makefile.CFLAGS unix2dos-4.1.1/Makefile +--- unix2dos-4.1.1/Makefile.CFLAGS 2009-12-28 13:49:53.000000000 +0000 ++++ unix2dos-4.1.1/Makefile 2010-01-22 10:33:15.807049723 +0000 +@@ -111,15 +111,14 @@ endif + + # ............................................................ flags ... + +-GCCFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE ++CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE + + ifdef STATIC + GCCFLAGS += -static + endif + +-CFLAGS = -DVER_REVISION=\"$(UNIX2DOS_VERSION)\" \ ++EXTRA_CFLAGS = -DVER_REVISION=\"$(UNIX2DOS_VERSION)\" \ + -DVER_DATE=\"$(UNIX2DOS_DATE)\" \ +- $(GCCFLAGS) \ + $(CFLAGS_OS) \ + $(NLSDEFS) + +@@ -133,7 +132,7 @@ DEFS = $(EXTRA_DEFS) + all: $(BIN) $(DOCFILES) $(MOFILES) + + %.o : %.c +- $(CC) $(CFLAGS) $(DEFS) -c $< -o $@ ++ $(CC) $(EXTRA_CFLAGS) $(CFLAGS) $(DEFS) -c $< -o $@ + + $(BIN): unix2dos.o + $(CC) $< $(LDFLAGS) -o $@ diff --git a/unix2dos-mkstemp.patch b/unix2dos-mkstemp.patch deleted file mode 100644 index 034e0a0..0000000 --- a/unix2dos-mkstemp.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- unix2dos-2.2/unix2dos.c.orig Fri Nov 17 13:29:24 2000 -+++ unix2dos-2.2/unix2dos.c Fri Nov 17 13:30:16 2000 -@@ -214,7 +214,7 @@ - - strcpy (TempPath, "./u2dtmp"); - strcat (TempPath, "XXXXXX"); -- mktemp (TempPath); -+ mkstemp (TempPath); - - #ifdef DEBUG - fprintf(stderr, "unix2dos: using %s as temp file\n", TempPath); -@@ -293,7 +293,7 @@ - - strcpy (TempPath, "./u2dtmp"); - strcat (TempPath, "XXXXXX"); -- mktemp (TempPath); -+ mkstemp (TempPath); - - #ifdef DEBUG - fprintf(stderr, "unix2dos: using %s as temp file\n", TempPath); diff --git a/unix2dos-preserve-file-modes.patch b/unix2dos-preserve-file-modes.patch index e824044..41fcb8e 100644 --- a/unix2dos-preserve-file-modes.patch +++ b/unix2dos-preserve-file-modes.patch @@ -1,20 +1,24 @@ -diff -up unix2dos-2.2/unix2dos.c~ unix2dos-2.2/unix2dos.c ---- unix2dos-2.2/unix2dos.c~ 2008-03-03 13:16:34.000000000 +0000 -+++ unix2dos-2.2/unix2dos.c 2008-03-03 13:22:10.000000000 +0000 -@@ -244,10 +244,11 @@ int ConvertUnixToDosNewFile(char *ipInFN +diff -up unix2dos-4.1.1/unix2dos.c.preserve-file-modes unix2dos-4.1.1/unix2dos.c +--- unix2dos-4.1.1/unix2dos.c.preserve-file-modes 2010-01-10 21:02:18.000000000 +0000 ++++ unix2dos-4.1.1/unix2dos.c 2010-01-22 10:29:46.193058169 +0000 +@@ -389,6 +389,7 @@ int ConvertUnixToDosNewFile(char *ipInFN char *TempPath; struct stat StatBuf; struct utimbuf UTimeBuf; + mode_t mask; - int fd; + #ifdef NO_MKSTEMP + FILE* fd; + #else +@@ -404,7 +405,7 @@ int ConvertUnixToDosNewFile(char *ipInFN + ipFlag->status = 0 ; /* retrieve ipInFN file date stamp */ - if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) + if (stat(ipInFN, &StatBuf)) RetVal = -1; - if((fd = MakeTempFileFrom (ipOutFN, &TempPath)) < 0) { -@@ -271,6 +272,12 @@ int ConvertUnixToDosNewFile(char *ipInFN + #ifdef NO_MKSTEMP +@@ -436,6 +437,12 @@ int ConvertUnixToDosNewFile(char *ipInFN RetVal = -1; } diff --git a/unix2dos.spec b/unix2dos.spec index fb5d0cd..adcf67f 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,51 +1,46 @@ Summary: UNIX to DOS text file format converter Name: unix2dos -Version: 2.2 -Release: 34%{?dist} +Version: 4.1.1 +Release: 1%{?dist} License: BSD Group: Applications/Text -Source: unix2dos-2.2.src.tar.gz -Patch0: unix2dos-mkstemp.patch -Patch1: unix2dos-2.2-segfault.patch -Patch2: unix2dos-2.2-manpage.patch -Patch3: unix2dos-2.2-mode.patch -Patch4: unix2dos-2.2-tmppath.patch -Patch5: unix2dos-preserve-file-modes.patch +Url: http://www.xs4all.nl/~waterlan/dos2unix.html +Source: http://www.xs4all.nl/~waterlan/unix2dos/%{name}-%{version}.tar.gz +BuildRequires: gettext +Patch1: unix2dos-preserve-file-modes.patch +Patch2: unix2dos-CFLAGS.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %prep -%setup -q -c -%patch0 -p1 -b .sec -%patch1 -p1 -b .segf -%patch2 -p1 -b .man -%patch3 -p1 -b .mode -%patch4 -p1 -b .tmppath -%patch5 -p1 -b .preserve-file-modes -perl -pi -e "s/^#endif.*/#endif/g;s/^#else.*/#else/g" *.[ch] +%setup -q +%patch1 -p1 -b .preserve-file-modes +%patch2 -p1 -b .CFLAGS %description A utility that converts plain text files in UNIX format to DOS format. %build -gcc $RPM_OPT_FLAGS -o unix2dos unix2dos.c +make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE $(getconf LFS_CFLAGS)" \ + %{?_smp_mflags} %install -rm -rf ${RPM_BUILD_ROOT} -mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} -install -p -m755 unix2dos $RPM_BUILD_ROOT%{_bindir} -install -p -m444 unix2dos.1 $RPM_BUILD_ROOT%{_mandir}/man1 +make DESTDIR=%{buildroot} install +%find_lang %{name} %clean rm -rf ${RPM_BUILD_ROOT} -%files +%files -f %{name}.lang %defattr(-,root,root,0755) -%doc COPYRIGHT +%doc COPYING.txt %{_bindir}/unix2dos %{_mandir}/*/* %changelog +* Fri Jan 22 2010 Tim Waugh - 4.1.1-1 +- 4.1.1. New upstream. + * Sun Jul 26 2009 Fedora Release Engineering - 2.2-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 6b1b0600657febe9883c6de28af85cbdcefa7cad Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 26 Jan 2010 09:57:31 +0000 Subject: [PATCH 14/17] - 4.1.2. --- .cvsignore | 1 + sources | 2 +- unix2dos-CFLAGS.patch | 30 --------------------------- unix2dos-preserve-file-modes.patch | 33 ------------------------------ unix2dos.spec | 9 ++++---- 5 files changed, 6 insertions(+), 69 deletions(-) delete mode 100644 unix2dos-CFLAGS.patch delete mode 100644 unix2dos-preserve-file-modes.patch diff --git a/.cvsignore b/.cvsignore index 5ec93f4..d61c9d5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ unix2dos-2.2.src.tar.gz unix2dos-4.1.1.tar.gz +unix2dos-4.1.2.tar.gz diff --git a/sources b/sources index 83b5fdb..c0c892b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6abf8be34def111286918c599a53a73c unix2dos-4.1.1.tar.gz +5fbabfaea4315ff55a55d87619391eb2 unix2dos-4.1.2.tar.gz diff --git a/unix2dos-CFLAGS.patch b/unix2dos-CFLAGS.patch deleted file mode 100644 index 2079819..0000000 --- a/unix2dos-CFLAGS.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up unix2dos-4.1.1/Makefile.CFLAGS unix2dos-4.1.1/Makefile ---- unix2dos-4.1.1/Makefile.CFLAGS 2009-12-28 13:49:53.000000000 +0000 -+++ unix2dos-4.1.1/Makefile 2010-01-22 10:33:15.807049723 +0000 -@@ -111,15 +111,14 @@ endif - - # ............................................................ flags ... - --GCCFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE -+CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE - - ifdef STATIC - GCCFLAGS += -static - endif - --CFLAGS = -DVER_REVISION=\"$(UNIX2DOS_VERSION)\" \ -+EXTRA_CFLAGS = -DVER_REVISION=\"$(UNIX2DOS_VERSION)\" \ - -DVER_DATE=\"$(UNIX2DOS_DATE)\" \ -- $(GCCFLAGS) \ - $(CFLAGS_OS) \ - $(NLSDEFS) - -@@ -133,7 +132,7 @@ DEFS = $(EXTRA_DEFS) - all: $(BIN) $(DOCFILES) $(MOFILES) - - %.o : %.c -- $(CC) $(CFLAGS) $(DEFS) -c $< -o $@ -+ $(CC) $(EXTRA_CFLAGS) $(CFLAGS) $(DEFS) -c $< -o $@ - - $(BIN): unix2dos.o - $(CC) $< $(LDFLAGS) -o $@ diff --git a/unix2dos-preserve-file-modes.patch b/unix2dos-preserve-file-modes.patch deleted file mode 100644 index 41fcb8e..0000000 --- a/unix2dos-preserve-file-modes.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up unix2dos-4.1.1/unix2dos.c.preserve-file-modes unix2dos-4.1.1/unix2dos.c ---- unix2dos-4.1.1/unix2dos.c.preserve-file-modes 2010-01-10 21:02:18.000000000 +0000 -+++ unix2dos-4.1.1/unix2dos.c 2010-01-22 10:29:46.193058169 +0000 -@@ -389,6 +389,7 @@ int ConvertUnixToDosNewFile(char *ipInFN - char *TempPath; - struct stat StatBuf; - struct utimbuf UTimeBuf; -+ mode_t mask; - #ifdef NO_MKSTEMP - FILE* fd; - #else -@@ -404,7 +405,7 @@ int ConvertUnixToDosNewFile(char *ipInFN - ipFlag->status = 0 ; - - /* retrieve ipInFN file date stamp */ -- if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) -+ if (stat(ipInFN, &StatBuf)) - RetVal = -1; - - #ifdef NO_MKSTEMP -@@ -436,6 +437,12 @@ int ConvertUnixToDosNewFile(char *ipInFN - RetVal = -1; - } - -+ /* preserve original mode as modified by umask */ -+ mask = umask(0); -+ umask(mask); -+ if (!RetVal && fchmod(fd, StatBuf.st_mode & ~mask)) -+ RetVal = -1; -+ - /* conversion sucessful? */ - if ((!RetVal) && (ConvertUnixToDos(InF, TempF, ipFlag))) - RetVal = -1; diff --git a/unix2dos.spec b/unix2dos.spec index adcf67f..d7170b0 100644 --- a/unix2dos.spec +++ b/unix2dos.spec @@ -1,20 +1,16 @@ Summary: UNIX to DOS text file format converter Name: unix2dos -Version: 4.1.1 +Version: 4.1.2 Release: 1%{?dist} License: BSD Group: Applications/Text Url: http://www.xs4all.nl/~waterlan/dos2unix.html Source: http://www.xs4all.nl/~waterlan/unix2dos/%{name}-%{version}.tar.gz BuildRequires: gettext -Patch1: unix2dos-preserve-file-modes.patch -Patch2: unix2dos-CFLAGS.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %prep %setup -q -%patch1 -p1 -b .preserve-file-modes -%patch2 -p1 -b .CFLAGS %description A utility that converts plain text files in UNIX format to DOS format. @@ -38,6 +34,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Tue Jan 26 2010 Tim Waugh - 4.1.2-1 +- 4.1.2. + * Fri Jan 22 2010 Tim Waugh - 4.1.1-1 - 4.1.1. New upstream. From e7ca5e6e3e9aad3afd77f7ee5ab25e742eefc64c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 18:04:31 +0000 Subject: [PATCH 15/17] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 6 ------ branch | 1 - 3 files changed, 7 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 2f6496d..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile for source rpm: unix2dos -# $Id$ -NAME := unix2dos -SPECFILE = $(firstword $(wildcard *.spec)) - -include ../common/Makefile.common diff --git a/branch b/branch deleted file mode 100644 index c48525c..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-7 From 2bc253901ff31c2bdddcd5a1dc6fe52351064d69 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 18:04:39 +0000 Subject: [PATCH 16/17] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index eb0e5e3..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: unix2dos -# $Id: Makefile,v 1.2 2007/10/15 19:29:21 notting Exp $ -NAME := unix2dos -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From f0512d50bb3650120f401176a03eff9756f0b758 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 18 Aug 2010 12:11:36 +0100 Subject: [PATCH 17/17] Dead package (obsoleted by dos2unix-5.1). --- dead.package | 1 + sources | 1 - unix2dos.spec | 165 -------------------------------------------------- 3 files changed, 1 insertion(+), 166 deletions(-) create mode 100644 dead.package delete mode 100644 sources delete mode 100644 unix2dos.spec diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..7e28d01 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Obsoleted by dos2unix-5.1, which merges unix2dos. diff --git a/sources b/sources deleted file mode 100644 index c0c892b..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -5fbabfaea4315ff55a55d87619391eb2 unix2dos-4.1.2.tar.gz diff --git a/unix2dos.spec b/unix2dos.spec deleted file mode 100644 index d7170b0..0000000 --- a/unix2dos.spec +++ /dev/null @@ -1,165 +0,0 @@ -Summary: UNIX to DOS text file format converter -Name: unix2dos -Version: 4.1.2 -Release: 1%{?dist} -License: BSD -Group: Applications/Text -Url: http://www.xs4all.nl/~waterlan/dos2unix.html -Source: http://www.xs4all.nl/~waterlan/unix2dos/%{name}-%{version}.tar.gz -BuildRequires: gettext -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%prep -%setup -q - -%description -A utility that converts plain text files in UNIX format to DOS format. - -%build -make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE $(getconf LFS_CFLAGS)" \ - %{?_smp_mflags} - -%install -make DESTDIR=%{buildroot} install -%find_lang %{name} - -%clean -rm -rf ${RPM_BUILD_ROOT} - -%files -f %{name}.lang -%defattr(-,root,root,0755) -%doc COPYING.txt -%{_bindir}/unix2dos -%{_mandir}/*/* - - -%changelog -* Tue Jan 26 2010 Tim Waugh - 4.1.2-1 -- 4.1.2. - -* Fri Jan 22 2010 Tim Waugh - 4.1.1-1 -- 4.1.1. New upstream. - -* Sun Jul 26 2009 Fedora Release Engineering - 2.2-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 2.2-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Mon Sep 8 2008 Tom "spot" Callaway 2.2-32 -- fix license tag - -* Mon Sep 8 2008 Tim Waugh 2.2-31 -- Removed patch fuzz. -- Preserve file modes (bug #437469). -- Fixed grammar in man page (bug #460731). -- Explicitly apply patch0. - -* Wed Feb 13 2008 Tim Waugh 2.2-30 -- Rebuild for GCC 4.3. - -* Wed Aug 29 2007 Tim Waugh 2.2-29 -- Rebuilt. - -* Wed Feb 7 2007 Tim Waugh 2.2-28 -- Fixed license tag (bug #226514). - -* Tue Feb 6 2007 Tim Waugh 2.2-27 -- Preserve timestamps on install (bug #226514). -- Fixed summary (bug #226514). -- Fixed build root (bug #226514). -- Don't explicitly require perl for build (bug #226514). -- Added dist to release tag (bug #226514). -- Don't build with '-Wall' since RPM_OPT_FLAGS already includes it - (bug #226514). -- Fixed macros in changelog (bug #226514). - -* Wed Jul 12 2006 Jesse Keating - 2.2-26.2.2 -- rebuild - -* Fri Feb 10 2006 Jesse Keating - 2.2-26.2.1 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 2.2-26.2 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Wed Apr 13 2005 Tim Waugh -- Merge last fix into tmppath patch, which introduced the original problem. - -* Tue Apr 12 2005 Tim Waugh 2.2-26 -- Removed inappropriate strcpy (bug #153079). Patch from Neil Horman. - -* Thu Mar 3 2005 Mike A. Harris 2.2-25 -- Rebuild with gcc 4 for FC4 - -* Wed Oct 20 2004 Miloslav Trmac 2.2-24 -- Don't just delete the original file when destination and current directory - are on different filesystems - -* Mon Oct 11 2004 Tim Waugh 2.2-23 -- Apply H J Lu's patch to preserve file mode (bug #91332). - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Mon Oct 7 2002 Mike A. Harris 2.2-18 -- All-arch rebuild - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Tue Mar 5 2002 Bernhard Rosenkraenzer 2.2-15 -- rebuild - -* Thu Jan 17 2002 Bernhard Rosenkraenzer 2.2-14 -- Fix up the mkstemp patch, don't segfault with lacking write permissions - (#57700) -- Fix up man page (part 2 of #57700) -- Fix compiler warnings - -* Wed Jan 09 2002 Tim Powers -- automated rebuild - -* Sun Jun 24 2001 Elliot Lee -- Bump release + rebuild. - -* Fri Nov 17 2000 Tim Powers -- patched to use mkstemp, not much had to be done. - -* Thu Nov 16 2000 Tim Powers -- minor spec file cleanups -- built for 7.1 -- use predefined RPM macros whenever possible -- use RPM_OPT_FLAGS when building - -* Tue Jul 07 1999 Peter Soos -- Added Hungarian "Summary:" and "%%description" -- Corrected the file and directory attributes to rebuild the package - under RedHat Linux 6.0 - -* Thu Jul 09 1998 Arkadiusz Mikkkkkkiewicz -- Recompiled under RedHat Linux 5.1 -- Small changes in %%build and %%files -- Added "Vendor:" -- Added Polish "Summary:" and "%%description" - -* Thu Jun 18 1998 Peter Soos -- Corrected the spec file for rpm 2.5 - -* Fri Dec 5 1997 Peter Soos -- Recompiled under RedHat Linux 5.0