2022-08-12 11:51:41 +08:00
|
|
|
Name: dpu-utilities
|
|
|
|
|
Summary: openEuler dpu utilities
|
2022-11-28 20:46:10 +08:00
|
|
|
Version: 1.1
|
2023-02-10 17:23:35 +08:00
|
|
|
Release: 4
|
2022-08-12 11:51:41 +08:00
|
|
|
License: GPL-2.0
|
2022-11-28 20:46:10 +08:00
|
|
|
Source: https://gitee.com/openeuler/dpu-utilities/repository/archive/v%{version}.tar.gz
|
2022-08-12 11:51:41 +08:00
|
|
|
ExclusiveOS: linux
|
|
|
|
|
URL: https://gitee.com/openeuler/dpu-utilities
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
Conflicts: %{name} < %{version}-%{release}
|
|
|
|
|
Provides: %{name} = %{version}-%{release}
|
2022-08-17 10:47:55 +08:00
|
|
|
%define kernel_version %(ver=`rpm -qa|grep kernel-devel`;echo ${ver#*kernel-devel-})
|
2023-02-10 17:23:35 +08:00
|
|
|
BuildRequires: kernel-devel >= 5.10, gcc, make, glib2-devel, glib2
|
2022-11-28 20:46:10 +08:00
|
|
|
BuildRequires: golang
|
2022-12-08 11:27:26 +08:00
|
|
|
Patch0: 0001-add-path-put-in-xattr-set.patch
|
|
|
|
|
Patch1: 0002-Add-drop-link-and-dentry-invalid-in-unlink-and-rmdir.patch
|
|
|
|
|
Patch2: 0003-enable-rexec-read-net-addr-from-config-file.patch
|
2022-12-15 10:26:31 +08:00
|
|
|
Patch3: 0004-Fix-inode-sync-error-between-client-and-server.patch
|
2023-02-10 17:23:35 +08:00
|
|
|
Patch4: 0005-Add-whitelist-of-qtfs.patch
|
|
|
|
|
Patch5: 0006-Fix-error-of-getxattr-and-listxattr.patch
|
|
|
|
|
Patch6: 0007-Add-whitelist-of-rexec.patch
|
|
|
|
|
Patch7: 0008-Add-udsproxy.patch
|
|
|
|
|
Patch8: 0009-Add-rexec-shim.patch
|
2023-02-10 14:00:05 +00:00
|
|
|
Patch9: 0010-Adapt-to-kernel-6.1-file-system-interface-changes.patch
|
2022-08-12 11:51:41 +08:00
|
|
|
%description
|
|
|
|
|
This package contains the software utilities on dpu.
|
|
|
|
|
|
2022-08-16 21:49:17 +08:00
|
|
|
%package -n dpuos-imageTailor-config
|
|
|
|
|
Summary: dpuos imageTailor configrations
|
|
|
|
|
Requires: imageTailor
|
2022-08-17 10:47:55 +08:00
|
|
|
|
2022-08-16 21:49:17 +08:00
|
|
|
%description -n dpuos-imageTailor-config
|
|
|
|
|
imageTailor configration files for dpuos
|
|
|
|
|
|
2022-08-17 10:47:55 +08:00
|
|
|
%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.
|
|
|
|
|
|
2022-08-12 11:51:41 +08:00
|
|
|
%prep
|
2022-11-28 20:46:10 +08:00
|
|
|
%autosetup -n %{name}-v%{version} -p1
|
2022-08-12 11:51:41 +08:00
|
|
|
|
|
|
|
|
%build
|
2022-11-28 20:46:10 +08:00
|
|
|
sed -i "s#KBUILD=.*#KBUILD=/lib/modules/%{kernel_version}/build#" %_builddir/%{name}-v%{version}/qtfs/qtfs/Makefile
|
|
|
|
|
sed -i "s#KBUILD=.*#KBUILD=/lib/modules/%{kernel_version}/build#" %_builddir/%{name}-v%{version}/qtfs/qtfs_server/Makefile
|
|
|
|
|
cd %_builddir/%{name}-v%{version}/qtfs/qtfs
|
2022-08-12 11:51:41 +08:00
|
|
|
make
|
2022-11-28 20:46:10 +08:00
|
|
|
cd %_builddir/%{name}-v%{version}/qtfs/qtfs_server
|
|
|
|
|
make
|
|
|
|
|
cd %_builddir/%{name}-v%{version}/qtfs/rexec
|
2022-08-12 11:51:41 +08:00
|
|
|
make
|
2023-02-10 17:23:35 +08:00
|
|
|
cd %_builddir/%{name}-v%{version}/qtfs/ipc
|
|
|
|
|
make
|
2022-08-12 11:51:41 +08:00
|
|
|
|
|
|
|
|
%install
|
2023-02-10 17:23:35 +08:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra
|
2022-08-12 11:51:41 +08:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
2023-02-10 17:23:35 +08:00
|
|
|
mkdir -p ${RPM_BUILD_ROOT}/usr/lib64/
|
2022-11-28 20:46:10 +08:00
|
|
|
install %_builddir/%{name}-v%{version}/qtfs/qtfs/qtfs.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra
|
|
|
|
|
install %_builddir/%{name}-v%{version}/qtfs/qtfs_server/qtfs_server.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra
|
|
|
|
|
install -m 0700 %_builddir/%{name}-v%{version}/qtfs/qtfs_server/engine $RPM_BUILD_ROOT/usr/bin/
|
|
|
|
|
install -m 0700 %_builddir/%{name}-v%{version}/qtfs/rexec/rexec ${RPM_BUILD_ROOT}/usr/bin/
|
|
|
|
|
install -m 0700 %_builddir/%{name}-v%{version}/qtfs/rexec/rexec_server ${RPM_BUILD_ROOT}/usr/bin/
|
2023-02-10 17:23:35 +08:00
|
|
|
install -m 0700 %_builddir/%{name}-v%{version}/qtfs/ipc/udsproxyd ${RPM_BUILD_ROOT}/usr/bin/
|
|
|
|
|
install -m 0700 %_builddir/%{name}-v%{version}/qtfs/ipc/libudsproxy.so ${RPM_BUILD_ROOT}/usr/lib64/
|
2022-08-16 21:49:17 +08:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/opt/imageTailor
|
2022-11-28 20:46:10 +08:00
|
|
|
cp -rf %_builddir/%{name}-v%{version}/dpuos/image_tailor_cfg/custom $RPM_BUILD_ROOT/opt/imageTailor
|
|
|
|
|
cp -rf %_builddir/%{name}-v%{version}/dpuos/image_tailor_cfg/kiwi $RPM_BUILD_ROOT/opt/imageTailor
|
2022-08-12 11:51:41 +08:00
|
|
|
|
2022-08-17 10:47:55 +08:00
|
|
|
%clean
|
|
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
|
|
|
|
|
%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
|
2022-11-28 20:46:10 +08:00
|
|
|
%attr(0700, root, root) /usr/bin/rexec_server
|
|
|
|
|
%attr(0700, root, root) /usr/bin/rexec
|
2023-02-10 17:23:35 +08:00
|
|
|
%attr(0700, root, root) /usr/bin/udsproxyd
|
|
|
|
|
%attr(0700, root, root) /usr/lib64/libudsproxy.so
|
2022-08-17 10:47:55 +08:00
|
|
|
|
|
|
|
|
%files -n qtfs-server
|
|
|
|
|
/lib/modules/%{kernel_version}/extra/qtfs_server.ko
|
|
|
|
|
%attr(0700, root, root) /usr/bin/engine
|
2022-11-28 20:46:10 +08:00
|
|
|
%attr(0700, root, root)/usr/bin/rexec_server
|
|
|
|
|
%attr(0700, root, root)/usr/bin/rexec
|
2022-08-12 11:51:41 +08:00
|
|
|
|
2022-08-16 21:49:17 +08:00
|
|
|
%files -n dpuos-imageTailor-config
|
|
|
|
|
/opt/imageTailor/custom/*
|
|
|
|
|
/opt/imageTailor/kiwi/*
|
|
|
|
|
|
|
|
|
|
%post -n dpuos-imageTailor-config
|
|
|
|
|
sed -i '/# product_name product_type/a\dpuos PANGEA EMBEDDED DISK ISO install_mode=install install_media=CD install_repo=CD selinux=0' /opt/imageTailor/kiwi/eulerkiwi/product.conf
|
|
|
|
|
sed -i '/# product cut_conf/a\dpuos kiwi/minios/cfg_dpuos yes' /opt/imageTailor/kiwi/eulerkiwi/minios.conf
|
|
|
|
|
sed -i '/<repository_rule>/a\dpuos 1 rpm-dir euler_base' /opt/imageTailor/repos/RepositoryRule.conf
|
|
|
|
|
|
2022-08-12 11:51:41 +08:00
|
|
|
%changelog
|
2023-02-10 17:23:35 +08:00
|
|
|
* Thu Feb 09 2023 YangXin <245051644@qq.com> 1.1-4
|
|
|
|
|
- Add whitelist to qtfs and rexec, fix errors, add udsproxy.
|
2022-12-15 10:26:31 +08:00
|
|
|
* Thu Dec 15 2022 YangXin <245051644@qq.com> 1.1-3
|
|
|
|
|
- Fix inode sync error between client and server.
|
2022-12-08 11:27:26 +08:00
|
|
|
* Thu Dec 08 2022 YangXin <245051644@qq.com> 1.1-2
|
|
|
|
|
- Fix error of qtfs and modify rexec to enable reading net addr from file.
|
2022-11-28 20:46:10 +08:00
|
|
|
* Mon Nov 28 2022 Weifeng Su <suweifeng1@huawei.com> 1.1-1
|
|
|
|
|
- Upgrade dpu-utilities version to 1.1
|
2022-08-17 10:47:55 +08:00
|
|
|
* Wed Aug 17 2022 yangxin <245051644@qq.com> 1.0-2
|
|
|
|
|
- Split dpu-utilities into three packages.
|
2022-08-12 11:51:41 +08:00
|
|
|
* Fri Aug 12 2022 yangxin <245051644@qq.com> 1.0-1
|
|
|
|
|
- First Spec Version Include qtfs shared filesystem Driver Code
|