Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 22:40
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Puppizard 008
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [74 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 05:58    Post subject:  Puppizard 008
Subject description: An easy way to install packages from source, automatically
 

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 Cool

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 Laughing

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 Very Happy
- 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:
#!/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 Smile
dash-0.5.7.pet
Description  Recommended dependency (makes it way faster and lighter); install this or run this in the terminal: "ln -s sh /bin/dash"
pet

 Download 
Filename  dash-0.5.7.pet 
Filesize  35.91 KB 
Downloaded  329 Time(s) 
puppizard-008.pet
Description 
pet

 Download 
Filename  puppizard-008.pet 
Filesize  4.6 KB 
Downloaded  377 Time(s) 
puppizard-doc.pdf.gz
Description  PDF documentation
gz

 Download 
Filename  puppizard-doc.pdf.gz 
Filesize  22.31 KB 
Downloaded  328 Time(s) 

_________________
My homepage

Last edited by Iguleder on Thu 04 Aug 2011, 16:12; edited 17 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Fri 24 Jun 2011, 06:05    Post subject:  

Very, very nice! Really!! Very Happy Great idea! and execution...

EDIT:

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

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

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?

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 06:24    Post subject:  

Try to downgrade Yad to something older, 0.9.x or something. Edit /var/pur/yad.sh Smile

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

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Fri 24 Jun 2011, 06:27    Post subject:  

Iguleder wrote:
Try to downgrade Yad to something older, 0.9.x or something. Edit /var/pur/yad.sh Smile

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

OK I'll try the Yad thing... And the 'devx' might not be obvious to total puppy newbies, and refugees from lesser distros Wink
..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 Very Happy

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 06:49    Post subject:  

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 Smile

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Fri 24 Jun 2011, 07:04    Post subject:  

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?

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 07:10    Post subject:  

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.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Fri 24 Jun 2011, 07:42    Post subject: great little app  

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
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 24 Jun 2011, 07:47    Post subject:  

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
Quote:
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
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 07:56    Post subject:  

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.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
gcmartin


Joined: 14 Oct 2005
Posts: 4447
Location: Earth

PostPosted: Fri 24 Jun 2011, 08:36    Post subject: Great approach to adding subsystems to PUPs  

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.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 08:40    Post subject:  

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.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Fri 24 Jun 2011, 09:49    Post subject:  

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...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Sat 25 Jun 2011, 09:50; edited 1 time in total
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1926
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 24 Jun 2011, 09:50    Post subject:  

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.
_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Fri 24 Jun 2011, 10:05    Post subject:  

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 Smile

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

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 5 [74 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1021s ][ Queries: 13 (0.0059s) ][ GZIP on ]