diff --git a/libutempter-pierelro.patch b/libutempter-pierelro.patch deleted file mode 100644 index 9bd726d..0000000 --- a/libutempter-pierelro.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up libutempter-1.1.6/Makefile.pierelro libutempter-1.1.6/Makefile ---- libutempter-1.1.6/Makefile.pierelro 2010-11-04 18:14:53.000000000 +0100 -+++ libutempter-1.1.6/Makefile 2013-01-24 15:58:06.241865564 +0100 -@@ -52,11 +52,12 @@ all: $(TARGETS) - $(COMPILE.c) -fPIC $< $(OUTPUT_OPTION) - - $(PROJECT): utempter.c -- $(LINK.c) -Wl,-z,now,-stats $(LDLIBS) $< $(OUTPUT_OPTION) -+ $(LINK.c) -pie -fPIE -Wl,-z,relro,-z,now,-stats $(LDLIBS) \ -+ $< $(OUTPUT_OPTION) - - $(SHAREDLIB): iface.os $(MAP) - $(LINK.o) -shared \ -- -Wl,-soname,$(SONAME),--version-script=$(MAP),-z,defs,-stats \ -+ -Wl,-soname,$(SONAME),--version-script=$(MAP),-z,relro,-z,defs,-stats \ - -lc $< $(OUTPUT_OPTION) - - $(STATICLIB): iface.o diff --git a/libutempter.spec b/libutempter.spec index e83d96d..ef1afab 100644 --- a/libutempter.spec +++ b/libutempter.spec @@ -10,9 +10,6 @@ URL: ftp://ftp.altlinux.org/pub/people/ldv/utempter Source0: ftp://ftp.altlinux.org/pub/people/ldv/utempter/%{name}-%{version}.tar.bz2 -# Compile with PIE and RELRO flags. -Patch0: libutempter-pierelro.patch - Requires(pre): shadow-utils Provides: utempter = %{utempter_compat_ver} @@ -32,10 +29,10 @@ utempter-based software. %prep %setup -q -%patch0 -p1 -b .pierelro %build -make CFLAGS="$RPM_OPT_FLAGS" libdir="%{_libdir}" libexecdir="%{_libexecdir}" +make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" \ + libdir="%{_libdir}" libexecdir="%{_libexecdir}" %install make install DESTDIR="$RPM_BUILD_ROOT" libdir="%{_libdir}" libexecdir="%{_libexecdir}"