Woof build scripts : How is busybox handled ?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Woof build scripts : How is busybox handled ?

Karl Godt
Administrator
I encountered first problems using woof :

1) Many are ash scripts and I have configured my busybox to use applets before doing a PATH lookup .
    This may break some pipes with grep for example .

2) I cannot find a busybox binary in the woof tarball .
    Which script does pull in busybox ?


For now I am stuck at

[puppypc]# ./0pre
./0pre: line 13: ./DISTRO_COMPAT_REPOS-t2-squeeze: No such file or directory

AND OR

[puppypc]# ./0setup
./0setup: .: line 18: can't open './DISTRO_COMPAT_REPOS-debian'

line 18 seems to be related to a sub script  ..

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Woof build scripts : How is busybox handled ?

01micko
Administrator
>DISTRO_COMPAT_REPOS-t2-squeeze

That's not sane for a start.

t2 is Puppy (more or less legacy) based. Obviously 'squeeze' debian based.

The mixing and matching is somewhat confusing and to my way of thinking all "common" repos should be just statically linked stuff that is more or less 'guaranteed' to work.

As for busybox, it *should* be in the 'common' repo.

I think BK wanted to get away from T2, mainly because it's a huge job compiling all that stuff, plus it's getting a bit behind. When Puppy 4 was king T2 was king too.

I like Slackware based because PV (aka Pat Volkerding) leaves out garbage like Pam and systemd. If Debian goes the way of systemd it will leave Puppy with only Slackware and Ubuntu as useful alternatives. sure, Slackware has disadvantages too, like a very limited repo, but that isn't all bad. Leaves freedom to build your own stuff and not stuff up the whole eco-system too much.

HTH (somewhat)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Woof build scripts : How is busybox handled ?

Karl Godt
Administrator
In reply to this post by Karl Godt
Here is a short overview from http://bkhome.org/blog/ :

Posted on 11 Nov 2008  http://bkhome.org/blog/?viewDetailed=00485
That leads me to Busybox. The initrd has Busybox version 1.4.1, however the latest is 1.12.1, 
so I downloaded and compiled that statically in a uClibc root f.s. I enabled a lot more applets, including 'sort'.

Posted on  3 Jul 2009  http://bkhome.org/blog/?viewDetailed=00861
You might wonder why not go all the way and use 'modprobe', 'modinfo' and 'insmod' from Busybox. 
Well, on previous tests, the Busybox modprobe did not work properly -- does not 
handle aliases as the passed parameter -- but then, the last I tested was Busybox 1.8.2.

Posted on 25 Jul 2009  http://bkhome.org/blog/?viewDetailed=00914
The previous build (417) has busybox 1.14.2, as it has the 'depmod' applet, 
which saved the day for me, see here:
http://puppylinux.com/blog/?viewDetailed=00861
But then there was a comment posted either to this blog or the forum that there is an important 
recent bugfix for depmod in busbox git. Well, I have searched, can't find who posted that, but thanks.
I have upgraded busybox to the latest daily snapshot, dated July 25.

Posted on 20 Nov 2009  http://bkhome.org/blog/?viewDetailed=01215
The initramfs ("initial ramdisk") has busybox version 1.4.2, statically compiled with uClibc. 
That was last done on 12 Nov. 2008. I have now recompiled it, kept the same version, 
and added more applets, plus enhanced the features of some. Fascinating, 
the busybox executable has grown from 253KB to 272KB, only 19KB, 
even though I have turned on help-text for each applet (the help text is internally compressed).

Posted on 30 Jan 2010  http://bkhome.org/blog/?viewDetailed=01368
I compiled version 1.16.0 and enabled almost everything. The 'busybox' executable is now 628KB,
compared with 427KB in recent puppies.

Posted on 19 Jun 2010  http://bkhome.org/blog/?viewDetailed=01667
I have compiled Busybox 1.16.2 in Quirky, upgrading from 1.16.0. 
Other Woof-built puppies will also default to using this PET.

Posted on  4 Apr 2011 http://bkhome.org/blog/?viewDetailed=02204
I have compiled the latest Busybox with more applets, also with unicode support enabled.
http://distro.ibiblio.org/quirky/pet_packages-quirky/busybox-1.18.4-unicode.pet

Posted on  5 Apr 2011 http://bkhome.org/blog/?viewDetailed=02205
The Busybox 'free' applet is used in many scripts. The initramfs has Busybox 1.14.x, 
recent Woof-built puppies have 1.16.x.
I hope that Busybox 1.18.4 has no more surprises!

Posted on 13 Apr 2011 http://bkhome.org/blog/?viewDetailed=02214
I found the reason: executing "busybox depmod" only generates one file:
/lib/modules/2.6.32.28/modules.dep.bb
This breaks the full modutils utilities, also breaks some scripts.
The file modules.dep.bb is explained here:
http://git.busybox.net/busybox/tree/modutils/Config.in?h=1_15_stable&=switch
However, the configuration that I used for Busybox 1.18.4:

CONFIG_MODINFO=y
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
CONFIG_INSMOD=y
CONFIG_RMMOD=y
CONFIG_LSMOD=y
CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
CONFIG_MODPROBE=y
CONFIG_FEATURE_MODPROBE_BLACKLIST=y
CONFIG_DEPMOD=y
#
# Options common to multiple modutils
#
# CONFIG_FEATURE_2_4_MODULES is not set
# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"

