代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/communication_ipc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%define debug_package %{nil}
%global build_opt /opt/distributed-middleware-build
%global oh_version OpenHarmony-v3.2-Release
%global oe_version openEuler-22.03-LTS-SP2
%global communication_path %{_builddir}/foundation/communication
%global third_party_path %{_builddir}/third_party
%global binder_dest_path /usr/lib/modules/%(uname -r)/binder
%global ashmem_dest_path /usr/lib/modules/%(uname -r)/ashmem
%define with_ashmem 0
%define with_install_ko 0
Name: communication_ipc
Version: 1.0.0
Release: 7%{?dist}
Summary: Inter-process communication (IPC) and Remote Procedure Call (RPC)
License: Apache-2.0 and GPL-2.0
URL: https://gitee.com/openharmony/communication_ipc
Source1: https://gitee.com/openharmony/communication_ipc/repository/archive/OpenHarmony-v3.2-Release.tar.gz #/communication_ipc-OpenHarmony-v3.2-Release.tar.gz
Source2: https://gitee.com/openharmony/communication_dsoftbus/repository/archive/OpenHarmony-v3.2-Release.tar.gz #/communication_dsoftbus-OpenHarmony-v3.2-Release.tar.gz
Source3: https://gitee.com/openharmony/third_party_sqlite/repository/archive/OpenHarmony-v3.2-Release.tar.gz #/third_party_sqlite-OpenHarmony-v3.2-Release.tar.gz
Source4: https://gitee.com/openharmony/third_party_libcoap/repository/archive/OpenHarmony-v3.2-Release.tar.gz #/third_party_libcoap-OpenHarmony-v3.2-Release.tar.gz
Source5: https://gitee.com/openharmony/third_party_mbedtls/repository/archive/OpenHarmony-v3.2-Release.tar.gz #/third_party_mbedtls-OpenHarmony-v3.2-Release.tar.gz
Source6: https://gitee.com/openeuler/kernel/binder-6.6.0.tar.gz
Source7: ipc.bundle.json
Source8: ipc.BUILD.gn
Source9: ipc_core.BUILD.gn
Source10: ipc_single.BUILD.gn
Source11: binder.BUILD.gn
Source12: mbedtls.BUILD.gn
Source13: dsoftbus.bundle.json
Source14: dsoftbus.BUILD.gn
Source15: sdk.BUILD.gn
Source16: https://gitee.com/openeuler/kernel/ashmem-%{oe_version}.tar.gz
Source17: binder.pp
Patch1: 0001-remove-dependence-on-access-token-and-hitrace.patch
Patch2: 0002-fix-build-error-from-header-include.patch
Patch3: 0003-Adapt-binder-as-a-kernel-module-on-kernel-6.6.0-10.patch
Patch4: 0004-adapt-compilation-for-softbus_client.patch
Patch5: 0005-feat-for-embedded-fix-ipc-compile-error.patch
Patch6: 0006-feat-for-embedded-fix-dsoftbus-compile-errors.patch
Patch7: 0007-feat-for-embedded-fix-sqlite-stringop-warning.patch
Patch8: 0008-fix-binder-kallsyms-initialization-error.patch
BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks
BuildRequires: commonlibrary_c_utils
BuildRequires: distributed-build, distributed-beget
BuildRequires: notification_eventhandler
BuildRequires: cjson-devel, compat-openssl11-devel
Requires: commonlibrary_c_utils
Requires: distributed-beget
Requires: notification_eventhandler
Requires: cjson-devel, compat-openssl11-devel
%description
The inter-process communication (IPC) and remote procedure call (RPC) mechanisms are used to implement cross-process communication.
# Decompress source code package, make patches to the source code.
%prep
rm -rf %{_builddir}/*
cp -rf %{build_opt} %{_builddir}/build
[ ! -L "%{_builddir}/build.sh" ] && ln -s %{_builddir}/build/build_scripts/build.sh %{_builddir}/build.sh
[ ! -L "%{_builddir}/.gn" ] && ln -s %{_builddir}/build/core/gn/dotfile.gn %{_builddir}/.gn
[ ! -L "%{_builddir}/build.py" ] && ln -s %{_builddir}/build/lite/build.py %{_builddir}/build.py
cp -rf %{_builddir}/build/openeuler/vendor %{_builddir}/
cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}
%setup -q -D -T -a 1 -c -n %{communication_path}
mv %{communication_path}/%{name} %{communication_path}/ipc
%patch -P1 -p1 -d %{communication_path}/ipc
%patch -P2 -p1 -d %{communication_path}/ipc
%patch -P5 -p1 -d %{communication_path}/ipc
%setup -q -D -T -a 2 -c -n %{communication_path}
mv %{communication_path}/communication_dsoftbus-%{oh_version} %{communication_path}/dsoftbus
%patch -P4 -p1 -d %{communication_path}/dsoftbus
%patch -P6 -p1 -d %{communication_path}/dsoftbus
%setup -q -D -T -a 3 -c -n %{third_party_path}
mv %{third_party_path}/third_party_sqlite-%{oh_version} %{third_party_path}/sqlite
%patch -P7 -p1 -d %{third_party_path}/sqlite
%setup -q -D -T -a 4 -c -n %{third_party_path}
mv %{third_party_path}/third_party_libcoap-%{oh_version} %{third_party_path}/libcoap
%setup -q -D -T -a 5 -c -n %{third_party_path}
mv %{third_party_path}/third_party_mbedtls-%{oh_version} %{third_party_path}/mbedtls
%setup -q -D -T -a 6 -c -n %{_builddir}
%patch -P3 -p1 -d %{_builddir}/binder
%patch -P8 -p1 -d %{_builddir}/binder
%setup -q -D -T -a 16 -c -n %{_builddir}
%build
%ifarch x86_64
%{_builddir}/build.sh --product-name openeuler --target-cpu x86_64
%endif
%ifarch aarch64
%{_builddir}/build.sh --product-name openeuler --target-cpu arm64
%endif
# build binder
cd %{_builddir}/binder
make %{?_smp_mflags}
%if 0%{?with_ashmem}
cd %{_builddir}/ashmem/src
make %{?_smp_mflags}
%endif
%install
install -d -m 0755 %{buildroot}/%{_includedir}/ipc
install -d -m 0755 %{buildroot}/%{_includedir}/mbedtls
install -d -m 0755 %{buildroot}/%{_includedir}/dsoftbus
install -d -m 0755 %{buildroot}/%{_libdir}
install -d -m 0755 %{buildroot}/system/lib64
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/ipc_core
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/ipc_single
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/libdbinder
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/third_party/json
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/third_party/mbedtls/
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/sdk/
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/inner_kits
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/bus_center
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/common
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/discovery
install -d -m 0755 %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/transport
%ifarch aarch64
%define header_out_path out/openeuler/innerkits/linux-arm64/ipc
%define module_out_path out/openeuler/linux_clang_arm64
%define dsoftbus_header_out_path out/openeuler/innerkits/linux-arm64/dsoftbus
%endif
%ifarch x86_64
%define header_out_path out/openeuler/innerkits/linux-x86_64/ipc
%define module_out_path out/openeuler/linux_clang_x86_64
%define dsoftbus_header_out_path out/openeuler/innerkits/linux-x86_64/dsoftbus
%endif
# install libs and headers from ipc
install -m 0755 %{_builddir}/%{module_out_path}/communication/ipc/*.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{module_out_path}/communication/ipc/*.so %{buildroot}/system/lib64
find %{_builddir}/%{header_out_path} -name *.h -print0 | xargs -0 -i cp -rf {} %{buildroot}%{_includedir}/ipc/
# install libs and headers from dsoftbus
%define dsoftbus_module_path %{module_out_path}/communication/dsoftbus
rm -f %{_builddir}/%{dsoftbus_module_path}/libsoftbus_server.z.so
install -m 0755 %{_builddir}/%{dsoftbus_module_path}/*.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{dsoftbus_module_path}/*.so %{buildroot}/system/lib64
# install libs and headers from third party components
%define third_party_module_path %{module_out_path}/common/common
install -m 0755 %{_builddir}/%{third_party_module_path}/*.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{third_party_module_path}/*.so %{buildroot}/system/lib64
install -m 0755 %{_builddir}/%{module_out_path}/common/dsoftbus/*.so %{buildroot}/%{_libdir}
install -m 0755 %{_builddir}/%{module_out_path}/common/dsoftbus/*.so %{buildroot}/system/lib64
install -m 0755 %{_builddir}/third_party/mbedtls/include/mbedtls/*.h %{buildroot}/%{_includedir}/mbedtls/
install -m 0755 %{_builddir}/foundation/communication/ipc/interfaces/innerkits/libdbinder/include/rpc_system_ability_callback.h %{buildroot}/%{_includedir}/ipc/
install -m 0755 %{_builddir}/foundation/communication/dsoftbus/interfaces/kits/common/softbus_error_code.h %{buildroot}/%{_includedir}/dsoftbus/
install -m 0755 %{_builddir}/foundation/communication/dsoftbus/interfaces/inner_kits/transport/inner_session.h %{buildroot}/%{_includedir}/dsoftbus/
install -m 0755 %{communication_path}/ipc/interfaces/innerkits/libdbinder/include/* %{buildroot}/%{_includedir}/ipc/
install -m 0755 %{communication_path}/dsoftbus/sdk/transmission/session/cpp/include/* %{buildroot}/%{_includedir}/ipc/
find %{_builddir}/%{header_out_path} -name *.h -print0 | xargs -0 -i cp -rf {} %{buildroot}/%{_includedir}/ipc/
find %{_builddir}/%{dsoftbus_header_out_path} -name *.h -print0 | xargs -0 -i cp -rvf {} %{buildroot}/%{_includedir}/dsoftbus/
#copy bundle.json
install -m 0755 %{SOURCE13} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/bundle.json
#copy BUILD.gn
install -m 0755 %{SOURCE7} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/bundle.json
install -m 0755 %{SOURCE8} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/BUILD.gn
install -m 0755 %{SOURCE9} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/ipc_core/BUILD.gn
install -m 0755 %{SOURCE10} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/ipc_single/BUILD.gn
install -m 0755 %{SOURCE11} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/libdbinder/BUILD.gn
install -m 0755 %{SOURCE12} %{buildroot}/%{build_opt}/openeuler/compiler_gn/third_party/mbedtls/BUILD.gn
install -m 0755 %{SOURCE14} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/BUILD.gn
install -m 0755 %{SOURCE15} %{buildroot}/%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/sdk/BUILD.gn
# install ko file of binder
install -d %{buildroot}/%{binder_dest_path}/
install -d %{buildroot}/%{ashmem_dest_path}/
install -m 0755 %{_builddir}/binder/binder_linux.ko %{buildroot}/%{binder_dest_path}/
%if 0%{?with_ashmem}
install -m 0755 %{_builddir}/ashmem/src/ashmem_linux.ko %{buildroot}/%{ashmem_dest_path}/
%endif
mkdir -p %{buildroot}/usr/share/pp
install -m 0755 %{SOURCE17} %{buildroot}/usr/share/pp/binder.pp
#create soft link
ln -s /usr/mbedtls/include %{buildroot}%{build_opt}/openeuler/compiler_gn/third_party/mbedtls/include
ln -s /usr/include/ipc %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/ipc_core/include
ln -s /usr/include/ipc %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/ipc/interfaces/innerkits/libdbinder/include
ln -s /usr/include/nlohmann_json %{buildroot}%{build_opt}/openeuler/compiler_gn/third_party/json/include
ln -s /usr/include/nlohmann_json/single_include %{buildroot}%{build_opt}/openeuler/compiler_gn/third_party/json/single_include
ln -s /usr/include/dsoftbus %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/inner_kits/transport
ln -s /usr/include/dsoftbus %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/bus_center/include
ln -s /usr/include/dsoftbus %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/common/include
ln -s /usr/include/dsoftbus %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/discovery/include
ln -s /usr/include/dsoftbus %{buildroot}%{build_opt}/openeuler/compiler_gn/foundation/communication/dsoftbus/interfaces/kits/transport/include
%files
%{_libdir}/*.so
%{_includedir}/ipc/*
%{_includedir}/mbedtls/*
%{_includedir}/dsoftbus/*
/system/*
/%{binder_dest_path}/*.ko
%if 0%{?with_ashmem}
/%{ashmem_dest_path}/*.ko
%endif
%{build_opt}/*
/usr/share/pp
%post
semodule -X 300 -i /usr/share/pp/binder.pp
%if 0%{?with_install_ko}
insmod /%{binder_dest_path}/*.ko
%if 0%{?with_ashmem}
insmod /%{ashmem_dest_path}/*.ko
%endif
%endif
%changelog
* Mon May 13 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-7
- Fix binder kallsyms initialization error
* Wed Apr 3 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-6
- Fix sdk and binder sysroot path for embedded
* Tue Mar 26 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-5
- Fix ipc_util_config include_dirs for embedded
* Fri Mar 22 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-4
- Fix ipc and dsoftbus compile errors for embedded
* Wed Dec 20 2023 Peng He <hepeng68@huawei.com> - 1.0.0-3
- correct default ethernet interface from enp7s0 to eth0
* Mon Dec 18 2023 yanansong <songyanan5@huawei.com> - 1.0.0-2
- enable linux ko building and insmod it
* Sun Oct 08 2023 Peng He <hepeng68@huawei.com> - 1.0.0-1
* Thu Nov 22 2023 JiaQi Zhao <zhaojiaqi18@huawei.com> - 1.0.0-1
- Init package
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。