commit:     1f41de3398c0e91a2f96ad06578a4625e05254a1
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Thu Dec  4 22:30:24 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Dec  9 14:21:59 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=1f41de33

sys-apps/kmod: bump to version 19

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

---
 sys-apps/kmod/files/kmod-15-dynamic-kmod.patch     |  16 ---
 sys-apps/kmod/files/kmod-15-use-strndup.patch      |  12 --
 sys-apps/kmod/files/kmod-19-strndupa.patch         |  23 ++++
 .../{kmod-static-nodes => kmod-static-nodes-r1}    |   5 +-
 sys-apps/kmod/kmod-15-r99.ebuild                   | 129 -------------------
 sys-apps/kmod/kmod-16-r99.ebuild                   | 136 ---------------------
 .../{kmod-17-r99.ebuild => kmod-19-r99.ebuild}     |  43 ++++---
 sys-apps/kmod/metadata.xml                         |   1 -
 8 files changed, 47 insertions(+), 318 deletions(-)

diff --git a/sys-apps/kmod/files/kmod-15-dynamic-kmod.patch 
b/sys-apps/kmod/files/kmod-15-dynamic-kmod.patch
deleted file mode 100644
index c93bea6..0000000
--- a/sys-apps/kmod/files/kmod-15-dynamic-kmod.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-do not statically link kmod against its own libraries
-
-https://bugs.gentoo.org/493630
-http://thread.gmane.org/gmane.linux.kernel.modules/1206
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -817,7 +817,7 @@
- @BUILD_TOOLS_TRUE@                 tools/static-nodes.c
- 
- @BUILD_TOOLS_TRUE@tools_kmod_LDADD = libkmod/libkmod-util.la \
--@BUILD_TOOLS_TRUE@               libkmod/libkmod-internal.la
-+@BUILD_TOOLS_TRUE@               libkmod/libkmod.la
- 
- 
- # 
------------------------------------------------------------------------------

