Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
security:logging
elasticsearch6
elasticsearch6.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File elasticsearch6.spec of Package elasticsearch6
# # spec file for package elasticsearch6 # # Copyright (c) 2018 Samu Voutilainen # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 kkaempf # # 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 %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif # "backport" %{!?_initddir: %{expand: %%global _initddir %{_initrddir}}} %{!?_rundir: %{expand: %%global _rundir /run}} # these two are broken on SLE 11... so just "correct" them enough to work... %{!?_tmpfilesdir: %{expand: %%global _tmpfilesdir %{_prefix}/lib/tmpfiles.d}} %{!?_sysctldir: %{expand: %%global _sysctldir %{_prefix}/lib/sysctl.d}} Name: elasticsearch6 %define srcname elasticsearch Version: 6.8.23 Release: 0 Summary: Open Source, Distributed, RESTful Search Engine License: Apache-2.0 Group: Productivity/Databases/Tools Url: https://github.com/elastic/elasticsearch Source0: https://github.com/elastic/elasticsearch/archive/%{version}/%{srcname}-%{version}.tar.gz Source2: %{srcname}.logrotate Source7: %{srcname}.SuSEfirewall2 Patch1: 0001-use-local-maven-repo.patch Patch2: 0002-maybe-uninitialized.patch Patch3: 0003-plugins-local-repo.patch Patch4: 0004-var-run-run.patch Patch5: 0005-Replace-build-variable-in-config-files.patch Patch6: 0006-fix-chmod-import-for-gradle-5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: git BuildRequires: gradle5 %if 0%{?suse_version} > 1010 BuildRequires: fdupes %endif BuildRequires: java-devel = 11 # %%{version} BuildRequires: %{name}-kit == %{version} %if 0%{?has_systemd} BuildRequires: systemd %{?systemd_requires} %endif # SLE_12 and Leap 42 need this: BuildRequires: mozilla-nss BuildArch: noarch Provides: mvn(org.elasticsearch:core) == %{version} Provides: mvn(org.elasticsearch:dev-tools) == %{version} Provides: mvn(org.elasticsearch:distribution) == %{version} Provides: mvn(org.elasticsearch:modules) == %{version} Provides: mvn(org.elasticsearch:plugins) == %{version} Provides: mvn(org.elasticsearch:qa) == %{version} Provides: mvn(org.elasticsearch:rest-api-spec) == %{version} Provides: mvn(org:elasticsearch) == %{version} Provides: elasticsearch = %{version} %if 0%{?has_systemd} Requires(post): %fillup_prereq %else Requires(post): %insserv_prereq %fillup_prereq %endif Requires: java-headless = 11 Requires: logrotate # for sysctl: Requires: procps # for elasticsearch-plugin: Requires: hostname Requires: which # mkdir, chown in %%pre Requires(pre): coreutils # useradd, groupadd in %%pre Requires(pre): shadow %description Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html and the 'Elasticsearch: The Definitive Guide' book can be found at https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html %prep %setup -q -c -n src cd %{srcname}-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 rm -rf /tmp/gradle* /tmp/apache* rm -rf ~/.m2 mkdir ~/.m2 ln -s /usr/share/tetra/m2 ~/.m2/repository mkdir -p x-pack/plugin/ml/cpp-snapshot/.cache cp /usr/share/tetra/ml-cpp-%{version}.zip x-pack/plugin/ml/cpp-snapshot/.cache %build cd ../src/%{srcname}-%{version} export GRADLE_OPTS="-Xmx1024m" export GRADLE_USER_HOME=/tmp/gradle gradle \ --gradle-user-home $GRADLE_USER_HOME \ --project-cache-dir /tmp/gradle-cache \ -Dbuild.snapshot=false \ -Dlicense.key=x-pack/plugin/core/snapshot.key \ -x :distribution:packages:buildDeb \ -x :distribution:packages:buildOssDeb \ -x :distribution:packages:buildRpm \ -x :distribution:packages:buildOssRpm \ -x :distribution:docker:buildDockerImage \ -x :distribution:docker:buildOssDockerImage \ -Drepos.mavenLocal=true \ --offline \ assemble %clean rm -rf ~/.gradle %install export BUILD_VCS_NUMBER=%{version} export NO_BRP_CHECK_BYTECODE_VERSION=true cd %{srcname}-%{version} export GRADLE_OPTS="-Xmx1024m" export GRADLE_USER_HOME=/tmp/gradle gradle \ --gradle-user-home $GRADLE_USER_HOME \ --project-cache-dir /tmp/gradle-cache \ -Dbuild.snapshot=false \ -Dlicense.key=x-pack/plugin/core/snapshot.key \ -x :distribution:packages:buildDeb \ -x :distribution:packages:buildOssDeb \ -x :distribution:packages:buildRpm \ -x :distribution:packages:buildOssRpm \ -x :distribution:docker:buildDockerImage \ -x :distribution:docker:buildOssDockerImage \ -Drepos.mavenLocal=true \ --offline \ --project-prop gradle_installPath=%{buildroot}%{_datadir}/%{srcname} \ installDist # # bin install -d %{buildroot}%{_datadir} tar -C %{buildroot}%{_datadir} -xf distribution/archives/oss-tar/build/distributions/%{srcname}-oss-%{version}.tar.gz mv %{buildroot}%{_datadir}/%{srcname}-%{version} %{buildroot}%{_datadir}/%{srcname} # handled as %%doc rm -f %{buildroot}%{_datadir}/%{srcname}/README.textile rm -f %{buildroot}%{_datadir}/%{srcname}/LICENSE.txt rm -f %{buildroot}%{_datadir}/%{srcname}/NOTICE.txt rm -f %{buildroot}%{_datadir}/%{srcname}/bin/*.exe rm -f %{buildroot}%{_datadir}/%{srcname}/bin/*.bat # # var %{__install} -d -m 755 %{buildroot}%{_localstatedir}/log/%{srcname} %{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/%{srcname} %{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/%{srcname}/data %{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/%{srcname}/work %{__install} -d -m 755 %{buildroot}%{_rundir}/%{srcname} # # /usr/share %{__install} -d %{buildroot}%{_datadir}/%{srcname} # # tmpfiles.d %{__install} -d -m 755 %{buildroot}%{_tmpfilesdir} %{__install} -m 644 distribution/packages/src/common/systemd/%{srcname}.conf %{buildroot}%{_tmpfilesdir} # # sbin %{__install} -d %{buildroot}%{_sbindir} # # init scripts / systemd %if 0%{?has_systemd} %{__install} -D -m 644 distribution/packages/src/common/systemd/%{srcname}.service $RPM_BUILD_ROOT%{_unitdir}/%{srcname}.service %{__install} -D -m 644 distribution/packages/src/common/systemd/sysctl/%{srcname}.conf $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/%{srcname}.conf # rc%%{srcname} ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rc%{srcname} %else mkdir -p $RPM_BUILD_ROOT%{_initddir} %{__install} -m 755 distribution/packages/src/rpm/init.d/%{srcname} $RPM_BUILD_ROOT%{_initddir} ln -sf %{_initddir}/%{srcname} $RPM_BUILD_ROOT%{_sbindir}/rc%{srcname} %endif # # logrotate %{__install} -D -m 644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/%{srcname} %if 0%{?suse_version} > 1500 || 0%{?fedora_version} > 14 %else # # SuSEfirewall2 %{__install} -D -m 644 %{S:7} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{srcname} %endif # # /etc/elasticsearch %{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{srcname} %{__install} -m 644 distribution/src/config/%{srcname}.yml %{buildroot}%{_sysconfdir}/%{srcname} %{__install} -m 644 distribution/src/config/jvm.options %{buildroot}%{_sysconfdir}/%{srcname} %{__install} -m 644 distribution/src/config/log4j2.properties %{buildroot}%{_sysconfdir}/%{srcname} %{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{srcname}/scripts # # sysconfig template %{__install} -d -m 755 %{buildroot}%{_fillupdir} %{__install} -m 644 distribution/packages/src/common/env/%{srcname} %{buildroot}%{_fillupdir}/sysconfig.%{srcname} %if 0%{?suse_version} > 1010 %fdupes %{buildroot}%{_datadir}/%{srcname} %endif %pre %if 0%{?has_systemd} %service_add_pre %{srcname}.service %endif ## create %%{srcname} group and user getent group %{srcname} >/dev/null || groupadd -r %{srcname} getent passwd %{srcname} >/dev/null || useradd -r -g %{srcname} -d %{_localstatedir}/lib/%{srcname} -s /sbin/nologin -c "service user for elasticsearch" %{srcname} exit 0 %post %{fillup_and_insserv -n -y %{srcname}} %service_add_post %{srcname}.service # rpm is kinda stupid ... # Create our dirs immediatly, after a manual package install. # After a reboot systemd/aaa_base will take care. %if 0%{?has_systemd} systemd-tmpfiles --create %{_tmpfilesdir}/%{srcname}.conf %else test -d %{_rundir}/%{srcname} || mkdir -m 755 %{_rundir}/%{srcname} && chown %{srcname}.%{srcname} %{_rundir}/%{srcname} %endif %preun %if 0%{?has_systemd} %service_del_preun %{srcname}.service %else %stop_on_removal %endif %postun ## no auto restart on update export DISABLE_RESTART_ON_UPDATE=1 %if 0%{?has_systemd} %service_del_postun %{srcname}.service %else %insserv_cleanup %endif # only execute in case of package removal, not on upgrade if [ $1 -eq 0 ] ; then getent passwd %{srcname} > /dev/null if [ "$?" == "0" ] ; then userdel %{srcname} fi getent group %{srcname} >/dev/null if [ "$?" == "0" ] ; then groupdel %{srcname} fi fi %files %defattr(-,root,root) %doc %{srcname}-%{version}/README.textile %doc %{srcname}-%{version}/LICENSE.txt %doc %{srcname}-%{version}/NOTICE.txt %dir %{_datadir}/%{srcname} %dir %attr(775,root,%{srcname}) %{_sysconfdir}/%{srcname} %dir %{_sysconfdir}/%{srcname}/scripts %config(noreplace) %attr(644,root,%{srcname}) %{_sysconfdir}/%{srcname}/* %dir %{_fillupdir} %{_fillupdir}/sysconfig.%{srcname} %config %{_sysconfdir}/sysctl.d/%{srcname}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{srcname} %if 0%{?suse_version} > 1500 || 0%{?fedora_version} > 14 %else %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{srcname} %endif %dir %{_datadir}/%{srcname} %{_datadir}/%{srcname}/* %if 0%{?has_systemd} %{_unitdir}/%{srcname}.service %{_tmpfilesdir}/%{srcname}.conf %else %attr(755,root,root) %{_initddir}/%{srcname} %exclude %{_tmpfilesdir}/%{srcname}.conf %dir %{_sysctldir} %{_sysctldir}/%{srcname}.conf %endif %{_sbindir}/rc%{srcname} %dir %attr(755,%{srcname},%{srcname}) %{_localstatedir}/lib/%{srcname} %dir %attr(755,%{srcname},%{srcname}) %{_localstatedir}/log/%{srcname} %dir %attr(755,%{srcname},%{srcname}) %{_datadir}/%{srcname}/plugins %dir %ghost %attr(755,%{srcname},%{srcname}) %{_rundir}/%{srcname} %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