Accepting request 70909 from home:elvigia:branches:Base:System

- Open all fds with O_CLOEXEC.

OBS-URL: https://build.opensuse.org/request/show/70909
OBS-URL: https://build.opensuse.org/package/show/Base:System/dos2unix?expand=0&rev=31
This commit is contained in:
Cristian Rodríguez 2011-05-21 19:09:38 +00:00 committed by Git OBS Bridge
parent 8e6cad9343
commit f267b8dcfc
3 changed files with 44 additions and 0 deletions

37
dos2unix-cloexec.patch Normal file
View File

@ -0,0 +1,37 @@
--- dos2unix.c.orig
+++ dos2unix.c
@@ -158,8 +158,8 @@
#define R_CNTRL "rb"
#define W_CNTRL "wb"
#else
- #define R_CNTRL "r"
- #define W_CNTRL "w"
+ #define R_CNTRL "re"
+ #define W_CNTRL "we"
#endif
#define BINARY_FILE 0x1
--- unix2dos.c.orig
+++ unix2dos.c
@@ -148,8 +148,8 @@
#define R_CNTRL "rb"
#define W_CNTRL "wb"
#else
- #define R_CNTRL "r"
- #define W_CNTRL "w"
+ #define R_CNTRL "re"
+ #define W_CNTRL "we"
#endif
#define BINARY_FILE 0x1
--- Makefile.orig
+++ Makefile
@@ -198,7 +198,7 @@ endif
CFLAGS = -O2 -Wall $(RPM_OPT_FLAGS)
-EXTRA_CFLAGS = -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
+EXTRA_CFLAGS = -D_GNU_SOURCE -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
-DVER_DATE=\"$(DOS2UNIX_DATE)\" \
-DDEBUG=$(DEBUG) \
$(CFLAGS_OS)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat May 21 18:17:55 UTC 2011 - crrodriguez@opensuse.org
- Open all fds with O_CLOEXEC.
-------------------------------------------------------------------
Sat May 21 16:59:14 UTC 2011 - vlado.paskov@gmail.com

View File

@ -26,6 +26,7 @@ License: BSD3c
Url: http://www.xs4all.nl/~waterlan/#DOS2UNIX
Source: %{name}-%{version}.tar.gz
Patch0: dos2unix-correct_ending.patch
Patch1: dos2unix-cloexec.patch
Provides: unix2dos = %{version}
Obsoletes: unix2dos < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -40,6 +41,7 @@ format to DOS format and unix2dos converts from UNIX to MAC format.
%prep
%setup -q
%patch0 -p1
%patch1
find . -type f | xargs chmod -x
%build