From 577b46a1c38b31aff9626a65d939817506bffdc1 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Sun, 16 Oct 2022 19:20:58 +0800 Subject: [PATCH 1/2] Fix source file mode --- src/brpc/channel.cpp | 0 src/brpc/controller.h | 0 src/brpc/global.cpp | 0 src/brpc/protocol.h | 0 src/butil/recordio.cc | 0 src/butil/recordio.h | 0 6 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/brpc/channel.cpp mode change 100755 => 100644 src/brpc/controller.h mode change 100755 => 100644 src/brpc/global.cpp mode change 100755 => 100644 src/brpc/protocol.h mode change 100755 => 100644 src/butil/recordio.cc mode change 100755 => 100644 src/butil/recordio.h diff --git a/src/brpc/channel.cpp b/src/brpc/channel.cpp old mode 100755 new mode 100644 diff --git a/src/brpc/controller.h b/src/brpc/controller.h old mode 100755 new mode 100644 diff --git a/src/brpc/global.cpp b/src/brpc/global.cpp old mode 100755 new mode 100644 diff --git a/src/brpc/protocol.h b/src/brpc/protocol.h old mode 100755 new mode 100644 diff --git a/src/butil/recordio.cc b/src/butil/recordio.cc old mode 100755 new mode 100644 diff --git a/src/butil/recordio.h b/src/butil/recordio.h old mode 100755 new mode 100644 From d32cf8a320f3cf3b9c9012b5a47b00dbd8970181 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Sun, 16 Oct 2022 19:21:26 +0800 Subject: [PATCH 2/2] rpm: support RHEL9 --- package/rpm/brpc.spec | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/package/rpm/brpc.spec b/package/rpm/brpc.spec index 9d472b197a..e0994098ff 100644 --- a/package/rpm/brpc.spec +++ b/package/rpm/brpc.spec @@ -25,7 +25,7 @@ Summary: An industrial-grade RPC framework used throughout Baidu, with 1,000,000 Group: Development License: Apache2 URL: https://github.com/apache/incubator-brpc -Source0: incubator-brpc-%{version}.tar.gz +Source0: apache-brpc-%{version}-incubating-src.tar.gz # https://access.redhat.com/solutions/519993 %global _filter_GLIBC_PRIVATE 1 @@ -42,6 +42,9 @@ BuildRequires: devtoolset-8-gcc-c++ %define __strip /opt/rh/devtoolset-8/root/usr/bin/strip %endif +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: gflags-devel >= 2.1 BuildRequires: protobuf-devel >= 2.4 BuildRequires: leveldb-devel @@ -64,29 +67,36 @@ Requires: brpc-devel = %{version}-%{release} Static %{name} libraries. %prep -%setup -n incubator-%{name}-%{version} - +%setup -n apache-%{name}-%{version}-incubating-src %build -mkdir -p %{_target_platform} - -pushd %{_target_platform} - %if 0%{?use_devtoolset} . /opt/rh/devtoolset-8/enable %endif -%{cmake} .. +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8 +%{cmake} -DBUILD_BRPC_TOOLS:BOOLEAN=OFF -DDOWNLOAD_GTEST:BOOLEAN=OFF +%{cmake_build} +%else +mkdir -p %{_target_platform} +pushd %{_target_platform} +%{cmake} -DBUILD_BRPC_TOOLS:BOOLEAN=OFF -DDOWNLOAD_GTEST:BOOLEAN=OFF .. make %{?_smp_mflags} + popd +%endif %install rm -rf $RPM_BUILD_ROOT +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8 +%{cmake_install} +%else pushd %{_target_platform} %make_install popd +%endif %clean rm -rf $RPM_BUILD_ROOT