You are not logged in.
Pages: 1
Hi folks!
Question: In a recent app I made, it consists of two main scripts, one that creates a database and the other the main GUI, and a wrapper script that activates the app. The wrapper checks to see if the database already exists, and if it does it just runs the GUI, if not it runs the database-creator first then runs the GUI. The wrapper is in my $PATH in /usr/local/bin, the other two scripts are not in the $PATH but instead in the folder for the app that's in /usr/share/name-of-app. It works fine as the wrapper specifically calls the full path to the scripts.
But is this okay, or would it be better to store the two scripts elsewhere? It's a little thing I know, but I do want to try and stick with Devuan protocol as much as possible when making these things.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded April 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
In the GUI, during creation of the database, offer the option to the user to choose an arbitrary location or allow the default location (full paths for both) instead. When the database already exist, no need to offer this option.
Online
You could put the db in /var/lib/<package-name>. That's where other databases go. The stuff in /usr generally doesn't get changed except when installing or removing packages.
Is this the package info app? If so, the db should get updated if you installed or removed anything, shouldn't it?
Offline
^^^Yep, app-info app. Vuu-do App Info, but I use "vai" as the package name and for the scripts.
The database that's created (simple text file) gets created by the scraper script that's in the /usr/share/vai directory created when you install it, the GUI script is also in that directory. The database once created is stored in ~/.local/share/vai (scraped_apps.txt). I put it there just in case of a multi-user system, so each user could store their own pre-sets.
The app does not automatically update the database file as apps are installed, that would require re-running the scraper, but a user can just re-run it by running the scraper script (scrape12.sh), but in general, philosohy of use is that this is mainly useful to someone new to linux when they start using a system with a lot of new apps/names they haven't used before, after a time they'll get used to it and the app will no longer be necessary, and in the meantime if they install new apps in Synaptic they will have already seen the description.
Mainly my only question is: Is it okay putting those two executable scripts in /usr/share/vai? I know they work fine from there, but is there any general policy that discourages putting executable scripts in /usr/share for some reason?
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded April 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
The exceptions (read first, #1)
https://www.debian.org/doc/debian-polic … -hierarchy
Best practices (the rules)
https://www.debian.org/doc/packaging-ma … s-3.0.html
Offline
Thanks for that @fsmithred.
So in reading both, it would seem a couple of things:
1. It is basically okay now to put architecture-independent stuff in other places other than /usr/share, /usr/lib was specifically mentioned.
2. But as far as the contents of /usr/share are concerned, it is not okay to put architecture-specific files in there, only architecture-independent files.
So based on that it seems putting the compiled binary (vai12) in the /usr/share/vai folder is not okay, as it is compiled for amd64 only.
I guess I could put it in /usr/local/bin with the wrapper script and that would be okay. But given my need to try and organize/group things, now i'm wondering something else:
/usr/local/bin is in the $PATH so in /usr/local/bin , vai12 and the wrapper script (vai.sh) would work in there together. But does the $PATH expand to directories inside /usr/local/bin ? Like say I made a folder in that directory for vai and put the wrapper script and the binary gui script in there, would it still work to call the scripts generically i.e. EXEC=vai.sh, or would I have to use the full path to them i.e. EXEC=/usr/local/bin/vai/vai.sh ? Are sub-directories even allowed in /usr/local/bin ?
Sorry for all the questions, i'm just now learning how to package and I know it needs to be done in a specific manner, so I want to be precise.
Last edited by greenjeans (Yesterday 23:24:48)
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded April 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
Pages: 1