|
@@ -1,74 +1,97 @@
|
|
|
+%bcond_with systemd
|
|
|
+%bcond_with quota_enables_tcpwrappers
|
|
|
+
|
|
|
Name: quota
|
|
|
Summary: System administration tools for monitoring users' disk usage.
|
|
|
Summary(ja): ユーザのディスク使用量をモニタするシステム管理ツール
|
|
|
-Version: 4.04
|
|
|
-Release: 1%{?_dist_release}
|
|
|
-License: BSD
|
|
|
-Group: System Environment/Base
|
|
|
-URL: http://sourceforge.net/projects/linuxquota/
|
|
|
-
|
|
|
+Version: 4.05
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
+Group: system
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
|
|
|
+License: BSD
|
|
|
+URL: https://sourceforge.net/projects/linuxquota/
|
|
|
#Source0: http://downloads.sourceforge.net/linuxquota/quota-%{version}.tar.gz
|
|
|
Source0: quota-%{version}.tar.gz
|
|
|
Source1: quota_nld.init
|
|
|
Source2: quota_nld.sysconfig
|
|
|
|
|
|
+Source101: quota_nld.service
|
|
|
+Source103: rpc-rquotad.service
|
|
|
+Source104: rpc-rquotad.sysconfig
|
|
|
+
|
|
|
# Not accepted changes (378a64006bb1e818e84a1c77808563b802b028fa)
|
|
|
Patch0: quota-4.04-warnquota-configuration-tunes.patch
|
|
|
Patch1: quota-4.03-Validate-upper-bound-of-RPC-port.patch
|
|
|
-# Install rquotad(3) only if RPC is enabled,
|
|
|
-# <https://sourceforge.net/p/linuxquota/patches/45/>, in upstream after 4.04
|
|
|
-Patch2: quota-4.04-Install-rquota-3-only-if-RPC-is-enabled.patch
|
|
|
-# Pass TIRPC header files location to all RPC compilation units,
|
|
|
-# <https://sourceforge.net/p/linuxquota/patches/46/>, in upstream after 4.04
|
|
|
-Patch3: quota-4.04-Add-TIRPC_CFLAGS-globally-to-CFLAGS-for-RPC-support-.patch
|
|
|
-# Do not iterate over negative UIDs in repquota,
|
|
|
-# <https://sourceforge.net/p/linuxquota/patches/47/>, in upstream after 4.04
|
|
|
-Patch4: quota-4.04-repquota-Fix-output-when-user-2-exists.patch
|
|
|
-# Fix snprintf overflows in warnquota,
|
|
|
-# <https://sourceforge.net/p/linuxquota/patches/48/>, in upstream after 4.04
|
|
|
-Patch5: quota-4.04-warnquota-Check-snprintf-for-overflows.patch
|
|
|
-# Fix user name search in utmp log,
|
|
|
-# <https://sourceforge.net/p/linuxquota/patches/48/>, in upstream after 4.04
|
|
|
-Patch6: quota-4.04-warnquota-Fix-comparing-user-name-to-non-null-termin.patch
|
|
|
-# Avoid questions in quotacheck non-interactive mode, in upstream after 4.04
|
|
|
-Patch7: quota-4.04-quotacheck-Avoid-question-in-non-interactive-mode.patch
|
|
|
-# Report an error when quotacheck fails to cache quota files,
|
|
|
-# in upstream after 4.04
|
|
|
-Patch8: quota-4.04-quotacheck-Report-error-when-caching-of-quota-file-f.patch
|
|
|
-# Report an error if quota file magic is invalid, in upstream after 4.04
|
|
|
-Patch9: quota-4.04-quotacheck-Fail-check-if-quota-file-magic-is-invalid.patch
|
|
|
-# Fix busy loop in rpc.rquotad, bug #1575956, in upstream after 4.04,
|
|
|
-# <https://sourceforge.net/p/linuxquota/feature-requests/16/>
|
|
|
-Patch10: quota-4.04-Listen-on-a-TCP-socket.patch
|
|
|
-# Fix current block usage limit in RPC client, in upstream after 4.04,
|
|
|
-# <https://sourceforge.net/p/linuxquota/bugs/127/>
|
|
|
-Patch11: quota-4.04-rpc-Fix-wrong-limit-for-space-usage.patch
|
|
|
-# Distinguish between none quota limits and no allocated resources in quota(1)
|
|
|
-# tool output, proposed to upstream,
|
|
|
-# <https://sourceforge.net/p/linuxquota/bugs/128/>
|
|
|
-Patch12: quota-4.04-quota-1-Distinguish-between-none-quota-limits-and-no.patch
|
|
|
-# Fix a descriptor leak, proposed to upstream,
|
|
|
-# <https://sourceforge.net/p/linuxquota/bugs/129/>
|
|
|
-Patch13: quota-4.04-convertquota-Fix-a-file-descriptor-leak-in-convert_e.patch
|
|
|
-# Fix a descriptor leak, proposed to upstream,
|
|
|
-# <https://sourceforge.net/p/linuxquota/bugs/129/>
|
|
|
-Patch14: quota-4.04-quotackeck-Fix-a-directory-descriptor-leak-in-scan_d.patch
|
|
|
-# Fix a descriptor leak, proposed to upstream,
|
|
|
-# <https://sourceforge.net/p/linuxquota/bugs/129/>
|
|
|
-Patch15: quota-4.04-xqmstats-Fix-a-file-descriptor-leak-in-main.patch
|
|
|
+# Fix modifying CFLAGS and LDFLAGS by pkgconfig, in upstream after 4.05
|
|
|
+Patch2: quota-4.05-Revert-configure.ac-fix-pkg_check_modules-calls.patch
|
|
|
+# 1/6 Report an error if an RPC fails on an explicitly requested file system,
|
|
|
+# <https://sourceforge.net/p/linuxquota/bugs/134/>, in upstream after 4.05
|
|
|
+Patch3: quota-4.05-Make-messages-about-failures-for-NFS-consistent-with.patch
|
|
|
+# 2/6
|
|
|
+Patch4: quota-4.05-quotaops-Do-not-return-partial-list-from-getprivs.patch
|
|
|
+# 3/6
|
|
|
+Patch5: quota-4.05-quotaops-Do-not-leak-dquot-structures-on-failure.patch
|
|
|
+# 4/6
|
|
|
+Patch6: quota-4.05-setquota-Report-failure-to-obtain-quota-information.patch
|
|
|
+# 5/6
|
|
|
+Patch7: quota-4.05-rpc-Clarify-error-message-when-cannot-connect-to-rpc.patch
|
|
|
+# 6/6
|
|
|
+Patch8: quota-4.05-quotaops-Make-error-string-translatable.patch
|
|
|
+# Fix Free Software Foundation's postal address,
|
|
|
+# <https://sourceforge.net/p/linuxquota/bugs/133/>, in upstream after 4.05
|
|
|
+Patch9: quota-4.05-COPYING-Update-mailing-address.patch
|
|
|
+# Move quota_nld.pid file to /run,
|
|
|
+# <https://sourceforge.net/p/linuxquota/patches/49/>, in upstream after 4.05
|
|
|
+Patch10: quota-4.05-Make-a-directory-for-quota_nld-PID-file-configurable.patch
|
|
|
+# Optimize out useless checking of file systems with hidden quota files,
|
|
|
+# in upstream after 4.05
|
|
|
+Patch11: quota-4.05-quotacheck-Skip-checking-of-filesystems-with-hidded-.patch
|
|
|
+# Fix warnquota --help output, in upstream after 4.05
|
|
|
+Patch12: quota-4.05-warnquota-Fix-help-text.patch
|
|
|
+# Fix checking for the LDAP failures in the warnquota tool,
|
|
|
+# in upstream after 4.05
|
|
|
+Patch13: quota-4.05-warnquota-Properly-detect-LDAP-errors.patch
|
|
|
+# 1/2 Report detailed LDAP failures, in upstream after 4.05
|
|
|
+Patch14: quota-4.05-warnquota-Print-also-additional-error-info-for-LDAP-.patch
|
|
|
+# 2/2 Report detailed LDAP failures, in upstream after 4.05,
|
|
|
+# <https://sourceforge.net/p/linuxquota/patches/50/>
|
|
|
+Patch15: quota-4.05-warnquota-Free-LDAP-error-message.patch
|
|
|
+# Document CC_TO in warquota.conf is looked up with LDAP,
|
|
|
+# in upstream after 4.05
|
|
|
+Patch16: quota-4.05-warnquota-Clarify-that-CC_TO-gets-resolved-through-L.patch
|
|
|
+# Initialize all members of a configparams structure in warnquota,
|
|
|
+# in upstream after 4.05, <https://sourceforge.net/p/linuxquota/patches/51/>
|
|
|
+Patch17: quota-4.05-warnquota-Initialize-all-members-of-a-configparams-s.patch
|
|
|
+# Fix ignoring disabled quotas, bug #1805110, in upstream after 4.05,
|
|
|
+# <https://sourceforge.net/p/linuxquota/bugs/136/>
|
|
|
+Patch18: quota-4.05-Fix-ignoring-disabled-quotas.patch
|
|
|
+# Pass quota type for Q_XFS_GETQSTAT, in upstream after 4.05
|
|
|
+Patch19: quota-4.05-quota-tools-pass-quota-type-to-QCMD-for-Q_XFS_GETQST.patch
|
|
|
+# Set kernel option when setting XFS grace times, posted to upstream
|
|
|
+Patch20: quota-4.05-quota-tools-Set-FS_DQ_TIMER_MASK-for-individual-xfs-grace-times.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
|
|
-Requires: kernel >= 2.4, initscripts >= 6.38
|
|
|
-Requires(post): chkconfig
|
|
|
-Requires(preun): chkconfig
|
|
|
-Conflicts: nfs-utils < 1.0.1
|
|
|
BuildRequires: e2fsprogs-devel, gettext
|
|
|
-BuildRequires: tcp_wrappers, nss-devel
|
|
|
+BuildRequires: nss-devel
|
|
|
BuildRequires: openldap-devel, openssl-devel, dbus-devel, libnl3-devel
|
|
|
-
|
|
|
+BuildRequires: rpcgen
|
|
|
+BuildRequires: pkgconfig(libtirpc)
|
|
|
+%if %{with quota_enables_tcpwrappers}
|
|
|
+BuildRequires: tcp_wrappers
|
|
|
+Requires: tcp_wrappers
|
|
|
+%endif
|
|
|
+Conflicts: nfs-utils < 1.0.1
|
|
|
+%if %{with systemd}
|
|
|
+BuildRequires: systemd
|
|
|
+Requires: kernel >= 4.0
|
|
|
+%{?systemd_requires}
|
|
|
+%else
|
|
|
+Requires: kernel >= 4.0, initscripts >= 6.38
|
|
|
+Requires(post): chkconfig
|
|
|
+Requires(preun): chkconfig
|
|
|
+%endif
|
|
|
|
|
|
%description
|
|
|
The quota package contains system administration tools for monitoring
|
|
@@ -84,40 +107,33 @@ quota パッケージには,ユーザやグループのディスク使用量
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
-%patch0 -p1
|
|
|
-%patch1 -p1
|
|
|
-%patch2 -p1
|
|
|
-%patch3 -p1
|
|
|
-%patch4 -p1
|
|
|
-%patch5 -p1
|
|
|
-%patch6 -p1
|
|
|
-%patch7 -p1
|
|
|
-%patch8 -p1
|
|
|
-%patch9 -p1
|
|
|
-%patch10 -p1
|
|
|
-%patch11 -p1
|
|
|
-%patch12 -p1
|
|
|
-%patch13 -p1
|
|
|
-%patch14 -p1
|
|
|
-%patch15 -p1
|
|
|
+%autopatch -p1
|
|
|
# Regenerate build scripts
|
|
|
autoreconf -f -i
|
|
|
|
|
|
+
|
|
|
%build
|
|
|
%configure \
|
|
|
--enable-bsd-behaviour \
|
|
|
--enable-ext2direct=yes \
|
|
|
--enable-ldapmail=yes \
|
|
|
+%if %{with quota_enables_tcpwrappers}
|
|
|
+ --enable-libwrap=yes \
|
|
|
+%else
|
|
|
+ --disable-libwrap \
|
|
|
+%endif
|
|
|
--enable-netlink=yes \
|
|
|
- --enable-rootsbin=yes \
|
|
|
- --enable-rpc=yes \
|
|
|
- --enable-rpcsetquota=yes \
|
|
|
- --enable-strip-binaries=no \
|
|
|
--enable-nls \
|
|
|
+ --with-pid-dir=/run \
|
|
|
--disable-rpath \
|
|
|
+ --enable-rpc=yes \
|
|
|
+ --enable-rpcsetquota=yes \
|
|
|
--disable-silent-rules \
|
|
|
- --disable-xfs-roothack
|
|
|
-make
|
|
|
+ --disable-xfs-roothack \
|
|
|
+ --enable-rootsbin=yes \
|
|
|
+ --enable-strip-binaries=no
|
|
|
+make %{?_smp_mflags}
|
|
|
+
|
|
|
|
|
|
%install
|
|
|
rm -fr %{buildroot}
|
|
@@ -128,38 +144,57 @@ mkdir -p %{buildroot}%{_bindir}
|
|
|
mkdir -p %{buildroot}%{_mandir}/{man1,man3,man8}
|
|
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
+rm -rf %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
|
|
+install -p -m644 -D %{SOURCE2} \
|
|
|
+ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/quota_nld
|
|
|
install -m 644 warnquota.conf %{buildroot}%{_sysconfdir}
|
|
|
+%if %{with systemd}
|
|
|
+install -p -m644 -D %{SOURCE101} $RPM_BUILD_ROOT%{_unitdir}/quota_nld.service
|
|
|
+install -p -m644 -D %{SOURCE103} $RPM_BUILD_ROOT%{_unitdir}/rpc-rquotad.service
|
|
|
+install -p -m644 -D %{SOURCE104} \
|
|
|
+ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rpc-rquotad
|
|
|
+%else
|
|
|
+install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/quota_nld
|
|
|
+%endif
|
|
|
|
|
|
mv %{buildroot}%{_sbindir}/quota{check,off,on} %{buildroot}/sbin/
|
|
|
|
|
|
-# we don't support XFS yet
|
|
|
-#
|
|
|
-rm -f %{buildroot}%{_sbindir}/quot
|
|
|
-rm -f %{buildroot}%{_sbindir}/xqmstats
|
|
|
-rm -f %{buildroot}%{_mandir}/man8/quot.*
|
|
|
-rm -f %{buildroot}%{_mandir}/man8/xqmstats.*
|
|
|
+%find_lang %{name}
|
|
|
|
|
|
-install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/quota_nld
|
|
|
-install -p -m644 -D %{SOURCE2} \
|
|
|
- $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/quota_nld
|
|
|
|
|
|
-rm -rf %{buildroot}%{_datadir}/doc/%{name}
|
|
|
-
|
|
|
-%find_lang %{name}
|
|
|
+%check
|
|
|
+make check
|
|
|
|
|
|
|
|
|
%clean
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
+
|
|
|
%post
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_post quota_nld.service
|
|
|
+%systemd_post rpc-rquotad.service
|
|
|
+%else
|
|
|
/sbin/chkconfig --add quota_nld
|
|
|
+%endif
|
|
|
|
|
|
%preun
|
|
|
-if [ $1 = 0 ] ; then
|
|
|
+%if %{with systemd}
|
|
|
+%systemd_preun quota_nld.service
|
|
|
+%systemd_preun rpc-rquotad.service
|
|
|
+%else
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
|
|
|
/sbin/service quota_nld stop >/dev/null 2>&1
|
|
|
/sbin/chkconfig --del quota_nld
|
|
|
fi
|
|
|
+%endif
|
|
|
+
|
|
|
+%if %{with systemd}
|
|
|
+%postun
|
|
|
+%systemd_postun_with_restart quota_nld.service
|
|
|
+%systemd_postun_with_restart rpc-rquotad.service
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
@@ -169,8 +204,6 @@ fi
|
|
|
%config(noreplace) %{_sysconfdir}/warnquota.conf
|
|
|
%config(noreplace) %{_sysconfdir}/quotagrpadmins
|
|
|
%config(noreplace) %{_sysconfdir}/quotatab
|
|
|
-%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/quota_nld
|
|
|
-%{_initrddir}/quota_nld
|
|
|
/sbin/*
|
|
|
%{_bindir}/*
|
|
|
%{_sbindir}/*
|
|
@@ -179,9 +212,23 @@ fi
|
|
|
%{_mandir}/man3/*
|
|
|
%{_mandir}/man5/*
|
|
|
%{_mandir}/man8/*
|
|
|
+%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/quota_nld
|
|
|
+%if %{with systemd}
|
|
|
+%{_unitdir}/quota_nld.service
|
|
|
+%{_unitdir}/rpc-rquotad.service
|
|
|
+%config(noreplace) %{_sysconfdir}/sysconfig/rpc-rquotad
|
|
|
+%else
|
|
|
+%{_initrddir}/quota_nld
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Aug 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.05-1
|
|
|
+- new upstram release.
|
|
|
+- updated all patches.
|
|
|
+- disabled tcp_wrappers as default.
|
|
|
+- added systemd support (disabled as default).
|
|
|
+
|
|
|
* Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.04-1
|
|
|
- new upstram release.
|
|
|
- dropped BR:libnl-devel.
|