diff --git a/fix-32bits.diff b/fix-32bits.diff new file mode 100644 index 0000000..20cafcc --- /dev/null +++ b/fix-32bits.diff @@ -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 ++#include + #include + #include + #include +@@ -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 diff --git a/kmod-8.tar.sign b/kmod-8.tar.sign deleted file mode 100644 index e81b422..0000000 --- a/kmod-8.tar.sign +++ /dev/null @@ -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----- diff --git a/kmod-8.tar.xz b/kmod-8.tar.xz deleted file mode 100644 index f683f98..0000000 --- a/kmod-8.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:35f7d1dfcf62ea3d6da1ed0ee41a7997333680033609c5e9658f4fe8d997734d -size 986632 diff --git a/kmod-9.tar.sign b/kmod-9.tar.sign new file mode 100644 index 0000000..d73b8cc --- /dev/null +++ b/kmod-9.tar.sign @@ -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----- diff --git a/kmod-9.tar.xz b/kmod-9.tar.xz new file mode 100644 index 0000000..de4dc19 --- /dev/null +++ b/kmod-9.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0607267cb62dbc9009d0719f442a56f97f64d9983e20dbcaedfff9073abdcecf +size 1122668 diff --git a/kmod-so-version.diff b/kmod-so-version.diff index 7e38cea..8c2e55f 100644 --- a/kmod-so-version.diff +++ b/kmod-so-version.diff @@ -1,28 +1,13 @@ -From: Jan Engelhardt -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: -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 +Index: kmod-9/Makefile.am =================================================================== ---- kmod-8.orig/Makefile.am -+++ kmod-8/Makefile.am +--- kmod-9.orig/Makefile.am ++++ kmod-9/Makefile.am @@ -33,10 +33,6 @@ SED_PROCESS = \ %.pc: %.pc.in Makefile $(SED_PROCESS) -LIBKMOD_CURRENT=3 --LIBKMOD_REVISION=2 +-LIBKMOD_REVISION=3 -LIBKMOD_AGE=1 - noinst_LTLIBRARIES = libkmod/libkmod-util.la diff --git a/kmod.changes b/kmod.changes index 7c5406e..7c2757d 100644 --- a/kmod.changes +++ b/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 - Restore patch descriptions diff --git a/kmod.spec b/kmod.spec index 894e537..88c1c16 100644 --- a/kmod.spec +++ b/kmod.spec @@ -21,7 +21,7 @@ Name: kmod Summary: Utilities to load modules into the kernel License: LGPL-2.1+ and GPL-2.0+ Group: System/Kernel -Version: 8 +Version: 9 Release: 0 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 Source2: %name-%version.tar.sign Patch1: kmod-so-version.diff +Patch2: fix-32bits.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -86,7 +87,8 @@ in %lname. %prep %setup -q -%patch -P 1 -p1 +%patch1 -p1 +%patch2 -p1 %build autoreconf -fi @@ -97,7 +99,7 @@ autoreconf -fi --with-zlib \ --includedir=%_includedir/%{name}-%{version} \ --with-rootlibdir=%{_libdir} \ - --bindir=%{_bindir} + --bindir=%{_bindir} make %{?_smp_mflags} %install @@ -130,6 +132,8 @@ make check %postun -n %lname -p /sbin/ldconfig +%clean + %files %defattr(-,root,root) %{_bindir}/kmod