14 Star 0 Fork 9

ocs-commit/rsyslog

forked from OpenCloudOS Stream/rsyslog 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rsyslog.spec 12.12 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2024-12-25 16:39 . - Apply patches from rpm-tracker
%bcond_with kafka
%bcond_with mmkubernetes
%bcond_with mmnormalize
%bcond_with relp
Summary: Enhanced system logging and kernel message trapping daemon
Name: rsyslog
Version: 8.2312.0
Release: 4%{?dist}
License: (GPLv3+ and ASL 2.0)
URL: http://www.rsyslog.com/
Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
Source1: rsyslog.conf
Source2: rsyslog.sysconfig
Source3: rsyslog.log
Source4: rsyslog.service
Patch0001: https://github.com/rsyslog/rsyslog/commit/8d7392d391837bde0b5783428eb2c1dfdf19c1bc.patch
Patch0002: https://github.com/rsyslog/rsyslog/commit/ec3ddc61c5fffd5d3762520338ea0e8d813c5b4b.patch
BuildRequires: gcc, autoconf, automake, libtool
BuildRequires: bison, dos2unix, flex, python-docutils
BuildRequires: libgcrypt-devel, libfastjson-devel >= 0.99.8, libestr-devel >= 0.1.9, systemd-devel >= 204-8
BuildRequires: libuuid-devel, pkgconfig, zlib-devel, libcurl-devel
Recommends: %{name}-logrotate = %version-%release
Requires: bash >= 2.0
%{?systemd_ordering}
Provides: syslog
%package logrotate
Summary: Log rotation for rsyslog
Requires: %name = %version-%release
Requires: logrotate >= 3.5.2
%package crypto
Summary: Encryption support
Requires: %name = %version-%release
%package elasticsearch
Summary: ElasticSearch output module for rsyslog
Requires: %name = %version-%release
BuildRequires: libcurl-devel
%package mmjsonparse
Summary: JSON enhanced logging support
Requires: %name = %version-%release
%if %{with mmnormalize}
%package mmnormalize
Summary: Log normalization support for rsyslog
Requires: %name = %version-%release
BuildRequires: libestr-devel liblognorm-devel >= 1.0.2
%endif
%package mmaudit
Summary: Message modification module supporting Linux audit format
Requires: %name = %version-%release
%package mmfields
Summary: Fields extraction module
Requires: %name = %version-%release
%package mysql
Summary: MySQL support for rsyslog
Requires: %name = %version-%release
BuildRequires: mariadb-connector-c-devel
%package pgsql
Summary: PostgresSQL support for rsyslog
Requires: %name = %version-%release
BuildRequires: libpq-devel
%package gssapi
Summary: GSSAPI authentication and encryption support for rsyslog
Requires: %name = %version-%release
BuildRequires: krb5-devel
%if %{with relp}
%package relp
Summary: RELP protocol support for rsyslog
Requires: %name = %version-%release
BuildRequires: librelp-devel >= 1.2.16
%endif
%package gnutls
Summary: TLS protocol support for rsyslog via GnuTLS library
Requires: %name = %version-%release
BuildRequires: gnutls-devel
%package openssl
Summary: TLS protocol support for rsyslog via OpenSSL library
Group: System Environment/Daemons
Requires: %name = %version-%release
BuildRequires: openssl-devel
%package snmp
Summary: SNMP protocol support for rsyslog
Requires: %name = %version-%release
BuildRequires: net-snmp-devel
%if %{with kafka}
%package kafka
Summary: Provides the omkafka module
Requires: %name = %version-%release
BuildRequires: librdkafka-devel
%endif
%if %{with mmkubernetes}
%package mmkubernetes
Summary: Provides the mmkubernetes module
Requires: %name = %version-%release
BuildRequires: libcurl-devel
%endif
%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.
%description logrotate
This package contains the default logrotate configuration for rsyslog.
%description crypto
This package provides a dynamic library of log file encryption and tools to
process them.
%description elasticsearch
This package provides a dynamic library of putting logs into Elasticsearch.
%description mmjsonparse
This package provides a dynamic library of parsing JSON enhanced logs.
%if %{with mmnormalize}
%description mmnormalize
This package provides a dynamic library of normalizing logs with liblognorm.
%endif
%description mmaudit
This package provides a dynamic library supporting Linux audit format.
%description mmfields
This package provides a dynamic library which can process field-based log format.
%description mysql
This package provides a dynamic library which supports MySQL.
%description pgsql
This package provides a dynamic library which supports PostgreSQL.
%description gssapi
This package provides a dynamic library which supports GSSAPI
authentication and secure connections.
%if %{with relp}
%description relp
This package provides a dynamic library which supports receiving syslog
messages via the RELP.
%endif
%description gnutls
This package provides a dynamic library which supports sending and receving
syslog messages using TLS encryption provided by GnuTLS library.
%description openssl
This package provides a dynamic library which supports sending and receving
syslog messages using TLS encryption provided by OpenSSL library.
%description snmp
This package provides a dynamic library which supports sending messages
as SNMPv1 and SNMPv2c traps.
%if %{with kafka}
%description kafka
This package provides a dynamic library supporting Apache Kafka.
%endif
%if %{with mmkubernetes}
%description mmkubernetes
This package provides a dynamic library supporting adding kubernetes
container metadata.
%endif
%prep
%setup -q -D
%build
autoreconf -ifv
export CFLAGS="$RPM_OPT_FLAGS -fpie"
export LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now"
%configure \
--prefix=/usr \
--disable-static \
--disable-testbench \
--enable-elasticsearch \
--enable-generate-man-pages \
--enable-gnutls \
--enable-gssapi-krb5 \
--enable-imfile \
--enable-imjournal \
%if %{with kafka}
--enable-imkafka \
%endif
--enable-impstats \
--enable-imptcp \
--enable-mail \
--enable-mmanon \
--enable-mmaudit \
--enable-mmcount \
--enable-mmfields \
%if %{with mmkubernetes}
--enable-mmkubernetes \
%endif
--enable-mmjsonparse \
%if %{with mmnormalize}
--enable-mmnormalize \
%endif
--enable-mmutf8fix \
--enable-mysql \
--enable-omhttp \
--enable-omjournal \
--enable-omprog \
--enable-omstdout \
--enable-omuxsock \
%if %{with kafka}
--enable-omkafka \
%endif
--enable-openssl \
--enable-pgsql \
--enable-pmaixforwardedfrom \
--enable-pmcisconames \
--enable-pmlastmsg \
--enable-pmsnare \
%if %{with relp}
--enable-relp \
%endif
--enable-snmp \
--enable-unlimited-select \
--enable-usertools \
make V=1
%check
make V=1 check
%install
%make_install
%global rsyslog_docdir %{_docdir}/rsyslog
install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
install -d -m 755 %{buildroot}%{_unitdir}
install -d -m 755 %{buildroot}%{_sysconfdir}/rsyslog.d
install -d -m 700 %{buildroot}%{_sharedstatedir}/rsyslog
install -d -m 700 %{buildroot}%{_sysconfdir}/pki/rsyslog
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rsyslog.conf
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/rsyslog
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/rsyslog
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/rsyslog.service
install -Dp -m 644 plugins/ommysql/createDB.sql %{buildroot}%{rsyslog_docdir}/mysql-createDB.sql
install -Dp -m 644 plugins/ompgsql/createDB.sql %{buildroot}%{rsyslog_docdir}/pgsql-createDB.sql
dos2unix tools/recover_qi.pl
install -Dp -m 644 tools/recover_qi.pl %{buildroot}%{rsyslog_docdir}/recover_qi.pl
install -Dp -m 644 contrib/mmkubernetes/*.rulebase %{buildroot}%{rsyslog_docdir}
# imdiag and liboverfide is for test
rm -f %{buildroot}%{_libdir}/rsyslog/imdiag.so
rm -f %{buildroot}%{_libdir}/rsyslog/liboverride_gethostname.so
%post
for log_file in /var/log/{messages,secure,maillog,spooler}
do
[ -f $log_file ] || (umask 066 && touch $log_file)
done
%systemd_post rsyslog.service
%preun
%systemd_preun rsyslog.service
%postun
%systemd_postun_with_restart rsyslog.service
%files
%license COPYING*
%doc AUTHORS ChangeLog README.md
%{rsyslog_docdir}
%dir %{_libdir}/rsyslog
%dir %{_sysconfdir}/rsyslog.d
%dir %{_sharedstatedir}/rsyslog
%{_sbindir}/rsyslogd
%{_unitdir}/rsyslog.service
%dir %{_sysconfdir}/pki/rsyslog
%config(noreplace) %{_sysconfdir}/rsyslog.conf
%config(noreplace) %{_sysconfdir}/sysconfig/rsyslog
%{_libdir}/rsyslog/fmhash.so
%{_libdir}/rsyslog/fmhttp.so
%{_libdir}/rsyslog/imfile.so
%{_libdir}/rsyslog/imjournal.so
%{_libdir}/rsyslog/imklog.so
%{_libdir}/rsyslog/immark.so
%{_libdir}/rsyslog/impstats.so
%{_libdir}/rsyslog/imptcp.so
%{_libdir}/rsyslog/imtcp.so
%{_libdir}/rsyslog/imudp.so
%{_libdir}/rsyslog/imuxsock.so
%{_libdir}/rsyslog/lmnet.so
%{_libdir}/rsyslog/lmnetstrms.so
%{_libdir}/rsyslog/lmnsd_ptcp.so
%{_libdir}/rsyslog/lmregexp.so
%{_libdir}/rsyslog/lmtcpclt.so
%{_libdir}/rsyslog/lmtcpsrv.so
%{_libdir}/rsyslog/lmzlibw.so
%{_libdir}/rsyslog/mmanon.so
%{_libdir}/rsyslog/mmcount.so
%{_libdir}/rsyslog/mmexternal.so
%{_libdir}/rsyslog/mmutf8fix.so
%{_libdir}/rsyslog/omhttp.so
%{_libdir}/rsyslog/omjournal.so
%{_libdir}/rsyslog/ommail.so
%{_libdir}/rsyslog/omprog.so
%{_libdir}/rsyslog/omstdout.so
%{_libdir}/rsyslog/omtesting.so
%{_libdir}/rsyslog/omuxsock.so
%{_libdir}/rsyslog/pmaixforwardedfrom.so
%{_libdir}/rsyslog/pmcisconames.so
%{_libdir}/rsyslog/pmlastmsg.so
%{_libdir}/rsyslog/pmsnare.so
%{_mandir}/man5/rsyslog.conf.5.gz
%{_mandir}/man8/rsyslogd.8.gz
%exclude %{rsyslog_docdir}/mysql-createDB.sql
%exclude %{rsyslog_docdir}/pgsql-createDB.sql
%exclude %{_libdir}/rsyslog/*.la
%files logrotate
%config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog
%files crypto
%{_bindir}/rscryutil
%{_mandir}/man1/rscryutil.1.gz
%{_libdir}/rsyslog/lmcry_gcry.so
%files elasticsearch
%{_libdir}/rsyslog/omelasticsearch.so
%files mmaudit
%{_libdir}/rsyslog/mmaudit.so
%files mmfields
%{_libdir}/rsyslog/mmfields.so
%files mmjsonparse
%{_libdir}/rsyslog/mmjsonparse.so
%if %{with mmnormalize}
%files mmnormalize
%{_libdir}/rsyslog/mmnormalize.so
%endif
%files mysql
%doc %{rsyslog_docdir}/mysql-createDB.sql
%{_libdir}/rsyslog/ommysql.so
%files pgsql
%doc %{rsyslog_docdir}/pgsql-createDB.sql
%{_libdir}/rsyslog/ompgsql.so
%files gssapi
%{_libdir}/rsyslog/lmgssutil.so
%{_libdir}/rsyslog/imgssapi.so
%{_libdir}/rsyslog/omgssapi.so
%if %{with relp}
%files relp
%{_libdir}/rsyslog/imrelp.so
%{_libdir}/rsyslog/omrelp.so
%endif
%files gnutls
%{_libdir}/rsyslog/lmnsd_gtls.so
%files openssl
%{_libdir}/rsyslog/lmnsd_ossl.so
%files snmp
%{_libdir}/rsyslog/omsnmp.so
%if %{with kafka}
%files kafka
%{_libdir}/rsyslog/imkafka.so
%{_libdir}/rsyslog/omkafka.so
%endif
%if %{with mmkubernetes}
%files mmkubernetes
%{_libdir}/rsyslog/mmkubernetes.so
%doc %{rsyslog_docdir}/k8s_filename.rulebase
%doc %{rsyslog_docdir}/k8s_container_name.rulebase
%endif
%changelog
* Wed Dec 25 2024 Tracker Robot <[email protected]> - 8.2312.0-4
- Apply patches from rpm-tracker
- [Bug Fix] ec3ddc61c5fffd5d3762520338ea0e8d813c5b4b.patch: Merge pull request #5454 from apple-ouyang/patch-1
- [Bug Fix] 8d7392d391837bde0b5783428eb2c1dfdf19c1bc.patch: Merge pull request #5458 from rsyslog/nonexistentfoo
* Thu Sep 26 2024 OpenCloudOS Release Engineering <[email protected]> - 8.2312.0-3
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Fri Aug 16 2024 OpenCloudOS Release Engineering <[email protected]> - 8.2312.0-2
- Rebuilt for loongarch release
* Fri Dec 29 2023 Yi Lin <[email protected]> - 8.2312.0-1
- bump to version 8.2312.0
* Tue Nov 07 2023 kianli <[email protected]> - 8.2204.1-8
- Add rsyslog-logrotate recommends for rsyslog
* Thu Oct 12 2023 Miaojun Dong <[email protected]> - 8.2204.1-7
- Rebuild for curl-8.4.0
* Fri Sep 08 2023 OpenCloudOS Release Engineering <[email protected]> - 8.2204.1-6
- Rebuilt for OpenCloudOS Stream 23.09
* Fri Aug 18 2023 Wang Guodong <[email protected]> - 8.2204.1-5
- Rebuilt for mariadb-connector-c 3.3.5
* Thu Aug 3 2023 Shuo Wang <[email protected]> - 8.2204.1-4
- Rebuilt for libpq 15.3
* Fri Apr 28 2023 OpenCloudOS Release Engineering <[email protected]> - 8.2204.1-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <[email protected]> - 8.2204.1-2
- Rebuilt for OpenCloudOS Stream 23
* Tue May 24 2022 cunshunxia <[email protected]> - 8.2204.1-1
- initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-commit/rsyslog.git
[email protected]:ocs-commit/rsyslog.git
ocs-commit
rsyslog
rsyslog
master

搜索帮助