Browse code

Adding syslog and eventlog packages.

Vinay Kulkarni authored on 2015/06/11 08:02:45
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,60 @@
0
+Summary:	Syslog event logger library
1
+Name:		eventlog
2
+Version:	0.2.12
3
+Release:	1%{?dist}
4
+License:	GPL
5
+URL:		https://www.balabit.com
6
+Group:		System Environment/Daemons
7
+Vendor:		VMware, Inc.
8
+Distribution: 	Photon
9
+Source0:	https://www.balabit.com/downloads/files/eventlog/0.2/eventlog_0.2.12.tar.gz
10
+BuildRequires:	bison
11
+BuildRequires:	flex
12
+
13
+%description
14
+The EventLog library aims to be a replacement of the simple syslog() API
15
+provided on UNIX systems. The major difference between EventLog and syslog
16
+is that EventLog tries to add structure to messages.
17
+
18
+EventLog provides an interface to build, format and output an event record.
19
+The exact format and output method can be customized by the administrator
20
+via a configuration file.
21
+
22
+This package is the runtime part of the library.
23
+
24
+%prep
25
+%setup -q
26
+
27
+%build
28
+./configure \
29
+	CFLAGS="%{optflags}" \
30
+	CXXFLAGS="%{optflags}" \
31
+	--disable-silent-rules \
32
+	--prefix=%{_prefix} \
33
+	--bindir=%{_bindir} \
34
+	--libdir=%{_libdir} \
35
+	--sysconfdir=/etc
36
+make %{?_smp_mflags}
37
+
38
+%install
39
+%makeinstall
40
+
41
+%check
42
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
43
+
44
+%clean
45
+rm -rf %{buildroot}/*
46
+
47
+%files
48
+%defattr(-,root,root)
49
+%{_includedir}/eventlog/*.h
50
+%{_libdir}/*.a
51
+%{_libdir}/*.la
52
+%{_libdir}/*.so
53
+%{_libdir}/*.so.*
54
+%{_libdir}/pkgconfig/eventlog.pc
55
+
56
+%changelog
57
+*	Fri Jun 5 2015 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.12-1
58
+-	Add eventlog library for syslog-ng to photon
59
+
0 60
new file mode 100644
... ...
@@ -0,0 +1,104 @@
0
+Summary:	Next generation system logger facilty
1
+Name:		syslog-ng
2
+Version:	3.6.2
3
+Release:	1%{dist}
4
+License:	GPL + LGPL
5
+URL:		https://www.balabit.com/network-security/syslog-ng/opensource-logging-system
6
+Group:		System Environment/Daemons
7
+Vendor:		VMware, Inc.
8
+Distribution: 	Photon
9
+Source0:	http://my.balabit.com/downloads/syslog-ng/open-source-edition/3.6.2/source/syslog-ng_3.6.2.tar.gz
10
+Requires:	glib
11
+Requires:	python2
12
+BuildRequires:	eventlog
13
+BuildRequires:	glib-devel
14
+BuildRequires:	python2-libs
15
+BuildRequires:	python2-devel
16
+
17
+%description
18
+ The syslog-ng application is a flexible and highly scalable
19
+ system logging tool. It is often used to manage log messages and implement
20
+ centralized logging, where the aim is to collect the log messages of several
21
+ devices to a single, central log server.
22
+
23
+%prep
24
+%setup -q
25
+%build
26
+./configure \
27
+	CFLAGS="%{optflags}" \
28
+	CXXFLAGS="%{optflags}" \
29
+	--disable-silent-rules \
30
+	--prefix=%{_prefix} \
31
+	--bindir=%{_bindir} \
32
+	--libdir=%{_libdir} \
33
+	--sysconfdir=/etc/syslog-ng \
34
+        PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
35
+make %{?_smp_mflags}
36
+
37
+%install
38
+[ %{buildroot} != "/"] && rm -rf %{buildroot}/*
39
+make DESTDIR=%{buildroot} install
40
+mkdir -p %{buildroot}/etc/systemd/system/
41
+cat << EOF >> %{buildroot}/etc/systemd/system/syslog-ng.service
42
+[Unit]
43
+Description=Next generation system logger facility
44
+
45
+[Service]
46
+Type=forking
47
+ExecStart=/usr/sbin/syslog-ng
48
+
49
+[Install]
50
+WantedBy=multi-user.target
51
+EOF
52
+
53
+find %{buildroot} -name "*.la" -exec rm -f {} \;
54
+rm %{buildroot}/%{_libdir}/pkgconfig/syslog-ng-test.pc
55
+rm %{buildroot}/%{_libdir}/syslog-ng/libtest/libsyslog-ng-test.a
56
+rm -rf %{buildroot}/%{_infodir}
57
+
58
+%{_fixperms} %{buildroot}/*
59
+
60
+%check
61
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
62
+
63
+%post
64
+mkdir -p /usr/var/
65
+/bin/systemctl enable syslog-ng
66
+
67
+%postun
68
+/bin/systemctl disable syslog-ng
69
+
70
+%clean
71
+rm -rf %{buildroot}/*
72
+
73
+%files
74
+%defattr(-,root,root)
75
+#TODO - clean this up. split header files into -devel package
76
+/etc/*
77
+/usr/bin/*
78
+/usr/include/syslog-ng/*.h
79
+/usr/include/syslog-ng/compat/*.h
80
+/usr/include/syslog-ng/control/*.h
81
+/usr/include/syslog-ng/filter/*.h
82
+/usr/include/syslog-ng/ivykis/*.h
83
+/usr/include/syslog-ng/libtest/*.h
84
+/usr/include/syslog-ng/logproto/*.h
85
+/usr/include/syslog-ng/parser/*.h
86
+/usr/include/syslog-ng/rewrite/*.h
87
+/usr/include/syslog-ng/stats/*.h
88
+/usr/include/syslog-ng/template/*.h
89
+/usr/include/syslog-ng/transport/*.h
90
+/usr/lib/libsyslog-ng*
91
+/usr/lib/pkgconfig/syslog-ng.pc
92
+/usr/lib/syslog-ng/*.so
93
+/usr/sbin/syslog-ng
94
+/usr/sbin/syslog-ng-ctl
95
+/usr/share/include/scl/*
96
+/usr/share/man/*
97
+/usr/share/tools/*
98
+/usr/share/xsd/*
99
+
100
+%changelog
101
+*	Thu Jun 4 2015 Vinay Kulkarni <kulkarniv@vmware.com> 3.6.2-1
102
+-	Add syslog-ng support to photon.
103
+
... ...
@@ -67,7 +67,7 @@
67 67
                 "libaio","libaio-devel","thin-provisioning-tools","lvm2","lvm2-devel","lvm2-libs","lvm2-python-libs","lzo","lzo-devel","lzo-minilzo","swig",
68 68
                 "rpm-devel","pycurl","urlgrabber","yum-metadata-parser","yum", "rocket", "strace", "cracklib-python",
69 69
                 "haveged", "haveged-devel",
70
-		"postgresql", "openjdk", "apr", "apr-util", "httpd", "openvswitch"]
70
+		"postgresql", "openjdk", "apr", "apr-util", "httpd", "openvswitch", "eventlog", "syslog-ng" ]
71 71
 }
72 72
 
73 73