From 50c15c53d9499834617b7bf1acf8d5070892f186 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 24 Apr 2017 20:41:25 -0700 Subject: autofs: Upgrade to 5.1.2 release Add patches to make it work when SECURITY_FLAGS are enabled Signed-off-by: Khem Raj Signed-off-by: Joe MacDonald --- .../autofs/autofs-5.1.2-libtirpc-as-need.patch | 30 +++++++++ .../autofs/autofs/fix_disable_ldap.patch | 10 +-- .../autofs/libtirpc-name-clash-backout.patch | 28 -------- .../autofs/autofs/pkgconfig-libnsl.patch | 19 ++++++ .../recipes-daemons/autofs/autofs_5.1.1.bb | 76 ---------------------- .../recipes-daemons/autofs/autofs_5.1.2.bb | 76 ++++++++++++++++++++++ 6 files changed, 131 insertions(+), 108 deletions(-) create mode 100644 meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch delete mode 100644 meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch create mode 100644 meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch delete mode 100644 meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb create mode 100644 meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb (limited to 'meta-networking/recipes-daemons/autofs') diff --git a/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch new file mode 100644 index 0000000000..cbf2bf8047 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch @@ -0,0 +1,30 @@ +Make configure compatible with -Wl,--as-needed following +https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure + +2016-07-05 Martin von Gagern + +Index: autofs-5.1.2/aclocal.m4 +=================================================================== +--- autofs-5.1.2.orig/aclocal.m4 ++++ autofs-5.1.2/aclocal.m4 +@@ -415,9 +415,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC], + [ + # save current flags + af_check_libtirpc_save_cflags="$CFLAGS" +-af_check_libtirpc_save_ldflags="$LDFLAGS" ++af_check_libtirpc_save_libs="$LIBS" + CFLAGS="$CFLAGS -I=/usr/include/tirpc" +-LDFLAGS="$LDFLAGS -ltirpc" ++LIBS="$LIBS -ltirpc" + + AC_TRY_LINK( + [ #include ], +@@ -440,7 +440,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna + + # restore flags + CFLAGS="$af_check_libtirpc_save_cflags" +-LDFLAGS="$af_check_libtirpc_save_ldflags" ++LIBS="$af_check_libtirpc_save_libs" + ]) + + AC_DEFUN([AF_WITH_LIBTIRPC], diff --git a/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch b/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch index 31c8510a69..94750b257c 100644 --- a/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch +++ b/meta-networking/recipes-daemons/autofs/autofs/fix_disable_ldap.patch @@ -15,8 +15,10 @@ Signed-off-by: Amy Fong include/lookup_ldap.h | 4 ++++ 1 file changed, 4 insertions(+) ---- a/include/lookup_ldap.h -+++ b/include/lookup_ldap.h +Index: autofs-5.1.2/include/lookup_ldap.h +=================================================================== +--- autofs-5.1.2.orig/include/lookup_ldap.h ++++ autofs-5.1.2/include/lookup_ldap.h @@ -1,7 +1,9 @@ #ifndef LOOKUP_LDAP_H #define LOOKUP_LDAP_H @@ -27,14 +29,14 @@ Signed-off-by: Amy Fong #ifdef WITH_SASL #include -@@ -109,10 +111,12 @@ +@@ -117,10 +119,12 @@ struct lookup_context { #define LDAP_AUTH_USESIMPLE 0x0008 +#ifdef WITH_LDAP /* lookup_ldap.c */ LDAP *init_ldap_connection(unsigned logopt, const char *uri, struct lookup_context *ctxt); - int unbind_ldap_connection(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt); + int unbind_ldap_connection(unsigned logopt, struct ldap_conn *conn, struct lookup_context *ctxt); int authtype_requires_creds(const char *authtype); +#endif diff --git a/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch b/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch deleted file mode 100644 index e93021d567..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs/libtirpc-name-clash-backout.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- - lib/rpc_subs.c | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c -index 5d6ead0..c7177f2 100644 ---- a/lib/rpc_subs.c -+++ b/lib/rpc_subs.c -@@ -34,16 +34,6 @@ - #include - - #ifdef WITH_LIBTIRPC --#undef auth_destroy --#define auth_destroy(auth) \ -- do { \ -- int refs; \ -- if ((refs = auth_put((auth))) == 0) \ -- ((*((auth)->ah_ops->ah_destroy))(auth));\ -- } while (0) --#endif -- --#ifdef WITH_LIBTIRPC - const rpcprog_t rpcb_prog = RPCBPROG; - const rpcvers_t rpcb_version = RPCBVERS; - #else --- -1.7.10.4 - diff --git a/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch b/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch new file mode 100644 index 0000000000..bf2c964a0e --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs/pkgconfig-libnsl.patch @@ -0,0 +1,19 @@ +Use pkg-config first to look for external libnsl which is now +split out from glibc, if it does not exist then see if its provided +by glibc itself. + +-Khem + +Index: autofs-5.1.2/configure.in +=================================================================== +--- autofs-5.1.2.orig/configure.in ++++ autofs-5.1.2/configure.in +@@ -186,7 +186,7 @@ fi + # + # glibc/libc 6 new libraries + # +-AC_CHECK_LIB(nsl, yp_match, LIBNSL="-lnsl") ++PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL="-lnsl"],[LIBNSL=""])]) + AC_SUBST(LIBNSL) + + AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv") diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb b/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb deleted file mode 100644 index d85600e4c7..0000000000 --- a/meta-networking/recipes-daemons/autofs/autofs_5.1.1.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "Kernel based automounter for linux" -SECTION = "utils" -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" - -DEPENDS += "libtirpc flex-native bison-native" - -CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" - -inherit autotools-brokensep systemd - -SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ - file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ - file://no-bash.patch \ - file://cross.patch \ - file://libtirpc.patch \ - file://libtirpc-name-clash-backout.patch \ - file://autofs-5.0.7-do-not-check-for-modprobe.patch \ - file://fix_disable_ldap.patch \ - file://autofs-5.0.7-fix-lib-deps.patch \ - file://add-the-needed-stdarg.h.patch \ - file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ - file://force-STRIP-to-emtpy.patch \ - file://remove-bashism.patch \ - file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ - file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ - file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ - " - -SRC_URI[md5sum] = "e143df66b614b8cdb1ff533735f8e12d" -SRC_URI[sha256sum] = "795419383b120d15699ab3b89ea0f3d029f6fb28405a83982d305c4b7b61130f" - -inherit update-rc.d pkgconfig - -INITSCRIPT_NAME = "autofs" -INITSCRIPT_PARAMS = "defaults" - -# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS -CFLAGS += "${LDFLAGS}" - -PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" - -EXTRA_OEMAKE = "DONTSTRIP=1" -EXTRA_OECONF += "--disable-mount-locking \ - --enable-ignore-busy --with-openldap=no \ - --with-sasl=no --with-libtirpc=yes \ - --with-path=${STAGING_BINDIR_NATIVE} \ -" -CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ - ac_cv_path_RPCGEN=rpcgen \ -" - -do_configure_prepend () { - sed -e "s:filagdir:flagdir:" -i configure.in - if [ ! -e acinclude.m4 ]; then - cp aclocal.m4 acinclude.m4 - fi -} - -do_install_append () { - if [ -d ${D}/run ]; then - rmdir ${D}/run - fi - if [ -d ${D}${localstatedir}/run ]; then - rmdir ${D}${localstatedir}/run - fi -} - -INSANE_SKIP_${PN} = "dev-so" - -RPROVIDES_${PN} += "${PN}-systemd" -RREPLACES_${PN} += "${PN}-systemd" -RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "autofs.service" diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb b/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb new file mode 100644 index 0000000000..eea7c4b835 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb @@ -0,0 +1,76 @@ +SUMMARY = "Kernel based automounter for linux" +SECTION = "utils" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl" + +CFLAGS += "-I${STAGING_INCDIR}/tirpc" + +inherit autotools-brokensep systemd update-rc.d pkgconfig + +SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ + file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ + file://no-bash.patch \ + file://cross.patch \ + file://libtirpc.patch \ + file://autofs-5.0.7-do-not-check-for-modprobe.patch \ + file://fix_disable_ldap.patch \ + file://autofs-5.0.7-fix-lib-deps.patch \ + file://add-the-needed-stdarg.h.patch \ + file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \ + file://force-STRIP-to-emtpy.patch \ + file://remove-bashism.patch \ + file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ + file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ + file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ + file://autofs-5.1.2-libtirpc-as-need.patch \ + file://pkgconfig-libnsl.patch \ + " +SRC_URI[md5sum] = "28cf88f99eff553a8500659ba5d45a76" +SRC_URI[sha256sum] = "0d57e4138c2ec8058ca92164d035546f68ce4af93acb893369993d67c7056a10" + +INITSCRIPT_NAME = "autofs" +INITSCRIPT_PARAMS = "defaults" + +# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS +#CFLAGS += "${LDFLAGS}" + +PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +EXTRA_OEMAKE = "DONTSTRIP=1" +EXTRA_OECONF += "--disable-mount-locking \ + --enable-ignore-busy --with-openldap=no \ + --with-sasl=no --with-libtirpc \ + --with-path=${STAGING_BINDIR_NATIVE} \ +" +CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ + ac_cv_path_RPCGEN=rpcgen \ +" + +do_configure_prepend () { + sed -e "s:filagdir:flagdir:" -i ${S}/configure.in + if [ ! -e ${S}/acinclude.m4 ]; then + cp ${S}/aclocal.m4 ${S}/acinclude.m4 + fi +} + +do_install_append () { + if [ -d ${D}/run ]; then + rmdir ${D}/run + fi + if [ -d ${D}${localstatedir}/run ]; then + rmdir ${D}${localstatedir}/run + fi +} +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" + +INSANE_SKIP_${PN} = "dev-so" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "autofs.service" + -- cgit v1.2.3-54-g00ecf