Page 1 of 9

Compiler GUI and other packaging tools

Posted: Tue 28 Apr 2009, 07:20
by technosaurus
I made up these scripts for quickly testing new packages - they still need some optimization & cleanup but are working well so far

src2all will convert most src packages to pet and sfs compiled with puppy build environment (t2-486-linux-gnu) with prefix=/usr will post install files from a specified dir and take config options from a specified file

usage:
pcompile - lets you select a source package and add configure options in a gui to be compiled with src2all

src2all /path/to/package.tar.bz2 /pathto/confopts.cfg /pathto/extrasdir
(support for tar.gz, tbz and tar.gz not tested yet)... configures, compiles and packages a source package

2petnsfs - like new2dir but doesn't ask all kinds of unnecessary questions

usage:
2petnsfs make install (like new2dir with no questions - makes 4 pets and an sfs)

2dirs - automatically selects to divide packages into DEV, DOC, NLS and main (like new2dir with no questions - doesn't make pets)

usage:
2dirs make install

dump2pet - like dir2pet without any questions (for when you know there are no dependencies or menu entries to add)

usage:
dump2pet directory

Posted: Tue 28 Apr 2009, 08:14
by Lobster
Exciting stuff :)
I have posted the link on Barrys developer blog
Ttuuxxx and our other intrepid compilers should find this useful :)

I was also glad to see that the web desktop (probably in 4.2.1 as the default home page) now has your desktop as the first link for noob Puppys . . .
[url]file:///usr/share/doc/home.htm[/url]

Posted: Tue 28 Apr 2009, 08:57
by magerlab
what devx i need to have to use this pet?
i finally think i must try compile anything myself :D

Posted: Tue 28 Apr 2009, 13:47
by technosaurus
They are just bash scripts so they should work with almost any version of Puppy with the corresponding devx (4.1.2 uses devx_412.sfs ... 4.2 uses devx_420.sfs)... note that you will still need to have any of the dependencies installed to compile a package... but if you can't find it - this should make it easier to build the dependencies as well

Right now I only have it set up to configure with a default puppy config, whereas v0.02 should allow advanced configure options to be passed (via a file called <pkgname>.cfg)

Posted: Fri 01 May 2009, 05:04
by technosaurus
updated src2all for adding configure options
added gtkdialog GUI pcompile to select your source tarball and edit your configure options

TODO add a dialog for adding files from a directory to the packages (for adding desktop files, icons, addon packages, dependencies and other miscellaneous files)

Posted: Sat 02 May 2009, 03:08
by technosaurus
I added support for a post install directory (mostly for package maintainers) where you can keep menu entries, icons, dependencies and other miscellaneous files

Next on the todo list - support for a file that contains the ./configure options

Posted: Mon 04 May 2009, 06:29
by technosaurus
updated for upup configure options and support for no extras directory - it will run dir2pet vs dump2pet so that you can add menu entries and pet.specs

todo
1. combine the petspecs script with pcompile
1b add dir2pet dialog to the gui and only use dump2pet

this is so that there is no additional user interaction required (want to be able to hit OK and walk away)

2. ??enable python support - need help not sure how to do this since it doesn't use make?? ...

python setup.py install --root=${xNAMEONLY}-${VERONLY}-i486
(should work but this would not strip the garbage)

or use

