Puppizard 008

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

Puppizard 008

#1 Post 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 :)
Attachments
dash-0.5.7.pet
Recommended dependency (makes it way faster and lighter); install this or run this in the terminal: "ln -s sh /bin/dash"
(35.91 KiB) Downloaded 537 times
puppizard-008.pet
(4.6 KiB) Downloaded 582 times
puppizard-doc.pdf.gz
PDF documentation
(22.31 KiB) Downloaded 545 times
Last edited by Iguleder on Thu 04 Aug 2011, 20:12, edited 17 times in total.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#2 Post 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?
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#3 Post 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 :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#4 Post 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
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#5 Post 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 :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#6 Post 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?
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#7 Post 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.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

great little app

#8 Post 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

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#9 Post 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?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#10 Post 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.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

gcmartin

Great approach to adding subsystems to PUPs

#11 Post 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.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#12 Post 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.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#13 Post 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...
Last edited by sc0ttman on Sat 25 Jun 2011, 13:50, edited 1 time in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#14 Post 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.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#15 Post 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
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
russoodle
Posts: 707
Joined: Fri 12 Sep 2008, 17:36
Location: Down-Under in South Oz

#16 Post 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/
[i][color=Green][size=92]The mud-elephant, wading thru the sea, leaves no tracks..[/size][/color][/i]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#17 Post 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!

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#18 Post 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').
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#19 Post 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.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#20 Post 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.

Post Reply