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 Sat 15 Dec 2018, 01:19
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
SFS-Combiner - merge some squashfs addons
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 7 [97 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7
Author Message
mikeslr


Joined: 16 Jun 2008
Posts: 2844
Location: 500 seconds from Sol

PostPosted: Sun 08 Apr 2018, 11:25    Post subject: ? One Application -- Combine this with PaDS ?  

Hi All,

PaDS is an application which converts and combines pet, deb and txz files into one SFS. http://murga-linux.com/puppy/viewtopic.php?p=658359#658359*. During its operation it identifies a source file by its suffix/ending, employs a routine for extracting a file with that ending, and then merges all the extracted files.

What it can't do is handle a file ending in SFS (or PFS or SquashFS) as it does not include (a) the code to identify such files, and (b) the routine to extract it. That, of course, is what SFS-Combiner does at least with respect to files ending in SFS.

Once the files are extracted, both PaDS and SFS-Combiner use essentially the same routines to merge the extracted source files and package them as an SFS. And both applications have code creating a GUI. In other words, we now have two applications with GUIs containing essentially the same merge and repackage routines. I figured, while the coding of SFS-Combiner was still fresh in your minds, perhaps someone might consider creating an "Uber-Combiner".

By now It should go without saying that while I have sufficient knowledge to follow the logic of applications employing bash, I don't have sufficient knowledge to write them; and my knowledge of GUI coding is best described as "slim to none."

Additional routines:
If possible, add routines to handle PFS and SquashFS files.

Lastly, along the same lines, how about including routines to convert pets to SFSes and vice-versa.

mikesLr

* On 64-bit systems, PaDS depends on the unrpm-64bit.pet found here, http://www.murga-linux.com/puppy/viewtopic.php?p=938515#938515 rather than the unrpm.pet via link on first post of the PaDS thread. The difference between these pets involves how deb files are handled. unrpm uses a binary not recognized by 64-bit OSes. unrpm-64bit employs the OS's builtin routine for decompressing deb files.

P.S. to Flash: Is it possible to move this thread to the Utiliities Section?
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 13167
Location: Gatineau (Qc), Canada

PostPosted: Sun 08 Apr 2018, 21:45    Post subject:  

Hi Mikeslr.

Care to expand the PSF acronym? Wink I'm sure it's not referring to the
"Pondichery Science Forum", but beyond that... TIA.
https://en.wikipedia.org/wiki/PSF

Not a bad suggestion. Out of politeness and because of his expertise with
these files, we should first ask RSH it he'd be willing to augment his PADS
utility. It's his baby.

I could maybe attempt something, but it wouldn't be GUI. I'm like you in
that respect, I know next to nothing concerning GUIs, plus philosophi-
cally, my idea of a good interface is an urxvt window with a numbered
menu! Twisted Evil (Am I hearing a loud and collective "Yerk!" ?)

From a practical point of view (it would save a lot of coding), maybe we
do not need to invent a new utility. An exhaustive round-up of all such
utilities could be enough, perhaps, but regrouped in the same place (sub-
dir?) with its own aemenu or similar. Good descriptions about them in a
single doc would no doubt help the user too. (My 2¢ !)

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 13167
Location: Gatineau (Qc), Canada

PostPosted: Mon 09 Apr 2018, 01:43    Post subject:  

Hello all.

I looked further into MikesLr's suggestion, and one problem would be that
pads is a bash script and SFS-Combiner is a Basic app.

A menu like this, perhaps, would be the next best thing, IMO. However, it
would need a volunteer writer to replace the "bla-blas" and improve on
the descriptions. Anyone ?

But basket the menu idea if you don't like it, that's ok too.

BFN.
~~~~~~~~~~~~~~
Code:
#!/bin/bash
# /root/.aewm/ae/sfs-processors.sh
# aemenu for sfs process
# Requires aemenu.
# (c) musher0, 2018-04-09. GPL3.
####
AppS=/usr/share/applications
echo -e "### aemenu ###
cmd \"    sfs-processors \"\"
cmd \"¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤\" \"\"
menu \"\tedit_sfs\"
   cmd \"~~~~~~~\" \" \"
   cmd edit_sfs \"rox $AppS/edit_sfs.desktop\"
   menu description
      cmd \"Allows the user to edit an sfs archive.\" \" \"
   end
   menu usage
      cmd \"bla-bla\" \"\"
      cmd \"ble-ble\" \"\"
      cmd \"bli-bli\" \"\"
   end
   cmd \"~~~~~~~\" \" \"
end

menu SFS-Combiner_MU
   cmd \"~~~~~~~\" \" \"
   cmd SFS-Combiner_MU \"rox $AppS/SFS-Combiner_MU.desktop\"
   menu description
      cmd \"Combines multiple sfs' into one.\" \" \"
      cmd \"(A GTKBasic003 application)\" \"\"
   end
   menu usage
      cmd \"bla-bla\" \"\"
      cmd \"ble-ble\" \"\"
      cmd \"bli-bli\" \"\"
   end
   cmd \"~~~~~~~\" \" \"
end
menu \" SFS-Combiner.sh\"
   cmd \"~~~~~~~\" \" \"
   cmd SFS-Combiner.sh \"rox $AppS/SFS-Combiner.sh.desktop\"
   menu description
      cmd \"Combines multiple sfs' into one.\" \" \"
      cmd \"(A Bash application)\" \"\"
   end
   menu usage
      cmd \"bla-bla\" \"\"
      cmd \"ble-ble\" \"\"
      cmd \"bli-bli\" \"\"
   end
   cmd \"~~~~~~~\" \" \"
end
menu \"\tlp2pads\"
   cmd \"~~~~~~~\" \" \"
   cmd lp2pads \"rox $AppS/lp2pads.desktop\"
   menu description
      cmd \"Combines deb, rpm and pet archives in an sfs.\" \"\"
   end
   menu usage
      cmd \"bla-bla\" \"\"
      cmd \"ble-ble\" \"\"
      cmd \"bli-bli\" \"\"
   end
   cmd \"~~~~~~~\" \" \"
end
cmd \"¤¤¤¤¤¤¤¤¤¤¤¤¤¤\" \" \"" > /tmp/sfs-processors
aemenu -rc /tmp/sfs-processors
sfs-processors-aemenu.jpg
 Description   The first item in the sub-menu launches the app.
 Filesize   57.71 KB
 Viewed   287 Time(s)

sfs-processors-aemenu.jpg


_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
hamoudoudou

Joined: 24 Jul 2014
Posts: 1467
Location: rabat

PostPosted: Mon 09 Apr 2018, 22:31    Post subject: about pupsave to Sfs,  

about pupsave to Sfs, you can use Pet-Maker 2.3 (Included in Chloe, wonderful Xfce make up released one year ago).
#!/bin/bash
#Pet Maker (Creating dotpet with GUI)
#Copyright 2009 GPL
#Trio Tjandradjaja
# Modified Oct 2011 scsijon WITH PETBASE v2.2
Pet Maker 2.3.jpg
 Description   GUI is quiet the same, devs only create it again and again..
 Filesize   56.22 KB
 Viewed   258 Time(s)

Pet Maker 2.3.jpg

Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 13167
Location: Gatineau (Qc), Canada

PostPosted: Mon 09 Apr 2018, 23:49    Post subject:  

URL for the thread of this, please, hamoudoudou? Thanks in advance.

Also note the "one by one" in the panel above. You better have a lot of time
ahead of you if you use this. Shall we set an appointment for this day next
year? Rolling Eyes

With all due respect to forum member "Trio", no wonder devs have
continued developing scripts which can handle such files in batches.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2844
Location: 500 seconds from Sol

PostPosted: Tue 10 Apr 2018, 17:29    Post subject: Modifying PaDS  

I know little about files which end with the suffix “pfs”. Ansivar provides this information, http://murga-linux.com/puppy/viewtopic.php?p=898123#898123, including “After a simple renaming of the pfs-package's extension to the sfs-package's extension(some*.pfs -> some*.sfs) you can use this some*.sfs in the other Puppy's Derivatives (like Slacko/Trusty/Precise/Lucid - with support SquashFS v4) as standart/main sfs-package”. But I also took from that post that some operations may require pfs-utilities (which are not standard in Puppies). FWIW, my examination of kernel packages published in the pfs format revealed the use of some folders which were also not standard in Puppies. Consequently, conversion of pfs packages to puppy-standard sfses or pets may be challenging.

Setting aside for the moment that “DebianDogs” are “pure-debian or Ubuntu” while Puppies are not, the conversion of squashfs files, as used by “DebianDogs” should be straight forward. Perhaps due to fredx181's and saintless' intention to present a “Puppy-like” OS and affinity to Puppies, I have noticed no unusual folders in the “Dogs”. Frequently, SFSes packaged for Puppy can be employed in Dogs merely by changing their suffixes to “squashfs”. The reverse should to a large extent also be true. But this pertains to conversion, itself. In order to use a converted debiandog squashfs, a Puppy may also have to install/include libraries found in debian/ubuntu but not in Puppy. Including all required libraries may not be possible, or where possible may break other Puppy applications. But that is the problem you always face when installing debian/ubuntu packages.

AFAIK, every recent Puppy includes binaries of both mksquash and unsquash. They are found in /usr/bin. The can be used from the command line tools with the format, respectively, “mksquashfs name_of_sfs” and “unsquashfs name_of_sfs”.

Consequently, it should be fairly simple to modify PaDS –at least the back-end-- to add a routine for incorporating SFS files into a target SFS. In PaDS, LazyPuppy recognized Trio Tjandradjaja's development of pet2sfsgui. [As that pet appears no longer to be readily available, I've attached a copy.] Taking into consideration that I posses no expertise in bash, my comparison of the two applications suggests that pet2sfsgui served more as an inspiration than as a framework from which PaDs was developed. At any rate, the routines within PaDS that manages the incorporation of applications variously packaged uses the following bash code:

