mkchroot scripts

2005-02-03 Thread Sergei I. Kononov
Hi, all.
Maybe I choose wrong list, but I didn't find more suitable list for such
mail.

I wrote small scripts which should help to build chroot enviroment. I
know already exists such things like 'makejail'. But I wrote my own
version of 'how to chroot specified packages under debian'.
This collections is debian specific. And I'll be very glad if you'll
like it.

You can get sources from cvs:
cvs -d :pserver:[EMAIL PROTECTED]:/var/lib/cvs login
Password: (empty pass, just push enter)
cvs -d :pserver:[EMAIL PROTECTED]:/var/lib/cvs co mkchroot

Now version is 0.1.0, its poor documented, not finished, but it works. 
I just want to know should I or not continue to develop mkchroot and
needed such software for debian community.

Thanks.

PS: please cc comments to me. I don't subscribed for list.

-- 
Sergei "df" Kononov
GnuPG ID: 0x7D992F45
Linux - because software problems should not cost money. (by Shlomi Fish)


pgprwnAivysP2.pgp
Description: PGP signature


Re: mkchroot scripts

2005-02-03 Thread Sergei I. Kononov
On Thu, Feb 03 at 20:23:20 (+0100), Christoph Berg wrote:
 
> What's the difference to makejail and debootstrap?

1. Created chroot enviroment use less disk space, and does not
include not needed files/dirs (like: passwd, chown, chmod or files in
fileutils package etc)
Creates 'chroot', not another debian installation.

2. Does not need to start/stop service (like makejail), sometimes
it's not possible. For example I try to create another chrooted env
on machine where executes 200 apache and I could not stop apache. Also
makejail creates chroot on heavy-loaded machines very strange, IMHO. 

3. Update of chrooted packages easy and can be executed in any time
(makejail need to stop/start service)

PS: probably you need to try it. maybe I just don't understand... 

-- 
Sergei "df" Kononov
GnuPG ID: 0x7D992F45
Linux - because software problems should not cost money. (by Shlomi Fish)


pgpqOXSAKCSWx.pgp
Description: PGP signature


Re: mkchroot scripts

2005-02-07 Thread Sergei I. Kononov
On Fri, Feb 04 at 09:28:19 (+0100), Wouter Verhelst wrote:
> Actually, that /is/ a needed file. Some programs look up the name of a
> user before doing stuff (or look up the UID of a username), and without
> that file they do very strange things

If you need /etc/passwd, for example, the better way is to 
$ grep username /etc/passwd > /path/to/croot/etc/passwd

but not to copy the whole /etc/passwd. If you needed shared library 
for elf32 binary file you can use ldd_handle.pl script. For shell script 
it's quite difficult to determine what external (not shell builtin ) command 
needed.
Probably you have to call ldd_handle.pl for each external binary file. I
think the one solution for such cases does not exists. But I think
the better it's just chrooted only needed files from packages like fileutils, 
but not
the whole package (why you need command like ls, dir? it's potential
security hole, IMHO)

PS: I wrote alternative, not replace for makejail and debootstrap.


-- 
Sergei "df" Kononov
GnuPG ID: 0x7D992F45
Linux - because software problems should not cost money. (by Shlomi Fish)


pgp4l3pyiKnDR.pgp
Description: PGP signature