Page 1 of 4

Puppizard 008

Posted: Fri 24 Jun 2011, 09:58
by Iguleder
Here's something I've been working on for some time: an automated, elegant and simple way to install packages from source, similar to FreeBSD's ports, Gentoo's Portage and Arch's AUR.

This tool has many advantages:
1) Compatibility - one build script and you have a package for any Puppy (well, theoretically) one-click away.
2) In most cases, you can change the package version field in the build script and there you have the latest version. Very convenient.
3) No need to host sources or binary packages, just tiny text files that define how to build each package.
4) It's way cooler than traditional PET packages 8)

The name is Puppizard, because it's a system that allows you to build packages automatically ... like magic. It is named after the wonderful Sorcery from Salix OS.

This thing allows you to install packages from source (i.e download their sources, build them locally, strip them and install) easily. It was written and tested on 5.2.5.

It has minimal dependencies: xz and Dash. AdvanceCOMP and OptiPNG are recommended.

Packages built using Puppizard come without static libraries, which waste space and harm compatibility. Also, they lack debugging symbols.

Also, I must note that in some cases Puppizard only re-packages binary packages made by someone else. For example, in the cases of Opera and Flash (since they're non-free) and Libreoffice (because it would take ages and lots of space to build). Believe me, there's a good reason for this.

It is also possible to use Puppizard to package browsers (or other packages) with built-in update functionality (Firefox, Chrome, ...), so puplets that have them built-in don't become "deprecated" quickly.

Before installing a new version, make sure you completely remove the previous one.

And by the way, USE AT YOUR OWN RISK.

Changelog

001:
- first version.

002:
- A message box when Yad is missing
- Solved the hanging bug vovchik reported for Puppizard
- Each build script now creates a stripped package through strippkg and dir2pkg; the latter calls petget and offers the user to install it
- Minor improvements and bug fixes for the build scripts
- A note appears when AdvanceCOMP or OptiPNG are not present.

003:
- A message appears if you don't have the devx installed.
- Small bug fixes for build scripts
- The build scripts are now organized in directories
- More bug fixes :lol:

004:
- Rewritten from scratch
- installpkg and removepkg
- Many new features
- Rewritten build scripts
- Major bug fixes
- Profiles go to /usr/share/pkg and both build scripts and installed package info go to /var/pkg

005:
- Modularity!
- A global configuration file: /etc/puppizardrc
- Installed package data now goes to /root/.puppizard
- Many bug fixes
- "--download-only", "--build-only" and "--install" flags for buildpkg; these allow offline builds without internet connectivity or automated build & install operations
- Many, many new build scripts, including one for the Luxi fonts and a beta-quality LibreOffice one :D
- Improvements to the E17 build scripts
- Desktop integration with ROX-Filer, etc'

006:
- Various bug fixes

007:
- ncurses frontend
- Removed the Yad frontend
- ttuuxxx' icon

008:
- A build script repository and puppizard-update: downloading of the latest build scripts, automatically

Why It's Cool

Here's how to build the whole E17, a-la-Puppizard:

Code: Select all

#!/bin/sh

CORE_PKGS="eina eet evas ecore embryo edje efreet e_dbus eeze e"
EXTRA_PKGS="alarm calendar cpu diskio efm_nav efm_pathbar engage execwatch mem net tclock uptime winselector wlan"
for package in $CORE_PKGS $EXTRA_PKGS
do
    buildpkg --install $package
    [ $? -ne 0 ] && break
done
Don't say it's complicated :)

Posted: Fri 24 Jun 2011, 10:05
by sc0ttman
Very, very nice! Really!! :D Great idea! and execution...

EDIT:

Compiled geany..
All works fine on puppy 4, even the .pet installation 8)

Can't compile yad on pup4, says it needs GTK 2.16 :(
Will have to find a working Yad .pet to test the GUI :(

I'm using the Glibc 2.10.1, gdk, x11, GTK 2.12.1, etc.. all from Way 512.. Does this mean Yad won't compile in Wary?

..and maybe add a message somewhere to say the devx is required?

Posted: Fri 24 Jun 2011, 10:24
by Iguleder
Try to downgrade Yad to something older, 0.9.x or something. Edit /var/pur/yad.sh :)

And I think it's quite obvious that the devx is required :)

Posted: Fri 24 Jun 2011, 10:27
by sc0ttman
Iguleder wrote:Try to downgrade Yad to something older, 0.9.x or something. Edit /var/pur/yad.sh :)

And I think it's quite obvious that the devx is required :)
OK I'll try the Yad thing... And the 'devx' might not be obvious to total puppy newbies, and refugees from lesser distros ;)
..but I understand your point, obviously.

And is there a way others on the forum can help you support more packages?
OK I see, look in /var/pur, make a new script based on the ones in there..

EDIT. Yad 0.9.1 compiles fine in puppy 4 :D

Posted: Fri 24 Jun 2011, 10:49
by Iguleder
sc0ttman wrote:And is there a way others on the forum can help you support more packages?
Just ... join the fun!

