File quota.spec of Package quota

# spec file for package quota
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           quota
BuildRequires:  dbus-1-devel
BuildRequires:  e2fsprogs-devel
BuildRequires:  libnl-1_1-devel
BuildRequires:  pkg-config
BuildRequires:  tcpd-devel
Version:        4.00
Release:        0
PreReq:         %insserv_prereq %fillup_prereq
Summary:        Disk Quota System
License:        GPL-2.0 and BSD-3-Clause
Group:          System/Filesystems
Source:         %{name}-%{version}.tar.gz
Source1:        %{name}-SUSE.tar.bz2
Patch1:         %{name}-4.00-makefile.patch
Patch2:         %{name}-4.00-warnquota.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The quota subsystem allows a system administrator to set soft and hard
limits on used space and the number of inodes used for users and
groups. The kernel must be compiled with disk quota support enabled
(SUSE kernels have this support).

    Marco van Wieringen <>
    Johan Ekenberg <>
    Jan Kara <>

%package nfs
Summary:        Disk Quota System on NFS
Group:          System/Filesystems
Requires:       quota = %version
PreReq:         %insserv_prereq %fillup_prereq
# Require the services needed to be present for quotad service: portmap, nfsserver, network
Requires:       nfs-kernel-server
Requires:       portmap
Requires:       sysconfig
# Split provides
Provides:       quota:/etc/init.d/quotad

%description nfs
The quotad init script, which provides quota support on NFS mounts.

    Marco van Wieringen <>
    Johan Ekenberg <>
    Jan Kara <>

%setup -q -n quota-tools -a 1

%configure \
	--sysconfdir=%{_sysconfdir} \
	--enable-netlink \

install -d -m 755 ${RPM_BUILD_ROOT}/etc/init.d
install -d -m 755 ${RPM_BUILD_ROOT}/sbin
install -d -m 755 ${RPM_BUILD_ROOT}/var/adm/fillup-templates
make install ROOTDIR=${RPM_BUILD_ROOT}
ln -s %{_sbindir}/{quotacheck,quotaon,quotaoff} ${RPM_BUILD_ROOT}/sbin/
#installing ldap-scripts
install -m 755 ldap-scripts/*pl ${RPM_BUILD_ROOT}/usr/sbin/
install -m 755 ldap-scripts/edquota_editor ${RPM_BUILD_ROOT}/usr/sbin/
cp SUSE/{quotad,boot.quota} ${RPM_BUILD_ROOT}/etc/init.d
ln -s ../../etc/init.d/quotad ${RPM_BUILD_ROOT}/usr/sbin/rcquotad
%find_lang %{name}
cp SUSE/sysconfig.nfs-quota $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.nfs-quota


%{fillup_and_insserv -f -y boot.quota} 

%post nfs
%{fillup_only -an nfs}

%stop_on_removal boot.quota

%preun nfs
%stop_on_removal quotad


%postun nfs

%files -f %{name}.lang
%config /etc/quotagrpadmins
%config /etc/init.d/boot.quota
%config /etc/quotatab
%config /etc/warnquota.conf
%doc %{_mandir}/man?/*

%files nfs
%config /etc/init.d/quotad
%doc SUSE/README.quotad.SUSE
# these files conflicts with glibc rpm
%exclude /usr/include/rpcsvc/*