代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kmod-drbd90 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Define the kmod package name here.
%define kmod_name drbd90
%define real_name drbd
%global kernel_devel_version %(rpm -qa kernel-devel | awk -F 'kernel-devel-' '{print $2}')
%{!?kmod_kernel_version: %define kmod_kernel_version %(rpm -qa kernel-devel | awk -F 'kernel-devel-|.x86|.aarch' '{print $2}')}
Name: kmod-%{kmod_name}
Version: 9.2.10
Release: 5
Summary: %{kmod_name} kernel module(s)
Group: System Environment/Kernel
License: GPL-2.0-or-later
URL: http://www.drbd.org/
Source0: https://pkg.linbit.com//downloads/drbd/9/drbd-9.2.10.tar.gz
Source1: GPL-v2.0.txt
Patch0: backport-drbd-pretty-print-cluster-wide-state-change.patch
Patch1: backport-drbd-print-node-IDs-when-starting-threads.patch
Patch2: backport-drbd-abort-twopc-directly-from-timer-function.patch
Patch3: backport-drbd-send-nested-twopc-reply-from-system-work-queue.patch
Patch4: backport-drbd-hold-RCU-lock-while-dereferencing-in-calc_data_.patch
Patch5: backport-drbd-hold-a-reference-on-ldev-for-calling-drbd_recon.patch
Patch6: 0014-drbd-clear_peer_slot-give-up-if-drbd_md_get_buffer-r.patch
Patch7: 0016-build-spatch-result-depends-on-gen_patch_names.c.patch
%define __spec_install_post /usr/lib/rpm/check-buildroot \
/usr/lib/rpm/brp-ldconfig \
/usr/lib/rpm/brp-compress \
/usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump \
/usr/lib/rpm/brp-strip-static-archive /usr/bin/strip \
/usr/lib/rpm/brp-python-bytecompile "" 1 \
/usr/lib/rpm/brp-python-hardlink \
PYTHON3="/usr/libexec/platform-python"
%define findpat %( echo "%""P" )
%define __find_requires /usr/lib/rpm/openEuler/find-requires.ksyms
%define dup_state_dir %{_localstatedir}/lib/rpm-state/kmod-dups
%define kver_state_dir %{dup_state_dir}/kver
%define kver_state_file %{kver_state_dir}/%{kmod_kernel_version}.%{_arch}
%define dup_module_list %{dup_state_dir}/rpm-kmod-%{kmod_name}-modules
%define debug_package %{nil}
%global _use_internal_dependency_generator 1
%global kernel_source() %{_usrsrc}/kernels/%{kmod_kernel_version}.%{_arch}
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
ExclusiveArch: x86_64 aarch64
BuildRequires: elfutils-libelf-devel
BuildRequires: kernel-devel >= 4.19.0
BuildRequires: kernel-rpm-macros
BuildRequires: openEuler-rpm-config
Provides: kernel-modules >= %{kmod_kernel_version}.%{_arch}
Provides: kmod-%{kmod_name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires(post): %{_sbindir}/weak-modules
Requires(postun): %{_sbindir}/weak-modules
Requires: kernel >= 4.19.0
%description
DRBD is a distributed replicated block device. It mirrors a
block device over the network to another machine. Think of it
as networked raid 1. It is a building block for setting up
high availability (HA) clusters.
This package provides the %{kmod_name} kernel module(s).
It is built to depend upon the specific ABI provided by a range of releases
of the same variant of the Linux kernel and not on any one specific build.
%prep
%setup -n %{real_name}-%{version}
%autopatch -p1
echo "override drbd * weak-updates/%{kmod_name}" > kmod-%{kmod_name}.conf
echo "override drbd_transport_tcp * weak-updates/%{kmod_name}" >> kmod-%{kmod_name}.conf
%build
%{__make} %{?_smp_mflags} module KDIR=%{kernel_source} KVER=%{kversion}
whitelist="/lib/modules/kabi-current/kabi_whitelist_%{_target_cpu}"
for modules in $( find . -name "*.ko" -type f -printf "%{findpat}\n" | sed 's|\.ko$||' | sort -u ) ; do
# update greylist
nm -u ./$modules.ko | sed 's/.*U //' | sed 's/^\.//' | sort -u | while read -r symbol; do
grep -q "^\s*$symbol\$" $whitelist || echo "$symbol" >> ./greylist
done
done
sort -u greylist | uniq > greylist.txt
%install
%{__install} -d %{buildroot}/lib/modules/%{kmod_kernel_version}.%{_arch}/extra/%{kmod_name}/
%{__install} drbd/build-current/*.ko %{buildroot}/lib/modules/%{kmod_kernel_version}.%{_arch}/extra/%{kmod_name}/
%{__install} -d %{buildroot}%{_sysconfdir}/depmod.d/
%{__install} -m 0644 kmod-%{kmod_name}.conf %{buildroot}%{_sysconfdir}/depmod.d/
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
%{__install} -m 0644 %{SOURCE1} %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
%{__install} -m 0644 greylist.txt %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
# strip the modules(s)
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
# Sign the modules(s)
%if %{?_with_modsign:1}%{!?_with_modsign:0}
# If the module signing keys are not defined, define them here.
%{!?privkey: %define privkey %{_sysconfdir}/pki/SECURE-BOOT-KEY.priv}
%{!?pubkey: %define pubkey %{_sysconfdir}/pki/SECURE-BOOT-KEY.der}
for module in $(find %{buildroot} -type f -name \*.ko);
do %{_usrsrc}/kernels/%{kmod_kernel_version}.%{_arch}/scripts/sign-file \
sha256 %{privkey} %{pubkey} $module;
done
%endif
%clean
%{__rm} -rf %{buildroot}
%post
modules=( $(find /lib/modules/%{kmod_kernel_version}.%{_arch}/extra/%{kmod_name} | grep '\.ko$') )
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules --no-initramfs
mkdir -p "%{kver_state_dir}"
touch "%{kver_state_file}"
exit 0
%posttrans
# We have to re-implement part of weak-modules here because it doesn't allow
# calling initramfs regeneration separately
if [ -f "%{kver_state_file}" ]; then
kver_base="%{kmod_kernel_version}"
kvers=$(ls -d "/lib/modules/${kver_base%%.*}"*)
for k_dir in $kvers; do
k="${k_dir#/lib/modules/}"
tmp_initramfs="/boot/initramfs-$k.tmp"
dst_initramfs="/boot/initramfs-$k.img"
# The same check as in weak-modules: we assume that the kernel present
# if the symvers file exists.
if [ -e "/$k_dir/symvers.gz" ]; then
/usr/bin/dracut -f "$tmp_initramfs" "$k" || exit 1
cmp -s "$tmp_initramfs" "$dst_initramfs"
if [ "$?" = 1 ]; then
mv "$tmp_initramfs" "$dst_initramfs"
else
rm -f "$tmp_initramfs"
fi
fi
done
rm -f "%{kver_state_file}"
rmdir "%{kver_state_dir}" 2> /dev/null
fi
rmdir "%{dup_state_dir}" 2> /dev/null
exit 0
%preun
if rpm -q --filetriggers kmod 2> /dev/null| grep -q "Trigger for weak-modules call on kmod removal"; then
mkdir -p "%{kver_state_dir}"
touch "%{kver_state_file}"
fi
mkdir -p "%{dup_state_dir}"
rpm -ql kmod-%{kmod_name}-%{version}-%{release}.%{_arch} | grep '\.ko$' > "%{dup_module_list}"
%postun
if rpm -q --filetriggers kmod 2> /dev/null| grep -q "Trigger for weak-modules call on kmod removal"; then
initramfs_opt="--no-initramfs"
else
initramfs_opt=""
fi
modules=( $(cat "%{dup_module_list}") )
rm -f "%{dup_module_list}"
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules $initramfs_opt
rmdir "%{dup_state_dir}" 2> /dev/null
exit 0
%files
%defattr(644,root,root,755)
/lib/modules/%{kmod_kernel_version}.%{_arch}/
%config /etc/depmod.d/kmod-%{kmod_name}.conf
%doc /usr/share/doc/kmod-%{kmod_name}-%{version}/
%changelog
* Tue Nov 26 liupei <liupei@kylinos.cn> - 9.2.10-5
* Sun Nov 24 2024 liupei <liupei@kylinos.cn> - 9.2.10-4
- drbd: hold RCU lock while dereferencing in calc_data_accessible()
- drbd: hold a reference on ldev for calling drbd_reconsider_queue_parameters()
* Fri Nov 22 2024 liupei <liupei@kylinos.cn> - 9.2.10-3
- drbd: abort twopc directly from timer function
- drbd: send nested twopc reply from system work queue
* Wed Nov 20 2024 liupei <liupei@kylinos.cn> - 9.2.10-2
- drbd: pretty-print cluster-wide state change
- drbd: print node IDs when starting threads
* Thu Nov 14 2024 liupei <liupei@kylinos.cn> - 9.2.10-1
- update to 9.2.10
* Tue Nov 5 2024 liupei <liupei@kylinos.cn> - 9.2.9-1
- update to 9.2.9
* Thu Aug 15 2024 baiming <bai_ming@topsec.com.cn> - 9.1.21-1
- update to 9.1.21
* Tue Nov 28 2023 liupei <liupei@kylinos.cn> - 9.1.13-1
- update to 9.1.13
* Fri Aug 26 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 9.0.29-2
- Fix install error
* Fri Mar 18 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 9.0.29-1
- Init project
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。