Write build scripts (I suggest you to use leafpad.sh as an example), test them (make sure you run them in an empty directory and get a working package to make sure they're good) and reply :)

Posted: Fri 24 Jun 2011, 11:04
by sc0ttman
Last question, I promise.. Not a key issue, as I will do this myself anyway..

But could this be easily modded to use 'dir2pet' if found?

Cos I think that would be an easy way to make the .pets work across more puppies

The pets install fine in puppy 4, but will not uninstall, cos of petspecs, user-installed-packages, alienpackage.txt, etc...

Using the 'dir2pet' script, if found, might fix this?

Posted: Fri 24 Jun 2011, 11:10
by Iguleder
Of course, but the stripping is done in /usr/bin/pur-install.

You could easily mod it to call dir2pet after the stripping instead of installing the packages ... and you could also call another script for automatically splitting it to EXE, DEV, DOC, NLS. I wrote many scripts that do that and posted them on the forums.

great little app

Posted: Fri 24 Jun 2011, 11:42
by vovchik
Dear lguleder,

Brilliant script. Thanks. I just compiled galculator and everything went smoothly. There is one little problem with the gui, however. If you select nothing and want to quit, it goes into a loop and keeps reloading and displaying itself. But that is pretty trivial and easy to fix.

With kind regards,
vovchik

Posted: Fri 24 Jun 2011, 11:47
by nooby
Wow a very good thing you made there. Now it is way above my level but I trust I know enough to get that it is a progress.

You write this
Packages installed through this system can be uninstalled through PPM, just like PETs you install. It was built and thoroughly tested on 5.2.5.
Could you maybe edit that to be something like

Packages installed through this system can be uninstalled through PPM, just like PETs you install. It was built and thoroughly tested on Lucid Puppy 5.2.5. lupu525

And for this to work it needs dev files and so on.

How much RAM memory and how big will the whole thing be to work? I ahve only 1GB RAM would that be too small?

Posted: Fri 24 Jun 2011, 11:56
by Iguleder
Working on 002 already: I changed its behavior - packages are not installed by default; I moved the stripping code to /usr/bin/strippkg and that's what runs instead. I also fixed the bug vovchik reported.

I want to add a call to dir2pet (or mksquashfs, whatever) in pur-install, which is nothing but a plain install script now.

By the way - is it a good idea to turn the built packages into .tgz (or .txz) archives? These can be installed with PPM, because it believes they're either Slackware or Arch packages.

Regarding system requirements - the faster your machine is, the faster it will run. I use it on my Eee and it's very fast.

Great approach to adding subsystems to PUPs

Posted: Fri 24 Jun 2011, 12:36
by gcmartin
Wow, this is far-reaching. For newbies and experienced PUP users, a new generation of tool additions running PUPs.

One thing already pointed out, by you, is two requirements: DEVX and YAD (for GUI).

Question on requirements:
Is there any way that the installation of PUR could check for these at installation time? Maybe an alert to the user or something.

Anyway, I foresee a great deal of use for your creation.

Thanks....thanks....thanks.

Posted: Fri 24 Jun 2011, 12:40
by Iguleder
Yep. I could add some notice (using gtkdialog) that tells the user to install Yad. Not a serious problem.

EDIT: uploaded a much improved version.

Posted: Fri 24 Jun 2011, 13:49
by sc0ttman
Tested 02, PPM has an error unpacking the PET file

I think it has something to do with the lack of named dir in the .tgz file.
Or maybe the presence of the source .tgz is causing mis-naming?

This was on pup4, this may not occur on Woof builds..

I attached a screenshot of the error, pkg contents and work dir

EDIT:
I solved it, image removed, to save space...

Posted: Fri 24 Jun 2011, 13:50
by Iguleder
I think it's because of the old Puppy version - your PPM doesn't treat .tgz archives as Slackware or Arch packages. After all, it's a pre-Woof Puppy.

Posted: Fri 24 Jun 2011, 14:05
by sc0ttman
Iguleder wrote:I think it's because of the old Puppy version - your PPM doesn't treat .tgz archives as Slackware or Arch packages. After all, it's a pre-Woof Puppy.
OK no prob, I'll have a hack at it :)

Edit: Got it working one mine.. Thanks for this, it's great!
Used it to update a few apps already :D

Posted: Fri 24 Jun 2011, 15:52
by russoodle
Thank you, Iguleder....i've uploaded them to my site, so there'll be an additional d/l location for them.

There are a number of random .pets in there, so they're in a named folder to make them easier to find. The url is:
http://www.puppylinuxstuff.meownplanet. ... /Iguleder/

Posted: Fri 24 Jun 2011, 18:26
by jpeps
Nice idea. I just used it to update Homebank. The GUI got stuck, but running "pur-build homebank" from the command line immediately produced a prompt requesting installation of the targz. It doesn't search for a previously installed desktop file, so created another menu entry without an icon. Since the files were updated, deleting the file left the original loading the updated version in Lucid 5.2.5. Thanks for the useful app!

Posted: Fri 24 Jun 2011, 18:30
by Iguleder
It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.

Regarding the menu entry - yes, the menu looks horrible unless you use some normal icon theme (e.g the GNOME one) with a full-featured DE or WM (Xfce, E17, etc').

Posted: Fri 24 Jun 2011, 18:37
by jpeps
Iguleder wrote:It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.
Yeah, it did. I went out to do an errand, and came back a few hours later and the original "building homebank" (or something to that effect) was still there. I closed it out, and tried running the CLI, and the installation GUI appeared.

Posted: Sat 25 Jun 2011, 09:50
by Sylvander
Could someone list the steps they've taken during the successful use of this?

So that perhaps even a non-expert like myself may be able to use it?

Some key terms may need to be explained.
e.g.
What is a "source" [I've seen "source code" mentioned in my travels]
Stripping and trimming a package->of what?
What are "Static Libraries"?

p.s. Added a link to this thread in my PC-Guide->"Puppy Linux" thread. :D
So I ALWAYS know how/where to find it.
And so will others.