Skip to content

Commit

Permalink
Use old service file for syslog-ng
Browse files Browse the repository at this point in the history
Change-Id: Id39cb7dad6395d8bc9fa57721b8fc568783f7e17
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3695
Tested-by: gerrit-photon <[email protected]>
Reviewed-by: Alexey Makhalov <[email protected]>
  • Loading branch information
DheerajSShetty authored and YustasSwamp committed Sep 8, 2017
1 parent 265aa32 commit 361254f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
16 changes: 16 additions & 0 deletions SPECS/syslog-ng/syslog-ng.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=System Logger Daemon
Documentation=man:syslog-ng(8)

[Service]
Type=notify
ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS
ExecReload=/bin/kill -HUP $MAINPID
EnvironmentFile=-/etc/default/syslog-ng
EnvironmentFile=-/etc/sysconfig/syslog-ng
StandardOutput=journal
StandardError=journal
Restart=on-failure

[Install]
WantedBy=multi-user.target
19 changes: 13 additions & 6 deletions SPECS/syslog-ng/syslog-ng.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Summary: Next generation system logger facilty
Name: syslog-ng
Version: 3.11.1
Release: 1%{?dist}
Release: 2%{?dist}
License: GPL + LGPL
URL: https://syslog-ng.org/
Group: System Environment/Daemons
Expand All @@ -12,11 +12,11 @@ Distribution: Photon
Source0: https://github.com/balabit/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
%define sha1 syslog-ng=81bb726c9823a3af9701a4297311e71f68050ccb
Source1: 60-syslog-ng-journald.conf
Source2: syslog-ng.service
Patch0: disable-pylint-test.patch
Requires: glib
Requires: json-glib
Requires: json-c
Requires: eventlog
Requires: systemd
BuildRequires: eventlog
BuildRequires: glib-devel
Expand All @@ -29,6 +29,7 @@ BuildRequires: python2-libs
%if %{with_check}
BuildRequires: curl-devel
%endif
Conflicts: eventlog

%description
The syslog-ng application is a flexible and highly scalable
Expand Down Expand Up @@ -119,15 +120,19 @@ make DESTDIR=%{buildroot} install
find %{buildroot} -name "*.la" -exec rm -f {} \;
rm %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc
rm %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a
rm %{buildroot}/%{_libdir}/systemd/system/[email protected]
rm -rf %{buildroot}/%{_infodir}
install -vd %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/
install -p -m 644 %{SOURCE2} %{buildroot}%{_libdir}/systemd/system/
%{_fixperms} %{buildroot}/*
pushd ../p3dir
make DESTDIR=%{buildroot} install
rm %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc
rm %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a
rm %{buildroot}/%{_libdir}/systemd/system/[email protected]
rm -rf %{buildroot}/%{_infodir}
sed -i 's/eventlog//g' %{buildroot}%{_libdir}/pkgconfig/syslog-ng.pc
find %{buildroot} -name "*.la" -exec rm -f {} \;
popd

Expand All @@ -154,13 +159,13 @@ popd
if [ $1 -eq 1 ] ; then
mkdir -p /usr/var/
fi
%systemd_post syslog-ng@\*.service
%systemd_post syslog-ng.service

%preun
%systemd_preun syslog-ng@\*.service
%systemd_preun syslog-ng.service

%postun
%systemd_postun_with_restart syslog-ng@\*.service
%systemd_postun_with_restart syslog-ng.service

%clean
rm -rf %{buildroot}/*
Expand All @@ -170,7 +175,7 @@ rm -rf %{buildroot}/*
%config(noreplace) %{_sysconfdir}/syslog-ng/syslog-ng.conf
%config(noreplace) %{_sysconfdir}/syslog-ng/scl.conf
%{_sysconfdir}/systemd/journald.conf.d/*
%{_libdir}/systemd/system/syslog-ng@.service
%{_libdir}/systemd/system/syslog-ng.service
%{_libdir}/systemd/system-preset/50-syslog-ng.preset
/usr/bin/*
/usr/sbin/syslog-ng
Expand Down Expand Up @@ -198,6 +203,8 @@ rm -rf %{buildroot}/*
%{_libdir}/pkgconfig/*

%changelog
* Mon Sep 04 2017 Dheeraj Shetty <[email protected]> 3.11.1-2
- Use old service file.
* Fri Aug 18 2017 Dheeraj Shetty <[email protected]> 3.11.1-1
- Update to version 3.11.1
* Thu Jun 29 2017 Divya Thaluru <[email protected]> 3.9.1-3
Expand Down
1 change: 0 additions & 1 deletion common/data/packages_full.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"httpd",
"openvswitch",
"openvswitch-doc",
"eventlog",
"syslog-ng",
"zookeeper",
"fuse",
Expand Down

0 comments on commit 361254f

Please sign in to comment.