Re: schroot
On Mon, Oct 7, 2013 at 2:20 PM, <berenger.morel@neutralite.org> wrote:
> Le 07.10.2013 19:50, shawn wilson a écrit :
>
>> Not a bad idea. However:
>> find / -type f -print0 | xargs -0 -i{} -P 10 grep -H 'SETUP_DATA_DIR='
>> {} 2> /dev/null
>>
>> found nothing.
Just to be complete (so that maybe this shows up on google when the
next person has issues finding undocumented stuff in schroot - it's
not in the man page as my search implies btw):
/usr/share # find -iname "*.bz2" | while read f; do t=$(bzcat $f |
grep SETUP_DATA_DIR); test -n "$t" && echo $f && echo $t; done
./doc/schroot-1.6.5-r1/contrib/setup.d/05customdir.bz2
. "$SETUP_DATA_DIR/common-data" . "$SETUP_DATA_DIR/common-functions" .
"$SETUP_DATA_DIR/common-config"
./doc/schroot-1.6.5-r1/ChangeLog.bz2
Add SCHROOT_DATA_DIR, SCHROOT_SETUP_DATA_DIR and replace DATA_DIR and
SETUP_DATA_DIR. Add SCHROOT_DATA_DIR, SCHROOT_SETUP_DATA_DIR and
replace DATA_DIR and SETUP_DATA_DIR.
./man/man7/schroot-faq.7.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
./man/man5/schroot.conf.5.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
./man/man5/schroot-setup.5.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
./man/man5/schroot-script-config.5.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
./man/man1/dchroot.1.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
./man/man1/dchroot-dsa.1.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
./man/man1/schroot.1.bz2
.ds SCHROOT_SETUP_DATA_DIR /usr/share/schroot/setup
>>
>> On Mon, Oct 7, 2013 at 1:05 PM, <berenger.morel@neutralite.org> wrote:
>>>
>>> Le 07.10.2013 18:59, Shawn Wilson a écrit :
>>>
>>>> berenger.morel@neutralite.org wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Le 07.10.2013 18:38, shawn wilson a écrit :
>>>>>>
>>>>>>
>>>>>> This is at the top of every config file, but I can't find it
>>>>>> documented:
>>>>>>
>>>>>> . "$SETUP_DATA_DIR/common-data"
>>>>>> . "$SETUP_DATA_DIR/common-functions"
>>>>>> . "$SETUP_DATA_DIR/common-config"
>>>>>>
>>>>>> Where is this being sourced from (ie, where is the 'common-data'
>>>>>> file?) and (more important) where is this documented?
>>>>>
>>>>>
>>>>>
>>>>> Doing "echo $SETUP_DATA_DIR" should help you, I think. And for
>>>>> documentation, reading about shell will also help you.
>>>>>
>>>>
>>>> I'm guessing this means it's exported by some schroot internal
>>>> mechanism inside the schroot? I'm not sure what I don't know about
>>>> bash that would help here? This doesn't seem to be an export bash
>>>> knows about?
>>>
>>>
>>>
>>> I have no idea about what are the files you are speaking about, but the $
>>> prefix usually indicates a variable in shell, and shell scripts are
>>> widely
>>> used in the system. To find what file could export that variable, try a
>>> grep
>>> -r SETUP_DATA_DIR, it might help you find which file uses that variable.
>
>
> Do not send me private mail for something like that, it could interest
> someone else on the list.
That was an accident (I was guessing telling me "reading about shell"
would be helpful that you might not be the person to talk to but I
like to follow up).
> Honestly, I can not help you more that that, I do not use chroot very often,
> and do not know what is schroot. If the variable is not defined, then maybe
> it have a default value.
> Maybe if you find other files containing simply the SETUP_DATA_DIR text
> (without '=' or '$') you could find more hints.
>
> PS: do the giant line you posted above make the same thing as "grep -r
> 'SETUP_DATA_DIR=' 2>/dev/null" ? If yes, it seems quite complex for what it
> does...
>
Quite, but xargs gives one major advantage - that -P allows you to
parallelize grep and sending the process SIGUSR1/SIGUSR2 increases or
decreases that parallelization. (This also meant that my laptop shat
bricks due to a slower hdd and I had to revert to a server).
Reply to: