SFS file Installer for Full-HD Puppy installs. TEST

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

SFS file Installer for Full-HD Puppy installs. TEST

#1 Post by sunburnt »

WhoDo found out that SFS files can't be unioned to a Full-HD install of Puppy.
It certaunly seems like it should work, but so far no luck, IF you do it... TELL US!

So I've made this SFS file installer that copies the contense of an SFS file to a FULL-HD install.

To remove the installed files, a file is needed inside the SFS file called:
(SFS file mount point)/.sfs/(name of sfs file).files
It lists all the files contained in the SFS file so they can be removed.

Current SFS files don't have this, so I added a routine to make the uninstall file.
So if there's no uninstall file, one's made so the copied files can be removed.

WARNING... There's no check for FULL-HD install... DON'T USE IT ON ANYTHING ELSE !
I made that simple mistake & it filled up the SAVE file before I could stop it.
When I figure out how to accurately detect a full-install, I'll add it to this app.

WARNING... When you click on the SFS file in the file dialog... IT WILL be INSTALLED !
Maybe I'll add a second chance dialog asking: "Install: Yes or No?".

ATTENTION: I don't have a full-install of Puppy to test this on... EXPERIMENTAL !

If you have a full-HD install, BEWARE of testing this app.!!!
It's best to make a separate Full-HD install as a TEST SETUP.

##### Uncompress app. & move dir.: /sfsInstaller_full-HD with files to:
/root/my-applications/sfsInstaller_full-HD


############ I've removed it as it's too old to work in newer Puppys.
Last edited by sunburnt on Mon 23 Jun 2008, 04:13, edited 9 times in total.

User avatar
DiabloRojo
Posts: 27
Joined: Sun 11 Mar 2007, 10:47
Location: Madrid, Spain, Europe, Earth, Solar System

It is work

#2 Post by DiabloRojo »

Your script has worked correctly in my Puppy Linux 2.14, it is a Full-HD install of Puppy.

Image

