problems saving Debian packages between sessions
Topic: problems saving Debian packages between sessions
started by: robertakit
Posted by Guest on May 24 2007,22:34I am unable to have my Debian packages persist between sessions on my USB embedded install of DSL. I followed the directions in < http://www.damnsmalllinux.org/wiki....for_DSL > by copying the .deb package into /mnt/hdb/mydsl . The package is persistent, but it is not re-installed upon DSL start-up.
In fact, oddly, I get all sorts of tar errors when starting up, such as
What is the prescribed procedure for saving/restoring Debian packages between DSL sessions/start-ups?
Posted by ^thehatsrule^ on May 25 2007,00:53Are you sure you read it correctly?
Posted by Guest on May 25 2007,17:08I did read it right , but I didn't know about the unionfs issue.
If I do
how do I find the .unc package?
Posted by ^thehatsrule^ on May 25 2007,19:06I was referring to dsl-dpkg.unc vs dsl-dpkg.dsl, but either one would probably work anyways.
If you wish to keep the .deb's you can load them with dpkg -i like what's on that page -- so I don't think you read it correctly.
You can also convert the .deb's to an mydsl extension if that was what you were getting at (see wiki)
Posted by Guest on May 25 2007,20:09I see. I tried deb2dsl, but it seems to convert everything into one .dsl file.
Is there something more subtle? Perhaps a script that converts individual .deb packages to .dsl packages.
Posted by mikshaw on May 25 2007,21:10You could install one debian package and then run deb2dsl, although I'm only guessing...I've never done much with debian packages, and nothing with apt-get.
Another option is to extract the deb file you want and manually build a dsl or unc file from that.
Posted by Guest on May 25 2007,22:20
Actually, this is what I did. I hacked deb2dsl so it creates a separate .dsl for each .deb . And it works great. (I finally figured out that those .dsl files are just .tgz (or .tar.gz as is your preference).)
OK, one problem down, many, many more to go...
Posted by jpeters on May 31 2007,01:51
Yes, in fact you can rename it, and it loads either way. Maybe someone can say if there are any differences? The only thing I can think of, is that help files, etc., should be stripped out to be true dsl apps.
Posted by mikshaw on May 31 2007,03:47The filenames *.dsl and *.tar.gz work with mydsl-load, but I don't believe *.tgz is recognized by the script. I see it in the auto-load part of /etc/init.d/dsl-config, but it seems to be handled the same as a *.dsl.
There are differences in how they are loaded depending on the filename, regardless of the fact that the files themselves are identical.
First, *.dsl files cause the mkwritable script to run, but *.tar.gz files do not. This script opens up more of the system for writing, and increases memory and inode usage.
Second, *.tar.gz extensions do not write to the parts of the system that are intially read-only in DSL. If you were to rename all of your *.dsl files to *.tar.gz they will usually fail to load during boot.
Third, just to emphasis an important aspect of building extensions, the *.dsl and *.tar.gz packages are _not_ simply gzipped tarballs. They must not contain directories that already exist in DSL unless those directories have the same ownership and permissions of the originals. This may break your system, including possible security meltdown, broken applications, or complete system failure.
Posted by jpeters on June 01 2007,05:08
So as a rule it would be a good idea to change the extension on a compiled .tar.gz app? BTW, thanks for this info. I was never very clear on the purpose of "inodes" other than to create problems.
Posted by ^thehatsrule^ on June 01 2007,05:48Yea, I never liked the same extension used for .tar.gz.
"inodes" are unique ID's for each file on a device, which allows for hardlinks, but are limited depending on the configuration of the device itself.
Posted by mikshaw on June 01 2007,14:57Note: in this post, when I say "extension" I mean the 3-characters following a dot in the filename. When referring to MyDSL extensions, I'll say "mydsl package" or just "package".
Posted by jpeters on June 01 2007,16:01I was referring to the case where a compressed extension is built from source. I have several of these, which I load from the myDsl panel when needed. You stated that although identical, DSL increases memory and inode usage if .dsl extension is used instead of .tar.gz. Sorry if my post wasn't clear.
Posted by mikshaw on June 01 2007,16:42Keep in mind, though, that changing the filename extension from .dsl to .tar.gz is not going to help at all. If you haven't already loaded a *.dsl to run mkwritable, a *.dsl turned *.tar.gz will fail to load because it will try to write to parts of the system that are not yet writable. And if mkwritable has already run, you are not saving anything by renaming .dsl to .tar.gz. The package will still write to the same directories.
The *.tar.gz package must contain files that write only to /opt, /home, and /tmp, where *.dsl packages generally write to /usr
Posted by jpeters on June 01 2007,17:45
Wrong way....I was talking about a tar.gz file created from source:
< http://www.damnsmalllinux.org/wiki...._Source >
and changing ".tar.gz" to ".dsl". The ones I've built I direct to the /usr/local area. Both extensions work. I was thinking by your post that by changing to ".dsl" it would load differently so as to utilize inodes, etc., more efficiently. Probably not. Sorry if I'm not being clear; I'm doing a bunch of very heady work right now..
Posted by mikshaw on June 01 2007,21:30Ok, I see what you're saying now. But it won't make any difference except to possibly use up more resources to rename .tar.gz to .dsl.
If you don't need to run mkwritable to install what you need, you're probably better off using .tar.gz (or .uci, which at runtime is the same type of application as .tar.gz)
Posted by jpeters on June 02 2007,03:45No problem writing to /usr/local, but /opt is a read_only system. I haven't experimented with the mkwritable script.
Note: I just read: "*.tar.gz extensions extract into ramdisk, which means the entire application is installed in ram (unless you are using a persistent /opt directory). However, these applications are installed in the /opt directory as self-contained programs, which means they do not write to potentially hazardous locations such as /usr or /sbin."
EDIT: I thought that loading the .tar.gz app created a folder in /opt, but it doesn't (it created one from something else I tried). I have my .tar.gz app installing files and subdirectories into /usr/local/share, not ram or the /opt directory. It appears to act exactly like a .dsl extension.
Posted by jpeters on June 02 2007,16:44
I finally found that script, which is "mkwriteable" not "mkwritable,"
located in /etc/init.d/
Running /etc/init.d/mkwriteable loads /usr, /bin/, /lib, /sbin into the ramdisk allowing you to write to these directories. Loading a .dsl extension runs the script automatically.
Posted by mikshaw on June 03 2007,00:44ah...sorry. There comes a problem when you're trying to find a file whose name contains a typo =o)
(writeable is not an english word)
Posted by jpeters on June 03 2007,03:15
Only for goons like myself figuring this out for the first time.