Page 2 of 7

Posted: Sun 05 Oct 2014, 18:38
by mikeb
The best patch for snapmergepuppy is the delete button...biggest pile of garbage out there.

sorry to vent there :D

mike

snapmergepuppy for Dpup Wheezy

Posted: Sun 05 Oct 2014, 19:02
by gyro
The ydrv for Dpup Wheezy at http://www.fishprogs.software/puppy/whe ... 5.2.11.sfs has had a patched 'snapmergepuppy' added to it.

gyro

Posted: Mon 06 Oct 2014, 05:17
by gyro
I just realised there is another candidate for puppy code that this breaks, that's 'Puppy Package Manager'. When it checks to see if you have enough room to install, in pupmode=12 it will most likely find 0.
A patch using similar techniques to the patch for 'snapmergepuppy' might work. I'll investigate.

gyro

Bug in 'snapmergepuppy' code

Posted: Mon 06 Oct 2014, 08:26
by gyro
There is a bug in the 'snapmergepuppy' code I published earlier.
The patch in the earlier post has been fixed.
The code in http://www.fishprogs.info/puppy/tahr/yd ... .3.rc1.sfs and http://www.fishprogs.info/puppy/wheezy/ ... 5.2.11.sfs has been fixed.

Apologies,
gyro

puppy package manager - /usr/local/petget

Posted: Mon 06 Oct 2014, 11:04
by gyro
Strangely enough, Puppy Package Manager, works as is.
In 'installpreview.sh' it checks the size of the package against the free space available.
It gets the free space number from '/tmp/pup_event_sizefreem'. I suspect that this is maintained by 'freememapplet', and if 'freememapplet' is not running, then the file is empty.
But apparently in script arithmetic, an empty variable is not equated to 0. So the test "[ $SIZEVALx2 -ge $SIZEFREEK ]" fails because $SIZEFREEK is empty. So 'installpreview.sh' tells you that all's well, go ahead and install.

So I have made a patch for '/usr/local/petget/installpreview.sh':

Code: Select all

--- installpreview.sh.orig	2014-08-28 06:07:44.000000000 +1000
+++ installpreview.sh	2014-10-06 19:14:25.659426937 +1000
@@ -75,8 +75,17 @@
 
 [ "$DB_description" = "" ] && DB_description="$(gettext 'no description available')"
 
+. /etc/rc.d/PUPSTATE
+
 SIZEFREEM=`cat /tmp/pup_event_sizefreem | head -n 1` #100821 bug in Lucid 5.1, file had two identical lines.
-SIZEFREEK=`expr $SIZEFREEM \* 1024`
+if [ $SIZEFREEM ]; then
+ SIZEFREEK=`expr $SIZEFREEM \* 1024`
+else
+ BASEMTP="/initrd${SAVE_LAYER}"
+ [ -L $BASEMTP ] && BASEMTP="/initrd${PUP_HOME}"
+ SIZEFREEK=`df | grep -m1 -w "$BASEMTP"| tr -s ' ' | cut -f 4 -d ' '`
+ SIZEFREEM=`expr $SIZEFREEK / 1024` 
+fi
 
 if [ $DB_size ];then
  SIZEMK="`echo -n "$DB_size" | rev | cut -c 1`"
The purpose of the patch is twofold:
1) Do something a bit sensible if 'freememapplet' is not running.
2) Within this, use the save partition if we have a link based savefolder.

Patched versions of 'installpreview.sh' have been included in http://www.fishprogs.software/puppy/tah ... .3.rc1.sfs and http://www.fishprogs.software/puppy/whe ... 5.2.11.sfs

I have tested this code in normal frugal installs of both TahrPup 5.8.3.rc1 and Dpup Wheezy 3.5.2.11.

gyro

Posted: Mon 06 Oct 2014, 11:49
by mikeb
It gets the free space number from '/tmp/pup_event_sizefreem'. I suspect that this is maintained by 'freememapplet',
It used to be and probably still is coming from puppy_frontend_d in its free space check...which probably uses similar code and I found equally useless so removed it :D . You have probably highlighted why it is so.
Indeed if the drive icons are replaced with something better much of this becomes irrelevant anyway.

As a further aside Xfce4 has a great free space monitor as a an applet and I use that... reliable and immeasurable cpu.

Onward and upward.... funny how working on one thing improves several others.

