1 Star 0 Fork 28

markeryang/kmod

forked from src-openEuler/kmod 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
kmod.spec 5.20 KB
一键复制 编辑 原始数据 按行查看 历史
love_hangzhou 提交于 2021-06-18 15:22 . backport patch to fix some bugs
Name: kmod
Version: 27
Release: 5
Summary: Kernel module management
# GPLv2+ is used by programs, LGPLv2+ is used for libraries.
License: GPLv2+ and LGPLv2+
URL: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
Source1: weak-modules
Source2: depmod.conf.dist
Patch6000: backport-libkmod-fix-return-error-when-opening-index.patch
Patch6001: backport-libkmod-allow-modules.alias.builtin-to-be-optional.patch
Patch6002: backport-depmod-do-not-output-.bin-to-stdout.patch
Patch6003: backport-libkmod-kmod_builtin_get_modinfo-free-modinfo-on-err.patch
Patch6004: backport-depmod-output_builtin_alias_bin-free-idx-on-error-pa.patch
Patch6005: backport-libkmod-kmod_log_null-qualify-ctx-argument-as-const.patch
Patch6006: backport-Fix-modinfo-F-always-shows-name-for-built-ins.patch
Patch6007: backport-libkmod-config-fix-a-memory-leak-when-kmod_list_appe.patch
Patch6008: backport-libkmod-fix-an-overflow-with-wrong-modules.builtin.m.patch
Patch6009: backport-libkmod-fix-possible-double-free-with-wrong-modules.patch
Patch6010: backport-libkmod-module-check-new_from_name-return-value-in-g.patch
Patch9000: bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch
BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel
Provides: module-init-tools = 4.0-1
Provides: /sbin/modprobe
%description
The kmod package provides several commands to manage the kernel modules,
such as insmod to load and rmmod to unload the modules.
%package libs
Summary: Libraries to handle kernel module loading and unloading
License: LGPLv2+
%description libs
The kmod-libs package provides runtime libraries for any application that
wishes to load or unload Linux kernel modules from the running system.
%package devel
Summary: Header files for kmod development
Requires: %{name} = %{version}-%{release}
%description devel
The kmod-devel package provides header files used for loading or unloading
kernel modules.
%package help
Summary: Documents and man pages for the kmod
Requires: man info
%description help
The kmod-help package provides several documents and the man pages to help
developers to understand the kmod.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure --with-openssl --with-zlib --with-xz
%make_build
%install
%make_install
pushd $RPM_BUILD_ROOT/%{_mandir}/man5
ln -s modprobe.d.5.gz modprobe.conf.5.gz
popd
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
for i in $RPM_BUILD_ROOT%{_sbindir}/modprobe $RPM_BUILD_ROOT%{_sbindir}/modinfo $RPM_BUILD_ROOT%{_sbindir}/insmod \
$RPM_BUILD_ROOT%{_sbindir}/rmmod $RPM_BUILD_ROOT%{_sbindir}/depmod $RPM_BUILD_ROOT%{_sbindir}/lsmod
do
ln -sf ../bin/kmod $i
done
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
mkdir -p $RPM_BUILD_ROOT/sbin
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%exclude %{_libdir}/*.la
%dir %{_sysconfdir}/*.d
%dir %{_prefix}/lib/modprobe.d
%{_bindir}/kmod
%{_sbindir}/*
%{_datadir}/bash-completion/
%{_sysconfdir}/depmod.d/dist.conf
%files libs
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/libkmod.so.*
%files devel
%{_includedir}/libkmod.h
%{_libdir}/pkgconfig/libkmod.pc
%{_libdir}/libkmod.so
%files help
%attr(0644,root,root) %{_mandir}/man5/*.5*
%attr(0644,root,root) %{_mandir}/man8/*.8*
%doc TODO NEWS README
%changelog
* Fri Jun 18 2021 hushiyuan <hushiyuan@huawei.com> - 27-5
- libkmod-module: check "new_from_name" return value in get_builtin
- libkmod:fix double free for modinfo in modules.buildin.modinfo
- libkmod:fix an overflow with wrong modules.builtin.modinfo
- libkmod-config:fix a memory leak when kmod_list_append failes
- Fix "modinfo -F always shows name for build-ins"
* Thu Jan 14 2021 xinghe <xinghe1@huawei.com> - 27-4
- fix memory leak in kmodinfo and build warning
* Fri Sep 04 2020 xinghe <xinghe1@huawei.com> - 27-3
- backport patch to deal with lspci -v error report
* Fri Aug 21 2020 Wang Shuo<wangshuo_1994@foxmail.com> - 27-2
- remove unnecessary message
* Fri Apr 17 2020 Wang Shuo<wangshuo47@huawei.com> - 27-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: update kmod to 27
* Wed Feb 28 2020 Wang Shuo<wangshuo47@huawei.com> - 25-6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: move libs files to libs package
* Sat Apr 6 2019 luochunsheng<luochunsheng@huawei.com> - 25-5
- Type:enhancement
- ID:NA
- SUG:NA
* Fri Mar 22 2019 kangenbo<kangenbo@huawei.com> - 25-4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: backport patches from communities
* Tue Mar 19 2019 hexiaowen<hexiaowen@huawei.com> - 25-3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add /etc/depmod.d/dist.conf
* Fri Jan 25 2019 Xiaoqi Guo<guoxiaoqi2@huawei.com> - 25-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add patches, include
bugfix-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch
* Thu Jan 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 25-1
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/markeryang/kmod.git
git@gitee.com:markeryang/kmod.git
markeryang
kmod
kmod
master

搜索帮助