pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/pam-af pam-af: Respect LDFLAGS. Fixes RELRO b...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b3c57ea54431
branches: trunk
changeset: 376110:b3c57ea54431
user: nia <nia%pkgsrc.org@localhost>
date: Sat Apr 02 11:12:01 2022 +0000
description:
pam-af: Respect LDFLAGS. Fixes RELRO build.
diffstat:
security/pam-af/distinfo | 4 +-
security/pam-af/patches/patch-Makefile | 83 ++++++++++++++++++++++++++++++++++
security/pam-af/patches/patch-aa | 51 --------------------
3 files changed, 85 insertions(+), 53 deletions(-)
diffs (157 lines):
diff -r 1ca055235644 -r b3c57ea54431 security/pam-af/distinfo
--- a/security/pam-af/distinfo Sat Apr 02 11:08:47 2022 +0000
+++ b/security/pam-af/distinfo Sat Apr 02 11:12:01 2022 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.16 2022/01/01 12:59:15 rhialto Exp $
+$NetBSD: distinfo,v 1.17 2022/04/02 11:12:01 nia Exp $
BLAKE2s (pam_af-1.0.2.tar.bz2) = 2b0dbc65b2bc0122ec68751502769064294839c0215e79b1317141a87f826e1b
SHA512 (pam_af-1.0.2.tar.bz2) = 89dc8a78e5d888e6cbf84820420201ef19d012d7fbc39f40ede7e7b4cef12a5896bec7a2a6bfc17cf8d111800e54eb2559e55cd3218b04e84cd0a2a24d7dcc01
Size (pam_af-1.0.2.tar.bz2) = 17991 bytes
-SHA1 (patch-aa) = 8c707e869aa56f8b0ac8bb624c5fae09bd6b2ef7
+SHA1 (patch-Makefile) = 52068696340f09a640e8872b639a632661e2c224
SHA1 (patch-ab) = aec6c301a5e699cd0e39c552748c48bbf77af52d
SHA1 (patch-ad) = 0f46fecfec3b920a08e2c22c14ada368214d6a69
SHA1 (patch-common_pam__af.h) = 026b303116b80cb48987c24b5f48677e7581a346
diff -r 1ca055235644 -r b3c57ea54431 security/pam-af/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pam-af/patches/patch-Makefile Sat Apr 02 11:12:01 2022 +0000
@@ -0,0 +1,83 @@
+$NetBSD: patch-Makefile,v 1.1 2022/04/02 11:12:02 nia Exp $
+
+* use gcc flags on SunOS
+* for PKGSRC layout
+* treat *BSDs same as FreeBSD.
+* Use "ld -shared" rather than "ld --shared". The former allows cwrappers to
+ detect shared lib link mode. This makes it omit "-pie" which would remove
+ required symbols.
+* Do not override LDFLAGS.
+
+--- Makefile.orig 2011-08-24 07:53:32.000000000 +0000
++++ Makefile
+@@ -69,7 +69,7 @@ CFLAGS = -I./common/ -DPIC
+ CFLAGS_GCC = -O2 -Wall -Werror -Wno-format-y2k \
+ -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch \
+ -Wshadow -Wchar-subscripts -Winline -Wnested-externs -fPIC
+-CFLAGS_SUN = -KPIC -xO2 -D_SUN_PAM_ -D_HAVE_USERDEFS_H_
++CFLAGS_SUN = -fPIC -O2 -D_SUN_PAM_ -D_HAVE_USERDEFS_H_
+ CFLAGS_HP = -Ae +w1 +W 474,486,542 +z +O2
+ CFLAGS_BSD = -D_HAVE_PATHS_H_ -D_HAVE_ERR_H_ -D_HAVE_GETPROGNAME_ -D_USE_MODULE_ENTRY_ -D_HAVE_SALEN_
+ CFLAGS_GNU = -D_GNU_SOURCE -D_HAVE_PATHS_H_ -D_HAVE_ERR_H_ -D_HAVE_FLOCK_ \
+@@ -79,7 +79,7 @@ LDFLAGS_BSD =
+ LDFLAGS_LINUX = -lgdbm -lgdbm_compat
+ LDFLAGS_SUN = -lnsl -lsocket
+ LDFLAGS_HP =
+-SHLDFLAGS_GCC = -s --shared -lpam -lcrypt
++SHLDFLAGS_GCC = -s -shared -lpam -lcrypt
+ SHLDFLAGS_SUN = -s -G -lpam -lcrypt
+ SHLDFLAGS_HP = -s -b -lpam -lsec
+
+@@ -102,39 +102,39 @@ DISTTOOLMAN = pam_af_tool.8
+ LIBMAN = $(LIBDIR)/$(DISTLIBMAN)
+ TOOLMAN = $(TOOLDIR)/$(DISTTOOLMAN)
+
+-SECUREDIR = /lib/security
+-SBINDIR = /sbin
+-MANDIR = /share/man
+-DESTDIR = /usr/local
++SECUREDIR = ${PREFIX}/lib/security
++SBINDIR = ${PREFIX}/sbin
++MANDIR = ${PREFIX}/$(PKGMANDIR)
++#DESTDIR = /usr/local
+
+ LIB_OBJS = $(LIBDIR)/pam_af.o $(LIBDIR)/subr.o
+ TOOL_OBJS = $(TOOLDIR)/pam_af_tool.o $(TOOLDIR)/subr.o
+
+ all:
+- if [ "`$(UNAME)`" = "FreeBSD" ]; then \
++ if [ "`$(UNAME)`" = "FreeBSD" -o "`$(UNAME)`" = "NetBSD" -o "`$(UNAME)`" = "OpenBSD" -o "`$(UNAME)`" = "DragonFly" ]; then \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_GCC) $(CFLAGS_BSD)" \
+- LD=ld LDFLAGS="$(LDFLAGS_BSD) $(SHLDFLAGS_GCC)" \
++ LD=ld LDFLAGS="$(LDFLAGS) $(LDFLAGS_BSD) $(SHLDFLAGS_GCC)" \
+ $(LIBBIN); \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_GCC) $(CFLAGS_BSD)" \
+- LDFLAGS="$(LDFLAGS_BSD)" $(TOOLBIN); \
++ LDFLAGS="$(LDFLAGS) $(LDFLAGS_BSD)" $(TOOLBIN); \
+ elif [ "`$(UNAME)`" = "Linux" ]; then \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_GCC) $(CFLAGS_GNU)" \
+- LD=ld LDFLAGS="$(LDFLAGS_LINUX) $(SHLDFLAGS_GCC)" \
++ LD=ld LDFLAGS="$(LDFLAGS) $(LDFLAGS_LINUX) $(SHLDFLAGS_GCC)" \
+ $(LIBBIN); \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_GCC) $(CFLAGS_GNU)" \
+- LDFLAGS="$(LDFLAGS_LINUX)" $(TOOLBIN); \
++ LDFLAGS="$(LDFLAGS) $(LDFLAGS_LINUX)" $(TOOLBIN); \
+ elif [ "`$(UNAME)`" = "SunOS" ]; then \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_SUN)" \
+- LD=ld LDFLAGS="$(LDFLAGS_SUN) $(SHLDFLAGS_SUN)" \
++ LD=ld LDFLAGS="$(LDFLAGS) $(LDFLAGS_SUN) $(SHLDFLAGS_SUN)" \
+ $(LIBBIN); \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_SUN)" \
+- LDFLAGS="$(LDFLAGS_SUN)" $(TOOLBIN); \
++ LDFLAGS="$(LDFLAGS) $(LDFLAGS_SUN)" $(TOOLBIN); \
+ elif [ "`$(UNAME)`" = "HP-UX" ]; then \
+ $(MAKE) CFLAGS="$(CFLAGS_HP)" \
+- LD=ld LDFLAGS="$(LDFLAGS_HP) $(SHLDFLAGS_HP)" \
++ LD=ld LDFLAGS="$(LDFLAGS) $(LDFLAGS_HP) $(SHLDFLAGS_HP)" \
+ $(LIBBIN); \
+ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_HP)" \
+- LDFLAGS="$(LDFLAGS_HP)" $(TOOLBIN); \
++ LDFLAGS="$(LDFLAGS) $(LDFLAGS_HP)" $(TOOLBIN); \
+ else \
+ $(MAKE) $(LIBBIN); \
+ $(MAKE) $(TOOLBIN); \
diff -r 1ca055235644 -r b3c57ea54431 security/pam-af/patches/patch-aa
--- a/security/pam-af/patches/patch-aa Sat Apr 02 11:08:47 2022 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2022/01/01 12:59:15 rhialto Exp $
-
-* use gcc flags on SunOS
-* for PKGSRC layout
-* treat *BSDs same as FreeBSD.
-* Use "ld -shared" rather than "ld --shared". The former allows cwrappers to
- detect shared lib link mode. This makes it omit "-pie" which would remove
- required symbols.
-
---- Makefile.orig 2011-08-24 07:53:32.000000000 +0000
-+++ Makefile
-@@ -69,7 +69,7 @@ CFLAGS = -I./common/ -DPIC
- CFLAGS_GCC = -O2 -Wall -Werror -Wno-format-y2k \
- -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch \
- -Wshadow -Wchar-subscripts -Winline -Wnested-externs -fPIC
--CFLAGS_SUN = -KPIC -xO2 -D_SUN_PAM_ -D_HAVE_USERDEFS_H_
-+CFLAGS_SUN = -fPIC -O2 -D_SUN_PAM_ -D_HAVE_USERDEFS_H_
- CFLAGS_HP = -Ae +w1 +W 474,486,542 +z +O2
- CFLAGS_BSD = -D_HAVE_PATHS_H_ -D_HAVE_ERR_H_ -D_HAVE_GETPROGNAME_ -D_USE_MODULE_ENTRY_ -D_HAVE_SALEN_
- CFLAGS_GNU = -D_GNU_SOURCE -D_HAVE_PATHS_H_ -D_HAVE_ERR_H_ -D_HAVE_FLOCK_ \
-@@ -79,7 +79,7 @@ LDFLAGS_BSD =
- LDFLAGS_LINUX = -lgdbm -lgdbm_compat
- LDFLAGS_SUN = -lnsl -lsocket
- LDFLAGS_HP =
--SHLDFLAGS_GCC = -s --shared -lpam -lcrypt
-+SHLDFLAGS_GCC = -s -shared -lpam -lcrypt
- SHLDFLAGS_SUN = -s -G -lpam -lcrypt
- SHLDFLAGS_HP = -s -b -lpam -lsec
-
-@@ -102,16 +102,16 @@ DISTTOOLMAN = pam_af_tool.8
- LIBMAN = $(LIBDIR)/$(DISTLIBMAN)
- TOOLMAN = $(TOOLDIR)/$(DISTTOOLMAN)
-
--SECUREDIR = /lib/security
--SBINDIR = /sbin
--MANDIR = /share/man
--DESTDIR = /usr/local
-+SECUREDIR = ${PREFIX}/lib/security
-+SBINDIR = ${PREFIX}/sbin
-+MANDIR = ${PREFIX}/$(PKGMANDIR)
-+#DESTDIR = /usr/local
-
- LIB_OBJS = $(LIBDIR)/pam_af.o $(LIBDIR)/subr.o
- TOOL_OBJS = $(TOOLDIR)/pam_af_tool.o $(TOOLDIR)/subr.o
-
- all:
-- if [ "`$(UNAME)`" = "FreeBSD" ]; then \
-+ if [ "`$(UNAME)`" = "FreeBSD" -o "`$(UNAME)`" = "NetBSD" -o "`$(UNAME)`" = "OpenBSD" -o "`$(UNAME)`" = "DragonFly" ]; then \
- $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_GCC) $(CFLAGS_BSD)" \
- LD=ld LDFLAGS="$(LDFLAGS_BSD) $(SHLDFLAGS_GCC)" \
- $(LIBBIN); \
Home |
Main Index |
Thread Index |
Old Index