maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [Announce] Enhanced BusyBox package (https://talk.maemo.org/showthread.php?t=72801)

sowwhatyoureap 2013-03-24 13:43

Re: [Announce] Enhanced BusyBox package
 
Quote:

Originally Posted by reinob (Post 1330768)
4) export PAGER=less

You can put that in /etc/profile (or put a script on /etc/profile.d, etc.)
Otherwise man will use more. Basically man does:

zcat page.gz | gtbl | nroff -Tlatin1 -mandoc 2>&1 | $PAGER

where PAGER is "more" if undefined. However busybox's "more" behaves weird (or perhaps it's libvte's fault, I use the one from CSSU). less works much better, and is more comfortable to use.

Yep, or if you would like to disable wordwrap: export MANPAGER='less -S'

For me the page width is too wide (by approx. 5 characters) for the current font size, and have to disable wordwrap to not get just a couple of characters on a single line. Optimally man should format the pages according to terminal width, but haven't mananged to do this for this version of man. I've looked into this a bit and I assume you could "fix" it if you could get man to read a custom config file. For the regular man (for instance the one in Easy Debian), you can pass along a config file using "man -C <config file>" or put a config file "man.conf" in the default location /etc/.

Does anyone know if BusyBox Power's (limited) version of man attempts to read from a config file by default since you can't specify it?

iDont 2013-03-24 18:26

Re: [Announce] Enhanced BusyBox package
 
Quote:

Originally Posted by reinob (Post 1330706)
Perhaps the best would be to keep busybox as-is but, to avoid any confusion, without including *any* applets which require being setuid. Then the user will be free to install su and/or ping.

For ping we already have a package (ping and iputils-ping, I think) -- I just installed "ping" which installs /usr/bin/ping. Busybox's /bin/ping still there. Just need to chmod +s and it works fine).