diff --git a/sys-apps/kmod/files/kmod-15-use-strndup.patch 
b/sys-apps/kmod/files/kmod-15-use-strndup.patch
deleted file mode 100644
index 7d56480..0000000
--- a/sys-apps/kmod/files/kmod-15-use-strndup.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur kmod-15.orig/libkmod/libkmod-util.c kmod-15/libkmod/libkmod-util.c
---- kmod-15.orig/libkmod/libkmod-util.c        2014-01-16 14:11:37.002012850 
+0000
-+++ kmod-15/libkmod/libkmod-util.c     2014-01-16 14:10:36.709009479 +0000
-@@ -324,7 +324,7 @@
- {
-       char *start, *end;
- 
--      start = strndupa(path, len);
-+      start = strndup(path, len);
-       end = start + len;
- 
-       /*

diff --git a/sys-apps/kmod/files/kmod-19-strndupa.patch 
b/sys-apps/kmod/files/kmod-19-strndupa.patch
new file mode 100644
index 0000000..74b2af6
--- /dev/null
+++ b/sys-apps/kmod/files/kmod-19-strndupa.patch
@@ -0,0 +1,23 @@
+From efb5bfaca938fa5991865c1e9a0c730dc919708c Mon Sep 17 00:00:00 2001
+From: Natanael Copa <[email protected]>
+Date: Mon, 17 Nov 2014 09:36:29 +0100
+Subject: util: fix build on systems missing strndupa
+
+we need include shared/missing.h to be able to compile on sysmtes that
+lacks strndupa.
+
+diff --git a/shared/util.c b/shared/util.c
+index 855d4e4..23bbb26 100644
+--- a/shared/util.c
++++ b/shared/util.c
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ 
++#include <shared/missing.h>
+ #include <shared/util.h>
+ 
+ #define USEC_PER_SEC  1000000ULL
+-- 
+cgit v0.10.1
+

diff --git a/sys-apps/kmod/files/kmod-static-nodes 
b/sys-apps/kmod/files/kmod-static-nodes-r1
similarity index 82%
rename from sys-apps/kmod/files/kmod-static-nodes
rename to sys-apps/kmod/files/kmod-static-nodes-r1
index 43d8431..dcbf679 100644
--- a/sys-apps/kmod/files/kmod-static-nodes
+++ b/sys-apps/kmod/files/kmod-static-nodes-r1
@@ -1,13 +1,14 @@
 #!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/files/kmod-static-nodes,v 1.1 
2013/08/09 19:08:18 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/files/kmod-static-nodes-r1,v 
1.1 2014/07/11 12:28:07 ssuominen Exp $
 
 description="Create list of required static device nodes for the current 
kernel"
 
 depend() {
        after dev-mount
        before tmpfiles.dev dev
+       keyword -lxc
 }
 
 start() {

diff --git a/sys-apps/kmod/kmod-15-r99.ebuild b/sys-apps/kmod/kmod-15-r99.ebuild
deleted file mode 100644
index 386f840..0000000
--- a/sys-apps/kmod/kmod-15-r99.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-15-r1.ebuild,v 1.1 
2013/12/09 01:55:28 vapier Exp $
-
-EAPI=5
-inherit autotools eutils libtool multilib toolchain-funcs versionator
-
-if [[ ${PV} == 9999 ]]; then
-       
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
-       inherit git-2
-else
-       SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
-       KEYWORDS="amd64 arm ~mips ppc x86"
-fi
-
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git";
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug doc lzma +openrc static-libs +tools zlib"
-
-# Upstream does not support running the test suite with custom configure flags.
-# I was also told that the test suite is intended for kmod developers.
-# So we have to restrict it.
-# See bug #408915.
-RESTRICT="test"
-
-RDEPEND="!sys-apps/module-init-tools
-       !sys-apps/modutils
-       lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
-       openrc? ( !<sys-apps/openrc-0.12 )
-       zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
-DEPEND="${RDEPEND}
-       dev-libs/libxslt
-       doc? ( dev-util/gtk-doc )
-       lzma? ( virtual/pkgconfig )
-       zlib? ( virtual/pkgconfig )"
-
-pkg_setup() {
-       [[ $(tc-getCPP) == *cpp ]] && ! version_is_at_least 4.6 $(gcc-version) 
&& \
-               die "You need at least GNU GCC 4.6.x to build this package." 
#481020
-}
-
-src_prepare() {
-       if [ ! -e configure ]; then
-               if use doc; then
-                       gtkdocize --copy --docdir libkmod/docs || die
-               else
-                       touch libkmod/docs/gtk-doc.make
-               fi
-               eautoreconf
-       else
-               epatch "${FILESDIR}"/${PN}-15-dynamic-kmod.patch #493630
-               epatch "${FILESDIR}"/${PN}-15-use-strndup.patch
-               elibtoolize
-       fi
-
-       # Restore possibility of running --enable-static wrt #472608
-       sed -i \
-               -e '/--enable-static is not supported by 
kmod/s:as_fn_error:echo:' \
-               configure || die
-}
-
-src_configure() {
-       econf \
-               --bindir=/bin \
-               --with-rootlibdir=/$(get_libdir) \
-               --enable-shared \
-               $(use_enable static-libs static) \
-               $(use_enable tools) \
-               $(use_enable debug) \
-               $(use_enable doc gtk-doc) \
-               $(use_with lzma xz) \
-               $(use_with zlib)
-}
-
-src_install() {
-       default
-       prune_libtool_files
-
-       if use tools; then
-               local bincmd sbincmd
-               for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
-                       dosym /bin/kmod /sbin/${sbincmd}
-               done
-
-               # These are also usable as normal user
-               for bincmd in lsmod modinfo; do
-                       dosym kmod /bin/${bincmd}
-               done
-       fi
-
-       cat <<-EOF > "${T}"/usb-load-ehci-first.conf
-       softdep uhci_hcd pre: ehci_hcd
-       softdep ohci_hcd pre: ehci_hcd
-       EOF
-
-       insinto /lib/modprobe.d
-       doins "${T}"/usb-load-ehci-first.conf #260139
-
-       use openrc && doinitd "${FILESDIR}"/kmod-static-nodes
-}
-
-pkg_postinst() {
-       if use openrc; then
-               if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then
-                       ewarn "Removing old conflicting static-nodes init 
script from the boot runlevel"
-                       rm -f "${ROOT}"etc/runlevels/boot/static-nodes
-               fi
-
-               # Add kmod to the runlevel automatically if this is the first 
install of this package.
-               if [[ -z ${REPLACING_VERSIONS} ]]; then
-                       if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d 
${ROOT}etc/runlevels/sysinit ]]; then
-                               ln -s /etc/init.d/kmod-static-nodes 
"${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes
-                       fi
-               fi
-
-               if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then
-                       if [[ ! -e 
${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then
-                               ewarn
-                               ewarn "You need to add kmod-static-nodes to the 
sysinit runlevel for"
-                               ewarn "kernel modules to have required static 
nodes!"
-                               ewarn "Run this command:"
-                               ewarn "\trc-update add kmod-static-nodes 
sysinit"
-                       fi
-               fi
-       fi
-}

diff --git a/sys-apps/kmod/kmod-16-r99.ebuild b/sys-apps/kmod/kmod-16-r99.ebuild
deleted file mode 100644
index 484b856..0000000
--- a/sys-apps/kmod/kmod-16-r99.ebuild
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-16.ebuild,v 1.7 
2014/02/20 22:59:13 pacho Exp $
-
-EAPI=5
-inherit bash-completion-r1 eutils multilib
-
-if [[ ${PV} == 9999* ]]; then
-       
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
-       inherit autotools git-2
-else
-       SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
-       KEYWORDS="amd64 arm ~mips ppc x86"
-       inherit libtool
-fi
-
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git";
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug doc lzma +openrc static-libs +tools zlib"
-
-# Upstream does not support running the test suite with custom configure flags.
-# I was also told that the test suite is intended for kmod developers.
-# So we have to restrict it.
-# See bug #408915.
-RESTRICT="test"
-
-RDEPEND="!sys-apps/module-init-tools
-       !sys-apps/modutils
-       lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
-       openrc? ( !<sys-apps/openrc-0.12 )
-       zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
-DEPEND="${RDEPEND}
-       dev-libs/libxslt
-       doc? ( dev-util/gtk-doc )
-       lzma? ( virtual/pkgconfig )
-       zlib? ( virtual/pkgconfig )"
-
-src_prepare() {
-       if [ ! -e configure ]; then
-               if use doc; then
-                       gtkdocize --copy --docdir libkmod/docs || die
-               else
-                       touch libkmod/docs/gtk-doc.make
-               fi
-               eautoreconf
-       else
-               epatch "${FILESDIR}"/${PN}-15-dynamic-kmod.patch #493630
-               epatch "${FILESDIR}"/${PN}-15-use-strndup.patch
-               elibtoolize
-       fi
-
-       # Restore possibility of running --enable-static wrt #472608
-       sed -i \
-               -e '/--enable-static is not supported by 
kmod/s:as_fn_error:echo:' \
-               configure || die
-}
-
-src_configure() {
-       econf \
-               --bindir=/bin \
-               --with-rootlibdir="/$(get_libdir)" \
-               --enable-shared \
-               $(use_enable static-libs static) \
-               $(use_enable tools) \
-               $(use_enable debug) \
-               $(use_enable doc gtk-doc) \
-               $(use_with lzma xz) \
-               $(use_with zlib) \
-               --with-bashcompletiondir="$(get_bashcompdir)"
-}
-
-src_compile() {
-       if [[ ${PV} == 9999* ]]; then
-               default
-       else
-               # Force -j1 because of -15-dynamic-kmod.patch, likely caused by 
lack of eautoreconf
-               # wrt #494806
-               emake -j1
-       fi
-}
-
-src_install() {
-       default
-       prune_libtool_files
-
-       if use tools; then
-               local bincmd sbincmd
-               for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
-                       dosym /bin/kmod /sbin/${sbincmd}
-               done
-
-               # These are also usable as normal user
-               for bincmd in lsmod modinfo; do
-                       dosym kmod /bin/${bincmd}
-               done
-       fi
-
-       cat <<-EOF > "${T}"/usb-load-ehci-first.conf
-       softdep uhci_hcd pre: ehci_hcd
-       softdep ohci_hcd pre: ehci_hcd
-       EOF
-
-       insinto /lib/modprobe.d
-       doins "${T}"/usb-load-ehci-first.conf #260139
-
-       use openrc && doinitd "${FILESDIR}"/kmod-static-nodes
-}
-
-pkg_postinst() {
-       if use openrc; then
-               if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then
-                       ewarn "Removing old conflicting static-nodes init 
script from the boot runlevel"
-                       rm -f "${ROOT}"etc/runlevels/boot/static-nodes
-               fi
-
-               # Add kmod to the runlevel automatically if this is the first 
install of this package.
-               if [[ -z ${REPLACING_VERSIONS} ]]; then
-                       if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d 
${ROOT}etc/runlevels/sysinit ]]; then
-                               ln -s /etc/init.d/kmod-static-nodes 
"${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes
-                       fi
-               fi
-
-               if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then
-                       if [[ ! -e 
${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then
-                               ewarn
-                               ewarn "You need to add kmod-static-nodes to the 
sysinit runlevel for"
-                               ewarn "kernel modules to have required static 
nodes!"
-                               ewarn "Run this command:"
-                               ewarn "\trc-update add kmod-static-nodes 
sysinit"
-                       fi
-               fi
-       fi
-}

diff --git a/sys-apps/kmod/kmod-17-r99.ebuild b/sys-apps/kmod/kmod-19-r99.ebuild
similarity index 79%
rename from sys-apps/kmod/kmod-17-r99.ebuild
rename to sys-apps/kmod/kmod-19-r99.ebuild
index 93a246c..164cfae 100644
--- a/sys-apps/kmod/kmod-17-r99.ebuild
+++ b/sys-apps/kmod/kmod-19-r99.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-17.ebuild,v 1.9 
2014/05/15 20:06:25 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-19.ebuild,v 1.1 
2014/11/23 06:51:01 williamh Exp $
 
 EAPI=5
 
@@ -13,7 +13,7 @@ if [[ ${PV} == 9999* ]]; then
        inherit autotools git-2
 else
        SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
-       KEYWORDS="amd64 arm ~mips ppc x86"
+       KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
        inherit libtool
 fi
 
@@ -30,9 +30,11 @@ IUSE="debug doc lzma python static-libs +tools zlib"
 # See bug #408915.
 RESTRICT="test"
 
+# Block systemd below 217 for 
-static-nodes-indicate-that-creation-of-static-nodes-.patch
 RDEPEND="!sys-apps/module-init-tools
        !sys-apps/modutils
-       !<sys-apps/openrc-0.12
+       !<sys-apps/openrc-0.13
+       !<sys-apps/systemd-217
        lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
        python? ( ${PYTHON_DEPS} )
        zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
@@ -51,6 +53,8 @@ fi
 
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
+DOCS="NEWS README TODO"
+
 src_prepare() {
        if [ ! -e configure ]; then
                if use doc; then
@@ -60,11 +64,11 @@ src_prepare() {
                fi
                eautoreconf
        else
-               epatch "${FILESDIR}"/${PN}-15-dynamic-kmod.patch #493630
-               epatch "${FILESDIR}"/${PN}-15-use-strndup.patch
                elibtoolize
        fi
 
+       epatch "${FILESDIR}"/${P}-strndupa.patch
+
        # Restore possibility of running --enable-static wrt #472608
        sed -i \
                -e '/--enable-static is not supported by 
kmod/s:as_fn_error:echo:' \
@@ -73,8 +77,8 @@ src_prepare() {
 
 src_configure() {
        local myeconfargs=(
-               --bindir=/bin
-               --with-rootlibdir="/$(get_libdir)"
+               --bindir="${EPREFIX}/bin"
+               --with-rootlibdir="${EPREFIX}/$(get_libdir)"
                --enable-shared
                $(use_enable static-libs static)
                $(use_enable tools)
@@ -101,12 +105,6 @@ src_configure() {
 }
 
 src_compile() {
-       if [[ ${PV} != 9999* ]]; then
-               # Force -j1 because of -15-dynamic-kmod.patch, likely caused by 
lack of eautoreconf
-               # wrt #494806
-               local MAKEOPTS="${MAKEOPTS} -j1"
-       fi
-
        emake -C "${BUILD_DIR}"
 
        if use python; then
@@ -126,6 +124,7 @@ src_compile() {
 
 src_install() {
        emake -C "${BUILD_DIR}" DESTDIR="${D}" install
+       einstalldocs
 
        if use python; then
                local native_builddir=${BUILD_DIR}
@@ -162,27 +161,27 @@ src_install() {
        insinto /lib/modprobe.d
        doins "${T}"/usb-load-ehci-first.conf #260139
 
-       doinitd "${FILESDIR}"/kmod-static-nodes
+       newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
 }
 
 pkg_postinst() {
-       if [[ -L ${ROOT%/}/etc/runlevels/boot/static-nodes ]]; then
+       if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
                ewarn "Removing old conflicting static-nodes init script from 
the boot runlevel"
-               rm -f "${ROOT%/}"/etc/runlevels/boot/static-nodes
+               rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
        fi
 
        # Add kmod to the runlevel automatically if this is the first install 
of this package.
        if [[ -z ${REPLACING_VERSIONS} ]]; then
-               if [[ ! -d ${ROOT%/}/etc/runlevels/sysinit ]]; then
-                       mkdir -p "${ROOT%/}"/etc/runlevels/sysinit
+               if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
+                       mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
                fi
-               if [[ -x ${ROOT%/}/etc/init.d/kmod-static-nodes ]]; then
-                       ln -s /etc/init.d/kmod-static-nodes 
"${ROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
+               if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
+                       ln -s /etc/init.d/kmod-static-nodes 
"${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
                fi
        fi
 
-       if [[ -e ${ROOT%/}/etc/runlevels/sysinit ]]; then
-               if [[ ! -e ${ROOT%/}/etc/runlevels/sysinit/kmod-static-nodes 
]]; then
+       if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
+               if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes 
]]; then
                        ewarn
                        ewarn "You need to add kmod-static-nodes to the sysinit 
runlevel for"
                        ewarn "kernel modules to have required static nodes!"

diff --git a/sys-apps/kmod/metadata.xml b/sys-apps/kmod/metadata.xml
index 97fc7c5..723317e 100644
--- a/sys-apps/kmod/metadata.xml
+++ b/sys-apps/kmod/metadata.xml
@@ -6,7 +6,6 @@
                <email>[email protected]</email>
        </maintainer>
        <use>
-               <flag name='openrc'>Install the OpenRC init scripts</flag>
                <flag name='tools'>Install module loading/unloading 
tools.</flag>
        </use>
 </pkgmetadata>

Reply via email to