zookeeper/zookeeper.spec

98 lines
3.3 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-04 00:03:23 +00:00
%define rel_ver 3.6.1
2023-11-03 10:40:16 +08:00
%define pkg_ver 2.6
2020-08-04 00:03:23 +00:00
%define _prefix /opt/zookeeper
Summary: High-performance coordination service for distributed applications.
2022-11-06 19:06:59 +08:00
Name: zookeeper
2020-08-04 00:03:23 +00:00
Version: %{rel_ver}
2021-03-25 14:50:37 +08:00
Release: %{pkg_ver}
License: Apache-2.0 and OpenSSL and SSLeay and MIT and BSD
2020-08-04 00:03:23 +00:00
Group: Applications/Databases
URL: https://www.apache.org/dist/zookeeper/
BuildArch: noarch
Source0: https://www.apache.org/dist/zookeeper/zookeeper-%{rel_ver}/apache-zookeeper-%{rel_ver}.tar.gz
Source1: zoo.cfg
Source2: zookeeper.service
Source3: zookeeper.sysconfig
Source4: log4j.properties
BuildRoot: %{_tmppath}/%{name}-%{rel_ver}-%{release}-root
2020-08-17 18:58:03 -04:00
BuildRequires: java-1.8.0-openjdk-devel,maven,hostname
2020-08-04 00:03:23 +00:00
Requires: java-1.8.0-openjdk,systemd
2023-11-03 10:40:16 +08:00
Provides: apache-zookeeper
2020-08-04 00:03:23 +00:00
%description
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
%prep
2022-11-06 19:06:59 +08:00
%setup -q -n apache-zookeeper-3.6.1
2020-08-04 00:03:23 +00:00
%build
mvn -DskipTests package
2022-11-06 19:06:59 +08:00
tar xvf zookeeper-assembly/target/apache-%{name}-%{rel_ver}-bin.tar.gz -C .
2020-08-04 00:03:23 +00:00
%install
mkdir -p %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_prefix}/lib
mkdir -p %{buildroot}%{_prefix}/conf
mkdir -p %{buildroot}%{_localstatedir}/log/zookeeper
mkdir -p %{buildroot}%{_localstatedir}/lib/zookeeper/data
2022-11-06 19:06:59 +08:00
install -p -D -m 755 apache-%{name}-%{rel_ver}-bin/bin/*.sh %{buildroot}%{_prefix}/bin
install -p -D -m 644 apache-%{name}-%{rel_ver}-bin/lib/*.jar %{buildroot}%{_prefix}/lib
install -p -D -m 644 apache-%{name}-%{rel_ver}-bin/conf/* %{buildroot}%{_prefix}/conf
2020-08-04 00:03:23 +00:00
install -p -D -m 644 %{S:1} %{buildroot}%{_prefix}/conf/zoo.cfg
install -p -D -m 644 %{S:2} %{buildroot}%{_unitdir}/zookeeper.service
install -p -D -m 644 %{S:3} %{buildroot}%{_sysconfdir}/sysconfig/zookeeper
install -p -D -m 644 %{S:4} %{buildroot}%{_prefix}/conf/log4j.properties
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%attr(-,zookeeper,zookeeper) %{_prefix}
%dir %attr(744, zookeeper, zookeeper) %{_localstatedir}/log/zookeeper
%dir %attr(755, zookeeper, zookeeper) %{_localstatedir}/lib/zookeeper
%doc LICENSE.txt NOTICE.txt README.md
%{_unitdir}/zookeeper.service
%config(noreplace) %{_sysconfdir}/sysconfig/zookeeper
%pre
getent group zookeeper >/dev/null || groupadd -r zookeeper
getent passwd zookeeper >/dev/null || useradd -r -g zookeeper -d / -s /sbin/nologin zookeeper
exit 0
%post
%systemd_post zookeeper.service
%preun
%systemd_preun zookeeper.service
%postun
%systemd_postun_with_restart zookeeper.service
%changelog
2023-11-03 10:40:16 +08:00
* Fri Nov 3 2023 wenweijian <wenweijian2@huawei.com> - 3.6.1-2.6
- add provides apache-zookeeper
2022-11-06 19:06:59 +08:00
* Sun Nov 6 2022 xiexing <xiexing4@hisilicon.com> - 3.6.1-2.5
- change Name apache-zookeeper to zookeeper
* Fri Feb 25 2022 wangkai <wangkai385@huawei.com> - 2.4
2022-02-25 11:27:19 +08:00
- Rebuild for fix log4j1.x cves
2022-11-06 19:06:59 +08:00
* Thu Dec 16 2021 wangkai <wangkai385@huawei.com> - 2.3
- This package depends on log4j.After the log4j vulnerability CVE-2021-44228 is fixed,the version needs to be rebuild.
* Fri Jun 18 2021 lingsheng <lingsheng@huawei.com> - 2.2
- Fix reload service failure
* Thu Apr 1 2021 zhangshaoning <zhangshaoning@uniontech.com> - 2.1
- Repair status failure after stopping service
2021-03-25 14:50:37 +08:00
* Thu Mar 25 2021 baizhonggui <baizhonggui@huawei.com> - 2.0
- Delete %{dist} in Release
2022-11-06 19:06:59 +08:00
2020-08-04 00:03:23 +00:00
* Sun Jun 28 2020 hao zhang <unioah@isrc.iscas.ac.cn> - 1.0
- Add zookeeper.service