All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Makefile: installing configs from dracut.conf.d and README files
@ 2010-06-30 19:39 Amadeusz Żołnowski
  2010-07-01  7:47 ` Harald Hoyer
  2010-07-01  9:01 ` Amadeusz Żołnowski
  0 siblings, 2 replies; 3+ messages in thread
From: Amadeusz Żołnowski @ 2010-06-30 19:39 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

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

Install configs from dracut.conf.d (in source tree) into
/usr/share/doc/dracut-$(VERSION).  It is so, because the package
maintainer or user should decide which configs should be included by
Dracut.  The configs in dracut.conf.d need to have suffix ".example".
This is so, because we'd like to use configs in Dracut local mode and
not including them all.  Just create symlink like
foo.conf.example -> foo.conf to load it when calling dracut with '-l'.

I've also provided READMEs install for, I hope, users convenience.

(I'm using configs in this way in i18n module.  If it's OK, I'll
prepare final patch with i18n module.)

---
 Makefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index a009b97..8e26b00 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 VERSION=006
 GITVERSION=$(shell [ -d .git ] && git rev-list  --abbrev-commit  -n 1 HEAD  |cut -b 1-8)
+COMPRESS=bzip2 -f
 
 prefix ?= /usr
 datadir ?= ${prefix}/share
@@ -7,6 +8,7 @@ pkglibdir ?= ${datadir}/dracut
 sysconfdir ?= ${prefix}/etc
 sbindir ?= ${prefix}/sbin
 mandir ?= ${prefix}/share/man
+docdir ?= ${prefix}/share/doc/dracut-$(VERSION)
 
 
 .PHONY: install clean archive rpm testimage test all check AUTHORS
@@ -28,6 +30,7 @@ install:
 	mkdir -p $(DESTDIR)$(sysconfdir)
 	mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
 	mkdir -p $(DESTDIR)$(mandir)/man{5,8}
+	mkdir -p $(DESTDIR)$(docdir)
 	install -m 0755 dracut $(DESTDIR)$(sbindir)/dracut
 	install -m 0755 dracut-gencmdline $(DESTDIR)$(sbindir)/dracut-gencmdline
 	install -m 0755 dracut-catimages $(DESTDIR)$(sbindir)/dracut-catimages
@@ -38,12 +41,14 @@ ifeq (1,${WITH_SWITCH_ROOT})
 endif
 	install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
 	mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
+	[ -d dracut.conf.d ] && for f in dracut.conf.d/*.conf.example; do [ -f $$f ] && install -m 0644 $$f $(DESTDIR)$(docdir) && $(COMPRESS) $(DESTDIR)$(docdir)/$$(basename $$f); done || true
 	install -m 0755 dracut-functions $(DESTDIR)$(pkglibdir)/dracut-functions
 	cp -arx modules.d $(DESTDIR)$(pkglibdir)
 	install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8
 	install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8
 	install -m 0644 dracut-gencmdline.8 $(DESTDIR)$(mandir)/man8
 	install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5
+	for f in README*; do [ -f $$f ] && install -m 0644 $$f $(DESTDIR)$(docdir) && $(COMPRESS) $(DESTDIR)$(docdir)/$$(basename $$f); done
 ifeq (1,${WITH_SWITCH_ROOT})
 	rm $(DESTDIR)$(pkglibdir)/modules.d/99base/switch_root
 endif
-- 
1.7.1


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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Makefile: installing configs from dracut.conf.d and README files
  2010-06-30 19:39 [PATCH] Makefile: installing configs from dracut.conf.d and README files Amadeusz Żołnowski
@ 2010-07-01  7:47 ` Harald Hoyer
  2010-07-01  9:01 ` Amadeusz Żołnowski
  1 sibling, 0 replies; 3+ messages in thread
From: Harald Hoyer @ 2010-07-01  7:47 UTC (permalink / raw)
  To: Amadeusz Żołnowski; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 06/30/2010 09:39 PM, Amadeusz Żołnowski wrote:
> Install configs from dracut.conf.d (in source tree) into
> /usr/share/doc/dracut-$(VERSION).  It is so, because the package
> maintainer or user should decide which configs should be included by
> Dracut.  The configs in dracut.conf.d need to have suffix ".example".
> This is so, because we'd like to use configs in Dracut local mode and
> not including them all.  Just create symlink like
> foo.conf.example ->  foo.conf to load it when calling dracut with '-l'.
>
> I've also provided READMEs install for, I hope, users convenience.
>
> (I'm using configs in this way in i18n module.  If it's OK, I'll
> prepare final patch with i18n module.)


Is it really necessary to compress them?

>
> ---
>   Makefile |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a009b97..8e26b00 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,5 +1,6 @@
>   VERSION=006
>   GITVERSION=$(shell [ -d .git ]&&  git rev-list  --abbrev-commit  -n 1 HEAD  |cut -b 1-8)
> +COMPRESS=bzip2 -f
>
>   prefix ?= /usr
>   datadir ?= ${prefix}/share
> @@ -7,6 +8,7 @@ pkglibdir ?= ${datadir}/dracut
>   sysconfdir ?= ${prefix}/etc
>   sbindir ?= ${prefix}/sbin
>   mandir ?= ${prefix}/share/man
> +docdir ?= ${prefix}/share/doc/dracut-$(VERSION)
>
>
>   .PHONY: install clean archive rpm testimage test all check AUTHORS
> @@ -28,6 +30,7 @@ install:
>   	mkdir -p $(DESTDIR)$(sysconfdir)
>   	mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
>   	mkdir -p $(DESTDIR)$(mandir)/man{5,8}
> +	mkdir -p $(DESTDIR)$(docdir)
>   	install -m 0755 dracut $(DESTDIR)$(sbindir)/dracut
>   	install -m 0755 dracut-gencmdline $(DESTDIR)$(sbindir)/dracut-gencmdline
>   	install -m 0755 dracut-catimages $(DESTDIR)$(sbindir)/dracut-catimages
> @@ -38,12 +41,14 @@ ifeq (1,${WITH_SWITCH_ROOT})
>   endif
>   	install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
>   	mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
> +	[ -d dracut.conf.d ]&&  for f in dracut.conf.d/*.conf.example; do [ -f $$f ]&&  install -m 0644 $$f $(DESTDIR)$(docdir)&&  $(COMPRESS) $(DESTDIR)$(docdir)/$$(basename $$f); done || true
>   	install -m 0755 dracut-functions $(DESTDIR)$(pkglibdir)/dracut-functions
>   	cp -arx modules.d $(DESTDIR)$(pkglibdir)
>   	install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8
>   	install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8
>   	install -m 0644 dracut-gencmdline.8 $(DESTDIR)$(mandir)/man8
>   	install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5
> +	for f in README*; do [ -f $$f ]&&  install -m 0644 $$f $(DESTDIR)$(docdir)&&  $(COMPRESS) $(DESTDIR)$(docdir)/$$(basename $$f); done
>   ifeq (1,${WITH_SWITCH_ROOT})
>   	rm $(DESTDIR)$(pkglibdir)/modules.d/99base/switch_root
>   endif

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Makefile: installing configs from dracut.conf.d and README files
  2010-06-30 19:39 [PATCH] Makefile: installing configs from dracut.conf.d and README files Amadeusz Żołnowski
  2010-07-01  7:47 ` Harald Hoyer
@ 2010-07-01  9:01 ` Amadeusz Żołnowski
  1 sibling, 0 replies; 3+ messages in thread
From: Amadeusz Żołnowski @ 2010-07-01  9:01 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

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

But yet we don't need it.  It's maintainer job to perform that.

-- 
PGP key: 1024D/C284750D

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-01  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 19:39 [PATCH] Makefile: installing configs from dracut.conf.d and README files Amadeusz Żołnowski
2010-07-01  7:47 ` Harald Hoyer
2010-07-01  9:01 ` Amadeusz Żołnowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.