dist: tk4: add historical tlinux_cciss_link

Upstream: no

Not sure if anyone still using it but try best to be compatible.

Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
Kairui Song 2022-10-13 20:45:40 +08:00
parent 6d04ab057e
commit ac2b844f13
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#!/bin/sh
if [ -b /dev/sda -a ! -b /dev/cciss/c0d0 ]; then
mkdir -p /dev/cciss
set -- 0 a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 10 k 11 l 12 m 13 n 14 o 15 p
while [ $# -ge 2 ]; do
c=/dev/cciss/c0d$1; shift
s=/dev/sd$1; shift
ln -s ${s} ${c}
ln -s ${s}1 ${c}p1
ln -s ${s}2 ${c}p2
ln -s ${s}3 ${c}p3
ln -s ${s}4 ${c}p4
done
fi

View File

@ -193,6 +193,8 @@ Source30: check-kabi
# Start from Source2000 to Source2999, for userspace tools
Source2000: cpupower.service
Source2001: cpupower.config
# TK4 Legacy CCISS naming rule
Source2002: tlinux_cciss_link_compat.modules
### TK4 Legacy MLNX OFED
Source3000: MLNX_OFED_SRC-5.1-2.5.8.0.46.tgz
@ -923,6 +925,11 @@ InstTools() {
install -m755 slabinfo %{buildroot}%{_bindir}/slabinfo
install -m755 page_owner_sort %{buildroot}%{_bindir}/page_owner_sort
popd
%ifarch x86_64
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/modules
install -m755 %{SOURCE2002} %{buildroot}%{_sysconfdir}/sysconfig/modules
%endif
# with_tools
}
@ -1195,6 +1202,13 @@ fi
%ghost /lib/modules/%{kernel_unamer}/modules.symbols.bin
%files modules -f modules.list
%ifarch x86_64
# TK4 Legacy CCISS naming rule
#
# This might be duplicated with tlinux_cciss_link.modules from the old kernel-tlinux package,
# but that's fine since the script itself checks if it's neccessary to re-apply the workaround
%{_sysconfdir}/sysconfig/modules/tlinux_cciss_link_compat.modules
%endif
%defattr(-,root,root)
%files devel