[Pkg-samba-maint] [Git][samba-team/samba][master] 2 commits: d/rules: guard building compile_et target with !mitkrb5

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Fri Nov 29 06:55:45 GMT 2024



Michael Tokarev pushed to branch master at Debian Samba Team / samba


Commits:
50496038 by Michael Tokarev at 2024-11-29T08:45:28+03:00
d/rules: guard building compile_et target with !mitkrb5

- - - - -
fcb8e3d6 by Michael Tokarev at 2024-11-29T09:50:51+03:00
source3-lib-util_sec.c-include-grp.h-for-setgroups.patch

to fix ftbfs on hurd now and possible ftbfs in future
(setgroups() is in <grp.h>, not <unistd.h>)

- - - - -


3 changed files:

- debian/patches/series
- + debian/patches/source3-lib-util_sec.c-include-grp.h-for-setgroups.patch
- debian/rules


Changes:

=====================================
debian/patches/series
=====================================
@@ -24,3 +24,4 @@ silence-can-not-convert-group-sid.diff
 edns0.patch
 passchange-error-message.patch
 lower-dns-lookup-mismatch-messages.patch
+source3-lib-util_sec.c-include-grp.h-for-setgroups.patch


=====================================
debian/patches/source3-lib-util_sec.c-include-grp.h-for-setgroups.patch
=====================================
@@ -0,0 +1,39 @@
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Fri, 29 Nov 2024 09:34:42 +0300
+Subject: source3/lib/util_sec.c: include <grp.h> for setgroups
+
+setgroups(), unlike getgroups(), is not in <unistd.h> but in <grp.h>.
+Recent compilers require function declaration before using a function
+(or more and more distributions treat lack of declaration as error),
+so all configure-time tests fails with source3/lib/util_sec.c:
+
+source3/../lib/util/setid.c: In function 'samba_setgroups':
+source3/../lib/util/setid.c:244:16: error: implicit declaration of function \
+  'setgroups'; did you mean 'getgroups'? [-Wimplicit-function-declaration]
+  244 |         return setgroups(setlen, gidset);
+
+Add the missing include so configuration finds the existing system
+functions instead of failing.
+
+Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>
+---
+ source3/lib/util_sec.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
+index ba6f109dcb7..2dab2855858 100644
+--- a/source3/lib/util_sec.c
++++ b/source3/lib/util_sec.c
+@@ -28,6 +28,9 @@
+ #if defined(HAVE_UNISTD_H)
+ #include <unistd.h>
+ #endif
++#if defined(HAVE_GRP_H)
++#include <grp.h> /* setgroups() */
++#endif
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+-- 
+2.39.5
+


=====================================
debian/rules
=====================================
@@ -183,6 +183,7 @@ bin/built.stamp: bin/configured.stamp
 # recompilation/relinking is done again, to adopt to the actual install
 # paths. There's no need (for now) to build samba to be run from the build
 # directory, so we use `waf install' here instead of `waf build'.
+ifeq (,${mitkrb5-dep-pkgs})
 # However, as of 4.16 and still 4.21, `waf install' without the build step fails,
 # since it tries to run two executables which are not built.
 # Build these two executables first, and build the install stage.
@@ -190,6 +191,7 @@ bin/built.stamp: bin/configured.stamp
 # we'll repeat during actual install stage, but this is definitely
 # better/faster than building whole thing for _not_ running from the build dir.
 	${WAF} $(if $V,-v) --targets=compile_et,asn1_compile
+endif # !mitkrb5
 	${WAF} $(if $V,-v) install --destdir="${DESTDIR}"
 	touch $@
 build-indep:



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/a0d33b69bc22e7a720bcab57fcc401772b5be263...fcb8e3d6245273c301c638e221a3e6f48b480e31

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/a0d33b69bc22e7a720bcab57fcc401772b5be263...fcb8e3d6245273c301c638e221a3e6f48b480e31
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20241129/28481500/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list