;;
-addtmp)
LASTDIR=$(cat /tmp/lastdir.tmp)
PET=$(Xdialog --title "$PETFSDIRTITLE" --stdout --fselect "$LASTDIR" 32 86)
[ ! "$PET" ] && exit
echo "$(dirname $PET)" > /tmp/lastdir.tmp
CHECKPET=$(echo $PET | sed 's/^.*\.//')
if [ "$CHECKPET" = "pet" ]; then
echo "$PET" >> /tmp/petsndebslist.tmp
else
if [ "$CHECKPET" = "deb" ]; then
echo "$PET" >> /tmp/petsndebslist.tmp
else
if [ "$CHECKPET" = "txz" ]; then
echo "$PET" >> /tmp/petsndebslist.tmp
fi
fi
fi
exit
;;

Another section provides:

for PET in $(cat /tmp/petsndebslist.tmp)
do
CHECKPET=$(echo $PET | sed 's/^.*\.//')
cp $PET $DIR
cd $DIR
doit="false"
PETNAME=$(basename $PET)
if [ "$CHECKPET" = "deb" ]; then
/usr/sbin/ceelab/rightclick/undeb_file/undeb_file $DIR/$PETNAME "Batch"
PETDIR=$(basename $PET.files)
doit="true"
else
if [ "$CHECKPET" = "pet" ]; then
tar -xzvf $DIR/$PETNAME
PETDIR=$(basename $PET .pet)
doit="true"
else
if [ "$CHECKPET" = "txz" ]; then
mkdir -p $DIR/$NAME
cd $DIR/$NAME
tar -Jxvf $DIR/$PETNAME
PETDIR=$(basename $PET .txz)
doit="true"
if [ -f "$DIR/$NAME/install/doinst.sh" ]; then
while read LINE
do
echo "$LINE" >> /root/$NAME.doinst.sh
done < "$DIR/$NAME/install/doinst.sh"
rm -r "$DIR/$NAME/install"
fi
fi
fi

