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 Sun 23 Nov 2014, 17:22
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Add support for other compressions than gzip for dotPets
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [30 Posts]   Goto page: 1, 2 Next
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sun 22 Apr 2012, 05:53    Post subject:  Add support for other compressions than gzip for dotPets  

This is study to support other compressions for .pet .

The current compression used by the petget install utility is gzip/gz .

There had been discussion on the forum to add other/newer compressions .

*

This is a first study of the /usr/local/petget/petget script for supporting these :

Code:
# ADDS/CHANGES by Karl Godt :
# 1.) usage message, called with $1 "-h" using bash shell
#      buittin getopts
# 2.) Support for .pet with other compressions as gzip :
#      bzip2,lzop,lzma,xz ;needs altered pet2tgz/tgz2pet,dir2pet
# 3.) though added in later Puppies, have manually adjusted support for .rpm
# 4.) Added support for checking pets in /tmp with extracting them there .
#      Code should be nearly the same as in installpkg.sh
#      On this installation still a TODO


Code:
   $0 [-h] FILE_NAME_TO_INSTALL

   Puppy Linux .pet installer script .

   Needs at least the parameter FILE_NAME_TO_INSTALL.ext

   Currently supported file formats/.ext :

   original : .pet
   new      : .b2pet,.lopet,.lapet,.xzpet
   other    : .tgz,.tar.gz,.deb,.rpm

   [unsupported : .pup]

   Depends on :
   pet2tgz, installpkg.sh, tar, gzip, dpkg-pkg, rpm
   [,bzip2,lzop,lzma,xz]
petget.tar.bz2
Description 
bz2

 Download 
Filename  petget.tar.bz2 
Filesize  6.06 KB 
Downloaded  402 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 23 Apr 2012, 05:37    Post subject:  

Today the whole bunch of files ,

working until now :
pet2tgz and similar functions .

Mime handling is handled as a work around by a /root/my-roxapps/mime.sh .
files-for-petget.tar.gz
Description 
gz

 Download 
Filename  files-for-petget.tar.gz 
Filesize  24.63 KB 
Downloaded  386 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sat 23 Jun 2012, 08:51    Post subject:  

first alpha snapshot based on Puppy-430 : likely not bugfree

was fixing several of mine and
one misleading error message in
downloadpkgs.sh
where
ONEFILE was "pet_packages-4/dotpuphandler-0.0.4-2.pet"
changed to
BN_ONEFILE="${ONEFILE##*/}"
if [ -f /root/"$BN_ONEFILE" ];then

also added a function file with three functions from /sbin/pup_event_frontend_d
if /tmp/pup_event_sizefreem file does not exist ie the daemon was stopped by eventmanager .
PETGET_PPM_430_KRG-0.1-alpha.tar.bz2
Description 
bz2

 Download 
Filename  PETGET_PPM_430_KRG-0.1-alpha.tar.bz2 
Filesize  59.1 KB 
Downloaded  352 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Fri 22 Nov 2013, 00:42    Post subject:  

Today found that technosaurus already was working on such case :

Petget enhanced and many version updates

from year 2009 Smile
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Fri 22 Nov 2013, 02:23    Post subject:  

Really, the pet package format is so bad that any effort to extend it is only gonna make it worse. The one thing this distro has always needed is a decent, workable package format -then the tools to use and create those packages reliably, repeatably and flexibly.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Fri 22 Nov 2013, 03:20    Post subject:  

amigo wrote:
Really, the pet package format is so bad that any effort to extend it is only gonna make it worse. The one thing this distro has always needed is a decent, workable package format -then the tools to use and create those packages reliably, repeatably and flexibly.

Ok, but now it's in the hands of the community the ethos of 'open source' can be applied liberally Wink

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Fri 22 Nov 2013, 03:58    Post subject:  

01micko wrote:
amigo wrote:
Really, the pet package format is so bad that any effort to extend it is only gonna make it worse. The one thing this distro has always needed is a decent, workable package format -then the tools to use and create those packages reliably, repeatably and flexibly.

Ok, but now it's in the hands of the community the ethos of 'open source' can be applied liberally Wink

Is this is a good time to request that we include dependency, AND compile time (config) options in the pet specs for all pkgs? Then we'll know exactly how a pkg was compiled, making it much easier to re-compile an update, or change some options etc....

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


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Fri 22 Nov 2013, 05:27    Post subject:  

sc0ttman wrote:
01micko wrote:
amigo wrote:
Really, the pet package format is so bad that any effort to extend it is only gonna make it worse. The one thing this distro has always needed is a decent, workable package format -then the tools to use and create those packages reliably, repeatably and flexibly.

Ok, but now it's in the hands of the community the ethos of 'open source' can be applied liberally Wink

Is this is a good time to request that we include dependency, AND compile time (config) options in the pet specs for all pkgs? Then we'll know exactly how a pkg was compiled, making it much easier to re-compile an update, or change some options etc....

Join GitHub (you have of course already), create a fork, work it in, test, present a pull request.. Smile

Optionally, VVVVVVVVVVVVV .. there's a mailing list...

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8645

PostPosted: Fri 22 Nov 2013, 09:13    Post subject:  

Could then join the RPM club for the most confusing plethora of formats for software packaging Very Happy

seriously does this distro need yet more confusion added to save a few kilobytes? Chasing goalposts does not promote real development.

