Accepting request 125589 from Base:System
- Update to new upstream release 9 * build-sys: allow compressed modules in testsuite * build-sys: Make dirs writable on rootfs creation * depmod: use ferror and fclose to check for error * depmod: return error when index is truncated due to ENOSPC * depmod: fix coding-style issue in array declaration * depmod: fail if any index could not be created * depmod: don't return error if modules.builtin don't exist * libkmod-util: split function for usec conversion * libkmod-util: add missing stdbool.h include - Fix broken testsuites on 32bit systems. add: fix-32bits.diff OBS-URL: https://build.opensuse.org/request/show/125589 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=10
This commit is contained in:
commit
3f7983bbe5
79
fix-32bits.diff
Normal file
79
fix-32bits.diff
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
diff --git a/testsuite/init_module.c b/testsuite/init_module.c
|
||||||
|
index 814998a..ed8b9fc 100644
|
||||||
|
--- a/testsuite/init_module.c
|
||||||
|
+++ b/testsuite/init_module.c
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
+#include <elf.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
@@ -206,6 +207,12 @@ static inline bool module_is_inkernel(const char *modname)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static uint8_t elf_identify(void *mem)
|
||||||
|
+{
|
||||||
|
+ uint8_t *p = mem;
|
||||||
|
+ return p[EI_CLASS];
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
TS_EXPORT long init_module(void *mem, unsigned long len, const char *args);
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -225,6 +232,8 @@ long init_module(void *mem, unsigned long len, const char *args)
|
||||||
|
const void *buf;
|
||||||
|
uint64_t bufsize;
|
||||||
|
int err;
|
||||||
|
+ uint8_t class;
|
||||||
|
+ off_t offset;
|
||||||
|
|
||||||
|
init_retcodes();
|
||||||
|
|
||||||
|
@@ -237,13 +246,20 @@ long init_module(void *mem, unsigned long len, const char *args)
|
||||||
|
kmod_elf_unref(elf);
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * We couldn't find the module's name inside the ELF file. Just exit
|
||||||
|
- * as if it was successful
|
||||||
|
+ * We couldn't find the parse the ELF file. Just exit as if it was
|
||||||
|
+ * successful
|
||||||
|
*/
|
||||||
|
if (err < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
- modname = (char *)buf + offsetof(struct module, name);
|
||||||
|
+ /* We need to open both 32 and 64 bits module - hack! */
|
||||||
|
+ class = elf_identify(mem);
|
||||||
|
+ if (class == ELFCLASS64)
|
||||||
|
+ offset = MODULE_NAME_OFFSET_64;
|
||||||
|
+ else
|
||||||
|
+ offset = MODULE_NAME_OFFSET_32;
|
||||||
|
+
|
||||||
|
+ modname = (char *)buf + offset;
|
||||||
|
mod = find_module(modules, modname);
|
||||||
|
if (mod != NULL) {
|
||||||
|
errno = mod->errcode;
|
||||||
|
diff --git a/testsuite/stripped-module.h b/testsuite/stripped-module.h
|
||||||
|
index 9f97dae..19862f3 100644
|
||||||
|
--- a/testsuite/stripped-module.h
|
||||||
|
+++ b/testsuite/stripped-module.h
|
||||||
|
@@ -13,6 +13,7 @@ struct list_head {
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
|
||||||
|
+
|
||||||
|
struct module
|
||||||
|
{
|
||||||
|
enum module_state state;
|
||||||
|
@@ -24,4 +25,8 @@ struct module
|
||||||
|
char name[MODULE_NAME_LEN];
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* padding */
|
||||||
|
+#define MODULE_NAME_OFFSET_64 4 + 4 + 2 * 8
|
||||||
|
+#define MODULE_NAME_OFFSET_32 4 + 2 * 4
|
||||||
|
+
|
||||||
|
#endif
|
@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v2.0.19 (GNU/Linux)
|
|
||||||
|
|
||||||
iQIcBAABAgAGBQJPkB+LAAoJEJuipaYwy+pTceMP/R9gUY1h5mpShASzcRe50te2
|
|
||||||
o8V/hiR83lbOAMWbmS9WSFnR6LWsP5zKO+HjcRMD38PkPFhSWtMjFhmsHFPtFoPj
|
|
||||||
5L4TaxFE/cqwzAwlwnBl1m8mGBtHvhVtxnwANm6LQ3f7yGjlLONrUBDTZ/XmGzSQ
|
|
||||||
s4a2csFU0Y+2FChpBRyiZmHRuY7ACZJdLPzw5UtVWQBay4mCo9AgQLDiE7LQb90F
|
|
||||||
h7ENgUPawxkVGUfIbqUgeWuFVg1ZYdqnSZ6GlJpAFQJRLlidSFuCvycICTnsI2pS
|
|
||||||
r6ddzDF6gMdzJhw51oTyl52Ith5AHuE4ZC847CUKFE1jPuakYINq/5Zll50SJZhM
|
|
||||||
wVh7KYydD3CYZlu+lTWsVpdT/orycxt+8etVsaOjNo/ZARnpnNTy9bGY2nGFpWoP
|
|
||||||
9VR22cHk/eXGzV7ngjP1bDdAWbRHQlE/NtRoF2jmuGlajISgjULkyAG82nVhuehz
|
|
||||||
zqiDph6wMYNjQC0PZF25AVmp+bSanyIPJvDkuigRBDVVPw9gKX392BcGNN6tlThf
|
|
||||||
cGMlry5UkHEiDElnaRnHGmvxlDYNISZYYYkRvR6RZZgMhL9q8HUNbcEILfvloMmd
|
|
||||||
IagHSAMGf62TRXq9KpzETJCPMBP6xA6Keic8Urd9XmLJlKx9yydeeoRW0AaBQ30m
|
|
||||||
NiyGC5z+z1GIM2mT7a0s
|
|
||||||
=oTaf
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:35f7d1dfcf62ea3d6da1ed0ee41a7997333680033609c5e9658f4fe8d997734d
|
|
||||||
size 986632
|
|
17
kmod-9.tar.sign
Normal file
17
kmod-9.tar.sign
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2.0.19 (GNU/Linux)
|
||||||
|
|
||||||
|
iQIcBAABAgAGBQJP4QHcAAoJEJuipaYwy+pT9cYP/ig2VPtHtgONZkF99dcaPjVU
|
||||||
|
CZDa5tFbmwNYmV08ufPSDX1Dnz2x9TnlJQyOwR8PgOK0VSjqgAeVZhyMy2FDz7Iu
|
||||||
|
0QTFg3VhbFMYZbmvBEXuNw6ljIkmOk1BSMocbFJEaRSn19feW+JvlVugPOY+P9sM
|
||||||
|
/ySGPyz8r8DztbA6DA9QlICPl6/+AdxRMnkMp/ZGKChg72o7UgHwkebVZ4LaZ/gw
|
||||||
|
cbq4gvoiqsScfoaWjmXHexDAhmhw+uyvBOGLDCJI2UgnZtHawiBmpC7c7M38t8YJ
|
||||||
|
REySLixnmbL3jo5k2WMbYF2Q4rWoS8zyQtQHlyZznO31bXU8ma9he3vHHsrM2evO
|
||||||
|
yhIDm0eSJvFl2/qwBDUP8C92ekj7DoUFbs6BRAJoda+tmcmAVepg0P5kjmiYxMzC
|
||||||
|
BbscpRh3vBJ+/MSWsPAcT3OXQKBStwenfc2VN63hoS4ghIXFJDYeCmR2yM+UWsrr
|
||||||
|
SYjn5+Gs0cNO/mVxHILW9SHioUA+oJ8x4/ns6NUuVonBn2Itk4NdI6GoMM3hS3X8
|
||||||
|
WT5WlqmvUCV6cb04Xh+N5ZoE0vRKCDJNN8Nye1XtHUUctZPrjmb7HwNUVwEFyQVt
|
||||||
|
RObsxQtsxpPUFNh5V8MQAxt2PVcW9K1xPPJNSBMQc+RLSBB5AjEzLDKkcNzHmcWo
|
||||||
|
oEDOGRlbO2Mgpu2gXD/3
|
||||||
|
=wsDr
|
||||||
|
-----END PGP SIGNATURE-----
|
3
kmod-9.tar.xz
Normal file
3
kmod-9.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0607267cb62dbc9009d0719f442a56f97f64d9983e20dbcaedfff9073abdcecf
|
||||||
|
size 1122668
|
@ -1,28 +1,13 @@
|
|||||||
From: Jan Engelhardt <jengelh@medozas.de>
|
Index: kmod-9/Makefile.am
|
||||||
Upstream: this patch is too complex for upstream to handle
|
|
||||||
|
|
||||||
Change the kmod Makefile from using -version-info to -version-number
|
|
||||||
to make it clear that the kmod project is not trying to subvert the
|
|
||||||
libtool "interface" number concept, but in fact does not do
|
|
||||||
libtool-style counting.
|
|
||||||
|
|
||||||
References: <alpine.LNX.2.01.1202070049200.12889@frira.zrqbmnf.qr>
|
|
||||||
References: http://lists.gnu.org/archive/html/libtool/2012-02/msg00011.html
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile.am | 6 +-----
|
|
||||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
|
||||||
|
|
||||||
Index: kmod-8/Makefile.am
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- kmod-8.orig/Makefile.am
|
--- kmod-9.orig/Makefile.am
|
||||||
+++ kmod-8/Makefile.am
|
+++ kmod-9/Makefile.am
|
||||||
@@ -33,10 +33,6 @@ SED_PROCESS = \
|
@@ -33,10 +33,6 @@ SED_PROCESS = \
|
||||||
%.pc: %.pc.in Makefile
|
%.pc: %.pc.in Makefile
|
||||||
$(SED_PROCESS)
|
$(SED_PROCESS)
|
||||||
|
|
||||||
-LIBKMOD_CURRENT=3
|
-LIBKMOD_CURRENT=3
|
||||||
-LIBKMOD_REVISION=2
|
-LIBKMOD_REVISION=3
|
||||||
-LIBKMOD_AGE=1
|
-LIBKMOD_AGE=1
|
||||||
-
|
-
|
||||||
noinst_LTLIBRARIES = libkmod/libkmod-util.la
|
noinst_LTLIBRARIES = libkmod/libkmod-util.la
|
||||||
|
15
kmod.changes
15
kmod.changes
@ -1,4 +1,19 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 20 08:41:03 UTC 2012 - rmilasan@suse.com
|
||||||
|
|
||||||
|
- Update to new upstream release 9
|
||||||
|
* build-sys: allow compressed modules in testsuite
|
||||||
|
* build-sys: Make dirs writable on rootfs creation
|
||||||
|
* depmod: use ferror and fclose to check for error
|
||||||
|
* depmod: return error when index is truncated due to ENOSPC
|
||||||
|
* depmod: fix coding-style issue in array declaration
|
||||||
|
* depmod: fail if any index could not be created
|
||||||
|
* depmod: don't return error if modules.builtin don't exist
|
||||||
|
* libkmod-util: split function for usec conversion
|
||||||
|
* libkmod-util: add missing stdbool.h include
|
||||||
|
- Fix broken testsuites on 32bit systems.
|
||||||
|
add: fix-32bits.diff
|
||||||
|
-------------------------------------------------------------------
|
||||||
Sat Apr 21 01:55:30 UTC 2012 - jengelh@medozas.de
|
Sat Apr 21 01:55:30 UTC 2012 - jengelh@medozas.de
|
||||||
|
|
||||||
- Restore patch descriptions
|
- Restore patch descriptions
|
||||||
|
10
kmod.spec
10
kmod.spec
@ -21,7 +21,7 @@ Name: kmod
|
|||||||
Summary: Utilities to load modules into the kernel
|
Summary: Utilities to load modules into the kernel
|
||||||
License: LGPL-2.1+ and GPL-2.0+
|
License: LGPL-2.1+ and GPL-2.0+
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
Version: 8
|
Version: 9
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://www.politreco.com/2011/12/announce-kmod-2/
|
Url: http://www.politreco.com/2011/12/announce-kmod-2/
|
||||||
|
|
||||||
@ -30,6 +30,7 @@ Url: http://www.politreco.com/2011/12/announce-kmod-2/
|
|||||||
Source: %name-%version.tar.xz
|
Source: %name-%version.tar.xz
|
||||||
Source2: %name-%version.tar.sign
|
Source2: %name-%version.tar.sign
|
||||||
Patch1: kmod-so-version.diff
|
Patch1: kmod-so-version.diff
|
||||||
|
Patch2: fix-32bits.diff
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -86,7 +87,8 @@ in %lname.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch -P 1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
@ -97,7 +99,7 @@ autoreconf -fi
|
|||||||
--with-zlib \
|
--with-zlib \
|
||||||
--includedir=%_includedir/%{name}-%{version} \
|
--includedir=%_includedir/%{name}-%{version} \
|
||||||
--with-rootlibdir=%{_libdir} \
|
--with-rootlibdir=%{_libdir} \
|
||||||
--bindir=%{_bindir}
|
--bindir=%{_bindir}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -130,6 +132,8 @@ make check
|
|||||||
|
|
||||||
%postun -n %lname -p /sbin/ldconfig
|
%postun -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%clean
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/kmod
|
%{_bindir}/kmod
|
||||||
|
Loading…
Reference in New Issue
Block a user