dpupmaker.sh v1.9 -- compiles source tarballs into Dotpups

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#31 Post by jmarsden »

Here's the list of changes to dpupmaker.sh since 1.4. The big new (and so experimental!) feature is the generation of "source dotpups", making it very easy to publish the sources used alongside the compiled binaries.

Code: Select all

# Revision 1.6  2006/01/13 09:07:51  root
# Source code now installed in /usr/local/archive
# Fixed size calculation for source dotpups
# Fixed registration of source dotpups with pupget database
#
# Revision 1.5  2006/01/13 05:34:19  root
# Removed make distclean as it is no longer a common target.
# Check exit status of ./configure command and exit upon failure.
# Include dpupmaker.sh version in created dotpup.sh files.
# Add creation of "source dotpup" files (experimental new feature).
Jonathan

P.S. The change log above was generated using RCS, which was itself installed from a dotpup created using dpupmaker.sh -- this means dpupmaker.sh helped build and package RCS, which is now helping maintain dpupmaker.sh :-)

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#32 Post by MU »

Used it to create a dotpup:
http://www.murga.org/~puppy/viewtopic.php?p=32791#32791

I wanted to compile to /usr (because /usr/local/lib is not in Puppys /etc/ld.so.conf), so I ran
# ./dpupmaker.sh /mnt/hda11/_installfiles/bridge-utils/bridge-utils-1.0.6.tar.gz "" CONSAPPS --prefix=/usr

Did not work, so I changed 2 lines from "/usr/local" to "/usr"
I also added
xmessage -center installation finished!
in the end of the parts, where dotpup.sh is created.

Good work!
Thanks,Mark

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#33 Post by jmarsden »

MU wrote:Used it to create a dotpup: http://www.murga.org/~puppy/viewtopic.php?p=32791#32791
Cool, that is the first reported successful use of it by someone other than me :-)
I wanted to compile to /usr (because /usr/local/lib is not in Puppys /etc/ld.so.conf)
Understood. I've added it to mine, a few days ago. Maybe there should be some discussion about adding /usr/local/lib to the default ld.so.conf for Puppy 1.0.8 or 2.0, or both?? Or, just like the use of /etc/profile.local , it might be useful to add a line

Code: Select all

include /etc/ld.so.conf.local
to it, so that people can customize their library load paths without editing the "official" config? Fedora uses local config directories rather than a single .local file, for both /etc/profile and ldconfig, which makes it easy for packages to drop in additions to either the profile or their library path as they install, so it uses

Code: Select all

