- Cleanup with spec-cleaner
- Remove the compat for the usrmerge - Use systemd service files instead of the initscript + added extra workaround for argument parsing. - Remove extra SUSE traball with scripts as we reduced it down to one script and unitfile. OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=35
This commit is contained in:
parent
908ece3114
commit
507c5b8932
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e22ee70bfc6fd7b62037ecff19758080dc88ceee94714e0ade9d850feb897c57
|
||||
size 4321
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 19 09:22:00 UTC 2014 - tchvatal@suse.com
|
||||
|
||||
- Cleanup with spec-cleaner
|
||||
- Remove the compat for the usrmerge
|
||||
- Use systemd service files instead of the initscript +
|
||||
added extra workaround for argument parsing.
|
||||
- Remove extra SUSE traball with scripts as we reduced it down to
|
||||
one script and unitfile.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 13 20:22:56 UTC 2013 - sweet_f_a@gmx.de
|
||||
|
||||
|
135
quota.spec
135
quota.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package quota
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 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
|
||||
@ -17,26 +17,24 @@
|
||||
|
||||
|
||||
Name: quota
|
||||
BuildRequires: dbus-1-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
%if 0%{?suse_version} > 1140
|
||||
BuildRequires: libnl-1_1-devel
|
||||
%else
|
||||
BuildRequires: libnl-devel
|
||||
%endif
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: tcpd-devel
|
||||
Version: 4.01
|
||||
Release: 0
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
Url: http://sourceforge.net/projects/linuxquota/
|
||||
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
|
||||
Url: http://sourceforge.net/projects/linuxquota/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: sysconfig.nfs-quota
|
||||
Source2: quotad.service
|
||||
Source3: quotad_env.sh
|
||||
Patch1: %{name}-4.00-makefile.patch
|
||||
Patch2: %{name}-4.01-warnquota.patch
|
||||
BuildRequires: dbus-1-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: libnl-1_1-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: systemd
|
||||
BuildRequires: tcpd-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -45,43 +43,23 @@ 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).
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Marco van Wieringen <mvw@planets.ow.nl>
|
||||
Johan Ekenberg <johan@ekenberg.nu>
|
||||
Jan Kara <jack@suse.cz>
|
||||
|
||||
%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
|
||||
%if 0%{?suse_version} >= 1230
|
||||
Requires: quota = %{version}
|
||||
Requires: rpcbind
|
||||
%else
|
||||
Requires: portmap
|
||||
%endif
|
||||
Requires: sysconfig
|
||||
# Split provides
|
||||
Provides: quota:/etc/init.d/quotad
|
||||
Requires(post): %fillup_prereq
|
||||
Provides: quota:%{_initddir}/quotad
|
||||
%{?systemd_requires}
|
||||
|
||||
%description nfs
|
||||
The quotad init script, which provides quota support on NFS mounts.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Marco van Wieringen <mvw@planets.ow.nl>
|
||||
Johan Ekenberg <johan@ekenberg.nu>
|
||||
Jan Kara <jack@suse.cz>
|
||||
|
||||
%prep
|
||||
%setup -q -n quota-tools -a 1
|
||||
%setup -q -n quota-tools
|
||||
%patch1
|
||||
%patch2
|
||||
|
||||
@ -90,70 +68,44 @@ Authors:
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--enable-netlink \
|
||||
--enable-strip-binaries=no
|
||||
make
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
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}
|
||||
#UsrMerge
|
||||
ln -s %{_sbindir}/{quotacheck,quotaon,quotaoff} ${RPM_BUILD_ROOT}/sbin/
|
||||
#EndUsrMerge
|
||||
make install ROOTDIR=%{buildroot}
|
||||
|
||||
#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/
|
||||
%if 0%{?suse_version} >= 1230
|
||||
cp SUSE/quotad ${RPM_BUILD_ROOT}/etc/init.d
|
||||
%else
|
||||
cp SUSE/{quotad,boot.quota} ${RPM_BUILD_ROOT}/etc/init.d
|
||||
%endif
|
||||
ln -s ../../etc/init.d/quotad ${RPM_BUILD_ROOT}/usr/sbin/rcquotad
|
||||
install -m 755 ldap-scripts/*pl %{buildroot}%{_sbindir}/
|
||||
install -m 755 ldap-scripts/edquota_editor %{buildroot}%{_sbindir}/
|
||||
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
cp %{SOURCE2} %{buildroot}%{_unitdir}/quotad.service
|
||||
ln -s service %{buildroot}%{_sbindir}/rcquotad
|
||||
# systemd unit file sucks so bash script to work around it is provided
|
||||
install -d -m 755 %{buildroot}%{_unitdir}/../scripts/
|
||||
install -m 755 %{SOURCE3} %{buildroot}%{_unitdir}/../scripts/quotad_env.sh
|
||||
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
cp %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.nfs-quota
|
||||
|
||||
%find_lang %{name}
|
||||
cp SUSE/sysconfig.nfs-quota $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.nfs-quota
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if 0%{?suse_version} < 1230
|
||||
%post
|
||||
%{fillup_and_insserv -f -y boot.quota}
|
||||
%endif
|
||||
|
||||
%post nfs
|
||||
%{fillup_only -an nfs}
|
||||
|
||||
%if 0%{?suse_version} < 1230
|
||||
%preun
|
||||
%stop_on_removal boot.quota
|
||||
%endif
|
||||
%service_add_post quotad.service
|
||||
|
||||
%preun nfs
|
||||
%stop_on_removal quotad
|
||||
|
||||
%if 0%{?suse_version} < 1230
|
||||
%postun
|
||||
%{insserv_cleanup}
|
||||
%endif
|
||||
%service_del_preun quotad.service
|
||||
|
||||
%postun nfs
|
||||
%{insserv_cleanup}
|
||||
%service_del_postun quotad.service
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
%config /etc/quotagrpadmins
|
||||
%if 0%{?suse_version} < 1230
|
||||
%config /etc/init.d/boot.quota
|
||||
%endif
|
||||
%config /etc/quotatab
|
||||
%config /etc/warnquota.conf
|
||||
%doc SUSE/README.SUSE README.* doc
|
||||
%config %{_sysconfdir}/quotagrpadmins
|
||||
%config %{_sysconfdir}/quotatab
|
||||
%config %{_sysconfdir}/warnquota.conf
|
||||
%doc README.* doc
|
||||
%doc %{_mandir}/man?/*
|
||||
#UsrMerge
|
||||
/sbin/quotacheck
|
||||
/sbin/quotaoff
|
||||
/sbin/quotaon
|
||||
#EndUsrMerge
|
||||
%{_bindir}/quota
|
||||
%{_bindir}/quotasync
|
||||
%{_sbindir}/applySystemQuotas.pl
|
||||
@ -175,12 +127,13 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files nfs
|
||||
%defattr(-,root,root)
|
||||
%config /etc/init.d/quotad
|
||||
%doc SUSE/README.quotad.SUSE
|
||||
%{_sbindir}/rpc.rquotad
|
||||
%{_sbindir}/rcquotad
|
||||
%{_unitdir}/quotad.service
|
||||
%{_unitdir}/../scripts
|
||||
%{_unitdir}/../scripts/quotad_env.sh
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.nfs-quota
|
||||
# these files conflicts with glibc rpm
|
||||
%exclude /usr/include/rpcsvc/*
|
||||
%exclude %{_includedir}/rpcsvc/*
|
||||
|
||||
%changelog
|
||||
|
11
quotad.service
Normal file
11
quotad.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Quota RPC monitor
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/run/sysconfig/quotad
|
||||
ExecStart=/usr/sbin/rpc.rquotad -F ${RQUOTAD_ARGS}
|
||||
ExecStartPre=-/usr/lib/systemd/scripts/quotad_env.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
11
quotad_env.sh
Normal file
11
quotad_env.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/sysconfig/nfs
|
||||
|
||||
if [[ -n "${RQUOTAD_PORT}" ]]; then
|
||||
RQUOTAD_PORT="-p ${RQUOTAD_PORT}"
|
||||
fi
|
||||
|
||||
mkdir -p /run/sysconfig
|
||||
echo "RQUOTAD_ARGS=\"${RQUOTAD_PORT}\"" > /run/sysconfig/quotad
|
||||
|
12
sysconfig.nfs-quota
Normal file
12
sysconfig.nfs-quota
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
## Path: Network/File systems/NFS server
|
||||
## Description: use fixed port number for rquotad
|
||||
## Type: integer
|
||||
## Default: ""
|
||||
## ServiceRestart: quotad
|
||||
#
|
||||
# Only set this if you want to start quotad on a fixed
|
||||
# port instead of the port assigned by rpc. Only for use
|
||||
# to export nfs-filesystems through firewalls.
|
||||
#
|
||||
RQUOTAD_PORT=""
|
Loading…
Reference in New Issue
Block a user