fixed various problems in pre/post scripts [release 4.21.1-2mamba;Wed Oct 16 2024]
This commit is contained in:
parent
3f86435390
commit
d212a772ca
81
samba.spec
81
samba.spec
@ -1,6 +1,6 @@
|
|||||||
Name: samba
|
Name: samba
|
||||||
Version: 4.21.1
|
Version: 4.21.1
|
||||||
Release: 1mamba
|
Release: 2mamba
|
||||||
Summary: Samba provides seamless file and print services to SMB/CIFS clients
|
Summary: Samba provides seamless file and print services to SMB/CIFS clients
|
||||||
Group: System/Servers
|
Group: System/Servers
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -308,36 +308,24 @@ mkdir %{buildroot}%{_localstatedir}/lib/samba/usershares
|
|||||||
%sysusers_create_package samba %{SOURCE1}
|
%sysusers_create_package samba %{SOURCE1}
|
||||||
:
|
:
|
||||||
|
|
||||||
|
%preun server
|
||||||
|
%systemd_preun smb
|
||||||
|
%systemd_preun nmb
|
||||||
|
:
|
||||||
|
|
||||||
%pre server
|
%pre server
|
||||||
%sysusers_create_package samba-server %{SOURCE2}
|
%sysusers_create_package samba-server %{SOURCE2}
|
||||||
|
%tmpfiles_create samba.conf
|
||||||
:
|
:
|
||||||
|
|
||||||
%post server
|
%post server
|
||||||
%systemd_post nmb
|
|
||||||
%systemd_post smb
|
|
||||||
if [ $1 -ge 1 ]; then
|
|
||||||
%tmpfiles_create samba.conf
|
|
||||||
# clean old sysv broken links
|
|
||||||
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
|
|
||||||
[ -e %{_initrddir}/nmb ] && {
|
|
||||||
systemctl -q enable nmb
|
|
||||||
systemctl -q restart nmb
|
|
||||||
}
|
|
||||||
[ -e %{_initrddir}/smb ] && {
|
|
||||||
systemctl -q enable smb
|
|
||||||
systemctl -q restart smb
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
if [ $1 -gt 1 ]; then
|
if [ $1 -gt 1 ]; then
|
||||||
# remove UTF-8 unix charset definition (leave default) to fix smb4k
|
# remove UTF-8 unix charset definition (leave default) to fix smb4k
|
||||||
sed -i "/unix charset = LOCALE/d" %{_sysconfdir}/samba/smb.conf
|
sed -i "/unix charset = LOCALE/d" %{_sysconfdir}/samba/smb.conf
|
||||||
sed -i "/unix charset = UTF-8/d" %{_sysconfdir}/samba/smb.conf
|
sed -i "/unix charset = UTF-8/d" %{_sysconfdir}/samba/smb.conf
|
||||||
fi
|
fi
|
||||||
exit 0
|
%systemd_post nmb
|
||||||
|
%systemd_post smb
|
||||||
%preun server
|
|
||||||
%systemd_preun smb
|
|
||||||
%systemd_preun nmb
|
|
||||||
:
|
:
|
||||||
|
|
||||||
%postun server
|
%postun server
|
||||||
@ -345,16 +333,11 @@ exit 0
|
|||||||
%systemd_postun_with_restart smb
|
%systemd_postun_with_restart smb
|
||||||
:
|
:
|
||||||
|
|
||||||
%post winbind
|
%preun winbind
|
||||||
%systemd_post winbind
|
%systemd_preun winbind
|
||||||
if [ $1 -ge 1 ]; then
|
|
||||||
# clean old sysv broken links
|
|
||||||
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
|
|
||||||
fi
|
|
||||||
:
|
:
|
||||||
|
|
||||||
%postun winbind
|
%post winbind
|
||||||
%systemd_postun_with_restart winbind
|
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
# new install or update
|
# new install or update
|
||||||
grep "^auth.*pam_winbind.so" %{_sysconfdir}/pam.d/system-auth >/dev/null || sed -i -e '/^auth.*pam_unix.so/a\
|
grep "^auth.*pam_winbind.so" %{_sysconfdir}/pam.d/system-auth >/dev/null || sed -i -e '/^auth.*pam_unix.so/a\
|
||||||
@ -362,36 +345,27 @@ auth sufficient pam_winbind.so use_first_pass' %{_sysconfdir}/pam.d/sy
|
|||||||
grep "^account.*pam_winbind.so" %{_sysconfdir}/pam.d/system-auth >/dev/null || sed -i -e '/^account.*pam_unix/i\
|
grep "^account.*pam_winbind.so" %{_sysconfdir}/pam.d/system-auth >/dev/null || sed -i -e '/^account.*pam_unix/i\
|
||||||
account sufficient pam_winbind.so' %{_sysconfdir}/pam.d/system-auth
|
account sufficient pam_winbind.so' %{_sysconfdir}/pam.d/system-auth
|
||||||
fi
|
fi
|
||||||
|
%systemd_post winbind
|
||||||
:
|
:
|
||||||
|
|
||||||
%preun winbind
|
%postun winbind
|
||||||
%systemd_preun winbind
|
%systemd_postun_with_restart winbind
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
# remove package
|
# remove package
|
||||||
systemctl -q stop winbind
|
|
||||||
sed -i "/.*pam_winbind.so/d" %{_sysconfdir}/pam.d/system-auth
|
sed -i "/.*pam_winbind.so/d" %{_sysconfdir}/pam.d/system-auth
|
||||||
fi
|
fi
|
||||||
:
|
:
|
||||||
|
|
||||||
%pre -n samba4-server
|
%preun -n samba4-server
|
||||||
%systemd_pre samba
|
%systemd_preun samba
|
||||||
:
|
:
|
||||||
|
|
||||||
%post -n samba4-server
|
%post -n samba4-server
|
||||||
/sbin/ldconfig
|
|
||||||
%systemd_post samba
|
%systemd_post samba
|
||||||
if [ $1 -ge 1 ]; then
|
|
||||||
%tmpfiles_create samba
|
|
||||||
fi
|
|
||||||
:
|
|
||||||
|
|
||||||
%preun -n samba4-server
|
|
||||||
%systemd_preun_with_restart samba
|
|
||||||
:
|
:
|
||||||
|
|
||||||
%postun -n samba4-server
|
%postun -n samba4-server
|
||||||
/sbin/ldconfig
|
%systemd_postun_with_restart samba
|
||||||
%systemd_postun samba
|
|
||||||
:
|
:
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -426,6 +400,7 @@ fi
|
|||||||
%{_bindir}/wspsearch
|
%{_bindir}/wspsearch
|
||||||
%{_sbindir}/eventlogadm
|
%{_sbindir}/eventlogadm
|
||||||
%{_sysusersdir}/samba.conf
|
%{_sysusersdir}/samba.conf
|
||||||
|
%{_presetdir}/50-samba.preset
|
||||||
%dir %{_libdir}/samba
|
%dir %{_libdir}/samba
|
||||||
%dir %{_libdir}/samba/krb5
|
%dir %{_libdir}/samba/krb5
|
||||||
%{_libdir}/samba/krb5/*.so
|
%{_libdir}/samba/krb5/*.so
|
||||||
@ -444,7 +419,6 @@ fi
|
|||||||
%{_datadir}/samba/mdssvc/elasticsearch_mappings.json
|
%{_datadir}/samba/mdssvc/elasticsearch_mappings.json
|
||||||
%dir %{_datadir}/samba/setup
|
%dir %{_datadir}/samba/setup
|
||||||
%{_datadir}/samba/setup/*
|
%{_datadir}/samba/setup/*
|
||||||
%{_presetdir}/50-samba.preset
|
|
||||||
%dir %{python3_sitearch}/samba
|
%dir %{python3_sitearch}/samba
|
||||||
%{python3_sitearch}/samba/*
|
%{python3_sitearch}/samba/*
|
||||||
%dir /var/log/samba
|
%dir /var/log/samba
|
||||||
@ -504,7 +478,7 @@ fi
|
|||||||
%{_libdir}/pkgconfig/ndr_standard.pc
|
%{_libdir}/pkgconfig/ndr_standard.pc
|
||||||
%{_libdir}/pkgconfig/samba-*.pc
|
%{_libdir}/pkgconfig/samba-*.pc
|
||||||
%{_libdir}/pkgconfig/samdb.pc
|
%{_libdir}/pkgconfig/samdb.pc
|
||||||
%{_mandir}/man3/ldb.3.gz
|
%{_mandir}/man3/ldb.3*
|
||||||
|
|
||||||
%files server
|
%files server
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -512,6 +486,12 @@ fi
|
|||||||
%{_sbindir}/nmbd
|
%{_sbindir}/nmbd
|
||||||
%{_sbindir}/smbd
|
%{_sbindir}/smbd
|
||||||
%{_prefix}/lib/cups/backend/smb
|
%{_prefix}/lib/cups/backend/smb
|
||||||
|
%dir %attr(1770,root,sambashares) %{_localstatedir}/lib/samba/usershares
|
||||||
|
%{_sysusersdir}/samba-server.conf
|
||||||
|
%{_tmpfilesdir}/samba.conf
|
||||||
|
%{_unitdir}/nmb.service
|
||||||
|
%{_unitdir}/smb.service
|
||||||
|
%{_libdir}/libnss_wins.so.2
|
||||||
%dir %attr(755,root,root) /var/lib/samba/netlogon
|
%dir %attr(755,root,root) /var/lib/samba/netlogon
|
||||||
%dir %attr(2775,root,users) /var/lib/samba/profiles
|
%dir %attr(2775,root,users) /var/lib/samba/profiles
|
||||||
%dir %attr(755,root,root) /var/lib/samba/profdata
|
%dir %attr(755,root,root) /var/lib/samba/profdata
|
||||||
@ -520,12 +500,6 @@ fi
|
|||||||
%dir %attr(1777,root,root) /var/spool/samba
|
%dir %attr(1777,root,root) /var/spool/samba
|
||||||
%dir %attr(755,root,root) /var/lock/samba
|
%dir %attr(755,root,root) /var/lock/samba
|
||||||
%dir %attr(755,root,root) /var/lock/samba/msg.lock
|
%dir %attr(755,root,root) /var/lock/samba/msg.lock
|
||||||
%dir %attr(1770,root,sambashares) %{_localstatedir}/lib/samba/usershares
|
|
||||||
%{_sysusersdir}/samba-server.conf
|
|
||||||
%{_tmpfilesdir}/samba.conf
|
|
||||||
%{_unitdir}/nmb.service
|
|
||||||
%{_unitdir}/smb.service
|
|
||||||
%{_libdir}/libnss_wins.so.2
|
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
%{_mandir}/man7/*
|
%{_mandir}/man7/*
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
@ -614,6 +588,9 @@ fi
|
|||||||
%{_mandir}/man8/winbindd.*
|
%{_mandir}/man8/winbindd.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 16 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.21.1-2mamba
|
||||||
|
- fixed various problems in pre/post scripts
|
||||||
|
|
||||||
* Tue Oct 15 2024 Automatic Build System <autodist@openmamba.org> 4.21.1-1mamba
|
* Tue Oct 15 2024 Automatic Build System <autodist@openmamba.org> 4.21.1-1mamba
|
||||||
- automatic version update by autodist
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user