mike

Posted: Mon 06 Oct 2014, 14:42
by mavrothal
Does "pup_rw" shows in mounted volumes/mounts? I would think that any puppy script that looks to pup_rw for info may have a problem with this implementation.
I also wonder if any aufs functions (auchk?) have problems since pup_rw does not appear as a branch.

BTW you may ant to provide deltas against the original ISO. Are equally small and the iso can be tested in a wider range of conditions.

Posted: Mon 06 Oct 2014, 16:56
by gyro
mavrothal wrote:Does "pup_rw" shows in mounted volumes/mounts? I would think that any puppy script that looks to pup_rw for info may have a problem with this implementation.
"pup_rw" does not show in any 'mount' list because it is not a mount point, it's just a directory within a mounted partition. That's why programs like 'freememapplet' and 'snapmergpuppy' have difficulties, because they try to obtain the free space in "pup_rw" from it's mount information.
mavrothal wrote:I also wonder if any aufs functions (auchk?) have problems since pup_rw does not appear as a branch.
I am not familiar with 'auchk', but if it's an aufs function then surely it would work on the actual branches in the aufs stack. And the directory that is the savefolder is a branch. Why would aufs care what the puppy common name is for one of them?

gyro

Posted: Tue 07 Oct 2014, 13:31
by mavrothal
mavrothal wrote:BTW you may ant to provide deltas against the original ISO.
Oh well, I put together a delta for Puppy Prceise 5.7.1, to become 5.7.2.
I contains the gyro's changes (patches) and the shellshock-safe bash-4.1.17.

So if you want to test gyro's new savefolder changes in precise, download the precise-5.7.1.iso___precise-5.7.2.iso.delta (md5:b6ea7b96f49848776186ad7ea7dc907d), update you precise 5.7.1 iso and check it out.

I tested only briefly, ie boot, save to directory and reboot using the said directory, but not any further.

NOTE: The 5.7.2 iso will update precise-5.7.1 if installed. If you do not want to test how it behaves after an update, use pfix=ram. Backup your original savefile if you do update.

Edit: New version Oct 12, also includes fixed freememapplet 2.4, a script to transform your savefile to savefolder, updated Puppy-package-* files, sfs_load and a fix for a soft block in wifi.

Posted: Tue 07 Oct 2014, 14:21
by gyro
@mavrothal
Thanks for providing the delta.
Thanks for providing the collection of patches.
There's just one little thing, the "df.diff" is not required by savefolder symbolic link, (although it won't hurt). It's the last piece of the jigsaw for savefolder bind mount.
(Until recently I was unaware that 'df' in puppy is a wrapper script.)

gyro

freememapplet_tray

Posted: Tue 07 Oct 2014, 16:36
by gyro
Here is a patch of 'freememapplet_tray.c':

Code: Select all

--- freememapplet_tray.c.orig	2012-05-19 20:02:51.000000000 +1000
+++ freememapplet_tray.c	2014-10-08 01:56:41.045027125 +1000
@@ -68,7 +68,9 @@
     /*100517 always read free space in save file, not RAM space...*/
     /*if (pupmode!=6 && pupmode!=12) {fp = (FILE *)popen("df -m | grep ' /$' | tr -s ' ' | cut -f 2,4 -d ' '","r");}
     else {fp = (FILE *)popen("df -m | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 2,4 -d ' '","r");}*/
-    if (pupmode==3) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
+    if ((readlink("/initrd/pup_rw", meminfo, sizeof meminfo) != -1) || (readlink("/initrd/pup_ro1", meminfo, sizeof meminfo) != -1))
+        fp = (FILE *)popen("df -m | grep ' /initrd/mnt/dev_save$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
+    else if (pupmode==3) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
     else if (pupmode==7) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
     else if (pupmode==13) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
 // BK 110805 testing with PUPMODE=2, needs fix, there is no /dev/root...
Yes, same problem, assuming that it can get size information for 'pup_rw' from a mount entry.
I have added a working version of 'freememapplet_tray' to http://www.fishprogs.software/puppy/whe ... 5.2.11.sfs. This is the version I happened to be able to find source for.

So the list of required patches increases. But this symbolic link method has 1 advantage, they're all very specific to puppy.

gyro

Re: freememapplet_tray

Posted: Tue 07 Oct 2014, 17:53
by mavrothal
gyro wrote: I have added a working version of 'freememapplet_tray' to http://www.fishprogs.info/puppy/wheezy/ ... 5.2.11.sfs.
Also works in Precise so you may want to post it as a pet here.
BTW is it stripped? (is too big)

BK keeps sources in http://bkhome.org/sources/. Needs the usual user/pass. Has 7 versions of the applet in http://bkhome.org/sources/alphabetical/f/

Re: freememapplet_tray

Posted: Wed 08 Oct 2014, 08:31
by mavrothal
mavrothal wrote: Also works in Precise so you may want to post it as a pet here.
Here is BK's freememapplet_tray-2.4 patched as above to v2.5

BTW I have also updated the precise-5.7.2 ISO with this.

Posted: Wed 08 Oct 2014, 09:58
by Bert
A question from a simple soul: can I use the delta to update the precise 5.7.1 from within it, while it is running?

Or does this need to happen from another Puppy?
Apologies, I never used a delta before...

Posted: Wed 08 Oct 2014, 10:22
by mavrothal
Bert wrote:A question from a simple soul: can I use the delta to update the precise 5.7.1 from within it, while it is running?

Or does this need to happen from another Puppy?
Apologies, I never used a delta before...
The delta will update the precise-5.7.1.iso (not the retro version), that you must have locally, to produce the precise-5.7.2.iso. So get the 5.7.1 iso and the delta and use "Xdelta file difference manager" to update the iso.
Then you can do a "manual frugal install" with the vmlinuz, initrd.gz and puppy_precise-5.7.2.sfs files from the new iso, either in a new folder or replacing the ones from 5.7.1 in your installation, or just burn and boot the iso.

Re: freememapplet_tray

Posted: Wed 08 Oct 2014, 10:44
by gyro
mavrothal wrote:Here is BK's freememapplet_tray-2.4 patched as above to v2.5
This also works in Dpup Wheezy. So I've replaced the 'freememapplet_tray' in http://www.fishprogs.software/puppy/whe ... 5.2.11.sfs with this one.

I've no idea why the other version was so large. Yes it was stripped.

gyro

Posted: Wed 08 Oct 2014, 11:35
by backi
Tested 5.7.2 delta iso on USBstick but at shutdown did not create savefile .
Just shutdown *after asking to create a savefile ** without saving .

Posted: Wed 08 Oct 2014, 12:42
by Bert
mavrothal wrote: The delta will update the precise-5.7.1.iso (not the retro version), that you must have locally, to produce the precise-5.7.2.iso. So get the 5.7.1 iso and the delta and use "Xdelta file difference manager" to update the iso.
Then you can do a "manual frugal install" with the vmlinuz, initrd.gz and puppy_precise-5.7.2.sfs files from the new iso, either in a new folder or replacing the ones from 5.7.1 in your installation, or just burn and boot the iso.
Perfect explanation... thank you mavrothal.

I updated an existing precise 5.7.1 to 5.7.2 successfully, writing from it now.

I am running Puppy from a usb stick with pupmode=12, my favourite way of using Puppy. Of course, this was lost during the update, because the initrd.gz
gets replaced by the new one. No problem: simply added "PUPMODE=12" again (with editinit).

So far, I did not succeed to change from save file to save folder.
As I did not find the "transform" script, I downloaded gyro's "savefile2dir", made executable and clicked it. Nothing happened.

Think I'll do a new installation tonight, to see if that makes a difference.
For now, I'm grateful having an up-to-date Precise!

Bert

Posted: Wed 08 Oct 2014, 12:50
by mavrothal
Bert wrote: So far, I did not succeed to change from save file to save folder.
As I did not find the "transform" script, I downloaded gyro's "savefile2dir", made executable and clicked it. Nothing happened.
The savefile2dir script is in /root/my-applications/bin, so it's in the $PATH
You must call it from the terminal though like

Code: Select all

savefile2dir /full/path/to/savefile/savefile.2fs
# ie something like
savefile2dir /mnt/home/Precise/precisesave.3fs
If you just click on it nothing happens :D

@backi: see response here

Posted: Wed 08 Oct 2014, 15:39
by backi
Could make it working with ----savefile2dir /full/path/to/savefile/savefile.2fs

Want to ask ....can this be used in other Puppies too for example "Raring" ?

Whats necessary ?