linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-raid@vger.kernel.org, Samuli Suominen <ssuominen@gentoo.org>
Subject: Re: [PATCH] query udev dir via pkg-config
Date: Tue, 14 Aug 2012 09:47:59 +1000	[thread overview]
Message-ID: <20120814094759.51b8e2c2@notabene.brown> (raw)
In-Reply-To: <1344879862-23299-1-git-send-email-vapier@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

On Mon, 13 Aug 2012 13:44:22 -0400 Mike Frysinger <vapier@gentoo.org> wrote:

> From: Samuli Suominen <ssuominen@gentoo.org>
> 
> Since udev is moving its internal dir around, query it via pkg-config
> rather than hardcoding the old path.  This should work with new/old
> versions.
> 
> Signed-off-by: Samuli Suominen <ssuominen@gentoo.org>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  Makefile |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 72f609e..a3e4027 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -57,6 +57,8 @@ else
>   DEFAULT_METADATA=1.2
>  endif
>  
> +PKG_CONFIG ?= pkg-config
> +
>  SYSCONFDIR = /etc
>  CONFFILE = $(SYSCONFDIR)/mdadm.conf
>  CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf
> @@ -96,6 +98,11 @@ MAN4DIR = $(MANDIR)/man4
>  MAN5DIR = $(MANDIR)/man5
>  MAN8DIR = $(MANDIR)/man8
>  
> +UDEVDIR := $(shell $(PKG_CONFIG) --variable=udevdir udev 2>/dev/null)
> +ifndef UDEVDIR
> + UDEVDIR = /lib/udev
> +endif
> +
>  OBJS =  mdadm.o config.o policy.o mdstat.o  ReadMe.o util.o maps.o lib.o \
>  	Manage.o Assemble.o Build.o \
>  	Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o \
> @@ -255,7 +262,7 @@ install-man: mdadm.8 md.4 mdadm.conf.5 mdmon.8
>  	$(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
>  
>  install-udev: udev-md-raid.rules
> -	$(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules
> +	$(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)$(UDEVDIR)/rules.d/64-md-raid.rules
>  
>  uninstall:
>  	rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm


Applied - thanks....

So where is /lib/udev being moved to?

NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-08-13 23:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 17:44 [PATCH] query udev dir via pkg-config Mike Frysinger
2012-08-13 23:47 ` NeilBrown [this message]
2012-08-14  3:00   ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120814094759.51b8e2c2@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=ssuominen@gentoo.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).