public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-kernel/dracut/files: 024-0003-dracut-functions.sh-support-for-altern.patch 024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch 024-0002-dracut-functions.sh-fixed-inst_rules-s.patch 024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch 024-0002-dracut-functions.sh-support-for-altern.patch
@ 2013-01-07 18:37 Amadeusz Zolnowski (aidecoe)
  0 siblings, 0 replies; only message in thread
From: Amadeusz Zolnowski (aidecoe) @ 2013-01-07 18:37 UTC (permalink / raw
  To: gentoo-commits

aidecoe     13/01/07 18:37:42

  Added:               
                        024-0003-dracut-functions.sh-support-for-altern.patch
                        024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch
                        024-0002-dracut-functions.sh-fixed-inst_rules-s.patch
  Removed:             
                        024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch
                        024-0002-dracut-functions.sh-support-for-altern.patch
  Log:
  Use alternative dirs to search for udev rules, but install in udevdir. Fixes
  bug #447088. Thanks to Alexander Tsoy <alexander@tsoy.me> for a patch.
  
  (Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key E1DBFAB5)

Revision  Changes    Path
1.1                  sys-kernel/dracut/files/024-0003-dracut-functions.sh-support-for-altern.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/files/024-0003-dracut-functions.sh-support-for-altern.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/files/024-0003-dracut-functions.sh-support-for-altern.patch?rev=1.1&content-type=text/plain

Index: 024-0003-dracut-functions.sh-support-for-altern.patch
===================================================================
From f0beefbb40b90ac53896dcc0d4b9ee33369373e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Sun, 6 Jan 2013 13:35:01 +0100
Subject: [PATCH 3/4] dracut-functions.sh: support for alternative udev dirs -
 udevaltdirs

It is required for Gentoo which moves udev from / to /usr and supports
both /lib/udev and /usr/lib/udev for compatibility with other packages.

Credits go to Alexander Tsoy <alexander@tsoy.me>.
---
 dracut-functions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 5481368..5b6394e 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -901,6 +901,15 @@ inst_rules() {
     inst_dir "$_target"
     for _rule in "$@"; do
         if [ "${_rule#/}" = "$_rule" ]; then
+            for r in ${udevaltdirs}; do
+                [[ "$r" = "${udevdir}" ]] && continue
+                if [[ -f $r/rules.d/$_rule ]]; then
+                    _found="$r/rules.d/$_rule"
+                    inst_rule_programs "$_found"
+                    inst_rule_group_owner "$_found"
+                    inst_simple "$_found" "${udevdir}/rules.d/${_found##*/}"
+                fi
+            done
             for r in ${udevdir}/rules.d /etc/udev/rules.d; do
                 if [[ -f $r/$_rule ]]; then
                     _found="$r/$_rule"
-- 
1.8.0.2




1.1                  sys-kernel/dracut/files/024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/files/024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/files/024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch?rev=1.1&content-type=text/plain

Index: 024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch
===================================================================
From 3380611905062ef7796114a45502882b1ed0df65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Sun, 16 Dec 2012 20:02:48 +0100
Subject: [PATCH 4/4] gentoo.conf: let udevdir= be handled by pkg-config and
 use udevaltdirs

To avoid need of rebuild after udev update/downgrade let udevdir= be set
dynamically with pkg-config.  Use udevaltdirs to search for rules both
in old and new locations.
---
 dracut.conf.d/gentoo.conf.example | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dracut.conf.d/gentoo.conf.example b/dracut.conf.d/gentoo.conf.example
index 1361a30..b78e5c6 100644
--- a/dracut.conf.d/gentoo.conf.example
+++ b/dracut.conf.d/gentoo.conf.example
@@ -1,7 +1,8 @@
 # /etc/dracut.conf.d/gentoo.conf
 # dracut config file customized for Gentoo Base System release 2
 
-udevdir=/lib/udev
+udevdir=
+udevaltdirs="/lib/udev /usr/lib/udev"
 ro_mnt=yes
 
 #
-- 
1.8.0.2




1.1                  sys-kernel/dracut/files/024-0002-dracut-functions.sh-fixed-inst_rules-s.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/files/024-0002-dracut-functions.sh-fixed-inst_rules-s.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/files/024-0002-dracut-functions.sh-fixed-inst_rules-s.patch?rev=1.1&content-type=text/plain

Index: 024-0002-dracut-functions.sh-fixed-inst_rules-s.patch
===================================================================
From d49d600c12ed2a2ed057b082a46e3139ebe6afe5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 3 Jan 2013 09:29:05 +0100
Subject: [PATCH 2/4] dracut-functions.sh: fixed inst_rules search path

---
 dracut-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index f1c797c..5481368 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -900,7 +900,7 @@ inst_rules() {
     inst_dir "${udevdir}/rules.d"
     inst_dir "$_target"
     for _rule in "$@"; do
-        if [ "${rule#/}" = "$rule" ]; then
+        if [ "${_rule#/}" = "$_rule" ]; then
             for r in ${udevdir}/rules.d /etc/udev/rules.d; do
                 if [[ -f $r/$_rule ]]; then
                     _found="$r/$_rule"
-- 
1.8.0.2






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-07 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 18:37 [gentoo-commits] gentoo-x86 commit in sys-kernel/dracut/files: 024-0003-dracut-functions.sh-support-for-altern.patch 024-0004-gentoo.conf-let-udevdir-be-handled-by-.patch 024-0002-dracut-functions.sh-fixed-inst_rules-s.patch 024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch 024-0002-dracut-functions.sh-support-for-altern.patch Amadeusz Zolnowski (aidecoe)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox