From 79c6ef3a0f52c31da62304be68ec6fcf0395f9b4 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Fri, 10 Mar 2023 00:36:04 +0100 Subject: [PATCH] Port configure script to C99 Related to: --- autofs-5.1.8-configure-c99.patch | 79 ++++++++++++++++++++++++++++++++ autofs.spec | 7 ++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 autofs-5.1.8-configure-c99.patch diff --git a/autofs-5.1.8-configure-c99.patch b/autofs-5.1.8-configure-c99.patch new file mode 100644 index 0000000..f7c029a --- /dev/null +++ b/autofs-5.1.8-configure-c99.patch @@ -0,0 +1,79 @@ +Posted upstream: https://marc.info/?l=autofs&m=167840444620402 + +Author: Arjun Shankar +Date: Fri Mar 10 00:00:55 2023 +0100 + + autofs-5.1.8 - define LDAP_DEPRECATED during LDAP configure check + + This commit defines LDAP_DEPRECATED as 1 during a configure check for + ldap_parse_page_control. This is in line with how lookup_ldap.c is + compiled at build time. + + The configure script is regenerated with autoconf 2.69. + + The regeneration of the configure script also includes changes due to + commit 69fda4f090e3. That commit intended to run checks with implicit + function declaration warnings enabled in order to recognize missing + libldap functions. However, the in-tree copy of the configure script + was not regenerated at that time. + + Signed-off-by: Arjun Shankar + +diff --git a/aclocal.m4 b/aclocal.m4 +index 33561aaeb9f5eaa4..a1ad50b493749851 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -368,7 +368,8 @@ af_check_ldap_parse_page_control_save_libs="$LIBS" + LIBS="$LIBS -lldap" + + AC_TRY_LINK( +- [ #include ], ++ [ #define LDAP_DEPRECATED 1 ++ #include ], + [ LDAP *ld; + ber_int_t ct; + struct berval *c; +diff --git a/configure b/configure +index 394a8d55121c12ed..a19250d5ba271ecd 100755 +--- a/configure ++++ b/configure +@@ -5407,6 +5407,8 @@ $as_echo_n "checking for ldap_create_page_control in -lldap... " >&6; } + # save current libs + af_check_ldap_create_page_control_save_libs="$LIBS" + LIBS="$LIBS -lldap" ++af_check_ldap_create_page_control_save_cflags="$CFLAGS" ++CFLAGS="$CFLAGS -Werror=implicit-function-declaration" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -5443,6 +5445,7 @@ fi + + # restore libs + LIBS="$af_check_ldap_create_page_control_save_libs" ++CFLAGS="$af_check_ldap_create_page_control_save_cflags" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_parse_page_control in -lldap" >&5 + $as_echo_n "checking for ldap_parse_page_control in -lldap... " >&6; } +@@ -5450,10 +5453,13 @@ $as_echo_n "checking for ldap_parse_page_control in -lldap... " >&6; } + # save current libs + af_check_ldap_parse_page_control_save_libs="$LIBS" + LIBS="$LIBS -lldap" ++af_check_ldap_parse_page_control_save_cflags="$CFLAGS" ++CFLAGS="$CFLAGS -Werror=implicit-function-declaration" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- #include ++ #define LDAP_DEPRECATED 1 ++ #include + int + main () + { +@@ -5486,6 +5492,7 @@ fi + + # restore libs + LIBS="$af_check_ldap_parse_page_control_save_libs" ++CFLAGS="$af_check_ldap_parse_page_control_save_cflags" + + fi + diff --git a/autofs.spec b/autofs.spec index 7ddd3fa..84bb9ce 100644 --- a/autofs.spec +++ b/autofs.spec @@ -12,7 +12,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.1.8 -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 License: GPLv2+ Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz @@ -37,6 +37,7 @@ Patch18: autofs-5.1.8-fix-handling-of-incorrect-return-from-umount_ent.patch Patch19: autofs-5.1.8-dont-use-initgroups-at-spawn.patch Patch20: autofs-5.1.8-fix-missing-unlock-in-sasl_do_kinit_ext_cc.patch Patch21: autofs-5.1.8-fix-invalid-tsv-access.patch +Patch22: autofs-5.1.8-configure-c99.patch %if %{with_systemd} BuildRequires: systemd-units @@ -122,6 +123,7 @@ echo %{version}-%{release} > .version %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %build LDFLAGS=-Wl,-z,now @@ -229,6 +231,9 @@ fi %dir /etc/auto.master.d %changelog +* Fri Mar 10 2023 Arjun Shankar - 1:5.1.8-9 +- Port configure script to C99 + * Wed Jan 18 2023 Fedora Release Engineering - 1:5.1.8-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild