rebuild to fix linking to installed library [release 3.35.1-3mamba;Fri Nov 26 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 18:17:57 +01:00
parent f331a17187
commit c2741f1a21

View File

@ -1,15 +1,16 @@
%define majorminor %(echo %version | cut -d. -f 1-2)
Name: syslog-ng
Version: 3.6.4
Release: 1mamba
Version: 3.35.1
Release: 3mamba
Summary: A syslogd replacement with new functionality
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://freshmeat.net/projects/syslog-ng/
Source: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/syslog-ng_%{version}.tar.gz
URL: https://github.com/syslog-ng/syslog-ng
Source: https://github.com/balabit/syslog-ng.git/syslog-ng-%{version}/syslog-ng-%{version}.tar.bz2
#Source: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/syslog-ng_%{version}.tar.gz
Source1: syslog-ng.init
Source2: syslog-ng.conf
Source3: syslog-ng.logrotate
@ -20,31 +21,46 @@ Patch2: syslog-ng-3.5.4.1-libjson-c-0.12.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libGeoIP-devel
BuildRequires: libbrotli-devel
BuildRequires: libcap-devel
BuildRequires: libcares-devel
BuildRequires: libcurl-devel
BuildRequires: libdbi-devel
BuildRequires: libe2fs-devel
BuildRequires: libesmtp-devel
BuildRequires: libeventlog-devel
BuildRequires: libgcrypt-devel
BuildRequires: libglib-devel
BuildRequires: libgpg-error-devel
BuildRequires: libgsasl-devel
BuildRequires: libgss-devel
BuildRequires: libhiredis-devel
BuildRequires: libidn-devel
BuildRequires: libidn2-devel
BuildRequires: libivykis-devel
BuildRequires: libjson-c-devel
BuildRequires: liblzma-devel
BuildRequires: libkrb5-devel
BuildRequires: libmaxminddb-devel
BuildRequires: libnet-devel
BuildRequires: libnghttp2-devel
BuildRequires: libntlm-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel
BuildRequires: libpcre-devel
BuildRequires: libpsl-devel
BuildRequires: libpython39-devel
BuildRequires: librtmp-devel
BuildRequires: libsasl2-devel
BuildRequires: libssh2-devel
BuildRequires: libsystemd-devel
BuildRequires: libuuid-devel
BuildRequires: libunistring-devel
BuildRequires: libwrap-devel
BuildRequires: perl-devel
BuildRequires: libz-devel
BuildRequires: libzstd-devel
## AUTOBUILDREQ-END
BuildRequires: libol-devel >= 0.3.17
BuildRequires: libjson-c-devel >= 0.12
Obsoletes: sysklogd
Provides: sysklogd = %{version}
BuildRequires: libnet-devel >= 1.2
BuildRequires: libesmtp-devel >= 1.1.0
Provides: sysklogd
Obsoletes: sysklogd < 3.35.1
Requires: libsyslog-ng = %{?epoch:%epoch:}%{version}-%{release}
Requires: libcap >= 2.22
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
syslog-ng, as the name shows, is a syslogd replacement, but with new functionality for the new generation.
@ -61,8 +77,7 @@ syslog-ng, as the name shows, is a syslogd replacement, but with new functionali
The original syslogd allows messages only to be sorted based on priority/facility pairs; syslog-ng adds the possibility to filter based on message contents using regular expressions.
The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it ideal for firewalled environments.
This package contains static libraries and header files need for development.
This package contains static libraries and header files needed for development.
%package -n libsyslog-ng-devel
Summary: Devel package for libsyslog-ng
@ -74,24 +89,39 @@ syslog-ng, as the name shows, is a syslogd replacement, but with new functionali
The original syslogd allows messages only to be sorted based on priority/facility pairs; syslog-ng adds the possibility to filter based on message contents using regular expressions.
The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it ideal for firewalled environments.
This package contains static libraries and header files needed for development.
This package contains static libraries and header files need for development.
%debug_package
%prep
%setup -q
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#-D -T
#:<< _EOF
sed -i -e 's,/bin/,/usr/bin/,' -e 's,/sbin/,/bin/,' contrib/systemd/syslog-ng@.service
sed -i -e 's|/var/run|/run|g' contrib/systemd/syslog-ng@default
./autogen.sh
%build
#:<< _EOF
%configure \
--sysconfdir=%{_sysconfdir}/syslog-ng \
--with-module-dir=%{_libdir}/syslog-ng \
--enable-systemd \
--with-pidfile-dir=/run \
--disable-java \
--enable-spoof-source \
--enable-ipv6 \
--enable-tcp-wrapper \
--disable-dependency-tracking \
--enable-dynamic-linking \
--enable-systemd
--with-systemdsystemunitdir=%{_unitdir} \
--enable-manpages \
--disable-java-modules \
--disable-mqtt \
--disable-riemann \
--with-python=3 \
--with-ivykis=system \
--with-jsonc=system
# --enable-all-modules \
%make
@ -99,23 +129,22 @@ This package contains static libraries and header files need for development.
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall
#install -D -m0750 %{S:1} %{buildroot}%{_initrddir}/syslog-ng
install -D -m0644 %{S:2} \
%{buildroot}%{_sysconfdir}/syslog-ng/syslog-ng.conf
#install -D -m0644 %{S:2} \
# %{buildroot}%{_sysconfdir}/syslog-ng/syslog-ng.conf
install -D -m0644 %{S:3} \
%{buildroot}%{_sysconfdir}/logrotate.d/syslog-ng
install -D -m0644 %{S:4} \
%{buildroot}%{_sysconfdir}/sysconfig/syslog-ng
#install -D -m0644 %{S:4} \
# %{buildroot}%{_sysconfdir}/sysconfig/syslog-ng
install -d %{buildroot}/var/log
> %{buildroot}/var/log/cron
> %{buildroot}/var/log/daemons
> %{buildroot}/var/log/kernel
> %{buildroot}/var/log/lpr
> %{buildroot}/var/log/mail
> %{buildroot}/var/log/news
install -d %{buildroot}/var/lib/syslog-ng
#install -D -m0644 contrib/systemd/syslog-ng@.service %{buildroot}%{_unitdir}/syslog-ng@.service
install -D -m0644 contrib/systemd/syslog-ng@default %{buildroot}%{_sysconfdir}/sysconfig/syslog-ng@default
#sed -i "s|/var/run|/run|" %{buildroot}%{_sysconfdir}/sysconfig/syslog-ng@default
#install -D -m0644 packaging/rhel/syslog-ng.conf %{buildroot}%{_sysconfdir}/syslog-ng/syslog-ng.conf
install -D -m0644 contrib/systemd/syslog-ng.service %{buildroot}/lib/systemd/system/syslog-ng.service
# FIXME: linked to system installed libsyslog library
rm -f %{buildroot}%{_libdir}/syslog-ng/libafsnmp.so
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -125,43 +154,25 @@ install -D -m0644 contrib/systemd/syslog-ng.service %{buildroot}/lib/systemd/sys
for i in /var/log/{kernel,cron,lpr,news,daemons,mail}; do
[ -d $i ] && mv $i $i.old
done
exit 0
:
%post
if [ $1 -eq 1 ]; then
# new install
chkconfig --add syslog-ng
service syslog-ng start
systemctl daemon-reload -q
systemctl enable syslog-ng.service -q
fi
if [ $1 -gt 1 ]; then
# replace unix-stream ("/dev/log") with unix-dgram for systemd
sed -i "s|long_hostnames|chain_hostnames|" %{_sysconfdir}/syslog-ng/syslog-ng.conf
sed -i "s|Version: .*|Version: 3.4|" %{_sysconfdir}/syslog-ng/syslog-ng.conf
sed -i "s|unix-stream|unix-dgram|" %{_sysconfdir}/syslog-ng/syslog-ng.conf
fi
exit 0
%systemd_post syslog-ng@default
:
%preun
if [ $1 -eq 0 ]; then
# erase
service syslog-ng stop
chkconfig --del syslog-ng
systemctl disable syslog-ng.service -q
fi
exit 0
%systemd_preun syslog-ng@default
:
%postun
if [ $1 -eq 1 ]; then
# upgrade
systemctl daemon-reload -q
service syslog-ng restart
fi
if [ $1 -eq 0 ]; then
systemctl daemon-reload -q
fi
exit 0
%systemd_postun_with_restart syslog-ng@default
:
%post -n libsyslog-ng -p /sbin/ldconfig
%postun -n libsyslog-ng -p /sbin/ldconfig
@ -178,25 +189,49 @@ find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
#%{_sysconfdir}/syslog-ng/modules.conf
%{_sysconfdir}/syslog-ng/scl.conf
%config %{_sysconfdir}/syslog-ng/syslog-ng.conf
%config(noreplace) %{_sysconfdir}/sysconfig/syslog-ng
%config(noreplace) %{_sysconfdir}/sysconfig/syslog-ng@default
%{_sbindir}/syslog-ng
%{_sbindir}/syslog-ng-ctl
%{_bindir}/dqtool
%{_bindir}/loggen
%{_bindir}/pdbtool
%{_bindir}/persist-tool
%{_bindir}/slogencrypt
%{_bindir}/slogkey
%{_bindir}/slogverify
%{_bindir}/update-patterndb
/lib/systemd/system/syslog-ng.service
%ghost /var/log/cron
%ghost /var/log/daemons
%ghost /var/log/kernel
%ghost /var/log/lpr
%ghost /var/log/mail
%ghost /var/log/news
%{_datadir}/include/scl
%{_datadir}/tools/system-expand
%{_sbindir}/syslog-ng-debun
%{_unitdir}/syslog-ng@.service
%dir %{_datadir}/syslog-ng
%dir %{_datadir}/syslog-ng/include
%dir %{_datadir}/syslog-ng/include/scl
%{_datadir}/syslog-ng/include/scl/*
%dir %{_datadir}/syslog-ng/tools
%{_datadir}/syslog-ng/tools/*
%dir %{_datadir}/syslog-ng/xsd
%{_datadir}/syslog-ng/xsd/*
%{_mandir}/man1/dqtool.1*
%{_mandir}/man1/loggen.1*
%{_mandir}/man1/pdbtool.1*
%{_mandir}/man1/persist-tool.1*
%{_mandir}/man1/slogencrypt.1*
%{_mandir}/man1/slogkey.1*
%{_mandir}/man1/slogverify.1*
%{_mandir}/man1/syslog-ng-ctl.1*
%{_mandir}/man1/syslog-ng-debun.1*
%{_mandir}/man5/syslog-ng.conf.5*
%{_mandir}/man7/secure-logging.7*
%{_mandir}/man8/syslog-ng.8*
%dir /var/log
%dir /var/lib/syslog-ng
%files -n libsyslog-ng
%defattr(-,root,root)
%{_libdir}/libsyslog-ng-*.so.*
%{_libdir}/libevtlog-*.so.*
%{_libdir}/libloggen_helper-*.so.*
%{_libdir}/libloggen_plugin-*.so.*
%{_libdir}/libsecret-storage.so.*
%dir %{_libdir}/syslog-ng
%{_libdir}/syslog-ng/*
%doc AUTHORS COPYING
@ -207,14 +242,50 @@ find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
%{_includedir}/syslog-ng/*
%{_libdir}/libsyslog-ng.la
%{_libdir}/libsyslog-ng.so
%{_datadir}/tools/cfg-grammar.y
%{_datadir}/tools/lex-rules.am
%{_datadir}/tools/merge-grammar.pl
%{_libdir}/libevtlog.la
%{_libdir}/libevtlog.so
%{_libdir}/libloggen_helper.la
%{_libdir}/libloggen_helper.so
%{_libdir}/libloggen_plugin.la
%{_libdir}/libloggen_plugin.so
%{_libdir}/libsecret-storage.la
%{_libdir}/libsecret-storage.so
%{_libdir}/libsyslog-ng-native-connector.a
%{_libdir}/pkgconfig/syslog-ng-native-connector.pc
%{_libdir}/pkgconfig/syslog-ng.pc
%{_libdir}/pkgconfig/syslog-ng-test.pc
#%doc NEWS
%doc README.md NEWS.md
%changelog
* Fri Nov 26 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.35.1-3mamba
- rebuild to fix linking to installed library
* Fri Nov 26 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.35.1-2mamba
- rebuilt with libnet 1.2
* Thu Nov 18 2021 Automatic Build System <autodist@mambasoft.it> 3.35.1-1mamba
- automatic version update by autodist
* Sun Sep 12 2021 Automatic Build System <autodist@mambasoft.it> 3.34.1-1mamba
- automatic version update by autodist
* Tue Jul 20 2021 Automatic Build System <autodist@mambasoft.it> 3.33.2-1mamba
- automatic version update by autodist
* Sat Jul 17 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.33.1-1mamba
- update to 3.33.1
* Mon May 10 2021 Automatic Build System <autodist@mambasoft.it> 3.32.1-1mamba
- automatic version update by autodist
* Sun Mar 21 2021 Automatic Build System <autodist@mambasoft.it> 3.31.2-1mamba
- automatic version update by autodist
* Sat Mar 06 2021 Automatic Build System <autodist@mambasoft.it> 3.31.1-1mamba
- automatic version update by autodist
* Sat Feb 27 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.30.1-1mamba
- update to 3.30.1
* Sun Oct 30 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 3.6.4-1mamba
- update to 3.6.4
- install binaries from /sbin to /usr/sbin
@ -305,7 +376,7 @@ find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
* Sun Mar 18 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.2-1qilnx
- update to version 2.0.2 by autospec
* Tue Oct 05 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.6.11-4qilnx
* Thu Oct 05 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.6.11-4qilnx
- removed syslog configurations for cron (conflicts with vixie-cron settings)
* Fri Jul 14 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.6.11-3qilnx