]> git.pld-linux.org Git - packages/dos2unix.git/commitdiff
- Up to 5.1.1
authorCaleb Maclennan <caleb@alerque.com>
Fri, 12 Nov 2010 16:06:05 +0000 (16:06 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- Obsoletes separate unix2dos package
- Removed patches 0, 1, 4 and 5: applied upstream
- Commented patches 3 and 6: probably applied upstream but unclear due to significant changes in new version, do not apply cleanly
- Updated upstream project URLs

Changed files:
    dos2unix-manpage-update.patch -> 1.2
    dos2unix-preserve-file-modes.patch -> 1.2
    dos2unix-safeconv.patch -> 1.2
    dos2unix-segfault.patch -> 1.3
    dos2unix.patch -> 1.3
    dos2unix.spec -> 1.23

dos2unix-manpage-update.patch
dos2unix-preserve-file-modes.patch [deleted file]
dos2unix-safeconv.patch [deleted file]
dos2unix-segfault.patch [deleted file]
dos2unix.patch [deleted file]
dos2unix.spec

index 7e4b70591a3880332ef559d4a17aae4e85246172..bf5941809c49b89bace15a73e40bfc43e809a39e 100644 (file)
@@ -7,8 +7,8 @@ isn't used in the following example.
 Patch by Bill Anderson
 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=57507
 
---- dos2unix-3.1/dos2unix.1
-+++ dos2unix-3.1/dos2unix.1
+--- dos2unix-5.1.1/man/man1/dos2unix.1~
++++ dos2unix-5.1.1/man/man1/dos2unix.1
 @@ -4,127 +4,104 @@
  .SH NAME
  
diff --git a/dos2unix-preserve-file-modes.patch b/dos2unix-preserve-file-modes.patch
deleted file mode 100644 (file)
index a357b0b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Ripped from Fedora
-
---- dos2unix-3.1/dos2unix.c
-+++ dos2unix-3.1/dos2unix.c
-@@ -345,11 +345,14 @@ int ConvertDosToUnixOldFile(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) {
-@@ -357,6 +360,9 @@ int ConvertDosToUnixOldFile(char* ipInFN
-         RetVal = -1;
-   }
-+  if (!RetVal && fchmod (fd, mode) && fchmod (fd, S_IRUSR | S_IWUSR))
-+    RetVal = -1;
-+
- #ifdef DEBUG
-   fprintf(stderr, "dos2unix: using %s as temp file\n", TempPath);
- #endif DEBUG
diff --git a/dos2unix-safeconv.patch b/dos2unix-safeconv.patch
deleted file mode 100644 (file)
index 11998be..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-* Fix http://bugzilla.redhat.com/57508 (make dos2unix not modify Mac
-  files unless in mac2unix mode)
-* Make mac2unix mode not create duplicate Unix line delimiters when
-  run on a DOS file. (mschwendt@users.sf.net)
-
-diff -Nur dos2unix-3.1-orig/dos2unix.c dos2unix-3.1/dos2unix.c
---- dos2unix-3.1-orig/dos2unix.c       1998-11-19 13:19:25.000000000 +0100
-+++ dos2unix-3.1/dos2unix.c    2004-09-26 20:57:41.606587616 +0200
-@@ -153,6 +153,24 @@
- }
-+void StripDelimiter(FILE* ipInF, FILE* ipOutF, CFlag *ipFlag, int CurChar)
-+{
-+  int TempNextChar;
-+  /* Don't modify Mac files when in dos2unix mode. */
-+  if ( (TempNextChar = getc(ipInF)) != EOF) {
-+    ungetc( TempNextChar, ipInF );  /* put back peek char */
-+    if ( TempNextChar != '\x0a' ) {
-+      putc( CurChar, ipOutF );  /* Mac line, put back CR */
-+    }
-+  }
-+  else if ( CurChar == '\x0d' ) {  /* EOF: last Mac line delimiter (CR)? */
-+    putc( CurChar, ipOutF );
-+  }
-+  if (ipFlag->NewLine) {  /* add additional LF? */
-+    putc('\n', ipOutF);
-+  }
-+}
-+
- /* converts stream ipInF to UNIX format text and write to stream ipOutF
-  * RetVal: 0  if success
-  *         -1  otherwise
-@@ -161,6 +179,7 @@
- {
-     int RetVal = 0;
-     int TempChar;
-+    int TempNextChar;
-     
-     if ( macmode )
-       ipFlag->ConvMode = 3;
-@@ -177,9 +196,7 @@
-               break;
-             } 
-           } else {
--            if (ipFlag->NewLine) {
--              putc('\n', ipOutF);
--            }
-+            StripDelimiter( ipInF, ipOutF, ipFlag, TempChar );
-           }
-         }
-         break;
-@@ -193,9 +210,7 @@
-               break;
-             }
-           } else {
--            if (ipFlag->NewLine) {
--              putc('\n', ipOutF);
--            }
-+            StripDelimiter( ipInF, ipOutF, ipFlag, TempChar );
-           }
-         }
-         break;
-@@ -209,9 +224,7 @@
-               break;
-             }
-           } else {
--            if (ipFlag->NewLine) {
--              putc('\n', ipOutF);
--            }
-+            StripDelimiter( ipInF, ipOutF, ipFlag, TempChar );
-           }
-         }
-         break;
-@@ -227,6 +240,13 @@
-               }
-             }
-           else{
-+            if ( (TempNextChar = getc(ipInF)) != EOF) {
-+              ungetc( TempNextChar, ipInF );  /* put back peek char */
-+              /* Don't touch this delimiter if it's a CR,LF pair. */
-+              if ( TempNextChar == '\x0a' ) {
-+                continue;
-+              }
-+            }
-             if (putc('\x0a', ipOutF) == EOF)
-               {
-                 RetVal = -1;
diff --git a/dos2unix-segfault.patch b/dos2unix-segfault.patch
deleted file mode 100644 (file)
index 5ead232..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
---- dos2unix-3.1/dos2unix.c
-+++ dos2unix-3.1/dos2unix.c
-@@ -147,9 +147,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));
- }
-@@ -260,14 +260,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, "./d2utmp");
--  strcat (TempPath, "XXXXXX");
--  mktemp (TempPath);
-+  strcpy (TempPath, "./d2utmpXXXXXX");
-+  if((fd=mkstemp (TempPath))<0) {
-+        perror("Failed to open output temp file");
-+        RetVal = -1;
-+  }
- #ifdef DEBUG
-   fprintf(stderr, "dos2unix: using %s as temp file\n", TempPath);
-@@ -278,7 +281,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;
-@@ -295,6 +298,8 @@
-   /* can close out file? */
-   if ((TempF) && (fclose(TempF) == EOF))
-     RetVal = -1;
-+  if(fd>=0)
-+        close(fd);
-   if ((!RetVal) && (ipFlag->KeepDate))
-   {
-@@ -340,14 +345,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");
--  mktemp (TempPath);
-+  strcpy (TempPath, "./u2dtmpXXXXXX");
-+  if((fd=mkstemp (TempPath))<0) {
-+        perror("Failed to open output temp file");
-+        RetVal = -1;
-+  }
- #ifdef DEBUG
-   fprintf(stderr, "dos2unix: using %s as temp file\n", TempPath);
-@@ -358,7 +366,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;
-@@ -376,6 +384,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/dos2unix.patch b/dos2unix.patch
deleted file mode 100644 (file)
index e7a9d86..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- dos2unix-3.1/Makefile.orig Thu Nov 19 07:09:38 1998
-+++ dos2unix-3.1/Makefile      Fri Nov 17 13:25:35 2000
-@@ -1,10 +1,12 @@
-+CFLAGS=
-+
- default: dos2unix
- all:  dos2unix link install
- dos2unix:
--      gcc -O dos2unix.c -o dos2unix
-+      gcc $(CFLAGS) dos2unix.c -o dos2unix
- link: 
-@@ -12,11 +14,10 @@
-       ln -s dos2unix.1 mac2unix.1             
- clean:
--      rm dos2unix
-+      rm -f dos2unix mac2unix mac2unix.1 *~ *.orig core
- install:
-       install -m 755 dos2unix /usr/local/bin
-       install -m 644 dos2unix.1 /usr/local/man/man1
-       install -m 755 mac2unix /usr/local/bin
-       install -m 644 mac2unix.1 /usr/local/man/man1
--
-
index bbdf5d150d35df6aeca32c880caa0b6eaafbe52d..d4960fe3307db9fe824c190e87d8a4749bdf23d9 100644 (file)
@@ -6,19 +6,17 @@ Summary(ru.UTF-8):    dos2unix - конвертор текстовых файлов
 Summary(uk.UTF-8):     dos2unix - конвертор текстових файлів DOS в формат UNIX
 Summary(zh_CN.UTF-8):  转换DOS或MAC文本文件到UNIX格式
 Name:          dos2unix
-Version:       3.1
-Release:       21
+Version:       5.1.1
+Release:       1
 License:       Freer than LGPL
 Group:         Applications/Text
-Source0:       http://www.go.dlr.de/linux/src/%{name}-%{version}.tar.gz
-# Source0-md5: 25ff56bab202de63ea6f6c211c416e96
-Patch0:                %{name}.patch
-Patch1:                %{name}-segfault.patch
+Source0:       http://www.xs4all.nl/~waterlan/dos2unix/%{name}-%{version}.tar.gz
+# Source0-md5: b8f6d8109fc6decf412bc1e3959450c0
+URL:           http://www.xs4all.nl/~waterlan/dos2unix.html
 Patch2:                %{name}-includes.patch
 Patch3:                %{name}-manpage-update.patch
-Patch4:                %{name}-preserve-file-modes.patch
-Patch5:                %{name}-safeconv.patch
 Patch6:                %{name}-workaround-rename-EXDEV.patch
+Obsoletes:     unix2dos
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,33 +42,30 @@ dos2unix - конвертор текстових файлів DOS в форма
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
 %patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
+#%patch3 -p1
+#%patch6 -p1
 
 %build
-%{__cc} %{rpmcflags} -o dos2unix dos2unix.c
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-install dos2unix $RPM_BUILD_ROOT%{_bindir}
-install dos2unix.1 $RPM_BUILD_ROOT%{_mandir}/man1
+%find_lang %{name} --all-name
 
-ln -sf dos2unix $RPM_BUILD_ROOT%{_bindir}/mac2unix
-
-echo ".so dos2unix.1" > $RPM_BUILD_ROOT%{_mandir}/man1/mac2unix.1
+find $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc COPYRIGHT
-%attr(755,root,root) %{_bindir}/*
+%doc COPYING.txt ChangeLog.txt NEWS.txt README.txt TODO.txt
+%attr(755,root,root) %{_bindir}/dos2unix
+%attr(755,root,root) %{_bindir}/mac2unix
+%attr(755,root,root) %{_bindir}/unix2dos
+%attr(755,root,root) %{_bindir}/unix2mac
 %{_mandir}/man1/*
This page took 0.120137 seconds and 4 git commands to generate.