Saturday, November 25, 2017

packaging - Is there a debian/ubuntu policy on softlinking things to another location in opt once they're installed?



Is there a debian/ubuntu policy on softlinking things to another location in opt once they're installed properly in usr/share or usr/lib?



Here's a simple example:

Packaging up dnsenum. It's a REALLY simple package (4 files).
A perl script, two wordlists, and a readme.



So from what I gather:
The wordlists should go in usr/share/dnsenum/*
The perl script itself would go in usr/lib/dnsenum/
The readme would go in usr/share/doc/dnsenum/



Add a wrapper bash script that goes in bin and just passes arguments to dnsenum.pl.



The question is this:



If there are various tools that provide wordlists or some other shared resource, is there a policy on linking all the wordlists from different packages in to /opt/wordlists/ ?




It seems like the "right" thing to do respecting the directory structure while still making things convenient.



Ubuntu follows the FHS. Ubuntu packages install everything into /usr/. Runtime data can live in /var/lib/PACKAGENAME, and some critical early-boot things that live outside /usr, in /bin, /lib, etc.



So, your wordlists would go into /usr/share/dnsenum, yes. The script would probably just go into /usr/bin, and the documentation would go into /usr/share/doc/dnsenum.



Ubuntu doesn't put anything in /opt. However, third party applications distributed through the software centre have everything in /opt, to keep them separated from the rest of the system. These are not part of the distribution.



There's nothing special about data that's shared between packages, assuming it's still owned by a single package, depended on, by the others.




An example for word lists is /usr/share/dict/words, provided by dictionaries-common.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...