1 |
# $Id: e-smith-packetfilter.spec,v 1.5 2021/02/13 04:48:27 jpp Exp $ |
# $Id: e-smith-packetfilter.spec,v 1.12 2021/03/05 06:49:34 jpp Exp $ |
2 |
|
|
3 |
Summary: e-smith server and gateway - packetfilter add-on |
Summary: e-smith server and gateway - packetfilter add-on |
4 |
%define name e-smith-packetfilter |
%define name e-smith-packetfilter |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 2.6.0 |
%define version 2.6.0 |
7 |
%define release 5 |
%define release 6 |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
10 |
License: GPL |
License: GPL |
13 |
Patch0: e-smith-packetfilter-2.6.0-bz11122-bz11089-systemd-event.patch |
Patch0: e-smith-packetfilter-2.6.0-bz11122-bz11089-systemd-event.patch |
14 |
Patch1: e-smith-packetfilter-2.6.0-bz11251-drop-pptpd.patch |
Patch1: e-smith-packetfilter-2.6.0-bz11251-drop-pptpd.patch |
15 |
Patch2: e-smith-packetfilter-2.6.0-bz11420.patch |
Patch2: e-smith-packetfilter-2.6.0-bz11420.patch |
16 |
|
Patch3: e-smith-packetfilter-2.6.0bz11426-ulogd.patch |
17 |
|
|
18 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
19 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
20 |
Requires: e-smith-base >= 5.8.0-49 |
Requires: e-smith-base >= 5.8.0-49 |
21 |
Requires: ulogd >= 1.24 |
Requires: ulogd >= 2 |
22 |
Requires: daemontools |
Requires: daemontools |
23 |
Requires: iptables |
Requires: iptables |
24 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
25 |
Obsoletes: e-smith-ipmasq |
Obsoletes: e-smith-ipmasq |
26 |
AutoReqProv: no |
AutoReqProv: no |
27 |
|
Requires(pre): /usr/sbin/useradd |
28 |
|
|
29 |
%description |
%description |
30 |
e-smith server and gateway software - packetfilter add-on |
e-smith server and gateway software - packetfilter add-on |
31 |
|
|
32 |
%changelog |
%changelog |
33 |
|
* Thu Mar 04 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-6.sme |
34 |
|
- move ulogd to systemd [SME: 11426] |
35 |
|
- require ulogd 2 [SME: 11426] |
36 |
|
|
37 |
* Wed Mar 03 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme |
* Wed Mar 03 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme |
38 |
- remove pptpd last references [SME: 11420] |
- remove pptpd last references [SME: 11420] |
39 |
|
|
842 |
%patch0 -p1 |
%patch0 -p1 |
843 |
%patch1 -p1 |
%patch1 -p1 |
844 |
%patch2 -p1 |
%patch2 -p1 |
845 |
|
%patch3 -p1 |
846 |
|
rm -rf root/var/service/ulogd |
847 |
|
mkdir -p root/run/ulog |
848 |
|
|
849 |
%build |
%build |
850 |
perl createlinks |
perl createlinks |
862 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
863 |
mkdir -p $RPM_BUILD_ROOT/var/log/iptables |
mkdir -p $RPM_BUILD_ROOT/var/log/iptables |
864 |
mkdir -p $RPM_BUILD_ROOT/service |
mkdir -p $RPM_BUILD_ROOT/service |
865 |
ln -s /var/service/ulogd $RPM_BUILD_ROOT/service/ulogd |
#ln -s /var/service/ulogd $RPM_BUILD_ROOT/service/ulogd |
866 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
867 |
--dir /var/service/ulogd 'attr(1755,root,root)' \ |
--dir /var/log/iptables 'attr(0755,ulog,ulog)' \ |
868 |
--file /var/service/ulogd/run 'attr(0755,root,root)' \ |
--dir /run/ulog 'attr(2755,ulog,ulog)' \ |
|
--dir /var/service/ulogd/log 'attr(0755,root,root)' \ |
|
|
--file /var/service/ulogd/log/run 'attr(0755,root,root)' \ |
|
|
--dir /var/log/iptables 'attr(0755,smelog,smelog)' \ |
|
869 |
> e-smith-%{version}-filelist |
> e-smith-%{version}-filelist |
870 |
echo "%doc COPYING" >> e-smith-%{version}-filelist |
echo "%doc COPYING" >> e-smith-%{version}-filelist |
871 |
|
# --dir /var/service/ulogd 'attr(1755,root,root)' \ |
872 |
|
# --file /var/service/ulogd/run 'attr(0755,root,root)' \ |
873 |
|
# --dir /var/service/ulogd/log 'attr(0755,root,root)' \ |
874 |
|
# --file /var/service/ulogd/log/run 'attr(0755,root,root)' \ |
875 |
|
|
876 |
%clean |
%clean |
877 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
878 |
|
|
879 |
|
%pre |
880 |
|
if [ $1 -gt 1 ] ; then |
881 |
|
if [ -e /var/service/ulogd/run ] ; then |
882 |
|
/usr/bin/sv d ulogd |
883 |
|
/usr/bin/sv d ulogd/log |
884 |
|
fi |
885 |
|
fi |
886 |
|
|
887 |
|
/usr/sbin/groupadd \ |
888 |
|
-g 1010 -o ulog 2>/dev/null || : |
889 |
|
|
890 |
|
/usr/sbin/useradd \ |
891 |
|
-u 1010 -g 1010 -c 'ulogd user' -d /var/log/ulogd \ |
892 |
|
-M -s /bin/false ulog || : |
893 |
|
|
894 |
%files -f e-smith-%{version}-filelist |
%files -f e-smith-%{version}-filelist |
895 |
%defattr(-,root,root) |
%defattr(-,root,root) |