Your subject requires a small contribution, it is that once installed some of the Expansion Packs is necessary to open a “console
[u][url=http://www.forosuse.org]Foro de usuarios de (Forum of users of) OpenSUSE[/url][/u]
[url=http://es.opensuse.org][img]http://img83.imageshack.us/img83/8194/suse1userbarxc7.gif[/img][/url]
LO SIENTO NO CONTESTO A PRIVADOS SOBRE GNU/LINUX.

User avatar
dsearles
Posts: 11
Joined: Fri 06 Apr 2007, 20:52
Location: New Hampshire, USA

#3 Post by dsearles »

Worked for me as on 2.15 CE.

A few "polishing ideas"...

- some feedback during the copy (I wasn't sure anything was happenning at first)
- kick off "fixmenus" automagically, in case it's needed for the .SFS

Otherwise, fabulous work on such short notice!

DennisF
Posts: 86
Joined: Thu 01 Mar 2007, 02:38

#4 Post by DennisF »

Sunburnt-
What happens to a file that exists on the harddrive BEFORE the SFS is loaded? The way you have described your script it sounds as if the file name exists in the SFS package it will be overwritten and then removed when you uninstall the SFS.

For example say Firefox is installed in my base system and then I load the web.sfs that contains Firefox upon removal of the SFS Firefox will be gone.

Am I missing something? How are you making this magic? Or is this really a install only utility.

-DF

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

Thanks guys, I need to look at "fixmenus", I assume it's for rarsa's new menus.

DennisF; Correct... copied files will overwrite existing ones (of course), & being
as a full-HD install has no SAVE file, the existing file's GONE, I'll change that.

To install apps. like browsers, you'd want to backup your Bookmarks file & restore
it to the newly installed browser, upgrading apps. is almost always like this.


ATTENTION: Things I need to know:

In the dir. where you put sfsinstaller (I'll set a fixed dir. in /root/my-applications),
did the file "(Name of SFS file with NO .sfs Extention).files" get made?
Each sfs file installed has a uninstall file made for it, look at it to see if it's got
a long list of paths & files that were copied, if so... please let me know.


I've added a "File Copy" dialog box as dsearles suggested.
I'll also add a "disk free space check" to be sure copying doesn't run out of room.

Thanks again... Terry
Last edited by sunburnt on Wed 25 Apr 2007, 20:40, edited 1 time in total.

Greystar
Posts: 26
Joined: Tue 20 Mar 2007, 23:56

#6 Post by Greystar »

I;ll have to check these things for you and get back but .......To let you know it does work and thank you.

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#7 Post by WhoDo »

sunburnt wrote:ATTENTION: Things I need to know:

In the dir. where you put sfsinstaller (I'll set a fixed dir. in /root/my-applications),
did the file "(Name of SFS file with NO .sfs Extention).files" get made?
Each sfs file installed has a uninstall file made for it, look at it to see if it's got
a long list of paths & files that were copied, if so... please let me know.
Nope. Didn't happen for me. I got the file sfs.list only but no sfs.files with a list of the contents. That said, everything else worked like a charm! 8)

FWIW, I have created a .desktop file for /usr/share/applications that will add the SFS manager to the XDG menus under Setup when you do a fixmenus. It assumes the SFS manager scripts are in /usr/sbin which is probably where they need to be anyway, so they'll survive a remaster. OTOH, if you want to put everything in /root/my-applications then editing the .desktop file is very easy to do, as you well know.
Attachments
sfsmanager-menu.tar.gz
.desktop file for XDG menus to put SFS manager in Setup
(298 Bytes) Downloaded 1588 times
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#8 Post by sunburnt »

WhoDo; I changed the desktop file you made to better suit the utility.
It's really a SFS file installer for ONLY Full-HD installs of Puppy.
I thought the desktop file should include all these aspects of the app.
The new file's name is good & so no need to change it.
Note the "Exec=" line is a full path to the run file: sfsinstaller

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Puppy SFS file Installer
Icon=mini-ray.xpm
Comment=SFS Installer for Full-HD installs of Puppy
Exec=/root/my-applications/sfsInstaller_full-HD/sfsinstaller
Terminal=false
Type=Application
Categories=X-SetupUtility
GenericName=Puppy SFS Installer

I don't think I'll bother to take the time to make an installer for it,
maybe with any luck Barry will include it permanently in future releases.
If you guys & I get it tested out to work well, it'll sure help.
I'll finish somemore testing & with the grace of god it'll be ready.
Last edited by sunburnt on Sun 08 Apr 2007, 05:51, edited 1 time in total.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#9 Post by sunburnt »

Uploaded the new version above... This may not work anymore, I changed lots!

### Change log:
Added "Copy Start" & "Copy Done" dialogs.
Changed the "Installed Files" TableBox to list install files: "(sfsFile).files"
New app. path = /root/my-applications/sfsInstaller_full-HD/
Install files path = /root/my-applications/sfsInstaller_full-HD/install-files/
It runs "fixmenus" to add SFS file's "desktop template" to the Start menu.

I still need to know if it makes an install file for the installed SFS file in:
/root/my-applications/sfsInstaller_full-HD/install-files/
The file's name will be the same as the SFS file, & ".files" replaces the ".sfs" ending.
If the file's there, look at it's text to see if it's: /paths/files of the copied files.

Let me know how it works... Terry

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#10 Post by WhoDo »

sunburnt wrote:I still need to know if it makes an install file for the installed SFS file in:
/root/my-applications/sfsInstaller_full-HD/install-files/
The file's name will be the same as the SFS file, & ".files" replaces the ".sfs" ending.
If the file's there, look at it's text to see if it's: /paths/files of the copied files.
No, Terry. I've just installed OOo_215.sfs (twice) and although the package is correctly installed and mounted, and the appropriate entries appear in XDG menus, there is no file in the install-files directory that would allow an uninstall to take place.

The program also now creates an empty sfslist file, presumably because there is no OOo_215.files in the install-files folder, so it doesn't even recognise that the package is installed in the first place.

Hope that helps.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#11 Post by sunburnt »

WhoDo; Yep, I half expected that, the TableBox still reads the file sfslist, but
it's written from a dir. listing of the /install-files dir., so no files... no listing.
When uninstalled, an app's install file is read for the files to delete, & then
the install file itself is removed so it's gone from the TableBox list.

I'll look at why my code is brain dead on this item, should be easy to fix...
At least it looks like everything else is working properly though.
Hey! I just might be getting half way good at this finally! (don't go overboard)

I've got Easter dinner with the folks, I'll take a quick look at it here to see if
there's anything obvious, otherwise I won't be at it until this evening.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#12 Post by sunburnt »

Release notes for Near FINAL version (download at top of first page of post).
Found minor bug in the Install function, & a major bug in the UnInstall.

CRITICAL ....... UnTar & Gunzip it in: /root/my-applications

All output looks good now, the UnInstall file is made & lists the installed files in it.
Install adds SFS file to TableBox list, makes UnInstall file, & copies files to /.
UnInstall removes SFS file from TableBox list, removes UnInstall file, & del. files.

To accomodate DennisF's worry about preexisting files being overwritten,
I had it append "_sfsBAK-0, _sfsBAK-1, etc." to preexisting files.
It goes up to _sfsBAK-3, so it'll backup the same file up to 4 times.
UnInstall renames the backup files to restore them in order.

The UnInstall is the least tested, I have no way to test if files are removed.
Everyone's said that the Install works good... So the UnInstall is the test focus.

Let me know how it goes & we'll knock this puppy out (pun intended)... Terry

User avatar
DiabloRojo
Posts: 27
Joined: Sun 11 Mar 2007, 10:47
Location: Madrid, Spain, Europe, Earth, Solar System

I have a doubt

#13 Post by DiabloRojo »

Hello sunburnt.

I have proven the lasts two versions of the program, I enclose two new screenshots to you so that you compare the results.

The version of the program, unloaded to the 2007-04-08, I settle perfectly but it is not possible to be seen the results, I install the file “devx_214.sfs
[u][url=http://www.forosuse.org]Foro de usuarios de (Forum of users of) OpenSUSE[/url][/u]
[url=http://es.opensuse.org][img]http://img83.imageshack.us/img83/8194/suse1userbarxc7.gif[/img][/url]
LO SIENTO NO CONTESTO A PRIVADOS SOBRE GNU/LINUX.

User avatar
veronicathecow
Posts: 559
Joined: Sat 21 Oct 2006, 09:41

#14 Post by veronicathecow »

Hi Sunburnt, many thanks for info and program it seems to have worked very nicely with a HDD install and the files in the directory you said. Cheers!

User avatar
DiabloRojo
Posts: 27
Joined: Sun 11 Mar 2007, 10:47
Location: Madrid, Spain, Europe, Earth, Solar System

Incomplete uninstall

#15 Post by DiabloRojo »

Bad news.

Watching the report of the installation, I verified that folders in the root directory "/" had created your program. This is the screenshot : (

Image

I decide to uninstall fltkc++_214.sfs, your program erase the files but not erase the folders and it's erase the report of the installation, I did not make a copy of the file fltkc++_214.files.

I'm not sure that folders I must erase.

Image


I'm not safe if the Expansion Pack fltkc++_215.sfs is correct or not that has everything in the root directory "/". This is a bug or not?.

You can modify the program so that it conserves the report of the installation.

A greeting.
Last edited by DiabloRojo on Thu 12 Apr 2007, 20:26, edited 1 time in total.
[u][url=http://www.forosuse.org]Foro de usuarios de (Forum of users of) OpenSUSE[/url][/u]
[url=http://es.opensuse.org][img]http://img83.imageshack.us/img83/8194/suse1userbarxc7.gif[/img][/url]
LO SIENTO NO CONTESTO A PRIVADOS SOBRE GNU/LINUX.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#16 Post by sunburnt »

Hi veronicathecow; Nice to hear from you & that my creation's installing well.
Have you tried UnInstalling anything yet? That's the real Q here...
Maybe pick a small app., install it, & then uninstall it for a test.

Duplicate file backup needs testing also, but that'll be proven with time.


Hi DiabloRojo; (Red Devil?) You installed “devx_214.sfs

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#17 Post by sunburnt »

DiabloRojo; I'm making the new version, but it'll test for duplicate dirs. that are
already there, so it won't remove the ones that were left from the uninstall.

I'll give you instructions on how to remove those dirs. when I post the new app.

Your amigo... Terry

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#18 Post by sunburnt »

DiabloRojo; I'm posting your instructions to delete the leftover dirs. now.

But I'm still waiting on info I hope to get to complete sfsInstaller.

Here's the code to fix your Puppy install:

Code: Select all

###### Run each one of these commands separately in Xterm or rxvt to remove leftover dirs.
###### HiLite & Paste (middle mouse button) is the easyist way to put these commands into Xterm.

### On the next line, enter between the 2 '' the path & filename of the SFS file.
sfsFILE=''

sfsMNT='/mnt/data'

mount -t squashfs -o loop $sfsFILE $sfsMNT

find $sfsMNT |sed "s#^$sfsMNT##" > /root/${sfsFILE}.inst

### If you want to, at this point you can look at the file: /root/${sfsFILE}.inst

DIRS=`cat /root/${sfsFILE}.inst`

echo "$DIRS" |while read LINE;do;rmdir $LINE;done

umount $sfsMNT

rm -f /root/${sfsFILE}.inst

I hope this fixes it, let me know how it goes... Terry

User avatar
DiabloRojo
Posts: 27
Joined: Sun 11 Mar 2007, 10:47
Location: Madrid, Spain, Europe, Earth, Solar System

#19 Post by DiabloRojo »

Hello Terry.
Hi DiabloRojo; (Red Devil?)
Yes.

Thanks for your solution, but my problem is solved.

Yesterday, I study your program, execute "mount -t squashfs -o loop /fltkc++_214.sfs /mnt/fltkc++_214" and used the Midnight Commander, command "mc", for erase the installed folders.


And I create new files of installation of pgs_214.sfs with the following instructions.

Code: Select all

mount -t squashfs -o loop /pgs_214.sfs /mnt/pgs_214
find /mnt/pgs_214 | sed "s#^/mnt/pgs_214##" > /root/my-applications/sfsInstaller_full-HD/install-files/pgs_214.files
umount /mnt/pgs_214
Also, I did with web_214.sfs and devx_214.sfs.


If your you publish a new version of your program, I will prove it.


Greetings of your friend Justo, it's is my name, amigo Terry.
[u][url=http://www.forosuse.org]Foro de usuarios de (Forum of users of) OpenSUSE[/url][/u]
[url=http://es.opensuse.org][img]http://img83.imageshack.us/img83/8194/suse1userbarxc7.gif[/img][/url]
LO SIENTO NO CONTESTO A PRIVADOS SOBRE GNU/LINUX.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#20 Post by sunburnt »

Cool Justo; Someone else who knows their way around a console & Bash scripts!

The new app. splits the ".files" file into ".dirs" & ".files".
When the ".dirs" file is made, preexisting dirs. are not included in it.
This should leave Puppy the same as before the install.

Terry B.

Post Reply