Hello community, here is the log from the commit of package dos2unix checked in at Thu Apr 13 15:08:32 CEST 2006. -------- --- dos2unix/dos2unix.changes 2006-01-25 21:35:33.000000000 +0100 +++ STABLE/dos2unix/dos2unix.changes 2006-04-11 12:15:18.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Apr 11 12:12:57 CEST 2006 - pth@suse.de + +- Make dos2unix preserve file modes (bugzilla #119350). + +------------------------------------------------------------------- New: ---- dos2unix-3.1-preserve-file-modes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dos2unix.spec ++++++ --- /var/tmp/diff_new_pack.YY4nGf/_old 2006-04-13 15:07:31.000000000 +0200 +++ /var/tmp/diff_new_pack.YY4nGf/_new 2006-04-13 15:07:31.000000000 +0200 @@ -1,11 +1,11 @@ # # spec file for package dos2unix (Version 3.1) # -# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild @@ -13,16 +13,17 @@ Name: dos2unix Summary: A DOS to UNIX Text Converter Version: 3.1 -Release: 305 +Release: 313 Group: Productivity/Text/Convertors License: Other License(s), see package, distributable Source: %{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}.patch Patch1: dos2unix-3.1-segfault.patch +Patch2: dos2unix-3.1-preserve-file-modes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Dos2unix is used to convert plain text from DOS (CR/LF) format to UNIX +dos2unix is used to convert plain text from DOS (CR/LF) format to UNIX format (LF). @@ -35,6 +36,7 @@ %setup -q %patch0 -p1 -b .orig %patch1 -p1 -b .segf +%patch2 -b .fmode perl -pi -e 's,(#endif|#else)[^ ]*(.*),$1 /* $2 */,g' *.[ch] %build @@ -61,6 +63,8 @@ rm -rf $RPM_BUILD_ROOT %changelog -n dos2unix +* Tue Apr 11 2006 - pth@suse.de +- Make dos2unix preserve file modes (bugzilla #119350). * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Wed Oct 05 2005 - dmueller@suse.de ++++++ dos2unix-3.1-preserve-file-modes.patch ++++++ --- dos2unix.c. 2003-05-21 08:09:08.000000000 -0700 +++ dos2unix.c 2003-05-21 08:09:56.000000000 -0700 @@ -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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de