Forum: Extension Development
started by: Juanito
Posted by Juanito on April 21 2008,07:00Having being caught out again by compiling with gnu-utils loaded (thanks for the feedback Jason), I'm wondering if it makes sense to have a gnu-utils.uci that can be unloaded.
A couple of questions:
1. Was gnu-utils originally intended to be only coreutils from here < http://directory.fsf.org/project/coreutils/ > ?
2. Given that there are probably more extensions containing xlibs, gtk2, etc than when gnu-utils was created, does it make sense to have only coreutils in gnu-utils?
3. Without having looked yet, I presume gnu-utils.dsl overwrites some apps in the base dsl - in the uci, I guess it would be OK to add a load script that moves these apps to /tmp and an unload script that moves them back?
The reasoning behind all this is that I need gnu-utils loaded at boot to load alsa at boot and (I guess) I also use some of the fully fledged (versus busybox) utilities without realising it, but I also need a way to unload gnu-utils to check that extensions do not depend on it.
Posted by roberts on April 21 2008,07:17The original concept of gnu-utils were to be the gnu versions of that which busybox replaced - period.
While the extension managment was not under my control, gnu-utils became a catch-all of stuff, including X.
I would think it would be worthy to clean up gnu-utils to be that which it was meant to be. This would reduce conflicts but likely break old(er) extensions.
If gnu-utils is cleaned up, then we would need some effort to test and correct and/or remove old extensions that depended on a catch-all gnu-utils.
Posted by mikshaw on April 21 2008,12:55coreutils is already a mountable extension...I just got the latest release yesterday so there might be an update to the extension if people are actually using it. Might also look into updating some of the other basics like findutils and procps.
As robert said gnu-utils is much more than coreutils. But it is *less* than a full busybox replacement, as some busybox applets remain unchanged after installation.
I also agree that gnu-utils could be improved, among other things by making a uci version. Another suggestion I would have is to separate a few of the apps into individual packages. I extracted wget from gnu-utils and use that almost daily (busybox wget is kinda lame in my opinion), but hardly ever use gnu-utils itself.
Posted by Juanito on April 21 2008,13:26
- now that sounds like a good idea. Now I know that coreutils.uci exists I'll try it out instead of gnu-utils, though I guess I'll still need find.
I guess I also need to check if the alsa boot code looks for gnu-utils or just the app(s) it requires from gnu-utils in which case coreutils.uci might do the job.
Posted by mikshaw on April 21 2008,19:23
But you could make up your own boot code and check for it from bootlocal.sh, using the alsa code from /etc/init.d/dsl-config (lines 449-457 in DSL 4.2)
Posted by Juanito on April 23 2008,14:39I played around with coreutils.uci - as said, it could use findutils, sed, wget, etc in order to be a gnu-utils (less xlibs) replacement.
To avoid path errors, it would be good if there were a loader script to move the busybox symlinks to /tmp and then move them back again on unloading (assuming the coreutils apps were linked to /opt/bin)...
Thanks for the pointers on alsa - I didn't try yet, but I guess using alsa-init once coreutils.uci is loaded would probably do the trick.
Posted by mikshaw on April 23 2008,17:10I just compiled the latest wget and procps yesterday, using compile-3.3.5.uci + term.h and the ncurses headers from gcc1-with-libs. They'll be submitted as uci extensions soon, but I'm about to do coreutils and findutils and hopefully upload them all together.
Posted by Juanito on April 24 2008,03:49
- is there are problem with the ncurses headers in compile-3.3.5?
Posted by mikshaw on April 24 2008,11:58To be honest, I simply assumed it wasn't there because this was the second application I'd tried to build that said it couldn't find ncurses.
Now that I think of it, with procps I eventually had to look into the Makefile and discovered that ncurses was set using an absolute path for some silly reason. At that point I should have thought to double-check if the headers were in compile-3.3.5.
I can't remember right now what the first curses app was...may have been htop, since I know that's one I've recently failed to build. I just know that twice in the last week or so I've had a compile failure due to a missing ncurses.h
I'll try to find another to test sometime soon.
Keep in mind that I'm no wiz when it comes to understanding how the whole compiling thing works. All I do is export CFLAGS, CPPFLAGS, and LDFLAGS and then try the build.
Posted by Juanito on April 24 2008,13:10I've had a few compile errors due to issues over ncurses - doing the following sometimes fixes it:
To see if there was a problem using compile-3.3.5 with procps, I tried with procps-3.2.7 and got the following error:
- fixed by adding the following to pwdx.c:
- but I didn't get any errors involving ncurses (without the export LIBS= mentioned above)?
Note (I think) the ncurses headers in gcc1-with-libs are for a later version of ncurses than that in dsl (libncurses.so.5.3), but that probably doesn't change anything...
Posted by mikshaw on April 24 2008,13:59I got it to find curses by adding -I/opt/compile-3.3.5/include/ncurses to the compiler flags. Unfortunately there seems to be other troubles with htop-0.7, causing another thing to break when I fixed one thing, and the first thing would break again when I fix the second thing. I had no trouble building htop-0.6.6, so I don't think it's the build environment.
I fixed the pwdx error (also procps-3.2.7) by changing the PATH_MAX variable to 4096, as it was listed in param.h
I never thought about simply including the header, which would have been the sensible solution =o)
Also term.h was needed for top, and I didn't find it in compile-3.3.5
Did you make a new version of the compile package? I wonder if that might account for our differences. I'm using one dated 2008/02/10 (seems to be the first release).
Posted by Juanito on April 24 2008,14:10
Edit: Just checked - term.h is in /opt/compile-3.3.5/include/ncurses??
Posted by ^thehatsrule^ on April 24 2008,17:38fyi, iirc PATH_MAX errors are due to the "include bug"
Posted by Juanito on April 24 2008,17:43Agreed, but not fixed by
Posted by mikshaw on April 24 2008,21:32
Posted by mikshaw on April 24 2008,23:08You had me scratching my head for a minute just now. While messing around with the wget extension I thought I'd check its info file (not the mydsl info, but the texinfo) to see how easily it would be to convert it to a format that could be easily read in DSL (the wget info provides a lot more information than the man page). To my surprise it displayed natively, or so it seemed. After a minute I thought to check it and it turned out that info is included with compile-3.3.5
I'm wondering if this is necessary. Info is definitely a good app to have, but does it have anything to do with compiling? It might be better suited as a separate extension.
Sorry I've been putting a lot of focus on compile here, when the topic should be gnu-utils.
Posted by Juanito on April 25 2008,04:03
Posted by curaga on April 25 2008,13:19They actually often won't even check for texinfo, they just assume it exists.
My way around it, when I don't need the info files, is creating this as "makeinfo":
This satisfies the rude packages, as well as the well mannered ones that actually check for texinfo.
Some info pages are still installed, but they can be removed easily.
Posted by mikshaw on April 25 2008,13:29On a semi-off-topic note, I found that info files are easily read in a text editor. It seems that the formatting done to them is little more than splitting the file into pages.
While I dislike the navigation (or apparent lack of it) in Info, they often provide much more information than man pages do, so when info pages are created I tend to keep them on hand.
Posted by Juanito on May 04 2008,15:21I've been experimenting with compiling without gnu-utils loaded - several apps require the full version of sed to compile and some apps require something (the error message does not say what) in gnu-utils to compile.
So, the morale of the story seems to be that coreutils - plus findutils and a couple of other things would be a useful tool.
Posted by roberts on May 05 2008,18:39Another BIG issue with gnu-utils...
Looks like a snapshot of /usr/X11R6/lib/X11 is included in gnu-utils.
Why? I don't have a clue. That has nothing to do with busybox. Likely a cude way to add some additional fonts?
Anyway, It has caused me much grief and I am cutting it from gnu-utils.
If it beaks some extensions, then post here and let me know.
BTW, a question for you font experts? Is there an easy way to see the fonts that a binary is going to be needing?
Perhaps a better method is to build an extension for adding fonts?
Posted by chaostic on May 08 2008,23:48
Will do. (Actually, I was a bit surprised about the new size (1.2 vs 9) that I am used to seeing, when I downloaded it).
Anyway, quick question, is it necessary to run mkwritable when loading gnu-utils.dsl to a toram session?
Posted by mikshaw on May 09 2008,02:08
If you wish to avoid mkwriteable, you must use extensions that do not write outside of /opt: uci, unc, or tar.gz
Posted by chaostic on May 17 2008,01:25
I ask because the update to gnu-utils script does it (calls mkwriteable, then mydsl-install), while reading through the mydsl-load it does not. (I save a copy of gnu-utils.dsl on my flash instead of redownloading it each time)
Edit: Actually it does. mydsl-load -> mydsl-install which calls mkwriteable.
So then a better question, why call mkwriteable twice? (Once in gnu-utils-restore, then again in mydsl-install)
Posted by roberts on May 17 2008,02:30Any .dsl calls that script whether from boot or on-demand mydsl loading of a .dsl. However, it is only actually performed only once. Look at said script, if previously run, it immediately exits.