- 4.1.2.
This commit is contained in:
parent
881add5b1f
commit
2233c636d5
@ -1,2 +1,3 @@
|
||||
dos2unix-3.1.tar.bz2
|
||||
dos2unix-4.1.1.tar.gz
|
||||
dos2unix-4.1.2.tar.gz
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff -up dos2unix-4.1.1/Makefile.CFLAGS dos2unix-4.1.1/Makefile
|
||||
--- dos2unix-4.1.1/Makefile.CFLAGS 2010-01-22 10:00:01.207058452 +0000
|
||||
+++ dos2unix-4.1.1/Makefile 2010-01-22 10:01:15.224057831 +0000
|
||||
@@ -116,15 +116,14 @@ endif
|
||||
|
||||
# ............................................................ flags ...
|
||||
|
||||
-GCCFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE
|
||||
+CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE
|
||||
|
||||
ifdef STATIC
|
||||
GCCFLAGS += -static
|
||||
endif
|
||||
|
||||
-CFLAGS = -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
|
||||
+EXTRA_CFLAGS = -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
|
||||
-DVER_DATE=\"$(DOS2UNIX_DATE)\" \
|
||||
- $(GCCFLAGS) \
|
||||
$(CFLAGS_OS) \
|
||||
$(NLSDEFS)
|
||||
|
||||
@@ -138,7 +137,7 @@ DEFS = $(EXTRA_DEFS)
|
||||
all: $(BIN) $(MAC2UNIX_BIN) $(MAC2UNIX).1 $(DOCFILES) $(MOFILES)
|
||||
|
||||
%.o : %.c
|
||||
- $(CC) $(CFLAGS) $(DEFS) -c $< -o $@
|
||||
+ $(CC) $(EXTRA_CFLAGS) $(CFLAGS) $(DEFS) -c $< -o $@
|
||||
|
||||
$(BIN): dos2unix.o
|
||||
$(CC) $< $(LDFLAGS) -o $@
|
@ -1,33 +0,0 @@
|
||||
diff -up dos2unix-4.1.1/dos2unix.c.preserve-file-modes dos2unix-4.1.1/dos2unix.c
|
||||
--- dos2unix-4.1.1/dos2unix.c.preserve-file-modes 2010-01-10 21:02:18.000000000 +0000
|
||||
+++ dos2unix-4.1.1/dos2unix.c 2010-01-22 09:55:48.870058072 +0000
|
||||
@@ -472,6 +472,7 @@ int ConvertDosToUnixNewFile(char *ipInFN
|
||||
char *TempPath;
|
||||
struct stat StatBuf;
|
||||
struct utimbuf UTimeBuf;
|
||||
+ mode_t mask;
|
||||
#ifdef NO_MKSTEMP
|
||||
FILE* fd;
|
||||
#else
|
||||
@@ -487,7 +488,7 @@ int ConvertDosToUnixNewFile(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
|
||||
@@ -519,6 +520,12 @@ int ConvertDosToUnixNewFile(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) && (ConvertDosToUnix(InF, TempF, ipFlag)))
|
||||
RetVal = -1;
|
@ -1,6 +1,6 @@
|
||||
Summary: Text file format converter
|
||||
Name: dos2unix
|
||||
Version: 4.1.1
|
||||
Version: 4.1.2
|
||||
Release: 1%{?dist}
|
||||
Group: Applications/Text
|
||||
License: BSD
|
||||
@ -10,9 +10,6 @@ Source: http://www.xs4all.nl/~waterlan/dos2unix/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: gettext
|
||||
|
||||
Patch1: dos2unix-preserve-file-modes.patch
|
||||
Patch2: dos2unix-CFLAGS.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
@ -20,8 +17,6 @@ Dos2unix converts DOS or MAC text files to UNIX format.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .preserve-file-modes
|
||||
%patch2 -p1 -b .CFLAGS
|
||||
|
||||
%build
|
||||
make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE $(getconf LFS_CFLAGS)" \
|
||||
@ -42,6 +37,9 @@ make DESTDIR=%{buildroot} install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Tue Jan 26 2010 Tim Waugh <twaugh@redhat.com> 4.1.2-1
|
||||
- 4.1.2.
|
||||
|
||||
* Fri Jan 22 2010 Tim Waugh <twaugh@redhat.com> 4.1.1-1
|
||||
- 4.1.1. New upstream.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user