new2dir python setup.py install
(not really sure if this would work - haven't tried)

Posted: Mon 04 May 2009, 06:48
by technosaurus
added several tweaks

configure options are now input via a file vs a string

will run dir2pet if an extras directory is not used
runs dump2pet if an extras directory is used (assumes you put the required files in the dir)

separate versions for puppy and upup

remove files in / for pet installs from sfs

Posted: Fri 22 May 2009, 21:57
by Stormson5150
Will the splitting off part work for pre-compiled binaries? IE: I would like to grab a slackware .tgz, open it up to its own directory, then have a script that will take that directory and split it into the DEV, DOC, NLS and main... Is this capable of that, or can it be made to do so somehow?

Posted: Sat 23 May 2009, 07:36
by technosaurus
not at the moment but that's not a bad idea - probably a different program though... the applicable bash script to modify would be new2dir or my modification of it 2petnsfs

Posted: Sat 23 May 2009, 18:53
by Stormson5150
Yes, I agree, it would most likely be an entirely new issue... It would however be a WONDERFUL thing for many people I think (not least of all, myself).. As I stated in my PM to you, as per my understanding you are "the man" when it comes to bash.. so if anyone CAN do it... well here I am asking... :lol:

Posted: Mon 25 May 2009, 21:09
by technosaurus
well - after using woof & looking through the scripts there - I find out that Barry has already done all the hard work for those package formats (debian, ubuntu, arch, slackware, T2... ) I really need to pull that code and adapt amigo's src2pkg script with the bigbass mods to really puppify it

Posted: Fri 19 Jun 2009, 21:45
by ecomoney
It would however be a WONDERFUL thing for many people I think (not least of all, myself).. As I stated in my PM to you, as per my understanding you are "the man" when it comes to bash..
I would agree with that, and most importantly he puts his skills into areas where they will be of most use to others who dont have them themselves...yet :D

There has been a resurgence in interest in the 2.6.18.1 kernel. Ttuuxxx has updated Puppy 2.14r with the latest glibc/libraries.

http://www.murga-linux.com/puppy/viewto ... 325#317325

How would these automated compilers work with that?

Im trying to sound like I know what Im talking about but I dont. :oops:

Posted: Sat 20 Jun 2009, 14:15
by technosaurus
it makes the 2.X-4.X traditional (non-woof) style .pet ... other than that I can't think of any reason why it shouldn't work. I plan to look at updating it for 5.X

Help with the PCompile

Posted: Wed 01 Jul 2009, 21:19
by Gedrean
Using Pcompile 05 on 4.2 Deep Thought.

Trying to compile Pidgin 2.5.8.

I give it the .tar.bz2 file in my Desktop dir in my Root homedir.
I give it the argument string as follows:

--prefix=/usr --sysconfdir=/etc --localstatedir=/var -pipe -fomit-frame-pointer --disable-gtkspell --disable-meanwhile --disable-avahi --disable-dbus --enable-gnutls=yes

I got the pipe and fomit frame pointer args from the Wiki, page at:
http://www.puppylinux.org/wiki/compiling
It also suggested -O2 but somehow the src2all gave a configure error on that argument, so maybe that configure doesn't support -O2...
I got the --prefix=/usr and other default dirs from your "default" line in Pconfig.

Problem is I get:

configure: error: Unrecognized --prefix/usr --- it's like it's losing the = sign for that one.

As a result, configure does not configure, I go through script, complete pet, get 490 byte pet file with nothing.

Question then: Does the "default string" get auto-prepended to what I put in? If not, what have I done wrong? BTW, must include the disables, as those packages are not part of the build I want and are excess bloat.

Posted: Thu 02 Jul 2009, 01:42
by technosaurus
the problem there is with the echo command in Puppy not "echoing" the = (that is why I added the common default options that contain an equal sign) I believe the version 0.07 had similar options included (for upup). It should be fine to edit the ./configure --prefix.... line in src2all with those with an = as default options

also you can put the options (no = sign though) in a text file and pass it to src2all from the command line as the second option $2 (the third option "$3" is a directory containing a tree of extra files and the first "$1" is of course your source tarball)

if your options are common config attributes (and I suspect that they might be) I may add them to the defaults.

side note:
I wanted to add tar.lzma support but it seems that Barry configured busybox to only do lzma compression up to level 6 (7,8 and 9 require an extra config option to be set that does add some size)... it may be time to add the extra small amount of weight though since many packages are now released as tar.lzma and also because puppy is one of if not THE best distros for dialup - it would really help them out (as well as those of us who up/download a lot with slower "high speed" connections)

completely off topic:
doesn't all data travel at the same "speed" strictly speaking - light speed - wouldn't it be better to say a high rate of data transfer ... maybe not - does anyone still have one of those old modems that used a speaker/mic attached to a handset - I guess at least part of that process relies on the speed of sound

Posted: Thu 02 Jul 2009, 06:28
by Gedrean
Regarding the old modem: There was an awesome Picture story on Toms Hardware with one of those, or maybe it was another site, or maybe it was a video I watched where he got it to work. I thought it was awesome, he did Lynx... in 800 baud... it was awful.

Anyhow, I suppose then I interpreted that correctly, I looked at src2all.

Found line:
./configure --build=i486-t2-linux-gnu --prefix=/usr $CONFOPTS

So I assume I stick everything else in and it should not vomit too much. That sounds SPLENDID.

Just make sure $confopts doesn't have = things, otherwise pass it as a config file, that JUST has the contents of what I want I guess.

Thanks! I think. I hope...

Posted: Thu 02 Jul 2009, 06:30
by Gedrean
New question:

From the original wiki page mentioned earlier, I saw...
-build=i486-pc-linux-gnu
And in the src2all, I saw...
--build=i486-t2-linux-gnu

So... what's the difference between pc and t2? New at this part and not sure what are best options so the pets I compile are easy for the system to figure out dependencies, and are properly going to run right for other users such that they are compatible with the standard "This is how it should be done in puppy!" thing...

Thanks!

Posted: Thu 23 Jul 2009, 23:47
by technosaurus
my odd numbered releases have 'pc' and the even ones have 't2'
odd numbers are for upup style woof builds (still in development)
even numbers are for 4.X (possibly earlier versions too)

Posted: Mon 24 Aug 2009, 00:55
by technosaurus
This time I added a bunch of personally selected size optimizations into the build scripts, also testing zip and xz formats and removed 2petnsfs since it was only useful for manual builds.

usage is the same but you should get smaller packages by 10-40%

once this is fully debugged I would recommend setting up a repository for config files similar to slack builds (this would open the role of package maintainer to a much wider group)