Reply
Thread Tools
Posts: 43 | Thanked: 45 times | Joined on Jun 2010 @ Sweden
#371
Originally Posted by reinob View Post
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?
 

The Following 2 Users Say Thank You to sowwhatyoureap For This Useful Post:
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#372
Originally Posted by reinob View Post
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.

Originally Posted by sowwhatyoureap View Post
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.
 

The Following 3 Users Say Thank You to iDont For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#373
Originally Posted by iDont View Post
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)

Last edited by reinob; 2013-03-25 at 08:35. Reason: added setuid/setgid binaries not in PATH
 

The Following 4 Users Say Thank You to reinob For This Useful Post:
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#374
Originally Posted by iDont View Post
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.
Attached Files
File Type: deb busybox-su_1.21.0su1_armel.deb (11.7 KB, 84 views)
File Type: gz packaging_source.tar.gz (20.0 KB, 65 views)

Last edited by iDont; 2013-04-15 at 20:01.
 

The Following 2 Users Say Thank You to iDont For This Useful Post:
Posts: 45 | Thanked: 36 times | Joined on Feb 2013 @ Krasnodar, Russia
#375
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.
 

The Following 4 Users Say Thank You to dvb For This Useful Post:
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#376
Originally Posted by dvb View Post
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
Attached Files
File Type: txt 0001-swapon-adhere-swap-priority-in-fstab.patch.txt (1.3 KB, 90 views)
 

The Following 5 Users Say Thank You to iDont For This Useful Post:
Posts: 45 | Thanked: 36 times | Joined on Feb 2013 @ Krasnodar, Russia
#377
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.
 
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#378
Originally Posted by dvb View Post
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).
 

The Following 5 Users Say Thank You to iDont For This Useful Post:
Posts: 45 | Thanked: 36 times | Joined on Feb 2013 @ Krasnodar, Russia
#379
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.
 

The Following 3 Users Say Thank You to dvb For This Useful Post:
Posts: 45 | Thanked: 36 times | Joined on Feb 2013 @ Krasnodar, Russia
#380
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.

Last edited by dvb; 2013-07-22 at 17:44.
 

The Following 3 Users Say Thank You to dvb For This Useful Post:
Reply


 
Forum Jump


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