sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (a5077b05832b281b81178fca84d5e7d6f73aadaa)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (a5077b05832b281b81178fca84d5e7d6f73aadaa)
- Date: Sat, 3 Oct 2026 01:50:21 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
net/samba4/HISTORY
| 8 +
net/samba4/PRE_BUILD
| 5 -
net/samba4/patches/0001-lib-replace-Check-libcrypt-API-too.patch
| 41 ++++++++++
net/samba4/patches/0002-source3-Only-build-regedit-when-the-ncurses-form-library-is-usable.patch
| 41 ++++++++++
net/samba4/patches/non-glibc-fixes.patch
| 24 -----
5 files changed, 94 insertions(+), 25 deletions(-)
New commits:
commit a5077b05832b281b81178fca84d5e7d6f73aadaa
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
samba4: Fix build
diff --git a/net/samba4/HISTORY b/net/samba4/HISTORY
index 45e6474..8f2aa4e 100644
--- a/net/samba4/HISTORY
+++ b/net/samba4/HISTORY
@@ -1,3 +1,11 @@
+2026-10-03 Ismael Luceno <ismael AT sourcemage.org>
+ * patches/0001-nsswitch-wins-Define-NETDB_-for-other-libc-s.patch,
+
patches/0002-lib-util-access-source3-auth-user_util-Check-for-INN.patch:
+ removed, both changes are part of samba 4.22.6 upstream
+ * patches/0001-lib-replace-Check-libcrypt-API-too.patch,
+
patches/0002-source3-Only-build-regedit-when-the-ncurses-form-library-is-usable.patch,
+ PRE_BUILD: added, build fixes
+
2025-12-17 Thomas Orgis <sobukus AT sourcemage.org>
* DETAILS: version 4.22.6, ++SECURITY_PATCH
diff --git a/net/samba4/PRE_BUILD b/net/samba4/PRE_BUILD
index eeb8f01..6a5673c 100755
--- a/net/samba4/PRE_BUILD
+++ b/net/samba4/PRE_BUILD
@@ -1,8 +1,11 @@
default_pre_build &&
-
cd "$SOURCE_DIRECTORY" &&
apply_patch_dir patches &&
+# musl has no setuidx/setgidx; do not make the configure probe fatal
+sedit '/#define USE_SETUIDX 1/,/Checking whether setuidx is
available/s/mandatory=True/mandatory=False/' \
+ source3/wscript &&
+
if [ "scm" = "$SAMBA4_BRANCH" ]; then
cd source4 &&
NOCONFIGURE="on" ./autogen.sh
diff --git a/net/samba4/patches/0001-lib-replace-Check-libcrypt-API-too.patch
b/net/samba4/patches/0001-lib-replace-Check-libcrypt-API-too.patch
new file mode 100644
index 0000000..d779247
--- /dev/null
+++ b/net/samba4/patches/0001-lib-replace-Check-libcrypt-API-too.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT sourcemage.org>
+Date: Sat, 3 Oct 2026 03:23:38 +0200
+Subject: [PATCH] lib/replace: Check libcrypt API too
+
+Do not use crypt_r()/crypt_rn() when <crypt.h> does not declare it.
+
+lib/replace/wscript probes for crypt_r and crypt_rn with CHECK_FUNCS_IN(),
+which only resolves the symbol in the library, but that is not enough.
+
+Upstream-Status: Pending
+Origin: User Mage
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ lib/replace/wscript | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -709,6 +709,21 @@
+ conf.CHECK_FUNCS_IN('crypt_r', 'crypt', checklibc=True)
+ conf.CHECK_FUNCS_IN('crypt_rn', 'crypt', checklibc=True)
+
++ if (conf.CONFIG_SET('HAVE_CRYPT_RN') and
++ not conf.CHECK_CODE('''
++ if (crypt_rn) {
++ return 0;
++ }
++ return 1;
++ ''',
++ 'HAVE_DECL_CRYPT_RN',
++ headers='crypt.h',
++ link=False,
++ cflags='-Werror=implicit-function-declaration',
++ msg='Checking for crypt_rn declared by
crypt.h')):
++ for func in ('crypt_r', 'crypt_rn'):
++ conf.undefine('HAVE_%s' % func.upper())
++
+ conf.CHECK_VARIABLE('rl_event_hook', define='HAVE_DECL_RL_EVENT_HOOK',
always=True,
+ headers='readline.h readline/readline.h
readline/history.h')
+ conf.CHECK_VARIABLE('program_invocation_short_name', headers='errno.h')
diff --git
a/net/samba4/patches/0002-source3-Only-build-regedit-when-the-ncurses-form-library-is-usable.patch
b/net/samba4/patches/0002-source3-Only-build-regedit-when-the-ncurses-form-library-is-usable.patch
new file mode 100644
index 0000000..8d0c947
--- /dev/null
+++
b/net/samba4/patches/0002-source3-Only-build-regedit-when-the-ncurses-form-library-is-usable.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT sourcemage.org>
+Date: Sat, 3 Oct 2026 03:23:38 +0200
+Subject: [PATCH 2/2] source3: Only build regedit when the ncurses form
library is usable
+
+source3/wscript_configure_system_ncurses runs CHECK_FUNCS_IN() for the
+ncurses, menu, panel and form libraries and then throws the answers away:
+HAVE_NCURSES is derived from the four headers alone. ncurses installs its
+headers unconditionally, so on a system where the form library cannot be
+linked the rule still claims regedit is buildable and
+source3/utils/regedit.c fails with undefined references to new_field(),
+new_form(), set_field_back() and friends.
+
+Requiring the functions the rule already probes for makes it report the
+truth, and regedit is skipped instead of breaking the build.
+
+Upstream-Status: Pending
+Origin: Source Mage
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ source3/wscript_configure_system_ncurses | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/source3/wscript_configure_system_ncurses
++++ b/source3/wscript_configure_system_ncurses
+@@ -21,7 +21,14 @@
+ if conf.CONFIG_SET('HAVE_NCURSES_H') and \
+ conf.CONFIG_SET('HAVE_MENU_H') and \
+ conf.CONFIG_SET('HAVE_PANEL_H') and \
+- conf.CONFIG_SET('HAVE_FORM_H'):
++ conf.CONFIG_SET('HAVE_FORM_H') and \
++ conf.CONFIG_SET('HAVE_INITSCR') and \
++ conf.CONFIG_SET('HAVE_SET_MENU_ITEMS') and \
++ conf.CONFIG_SET('HAVE_ITEM_COUNT') and \
++ conf.CONFIG_SET('HAVE_NEW_PANEL') and \
++ conf.CONFIG_SET('HAVE_SHOW_PANEL') and \
++ conf.CONFIG_SET('HAVE_NEW_FIELD') and \
++ conf.CONFIG_SET('HAVE_NEW_FORM'):
+ conf.DEFINE('HAVE_NCURSES', '1')
+ else:
+ conf.undefine('HAVE_NCURSES')
diff --git a/net/samba4/patches/non-glibc-fixes.patch
b/net/samba4/patches/non-glibc-fixes.patch
deleted file mode 100644
index 4133484..0000000
--- a/net/samba4/patches/non-glibc-fixes.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Fix portability issues affecting non-glibc systems.
-
----
- nsswitch/wins.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/nsswitch/wins.c b/nsswitch/wins.c
-index 371ab78d2f87..f2b417f2bb61 100644
---- a/nsswitch/wins.c
-+++ b/nsswitch/wins.c
-@@ -22,6 +22,13 @@
- #include "nsswitch/winbind_client.h"
- #include "nsswitch/libwbclient/wbclient.h"
-
-+#ifndef NETDB_SUCCESS
-+#define NETDB_SUCCESS 0
-+#endif
-+#ifndef NETDB_INTERNAL
-+#define NETDB_INTERNAL -1
-+#endif
-+
- #ifdef HAVE_NS_API_H
-
- #include <ns_daemon.h>
- [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (a5077b05832b281b81178fca84d5e7d6f73aadaa), Ismael Luceno, 10/02/2026
Archive powered by MHonArc 2.6.24.