27.01.2015 02:07, Erich Titl пишет: > Am 26.01.2015 um 18:58 schrieb kp kirchdoerfer: >> Hi Erich; >> >> >> Am Montag, 26. Januar 2015, 18:17:29 schrieb Erich Titl: >>> Am 26.01.2015 um 17:43 schrieb kp kirchdoerfer: >>>> Hi Erich; >>>> > ... > >>> I will probably remove the automatic startup of wpasupplicant from >>> /etc/network/interfaces, It is much better to start it before networking >>> picks up and it removes some lint from webconf and /etc/network/.... >>> >>> SALT# cd rc2.d >>> SALT# ls >>> S00syslog-ng S18ulogd S21ntp S45dnscache >>> S99rmnologin >>> S04ifupdown S19shorewall S30ip6tables S85mini_httpds >>> S05networking S20hostapd S30iptables S85webconf >>> S10watchdog S20inetd S31procps.sh S89cron >>> S15wpasupplicant S20sshd S40iscdhcp-server S90local >>> >>> As you can see, wpasupplicant is at S15 where networking is at S05. For >>> a automatic WiFi Client it needs to be _before_ S05networking. >>> >>>>>> A problem has :been introduced - when building the lwp package it >>>>>> rewuires >>>>>> root permission - caused by >>>>>> >>>>>> cd $* ; tar --owner=0 --group=0 --mode=755 -czf $(CURDIR)/$@ * >>>>> Right, we should run tar under sudo. >>>> I'm afraid this will not help, it requires also a password.... >>> No, you need to allow this in the sudoers file or the /etc/sudoers.d >>> directory. Very neat to run unattended scripts with. >>> >>>>>> in buildtool.mk. >>>>>> We should avoid root permissions when building packages. >>>>> Yes, that's what sudo is for. I personally prefer to build the .lwp >>>>> files in the makefile. Look at the simple construct you cited above. In >>>>> my opinion this is safer and more comprehensive than having a separate >>>>> script, as one doesn't have to repeatedly define files and paths in >>>>> different locations. But as always, opinions may differ. >>>>> >>>>> If you want to continue doing this in buildlwp.sh, be my guest. I did >>>>> not really want to touch that, in my eyes it is redundant. I would >>>>> rather prefer to move all .lwp builds into lwp's buildtool.mk. They are >>>>> not packages like the other ones anyway, unfortunately. >>>> I have no preferences - it could be done with the current sh scripts >>>> (based on a your work years ago) , it could be done in buildtool.cfg - >>>> where it really should reside to keep the logic of packaging, but we >>>> should avoid requiring a password. >>> In my setup I have >>> >>> mega@leafbuilder:~$ cat /etc/sudoers.d/mega >>> mega ALL=(ALL:ALL) NOPASSWD: ALL >>> >>> This allows me to run everything under sudo (not very secure) but it >>> needs to be run _under_ sudo control. >>> >>> See >>> >>> http://jeromejaglale.com/doc/unix/ubuntu_sudo_without_password >> Thx for the tip. >> >> I don't think changing /etc/sudoers* is what is a self-contained build env >> should require. > Mhhh.. just needs some documentation, for a real self contained system > we would have to do a lot :-( > >> Looking into tools/buildall.sh fakeroot does the job; so a quick woraround >> would be to use fakeroot instead sudo? > Sudo AFAIK uses the fakeroot library. I looked into fakeroot and it is > possible that one could achieve the same and then indeed it might be easier. > OTOH fakeroot just fakes root permission, e.g. makes you believe you are > root, where sudo gives you limited access to real root. It might be > sufficient for the packaging of lwp files though, will run some tests. > > See > > http://unix.stackexchange.com/questions/9714/what-is-the-need-for-fakeroot-command-in-linux SUDO doesn't use fakeroot AFAIK. It just raises privileges.
fakeroot grants root-like privileges for file system (actions that can't be done to privileges restrictions are stored into fakeroot db file). So you can create file with root owner, create device file and so on, and this files will look for you like real ones - you can add them to archive (ad archive will contain right file attributes) and so on. But you can't hurt anything in your system. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel