diff --git a/quota-4.03-Do-not-install-quota_nld.8-when-quota_nld-is-not-ins.patch b/quota-4.03-Do-not-install-quota_nld.8-when-quota_nld-is-not-ins.patch new file mode 100644 index 0000000..5aaa0c4 --- /dev/null +++ b/quota-4.03-Do-not-install-quota_nld.8-when-quota_nld-is-not-ins.patch @@ -0,0 +1,55 @@ +From 757e659344a144f86adb4c531fa4477771dfc0bc Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Thu, 18 May 2017 12:27:31 +0300 +Subject: [PATCH] Do not install quota_nld.8 when quota_nld is not installed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Ported to 4.03: + +commit 579425d669eb4df2ae26ceb70dfb9380c38fb521 +Author: Dmitry V. Levin +Date: Thu May 18 12:27:31 2017 +0300 + + Do not install quota_nld.8 when quota_nld is not installed + + When netlink support is not enabled, quota_nld is not built + and not installed but quota_nld.8 is still installed. + Fix this inconsistency and install quota_nld.8 iff quota_nld + is installed. + + Signed-off-by: Dmitry V. Levin + Signed-off-by: Jan Kara + +Signed-off-by: Petr Písař +--- + Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 1414f8d..ff9f6a0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -27,7 +27,6 @@ man_MANS = \ + edquota.8 \ + quotagrpadmins.5 \ + quotacheck.8 \ +- quota_nld.8 \ + quotaon.8 \ + quotastats.8 \ + quotasync.1 \ +@@ -42,6 +41,10 @@ man_MANS = \ + warnquota.8 \ + xqmstats.8 + ++if WITH_NETLINK ++man_MANS += quota_nld.8 ++endif ++ + CLEANFILES = rquota.c rquota.h rquota_clnt.c + + SUBDIRS = po +-- +2.9.4 + diff --git a/quota-4.03-Print-explicitely-disabled-options-properly.patch b/quota-4.03-Print-explicitely-disabled-options-properly.patch new file mode 100644 index 0000000..819252e --- /dev/null +++ b/quota-4.03-Print-explicitely-disabled-options-properly.patch @@ -0,0 +1,86 @@ +From ef6047e5645efbc05f260260b174a4043dda21fd Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Mon, 4 Jan 2016 15:36:27 +0100 +Subject: [PATCH] Print explicitely disabled options properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Ported to 3.04: +commit 6ccb66159a9eee6ca114b11b70eb06f4ac6900d7 +Author: Jan Kara +Date: Mon Jan 4 15:36:27 2016 +0100 + + Print explicitely disabled options properly + + Currently we printed only an empty string when some build option was + disabled explicitely via --disable-foo. Print 'no' in that case as well. + + Signed-off-by: Jan Kara + +Signed-off-by: Petr Písař +--- + configure.ac | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1994945..82aabcb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -74,7 +74,7 @@ AC_ARG_ENABLE([ldapmail], + AS_IF([test "x$enable_ldapmail" != "xno"], [ + build_ldap="yes" + AC_CHECK_LIB([ldap], [ldap_initialize], [:;], [ +- build_ldap=no ++ build_ldap="no" + AS_IF([test "x$enable_ldapmail" = "xyes"], [ + AC_MSG_ERROR([LDAP support required but library not found.]); + ]) +@@ -84,6 +84,8 @@ AS_IF([test "x$enable_ldapmail" != "xno"], [ + AC_DEFINE([USE_LDAP_MAIL_LOOKUP], 1, [Lookup email address using LDAP]) + COMPILE_OPTS="$COMPILE_OPTS USE_LDAP_MAIL_LOOKUP" + ]) ++], [ ++ build_ldap="no" + ]) + AC_SUBST(LDAP_LIBS) + +@@ -113,6 +115,8 @@ AS_IF([test "x$enable_ext2direct" != "xno"], [ + AC_DEFINE([EXT2_DIRECT], 1, [Scanning of ext? filesystems using e2fslib]) + COMPILE_OPTS="$COMPILE_OPTS EXT2_DIRECT" + ]) ++], [ ++ build_ext2direct="no" + ]) + AC_SUBST(EXT2FS_CFLAGS) + AC_SUBST(EXT2FS_LIBS) +@@ -141,6 +145,8 @@ AS_IF([test "x$enable_netlink" != "xno"], [ + AC_MSG_ERROR([Required libnl3 libraries for quota netlink daemon not found.]) + ]) + ]) ++], [ ++ build_netlink="no" + ]) + AM_CONDITIONAL([WITH_NETLINK], [test "x$build_netlink" != "xno"]) + AC_SUBST(DBUS_CFLAGS) +@@ -171,6 +177,8 @@ AS_IF([test "x$enable_libwrap" != "xno"], [ + AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) + COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" + ]) ++], [ ++ build_libwrap="no" + ]) + AC_SUBST(WRAP_LIBS) + +@@ -199,6 +207,8 @@ AS_IF([test x"$enable_rpc" != "xno"], [ + AC_DEFINE([RPC], 1, [Support for RPC]) + COMPILE_OPTS="$COMPILE_OPTS RPC" + ]) ++], [ ++ build_rpc="no" + ]) + AM_CONDITIONAL([WITH_RPC], [test x"$build_rpc" != "xno"]) + +-- +2.9.4 + diff --git a/quota.spec b/quota.spec index 2750449..2b75b9c 100644 --- a/quota.spec +++ b/quota.spec @@ -4,7 +4,7 @@ Name: quota Epoch: 1 Version: 4.03 -Release: 4%{?dist} +Release: 5%{?dist} Summary: System administration tools for monitoring users' disk usage # quota_nld.c, quotaio_xfs.h: GPLv2 # bylabel.c copied from util-linux: GPLv2+ @@ -49,6 +49,11 @@ Patch4: quota-4.03-Work-around-an-AC_CHECK_LIB-bug-in-Autoconf.patch Patch5: quota-4.03-quotacheck-Fix-buggy-error-check-of-read-2.patch # Use direct scanning also for ext4, in upsream after 4.03 Patch6: quota-4.03-quotacheck-Use-direct-scanning-also-for-ext4.patch +# Fix disabling disabled features, in upstream after 4.03 +Patch7: quota-4.03-Print-explicitely-disabled-options-properly.patch +# Do not install quota_nld.8 when netlink support is disabled, +# in upstream after 4.03 +Patch8: quota-4.03-Do-not-install-quota_nld.8-when-quota_nld-is-not-ins.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bash @@ -162,6 +167,8 @@ Linux/UNIX environment. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 # Unpack forgotten LDAP scripts tar -xzkf %{SOURCE5} # Regenerate build scripts, also because of Respect-enviroment-CFLAGS.patch @@ -274,6 +281,9 @@ make check %changelog +* Tue Jul 04 2017 Petr Pisar - 1:4.03-5 +- Fix disabling features at build time + * Thu Nov 10 2016 Petr Pisar - 1:4.03-4 - Fix checking a block read error (upstream bug #123) - Use direct scanning also for ext4