Date: Tuesday, October 29, 2019 @ 00:46:47 Author: grazzolini Revision: 365987
archrelease: copy trunk to testing-x86_64 Added: kmod/repos/testing-x86_64/ kmod/repos/testing-x86_64/0001-Link-against-libcrypto-not-all-of-openssl.patch (from rev 365986, kmod/trunk/0001-Link-against-libcrypto-not-all-of-openssl.patch) kmod/repos/testing-x86_64/PKGBUILD (from rev 365986, kmod/trunk/PKGBUILD) kmod/repos/testing-x86_64/depmod-search.conf (from rev 365986, kmod/trunk/depmod-search.conf) kmod/repos/testing-x86_64/depmod.hook (from rev 365986, kmod/trunk/depmod.hook) kmod/repos/testing-x86_64/depmod.script (from rev 365986, kmod/trunk/depmod.script) ------------------------------------------------------+ 0001-Link-against-libcrypto-not-all-of-openssl.patch | 75 ++++++++++++++ PKGBUILD | 87 +++++++++++++++++ depmod-search.conf | 5 depmod.hook | 13 ++ depmod.script | 9 + 5 files changed, 189 insertions(+) Copied: kmod/repos/testing-x86_64/0001-Link-against-libcrypto-not-all-of-openssl.patch (from rev 365986, kmod/trunk/0001-Link-against-libcrypto-not-all-of-openssl.patch) =================================================================== --- testing-x86_64/0001-Link-against-libcrypto-not-all-of-openssl.patch (rev 0) +++ testing-x86_64/0001-Link-against-libcrypto-not-all-of-openssl.patch 2019-10-29 00:46:47 UTC (rev 365987) @@ -0,0 +1,75 @@ +From 924b16f1b2001bf31e0688c9273e40e8f2f665c5 Mon Sep 17 00:00:00 2001 +From: Dave Reisner <dreis...@archlinux.org> +Date: Wed, 13 Feb 2019 10:24:51 -0500 +Subject: [PATCH] Link against libcrypto, not all of openssl + +In the previous build setup, libkmod.so would link to not just +libcrypto.so, but also libssl.so: + +$ readelf -d /lib/libkmod.so | grep NEEDED + 0x0000000000000001 (NEEDED) Shared library: [liblzma.so.5] + 0x0000000000000001 (NEEDED) Shared library: [libz.so.1] + 0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.1] + 0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.1] + 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] + +We don't need any symbols from libssl, though. This patch ensures that +we pass 'libcrypto' to pkgconfig rather than 'openssl', getting only the +library that we need: + +$ readelf -d tools/kmod | grep NEEDED + 0x0000000000000001 (NEEDED) Shared library: [liblzma.so.5] + 0x0000000000000001 (NEEDED) Shared library: [libz.so.1] + 0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.1] + 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] +--- + Makefile.am | 6 +++--- + configure.ac | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ddb25f0..758f4f0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -35,8 +35,8 @@ SED_PROCESS = \ + -e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \ + -e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \ + -e 's,@zlib_LIBS\@,${zlib_LIBS},g' \ +- -e 's,@openssl_CFLAGS\@,${openssl_CFLAGS},g' \ +- -e 's,@openssl_LIBS\@,${openssl_LIBS},g' \ ++ -e 's,@libcrypto_CFLAGS\@,${libcrypto_CFLAGS},g' \ ++ -e 's,@libcrypto_LIBS\@,${libcrypto_LIBS},g' \ + < $< > $@ || rm $@ + + %.pc: %.pc.in Makefile +@@ -89,7 +89,7 @@ libkmod_libkmod_la_DEPENDENCIES = \ + ${top_srcdir}/libkmod/libkmod.sym + libkmod_libkmod_la_LIBADD = \ + shared/libshared.la \ +- ${liblzma_LIBS} ${zlib_LIBS} ${openssl_LIBS} ++ ${liblzma_LIBS} ${zlib_LIBS} ${libcrypto_LIBS} + + noinst_LTLIBRARIES += libkmod/libkmod-internal.la + libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES) +diff --git a/configure.ac b/configure.ac +index ee72283..dffe278 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -110,12 +110,12 @@ AC_ARG_WITH([openssl], + AS_HELP_STRING([--with-openssl], [handle PKCS7 signatures @<:@default=disabled@:>@]), + [], [with_openssl=no]) + AS_IF([test "x$with_openssl" != "xno"], [ +- PKG_CHECK_MODULES([openssl], [openssl >= 1.1.0]) ++ PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0]) + AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.]) + ], [ + AC_MSG_NOTICE([openssl support not requested]) + ]) +-CC_FEATURE_APPEND([with_features], [with_openssl], [OPENSSL]) ++CC_FEATURE_APPEND([with_features], [with_openssl], [LIBCRYPTO]) + + AC_ARG_WITH([bashcompletiondir], + AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), +-- +2.20.1 + Copied: kmod/repos/testing-x86_64/PKGBUILD (from rev 365986, kmod/trunk/PKGBUILD) =================================================================== --- testing-x86_64/PKGBUILD (rev 0) +++ testing-x86_64/PKGBUILD 2019-10-29 00:46:47 UTC (rev 365987) @@ -0,0 +1,87 @@ +# Maintainer: Dave Reisner <dreis...@archlinux.org> + +pkgname=kmod +pkgver=26 +pkgrel=3 +pkgdesc="Linux kernel module management tools and library" +arch=('x86_64') +url='https://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary' +license=('GPL2') +depends=('glibc' 'zlib' 'openssl' 'xz') +makedepends=('gtk-doc') +checkdepends=('linux-headers' 'libelf') +options=('strip' 'debug') +provides=('module-init-tools=3.16' 'libkmod.so') +conflicts=('module-init-tools') +replaces=('module-init-tools') +validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi +source=("https://www.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign} + 'depmod-search.conf' + 'depmod.hook' 'depmod.script' + '0001-Link-against-libcrypto-not-all-of-openssl.patch') +md5sums=('1129c243199bdd7db01b55a61aa19601' + 'SKIP' + 'dd62cbf62bd8f212f51ef8c43bec9a77' + '72ce5e14ee3ad8bc06945e0ad4c642ce' + '18fb3d1f6024a5a84514c8276cb3ebff' + 'e918bef174c1057fa13a5ba8c4a30a46') + +prepare() { + cd "$pkgname-$pkgver" + + patch -Np1 <"$srcdir/0001-Link-against-libcrypto-not-all-of-openssl.patch" + + autoreconf -fisv +} + +build() { + cd "$pkgname-$pkgver" + + ./configure \ + --sysconfdir=/etc \ + --enable-gtk-doc \ + --with-xz \ + --with-zlib \ + --with-openssl + + make +} + +check() { + # As of kmod v20, the test suite needs to build some kernel modules, and thus + # needs headers available in order to run. We depend on linux-headers, but + # this is really only to try and make sure that *some* useable tree of kernel + # headers exist. The first useable tree we find is good enough, as these + # modules will never be loaded by tests. + + local kdirs=(/usr/lib/modules/*/build/Makefile) + if [[ ! -f ${kdirs[0]} ]]; then + printf '==> Unable to find kernel headers to build modules for tests\n' >&2 + return 1 + fi + + local kver kdir=${kdirs[0]%/Makefile} + IFS=/ read _ _ _ kver _ <<<"$kdir" + + make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver" +} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + + # extra directories + install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d + + for tool in {ins,ls,rm,dep}mod mod{probe,info}; do + ln -s kmod "$pkgdir/usr/bin/$tool" + done + + # install depmod.d file for search/ dir + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" + + # hook + install -Dm644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook" + install -Dm755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod" +} + +# vim: ft=sh syn=sh et Copied: kmod/repos/testing-x86_64/depmod-search.conf (from rev 365986, kmod/trunk/depmod-search.conf) =================================================================== --- testing-x86_64/depmod-search.conf (rev 0) +++ testing-x86_64/depmod-search.conf 2019-10-29 00:46:47 UTC (rev 365987) @@ -0,0 +1,5 @@ +# +# /usr/lib/depmod.d/search.conf +# + +search updates extramodules built-in Copied: kmod/repos/testing-x86_64/depmod.hook (from rev 365986, kmod/trunk/depmod.hook) =================================================================== --- testing-x86_64/depmod.hook (rev 0) +++ testing-x86_64/depmod.hook 2019-10-29 00:46:47 UTC (rev 365987) @@ -0,0 +1,13 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/modules/*/ +Target = !usr/lib/modules/*/?* + +[Action] +Description = Updating module dependencies... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/depmod +NeedsTargets Copied: kmod/repos/testing-x86_64/depmod.script (from rev 365986, kmod/trunk/depmod.script) =================================================================== --- testing-x86_64/depmod.script (rev 0) +++ testing-x86_64/depmod.script 2019-10-29 00:46:47 UTC (rev 365987) @@ -0,0 +1,9 @@ +#!/bin/bash + +while read -r f; do + if [[ -e ${f}vmlinuz ]]; then + depmod $(basename "$f") + fi +done + +# vim:set ft=sh sw=2 et: