aufs specific snapmergepuppy

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

aufs specific snapmergepuppy

#1 Post by gyro »

The attached "snapmergepuppy_aufs-0.1.pet" contains a new version of the "/usr/sbin/snapmergepuppy" file, with 2 changes.
1. It gets all it's information directly from aufs. It does not depend on any puppy directory naming or content assumptions.
2. It deletes files from pup_rw that it copies to pup_ro1.

This should work with any puppy that uses aufs, no-matter how the "init" script might setup things.
Warning: This original statement is incorrect, while this new snapmergepuppy is "init" agnostic, it does require coreutilities 8.21 or newer, so it only works on newish puppies. See mavrothal's comment below.

gyro
Attachments
snapmergepuppy_aufs-0.1.pet
click to install
(4.49 KiB) Downloaded 184 times
Last edited by gyro on Mon 09 Jan 2017, 22:11, edited 2 times in total.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

What testing does this need?

Hope you are going to offer this to Woof CE if it tests OK.

If you really want this to get into Puppy, the code is there in Woof-CE.
https://github.com/puppylinux-woof-CE/woof-CE
Make a pull request to submit to Woof CE.

There is also this:
woof-CE patch generator!
http://www.murga-linux.com/puppy/viewtopic.php?t=98740
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#3 Post by mavrothal »

Having only older pups in flash media failed to test as it will not work on older pups (pre-Tahr/slaco6). The --output=target df option requires coreutilities 8.21 or newer. You might want to go with good old awk instead.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#4 Post by gyro »

mavrothal wrote:Having only older pups in flash media failed to test as it will not work on older pups (pre-Tahr/slaco6). The --output=target df option requires coreutilities 8.21 or newer. You might want to go with good old awk instead.
Thanks.
This version really is targeted at "rationalise", and thanks to jlist, it is already there.

Obviously if back porting were to happen, this would need to be changed, but I see the main beneficaries are puppies with the new "init" and puppies that make significant use of the adrv and fdrv, and that tends to be the more recent puppies.
While "init" support for the adrv and ydrv has been around for quite a while, it's not that long ago that I had to edit the DISTRO_SPECS file in intitrd.gz to be able to use them.

Note: I have edited the first post to recant my original bold statement.

gyro

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#5 Post by seaside »

gyro,

I like this approach.

There was a little item that crept into the code.

Code: Select all

 error_msg () 
 line 219 
     /usr/lib/gtkdialog/box_splash -timeout 30 -close box -icon gtk-dialog-warning -bg red -text "$1"
 (probably should be)
    yaf-splash -box_splash -timeout 30 -close box -icon gtk-dialog-warning -bg red -text "$1"
Cheers,
s

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#6 Post by gyro »

@seaside,

I don't see the problem with the code in "error_msg".
I did not change any code in "error_msg".

gyro

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#7 Post by mavrothal »

I suspect the "complain" is because box_* infrastructure is not in older puppies.
Installing libstardust pet should fix that.
Update also coreutilites to 8.21+ and older puppies should be OK.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#8 Post by seaside »

mavrothal wrote:I suspect the "complain" is because box_* infrastructure is not in older puppies.
Installing libstardust pet should fix that.
Update also coreutilites to 8.21+ and older puppies should be OK.
mavrothal,

You're quite right. That test was with Precise 5.7.1, which does not have " /usr/lib/gtkdialog/box_splash".

A link could probably fix this-

Code: Select all

mkdir /usr/lib/gtkdialog
ln -s /usr/bin/yaf-splash /usr/lib/gtkdialog/box_splash
gyro: I guess some of the puppies and me are getting old :(

Cheers,
s

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#9 Post by gyro »

Will this line work on older puppies?

Code: Select all

BASEMTP="`stat -c %m -- \"$BASE\"`" #get mount point containing $BASE file
gyro

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#10 Post by mavrothal »

gyro wrote:Will this line work on older puppies?

Code: Select all

BASEMTP="`stat -c %m -- "$BASE"`" #get mount point containing $BASE file
gyro
OK in Precise and Slacko 5.7
Not in Racy 5.5 and Luci/Sulu.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#11 Post by gyro »

I have attached "snapmergepuppy_aufs_retro-0.1.pet", for back porting to older puppies.

This contains the changes suggested above:

Code: Select all

#BASEMTP="`stat -c %m -- \"$BASE\"`"
BASEMTP="`df \"$BASE\" | awk 'END{print $NF}'`"
and

Code: Select all

yaf-splash -box_splash -timeout 30 -close box -icon gtk-dialog-warning -bg red -text "$1"
so it should work with older puppies.

Note: I have no intention of updating similar changes to the woof-ce version. The woof-ce version should remain as is.

gyro
Attachments
snapmergepuppy_aufs_retro-0.1.pet
click to install
(4.5 KiB) Downloaded 135 times

Post Reply