include ld.so.conf.d/*.conf
which also seems a good approach.
Did not work, so I changed 2 lines from "/usr/local" to "/usr"
Yes, I hard-coded Barry's request to all dotpup creators to have their dotpups install into /usr/local. Maybe that was a bit too inflexible?
I also added xmessage -center installation finished! in the end of the parts, where dotpup.sh is created.
If you like that, that's fine. I'm personally less comfortable with using xmessage within dotpup.sh -- it makes the install fail if the end user chooses to install from the command line in text mode, instead of from Rox under X. Even under X, it forces the end user to click on OK (to get rid of the message) for each package installed if run in a loop (I have a couple of little scripts, including a simple command line dotpup installer, so that I can compile and build and install a whole set of packages totally unattended, based on a text config file listing them and the options they need to give to dpupmaker.sh, for example). If I downloaded 50 dotpups and wanted to install them all, I'd perhaps be a little irritated at being forced to click OK that many times :-) The Unix / Linux convention for scripts (and for commands in general) is that "silence means it worked".

My thinking on this is that, if you like having that message appear at the end of every dotpup install done by Rox, then it would be more suitable to put the xmessage call into the script within Rox that handles .pup files, once, than to include it in every dotpup.sh. That approach also makes localization simpler (just one place to change the message to the user's preferred language, and you don't have to recreate every dotpup.sh file in every dotpup to support a new language!). The dotpups, and so the dotpup.sh files, that I create are 100% end-user-language-independent, by design. But I do understand that this is a personal choice, and that some of the dotpups out there do not currently follow that philosophy.

Jonathan

bugman

#34 Post by bugman »

I would like to say that I am a new user and a complete idiot (the total package!) but I like doing stuff in a terminal. I learn things, I feel cool, I get to whine and complain in this forum when nothing works!

That being said, I downloaded, unzipped, and ran dpupmaker on the Chimera tarball. I got:

./dpupmaker.sh: line 121: ./configure: No such file or directory
dpupmaker.sh: Error: Unable to configure application chimera-2.0a19

I checked line 121 and it said:

./configure ${4:-"--prefix=/usr/local"} ||

Should I change this to something else (there were earlier posts in this thread about /usr that I did not understand)? Is Chimera un-puppable (I think I saw someone in here--or was it the DSL forum--using it)? Should I put aside a week and read the f'ing Rute manual?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#35 Post by MU »

you should provide a link to the download, so we could look it up.

The standard way of compiling (used by this script, too) is
./configure
make
make install

But not every program uses this way.
Some only have
make

some only have
install.sh

some have
whatever.suffix

This is one of the reasons, why my Dotpup-wizard was based on binary files, you could "prepare" (compile) a program the way it wants it (manually), and then create a dotpup from the resulting binaries.

Mark

bugman

#36 Post by bugman »

I'd tried to compile it the normal way and that didn't work either. I have no idea why I though making a dotpup would work. But it's Sunday and I have had no book sales all day and I got bored...

Here's a link to the file:

http://www.chimera.org/download/chimera-2.0a19.tar.gz

It's yet another small browser, I like trying them out. Some day when I'm feeling really crazy I'll download that Mung Linux thingie just to see what Mungbrowser is like. Maybe when my meds wear off...

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#37 Post by MU »

Yes, this is a typical example.

/doc/INSTALL says:
xmkmf -a
make

Then you get a binary.
Make stops with an error for an additional HTML-page, but you can ignore that.
The binary is in /chimera
It is 2.3 MB.
You should finally strip it (remove Debugging-code):
cd chimera
strip chimera

The result is a 221 kb -file "chimera" that you can run.

Mark

bugman

#38 Post by bugman »

Thanks MU, I promise some day I will learn what I'm doing...

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#39 Post by MU »

It took me years to learn these "tricks", so don't apologize :)
That is quite special. For this reason the Dotpups were made in puppy, so that the "custom user" doesn't have to get in trouble with such small little inconveniencies.

I wanted to find out how things work, and I had to (for the job).
But sometimes it was really annoying.

bugman

#40 Post by bugman »

I did it and it worked. I'd done those things before, except for the "strip" command, but I think it must've been that error that made me think it had all gone wrong. Plus not realizing where the binary was. I tried typing "chimera" in xrun but I'm guessing (learning?) that I'd have to have a line in a path ($PATH? or something like that?) file somewhere first?

Now it's time to see if the browser is any good. I love Dillo but need cookies!

Reading the Rute page SHOULD have been my New Year's resolution, especially since I've forgotten what I DID resolve already...

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#41 Post by MU »

cd chimera
./chimera

Or use the absolute path:
/root/downloads/chimera/chimera

You can click it , too in rox.
But it does not display dotpups.de , seems to have problems with CSS.
Mark

bugman

#42 Post by bugman »

Oh, I'd figured out the click on the binary in Rox bit, it's just the typing it in xrun that flummoxed me at first. And I've got it working from the jwm menu as well.

It's interesting that you said to "cd chimera" even though the "chimera" folder is inside another ("chimera-2.0a19"); in DOS that wouldn't work, right? Does Linux find folders within folders without the full path being specified? That doesn't make any sense, there's several folders in different paths with the same name, "bin" being a good example.

Hey Murga, I'm going to start charging myself every time I ask a basic question in here and send you (or Barry) the money at the end of the year, okay? It won't be much (my income is way below the poverty line) but the two of you deserve every penny of it...

bugman

#43 Post by bugman »

MU, thanks much for your help. Sadly though, Chimera is not the answer I was looking for. Maybe the answer is to learn to program (I used to write 6502 assembly in both monitor and hex codes 20 years ago) and add cookies to Dillo myself. If I eat lots of healthy food I may live long enough to get it done...

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#44 Post by MU »

bugman wrote: It's interesting that you said to "cd chimera" even though the "chimera" folder is inside another ("chimera-2.0a19");.
No, I assumed you are already in /chimera-2.0a19 for the compilation.
But you can navigate quite fast in the shell with the auto-completition.

cd chim[tab] will show chimera
If there is more than one match, hit[tab] again, to see them all.
Concerning Dillo, please look here:
http://www.murga.org/~puppy/viewtopic.p ... highlight=

bugman

#45 Post by bugman »

That's pretty funny, I have the patched version, so I am getting cookies! Dumb. I had tried it on the used book sites I work through once before and was having problems; I'll have to try and figure out which site it was and why I was asked to log in repeatedly...

But then there's that other problem. Dillo doesn't print either...

bugman

#46 Post by bugman »

And now I'll never have time to read Rute; I'll spend the rest of my days converting a Mozilla bookmark file into a Dillo one... :shock:

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#47 Post by MU »

Bookmark-Converter:

search bookmark.html in /root/.mozilla

run this command:

Code: Select all

echo ":s0: test" > /root/.dillo/bm.txt && cat bookmarks.html |grep tp| sed "s/^.*HREF=./s0 /" | sed "s/\"[^>]*>/ /" | sed "s/<.*$//" >>/root/.dillo/bm.txt
In my case it works, in your case maybe you need to remove some corrupted lines with an editor from /root/.dillo/bm.txt, if Dillo does not display the new bookmarks.

Mark

bugman

#48 Post by bugman »

And here I'd started doing it by hand...

Am proud of myself for making my Moz start page (an html page of my most-visited sites) into the Dillo start page, and moving about:splash to the Dillo "home" page by editing /root/dillo/dillo85p a bit. This is so much more fun than w98...

I figured out the cookie thing. I have DSL, with an unpatched Dillo. Must've done the test there. So now my usage of DSL is down to one thing. I can't record through my sound card in DSL, I get a scratchy noise with a very faint bit of the actual sound from the mic. Since I do experimental music, that's actually a good (well, interesting) thing...

Everything else is done in Puppyland!

bugman

#49 Post by bugman »

Hey, it worked, thanks! I had to change the "cat bookmarks.html" to "cat /root/.mozilla blah blah blah...and then the magic happened! I understood a little of what I was typing into xterm and the rest was well...I don't understand why LDA and ROR and DEX and CPY still make so much sense to me and "s/\"[^>]*>/ /" | sed " doesn't...

User avatar
jmarsden
Posts: 265
Joined: Sat 31 Dec 2005, 22:18
Location: California, USA

#50 Post by jmarsden »

bugman wrote:I would like to say that I am a new user and a complete idiot (the total package!) but I like doing stuff in a terminal. I learn things, I feel cool, I get to whine and complain in this forum when nothing works!
Can I suggest reading Eric Raymond's essay How to Ask Questions the Smart Way ? That might help you ask in a way that makes it easier for others to provide good answers.

Do bear in mind that my script was intended for use by people who are used to compiling applications from tarballs... it tries fairly hard to be general, and works much of the time... but it can't compensate for a lack of experience when it doesn't work as you'd expect, I'm afraid!
That being said, I downloaded, unzipped, and ran dpupmaker on the Chimera tarball.
It would have been very helpful for you to state the URL of that tarball, and what exactly you typed at the command line.

Code: Select all

./dpupmaker.sh: line 121: ./configure: No such file or directory dpupmaker.sh: Error: Unable to configure application chimera-2.0a19
This suggests to me that the tarball you have downloaded may not be set up to be compiled using the standard GNU Autotools. Either that, or the directory it unpacks to is not what dpupmaker.sh was expecting, though in that case the error message should have been different.
I checked line 121 and it said:

./configure ${4:-"--prefix=/usr/local"} ||

Should I change this to something else ...
No. The error mesage you see says that there is no script ./configure, so editing what parameters are passed to it isn't going to help.
Is Chimera un-puppable
Someone who understands how to manually compile and install Chimera will be ably to create a .pup of it. Whether dpupmaker.sh can handle whatever idiosyncracies its source tarball may have, is a different question entirely.
Should I put aside a week and read the f'ing Rute manual?
No, just start reading it, and read a little more of it each week... reading it all in one go probably will just confuse you :-) But reading it, or any good Linux tutorial, is a good idea if your aim is to gain competence at a shell prompt.

I just found the tarball I think you are using, at http://www.rocklinux.net/people/ripclaw ... a19.tar.gz . It uses an older approach to creating its Makefiles, an Imakefile and xmkmf. If you unpack it and look at chimera-2.0a19/doc/INSTALL you will see the instructions on how to build it. Sadly, even they don't quite work on Puppy, they use a tool called gccmakedep which isn't provided (and which I have not heard of before). Or else my Puppy is different from MU's, since he seems to have compiled the thing OK!

Overall, I'm not sure it is worth adding extra complexity to dpupmaker.sh to try to handle the oddball cases of older non-GNU-Autotools-using tarballs. It's "enough", in my opinion, to just let the user of the script know that there was no ./configure script, so dpupmaker.sh can't continue... and it did exactly that for you. And, of course, others have written helpers for packagers who compile things and then want to make a package of the results. dpupmaker.sh is not the "only game in town".

Jonathan

PS. My first personal computer was 6502-based, hand assembled from a kit, with 1 and 1/4 K of RAM... a hex keypad to enter code and data, and a cassette interface I never did get to work right :-)

PPS Wrote this, and then saw the MU had already followed much of this path with you... oh well!

Post Reply