2022-05-25 20:29:15 +03:00
%define base_version %(echo %{version} | rev | cut -d'.' -f2- | rev)
2020-08-07 06:17:52 +03:00
Summary: Rocket-fast system for log processing
Name: rsyslog
2023-12-02 04:42:59 +03:00
Version: 8.2308.0
2023-12-16 04:37:41 +03:00
Release: 2%{?dist}
2021-01-14 21:59:46 +03:00
License: GPLv3+ AND ASL 2.0
Vendor: Microsoft Corporation
Distribution: Mariner
Group: System Environment/Base
URL: https://www.rsyslog.com/
2022-05-25 20:29:15 +03:00
Source0: https://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
2020-08-07 06:17:52 +03:00
Source1: rsyslog.service
Source2: 50-rsyslog-journald.conf
Source3: rsyslog.conf
2022-05-25 20:29:15 +03:00
# Upstream only publishes built docs for base_version.0
Source4: https://www.rsyslog.com/files/download/rsyslog/%{name}-doc-%{base_version}.0.tar.gz
2022-10-19 01:20:52 +03:00
Source5: rsyslog.logrotate
2021-01-14 21:59:46 +03:00
BuildRequires: autogen
BuildRequires: curl-devel
BuildRequires: gnutls-devel
BuildRequires: krb5-devel
2020-08-07 06:17:52 +03:00
BuildRequires: libestr-devel
BuildRequires: libfastjson-devel
BuildRequires: libgcrypt-devel
2021-07-21 20:23:24 +03:00
BuildRequires: liblognorm-devel
BuildRequires: librdkafka-devel
2020-08-07 06:17:52 +03:00
BuildRequires: librelp-devel
2021-07-21 20:23:24 +03:00
BuildRequires: net-snmp-devel
BuildRequires: postgresql-devel
2021-01-14 21:59:46 +03:00
BuildRequires: systemd-devel
2021-07-21 20:23:24 +03:00
BuildRequires: zlib-devel
2020-08-07 06:17:52 +03:00
Requires: gnutls
Requires: libestr
Requires: libfastjson
Requires: libgcrypt
Requires: librelp
2021-01-14 21:59:46 +03:00
Requires: systemd
2022-09-13 21:33:30 +03:00
Requires(pre): shadow-utils
2021-07-21 20:23:24 +03:00
Provides: %{name}-crypto = %{version}-%{release}
Provides: %{name}-elasticsearch = %{version}-%{release}
2021-01-14 21:59:46 +03:00
Provides: %{name}-gnutls = %{version}-%{release}
Provides: %{name}-gssapi = %{version}-%{release}
2021-07-21 20:23:24 +03:00
Provides: %{name}-kafka = %{version}-%{release}
Provides: %{name}-mmaudit = %{version}-%{release}
Provides: %{name}-mmjsonparse = %{version}-%{release}
Provides: %{name}-mmkubernetes = %{version}-%{release}
Provides: %{name}-mmnormalize = %{version}-%{release}
Provides: %{name}-mmsnmptrapd = %{version}-%{release}
Provides: %{name}-pgsql = %{version}-%{release}
2021-01-14 21:59:46 +03:00
Provides: %{name}-relp = %{version}-%{release}
2021-07-21 20:23:24 +03:00
Provides: %{name}-snmp = %{version}-%{release}
2022-01-22 03:31:42 +03:00
Provides: syslog
2021-01-14 21:59:46 +03:00
2020-08-07 06:17:52 +03:00
%description
RSYSLOG is the rocket-fast system for log processing.
It offers high-performance, great security features and a modular design. While it started as a regular syslogd, rsyslog has evolved into a kind of swiss army knife of logging, being able to accept inputs from a wide variety of sources, transform them, and output to the results to diverse destinations.
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
%package doc
Summary: Documentation files for %{name}
BuildArch: noarch
%description doc
HTML documentation for %{name}
2020-08-07 06:17:52 +03:00
%prep
2021-07-21 20:23:24 +03:00
# Unpack the code source tarball
2020-08-07 06:17:52 +03:00
%setup -q
2021-07-21 20:23:24 +03:00
# Unpack the documentation tarball in the folder created above
%setup -q -a 4 -T -D
# Remove documentation sources
rm -rf sources
# Move prebuilt documentation files to a documentation folder
mv build docs
2020-08-07 06:17:52 +03:00
autoreconf -fvi
2021-01-14 21:59:46 +03:00
2020-08-07 06:17:52 +03:00
%build
sed -i 's/libsystemd-journal/libsystemd/' configure
2021-07-21 20:23:24 +03:00
%configure \
--disable-static \
--enable-elasticsearch \
2020-08-07 06:17:52 +03:00
--enable-gnutls\
2021-01-14 21:59:46 +03:00
--enable-gssapi-krb5 \
2020-08-07 06:17:52 +03:00
--enable-imfile \
--enable-imjournal \
2021-07-21 20:23:24 +03:00
--enable-imkafka \
2020-08-07 06:17:52 +03:00
--enable-impstats \
2021-01-14 21:59:46 +03:00
--enable-imptcp \
2021-07-21 20:23:24 +03:00
--enable-imptcp \
--enable-mail \
--enable-mmanon \
--enable-mmaudit \
--enable-mmcount \
--enable-mmjsonparse \
--enable-mmkubernetes \
--enable-mmnormalize \
--enable-mmsnmptrapd \
--enable-mmutf8fix \
--enable-omjournal \
--enable-omkafka \
--enable-omprog \
--enable-omstdout \
--enable-omuxsock \
--enable-pgsql \
--enable-pmaixforwardedfrom \
--enable-pmcisconames \
--enable-pmlastmsg \
--enable-pmsnare \
--enable-relp \
--enable-snmp \
--enable-unlimited-select \
--enable-usertools
2020-08-07 06:17:52 +03:00
2021-07-21 20:23:24 +03:00
%make_build
2020-08-07 06:17:52 +03:00
%install
2021-07-21 20:23:24 +03:00
%make_install
2020-08-07 06:17:52 +03:00
install -vd %{buildroot}%{_libdir}/systemd/system/
install -vd %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/
2021-07-21 20:23:24 +03:00
install -vd %{buildroot}%{_docdir}/%{name}/html
2021-09-21 00:32:26 +03:00
install -vdm 755 %{buildroot}/%{_sysconfdir}/rsyslog.d
2022-10-19 01:20:52 +03:00
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
2020-08-07 06:17:52 +03:00
rm -f %{buildroot}/lib/systemd/system/rsyslog.service
install -p -m 644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rsyslog.conf
2022-10-19 01:20:52 +03:00
install -p -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/rsyslog
2021-07-21 20:23:24 +03:00
cp -r docs/* %{buildroot}%{_docdir}/%{name}/html
2021-01-14 21:59:46 +03:00
find %{buildroot} -type f -name "*.la" -delete -print
2020-08-07 06:17:52 +03:00
%check
2021-07-21 20:23:24 +03:00
%make_build check
2020-08-07 06:17:52 +03:00
2022-09-13 21:33:30 +03:00
%pre
2023-12-16 04:37:41 +03:00
if [ $1 -eq 1 ]; then
if ! (getent passwd syslog >/dev/null); then
groupadd --system syslog
fi
if ! (getent passwd syslog >/dev/null); then
useradd --system --comment 'System Logging' --gid syslog --shell /bin/false syslog
fi
2022-09-13 21:33:30 +03:00
fi
2020-08-07 06:17:52 +03:00
%post
/sbin/ldconfig
%systemd_post rsyslog.service
%preun
%systemd_preun rsyslog.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart rsyslog.service
2023-12-16 04:37:41 +03:00
if [ $1 -eq 0 ]; then
if getent passwd syslog >/dev/null; then
userdel syslog
fi
if getent group syslog >/dev/null; then
groupdel syslog
fi
2022-09-13 21:33:30 +03:00
fi
2020-08-07 06:17:52 +03:00
%files
%defattr(-,root,root)
%license COPYING
2021-07-21 20:23:24 +03:00
%{_bindir}/rscryutil
2020-08-07 06:17:52 +03:00
%{_sbindir}/*
%{_libdir}/rsyslog/*.so
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_libdir}/systemd/system/rsyslog.service
%{_sysconfdir}/systemd/journald.conf.d/*
%{_sysconfdir}/rsyslog.conf
2021-09-21 00:32:26 +03:00
%dir %attr(0755, root, root) %{_sysconfdir}/rsyslog.d
2022-10-19 01:20:52 +03:00
%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog
2021-07-21 20:23:24 +03:00
%files doc
%doc %{_docdir}/%{name}/html
2020-08-07 06:17:52 +03:00
%changelog
2023-12-16 04:37:41 +03:00
* Thu Dec 14 2023 Neha Agarwal <nehaagarwal@microsoft.com> - 8.2308.0-2
- Fix resetting of passwd and group on package update
2023-12-02 04:42:59 +03:00
* Mon Nov 06 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 8.2308.0-1
- Auto-upgrade to 8.2308.0 - Azure Linux 3.0 - package upgrades
2022-10-19 01:20:52 +03:00
* Wed Oct 12 2022 Nan Liu <liunan@microsoft.com> - 8.2204.1-3
- Add rsyslog configuration file to /etc/logrotate.d
2022-09-13 21:33:30 +03:00
* Wed Jul 20 2022 Minghe Ren <mingheren@microsoft.com> - 8.2204.1-2
- Modify rsyslog.conf to improve security
- Add syslog user to own the log files
2022-05-25 20:29:15 +03:00
* Tue May 24 2022 Cameron Baird <cameronbaird@microsoft.com> - 8.2204.1-1
- Update to v8.2204.1 to address CVE-2022-24903
- Add more robust macro for Source4 url (prebuilt docs tar)
2022-04-13 01:44:13 +03:00
* Thu Apr 07 2022 Daniel McIlvaney <damcilva@microsoft.com> - 8.2108.0-2
- Bring rsyslog.conf in line with other distros
- add /var/log/messages for normal logs
- add /var/log/secure for auth and authpriv logs
- set file permissions to 640 for log files
2022-01-25 03:07:26 +03:00
* Mon Jan 24 2022 Neha Agarwal <nehaagarwal@microsoft.com> - 8.2108.0-1
- Update to version 8.2108.0.
2022-01-22 03:31:42 +03:00
* Wed Jan 19 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 8.37.0-8
- Added "Provides: syslog".
2021-09-21 00:32:26 +03:00
* Thu Sep 16 2021 Henry Beberman <henry.beberman@microsoft.com> - 8.37.0-7
- Add /etc/rsyslog.d directory.
2021-07-21 20:23:24 +03:00
* Mon Jul 19 2021 Thomas Crain <thcrain@microsoft.com> - 8.37.0-6
- Add html documentation subpackage from upstream-provided tarball
- Enable various features and add the corresponding provides for subpackages from other distros:
- crypto, elasticsearch, kafka, mmaudit, mmjson, mmkubernetes,
- mmnormalize, mmsnmptrapd, pgsql, snmp
- License verified
2021-01-14 21:59:46 +03:00
* Tue Jan 12 2021 Ruying Chen <v-ruyche@microsoft.com> - 8.37.0-5
- Build with gssapi, relp support and add explicit provides.
2021-07-21 20:23:24 +03:00
* Sat May 09 2020 Nick Samson <nisamson@microsoft.com> - 8.37.0-4
2020-08-07 06:17:52 +03:00
- Added %%license line automatically
2021-07-21 20:23:24 +03:00
* Thu Apr 09 2020 Nicolas Ontiveros <niontive@microsoft.com> - 8.37.0-3
- Remove liblogging from requires.
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> - 8.37.0-2
- Initial CBL-Mariner import from Photon (license: Apache2).
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Mon Sep 10 2018 Keerthana K <keerthanak@vmware.com> - 8.37.0-1
- Updated to version 8.37.0
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Thu Apr 12 2018 Xiaolin Li <xiaolinl@vmware.com> - 8.26.0-5
- Add $IncludeConfig /etc/rsyslog.d/ to rsyslog.conf
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Fri Dec 15 2017 Anish Swaminathan <anishs@vmware.com> - 8.26.0-4
- Remove kill SIGHUP from service file
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Mon Nov 13 2017 Xiaolin Li <xiaolinl@vmware.com> - 8.26.0-3
- Add a default rsyslog.conf.
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Tue Aug 15 2017 Dheeraj Shetty <dheerajs@vmware.com> - 8.26.0-2
- Fix CVE-2017-12588
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Mon Apr 24 2017 Siju Maliakkal <smaliakkal@vmware.com> - 8.26.0-1
- Update to latest
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Fri Nov 18 2016 Anish Swaminathan <anishs@vmware.com> - 8.15.0-7
- Change systemd dependency
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Wed Oct 05 2016 ChangLee <changlee@vmware.com> - 8.15.0-6
- Modified %check
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com> - 8.15.0-5
- Fixed logic to restart the active services after upgrade
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> - 8.15.0-4
- GA - Bump release of all rpms
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Wed May 4 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> - 8.15.0-3
- Use systemd macros for post, preun and postun to respect upgrades
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Wed Feb 17 2016 Anish Swaminathan <anishs@vmware.com> - 8.15.0-2
- Add journald conf and new service file.
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Mon Jan 11 2016 Xiaolin Li <xiaolinl@vmware.com> - 8.15.0-1
- Update rsyslog to 8.15.0
2021-01-14 21:59:46 +03:00
2021-07-21 20:23:24 +03:00
* Wed Jun 17 2015 Divya Thaluru <dthaluru@vmware.com> - 8.10.0-1
- Initial build. First version