Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ecsos:monitoring
graylog
graylog.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File graylog.spec of Package graylog
# # spec file for package graylog # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} > 1140 || 0%{?fedora_version} > 14 %define has_systemd 1 %else %define has_systemd 0 %endif %define gl_home %{_prefix}/lib/graylog %{!?_initddir: %{expand: %%global _initddir %{_initrddir}}} %{!?_rundir: %{expand: %%global _rundir %{_localstatedir}/run}} #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif Name: graylog Version: 3.3.16 Release: 0 Summary: Field-tested open source data analytics system for logs License: GPL-3.0+ Group: Productivity/Networking/Web/Frontends Url: https://www.graylog.org Source0: https://downloads.graylog.org/releases/%{name}/%{name}-%{version}.tgz Source1: init.d-%{name} Source2: sysconfig.%{name} Source3: log4j.xml Source4: service.graylog Source5: tmpfiles.conf-graylog Source6: init.d-graylog-suse Source7: graylog.logrotate NoSource: 0 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: java-openjdk >= 1.8.0 Requires: jpackage-utils Requires: logrotate PreReq: /bin/echo /bin/mkdir /usr/bin/touch PreReq: %fillup_prereq PreReq: fillup Provides: graylog2-server # so we do not need to own tmpfiles.d... %if 0%{?has_systemd} BuildRequires: systemd %{?systemd_requires} %endif %if 0%{?suse_version} Requires(pre): shadow Requires(pre): util-linux %else Requires(post): chkconfig Requires(post): initscripts Requires(pre): chkconfig Requires(pre): initscripts Requires(pre): shadow-utils %endif %description Manage billions of events and process hundreds of thousands of new events every second. All of the infrastructure runs in your own data center: No need to worry about sensitive data leaving your company or shipping your logs away over the internet. Graylog is leveraging proven technologies e.g. Java, Scala and ElasticSearch. All communication is done via REST APIs so you can even build your own tools on top of it. The graylog package ships with an interactive API browser. %if 0%{?suse_version} > 1110 # SLE11 does not like empty packages %package mongodb Summary: Graylog MongoDB Prerequisite Group: Productivity/Databases/Tools Requires: %{name} = %{version} Requires: mongodb >= 2.4 %description mongodb This package provides the MongoDB requirement for the Graylog Architecture. http://docs.graylog.org/en/latest/pages/architecture.html %package elasticsearch Summary: Graylog Elasticsearch Prerequisite Requires: %{name} = %{version} Requires: elasticsearch < 7 Group: Productivity/Databases/Tools %description elasticsearch This package provides the Elasticsearch for the Graylog Architecture. http://docs.graylog.org/en/latest/pages/architecture.html %endif %prep %setup -q %build sed -ri 's@^(node_id_file.=).*@\1 %{_sysconfdir}/graylog/server-node-id@g' graylog.conf.example sed -ri 's@(rules_file.=).*@\1 %{_sysconfdir}/graylog/server.drl@g' graylog.conf.example sed -ri 's@(message_journal_dir.=).*@\1 %{_localstatedir}/spool/graylog@g' graylog.conf.example %install # sles is a bit nagging about version of bytecode so lets make it quiet :) export NO_BRP_CHECK_BYTECODE_VERSION=true %{__mkdir} -p %{buildroot}%{_fillupdir} %{__mkdir} -p %{buildroot}%{gl_home}/server/bin %{__install} -p -m 755 graylog.jar %{buildroot}%{gl_home}/server/ %{__install} -p -m 755 bin/graylogctl %{buildroot}%{gl_home}/server/bin/ # config %{__mkdir} -p %{buildroot}%{_sysconfdir}/graylog # create file for ghosting... touch %{buildroot}%{_sysconfdir}/graylog/server-node-id %{__install} -m 644 graylog.conf.example %{buildroot}%{_sysconfdir}/graylog/server.conf %{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/graylog/server-log4j.xml # logs %{__mkdir} -p %{buildroot}%{_localstatedir}/log/graylog # plugins %{__mkdir} -p %{buildroot}%{gl_home}/server/plugin/alarm_callbacks %{__mkdir} -p %{buildroot}%{gl_home}/server/plugin/filters %{__mkdir} -p %{buildroot}%{gl_home}/server/plugin/initializers %{__mkdir} -p %{buildroot}%{gl_home}/server/plugin/inputs %{__mkdir} -p %{buildroot}%{gl_home}/server/plugin/ouput %{__mkdir} -p %{buildroot}%{gl_home}/server/plugin/transports # sysconfig and init %{__mkdir} -p %{buildroot}%{_sysconfdir}/sysconfig %{__mkdir} -p %{buildroot}%{_initddir} %if 0%{?suse_version} %if 0%{?suse_version} <= 1210 %{__install} -m 755 %{SOURCE6} %{buildroot}%{_initddir}/%{name} %endif %else %{__install} -m 755 %{SOURCE1} %{buildroot}%{_initddir}/%{name} %endif %{__install} -Dm 644 %{SOURCE2} %{buildroot}%{_fillupdir}/ %{__mkdir} -p %{buildroot}%_sbindir (cd %{buildroot}%_sbindir ; ln -s %{_initddir}/%{name} rc%{name}) %if 0%{?has_systemd} %{__mkdir} -p %{buildroot}%_unitdir %{__install} -Dm 644 %{SOURCE4} %{buildroot}%_unitdir/%{name}.service %{__install} -Dm 644 %{SOURCE5} %{buildroot}%_tmpfilesdir/%{name}.conf (cd %{buildroot}%_sbindir && ln -sf /usr/sbin/service rc%{name}) %endif %{__install} -Dm 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/%name %{__mkdir} -p %{buildroot}%{_rundir}/graylog %{__mkdir} -p %{buildroot}%{_localstatedir}/spool/graylog %pre # create graylog group if ! getent group graylog >/dev/null; then groupadd -r graylog fi # create graylog user if ! getent passwd graylog >/dev/null; then useradd -r -g graylog -d %{gl_home} \ -s /sbin/nologin -c "Party Gorilla" graylog fi # %if 0%{?has_systemd} %service_add_pre %{name}.service %endif %post %{fillup_and_insserv -n -y %{name}} %restart_on_update if [ ! -s %{_sysconfdir}/graylog/server-node-id ]; then uuidgen > %{_sysconfdir}/graylog/server-node-id fi # %if 0%{?has_systemd} systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf %service_add_post %{name}.service %endif %preun %if 0%{?has_systemd} %service_del_preun %{name}.service %else %stop_on_removal %endif # %postun %if 0%{?has_systemd} %service_del_postun %{name}.service %else %insserv_cleanup %restart_on_update %endif # %files %defattr(-,root,root,-) %doc COPYING README.markdown %dir %{gl_home} %dir %{gl_home}/server %dir %{gl_home}/server/bin %dir %{gl_home}/server/plugin %dir %{gl_home}/server/plugin/alarm_callbacks %dir %{gl_home}/server/plugin/filters %dir %{gl_home}/server/plugin/initializers %dir %{gl_home}/server/plugin/inputs %dir %{gl_home}/server/plugin/ouput %dir %{gl_home}/server/plugin/transports %dir %{_sysconfdir}/graylog %dir %attr(-,graylog,graylog) %{_localstatedir}/spool/graylog %dir %attr(-,graylog,graylog) %{_localstatedir}/log/graylog %if 0%{?suse_version} <= 1210 %{_initddir}/graylog %endif %config(noreplace) %{_fillupdir}/* %config(noreplace) %{_sysconfdir}/graylog/server.conf %config(noreplace) %{_sysconfdir}/graylog/server-log4j.xml %config(noreplace) %{_sysconfdir}/logrotate.d/%name %doc README.markdown %{gl_home}/server/graylog.jar %{gl_home}/server/bin/graylogctl %ghost %attr(-,graylog,graylog) %{_rundir}/graylog %ghost %config(noreplace) %{_sysconfdir}/graylog/server-node-id %{_sbindir}/rc%{name} %if 0%{?has_systemd} %_unitdir/%{name}.service %_tmpfilesdir/%{name}.conf %endif %if 0%{?suse_version} > 1110 %files mongodb %files elasticsearch %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor