./0000775000175000017500000000000012511411357011435 5ustar nielsenrnielsenr./Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch0000664000175000017500000000243412511411357024210 0ustar nielsenrnielsenrFrom 0c4dbadc9db3cda1cfca64e44ea08c6e89919ea7 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 10 Sep 2013 13:44:18 +0800 Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh We can't use htobe* and be*toh functions because they are not available on older versions of glibc, For example, shipped on Centos 5.5. Change to directly calling bswap_* as defined in+byteswap.h. Upstream-Status: Inappropriate Signed-off-by: Ting Liu --- libkmod/libkmod-signature.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c index 6b80caa..3544a36 100644 --- a/libkmod/libkmod-signature.c +++ b/libkmod/libkmod-signature.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -121,7 +122,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat modsig->hash >= PKEY_HASH__LAST || modsig->id_type >= PKEY_ID_TYPE__LAST) return false; - sig_len = be32toh(get_unaligned(&modsig->sig_len)); + sig_len = bswap_32(get_unaligned(&modsig->sig_len)); if (size < (off_t)(modsig->signer_len + modsig->key_id_len + sig_len)) return false; -- 1.7.5.4 ./fix-O_CLOEXEC.patch0000664000175000017500000000206112511411357014601 0ustar nielsenrnielsenrFrom bd43367eee868059770188fd9e9db38520dc6fff Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Wed, 22 Jan 2014 01:06:40 -0500 Subject: [PATCH] libkmod/libkmod-internal.h: check whether O_CLOEXEC is defined or not O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have it, we need check before use. This patch is much more like a workaround, since it may need fcntl() use FD_CLOEXEC to replace. This problem was reported by "Ting Liu " Signed-off-by: Robert Yang Upstream-Status: Pending --- libkmod/libkmod-internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h index 0180124..100b40f 100644 --- a/libkmod/libkmod-internal.h +++ b/libkmod/libkmod-internal.h @@ -9,6 +9,10 @@ #include "macro.h" #include "libkmod.h" +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + static _always_inline_ _printf_format_(2, 3) void kmod_log_null(struct kmod_ctx *ctx, const char *format, ...) {} -- 1.7.10.4 ./depmod-search.conf0000664000175000017500000000010712511411357015015 0ustar nielsenrnielsenr# # /etc/depmod.d/depmod.conf # search updates extramodules built-in ./ptest.patch0000664000175000017500000000154412511411357013621 0ustar nielsenrnielsenrAdd 'install-ptest' rule. Signed-off-by: Tudor Florea Upstream-Status: Pending diff -ruN a/Makefile.am b/Makefile.am --- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200 +++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200 @@ -204,6 +204,16 @@ distclean-local: $(DISTCLEAN_LOCAL_HOOKS) +install-ptest: + @$(MKDIR_P) $(DESTDIR)/testsuite + @for file in $(TESTSUITE); do \ + install $$file $(DESTDIR)/testsuite; \ + done; + @sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile + @$(MKDIR_P) $(DESTDIR)/tools + @cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools + @cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite + # ------------------------------------------------------------------------------ # custom release helpers # ------------------------------------------------------------------------------ ./0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch0000664000175000017500000000152312511411357023324 0ustar nielsenrnielsenrFrom 74c26943f1228870022d116a1fda25be3a55a38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Wed, 18 Jun 2014 20:51:00 -0400 Subject: [PATCH] Add missing O_CLOEXEC in kmod_module_get_size() Upstream-Status: Backport Signed-off-by: Saul Wold --- libkmod/libkmod-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index e3cc5a7..b81b451 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -1783,7 +1783,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod) * loaded. */ snprintf(line, sizeof(line), "/sys/module/%s", mod->name); - dfd = open(line, O_RDONLY); + dfd = open(line, O_RDONLY|O_CLOEXEC); if (dfd < 0) return -errno; -- 1.8.3.1 ./run-ptest0000775000175000017500000000024312511411357013323 0ustar nielsenrnielsenr#!/bin/sh touch testsuite/stamp-rootfs tar xf testmodule.tar make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL find testsuite -name *.ko -exec rm -f {} \; ./avoid_parallel_tests.patch0000664000175000017500000000154612511411357016664 0ustar nielsenrnielsenrAvoid parallel-tests as it remove buildtest-TESTS and runtest-TESTS targets required by ptest. In automake 1.13.4 parallel-tests is assumed by defauls. In order to have buildtest-TESTS and runtest-TESTS targets serial-tests is now required Signed-off-by: Tudor Florea Upstream-Status: Inappropriate (disable feature incompatible with ptest) diff -ruN a/configure.ac b/configure.ac --- a/configure.ac 2013-09-02 15:05:18.662366800 +0200 +++ b/configure.ac 2013-11-28 09:26:49.557066764 +0200 @@ -8,7 +8,7 @@ AC_CONFIG_SRCDIR([libkmod/libkmod.c]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules - tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests]) + tar-pax no-dist-gzip dist-xz subdir-objects color-tests serial-tests]) AC_PROG_CC_STDC AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE