From 87a9c849bd00708826c303743f634c1d79452a6f2422a82c1a36fe671a704ed8 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Wed, 20 Jun 2012 13:11:38 +0000 Subject: [PATCH] * libkmod-util: add missing stdbool.h include - Don't assert mkdir_p, it fails on 32bit systems. add: dont-assert-mkdir_p.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=31 --- dont-assert-mkdir_p.patch | 15 +++++++++++++++ kmod.changes | 5 +++-- kmod.spec | 6 +++++- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 dont-assert-mkdir_p.patch diff --git a/dont-assert-mkdir_p.patch b/dont-assert-mkdir_p.patch new file mode 100644 index 0000000..6cfe9c6 --- /dev/null +++ b/dont-assert-mkdir_p.patch @@ -0,0 +1,15 @@ +Index: kmod-9/testsuite/init_module.c +=================================================================== +--- kmod-9.orig/testsuite/init_module.c ++++ kmod-9/testsuite/init_module.c +@@ -147,7 +147,9 @@ static int create_sysfs_files(const char + strcpy(buf + len, modname); + len += strlen(modname); + +- assert(mkdir_p(buf, 0755) >= 0); ++ // This fails on 32bit systems, we can't use assert ++ // assert(mkdir_p(buf, 0755) >= 0); ++ mkdir_p(buf, 0755); + + strcpy(buf + len, "/initstate"); + return write_one_line_file(buf, "live\n", strlen("live\n")); diff --git a/kmod.changes b/kmod.changes index 8282e5a..e2fe6f1 100644 --- a/kmod.changes +++ b/kmod.changes @@ -10,8 +10,9 @@ Wed Jun 20 08:41:03 UTC 2012 - rmilasan@suse.com * 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 - +* libkmod-util: add missing stdbool.h include +- Don't assert mkdir_p, it fails on 32bit systems. + add: dont-assert-mkdir_p.patch ------------------------------------------------------------------- Sat Apr 21 01:55:30 UTC 2012 - jengelh@medozas.de diff --git a/kmod.spec b/kmod.spec index 4025601..93d5f72 100644 --- a/kmod.spec +++ b/kmod.spec @@ -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: dont-assert-mkdir_p.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -87,6 +88,7 @@ in %lname. %prep %setup -q %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