* [gentoo-commits] proj/hardened-dev:musl commit in: sys-fs/eudev/files/, sys-fs/eudev/
@ 2013-08-12 21:34 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2013-08-12 21:34 UTC (permalink / raw
To: gentoo-commits
commit: 6f60db6b4239a83b2411afdd2a2ee4c762e627ba
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 21:24:30 2013 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Aug 12 21:36:51 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=6f60db6b
sys-fs/eudev: remove qsort and other musl compat issues
Package-Manager: portage-2.1.12.2
---
sys-fs/eudev/eudev-1.1.ebuild | 232 ++++++++++++++++++++++++++++++++
sys-fs/eudev/files/eudev-1.1-musl.patch | 118 ++++++++++++++++
sys-fs/eudev/files/udev-postmount | 55 ++++++++
sys-fs/eudev/metadata.xml | 20 +++
4 files changed, 425 insertions(+)
diff --git a/sys-fs/eudev/eudev-1.1.ebuild b/sys-fs/eudev/eudev-1.1.ebuild
new file mode 100644
index 0000000..164d374
--- /dev/null
+++ b/sys-fs/eudev/eudev-1.1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-1.1.ebuild,v 1.5 2013/07/25 15:31:49 axs Exp $
+
+EAPI="5"
+
+KV_min=2.6.31
+
+inherit autotools eutils linux-info
+
+if [[ ${PV} = 9999* ]]
+then
+ EGIT_REPO_URI="git://github.com/gentoo/eudev.git"
+ inherit git-2
+else
+ SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
+HOMEPAGE="https://github.com/gentoo/eudev"
+
+LICENSE="LGPL-2.1 MIT GPL-2"
+SLOT="0"
+IUSE="doc elibc_musl gudev hwdb kmod introspection keymap +modutils +openrc +rule-generator selinux static-libs test"
+
+COMMON_DEPEND="gudev? ( dev-libs/glib:2 )
+ kmod? ( sys-apps/kmod )
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+ selinux? ( sys-libs/libselinux )
+ >=sys-apps/util-linux-2.20
+ !<sys-libs/glibc-2.11"
+
+DEPEND="${COMMON_DEPEND}
+ keymap? ( dev-util/gperf )
+ >=dev-util/intltool-0.40.0
+ virtual/pkgconfig
+ virtual/os-headers
+ !<sys-kernel/linux-headers-${KV_min}
+ doc? ( dev-util/gtk-doc )
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ test? ( app-text/tree dev-lang/perl )"
+
+RDEPEND="${COMMON_DEPEND}
+ hwdb? ( >=sys-apps/hwids-20121202.2[udev] )
+ !sys-fs/udev
+ !sys-apps/coldplug
+ !sys-apps/systemd
+ !<sys-fs/lvm2-2.02.97
+ !sys-fs/device-mapper
+ !<sys-fs/udev-init-scripts-18"
+
+PDEPEND=">=virtual/udev-180
+ <virtual/udev-206
+ openrc? ( >=sys-fs/udev-init-scripts-18 )"
+
+pkg_pretend()
+{
+ if ! use rule-generator; then
+ ewarn
+ ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality,"
+ ewarn "as described in the URL below:"
+ ewarn "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
+ ewarn
+ ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing"
+ ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable"
+ ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules"
+ ewarn "exists:"
+ ewarn "\ttouch /etc/udev/rules.d/80-net-name-slot.rules"
+ ewarn
+ ewarn "We are working on a better solution for the next beta release."
+ ewarn
+ fi
+}
+
+pkg_setup()
+{
+ linux-info_pkg_setup
+ get_running_version
+
+ # These are required kernel options, but we don't error out on them
+ # because you can build under one kernel and run under another.
+ CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2"
+
+ if kernel_is lt ${KV_min//./ }; then
+ ewarn
+ ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}."
+ ewarn "Make sure to run udev under kernel version ${KV_min} or above."
+ ewarn
+ fi
+}
+
+src_prepare()
+{
+ # change rules back to group uucp instead of dialout for now
+ sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
+ || die "failed to change group dialout to uucp"
+
+ use elibc_musl && epatch "${FILESDIR}/${P}-musl.patch"
+
+ epatch_user
+
+ if [[ ! -e configure ]]
+ then
+ if use doc
+ then
+ gtkdocize --docdir docs || die "gtkdocize failed"
+ else
+ echo 'EXTRA_DIST =' > docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+src_configure()
+{
+ local econf_args
+
+ econf_args=(
+ ac_cv_search_cap_init=
+ ac_cv_header_sys_capability_h=yes
+ DBUS_CFLAGS=' '
+ DBUS_LIBS=' '
+ --with-rootprefix=
+ --docdir=/usr/share/doc/${PF}
+ --libdir=/usr/$(get_libdir)
+ --with-firmware-path="${EPREFIX}usr/lib/firmware/updates:${EPREFIX}usr/lib/firmware:${EPREFIX}lib/firmware/updates:${EPREFIX}lib/firmware"
+ --with-html-dir="/usr/share/doc/${PF}/html"
+ --with-rootlibdir=/$(get_libdir)
+ --enable-split-usr
+ --exec-prefix=/
+ $(use_enable doc gtk-doc)
+ $(use_enable gudev)
+ $(use_enable introspection)
+ $(use_enable keymap)
+ $(use_enable kmod libkmod)
+ $(use_enable modutils modules)
+ $(use_enable selinux)
+ $(use_enable static-libs static)
+ $(use_enable rule-generator)
+ )
+ econf "${econf_args[@]}"
+}
+
+src_test() {
+ # make sandbox get out of the way
+ # these are safe because there is a fake root filesystem put in place,
+ # but sandbox seems to evaluate the paths of the test i/o instead of the
+ # paths of the actual i/o that results.
+ addread /sys
+ addwrite /dev
+ addwrite /run
+ default_src_test
+}
+
+src_install()
+{
+ emake DESTDIR="${D}" install
+
+ prune_libtool_files --all
+ rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.*
+
+ use rule-generator && use openrc && doinitd "${FILESDIR}"/udev-postmount
+
+ # drop distributed hwdb files, they override sys-apps/hwids
+ rm -f "${ED}"/etc/udev/hwdb.d/*.hwdb
+}
+
+pkg_preinst()
+{
+ local htmldir
+ for htmldir in gudev libudev; do
+ if [[ -d ${EROOT}usr/share/gtk-doc/html/${htmldir} ]]
+ then
+ rm -rf "${EROOT}"usr/share/gtk-doc/html/${htmldir}
+ fi
+ if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]]
+ then
+ dosym ../../doc/${PF}/html/${htmldir} \
+ /usr/share/gtk-doc/html/${htmldir}
+ fi
+ done
+}
+
+pkg_postinst()
+{
+ mkdir -p "${EROOT}"run
+
+ # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
+ # So try to remove it here (will only work if empty).
+ rmdir "${EROOT}"dev/loop 2>/dev/null
+ if [[ -d ${EROOT}dev/loop ]]
+ then
+ ewarn "Please make sure you remove /dev/loop, else losetup"
+ ewarn "may be confused when looking for unused devices."
+ fi
+
+ # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
+ # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
+ if [[ -f ${EROOT}etc/udev/rules.d/64-device-mapper.rules ]] &&
+ ! has_version sys-fs/device-mapper
+ then
+ rm -f "${EROOT}"etc/udev/rules.d/64-device-mapper.rules
+ einfo "Removed unneeded file 64-device-mapper.rules"
+ fi
+
+ if use hwdb && has_version 'sys-apps/hwids[udev]'; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ fi
+
+ ewarn
+ ewarn "You need to restart eudev as soon as possible to make the"
+ ewarn "upgrade go into effect:"
+ ewarn "\t/etc/init.d/udev --nodeps restart"
+
+ if use rule-generator && use openrc; then
+ ewarn
+ ewarn "Please add the udev-postmount init script to your default runlevel"
+ ewarn "to ensure the legacy rule-generator functionality works as reliably"
+ ewarn "as possible."
+ ewarn "\trc-update add udev-postmount default"
+ fi
+
+ elog
+ elog "For more information on eudev on Gentoo, writing udev rules, and"
+ elog "fixing known issues visit:"
+ elog " http://www.gentoo.org/doc/en/udev-guide.xml"
+ elog
+}
diff --git a/sys-fs/eudev/files/eudev-1.1-musl.patch b/sys-fs/eudev/files/eudev-1.1-musl.patch
new file mode 100644
index 0000000..45da1ba
--- /dev/null
+++ b/sys-fs/eudev/files/eudev-1.1-musl.patch
@@ -0,0 +1,118 @@
+From 23aaa1fd0c5ee1bf95290b6aeda5a67558f6cb5f Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Mon, 29 Jul 2013 12:30:33 +0000
+Subject: [PATCH] Make eudev compatible with musl
+
+---
+ src/ata_id/ata_id.c | 1 -
+ src/libudev/path-util.c | 2 +-
+ src/libudev/strbuf.c | 2 ++
+ src/udev/mkdir.c | 2 +-
+ src/udev/udevadm-hwdb.c | 9 ++++++---
+ src/udev/udevd.c | 9 +--------
+ 6 files changed, 11 insertions(+), 14 deletions(-)
+
+diff --git a/src/ata_id/ata_id.c b/src/ata_id/ata_id.c
+index 68a06b9..595456d 100644
+--- a/src/ata_id/ata_id.c
++++ b/src/ata_id/ata_id.c
+@@ -30,7 +30,6 @@
+ #include <getopt.h>
+ #include <scsi/scsi.h>
+ #include <scsi/sg.h>
+-#include <scsi/scsi_ioctl.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff --git a/src/libudev/path-util.c b/src/libudev/path-util.c
+index fd67310..87f47a5 100644
+--- a/src/libudev/path-util.c
++++ b/src/libudev/path-util.c
+@@ -152,7 +152,7 @@ char **path_strv_canonicalize(char **l) {
+ }
+
+ errno = 0;
+- u = canonicalize_file_name(t);
++ u = realpath(t, NULL);
+ if (!u) {
+ if (errno == ENOENT)
+ u = t;
+diff --git a/src/libudev/strbuf.c b/src/libudev/strbuf.c
+index 01a076c..9792fed 100644
+--- a/src/libudev/strbuf.c
++++ b/src/libudev/strbuf.c
+@@ -125,6 +125,8 @@ static void bubbleinsert(struct strbuf_node *node,
+ node->children_count ++;
+ }
+
++typedef int (*__compar_fn_t)(const void *, const void *);
++
+ /* add string, return the index/offset into the buffer */
+ ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len) {
+ uint8_t c;
+diff --git a/src/udev/mkdir.c b/src/udev/mkdir.c
+index 420a9eb..5576fbc 100644
+--- a/src/udev/mkdir.c
++++ b/src/udev/mkdir.c
+@@ -90,7 +90,7 @@ static int mkdir_parents_internal(const char *prefix, const char *path, mode_t m
+ if (e == path)
+ return 0;
+
+- p = strndupa(path, e - path);
++ p = strndup(path, e - path);
+ r = is_dir(p);
+ if (r > 0)
+ return 0;
+diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
+index 8f5b1cb..d68dce9 100644
+--- a/src/udev/udevadm-hwdb.c
++++ b/src/udev/udevadm-hwdb.c
+@@ -123,10 +123,12 @@ static void trie_node_cleanup(struct trie_node *node) {
+ free(node);
+ }
+
+-static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
++
++static __thread void* cmp_data;
++static int trie_values_cmp(const void *v1, const void *v2) {
+ const struct trie_value_entry *val1 = v1;
+ const struct trie_value_entry *val2 = v2;
+- struct trie *trie = arg;
++ struct trie *trie = cmp_data;
+
+ return strcmp(trie->strings->buf + val1->key_off,
+ trie->strings->buf + val2->key_off);
+@@ -167,7 +169,8 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+ node->values[node->values_count].key_off = k;
+ node->values[node->values_count].value_off = v;
+ node->values_count++;
+- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
++ cmp_data = trie ;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
+ return 0;
+ }
+
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index a923ce7..7dc9f03 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -1214,15 +1214,8 @@ int main(int argc, char *argv[])
+ goto exit;
+ }
+
+- if (children_max <= 0) {
+- cpu_set_t cpu_set;
+-
++ if (children_max <= 0)
+ children_max = 8;
+-
+- if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
+- children_max += CPU_COUNT(&cpu_set) * 2;
+- }
+- }
+ log_debug("set children_max to %u\n", children_max);
+
+ udev_rules_apply_static_dev_perms(rules);
+--
+1.7.8.6
+
diff --git a/sys-fs/eudev/files/udev-postmount b/sys-fs/eudev/files/udev-postmount
new file mode 100755
index 0000000..e433736
--- /dev/null
+++ b/sys-fs/eudev/files/udev-postmount
@@ -0,0 +1,55 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend()
+{
+ need localmount
+ keyword -vserver -lxc
+}
+
+dir_writeable()
+{
+ touch "$1"/.test.$$ 2>/dev/null && rm "$1"/.test.$$
+}
+
+# store persistent-rules that got created while booting
+# when / was still read-only
+store_persistent_rules()
+{
+ # create /etc/udev/rules.d if it does not exist and /etc/udev is writable
+ [ -d /etc/udev/rules.d ] || \
+ dir_writeable /etc/udev && \
+ mkdir -p /etc/udev/rules.d
+
+ # only continue if rules-directory is writable
+ dir_writeable /etc/udev/rules.d || return 0
+
+ local file dest
+ for file in /run/udev/tmp-rules--*; do
+ dest=${file##*tmp-rules--}
+ [ "$dest" = '*' ] && break
+ type=${dest##70-persistent-}
+ type=${type%%.rules}
+ ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d"
+ cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file"
+ eend $? "Failed moving persistent rules!"
+ done
+}
+
+start()
+{
+ # check if this system uses udev
+ [ -d /run/udev ] || return 0
+
+ # store persistent-rules that got created while booting
+ # when / was still read-only
+ store_persistent_rules
+}
+
+stop()
+{
+ return 0
+}
+
+# vim:ts=4
diff --git a/sys-fs/eudev/metadata.xml b/sys-fs/eudev/metadata.xml
new file mode 100644
index 0000000..7595678
--- /dev/null
+++ b/sys-fs/eudev/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>eudev@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="gudev">enable libudev gobject interface</flag>
+ <flag name="hwdb">read vendor/device string database and add it to udev database</flag>
+ <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg>
+ for introspection</flag>
+ <flag name="keymap">map custom hardware's multimedia keys</flag>
+ <flag name="kmod">enable module loading through libkmod (requires modules)</flag>
+ <flag name="modutils">enable module loading support</flag>
+ <flag name="openrc">install the OpenRC init scripts</flag>
+ <flag name="rule-generator">install legacy rule generator rules and support scripts - note
+ that the functionality within was dropped from sys-fs/udev as it is not stable in
+ all cases; use at your own risk</flag>
+</use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-fs/eudev/files/, sys-fs/eudev/
@ 2013-09-29 21:29 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2013-09-29 21:29 UTC (permalink / raw
To: gentoo-commits
commit: 8f2c2fc509094788dbe34dcc66a2a24ea697ece5
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 23:46:07 2013 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Sep 29 21:30:10 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=8f2c2fc5
sys-fs/eudev: switch from strndup to a buffer
Package-Manager: portage-2.1.12.2
---
sys-fs/eudev/eudev-1.1.ebuild | 1 +
sys-fs/eudev/files/eudev-1.1-musl.patch | 13 ++++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/sys-fs/eudev/eudev-1.1.ebuild b/sys-fs/eudev/eudev-1.1.ebuild
index 164d374..7a4699c 100644
--- a/sys-fs/eudev/eudev-1.1.ebuild
+++ b/sys-fs/eudev/eudev-1.1.ebuild
@@ -132,6 +132,7 @@ src_configure()
--with-rootlibdir=/$(get_libdir)
--enable-split-usr
--exec-prefix=/
+ --disable-manpages
$(use_enable doc gtk-doc)
$(use_enable gudev)
$(use_enable introspection)
diff --git a/sys-fs/eudev/files/eudev-1.1-musl.patch b/sys-fs/eudev/files/eudev-1.1-musl.patch
index 45da1ba..ffd5719 100644
--- a/sys-fs/eudev/files/eudev-1.1-musl.patch
+++ b/sys-fs/eudev/files/eudev-1.1-musl.patch
@@ -25,7 +25,6 @@ index 68a06b9..595456d 100644
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/src/libudev/path-util.c b/src/libudev/path-util.c
-index fd67310..87f47a5 100644
--- a/src/libudev/path-util.c
+++ b/src/libudev/path-util.c
@@ -152,7 +152,7 @@ char **path_strv_canonicalize(char **l) {
@@ -54,12 +53,17 @@ diff --git a/src/udev/mkdir.c b/src/udev/mkdir.c
index 420a9eb..5576fbc 100644
--- a/src/udev/mkdir.c
+++ b/src/udev/mkdir.c
-@@ -90,7 +90,7 @@ static int mkdir_parents_internal(const char *prefix, const char *path, mode_t m
+@@ -90,7 +90,12 @@ static int mkdir_parents_internal(const char *prefix, const char *path, mode_t m
if (e == path)
return 0;
- p = strndupa(path, e - path);
-+ p = strndup(path, e - path);
++ char buf[PATH_MAX];
++ p = buf;
++ assert(e-path < sizeof(p));
++ memcpy(buf, path, e-path);
++ buf[e-path] = 0;
++
r = is_dir(p);
if (r > 0)
return 0;
@@ -67,7 +71,7 @@ diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index 8f5b1cb..d68dce9 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
-@@ -123,10 +123,12 @@ static void trie_node_cleanup(struct trie_node *node) {
+@@ -123,10 +128,12 @@ static void trie_node_cleanup(struct trie_node *node) {
free(node);
}
@@ -93,7 +97,6 @@ index 8f5b1cb..d68dce9 100644
}
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index a923ce7..7dc9f03 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1214,15 +1214,8 @@ int main(int argc, char *argv[])
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-fs/eudev/files/, sys-fs/eudev/
@ 2014-01-18 14:32 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2014-01-18 14:32 UTC (permalink / raw
To: gentoo-commits
commit: 4c7335f9ddd19c4f92824e411db8ce1f7d91420d
Author: layman <layman <AT> localhost>
AuthorDate: Thu Jan 16 16:05:35 2014 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 14:31:54 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=4c7335f9
sys-fs/eudev: fix --nonet for man
Package-Manager: portage-2.2.7
RepoMan-Options: --force
---
.../{eudev-1.1.ebuild => eudev-1.3-r99.ebuild} | 95 ++++++++++++----
sys-fs/eudev/files/40-gentoo.rules | 10 ++
sys-fs/eudev/files/eudev-1.1-musl.patch | 121 ---------------------
sys-fs/eudev/files/eudev-man-no_nonet.patch | 11 ++
sys-fs/eudev/files/eudev-selinux-timespan.patch | 27 +++++
sys-fs/eudev/metadata.xml | 6 +-
6 files changed, 122 insertions(+), 148 deletions(-)
diff --git a/sys-fs/eudev/eudev-1.1.ebuild b/sys-fs/eudev/eudev-1.3-r99.ebuild
similarity index 72%
rename from sys-fs/eudev/eudev-1.1.ebuild
rename to sys-fs/eudev/eudev-1.3-r99.ebuild
index 7a4699c..5a76931 100644
--- a/sys-fs/eudev/eudev-1.1.ebuild
+++ b/sys-fs/eudev/eudev-1.3-r99.ebuild
@@ -1,12 +1,12 @@
-# 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-fs/eudev/eudev-1.1.ebuild,v 1.5 2013/07/25 15:31:49 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-1.3.ebuild,v 1.11 2014/01/06 20:12:32 axs Exp $
EAPI="5"
KV_min=2.6.31
-inherit autotools eutils linux-info
+inherit autotools eutils multilib linux-info multilib-minimal
if [[ ${PV} = 9999* ]]
then
@@ -14,7 +14,7 @@ then
inherit git-2
else
SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+ KEYWORDS="amd64 arm hppa ~mips ~ppc ~ppc64 x86"
fi
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
@@ -22,14 +22,18 @@ HOMEPAGE="https://github.com/gentoo/eudev"
LICENSE="LGPL-2.1 MIT GPL-2"
SLOT="0"
-IUSE="doc elibc_musl gudev hwdb kmod introspection keymap +modutils +openrc +rule-generator selinux static-libs test"
+IUSE="doc gudev hwdb kmod introspection keymap +modutils +openrc +rule-generator selinux static-libs test"
COMMON_DEPEND="gudev? ( dev-libs/glib:2 )
kmod? ( sys-apps/kmod )
introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
selinux? ( sys-libs/libselinux )
>=sys-apps/util-linux-2.20
- !<sys-libs/glibc-2.11"
+ !<sys-libs/glibc-2.11
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
DEPEND="${COMMON_DEPEND}
keymap? ( dev-util/gperf )
@@ -43,7 +47,6 @@ DEPEND="${COMMON_DEPEND}
test? ( app-text/tree dev-lang/perl )"
RDEPEND="${COMMON_DEPEND}
- hwdb? ( >=sys-apps/hwids-20121202.2[udev] )
!sys-fs/udev
!sys-apps/coldplug
!sys-apps/systemd
@@ -51,10 +54,13 @@ RDEPEND="${COMMON_DEPEND}
!sys-fs/device-mapper
!<sys-fs/udev-init-scripts-18"
-PDEPEND=">=virtual/udev-180
- <virtual/udev-206
+PDEPEND="hwdb? ( >=sys-apps/hwids-20130717-r1[udev] )
+ keymap? ( >=sys-apps/hwids-20130717-r1[udev] )
+ >=virtual/udev-206-r2
openrc? ( >=sys-fs/udev-init-scripts-18 )"
+REQUIRED_USE="keymap? ( hwdb )"
+
pkg_pretend()
{
if ! use rule-generator; then
@@ -97,7 +103,8 @@ src_prepare()
sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
|| die "failed to change group dialout to uucp"
- use elibc_musl && epatch "${FILESDIR}/${P}-musl.patch"
+ epatch "${FILESDIR}"/${PN}-selinux-timespan.patch
+ epatch "${FILESDIR}"/${PN}-man-no_nonet.patch
epatch_user
@@ -115,7 +122,7 @@ src_prepare()
fi
}
-src_configure()
+multilib_src_configure()
{
local econf_args
@@ -129,38 +136,70 @@ src_configure()
--libdir=/usr/$(get_libdir)
--with-firmware-path="${EPREFIX}usr/lib/firmware/updates:${EPREFIX}usr/lib/firmware:${EPREFIX}lib/firmware/updates:${EPREFIX}lib/firmware"
--with-html-dir="/usr/share/doc/${PF}/html"
- --with-rootlibdir=/$(get_libdir)
--enable-split-usr
--exec-prefix=/
- --disable-manpages
+ )
+
+ # Only build libudev for non-native_abi, and only install it to libdir,
+ # that means all options only apply to native_abi
+ if multilib_build_binaries; then econf_args+=(
+ --with-rootlibdir=/$(get_libdir)
$(use_enable doc gtk-doc)
$(use_enable gudev)
$(use_enable introspection)
$(use_enable keymap)
$(use_enable kmod libkmod)
- $(use_enable modutils modules)
- $(use_enable selinux)
+ $(usex kmod --enable-modules $(use_enable modutils modules))
$(use_enable static-libs static)
+ $(use_enable selinux)
$(use_enable rule-generator)
- )
- econf "${econf_args[@]}"
+ )
+ else econf_args+=(
+ $(echo --disable-{gtk-doc,gudev,introspection,keymap,libkmod,modules,static,selinux,rule-generator})
+ )
+ fi
+ ECONF_SOURCE="${S}" econf "${econf_args[@]}"
+}
+
+multilib_src_compile()
+{
+ if ! multilib_build_binaries; then
+ cd src/libudev || die "Could not change directory"
+ fi
+ emake
}
-src_test() {
+multilib_src_install()
+{
+ if ! multilib_build_binaries; then
+ cd src/libudev || die "Could not change directory"
+ fi
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_test()
+{
# make sandbox get out of the way
# these are safe because there is a fake root filesystem put in place,
# but sandbox seems to evaluate the paths of the test i/o instead of the
# paths of the actual i/o that results.
- addread /sys
- addwrite /dev
- addwrite /run
- default_src_test
+ # also only test for native abi
+ if multilib_build_binaries; then
+ addread /sys
+ addwrite /dev
+ addwrite /run
+ default_src_test
+ fi
}
-src_install()
+# disable header checks because we only install libudev headers for non-native abi
+multilib_check_headers()
{
- emake DESTDIR="${D}" install
+ :
+}
+multilib_src_install_all()
+{
prune_libtool_files --all
rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.*
@@ -210,6 +249,14 @@ pkg_postinst()
if use hwdb && has_version 'sys-apps/hwids[udev]'; then
udevadm hwdb --update --root="${ROOT%/}"
+
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
+ # reload database after it has be rebuilt, but only if we are not upgrading
+ # also pass if we are -9999 since who knows what hwdb related changes there might be
+ if [[ ${REPLACING_VERSIONS%-r*} == ${PV} || -z ${REPLACING_VERSIONS} ]] && \
+ [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then
+ udevadm control --reload
+ fi
fi
ewarn
diff --git a/sys-fs/eudev/files/40-gentoo.rules b/sys-fs/eudev/files/40-gentoo.rules
new file mode 100644
index 0000000..365c6ea
--- /dev/null
+++ b/sys-fs/eudev/files/40-gentoo.rules
@@ -0,0 +1,10 @@
+# do not edit this file, it will be overwritten on update
+
+# Propably unrequired, check how it is with OSS/OSS4, then remove
+SUBSYSTEM=="snd", GROUP="audio"
+
+# Gentoo specific usb group
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
+
+# Keep this for Linux 2.6.32 support wrt #457868
+SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
diff --git a/sys-fs/eudev/files/eudev-1.1-musl.patch b/sys-fs/eudev/files/eudev-1.1-musl.patch
deleted file mode 100644
index ffd5719..0000000
--- a/sys-fs/eudev/files/eudev-1.1-musl.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 23aaa1fd0c5ee1bf95290b6aeda5a67558f6cb5f Mon Sep 17 00:00:00 2001
-From: "Anthony G. Basile" <blueness@gentoo.org>
-Date: Mon, 29 Jul 2013 12:30:33 +0000
-Subject: [PATCH] Make eudev compatible with musl
-
----
- src/ata_id/ata_id.c | 1 -
- src/libudev/path-util.c | 2 +-
- src/libudev/strbuf.c | 2 ++
- src/udev/mkdir.c | 2 +-
- src/udev/udevadm-hwdb.c | 9 ++++++---
- src/udev/udevd.c | 9 +--------
- 6 files changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/src/ata_id/ata_id.c b/src/ata_id/ata_id.c
-index 68a06b9..595456d 100644
---- a/src/ata_id/ata_id.c
-+++ b/src/ata_id/ata_id.c
-@@ -30,7 +30,6 @@
- #include <getopt.h>
- #include <scsi/scsi.h>
- #include <scsi/sg.h>
--#include <scsi/scsi_ioctl.h>
- #include <sys/ioctl.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-diff --git a/src/libudev/path-util.c b/src/libudev/path-util.c
---- a/src/libudev/path-util.c
-+++ b/src/libudev/path-util.c
-@@ -152,7 +152,7 @@ char **path_strv_canonicalize(char **l) {
- }
-
- errno = 0;
-- u = canonicalize_file_name(t);
-+ u = realpath(t, NULL);
- if (!u) {
- if (errno == ENOENT)
- u = t;
-diff --git a/src/libudev/strbuf.c b/src/libudev/strbuf.c
-index 01a076c..9792fed 100644
---- a/src/libudev/strbuf.c
-+++ b/src/libudev/strbuf.c
-@@ -125,6 +125,8 @@ static void bubbleinsert(struct strbuf_node *node,
- node->children_count ++;
- }
-
-+typedef int (*__compar_fn_t)(const void *, const void *);
-+
- /* add string, return the index/offset into the buffer */
- ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len) {
- uint8_t c;
-diff --git a/src/udev/mkdir.c b/src/udev/mkdir.c
-index 420a9eb..5576fbc 100644
---- a/src/udev/mkdir.c
-+++ b/src/udev/mkdir.c
-@@ -90,7 +90,12 @@ static int mkdir_parents_internal(const char *prefix, const char *path, mode_t m
- if (e == path)
- return 0;
-
-- p = strndupa(path, e - path);
-+ char buf[PATH_MAX];
-+ p = buf;
-+ assert(e-path < sizeof(p));
-+ memcpy(buf, path, e-path);
-+ buf[e-path] = 0;
-+
- r = is_dir(p);
- if (r > 0)
- return 0;
-diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
-index 8f5b1cb..d68dce9 100644
---- a/src/udev/udevadm-hwdb.c
-+++ b/src/udev/udevadm-hwdb.c
-@@ -123,10 +128,12 @@ static void trie_node_cleanup(struct trie_node *node) {
- free(node);
- }
-
--static int trie_values_cmp(const void *v1, const void *v2, void *arg) {
-+
-+static __thread void* cmp_data;
-+static int trie_values_cmp(const void *v1, const void *v2) {
- const struct trie_value_entry *val1 = v1;
- const struct trie_value_entry *val2 = v2;
-- struct trie *trie = arg;
-+ struct trie *trie = cmp_data;
-
- return strcmp(trie->strings->buf + val1->key_off,
- trie->strings->buf + val2->key_off);
-@@ -167,7 +169,8 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- node->values[node->values_count].key_off = k;
- node->values[node->values_count].value_off = v;
- node->values_count++;
-- qsort_r(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp, trie);
-+ cmp_data = trie ;
-+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
- return 0;
- }
-
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -1214,15 +1214,8 @@ int main(int argc, char *argv[])
- goto exit;
- }
-
-- if (children_max <= 0) {
-- cpu_set_t cpu_set;
--
-+ if (children_max <= 0)
- children_max = 8;
--
-- if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
-- children_max += CPU_COUNT(&cpu_set) * 2;
-- }
-- }
- log_debug("set children_max to %u\n", children_max);
-
- udev_rules_apply_static_dev_perms(rules);
---
-1.7.8.6
-
diff --git a/sys-fs/eudev/files/eudev-man-no_nonet.patch b/sys-fs/eudev/files/eudev-man-no_nonet.patch
new file mode 100644
index 0000000..038ce01
--- /dev/null
+++ b/sys-fs/eudev/files/eudev-man-no_nonet.patch
@@ -0,0 +1,11 @@
+diff -Naur eudev-1.3.orig/man/Makefile.am eudev-1.3/man/Makefile.am
+--- eudev-1.3.orig/man/Makefile.am 2013-08-26 22:36:38.000000000 +0000
++++ eudev-1.3/man/Makefile.am 2014-01-16 14:30:24.157075876 +0000
+@@ -23,7 +23,6 @@
+ $(MANPAGES)
+
+ XSLTPROC_FLAGS = \
+- --nonet \
+ --stringparam man.output.quietly 1 \
+ --stringparam funcsynopsis.style ansi \
+ --stringparam man.th.extra1.suppress 1 \
diff --git a/sys-fs/eudev/files/eudev-selinux-timespan.patch b/sys-fs/eudev/files/eudev-selinux-timespan.patch
new file mode 100644
index 0000000..0a51ee9
--- /dev/null
+++ b/sys-fs/eudev/files/eudev-selinux-timespan.patch
@@ -0,0 +1,27 @@
+commit 3cc37a5e294048a52fa3c2aa2c1ed89b0cd07169
+Author: Ian Stakenvicius <axs@gentoo.org>
+Date: Thu Aug 8 11:09:30 2013 -0400
+
+ Fixed compile error when --enable-selinux
+
+ FORMAT_TIMESPAN_MAX is used in src/udev/label.c in selinux-related
+ code, but this was not defined as it is located in a shared header
+ in systemd. Added the define to label.h. Didn't bother to track
+ down what commit added (or removed) this code (define)
+
+ Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
+
+diff --git a/src/udev/label.h b/src/udev/label.h
+index 3d12ac2..507fd2c 100644
+--- a/src/udev/label.h
++++ b/src/udev/label.h
+@@ -25,6 +25,9 @@
+ #include <stdbool.h>
+ #include <sys/socket.h>
+
++/* from systemd src/shared/time-util.h */
++#define FORMAT_TIMESPAN_MAX 64
++
+ int label_init(const char *prefix);
+ void label_finish(void);
+
diff --git a/sys-fs/eudev/metadata.xml b/sys-fs/eudev/metadata.xml
index 7595678..aa05178 100644
--- a/sys-fs/eudev/metadata.xml
+++ b/sys-fs/eudev/metadata.xml
@@ -8,10 +8,10 @@
<flag name="gudev">enable libudev gobject interface</flag>
<flag name="hwdb">read vendor/device string database and add it to udev database</flag>
<flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg>
- for introspection</flag>
+ for introspection</flag>
<flag name="keymap">map custom hardware's multimedia keys</flag>
- <flag name="kmod">enable module loading through libkmod (requires modules)</flag>
- <flag name="modutils">enable module loading support</flag>
+ <flag name="kmod">enable module loading through libkmod</flag>
+ <flag name="modutils">enable module loading support - use modutils calls if kmod not enabled</flag>
<flag name="openrc">install the OpenRC init scripts</flag>
<flag name="rule-generator">install legacy rule generator rules and support scripts - note
that the functionality within was dropped from sys-fs/udev as it is not stable in
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-fs/eudev/files/, sys-fs/eudev/
@ 2014-05-22 13:56 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2014-05-22 13:56 UTC (permalink / raw
To: gentoo-commits
commit: dc1cdd5e5fb9179cad6656a3d03a1f5747c7a7b0
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu May 22 13:58:40 2014 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu May 22 13:58:40 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=dc1cdd5e
sys-fs/eudev: 1.5.3-r1 builds on musl
Package-Manager: portage-2.2.8-r1
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA
---
sys-fs/eudev/eudev-1.3-r99.ebuild | 280 ------------------------
sys-fs/eudev/files/40-gentoo.rules | 10 -
sys-fs/eudev/files/eudev-man-no_nonet.patch | 11 -
sys-fs/eudev/files/eudev-selinux-timespan.patch | 27 ---
sys-fs/eudev/files/udev-postmount | 55 -----
sys-fs/eudev/metadata.xml | 20 --
6 files changed, 403 deletions(-)
diff --git a/sys-fs/eudev/eudev-1.3-r99.ebuild b/sys-fs/eudev/eudev-1.3-r99.ebuild
deleted file mode 100644
index 66917b7..0000000
--- a/sys-fs/eudev/eudev-1.3-r99.ebuild
+++ /dev/null
@@ -1,280 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-1.3.ebuild,v 1.11 2014/01/06 20:12:32 axs Exp $
-
-EAPI="5"
-
-KV_min=2.6.31
-
-inherit autotools eutils multilib linux-info multilib-minimal
-
-if [[ ${PV} = 9999* ]]
-then
- EGIT_REPO_URI="git://github.com/gentoo/eudev.git"
- inherit git-2
-else
- SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
- KEYWORDS="amd64 arm ~mips x86"
-fi
-
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="https://github.com/gentoo/eudev"
-
-LICENSE="LGPL-2.1 MIT GPL-2"
-SLOT="0"
-IUSE="doc gudev hwdb kmod introspection keymap +modutils +openrc +rule-generator selinux static-libs test"
-
-COMMON_DEPEND="gudev? ( dev-libs/glib:2 )
- kmod? ( sys-apps/kmod )
- introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
- selinux? ( sys-libs/libselinux )
- >=sys-apps/util-linux-2.20
- !<sys-libs/glibc-2.11
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
- )"
-
-DEPEND="${COMMON_DEPEND}
- keymap? ( dev-util/gperf )
- >=dev-util/intltool-0.40.0
- virtual/pkgconfig
- virtual/os-headers
- !<sys-kernel/linux-headers-${KV_min}
- doc? ( dev-util/gtk-doc )
- app-text/docbook-xsl-stylesheets
- dev-libs/libxslt
- test? ( app-text/tree dev-lang/perl )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-fs/udev
- !sys-apps/coldplug
- !sys-apps/systemd
- !<sys-fs/lvm2-2.02.97
- !sys-fs/device-mapper
- !<sys-fs/udev-init-scripts-18"
-
-PDEPEND="hwdb? ( >=sys-apps/hwids-20130717-r1[udev] )
- keymap? ( >=sys-apps/hwids-20130717-r1[udev] )
- >=virtual/udev-206-r2
- openrc? ( >=sys-fs/udev-init-scripts-18 )"
-
-REQUIRED_USE="keymap? ( hwdb )"
-
-pkg_pretend()
-{
- if ! use rule-generator; then
- ewarn
- ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality,"
- ewarn "as described in the URL below:"
- ewarn "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
- ewarn
- ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing"
- ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable"
- ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules"
- ewarn "exists:"
- ewarn "\ttouch /etc/udev/rules.d/80-net-name-slot.rules"
- ewarn
- ewarn "We are working on a better solution for the next beta release."
- ewarn
- fi
-}
-
-pkg_setup()
-{
- linux-info_pkg_setup
- get_running_version
-
- # These are required kernel options, but we don't error out on them
- # because you can build under one kernel and run under another.
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2"
-
- if kernel_is lt ${KV_min//./ }; then
- ewarn
- ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}."
- ewarn "Make sure to run udev under kernel version ${KV_min} or above."
- ewarn
- fi
-}
-
-src_prepare()
-{
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
- || die "failed to change group dialout to uucp"
-
- epatch "${FILESDIR}"/${PN}-selinux-timespan.patch
- epatch "${FILESDIR}"/${PN}-man-no_nonet.patch
-
- epatch_user
-
- if [[ ! -e configure ]]
- then
- if use doc
- then
- gtkdocize --docdir docs || die "gtkdocize failed"
- else
- echo 'EXTRA_DIST =' > docs/gtk-doc.make
- fi
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-multilib_src_configure()
-{
- local econf_args
-
- econf_args=(
- ac_cv_search_cap_init=
- ac_cv_header_sys_capability_h=yes
- DBUS_CFLAGS=' '
- DBUS_LIBS=' '
- --with-rootprefix=
- --docdir=/usr/share/doc/${PF}
- --libdir=/usr/$(get_libdir)
- --with-firmware-path="${EPREFIX}usr/lib/firmware/updates:${EPREFIX}usr/lib/firmware:${EPREFIX}lib/firmware/updates:${EPREFIX}lib/firmware"
- --with-html-dir="/usr/share/doc/${PF}/html"
- --enable-split-usr
- --exec-prefix=/
- )
-
- # Only build libudev for non-native_abi, and only install it to libdir,
- # that means all options only apply to native_abi
- if multilib_build_binaries; then econf_args+=(
- --with-rootlibdir=/$(get_libdir)
- $(use_enable doc gtk-doc)
- $(use_enable gudev)
- $(use_enable introspection)
- $(use_enable keymap)
- $(use_enable kmod libkmod)
- $(usex kmod --enable-modules $(use_enable modutils modules))
- $(use_enable static-libs static)
- $(use_enable selinux)
- $(use_enable rule-generator)
- )
- else econf_args+=(
- $(echo --disable-{gtk-doc,gudev,introspection,keymap,libkmod,modules,static,selinux,rule-generator})
- )
- fi
- ECONF_SOURCE="${S}" econf "${econf_args[@]}"
-}
-
-multilib_src_compile()
-{
- if ! multilib_build_binaries; then
- cd src/libudev || die "Could not change directory"
- fi
- emake
-}
-
-multilib_src_install()
-{
- if ! multilib_build_binaries; then
- cd src/libudev || die "Could not change directory"
- fi
- emake DESTDIR="${D}" install
-}
-
-multilib_src_test()
-{
- # make sandbox get out of the way
- # these are safe because there is a fake root filesystem put in place,
- # but sandbox seems to evaluate the paths of the test i/o instead of the
- # paths of the actual i/o that results.
- # also only test for native abi
- if multilib_build_binaries; then
- addread /sys
- addwrite /dev
- addwrite /run
- default_src_test
- fi
-}
-
-# disable header checks because we only install libudev headers for non-native abi
-multilib_check_headers()
-{
- :
-}
-
-multilib_src_install_all()
-{
- prune_libtool_files --all
- rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.*
-
- use rule-generator && use openrc && doinitd "${FILESDIR}"/udev-postmount
-
- # drop distributed hwdb files, they override sys-apps/hwids
- rm -f "${ED}"/etc/udev/hwdb.d/*.hwdb
-}
-
-pkg_preinst()
-{
- local htmldir
- for htmldir in gudev libudev; do
- if [[ -d ${EROOT}usr/share/gtk-doc/html/${htmldir} ]]
- then
- rm -rf "${EROOT}"usr/share/gtk-doc/html/${htmldir}
- fi
- if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]]
- then
- dosym ../../doc/${PF}/html/${htmldir} \
- /usr/share/gtk-doc/html/${htmldir}
- fi
- done
-}
-
-pkg_postinst()
-{
- mkdir -p "${EROOT}"run
-
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
- # So try to remove it here (will only work if empty).
- rmdir "${EROOT}"dev/loop 2>/dev/null
- if [[ -d ${EROOT}dev/loop ]]
- then
- ewarn "Please make sure you remove /dev/loop, else losetup"
- ewarn "may be confused when looking for unused devices."
- fi
-
- # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
- # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
- if [[ -f ${EROOT}etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${EROOT}"etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- if use hwdb && has_version 'sys-apps/hwids[udev]'; then
- udevadm hwdb --update --root="${ROOT%/}"
-
- # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
- # reload database after it has be rebuilt, but only if we are not upgrading
- # also pass if we are -9999 since who knows what hwdb related changes there might be
- if [[ ${REPLACING_VERSIONS%-r*} == ${PV} || -z ${REPLACING_VERSIONS} ]] && \
- [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then
- udevadm control --reload
- fi
- fi
-
- ewarn
- ewarn "You need to restart eudev as soon as possible to make the"
- ewarn "upgrade go into effect:"
- ewarn "\t/etc/init.d/udev --nodeps restart"
-
- if use rule-generator && use openrc; then
- ewarn
- ewarn "Please add the udev-postmount init script to your default runlevel"
- ewarn "to ensure the legacy rule-generator functionality works as reliably"
- ewarn "as possible."
- ewarn "\trc-update add udev-postmount default"
- fi
-
- elog
- elog "For more information on eudev on Gentoo, writing udev rules, and"
- elog "fixing known issues visit:"
- elog " http://www.gentoo.org/doc/en/udev-guide.xml"
- elog
-}
diff --git a/sys-fs/eudev/files/40-gentoo.rules b/sys-fs/eudev/files/40-gentoo.rules
deleted file mode 100644
index 365c6ea..0000000
--- a/sys-fs/eudev/files/40-gentoo.rules
+++ /dev/null
@@ -1,10 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-# Propably unrequired, check how it is with OSS/OSS4, then remove
-SUBSYSTEM=="snd", GROUP="audio"
-
-# Gentoo specific usb group
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
-
-# Keep this for Linux 2.6.32 support wrt #457868
-SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
diff --git a/sys-fs/eudev/files/eudev-man-no_nonet.patch b/sys-fs/eudev/files/eudev-man-no_nonet.patch
deleted file mode 100644
index 038ce01..0000000
--- a/sys-fs/eudev/files/eudev-man-no_nonet.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur eudev-1.3.orig/man/Makefile.am eudev-1.3/man/Makefile.am
---- eudev-1.3.orig/man/Makefile.am 2013-08-26 22:36:38.000000000 +0000
-+++ eudev-1.3/man/Makefile.am 2014-01-16 14:30:24.157075876 +0000
-@@ -23,7 +23,6 @@
- $(MANPAGES)
-
- XSLTPROC_FLAGS = \
-- --nonet \
- --stringparam man.output.quietly 1 \
- --stringparam funcsynopsis.style ansi \
- --stringparam man.th.extra1.suppress 1 \
diff --git a/sys-fs/eudev/files/eudev-selinux-timespan.patch b/sys-fs/eudev/files/eudev-selinux-timespan.patch
deleted file mode 100644
index 0a51ee9..0000000
--- a/sys-fs/eudev/files/eudev-selinux-timespan.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 3cc37a5e294048a52fa3c2aa2c1ed89b0cd07169
-Author: Ian Stakenvicius <axs@gentoo.org>
-Date: Thu Aug 8 11:09:30 2013 -0400
-
- Fixed compile error when --enable-selinux
-
- FORMAT_TIMESPAN_MAX is used in src/udev/label.c in selinux-related
- code, but this was not defined as it is located in a shared header
- in systemd. Added the define to label.h. Didn't bother to track
- down what commit added (or removed) this code (define)
-
- Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
-
-diff --git a/src/udev/label.h b/src/udev/label.h
-index 3d12ac2..507fd2c 100644
---- a/src/udev/label.h
-+++ b/src/udev/label.h
-@@ -25,6 +25,9 @@
- #include <stdbool.h>
- #include <sys/socket.h>
-
-+/* from systemd src/shared/time-util.h */
-+#define FORMAT_TIMESPAN_MAX 64
-+
- int label_init(const char *prefix);
- void label_finish(void);
-
diff --git a/sys-fs/eudev/files/udev-postmount b/sys-fs/eudev/files/udev-postmount
deleted file mode 100755
index e433736..0000000
--- a/sys-fs/eudev/files/udev-postmount
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend()
-{
- need localmount
- keyword -vserver -lxc
-}
-
-dir_writeable()
-{
- touch "$1"/.test.$$ 2>/dev/null && rm "$1"/.test.$$
-}
-
-# store persistent-rules that got created while booting
-# when / was still read-only
-store_persistent_rules()
-{
- # create /etc/udev/rules.d if it does not exist and /etc/udev is writable
- [ -d /etc/udev/rules.d ] || \
- dir_writeable /etc/udev && \
- mkdir -p /etc/udev/rules.d
-
- # only continue if rules-directory is writable
- dir_writeable /etc/udev/rules.d || return 0
-
- local file dest
- for file in /run/udev/tmp-rules--*; do
- dest=${file##*tmp-rules--}
- [ "$dest" = '*' ] && break
- type=${dest##70-persistent-}
- type=${type%%.rules}
- ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d"
- cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file"
- eend $? "Failed moving persistent rules!"
- done
-}
-
-start()
-{
- # check if this system uses udev
- [ -d /run/udev ] || return 0
-
- # store persistent-rules that got created while booting
- # when / was still read-only
- store_persistent_rules
-}
-
-stop()
-{
- return 0
-}
-
-# vim:ts=4
diff --git a/sys-fs/eudev/metadata.xml b/sys-fs/eudev/metadata.xml
deleted file mode 100644
index aa05178..0000000
--- a/sys-fs/eudev/metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer>
- <email>eudev@gentoo.org</email>
-</maintainer>
-<use>
- <flag name="gudev">enable libudev gobject interface</flag>
- <flag name="hwdb">read vendor/device string database and add it to udev database</flag>
- <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg>
- for introspection</flag>
- <flag name="keymap">map custom hardware's multimedia keys</flag>
- <flag name="kmod">enable module loading through libkmod</flag>
- <flag name="modutils">enable module loading support - use modutils calls if kmod not enabled</flag>
- <flag name="openrc">install the OpenRC init scripts</flag>
- <flag name="rule-generator">install legacy rule generator rules and support scripts - note
- that the functionality within was dropped from sys-fs/udev as it is not stable in
- all cases; use at your own risk</flag>
-</use>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-22 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-18 14:32 [gentoo-commits] proj/hardened-dev:musl commit in: sys-fs/eudev/files/, sys-fs/eudev/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2014-05-22 13:56 Anthony G. Basile
2013-09-29 21:29 Anthony G. Basile
2013-08-12 21:34 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox