summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/quota
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/quota')
-rw-r--r--meta/recipes-extended/quota/quota/config-tcpwrappers.patch75
-rw-r--r--meta/recipes-extended/quota/quota_4.01.bb30
2 files changed, 105 insertions, 0 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..5f47fbd183
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
@@ -0,0 +1,75 @@
1Upstream-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
new file mode 100644
index 0000000000..82f7899690
--- /dev/null
+++ b/meta/recipes-extended/quota/quota_4.01.bb
@@ -0,0 +1,30 @@
1SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
2SECTION = "base"
3HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
4BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
5LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
7 file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
9PR = "r1"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
12 file://config-tcpwrappers.patch"
13
14SRC_URI[md5sum] = "5c2c31e321d2e1322ce12d69ae5c66d6"
15SRC_URI[sha256sum] = "a36300bbc126b79b745bf937245092808b4585aa3309ef3335d4ab9d873cd206"
16
17S = "${WORKDIR}/quota-tools"
18
19DEPENDS = "gettext-native e2fsprogs"
20
21inherit autotools-brokensep gettext pkgconfig
22
23EXTRA_OEMAKE += 'STRIP=""'
24
25PACKAGECONFIG ??= "tcp-wrappers"
26PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers"
27
28do_install() {
29 oe_runmake prefix=${D}${prefix} install
30}