SHA256
1
0
forked from pool/kmod

Accepting request 99207 from Base:System

- Update to new upstream release 3
* new APIs in libkmod: get symbols from module, parsing the ELF
  section, dependency symbols, insert module like modprobe
* support for Xz-compressed modules
* the depmod tool

OBS-URL: https://build.opensuse.org/request/show/99207
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2012-01-09 11:04:43 +00:00 committed by Git OBS Bridge
commit c348fb8e58
4 changed files with 71 additions and 13 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:33edf14f28ef9b51d893e6167d846d23fc572f6ba634acf0ad9a6e3925ff55c0
size 262484

3
kmod-3.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b32439703ab2837e81ae80f527f9e964ecb5883a9e80d1cc7518cf6e8593ad9
size 285512

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Fri Jan 6 00:48:41 UTC 2012 - jengelh@medozas.de
- Update to new upstream release 3
* new APIs in libkmod: get symbols from module, parsing the ELF
section, dependency symbols, insert module like modprobe
* support for Xz-compressed modules
* the depmod tool
-------------------------------------------------------------------
Sat Dec 24 17:23:09 UTC 2011 - crrodriguez@opensuse.org
- Use --enable-zlib and buildRequire zlib
- run make check
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Dec 18 20:16:11 UTC 2011 - jengelh@medozas.de Sun Dec 18 20:16:11 UTC 2011 - jengelh@medozas.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package kmod # spec file for package kmod
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,20 +15,26 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: kmod Name: kmod
%define lname libkmod1 %define lname libkmod1
Summary: Utilities to load modules into the kernel Summary: Utilities to load modules into the kernel
Version: 2 Version: 3
Release: 0 Release: 0
%define git_snapshot 0
License: LGPL-2.1+ and GPL-2.0+ License: LGPL-2.1+ and GPL-2.0+
Group: System/Kernel Group: System/Kernel
URL: http://www.politreco.com/2011/12/announce-kmod-2/ Url: http://www.politreco.com/2011/12/announce-kmod-2/
#Git-Clone: git://git.profusion.mobi/kmod #Git-Clone: git://git.profusion.mobi/kmod
Source: %name-%version.tar.xz Source: %name-%version.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig, xz %if 0%{?git_snapshot}
BuildRequires: autoconf automake libtool
%endif
BuildRequires: pkgconfig >= 0.23 pkgconfig(liblzma) pkgconfig(zlib) xz
%description %description
kmod is a set of tools to handle common tasks with Linux kernel kmod is a set of tools to handle common tasks with Linux kernel
@ -39,9 +45,22 @@ These tools are designed on top of libkmod, a library that is shipped
with kmod. The aim is to be compatible with tools, configurations and with kmod. The aim is to be compatible with tools, configurations and
indexes from module-init-tools project. indexes from module-init-tools project.
%package compat
Summary: Compat symlinks for kernel module utilities
License: GPL-2.0+
Group: System/Kernel
Conflicts: module-init-tools
%description compat
kmod is a set of tools to handle common tasks with Linux kernel
modules like insert, remove, list, check properties, resolve
dependencies and aliases.
This package contains traditional name symlinks (lsmod, etc.)
%package -n %lname %package -n %lname
Summary: Library to interact with Linux kernel modules Summary: Library to interact with Linux kernel modules
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
%description -n %lname %description -n %lname
@ -51,7 +70,7 @@ list modules, also checking its properties, dependencies and aliases.
%package -n libkmod-devel %package -n libkmod-devel
Summary: Development files for libkmod Summary: Development files for libkmod
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
License: LGPL-2.1+ License: LGPL-2.1+
Requires: %lname = %version Requires: %lname = %version
%description -n libkmod-devel %description -n libkmod-devel
@ -62,14 +81,33 @@ list modules, also checking its properties, dependencies and aliases.
%setup -q %setup -q
%build %build
%if 0%{?git_snapshot}
if [ ! -e configure ]; then
autoreconf -fi;
fi;
%endif
# The extra --includedir gives us the possibility to detect dependent # The extra --includedir gives us the possibility to detect dependent
# packages which fail to properly use pkgconfig. # packages which fail to properly use pkgconfig.
%configure --includedir=%_includedir/%name-%version %configure --with-xz --with-zlib --includedir=%_includedir/%name-%version \
--with-rootlibdir=/%_lib --bindir=/bin
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
b="%buildroot";
%make_install %make_install
rm -f "%buildroot/%_libdir"/*.la # Remove standalone tools
rm -f "$b/bin"/kmod-*;
rm -f "$b/%_libdir"/*.la;
# kmod-compat
mkdir -p "$b/bin" "$b/sbin";
ln -s kmod "$b/bin/lsmod";
for i in depmod insmod lsmod modinfo modprobe rmmod; do
ln -s "/bin/kmod" "$b/sbin/$i";
done;
%check
make check
%post -n %lname -p /sbin/ldconfig %post -n %lname -p /sbin/ldconfig
@ -77,11 +115,11 @@ rm -f "%buildroot/%_libdir"/*.la
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%_bindir/kmod-* /bin/kmod
%files -n %lname %files -n %lname
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libkmod.so.1* /%_lib/libkmod.so.1*
%files -n libkmod-devel %files -n libkmod-devel
%defattr(-,root,root) %defattr(-,root,root)
@ -89,4 +127,9 @@ rm -f "%buildroot/%_libdir"/*.la
%_libdir/pkgconfig/*.pc %_libdir/pkgconfig/*.pc
%_libdir/libkmod.so %_libdir/libkmod.so
%files compat
%defattr(-,root,root)
/bin/lsmod
/sbin/*
%changelog %changelog