Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
4efceec6a9
!36 [sync] PR-32: Add source in .spec to fix issue about self-compilation failure
From: @openeuler-sync-bot 
Reviewed-by: @liu-yuntao-10 
Signed-off-by: @liu-yuntao-10
2024-04-11 02:40:30 +00:00
pan_y
0a04980915 add source in .spec to fix issue about self-compilation failure
(cherry picked from commit 7b2f8fe7891a6b5dde089312dd7d56d3425de3de)
2024-04-11 10:07:34 +08:00
openeuler-ci-bot
bb02215e96
!34 [sync] PR-31: fix issue can not find native-turbo.service
From: @openeuler-sync-bot 
Reviewed-by: @ironictwist 
Signed-off-by: @ironictwist
2024-04-09 09:06:14 +00:00
Tie Liu
6942b550cc fix issue can not find native-turbo.service
(cherry picked from commit f18f14300a8357b42018b804db0cf6b6da0128a2)
2024-03-14 19:53:24 +08:00
openeuler-ci-bot
2a77b4a778
!28 create static libs and change subpackage name
From: @ironictwist 
Reviewed-by: @gameoverboss 
Signed-off-by: @gameoverboss
2023-07-13 08:48:49 +00:00
Tie Liu
e10dd2a85e add all static lib in devel subpackage 2023-07-13 16:45:44 +08:00
Tie Liu
b1533cec9f add requires xz, binutils for objreloc 2023-07-11 20:02:54 +08:00
Tie Liu
5240bf773d change subpackage name 2023-07-11 15:47:03 +08:00
Tie Liu
94062458f7 create static libs 2023-06-12 15:31:20 +08:00
openeuler-ci-bot
dc61c7f5da
!12 reset libs for sysboostd
From: @ironictwist 
Reviewed-by: @liu-yuntao-10 
Signed-off-by: @liu-yuntao-10
2023-05-17 09:41:55 +00:00
Tie Liu
8791691d04 reset libs for sysboostd 2023-05-17 17:38:55 +08:00
3 changed files with 57 additions and 41 deletions

View File

