annotate sm-archive.spec.in @ 25:a2d60f43590b stable-1-0-9

changes for rhel7 systemd and /var/run on tmpfs
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 Feb 2017 11:34:51 -0800
parents 7d599c9b7d65
children 9298f8b00db2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
45c8592d5d13 initial version
carl
parents:
diff changeset
1 %define localstatedir /var/lib
45c8592d5d13 initial version
carl
parents:
diff changeset
2
45c8592d5d13 initial version
carl
parents:
diff changeset
3 Summary: @PACKAGE@ Sendmail Milter
45c8592d5d13 initial version
carl
parents:
diff changeset
4 Name: @PACKAGE@
45c8592d5d13 initial version
carl
parents:
diff changeset
5 Version: @VERSION@
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
6 Release: 1%{?dist}
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
7 License: GPLv3+
1
45c8592d5d13 initial version
carl
parents:
diff changeset
8 Group: System Environment/Daemons
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
9 Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
10 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
11 URL: http://www.five-ten-sg.com/%{name}/
1
45c8592d5d13 initial version
carl
parents:
diff changeset
12
45c8592d5d13 initial version
carl
parents:
diff changeset
13 Requires(pre): /usr/sbin/useradd
45c8592d5d13 initial version
carl
parents:
diff changeset
14 Requires(pre): /usr/bin/getent
45c8592d5d13 initial version
carl
parents:
diff changeset
15 Requires(postun): /usr/sbin/userdel
45c8592d5d13 initial version
carl
parents:
diff changeset
16 Requires(post,preun): /sbin/chkconfig
45c8592d5d13 initial version
carl
parents:
diff changeset
17 Requires(post,preun): /sbin/service
45c8592d5d13 initial version
carl
parents:
diff changeset
18 BuildRequires: sendmail-devel >= 8.12.1
45c8592d5d13 initial version
carl
parents:
diff changeset
19 Requires: sendmail >= 8.12.1
45c8592d5d13 initial version
carl
parents:
diff changeset
20 Requires: sendmail-cf
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
21 %if "%{?dist}" == ".el7"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
22 Requires(pre): systemd-sysv, shadow-utils
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
23 Requires(post): systemd-units
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
24 Requires(preun): systemd-units
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
25 Requires(postun): systemd-units
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
26 Requires: coreutils
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
27 Requires: systemd-units
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
28 BuildRequires: systemd-units
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
29 %endif
1
45c8592d5d13 initial version
carl
parents:
diff changeset
30
45c8592d5d13 initial version
carl
parents:
diff changeset
31 %description
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
32 This milter adds recipient addresses to messages passing thru it, based
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
33 on a configuration file.
1
45c8592d5d13 initial version
carl
parents:
diff changeset
34
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
35 The sm-archive milter reads a text configuration file
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
36 (sm-archive.conf) on startup, and whenever the config file (or any of
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
37 the referenced include files) is changed. The entire configuration
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
38 file is case insensitive.
1
45c8592d5d13 initial version
carl
parents:
diff changeset
39
45c8592d5d13 initial version
carl
parents:
diff changeset
40
45c8592d5d13 initial version
carl
parents:
diff changeset
41 %prep
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
42 %setup -q
1
45c8592d5d13 initial version
carl
parents:
diff changeset
43
45c8592d5d13 initial version
carl
parents:
diff changeset
44
45c8592d5d13 initial version
carl
parents:
diff changeset
45 %build
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
46 %configure
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
47 make %{?_smp_mflags}
1
45c8592d5d13 initial version
carl
parents:
diff changeset
48
45c8592d5d13 initial version
carl
parents:
diff changeset
49 %install
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
50 rm -rf %{buildroot}
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
51 make DESTDIR=%{buildroot} install
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
52 %if "%{?dist}" == ".el7"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
53 install -m 644 -D %{buildroot}%{_sysconfdir}/%{name}/%{name}.service \
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
54 %{buildroot}%{_unitdir}/%{name}.service
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
55 install -m 755 -d %{buildroot}%{_prefix}/lib/tmpfiles.d
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
56 install -m 644 %{buildroot}%{_sysconfdir}/%{name}/%{name}-tmpfs.conf \
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
57 %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
58 %else
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
59 install -m 755 -D %{buildroot}%{_sysconfdir}/%{name}/%{name} \
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
60 %{buildroot}%{_initrddir}/%{name}
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
61 %endif
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
62 mkdir -p %{buildroot}/var/run/%{name}
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
63 rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
64 rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}.service
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
65 rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}-tmpfs.conf
1
45c8592d5d13 initial version
carl
parents:
diff changeset
66
45c8592d5d13 initial version
carl
parents:
diff changeset
67
45c8592d5d13 initial version
carl
parents:
diff changeset
68 %pre
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
69 /usr/bin/getent passwd sm-archive >/dev/null || useradd -r -d /etc/sm-archive -M -c "sm-archive pseudo-user" -s /sbin/nologin sm-archive >/dev/null
1
45c8592d5d13 initial version
carl
parents:
diff changeset
70
45c8592d5d13 initial version
carl
parents:
diff changeset
71
45c8592d5d13 initial version
carl
parents:
diff changeset
72 %post
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
73 if [ $1 = 1 ]; then
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
74 # initial install
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
75 %if "%{?dist}" == ".el7"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
76 /bin/systemctl daemon-reload &>/dev/null || :
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
77 %else
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
78 /sbin/chkconfig --add %{name}
24
7d599c9b7d65 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 23
diff changeset
79 %endif
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
80 echo Remember to edit %{_sysconfdir}/%{name}/%{name}.conf and add the following line to your sendmail.mc:
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
81 echo "INPUT_MAIL_FILTER(\`sm-archive', \`S=local:/var/run/sm-archive/sm-archive.sock, F=T, T=C:30s;S:5m;R:5m;E:5m')"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
82 echo
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
83 fi
1
45c8592d5d13 initial version
carl
parents:
diff changeset
84
45c8592d5d13 initial version
carl
parents:
diff changeset
85
45c8592d5d13 initial version
carl
parents:
diff changeset
86 %preun
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
87 if [ $1 = 0 ]; then
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
88 # package removal, not upgrade
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
89 %if "%{?dist}" == ".el7"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
90 /bin/systemctl --no-reload disable %{name}.service &>/dev/null || :
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
91 /bin/systemctl stop %{name}.service &>/dev/null || :
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
92 %else
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
93 /sbin/service %{name} stop || :
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
94 /sbin/chkconfig --del %{name}
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
95 %endif
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
96 fi
1
45c8592d5d13 initial version
carl
parents:
diff changeset
97
45c8592d5d13 initial version
carl
parents:
diff changeset
98
45c8592d5d13 initial version
carl
parents:
diff changeset
99 %postun
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
100 if [ $1 -ge 1 ]; then
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
101 # package upgrade, not uninstall
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
102 %if "%{?dist}" == ".el7"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
103 /bin/systemctl try-restart %{name}.service &>/dev/null || :
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
104 %else
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
105 /sbin/service %{name} restart || :
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
106 %endif
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
107 fi
1
45c8592d5d13 initial version
carl
parents:
diff changeset
108
45c8592d5d13 initial version
carl
parents:
diff changeset
109
45c8592d5d13 initial version
carl
parents:
diff changeset
110 %clean
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
111 rm -rf %{buildroot}
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
112
1
45c8592d5d13 initial version
carl
parents:
diff changeset
113
45c8592d5d13 initial version
carl
parents:
diff changeset
114 %files
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
115 %defattr(-,root,root,-)
1
45c8592d5d13 initial version
carl
parents:
diff changeset
116 %{_sbindir}/*
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
117 %{_mandir}/man1/*
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
118 %{_mandir}/man5/*
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
119 %docdir %{_datadir}/doc/%{name}-%{version}
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
120 %{_datadir}/doc/%{name}-%{version}
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
121 %config(noreplace) %attr(0750,%{name},root) %{_sysconfdir}/%{name}
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
122 %if "%{?dist}" == ".el7"
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
123 %{_prefix}/lib/tmpfiles.d/%{name}.conf
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
124 %{_unitdir}/%{name}.service
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
125 %else
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
126 %{_initrddir}/%{name}
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
127 %endif
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
128 %dir %attr(0750,%{name},root) /var/run/%{name}
1
45c8592d5d13 initial version
carl
parents:
diff changeset
129
45c8592d5d13 initial version
carl
parents:
diff changeset
130
45c8592d5d13 initial version
carl
parents:
diff changeset
131 %changelog
23
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
132 * Mon Feb 06 2017 Carl Byington <carl@five-ten-sg.com> - 1.9-1
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
133 - enable rhel7 systemd and /var/run is on tmpfs
37793d4c90a0 changes for rhel7 systemd and /var/run on tmpfs
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
134
21
09564d4acd9e patches from Marco d'Itri for postfix
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
135 * Fri Dec 24 2010 Carl Byington <carl@five-ten-sg.com> - 1.8-1
09564d4acd9e patches from Marco d'Itri for postfix
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
136 - patches from Marco d'Itri for postfix
09564d4acd9e patches from Marco d'Itri for postfix
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
137
19
b24369330483 Fedora 9 compile and const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 17
diff changeset
138 * Thu Jun 12 2008 Carl Byington <carl@five-ten-sg.com> - 1.7-1
b24369330483 Fedora 9 compile and const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 17
diff changeset
139 - Fedora 9 compile and const correctness.
b24369330483 Fedora 9 compile and const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 17
diff changeset
140
b24369330483 Fedora 9 compile and const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 17
diff changeset
141 * Fri Mar 21 2008 Carl Byington <carl@five-ten-sg.com> - 1.6-1
17
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
142 - changes for Fedora packaging guidelines
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
143
8ebecad6530f Add src/daemon* missing from source control.
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
144 * Fri Mar 10 2006 Carl Byington <carl@five-ten-sg.com> -1.0
1
45c8592d5d13 initial version
carl
parents:
diff changeset
145 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html