!6 Split dpu-utilities into two packages, qtfs-client and qtfs-server
From: @anar Reviewed-by: @luochenglcs, @minknov Signed-off-by: @minknov
This commit is contained in:
commit
fc0317a0df
@ -1,7 +1,7 @@
|
|||||||
Name: dpu-utilities
|
Name: dpu-utilities
|
||||||
Summary: openEuler dpu utilities
|
Summary: openEuler dpu utilities
|
||||||
Version: 1.0
|
Version: 1.0
|
||||||
Release: 1
|
Release: 2
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
ExclusiveOS: linux
|
ExclusiveOS: linux
|
||||||
@ -9,8 +9,8 @@ URL: https://gitee.com/openeuler/dpu-utilities
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
Conflicts: %{name} < %{version}-%{release}
|
Conflicts: %{name} < %{version}-%{release}
|
||||||
Provides: %{name} = %{version}-%{release}
|
Provides: %{name} = %{version}-%{release}
|
||||||
%define kernel_version %(ls /lib/modules/ | grep 5.10 -m1)
|
%define kernel_version %(ver=`rpm -qa|grep kernel-devel`;echo ${ver#*kernel-devel-})
|
||||||
BuildRequires: kernel-devel, gcc, make
|
BuildRequires: kernel-devel >= 5.10, gcc, make
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -20,9 +20,22 @@ This package contains the software utilities on dpu.
|
|||||||
%package -n dpuos-imageTailor-config
|
%package -n dpuos-imageTailor-config
|
||||||
Summary: dpuos imageTailor configrations
|
Summary: dpuos imageTailor configrations
|
||||||
Requires: imageTailor
|
Requires: imageTailor
|
||||||
|
|
||||||
%description -n dpuos-imageTailor-config
|
%description -n dpuos-imageTailor-config
|
||||||
imageTailor configration files for dpuos
|
imageTailor configration files for dpuos
|
||||||
|
|
||||||
|
%package -n qtfs-client
|
||||||
|
Summary: Client of qtfs
|
||||||
|
|
||||||
|
%description -n qtfs-client
|
||||||
|
qtfs is a shared file system, this is the client of qtfs.
|
||||||
|
|
||||||
|
%package -n qtfs-server
|
||||||
|
Summary: Server of qtfs
|
||||||
|
|
||||||
|
%description -n qtfs-server
|
||||||
|
qtfs is a shared file system, this is the server of qtfs.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
@ -33,19 +46,45 @@ cd %_builddir/%{name}-%{version}/qtfs/qtfs_server
|
|||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/kernel/drivers/dpu-utilities/
|
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel_version}//extra
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
||||||
install %_builddir/%{name}-%{version}/qtfs/qtfs/qtfs.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/kernel/drivers/dpu-utilities/
|
install %_builddir/%{name}-%{version}/qtfs/qtfs/qtfs.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra
|
||||||
install %_builddir/%{name}-%{version}/qtfs/qtfs_server/qtfs_server.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/kernel/drivers/dpu-utilities/
|
install %_builddir/%{name}-%{version}/qtfs/qtfs_server/qtfs_server.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra
|
||||||
install %_builddir/%{name}-%{version}/qtfs/qtfs_server/engine $RPM_BUILD_ROOT/usr/bin/
|
install -m 0700 %_builddir/%{name}-%{version}/qtfs/qtfs_server/engine $RPM_BUILD_ROOT/usr/bin/
|
||||||
mkdir -p $RPM_BUILD_ROOT/opt/imageTailor
|
mkdir -p $RPM_BUILD_ROOT/opt/imageTailor
|
||||||
cp -rf %_builddir/%{name}-%{version}/dpuos/image_tailor_cfg/custom $RPM_BUILD_ROOT/opt/imageTailor
|
cp -rf %_builddir/%{name}-%{version}/dpuos/image_tailor_cfg/custom $RPM_BUILD_ROOT/opt/imageTailor
|
||||||
cp -rf %_builddir/%{name}-%{version}/dpuos/image_tailor_cfg/kiwi $RPM_BUILD_ROOT/opt/imageTailor
|
cp -rf %_builddir/%{name}-%{version}/dpuos/image_tailor_cfg/kiwi $RPM_BUILD_ROOT/opt/imageTailor
|
||||||
|
|
||||||
%files
|
%clean
|
||||||
/lib/modules/%{kernel_version}/kernel/drivers/dpu-utilities/qtfs.ko
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
/lib/modules/%{kernel_version}/kernel/drivers/dpu-utilities/qtfs_server.ko
|
|
||||||
%attr(644, root, root) /usr/bin/engine
|
%post -n qtfs-client
|
||||||
|
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||||
|
/sbin/depmod -a > /dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
%post -n qtfs-server
|
||||||
|
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||||
|
/sbin/depmod -a > /dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun -n qtfs-client
|
||||||
|
if [ "$1" = "0" ] ; then #0: uninstall
|
||||||
|
/sbin/depmod -a > /dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun -n qtfs-server
|
||||||
|
if [ "$1" = "0" ] ; then #0: uninstall
|
||||||
|
/sbin/depmod -a > /dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
%files -n qtfs-client
|
||||||
|
/lib/modules/%{kernel_version}/extra/qtfs.ko
|
||||||
|
|
||||||
|
%files -n qtfs-server
|
||||||
|
/lib/modules/%{kernel_version}/extra/qtfs_server.ko
|
||||||
|
%attr(0700, root, root) /usr/bin/engine
|
||||||
|
|
||||||
%files -n dpuos-imageTailor-config
|
%files -n dpuos-imageTailor-config
|
||||||
/opt/imageTailor/custom/*
|
/opt/imageTailor/custom/*
|
||||||
@ -57,5 +96,7 @@ sed -i '/# product cut_conf/a\dpuos kiwi/minios/cfg_dpuos yes' /opt/imageT
|
|||||||
sed -i '/<repository_rule>/a\dpuos 1 rpm-dir euler_base' /opt/imageTailor/repos/RepositoryRule.conf
|
sed -i '/<repository_rule>/a\dpuos 1 rpm-dir euler_base' /opt/imageTailor/repos/RepositoryRule.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 17 2022 yangxin <245051644@qq.com> 1.0-2
|
||||||
|
- Split dpu-utilities into three packages.
|
||||||
* Fri Aug 12 2022 yangxin <245051644@qq.com> 1.0-1
|
* Fri Aug 12 2022 yangxin <245051644@qq.com> 1.0-1
|
||||||
- First Spec Version Include qtfs shared filesystem Driver Code
|
- First Spec Version Include qtfs shared filesystem Driver Code
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user