Perhaps, on the back end, in order to use an SFS as a source all that may be necessary is another “If...fi” in these sections.

There's a very logical structure to PaDS. It's occasional use of the sed command alerts me to the fact that what LazyPuppy did was 'far above my pay grade'. And as I previously mentioned, gtkdialog as a front-end similarly looses me.

A squashfs file might only require the additional step of renaming it as an SFS before unsquashing.

With all do respect to Mu, who accomplished more than I ever could, he created SFS-Combiner in 2008, nearly at the inception of Puppy. I don't know why he was inspired to use Basic. Perhaps at that time Puppy's implementation of Bash or the knowledge of its potential was limited. But its continued use requires installation of an additional application which is now, at least, 10 years old and may not be available under 64-bit operating systems. PaDS suffers from neither of those.

I have emailed LazyPuppy inquiring whether he has any objection to the modification of PaDS. Certainly, his hard work is entitled to acknowledgment within any modification. But it is questionable whether anyone employing FOSS applications is entitled to more than recognition of their contribution.

mikesLr
pets2sfsgui-1.4.pet
Description  pets2sfsgui
pet

 Download 
Filename  pets2sfsgui-1.4.pet 
Filesize  2.16 KB 
Downloaded  142 Time(s) 
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 13167
Location: Gatineau (Qc), Canada

PostPosted: Mon 11 Jun 2018, 16:39    Post subject:  

Hello all.

I have come up with a 2nd version of my sfs combiner script, here:
https://augras.eu/puppy_forum/index.php?topic=89.0

The detail of changes and additions can be found here:
http://softwarefreedom.jcink.net/index.php?showtopic=20

Enjoy.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 7 of 7 [97 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
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.0828s ][ Queries: 15 (0.0364s) ][ GZIP on ]