summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-30 19:38:29 +0100
committerSam James <sam@gentoo.org>2021-06-30 19:38:29 +0100
commitf25ce46fc84583b528b110b606f4643f0a2c5266 (patch)
tree2494a2139e0b6193011a44132bcc08a7cbc6788a /sys-auth/pam_smb
parentsys-auth/pam_smb: fix metadata indentation (diff)
downloadgentoo-f25ce46fc84583b528b110b606f4643f0a2c5266.tar.gz
gentoo-f25ce46fc84583b528b110b606f4643f0a2c5266.tar.bz2
gentoo-f25ce46fc84583b528b110b606f4643f0a2c5266.zip
sys-auth/pam_smb: add missing libcrypt dependency, fix *FLAGS
* Fix missing libcrypt dependency * Respect *FLAGS * Respect CC, AR Closes: https://bugs.gentoo.org/341087 Closes: https://bugs.gentoo.org/725736 Closes: https://bugs.gentoo.org/728146 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-auth/pam_smb')
-rw-r--r--sys-auth/pam_smb/files/10-pam_smb-bash-3.1.patch5
-rw-r--r--sys-auth/pam_smb/files/add-various-missing-includes.patch68
-rw-r--r--sys-auth/pam_smb/files/respect-FLAGS-CC-AR.patch132
-rw-r--r--sys-auth/pam_smb/pam_smb-2.0.0_rc6-r3.ebuild (renamed from sys-auth/pam_smb/pam_smb-2.0.0_rc6-r2.ebuild)27
4 files changed, 214 insertions, 18 deletions
diff --git a/sys-auth/pam_smb/files/10-pam_smb-bash-3.1.patch b/sys-auth/pam_smb/files/10-pam_smb-bash-3.1.patch
index df8050442d6b..ddad580381b4 100644
--- a/sys-auth/pam_smb/files/10-pam_smb-bash-3.1.patch
+++ b/sys-auth/pam_smb/files/10-pam_smb-bash-3.1.patch
@@ -1,6 +1,5 @@
-diff -Nurp pam_smb-2.0.0_rc6.orig/configure pam_smb-2.0.0_rc6/configure
---- a/configure 2006-03-17 15:02:01.000000000 +0000
-+++ b/configure 2006-03-17 15:02:01.000000000 +0000
+--- a/configure
++++ b/configure
@@ -1486,7 +1486,7 @@ else
# results, and the version is kept in special file).
diff --git a/sys-auth/pam_smb/files/add-various-missing-includes.patch b/sys-auth/pam_smb/files/add-various-missing-includes.patch
new file mode 100644
index 000000000000..0aa1ea48d32c
--- /dev/null
+++ b/sys-auth/pam_smb/files/add-various-missing-includes.patch
@@ -0,0 +1,68 @@
+From: Sam James <sam@gentoo.org>
+Date: Wed, 30 Jun 2021 08:09:19 +0100
+Subject: [PATCH] Add various missing includes
+--- a/pamsmbd/md5.c
++++ b/pamsmbd/md5.c
+@@ -39,6 +39,7 @@
+ */
+
+ #include "md5.h"
++#include <string.h>
+
+ #ifdef TEST
+ /*
+@@ -46,7 +47,6 @@
+ * The test program should print out the same values as given in section
+ * A.5 of RFC 1321, reproduced below.
+ */
+-#include <string.h>
+ main()
+ {
+ static const char *const test[7] = {
+--- a/pamsmbd/md5driver.c
++++ b/pamsmbd/md5driver.c
+@@ -38,6 +38,7 @@ Bug reports and feature requests should be sent to bugs@zetetic.net.
+ */
+
+ #include <strings.h>
++#include <string.h>
+ #include "constants.h"
+ #include "md5.h"
+ #include "md5driver.h"
+--- a/smbval/session.c
++++ b/smbval/session.c
+@@ -22,11 +22,8 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+-#if defined(__FreeBSD__) || defined(__APPLE__)
+ #include <stdlib.h>
+-#else
+ #include <malloc.h>
+-#endif
+ #include <string.h>
+
+ int RFCNB_errno = 0;
+--- a/smbval/smblib-util.c
++++ b/smbval/smblib-util.c
+@@ -23,6 +23,7 @@
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#include <string.h>
+ #include "smblib-priv.h"
+ #if defined(__FreeBSD__) || defined(__APPLE__)
+ #include <stdlib.h>
+--- a/smbval/smblib.c
++++ b/smbval/smblib.c
+@@ -25,6 +25,7 @@
+ */
+
+ #include "config.h"
++#include <ctype.h>
+ #include <string.h>
+ #if defined(__FreeBSD__) || defined(__APPLE__)
+ #include <stdlib.h>
+--
+2.32.0
+
diff --git a/sys-auth/pam_smb/files/respect-FLAGS-CC-AR.patch b/sys-auth/pam_smb/files/respect-FLAGS-CC-AR.patch
new file mode 100644
index 000000000000..1ba762f866a4
--- /dev/null
+++ b/sys-auth/pam_smb/files/respect-FLAGS-CC-AR.patch
@@ -0,0 +1,132 @@
+https://bugs.gentoo.org/341087
+https://bugs.gentoo.org/728146
+https://bugs.gentoo.org/725736
+
+From: Sam James <sam@gentoo.org>
+Date: Wed, 30 Jun 2021 07:54:21 +0100
+Subject: [PATCH] Respect *FLAGS, CC, AR
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -12,7 +12,7 @@ EXTRALIBS = @MLIBS@
+ LDFLAGS = @LDFLAGS@
+ CC = @CC@
+
+-SHELL=/bin/sh
++SHELL?=/bin/sh
+
+ INSTALL= @INSTALL@
+
+@@ -49,7 +49,7 @@ LIBOBJS = $(addprefix static/,$(LIBOBJ))
+ export CFLAGS CC SHLIB_LD SHLIB_CFLAGS SHLIB_SUFFIX DOBJS MOBJS MSRCS INSTALL INSTALLDIR MLIBS DLIBS EXTRALIBS
+
+ %.o : %.c
+- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(LDFLAGS) -c $< -o $@
+
+
+ ########################### don't edit below #######################
+@@ -80,4 +80,4 @@ distclean: clean
+ rm -f *.a *.out *.o *.so *.bak config.log config.cache config.status config.h Makefile include/config.h
+
+ .c.o:
+- $(CC) -c $(CFLAGS) $<
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $<
+--- a/pamsmbd/Makefile
++++ b/pamsmbd/Makefile
+@@ -8,7 +8,7 @@ CFLAGS += ${INCLUDE}
+ TARGET = pamsmbd
+
+ ${TARGET}: ${OBJS} ../smbval/smbvalid.a ../tdb/tdb.o ../tdb/spinlock.o
+- $(CC) -g -o ${TARGET} ${INCLUDE} ${OBJS} ../tdb/tdb.o ../tdb/spinlock.o ../smbval/smbvalid.a $(DLIBS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ${TARGET} ${INCLUDE} ${OBJS} ../tdb/tdb.o ../tdb/spinlock.o ../smbval/smbvalid.a $(DLIBS)
+
+ clean:
+ rm -f ${TARGET} ${OBJS}
+--- a/pamsmbd/Makefile.crypt
++++ b/pamsmbd/Makefile.crypt
+@@ -8,7 +8,7 @@ CFLAGS += ${INCLUDE} -Wall
+ TARGET = pamsmbd
+
+ ${TARGET}: ${OBJS} ../smbval/smbvalid.a ../tdb/tdb.o
+- $(CC) -DCRYPT -g -o ${TARGET} ${INCLUDE} ${OBJS} ../tdb/tdb.o ../smbval/smbvalid.a $(DLIBS) -lcrypt
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DCRYPT -o ${TARGET} ${INCLUDE} ${OBJS} ../tdb/tdb.o ../smbval/smbvalid.a $(DLIBS) -lcrypt
+
+ clean:
+ rm -f ${TARGET} ${OBJS}
+--- a/pamsmbd/Makefile.md5
++++ b/pamsmbd/Makefile.md5
+@@ -8,7 +8,7 @@ CFLAGS += ${INCLUDE} -Wall
+ TARGET = pamsmbd
+
+ ${TARGET}: ${OBJS} ../smbval/smbvalid.a ../tdb/tdb.o
+- $(CC) -g -o ${TARGET} ${INCLUDE} ${OBJS} ../tdb/tdb.o ../smbval/smbvalid.a $(DLIBS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o ${TARGET} ${INCLUDE} ${OBJS} ../tdb/tdb.o ../smbval/smbvalid.a $(DLIBS)
+
+ clean:
+ rm -f ${TARGET} ${OBJS}
+--- a/pamsmbm/Makefile
++++ b/pamsmbm/Makefile
+@@ -4,7 +4,7 @@
+ #
+ #
+
+-CFLAGS = -DHAVE_CONFIG_H -I../include -I..
++CFLAGS += -DHAVE_CONFIG_H -I../include -I..
+
+ LIBAUTHSH = pam_smb_auth$(SHLIB_SUFFIX)
+
+@@ -16,7 +16,7 @@ LIBSRC = $(LIBAUTHSRC)
+ LIBSHARED = $(LIBAUTHSH)
+
+ %.o : %.c
+- $(CC) $(CFLAGS) $(SHLIB_CFLAGS) $(DYNAMIC) $(CPPFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(SHLIB_CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(LDFLAGS) -c $< -o $@
+
+
+ ########################### don't edit below #######################
+@@ -26,7 +26,7 @@ dummy: all
+ all: $(LIBSHARED) Makefile
+
+ smb_auth: smb_auth.o
+- gcc -o smb_auth smb_auth.o queue_valid.o ../smbval/smbvalid.a
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o smb_auth smb_auth.o queue_valid.o ../smbval/smbvalid.a
+
+ $(LIBOBJD): $(LIBSRC)
+
+@@ -43,4 +43,4 @@ extraclean: clean
+ rm -f *.a *.out *.o *.so
+
+ .c.o:
+- $(CC) -c $(CFLAGS) $<
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $<
+--- a/smbval/Makefile
++++ b/smbval/Makefile
+@@ -3,7 +3,7 @@
+ # Copyright (c) Dave Airlie 2000 (airlied@samba.org)
+ #
+
+-AR = ar
++AR ?= ar
+
+ INCLUDES = smblib.h smblib-priv.h
+
+@@ -27,7 +27,7 @@ all: smbvalid.a
+
+ .c.o: $(INCLUDES)
+ @echo Compiling $*.c
+- $(CC) -I../include $(CFLAGS) -c $*.c
++ $(CC) -I../include $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $*.c
+
+ clean:
+ rm -f *.o smbvalid.a
+--- a/pamsmbm/Makefile
++++ b/pamsmbm/Makefile
+@@ -31,7 +31,7 @@ smb_auth: smb_auth.o
+ $(LIBOBJD): $(LIBSRC)
+
+ $(LIBAUTHSH): $(LIBAUTHSRC) $(LIBOBJ)
+- $(SHLIB_LD) $(LD_FLAGS) -o $@ $(LIBAUTHOBJ) $(EXTRALIBS)
++ $(SHLIB_LD) $(LDFLAGS) $(LD_FLAGS) -o $@ $(LIBAUTHOBJ) $(EXTRALIBS)
+
+ clean:
+ rm -f $(LIBAUTHSH) $(LIBAUTHOBJ) a.out core *~
diff --git a/sys-auth/pam_smb/pam_smb-2.0.0_rc6-r2.ebuild b/sys-auth/pam_smb/pam_smb-2.0.0_rc6-r3.ebuild
index dc4dd6bbca1c..e62a1829a687 100644
--- a/sys-auth/pam_smb/pam_smb-2.0.0_rc6-r2.ebuild
+++ b/sys-auth/pam_smb/pam_smb-2.0.0_rc6-r3.ebuild
@@ -12,27 +12,26 @@ HOMEPAGE="http://www.csn.ul.ie/~airlied/pam_smb/"
SRC_URI="
mirror://samba/pam_smb/v2/${MY_P}.tar.gz
http://www.csn.ul.ie/~airlied/pam_smb/v2/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
-DEPEND=">=sys-libs/pam-0.75"
+DEPEND="virtual/libcrypt:=
+ >=sys-libs/pam-0.75"
RDEPEND="${DEPEND}"
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- default
- eapply "${FILESDIR}/10-pam_smb-bash-3.1.patch"
-}
+PATCHES=(
+ "${FILESDIR}"/10-pam_smb-bash-3.1.patch
+ "${FILESDIR}"/respect-FLAGS-CC-AR.patch
+ "${FILESDIR}"/add-various-missing-includes.patch
+)
src_configure() {
- econf --disable-root-only
-}
+ tc-export CC
-src_compile() {
- emake CC="$(tc-getCC)"
+ LDFLAGS="${LDFLAGS}" econf --disable-root-only
}
src_install() {
@@ -47,8 +46,6 @@ src_install() {
}
pkg_postinst() {
- echo
- elog "You must create /etc/pam_smb.conf yourself, containing"
- elog "your domainname, PDC and BDC. See example files in docdir."
- echo
+ elog "You must create ${EROOT}/etc/pam_smb.conf yourself, containing"
+ elog "your domain name, PDC and BDC. See example files in docdir."
}