I did NOT choose the small model for modutils!

Sigh, oh well, I have rolled back to Busybox 1.16.2, which does generate modules.dep, modules.alias and modules.symbols.

See my earlier blog post about upgrading to Busybox 1.18.4:
http://bkhome.org/blog/?viewDetailed=02204

Posted on  1 May 2011 http://bkhome.org/blog/?viewDetailed=02241
I
n Wary I now have the suid bit set in /bin/busybox, but apparently that does not mean 
all the applets can run as root when invoked by a non-root user. In the case of 'reboot', 
'poweroff' and 'halt' they won't run.

There is a solution though, a "poor man's sudo", that allows permissions to be set on a per-applet basis. 
Busybox has to be configured with CONFIG_FEATURE_SUID_CONFIG. I have done this and uploaded the PET. 
Compiled in Wary, but should work in other puppies (368K):
http://distro.ibiblio.org/quirky/pet_packages-wary5/busybox-1.17.2-1-w5.pet

My script /usr/sbin/root2user now creates /etc/busybox.conf, that allows 'reboot' and 'poweroff' to be run by fido.

The contents of /etc/busybox.conf is explained here:
http://www.softforge.de/bb/suid.html
...can't say that I really understand that 'ssx' field yet!

Posted on 10 Jul 2011 http://bkhome.org/blog/?viewDetailed=02341
Up until now, the initramfs has used Busybox 1.4.2, an old version. I intend to compile 
a recent kernel and investigate reported problems with USB, and some code I contemplate 
putting into the 'init' script in the initramfs needs the 'xargs' application -- which the old Busybox doesn't have 
(or rather, is not configured to have xargs), so I decided to upgrade Busybox.
The initramfs is using full versions of 'cp', 'find', 'grep', 'losetup', 'lsmod', 'modinfo', and 'modprobe', 
as the old Busybox applets are inadequate. With the upgrade, I have checked out whether the BB applets 
are now suitable. Unfortunately, mostly not.
For BB 1.18.5, I have had to keep these full programs:

The new Busybox static executable is now in Woof, along with the '.config' file (also now have the 'bbconfig' applet, 
that prints out the configure settings).

Posted on 23 Sep 2011 http://bkhome.org/blog/?viewDetailed=02492
I have compiled the latest Busybox and put it into the 'common' repo (387KB):
http://distro.ibiblio.org/quirky/pet_packages-common/busybox-1.19.2-w5c.pet

However, this is not a PET that you can install into Puppy as-is. It is for Woof-built puppies 
and will need the Woof that I will upload soon.

I have resolved a long-standing problem with Busybox, the conflict between the naming of Busybox applets 
and "full" utilities. Now, the Busybox PET can have all the applet symlinks set to their proper names, 
and script 3builddistro discovers any conflict with full utility names, 
and automatically renames a conflicting Busybox applet with post-fix "-BB-NOTUSED".

Posted on  3 Oct 2011 http://bkhome.org/blog/?viewDetailed=02515
So, I have rolled Busybox back to 1.17.2 in the 'common' repo. I know that 1.19.2 has more features, 
and some bug fixes, however 1.17.2 works well. I just want to quickly restore to a known working 
and well-tested Busybox. I recompiled 1.17.2 and enabled the 'sha1sum', 'readahead' and 'rfkill' applets.

Posted on 11 Nov 2011  http://bkhome.org/blog/?viewDetailed=02586
I have upgraded to the latest Busybox, PET uploaded to the 'common' repo (394KB):
http://distro.ibiblio.org/quirky/pet_packages-common/busybox-1.19.3-w5c.pet

One of those suggestions is the replacement of the 'guess_fstype' utility with the Busybox 'blkid' applet.

I intend to work on implementing technosaurus's suggestions in Woof.

ARM architecture
I have used Buildroot to compile Busybox statically with uClibc, both for the arm1176jzf-s and i486 CPUs, 
for inclusion in the initrd in Woof.
I am gradually getting Woof setup to build an ARM Puppy (RazPup?). Compiles are otimised for the arm1176jzf-s CPU.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Woof build scripts : How is busybox handled ?

01micko
Administrator
In reply to this post by Karl Godt
Just for the record..

Busybox is at Packages-puppy-common-official, it's now at 1.21.0, but latest stable is 1.21.1 (I built it today).

Take a good look in 3builddistro to see how all the *-BB-NOTUSED links are created.. works ok too as I had to use real blkid in the latest slacko test version (today) to solve musher0's bug.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Woof build scripts : How is busybox handled ?

Karl Godt
Administrator
Of course . But thought it might be useful to some because of the many Puppies that exist .
And for myself .

BTW

git remote add bbgit git://git.busybox.net/busybox
git pull bbgit

works even with git-1.6 version . Without that https rubbish .

Still have to discover the subfolders at http://git.busybox.net/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Woof build scripts : How is busybox handled ?

Karl Godt
Administrator
In reply to this post by 01micko
Checked Slacko-5.6.3 .sfs but busybox therein still is v1.21.0 .

https://github.com/idunham/busybox/tree/enh : That branch gives me for ash type function
# type which
which is which
 

whereas the normal busybox echoes
# type which
which is /bin/which
and second time
# type which
which is a tracked alias for /bin/which



Loading...