Change-Id: Id39cb7dad6395d8bc9fa57721b8fc568783f7e17
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3695
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
0 |
+[Unit] |
|
1 |
+Description=System Logger Daemon |
|
2 |
+Documentation=man:syslog-ng(8) |
|
3 |
+ |
|
4 |
+[Service] |
|
5 |
+Type=notify |
|
6 |
+ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS |
|
7 |
+ExecReload=/bin/kill -HUP $MAINPID |
|
8 |
+EnvironmentFile=-/etc/default/syslog-ng |
|
9 |
+EnvironmentFile=-/etc/sysconfig/syslog-ng |
|
10 |
+StandardOutput=journal |
|
11 |
+StandardError=journal |
|
12 |
+Restart=on-failure |
|
13 |
+ |
|
14 |
+[Install] |
|
15 |
+WantedBy=multi-user.target |
... | ... |
@@ -3,7 +3,7 @@ |
3 | 3 |
Summary: Next generation system logger facilty |
4 | 4 |
Name: syslog-ng |
5 | 5 |
Version: 3.11.1 |
6 |
-Release: 1%{?dist} |
|
6 |
+Release: 2%{?dist} |
|
7 | 7 |
License: GPL + LGPL |
8 | 8 |
URL: https://syslog-ng.org/ |
9 | 9 |
Group: System Environment/Daemons |
... | ... |
@@ -12,11 +12,11 @@ Distribution: Photon |
12 | 12 |
Source0: https://github.com/balabit/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz |
13 | 13 |
%define sha1 syslog-ng=81bb726c9823a3af9701a4297311e71f68050ccb |
14 | 14 |
Source1: 60-syslog-ng-journald.conf |
15 |
+Source2: syslog-ng.service |
|
15 | 16 |
Patch0: disable-pylint-test.patch |
16 | 17 |
Requires: glib |
17 | 18 |
Requires: json-glib |
18 | 19 |
Requires: json-c |
19 |
-Requires: eventlog |
|
20 | 20 |
Requires: systemd |
21 | 21 |
BuildRequires: eventlog |
22 | 22 |
BuildRequires: glib-devel |
... | ... |
@@ -29,6 +29,7 @@ BuildRequires: python2-libs |
29 | 29 |
%if %{with_check} |
30 | 30 |
BuildRequires: curl-devel |
31 | 31 |
%endif |
32 |
+Conflicts: eventlog |
|
32 | 33 |
|
33 | 34 |
%description |
34 | 35 |
The syslog-ng application is a flexible and highly scalable |
... | ... |
@@ -119,15 +120,19 @@ make DESTDIR=%{buildroot} install |
119 | 119 |
find %{buildroot} -name "*.la" -exec rm -f {} \; |
120 | 120 |
rm %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc |
121 | 121 |
rm %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a |
122 |
+rm %{buildroot}/%{_libdir}/systemd/system/syslog-ng@.service |
|
122 | 123 |
rm -rf %{buildroot}/%{_infodir} |
123 | 124 |
install -vd %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/ |
124 | 125 |
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/ |
126 |
+install -p -m 644 %{SOURCE2} %{buildroot}%{_libdir}/systemd/system/ |
|
125 | 127 |
%{_fixperms} %{buildroot}/* |
126 | 128 |
pushd ../p3dir |
127 | 129 |
make DESTDIR=%{buildroot} install |
128 | 130 |
rm %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc |
129 | 131 |
rm %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a |
132 |
+rm %{buildroot}/%{_libdir}/systemd/system/syslog-ng@.service |
|
130 | 133 |
rm -rf %{buildroot}/%{_infodir} |
134 |
+sed -i 's/eventlog//g' %{buildroot}%{_libdir}/pkgconfig/syslog-ng.pc |
|
131 | 135 |
find %{buildroot} -name "*.la" -exec rm -f {} \; |
132 | 136 |
popd |
133 | 137 |
|
... | ... |
@@ -154,13 +159,13 @@ popd |
154 | 154 |
if [ $1 -eq 1 ] ; then |
155 | 155 |
mkdir -p /usr/var/ |
156 | 156 |
fi |
157 |
-%systemd_post syslog-ng@\*.service |
|
157 |
+%systemd_post syslog-ng.service |
|
158 | 158 |
|
159 | 159 |
%preun |
160 |
-%systemd_preun syslog-ng@\*.service |
|
160 |
+%systemd_preun syslog-ng.service |
|
161 | 161 |
|
162 | 162 |
%postun |
163 |
-%systemd_postun_with_restart syslog-ng@\*.service |
|
163 |
+%systemd_postun_with_restart syslog-ng.service |
|
164 | 164 |
|
165 | 165 |
%clean |
166 | 166 |
rm -rf %{buildroot}/* |
... | ... |
@@ -170,7 +175,7 @@ rm -rf %{buildroot}/* |
170 | 170 |
%config(noreplace) %{_sysconfdir}/syslog-ng/syslog-ng.conf |
171 | 171 |
%config(noreplace) %{_sysconfdir}/syslog-ng/scl.conf |
172 | 172 |
%{_sysconfdir}/systemd/journald.conf.d/* |
173 |
-%{_libdir}/systemd/system/syslog-ng@.service |
|
173 |
+%{_libdir}/systemd/system/syslog-ng.service |
|
174 | 174 |
%{_libdir}/systemd/system-preset/50-syslog-ng.preset |
175 | 175 |
/usr/bin/* |
176 | 176 |
/usr/sbin/syslog-ng |
... | ... |
@@ -198,6 +203,8 @@ rm -rf %{buildroot}/* |
198 | 198 |
%{_libdir}/pkgconfig/* |
199 | 199 |
|
200 | 200 |
%changelog |
201 |
+* Mon Sep 04 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.11.1-2 |
|
202 |
+- Use old service file. |
|
201 | 203 |
* Fri Aug 18 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.11.1-1 |
202 | 204 |
- Update to version 3.11.1 |
203 | 205 |
* Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com> 3.9.1-3 |