diff options
| -rw-r--r-- | meta/recipes-extended/quota/quota/config-tcpwrappers.patch | 75 | ||||
| -rw-r--r-- | meta/recipes-extended/quota/quota_4.01.bb | 3 |
2 files changed, 77 insertions, 1 deletions
diff --git a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch new file mode 100644 index 0000000000..94dc3f5dff --- /dev/null +++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | Upstream-status: Pending | ||
| 2 | |||
| 3 | --- quota-tools.orig/configure.in | ||
| 4 | +++ quota-tools/configure.in | ||
| 5 | @@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG) | ||
| 6 | AC_SUBST(NETLINKLIBS) | ||
| 7 | |||
| 8 | AC_SEARCH_LIBS(gethostbyname, nsl) | ||
| 9 | -AC_MSG_CHECKING(for host_access in -lwrap) | ||
| 10 | -AC_CACHE_VAL(ac_cv_lib_wrap_main, | ||
| 11 | - saved_LIBS="$LIBS" | ||
| 12 | - LIBS="$LIBS -lwrap" | ||
| 13 | - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
| 14 | - #include <stdio.h> | ||
| 15 | - #include <sys/types.h> | ||
| 16 | - #include <sys/socket.h> | ||
| 17 | - #include <netinet/in.h> | ||
| 18 | - #include <tcpd.h> | ||
| 19 | - struct request_info request; | ||
| 20 | - int deny_severity, allow_severity;]],[[hosts_access(&request);]])], | ||
| 21 | - dnl We always restore LIBS as we add -lwrap in the next check | ||
| 22 | - [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], | ||
| 23 | - [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) | ||
| 24 | - ]) | ||
| 25 | |||
| 26 | -if test ${ac_cv_lib_wrap_main} = yes; then | ||
| 27 | - AC_CHECK_HEADER(tcpd.h,, [ | ||
| 28 | - echo 'ERROR: could not find tcpd.h - missing TCP wrappers package' | ||
| 29 | - exit 1 | ||
| 30 | - ]) | ||
| 31 | - LIBS="$LIBS -lwrap" | ||
| 32 | - AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) | ||
| 33 | - COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" | ||
| 34 | +AC_ARG_WITH(tcpwrappers, | ||
| 35 | + [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]], | ||
| 36 | + , | ||
| 37 | + with_tcpwrappers="try") | ||
| 38 | + | ||
| 39 | +if test "x$with_tcpwrappers" != xno; then | ||
| 40 | + AC_MSG_CHECKING(for host_access in -lwrap) | ||
| 41 | + AC_CACHE_VAL(ac_cv_lib_wrap_main, | ||
| 42 | + saved_LIBS="$LIBS" | ||
| 43 | + LIBS="$LIBS -lwrap" | ||
| 44 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
| 45 | + #include <stdio.h> | ||
| 46 | + #include <sys/types.h> | ||
| 47 | + #include <sys/socket.h> | ||
| 48 | + #include <netinet/in.h> | ||
| 49 | + #include <tcpd.h> | ||
| 50 | + struct request_info request; | ||
| 51 | + int deny_severity, allow_severity;]],[[hosts_access(&request);]])], | ||
| 52 | + dnl We always restore LIBS as we add -lwrap in the next try | ||
| 53 | + [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], | ||
| 54 | + [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) | ||
| 55 | + ]) | ||
| 56 | + | ||
| 57 | + if test "x$ac_cv_lib_wrap_main" = xyes; then | ||
| 58 | + AC_CHECK_HEADER(tcpd.h,, [ | ||
| 59 | + if test "x$with_tcpwrappers" != xtry; then | ||
| 60 | + AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package]) | ||
| 61 | + fi | ||
| 62 | + ]) | ||
| 63 | + | ||
| 64 | + LIBS="$LIBS -lwrap" | ||
| 65 | + AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) | ||
| 66 | + COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" | ||
| 67 | + elif test "x$with_tcpwrappers" != xtry; then | ||
| 68 | + AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package]) | ||
| 69 | + fi | ||
| 70 | fi | ||
| 71 | |||
| 72 | + | ||
| 73 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
| 74 | AC_C_CONST | ||
| 75 | AC_C_INLINE | ||
diff --git a/meta/recipes-extended/quota/quota_4.01.bb b/meta/recipes-extended/quota/quota_4.01.bb index 9835f062a4..a5f69b3c45 100644 --- a/meta/recipes-extended/quota/quota_4.01.bb +++ b/meta/recipes-extended/quota/quota_4.01.bb | |||
| @@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad2 | |||
| 8 | file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" | 8 | file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" |
| 9 | PR = "r1" | 9 | PR = "r1" |
| 10 | 10 | ||
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz" | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ |
| 12 | file://config-tcpwrappers.patch" | ||
| 12 | 13 | ||
| 13 | SRC_URI[md5sum] = "5c2c31e321d2e1322ce12d69ae5c66d6" | 14 | SRC_URI[md5sum] = "5c2c31e321d2e1322ce12d69ae5c66d6" |
| 14 | SRC_URI[sha256sum] = "a36300bbc126b79b745bf937245092808b4585aa3309ef3335d4ab9d873cd206" | 15 | SRC_URI[sha256sum] = "a36300bbc126b79b745bf937245092808b4585aa3309ef3335d4ab9d873cd206" |
