libreschool-nfs/libreschool-nfs.spec

86 lines
2.2 KiB
RPMSpec

Summary: LibreSchool NFS home profiles configuration
Name: libreschool-nfs
Version: 1.1.1
Release: 1.ns7
License: GPL
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-root
Source0: %{name}-%{version}.tar.gz
Source1: COPYING
URL: %{url_prefix}/%{name}
Requires: libreschool-release
Requires: libreschool-client-manager
Requires: nethserver-dc
Requires: nfs-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: nethserver-devtools
BuildRequires: systemd
%description
LibreSchool NFS home profiles configuration
%prep
%setup
%build
%{makedocs}
perl createlinks.pl
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -not -name '*.orig' -print | cpio -dump $RPM_BUILD_ROOT)
%{genfilelist} $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist
echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist
%files -f %{name}-%{version}-%{release}-filelist
%defattr(-,root,root)
%post
chkconfig nfs on
chkconfig rpcbind on
/sbin/e-smith/db configuration set nfs service \
status enabled \
TCPPort 2049 \
UDPPort 2049 \
access private
/sbin/e-smith/db configuration set rpcbind service \
status enabled \
TCPPort 111 \
UDPPort 111 \
access private
/sbin/e-smith/expand-template /etc/exports
/sbin/e-smith/expand-template /etc/ansible/reconfigure_clients.yml
/usr/bin/systemctl --no-block start nfs >/dev/null 2>&1 || :
/usr/bin/systemctl --no-block start rpcbind >/dev/null 2>&1 || :
/usr/sbin/exportfs -ra
/sbin/e-smith/signal-event firewall-adjust
%postun
#if [ "$1" = 1 ]; then
# #upgrade
#fi
if [ "$1" = 0 ]; then
#uninstallation
echo > /etc/exports
/sbin/e-smith/expand-template /etc/ansible/reconfigure_clients.yml
/usr/sbin/exportfs -ra
fi
%changelog
* Tue Apr 7 2020 Paolo Asperti <paolo@asperti.com> - 1.1.1-1.ns7
- Fix for Ubuntu 16.04
* Sun Apr 5 2020 Paolo Asperti <paolo@asperti.com> - 1.1.0-1.ns7
- Switched to Active Directory
* Sat Mar 7 2020 Paolo Asperti <paolo@asperti.com> - 1.0.2-1.ns7
- Some fixes
* Mon May 6 2019 Paolo Asperti <paolo@asperti.com> - 1.0.1-1.ns7
- updated drone and ansible support
* Sun Apr 28 2019 Paolo Asperti <paolo@asperti.com> - 1.0-1.ns7
- First release for NethServer 7