mike
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Fri 22 Nov 2013, 09:39    Post subject:  

mikeb wrote:
Could then join the RPM club for the most confusing plethora of formats for software packaging Very Happy

How does a simple gzip (and now xz) archived file with an md5 appended compare with a cpio archive with a bunch of metadata stuffed in?

mikeb wrote:
seriously does this distro need yet more confusion added to save a few kilobytes?

Where is the confusion? It's only a few lines of code.. only confused ones will be the ones that can't help themselves with that clicky thing..

mikeb wrote:
Chasing goalposts does not promote real development.

mike
No?
.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8645

PostPosted: Fri 22 Nov 2013, 09:54    Post subject:  

You are suggesting adding a compression format... which effectively adds a configuration to to its structure. Ie it may be one of two compression formats. rpm handling can involve one of several approaches mainly due to the use of different compression formats. Just don't want to see pets wander down a similar road of confusion...it may not be wonderful but at least now pets are tried and tested with one familiar system.

sfs could provide one simple package format...use as is or extract for conventional install.... now that's simple and simple is good. Ah hang on its format changes all the time or is that compression or does it matter...as far as anyone is concerned they have to be handled differently and need this weeks fun bunny script/kernel.

Working with certain consistencies saves time having to work around changes. Every time python/gtk/kernel devs change a function, /sys layout and so on, someone has to spend time amending code and scripts.

Well at least you read my posts which is always appreciated, Wink

mike
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Fri 22 Nov 2013, 10:02    Post subject:  

Nobody likes change Mike Smile

Thing is sfs, went to xz a few years back.. users adapt. They have to. Microsoft forces them to, at their expense.

xz compressed pets is not new, it's just not mainstream, yet.

You must maintain a few scripts ? I do, and every time upstream changes something I have to adapt, kind of like evolution, which can be good or bad, depends on your angle.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8645

PostPosted: Fri 22 Nov 2013, 10:24    Post subject:  

Just not keen on lifespans of a few months ... get a bit tedious.
Tell Bill I still run windows 2000 on a daily basis Very Happy and have a working install of NT4.

I like change for the better... I don't go around battering spinning jennys and I hated DOS though development can mean simplifying too .. a healthy refinement. Don't make me quote the laff-splash saga Very Happy

Well hope it goes well and its amazing how passionate we become over these overgrown calculators.

mike
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2276

PostPosted: Fri 22 Nov 2013, 12:47    Post subject:  

Yeah, nothing like having a moving-target vis-a-vis compression. squashfs is not really a suitable format -it is pottentially subject to changes in both the compression format and the squashfs itself.
Instead of thinking we'll extract the sfs when needed, it would make more sense to 'mount' the normal tarred/compressed archives. Sure, use xz for the compression. It is stable and of course tar is also.

It can be debated about whether to use cpio or tar -no others are featureful enough. But you can still debate whether to use bsdtar/cpio or GNU versions. But the decision can only be made using specific criteria. If you ever wondered why slackware uses a very old version of tar specifically to create and install packages, it is because of 3 certain behaviors which were changed in later versions of tar.

There is much to be said for using someone elses' package format -it is not easy to come up with anything better. But, if you have special software-deployment needs, then creating a format may be the best thing. I'm not suggesting that already-created packages from some other distro should be used! I mean using the rpm, deb or 'arch' package formats -and their package creation tools and methods.

The chief objection to the rpm format is that you really have to use rpm to build them -and that means only being able to create packages with a well-written spec file. The rpm library contains more than 250 macros for carrying out package building and installation/deinstallation steps. It's a pretty steep learning curve.

debian builds are not much better, as there are about 50 macros and at least a couple of extra files have to be supplied -sometimes 15-20 extra files. debian package systems depend lots on perl.

So, why are packages even necessary? So that installations/fixes/changes/upgrades/rollbacks can be made available and carried out in a completely modular fashion. If something is implemented or fixed at the package level, then that unit can be applied to already-installed systems or incorporated into future appliances. And, changes shoudl not be done manually to packages -you have to get the recipe for the package working so that the package can be rebuilt without any intervention, from start to finish by recipe. It simply is impossible to manage hundreds/thousands of packages any other way. And creating the packages yourself is the only way to get control of the process, so software can be configured, compiled and packaged for the needs of the distro. The further your needs are from those of any/all other distros, the more important this is. Instead of posting packages on some forum, post recipes instead.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Fri 22 Nov 2013, 13:35    Post subject:  

The .pet format is a little bit crazy because it is a compressed .tar archive - compression by default ever and only had been libz compression - and the crazyness is to add a md5sum to the file.

To show .pet with a specific icon needs adjustments to a few files in /usr/share/mime directory,
that likely would vanish if run some update-mimedatabase program , that ignores or does not know the .pet format .
I remember , that Iwas stunned by my first experiments with the mime database because of fixing .pet mime type .
Therefore I somehow can uderstand the term "horrible" . :LOL:

But changes need time, likely as much time as it was developed and lasting stable.

I am mostly suspicious on radical changes, so I prefer step by step adjustments .

And of course everyone is welcome to post his own petget files in his own thread like amigo did with his src2pkg .
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [30 Posts]   Goto page: 1, 2 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.0970s ][ Queries: 12 (0.0044s) ][ GZIP on ]