From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 068AC158020 for ; Tue, 22 Nov 2022 23:42:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A46EE0BEF; Tue, 22 Nov 2022 23:42:10 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F160AE0BEF for ; Tue, 22 Nov 2022 23:42:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 03907340E9E for ; Tue, 22 Nov 2022 23:42:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5F7C5755 for ; Tue, 22 Nov 2022 23:42:07 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1669159796.8695c99fe33a6b0fabe942ce630fc5d7c71d8b32.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/files/, net-fs/samba/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-fs/samba/files/samba-4.15.12-configure-clang16.patch net-fs/samba/samba-4.15.12-r1.ebuild net-fs/samba/samba-4.15.12.ebuild net-fs/samba/samba-4.16.7-r1.ebuild net-fs/samba/samba-4.16.7.ebuild X-VCS-Directories: net-fs/samba/files/ net-fs/samba/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8695c99fe33a6b0fabe942ce630fc5d7c71d8b32 X-VCS-Branch: master Date: Tue, 22 Nov 2022 23:42:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6d8b1d98-3c0e-468e-8e97-edf8beb07e5f X-Archives-Hash: f6aaf3df150ce3a0a57fa3f058ecf4ef commit: 8695c99fe33a6b0fabe942ce630fc5d7c71d8b32 Author: Sam James gentoo org> AuthorDate: Tue Nov 22 23:17:16 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 22 23:29:56 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8695c99f net-fs/samba: fix miscompile w/ clang 16 Closes: https://bugs.gentoo.org/870043 Signed-off-by: Sam James gentoo.org> .../files/samba-4.15.12-configure-clang16.patch | 117 +++++++++++++++++++++ ...amba-4.15.12.ebuild => samba-4.15.12-r1.ebuild} | 1 + ...{samba-4.16.7.ebuild => samba-4.16.7-r1.ebuild} | 1 + 3 files changed, 119 insertions(+) diff --git a/net-fs/samba/files/samba-4.15.12-configure-clang16.patch b/net-fs/samba/files/samba-4.15.12-configure-clang16.patch new file mode 100644 index 000000000000..0d9c919bd9eb --- /dev/null +++ b/net-fs/samba/files/samba-4.15.12-configure-clang16.patch @@ -0,0 +1,117 @@ +https://bugs.gentoo.org/870043 +https://gitlab.com/samba-team/samba/-/merge_requests/2807 + +From afc5144819e0db141aa9c58de385e5829b952096 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Nov 2022 13:37:41 +0100 +Subject: [PATCH 1/3] buildtools/wafsamba: Avoid calling lib_func without a + prototype + +This is a backport of commit f4c0a750d4adebcf2342a44e85f04526c34 +("WAF: Fix detection of linker features") +to buildtools/wafsamba/samba_conftests.py. It fixes the check for +rpath support with compilers in strict C99 mode. + +Signed-off-by: Florian Weimer +--- a/buildtools/wafsamba/samba_waf18.py ++++ b/buildtools/wafsamba/samba_waf18.py +@@ -209,7 +209,8 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None): + lib_node.parent.mkdir() + lib_node.write('int lib_func(void) { return 42; }\n', 'w') + main_node = bld.srcnode.make_node('main.c') +- main_node.write('int main(void) {return !(lib_func() == 42);}', 'w') ++ main_node.write('int lib_func(void);\n' ++ 'int main(void) {return !(lib_func() == 42);}', 'w') + linkflags = [] + if version_script: + script = bld.srcnode.make_node('ldscript') +GitLab +From d8c6a9e5558085dfdb144bb64365822415affe84 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Nov 2022 13:53:17 +0100 +Subject: [PATCH 2/3] source3/wscript: Fix detection of major/minor macros + +These macros are only available via as of glibc +commit e16deca62e16f645213dffd4ecd1153c37765f17 ("[BZ #19239] Don't +include sys/sysmacros.h from sys/types.h."), which went into +glibc 2.28. + +This is different from the usual C99 cleanups because it changes +the configure check result with existing compilers that usually +accept implicit function declarations. + +Signed-off-by: Florian Weimer +--- a/source3/wscript ++++ b/source3/wscript +@@ -603,11 +603,11 @@ msg.msg_accrightslen = sizeof(fd); + conf.CHECK_HEADERS('asm/types.h') + + conf.CHECK_CODE('dev_t dev; int i = major(dev); return 0', "HAVE_DEVICE_MAJOR_FN", +- headers='unistd.h sys/types.h', ++ headers='sys/sysmacros.h unistd.h sys/types.h', + msg="Checking for major macro") + + conf.CHECK_CODE('dev_t dev; int i = minor(dev); return 0', "HAVE_DEVICE_MINOR_FN", +- headers='unistd.h sys/types.h', ++ headers='sys/sysmacros.h unistd.h sys/types.h', + msg="Checking for minor macro") + + conf.CHECK_STRUCTURE_MEMBER('struct dirent', 'd_off', +GitLab +From 1f5c44d982c112e21879b64911a4184c063ba4d4 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Nov 2022 14:12:43 +0100 +Subject: [PATCH 3/3] source3/wscript: Remove implict int and implicit function + declarations + +This should fix the remaining C89isms in these configure checks. + +Signed-off-by: Florian Weimer +--- a/source3/wscript ++++ b/source3/wscript +@@ -1314,7 +1314,7 @@ syscall(SYS_initgroups, 16, NULL, NULL, 0); + + if conf.CHECK_CODE(''' + #include +-main() { ++int main() { + struct tm *tm; + if (sizeof(time_t) == 8) { + time_t max_time = 0x7fffffffffffffffll; +@@ -1345,7 +1345,7 @@ main() { + #if defined(HAVE_SYS_SYSMACROS_H) + #include + #endif +-main() { dev_t dev = makedev(1,2); return 0; } ++int main() { dev_t dev = makedev(1,2); return 0; } + ''', + 'HAVE_MAKEDEV', + addmain=False, +@@ -1355,12 +1355,13 @@ main() { dev_t dev = makedev(1,2); return 0; } + #include + #include + #include ++#include + + void exit_on_core(int ignored) { + exit(1); + } + +-main() { ++int main() { + char *newpath; + signal(SIGSEGV, exit_on_core); + newpath = realpath("/tmp", NULL); +@@ -1517,9 +1518,9 @@ main() { + # Check for getcwd allowing a NULL arg. + conf.CHECK_CODE(''' + #include +-main() { ++int main() { + char *s = getcwd(NULL,0); +- exit(s != NULL ? 0 : 1); ++ return s != NULL ? 0 : 1; + }''', 'GETCWD_TAKES_NULL', addmain=False, execute=True, + msg="getcwd takes a NULL argument") + +GitLab diff --git a/net-fs/samba/samba-4.15.12.ebuild b/net-fs/samba/samba-4.15.12-r1.ebuild similarity index 99% rename from net-fs/samba/samba-4.15.12.ebuild rename to net-fs/samba/samba-4.15.12-r1.ebuild index 1c4025ebfcf5..9d2737f68680 100644 --- a/net-fs/samba/samba-4.15.12.ebuild +++ b/net-fs/samba/samba-4.15.12-r1.ebuild @@ -145,6 +145,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.4.0-pam.patch" "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.patch" + "${FILESDIR}/${PN}-4.15.12-configure-clang16.patch" ) #CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" diff --git a/net-fs/samba/samba-4.16.7.ebuild b/net-fs/samba/samba-4.16.7-r1.ebuild similarity index 99% rename from net-fs/samba/samba-4.16.7.ebuild rename to net-fs/samba/samba-4.16.7-r1.ebuild index 7dff703ab008..36cf60e8eed0 100644 --- a/net-fs/samba/samba-4.16.7.ebuild +++ b/net-fs/samba/samba-4.16.7-r1.ebuild @@ -149,6 +149,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.16.2-fix-musl-without-innetgr.patch" "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.patch" + "${FILESDIR}/${PN}-4.15.12-configure-clang16.patch" ) CONFDIR="${FILESDIR}/4.4"