1 Star 0 Fork 24

zmr_2020/kafka

forked from src-openEuler/kafka 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
kafka.spec 2.47 KB
一键复制 编辑 原始数据 按行查看 历史
zmr_2020 提交于 2023-05-08 14:20 . replace obsolescent command egrep
%global debug_package %{nil}
%global debug_package %{nil}
%define kafka_home /opt/kafka
Name: kafka
Version: 2.8.2
Release: 2
Summary: A Distributed Streaming Platform.
License: Apache-2.0
Source0: https://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}-src.tgz
Source1: https://mirrors.huaweicloud.com/gradle/gradle-6.8.1-all.zip
Source2: kafka.service
Source3: gradle-wrapper.jar
Patch0: 0001-adopt-huaweimaven.patch
Patch1: 0002-replace-obsolescent-command-egrep.patch
BuildRequires: systemd java-1.8.0-openjdk-devel
Provides: kafka = %{version}
Requires: java-1.8.0-openjdk
%description
Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
-c "User for Kafka services" %{name}
exit 0
%prep
%autosetup -p1 -n %{name}-%{version}-src
cp -r $RPM_SOURCE_DIR/gradle-6.8.1-all.zip %{_builddir}/kafka-%{version}-src/gradle/wrapper/
cp -r $RPM_SOURCE_DIR/gradle-wrapper.jar %{_builddir}/kafka-%{version}-src/gradle/wrapper/
%build
unzip -q $RPM_SOURCE_DIR/gradle-6.8.1-all.zip
./gradle-6.8.1/bin/gradle --info
./gradlew jar releaseTarGz
%install
mkdir -p $RPM_BUILD_ROOT%{kafka_home}/{libs,bin,config,site-docs,licenses}
cd %{_builddir}/kafka-%{version}-src/core/build/distributions/
tar -xvf kafka_2.13-%{version}.tgz
cp -pr kafka_2.13-%{version} %{_builddir}
cd %{_builddir}/kafka_2.13-%{version}
cp -pr libs/* $RPM_BUILD_ROOT%{kafka_home}/libs
cp -pr bin/* $RPM_BUILD_ROOT%{kafka_home}/bin
cp -pr config/* $RPM_BUILD_ROOT%{kafka_home}/config
cp -pr site-docs/* $RPM_BUILD_ROOT%{kafka_home}/site-docs
cp -pr licenses/* $RPM_BUILD_ROOT%{kafka_home}/licenses
%files
%defattr(-,root,root)
%{kafka_home}
%doc NOTICE
%doc LICENSE
%clean
rm -rf %{buildroot}
%changelog
* Mon May 08 2023 zmr_2020 <zhang_jian7@hoperun.com> - 2.8.2-2
- replace obsolescent command egrep
* Sat Sep 24 2022 xiexing <xiexing4@hisilicon.com> - 2.8.2-1
- fix CVE-2022-34917
* Thu Aug 11 2022 xiexing <xiexing4@hisilicon.com> - 2.8.1-1
- update version to fix CVE-2021-38153
* Thu Mar 25 2021 huanghaitao <huanghaitao8@huawei.com> 2.6.0 - 2
- Remove dist macros
* Sat Aug 15 2020 Hao Zhang <unioah@isrc.iscas.ac.cn>
- init
* Sat Oct 04 2020 Hao Zhang <unioah@isrc.iscas.ac.cn>
- add service
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zmr_2020/kafka.git
git@gitee.com:zmr_2020/kafka.git
zmr_2020
kafka
kafka
master

搜索帮助