Simple SFS Builder - now Version 0.3

Moderator: Forum moderators

Post Reply
Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Simple SFS Builder - now Version 0.3

Post by Tippe »

Hi.

For the last few days I tried to build a Music Workstation using the FossaPup 64bit CE 4 as base system.
After I got it working to feel familiar with it, I started to download several programs via legacy package manager.
I ended up downloading 706 .deb files. I feared installing them in mono task for hours and hours.

So, I created myself a little application to create a .sfs file from 706 .deb files collected in a single directory.
It's attached below.

Just put all .deb or .pet (don't mix it) files into a directory and start Ecmsfdf SFS Builder from Utilities menu.
The GUI is self-explanatory.

After the SFS has been created, the contents of the directory of the package files is sorted into four directories.
These directories are:

00-Collect - which contains all the extracted contents from the packages to build the SFS from
00-ExtractedDirs - which contains each extracted content of each package
00-Packages - which contains the original packages used
00-InstallScripts - which contains the install scripts etc. from extracted packages. (Version 0.3)

The SFS to build will be available right where the directory of the packages is located.

Dependencies: uextract, mksquashfs

Updates:

2024 April 28, Version 0.3
Added function to remove %U, %F etc.pp. from the "Exec=" Line of all .desktop files in /usr/share/applications.
This will be done to all the "Exec=" Lines inside of all .desktop files!

Install scripts from packages are now collected also in directory: 00-InstallScripts.
I think they are not necessary for Puppy, but only the experts would know for sure.

ECMSFDF-SFS-Builder-0.3.pet
(7.35 KiB) Downloaded 52 times
Last edited by Tippe on Thu Apr 25, 2024 11:57 pm, edited 1 time in total.

Bionic Puppy 64bit.
Won't use another one.

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: Simple SFS Builder

Post by Jasper »

@Tippe

This works well :thumbup:

I would recommend that users have 7z included in their UExtract 'resources' directory.

7z handles most compression formats.

Tested on Fossapup64-95

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Simple SFS Builder

Post by jp734 »

Got an error on the SFS I created using the script. See my post: viewtopic.php?t=11334

Thanks

The Art of Magic and The Magic of Art

User avatar
mikeslr
Posts: 2965
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 922 times

Re: Simple SFS Builder

Post by mikeslr »

@Tippe, see my post here, https://www.forum.puppylinux.com/viewto ... 97#p117797.

Editing the text in desktop files intended for major distros isn't something to reasonably expect in an application intended for Puppys. But Puppys do have an issue which may be addressed programmatically. Some newer Puppys and newer 'mainstream' applications follow the User-Merge Rule, while older Puppys and older applications don't. The 'Rule' is exclusionary: only an OS's Devs can locate files in the Top-Level /bin, /lib, /sbin etc. folders. We (Puppy) are not the OS's Devs when using packages created for Major Distros. So we have to locate them in /usr and its sub-folders.* [AFAIK, older Puppys don't care and will find required bins and libs under /usr and even /usr/local.]

I would have thought that writing code which --if it found files in the the Top level folders moved them to folders under /usr-- would be relatively easy. But I see posts indicated that a 'converter' script didn't always work.

You might want to look into this issue.

-=-=-=-=-=-
* Puppy is unique in having 'on the path' /root/bin and /root/lib. I have had some success moving files out of the top-level into those. But not always. Don't know why. Programming is not my forte.

Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Re: Simple SFS Builder

Post by Tippe »

jp734 wrote: Wed Apr 24, 2024 9:47 am

Got an error on the SFS I created using the script. See my post: viewtopic.php?t=11334

Thanks

Can you post/attach the .desktop file of LibreOffice here?
Then I will have a look at it and provide an update when solved.

Thanks.

Bionic Puppy 64bit.
Won't use another one.

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Simple SFS Builder

Post by jp734 »

Here's the .desktop file for scalc. You will find two entry for "Exec=" line. The 6th line of [Desktop Entry] that has the "%U" and one at the very bottom that doesn't. Thanks and GREAT JOB on the script by the way. You made it easy to create SFS for first timers like myself. :thumbup2:

#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice24.2-calc
Type=Application
Categories=Office;Spreadsheet;X-Red-Hat-Base;
Exec=libreoffice24.2 --calc %U
MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-excel.sheet.binary.macroEnabled.12;text/csv;application/x-dbf;text/spreadsheet;application/csv;application/excel;application/tab-separated-values;application/vnd.lotus-1-2-3;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template;application/x-dbase;application/x-dos_ms_excel;application/x-excel;application/x-msexcel;application/x-ms-excel;application/x-quattropro;application/x-123;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/vnd.ms-works;application/clarisworks;application/x-iwork-numbers-sffnumbers;application/vnd.apple.numbers;application/x-starcalc;
Name=LibreOffice 24.2 Calc
GenericName=Spreadsheet
.
.
.
GenericName[zh_TW]=試算表
GenericName[zu]=Ikhasi lokubala
Comment=Perform calculations, analyze information and manage lists in spreadsheets.
.
.
.
Comment[zh_TW]=在試算表中執行計算、分析資訊與管理清單。
Comment[zu]=Perform calculations, analyze information and manage lists in spreadsheets.
StartupNotify=true
X-GIO-NoFuse=true
Keywords=Accounting;Stats;OpenDocument Spreadsheet;Chart;Microsoft Excel;Microsoft Works;OpenOffice Calc;ods;xls;xlsx;
InitialPreference=5
StartupWMClass=libreoffice-calc
X-KDE-Protocols=file,http,webdav,webdavs

Actions=NewDocument;
[Desktop Action NewDocument]
Name=New Spreadsheet
Name[af]=Nuwe sigblad
.
.
.
Name[zh_TW]=新增試算表
Name[zu]=New Spreadsheet
Icon=document-new
Exec=libreoffice24.2 --calc

The Art of Magic and The Magic of Art

Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Re: Simple SFS Builder

Post by Tippe »

@jp734

This is somehow irritating.

Are the DOTS included in the original file?
Could you please attach the original .desktop file?
Rename it - to do so, just put a fake .gz after the .desktop of its name to attach it.

Thanks.

Bionic Puppy 64bit.
Won't use another one.

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Simple SFS Builder

Post by jp734 »

Sorry about that. It was too long and I just deleted a bunch of "GenericName", "Comment" and "Name" lines for different languages. Copy of the file attached as requested.

Attachments
calc.desktop.fake.gz
(22.35 KiB) Downloaded 24 times

The Art of Magic and The Magic of Art

Tippe
Posts: 137
Joined: Wed Feb 15, 2023 11:55 pm
Has thanked: 8 times
Been thanked: 21 times

Re: Simple SFS Builder - now Version 0.3

Post by Tippe »

Hi.

Version 0.3 is in first post.

Tested and seems to work fine.

Note:

I'm not a coder. Mainly I'm reading scripts, checking what they do and stealing some lines to achieve my goals.

Bionic Puppy 64bit.
Won't use another one.

User avatar
RSH
Posts: 113
Joined: Tue May 28, 2024 7:33 pm
Location: Kassel
Has thanked: 53 times
Been thanked: 36 times
Contact:

Re: Simple SFS Builder - now Version 0.3

Post by RSH »

Hi.

I used this a few times to create .sfs from .deb files. Worked fine so far.
Yesterday I was in the need to use this to create .sfs from .pet files.
This doesn't seem to work!

The extraction of .pet files compared to .deb files using UExtract is different.
The .pet files are extracted into a sub-directory of the extraction directory.
So, the created .sfs is not usable because it contains these sub-directories instead of
directories of the filesystem like /usr, /root etc.pp.

Is this still maintained?

My OS: ArtStudio64 - a Woof-CE built from Bionic 18.04
Running in RAM only, no save file, no save folder
www.youtube.com/@RainerSteffenHain

Post Reply

Return to “Utilities”