Re: About devices files into sources
Chris Gianelloni <[email protected]>
| Newsgroups | gmane.linux.pxes.devel |
|---|---|
| Message-ID | <1070555630.4566.21.camel@localhost> |
The _install_ portion in Gentoo is always done as root. However, Gentoo
has a feature called userpriv, which does all unpacking/compiling as an
unpriviledged user. This of course causes a failure in unpacking.
There is an option which is able to be turned on in Gentoo which
disables this feature on a per-package basis, but it appears to not be
functioning currently.
On Wed, 2003-12-03 at 17:06, Diego Torres Milano wrote:
> I think the best option is to force a root install because devices are
> not the only files that need to be installed as root there's one setuid
> file (suid-admin).
>
> Chris Gianelloni wrote:
>
> >I had to deal with exactly this same thing when creating the Gentoo
> >ebuild. I've attached my version of the makedevices.sh script. I think
> >now if you use devfs, you only need a limited number of the device
> >nodes. I, too, would like to reduce this number, or remove them from
> >the sources altogether, as they create problems during decompression of
> >the tarball when run as a normal user.
> >
> >On Wed, 2003-12-03 at 11:47, Ghe Rivero wrote:
> >
> >
> >>Hi to all!
> >>
> >> I'm Ghe Rivero, and at this moment i'm preparing the pxes* packages for
> >>Debian.
> >>
> >> I want to know if there is any special reason to have al the devices
> >>created an included in the source. I think this is not necesary
> >>and if anyone without root permisions descompress it, he will get an
> >>error.
> >>
> >> I have a script to created when the package is instaled. I have no time
> >>now to integrate it into original sources, but if you think that this
> >>aproach is correct, feel free to do it. Any advice is welcomed.
> >>
> >> Ghe Rivero
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>#!/bin/bash
> >>
> >>DEV1=/opt/pxes-0.6/stock/dist/dev
> >>DEV2=/opt/pxes-0.6/stock/initrd/dev
> >>
> >>if [ ! -d ${DEV1} ]; then
> >> mkdir -p ${DEV1}
> >>fi
> >>
> >>cd ${DEV1}
> >>mkdir input pts
> >>mknod agpgart c 10 175
> >>mknod audio0 c 14 4
> >>ln -s audio0 audio
> >>mknod console c 5 1
> >>mknod dsp c 14 3
> >>mknod dsp1 c 14 19
> >>for i in 0 1 2 3 4 5 6 7; do
> >> mknod fb${i} c 29 $(( ${i} * 32 ))
> >>done
> >>ln -s fb0 fb
> >>mknod fd0 b 2 0
> >>mknod fd1 b 2 1
> >>mknod fd0H1440 b 2 28
> >>mknod gart c 174 0
> >>mknod hda b 3 0
> >>for i in 1 2 3 4 5 6 7 8 9; do
> >> mknod hda${i} b 3 ${i}
> >>done
> >>mknod hdb b 3 64
> >>mknod hdc b 22 0
> >>ln -s hdc cdrom
> >>mknod hdd b 22 64
> >>mknod kbd c 11 0
> >>mknod lp0 c 6 0
> >>mknod lp1 c 6 1
> >>chmod 666 lp0 lp1
> >>chgrp lp lp0 lp1
> >>mknod mem c 1 1
> >>mknod mixer c 14 0
> >>mknod null c 1 3
> >>mknod openprm c 10 139
> >>mknod psaux c 10 1
> >>ln -s psaux mouse
> >>mknod ptmx c 5 2
> >>for i in 0 1 2 3 4 5 6 7 8 9; do
> >> mknod ptyp${i} c 2 ${i}
> >> chmod 666 ptyp${i}
> >> chgrp tty ptyp${i}
> >>done
> >>mknod ram b 1 1
> >>mknod tty c 5 0
> >>chmod 666 tty
> >>for i in 0 1 2 3 4 5 6 7 8 9; do
> >> mknod tty${i} c 4 ${i}
> >>done
> >>for i in 0 1 2 3; do
> >> mknod ttyS${i} c 4 $(( ${i} + 64 ))
> >> chgrp tty ttyS${i}
> >>done
> >>for i in 0 1 2 3 4 5 6 7 8 9; do
> >> mknod ttyp${i} c 3 ${i}
> >> chgrp tty ttyp${i}
> >> chmod 666 ttyp${i}
> >>done
> >>mknod zero c 1 5
> >>cd input
> >>mknod keyboard c 10 150
> >>chmod 600 keyboard
> >>mknod mice c 13 63
> >>
> >>if [ ! -d ${DEV2} ]; then
> >> mkdir -p ${DEV2}
> >>fi
> >>
> >>cd ${DEV2}
> >>mknod console c 5 1
> >>mknod hda b 3 0
> >>mknod hdb b 3 64
> >>mknod hdc b 22 0
> >>ln -s hdc cdrom
> >>mknod hdd b 22 64
> >>mknod lvm b 109 0
> >>mknod null c 1 3
> >>mknod ram b 1 1
> >>mknod sda2 b 8 2
> >>chgrp disk sda2
> >>chmod 660 sda2
> >>mknod systty c 4 0
> >>for i in 0 1 2 3 4; do
> >> mknod tty${i} c 4 ${i}
> >>done
> >>mknod zero c 1 5
> >>
> >>
--
Chris Gianelloni
Developer, Gentoo Linux
Games Team
Is your power animal a pengiun?
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/z2HukT4lNIS36YERAqDNAJ9M5NJ5h+u870Wc5YbrTWKl09A+IACfXeHx ga7v0E4CAggvzdyQoNjy4jk= =5RGJ -----END PGP SIGNATURE-----