For su we are missing a package (or I can't find it). Since most people probably don't need su (I don't *need* it, I just *want* it :) I guess you don't have to include it in busybox-power. But it would be nice if you could compile and package it and put it in extras-devel (otherwise I'll add it to my to-do list so that when I retire in about 30 years I will do it myself :).

Let me know what you think. And thanks a lot for your support!

I prefer to package up su separately as well; will look into that next week. I don't think it's wise though to leave out the setuid applets from busybox, as leaving out applets vs. Maemo's stock busybox (such as su) might break some (3rd party) applications.
The proper solution would be to make the new su package divert /bin/su.

I'm surprised su hasn't been packaged up before though, I hope I won't be in for some unpleasant surprise.

Quote:

Originally Posted by sowwhatyoureap (Post 1331351)
Does anyone know if BusyBox Power's (limited) version of man attempts to read from a config file by default since you can't specify it?

Yes, BusyBox' man checks for /etc/man.config, /etc/man.conf, and /etc/man_db.conf.

reinob 2013-03-25 08:26

Re: [Announce] Enhanced BusyBox package
 
Quote:

Originally Posted by iDont (Post 1331426)
I don't think it's wise though to leave out the setuid applets from busybox, as leaving out applets vs. Maemo's stock busybox (such as su) might break some (3rd party) applications.

Just for reference (not necessarily on-topic..) here's a list with all the setuid binaries (at least on *my* N900). Obviously, none is linked to busybox.

/bin
devlocktool (package: libdevlock-bin)

/sbin
(nothing)

/usr/sbin
(nothing)

/usr/bin
gpg (package: gnupg)
ssh-agent (setgid, package: openssh-client)
chfn (package: passwd)
chsh (package: passwd)
eapd (package: osso-wlan-security)
ping (package: ping)
sudo (package: sudo)
rclockd (package: clockd)
mission-control (package: osso-mission-control)
passwd (package: passwd)
gpasswd (package: passwd)
chage (setgid, package: passwd)
sudoedit (package: sudo)
hildon-sv-notification-daemon (package: hildon-home)
fusermount (package: fuse-utils)
expiry (setgid, package: passwd)

used:
Code:

find /usr/bin -perm +6000 -type f -exec dpkg -S {} \;
Add.: not in PATH, but also setuid/setgid:

/usr/lib/dbus-1.0/dbus-daemon-launch-helper (pkg: dbus)
/usr/lib/maemo-launcher/defender (pkg: maemo-launcher)
/usr/lib/pt_chown (pkg: libc6)
/usr/lib/telepathy/telepathy-stream-engine (pkg: telepathy-stream-engine)
/usr/lib/telepathy/telepathy-ring (pkg: telepathy-ring)
/usr/libexec/gnome-pty-helper (pkg: libvte4)

iDont 2013-04-15 19:53

Re: [Announce] Enhanced BusyBox package
 
2 Attachment(s)
Quote:

Originally Posted by iDont (Post 1331426)
I prefer to package up su separately as well; will look into that next week. I don't think it's wise though to leave out the setuid applets from busybox, as leaving out applets vs. Maemo's stock busybox (such as su) might break some (3rd party) applications.
The proper solution would be to make the new su package divert /bin/su.

I'm surprised su hasn't been packaged up before though, I hope I won't be in for some unpleasant surprise.

I've ported Debian's login package to Maemo (which includes su), but even though the resulting binary works and it's arguments match those of BusyBox', Maemo will get stuck at the four dots during boot with this su installed. If anyone wants to pick up work on this package, let me know and I'll send over the sources.
It is possible to install this su binary as e.g. /bin/su.real and alias it to su for interactive logins.

However, I took a different approach: compile just the su applet from upstream BusyBox' source and package it up as "busybox-su". This su binary can be installed setuid as /bin/su without breaking Maemo. At least I haven't noticed any breakage yet; running it since April 10th.
Busybox-su diverts /bin/su during installation, so the same warning applies as with busybox-power ("it touches an essential system binary...").

The accompanying source for busybox-su is also attached. Note that this tarball only includes the Debian packaging. It is to be used with upstream's BusyBox sources.

Feedback welcome :). I'll let the package stage here for a day or two before I push it to Maemo's extras-devel repository.

--
And regarding busybox-power & proper man setup: this is still on my TODO list, but I haven't gotten around to it yet.

dvb 2013-07-19 08:25

Re: [Announce] Enhanced BusyBox package
 
Greetings!

Busybox-power has support for swapon priority by specifying -p switch, but it doesn't respect fstab "pri=n" option. On the contrary, Debian swapon utility behaves as it should, setting the specified priority...

Should I file that in on bugs.busybox.net as a suggestion or it's a bug of our package? I didn't find any occurence of reading of that option from fstab in official sources of busybox v1.21, but I could just miss that.

iDont 2013-07-20 13:59

Re: [Announce] Enhanced BusyBox package
 
1 Attachment(s)
Quote:

Originally Posted by dvb (Post 1360054)
Greetings!

Busybox-power has support for swapon priority by specifying -p switch, but it doesn't respect fstab "pri=n" option. On the contrary, Debian swapon utility behaves as it should, setting the specified priority...

Should I file that in on bugs.busybox.net as a suggestion or it's a bug of our package? I didn't find any occurence of reading of that option from fstab in official sources of busybox v1.21, but I could just miss that.

Hi and thanks for reporting!

This was indeed not implemented in BusyBox' swapon yet. Whilst swapon did accept the -p flag, it didn't respect pri=n when enabling all swap spaces from /etc/fstab. This could be filed at BusyBox' bugzilla as an enhancement request.

But I'm glad you posted here first :). I've created a small patch to make swapon adhere pri=n from fstab (attached to this post). The patch will be sent upstream later.

Here's a deb of busybox-power with the patch already applied. Unfortunately, it was too big to be attached to this post, so had to upload it elsewhere: *click* (md5sum: f8a040cf717cff990fa727e6632994e0)

Could you please verify that it works correctly on your device? Don't worry, I tested it as well.

With the patched busybox-power installed:
Code:

Nokia-N900:~# cat /etc/fstab | grep sw
/dev/mmcblk1p3 none swap sw,pri=50 0 0
/dev/mmcblk1p4 none swap sw,pri=40 0 0
Nokia-N900:~# cat /proc/swaps
Filename                                Type                Size        Used        Priority
/dev/mmcblk1p3                          partition        786424        0        50
/dev/mmcblk1p4                          partition        785400        0        40


dvb 2013-07-20 18:14

Re: [Announce] Enhanced BusyBox package
 
Thanks for your quick reply...

Actually, I have busybox-power-althist installed. If using dpkg, it says about the conflict with busybox-power, if using apt-get it tries to install busybox-power-althist instead of busybox-power. I'd test it, if you assist me in changing packages or compile althist variant.

iDont 2013-07-20 18:48

Re: [Announce] Enhanced BusyBox package
 
Quote:

Originally Posted by dvb (Post 1360467)
Thanks for your quick reply...

Actually, I have busybox-power-althist installed. If using dpkg, it says about the conflict with busybox-power, if using apt-get it tries to install busybox-power-althist instead of busybox-power. I'd test it, if you assist me in changing packages or compile althist variant.

Changing packages should be as easy as an apt-get remove and apt-get install. You don't have to reboot in between installations and uninstallations of busybox-power, so if you're dependent upon busybox-power for system boot, you should be fine.

But for the sake of convenience, here's the patched althist variant (it already got automatically built by dpkg-buildpackage):
https://dl.dropboxusercontent.com/u/...rio1_armel.deb (md5sum: 62f1b5fd240fec9293b1e19c29de88c1).

dvb 2013-07-22 05:02

Re: [Announce] Enhanced BusyBox package
 
I was sure busybox can't be uninstalled without having much problems. Anyway, I installed new althist and it works greatly! Thanks a lot! Now waiting for it to be released under repos, as I have CSSU Thumb.

dvb 2013-07-22 17:40

Re: [Announce] Enhanced BusyBox package
 
Today I found another bug. In my MyDocs/.videos I have a directory named in russian letters (well, I guess any non-english letters will do the trick). Now, I start typing in x-term the command:

~ $ MyDocs/.videos/

Then I press TAB to take a look at the suggestions. As I have there only one directory, ash (or busybox?) substirutes it to my input. But if I only press TAB one more or twice times, all the command goes away!

Is this a bug of busybox-power, or ash? I didn't notice anything similar before installing busybox-power-althist, but maybe that can be Thumb tree bug: I installed that just before busybox-power.


All times are GMT. The time now is 02:04.

vBulletin® Version 3.8.8