BTS

Issue800

Title grml-debootstrap local configuration
Priority feature Status resolved
Superseder Nosy List mika, suntong
Assigned To mika Topics

Created on 2010-01-15.16:29:29 by suntong, last changed 2011-06-13.03:11:22 by mru.

Messages
msg3850 (view) Author: mru Date: 2011-06-13.02:58:23
I am not using grml-debootstrap regularly but is it really required to provide a second script to the 
chroot?

The environment variables will be set from the user specified config file, so there should be no need to 
provide a dedicated chroot config script.

I am closing this issue for now as i think mikas patch is enough.  Please feel free to reopen it.
msg3220 (view) Author: suntong Date: 2010-06-11.02:28:09
> Fixed by: . . . Source specified configuration file at according stage.

No, on 2nd thought, the above can't fix the requested feature -- The host need 2
config files, one local and one global, and so does the chroot client. 

So far we only pass on *one* configuration file to chroot, whichever version it
is, there will be problem.
msg3215 (view) Author: suntong Date: 2010-06-10.02:39:01
Fixed by:

2010-05-18
	Michael Prokop
	Source specified configuration file at according stage.
http://git.grml.org/?p=grml-debootstrap.git;a=commit;h=4fae346b2e816b3d7f97ea9e42455f104db5adb6
msg3083 (view) Author: mika Date: 2010-02-28.01:39:49
Ok, thanks for explanation. I'll take care of it, though have to think about 
the file names. I'm thinking about using .local as the suffix for whatever 
config file is being specified/used.
msg3072 (view) Author: suntong Date: 2010-02-28.01:22:51
On Sat, Feb 27, 2010 at 6:08 PM, Michael Prokop <bts@bts.grml.org> wrote:

>
> Is this bugreport still valid? Nowadays we've:
>
>  -c, --config <file>      Use specified configuration file, defaults to
>                             /etc/debootstrap/config
>  -d, --confdir <path>     Place of config files for debootstrap, defaults
>                             to /etc/debootstrap
>
> so I tend to close this bugreport. Please provide feedback, thanks!
>

Yes, it's still valid. It is submitted well after the -c/-d was implemented.


The point is that, -c is used for sourcing a *whole* file, while the local
configuration file is sourced *after* sourcing the global one, so that user
customization to configuration can be preserved during grml-debootstrap
upgrade.

The patch is for this purpose.

thanks
msg3021 (view) Author: mika Date: 2010-02-27.23:08:29
Is this bugreport still valid? Nowadays we've:

  -c, --config <file>      Use specified configuration file, defaults to
                             /etc/debootstrap/config
  -d, --confdir <path>     Place of config files for debootstrap, defaults
                             to /etc/debootstrap

so I tend to close this bugreport. Please provide feedback, thanks!

regards,
-mika-
msg2863 (view) Author: suntong Date: 2010-01-27.15:30:28
On Wed, Jan 20, 2010 at 6:45 PM, Ulrich Dangel <mru@grml.org> wrote:

,-----
| . . . we could put the global config file to /usr/share/... and use the
| config file in /etc/grml as user config.
`-----

Please do -- please use /usr/share/grml-debootstrap/config has hard coded global
configuration file and /etc/debootstrap/config as the user configurable local
configuration file as off-package file.

Just use my patch with new comment:

# source global configuration file first

and place it before sourcing the (configurable) local configuration file. Then
change the releasing correspondingly.

By "off-package file" I meant that user customization to /etc/debootstrap/config
can be preserved during grml-debootstrap upgrade -- each time I did
grml-debootstrap, I had to come back after some time just to answer "Y" to the
question that my /etc/debootstrap/config need to be replaced. Every
grml-debootstrap user who have some even tiny changes to /etc/debootstrap/config
will get their grml-debootstrap process stopped in the middle waiting for that
answer.

Thanks
msg2836 (view) Author: suntong1 Date: 2010-01-15.19:42:27
so that user customization to /etc/debootstrap/config can be preserved
during grml-debootstrap upgrade
---
 grml-debootstrap |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/grml-debootstrap b/grml-debootstrap
index 5ca15e8..2b88413 100755
--- a/grml-debootstrap
+++ b/grml-debootstrap
@@ -101,6 +101,14 @@ if [ -r /etc/debootstrap/config ] ; then
       . /etc/debootstrap/config
    fi
 fi
+# source local configuration file
+if [ -r /usr/share/grml-debootstrap/config ] ; then
+    einfo "Reading local config file /usr/share/grml-debootstrap/config."
+    if ! . "/usr/share/grml-debootstrap/config" ; then
+        eerror "Error reading config file /usr/share/grml-debootstrap/config" 
+	eend 1 ; exit 1
+    fi
+fi
 # }}}
 
 # cmdline handling {{{
-- 
1.6.5
msg2834 (view) Author: suntong Date: 2010-01-15.16:29:28
Hi, 

Last time I checked, grml-debootstrap didn't have the local configuration
capability, which sources a local file after sourcing /etc/debootstrap/config. 

This is very useful. Has it been implemented yet? 

thanks
History
Date User Action Args
2011-06-13 03:11:22mrusetstatus: done-cbb -> resolved
nosy: mika, suntong
2011-06-13 02:58:24mrusetstatus: chatting -> done-cbb
nosy: mika, suntong
messages: + msg3850
2010-06-11 02:28:10suntongsetstatus: resolved -> chatting
nosy: mika, suntong
messages: + msg3220
2010-06-11 02:21:31suntongsetfiles: - unnamed
nosy: mika, suntong
2010-06-10 03:25:57suntongsetstatus: fixed-in-git -> resolved
nosy: mika, suntong
2010-06-10 02:39:03suntongsetstatus: need-eg -> fixed-in-git
nosy: mika, suntong
messages: + msg3215
2010-02-28 01:39:49mikasetassignedto: mika
messages: + msg3083
nosy: + mika
2010-02-28 01:22:51suntongsetfiles: + unnamed
messages: + msg3072
2010-02-27 23:08:30mikasetstatus: chatting -> need-eg
messages: + msg3021
2010-01-27 15:30:30suntongsetmessages: + msg2863
title: grml-debootstrap local configuration fixed -> grml-debootstrap local configuration
2010-01-15 19:42:33suntong1setstatus: unread -> chatting
messages: + msg2836
title: grml-debootstrap local configuration -> grml-debootstrap local configuration fixed
2010-01-15 16:29:29suntongcreate