@ -1,19 +1,19 @@
#needsrootforbuild
%global __cargo_skip_build 0
%global __cargo_common_opts %{?__cargo_common_opts} --all
Name: sysboost
Name: native-turbo
Version: 1.0.0
Release: 3
Release: 7
Summary: Numa Aware Scheduling
License: Mulan PSL v2
URL: https://gitee.com/openeuler/native-turbo
Source0: %{name}.tar.xz
Source1: objreloc.sh
BuildRequires: meson >= 0.49.2, clang >= 12.0.1
BuildRequires: make >= 4.0, bison >= 2.7, binutils >= 2.30-17, gcc >= 10.3.1
BuildRequires: ncurses-devel
BuildRequires: rust rust-packaging cargo
%description
sysboost can merge ELF files to improve performance.
@ -21,12 +21,17 @@ sysboost can merge ELF files to improve performance.
# Add devel subpackage
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: binutils
%description devel
The %{name}-devel package contains some tools of sysboost.
%package tools
Summary: Some tools for %{name}
Requires: xz, binutils
%description tools
The %{name}-tools package contains some tools of sysboost.
%prep
export RPM_BUILD_DIR=%_topdir/BUILD
export RPM_BUILD_SOURCE=%_topdir/SOURCES
@ -34,68 +39,73 @@ export RPM_BUILD_SOURCE=%_topdir/SOURCES
tar -Jxf $RPM_BUILD_SOURCE/%{name}.tar.xz
cp $RPM_BUILD_SOURCE/objreloc.sh $RPM_BUILD_DIR/objreloc
cp $RPM_BUILD_DIR/native-turbo/sysboost/Cargo.toml $RPM_BUILD_DIR/
%cargo_prep
%cargo_generate_buildrequires
%build
cd $RPM_BUILD_DIR/native-turbo/sysboost
%cargo_build -a
cd $RPM_BUILD_DIR/native-turbo
make release
make
%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/usr/include/
pushd native-turbo/build
install -D -p -m 750 ./sysboost/sysboost $RPM_BUILD_ROOT/%{_bindir}/sysboost
install -D -p -m 750 ./sysboost/src/static_template/sysboost_static_template $RPM_BUILD_ROOT/%{_bindir}/sysboost_static_template
install -D -p -m 750 ./sysboost/src/libhook/libhook.so $RPM_BUILD_ROOT/%{_bindir}/libhook.so
install -D -p -m 644 ./lib/libsi_array.a $RPM_BUILD_ROOT/%{_libdir}/libsi_array.a
install -D -p -m 644 ./lib/libsi_hashmap.a $RPM_BUILD_ROOT/%{_libdir}/libsi_hashmap.a
install -D -p -m 644 ./lib/libsi_ring.a $RPM_BUILD_ROOT/%{_libdir}/libsi_ring.a
install -D -p -m 644 ./lib/libsi_sys.a $RPM_BUILD_ROOT/%{_libdir}/libsi_sys.a
popd
pushd native-turbo/sysboost
install -D -p -m 640 %{name}.service $RPM_BUILD_ROOT/usr/lib/systemd/system/%{name}.service
install -D -p -m 750 ./target/debug/sysboostd $RPM_BUILD_ROOT%{_bindir}/
pushd native-turbo
install -D -p -m 644 ./lib/sys/include/* $RPM_BUILD_ROOT/usr/include/
install -D -p -m 644 ./lib/hashmap/si_hashmap.h $RPM_BUILD_ROOT/usr/include/si_hashmap.h
install -D -p -m 644 ./lib/array/si_array.h $RPM_BUILD_ROOT/usr/include/si_array.h
install -D -p -m 644 ./lib/ring/si_ring_core.h $RPM_BUILD_ROOT/usr/include/si_ring_core.h
install -D -p -m 644 ./lib/ring/si_ring.h $RPM_BUILD_ROOT/usr/include/si_ring.h
popd
install -m 755 $RPM_BUILD_DIR/objreloc $RPM_BUILD_ROOT%{_bindir}/
mkdir -p %{buildroot}/etc/sysboost.d/
mkdir -p %{buildroot}/var/lib/sysboost/
%check
%files
%defattr(-,root,root,-)
%dir /etc/sysboost.d/
%dir /var/lib/sysboost/
%{_bindir}/sysboost
%{_bindir}/sysboost_static_template
%{_bindir}/libhook.so
%{_bindir}/sysboostd
/usr/lib/systemd/system/%{name}.service
%files devel
%{_libdir}/*
/usr/include/*
%files tools
%defattr(0755,root,root)
%{_bindir}/objreloc
%doc
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%changelog
* Thu Sep 7 2023 yangpan <yangpan51@huawei.com> - 1.0.0-7
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: fix issue about self-compilation failure
* Tue Aug 29 2023 liutie <liutie4@huawei.com> - 1.0.0-6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: fix issue can not find native-turbo.service
* Mon Jun 12 2023 liutie <liutie4@huawei.com> - 1.0.0-5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: when tools should run with xz and
* Mon Jun 12 2023 liutie <liutie4@huawei.com> - 1.0.0-4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: create static libs and change devel subpackage name
* Tue May 16 2023 liutie <liutie4@huawei.com> - 1.0.0-3
- Type:enhancement
- ID:NA
@ -115,3 +125,7 @@ mkdir -p %{buildroot}/var/lib/sysboost/
- DESC: Independently generate the objreloc tool
* Thu Apr 6 2023 liutie <liutie4@huawei.com> - 1.0.0-0
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: init

View File

@ -12,4 +12,6 @@ fi
# Remove debug and unnecessary sections, and create relocation and primary files
objcopy --strip-debug --strip-dwo --strip-unneeded "$LIB_FILE" "$LIB_FILE.relocation"
objcopy --remove-relocations=".*" "$LIB_FILE" "$LIB_FILE.prim"
xz -z "$LIB_FILE.relocation"
mv -f "$LIB_FILE.relocation.xz" "$LIB_FILE.relocation"
# objcopy --remove-relocations=".*" "$LIB_FILE" "$LIB_FILE.prim"