[Tfug] Following the Filesystem Hierarchy Standard in Debian
Glen Pfeiffer
glen at thepfeiffers.net
Wed Apr 16 00:22:30 MST 2008
On 04/14/2008 11:50 AM, Claude Rubinson wrote:
> On Mon, Apr 14, 2008 at 12:25:30AM -0700, Glen Pfeiffer wrote:
>> 2. Install deb packages from unofficial sources. What is the
>> best way to be sure that the packages put things where Debian
>> would expect them to? I assume that I will have to inspect the
>> package. Are there any automated tools for this?
>
[snip]
> If you're talking about adding individual debs, what I do is keep a
> local repo on my machine.
>
That's a great idea, and I think I will be implementing it soon.
What I was really trying to get at is that I don't trust other
sources the way I do the packages in Debian (though they have
been known to not follow the standards at times - but those are
reported as bugs!), Debian Multimedia, and backports. So before
installing a deb from another third party, I would like check to
see if they are following the standards of putting files in the
right place, etc.
>> 3. Install modules for Perl/Python/Ruby. I've read about the issues
>> with Ruby Gems and how it installs the gems in directories where
>> Debian does not want them. Would it be best to avoid their
>> package management systems, CPAN/Eggs/Gems, and manually install
>> so they won't intrude in directories that they should not?
>
> This is a source of ugliness and one that I don't have a good answer
> to. Basically, I install modules from Debian; if a given module isn't
> packaged for Debian, I just use the default package management system
> from the language. Generally this drops modules somewhere under
> /usr/local/ but sometimes /var/lib/ and sometimes I don't know. And
> what this means is that I don't really understand how the library
> systems of most of my programming languages actually works. But,
> then, again, since it works, I guess I don't really need to. But it's
> still kinda frustrating.
>
Yes, this is frustrating to me also. And I read on the Ruby list
that there is a move to drop setup.rb, which would have very
negative impacts on the Debian Ruby team in packaging Gems.
>> I know there is not necessarily a 'one true way' but is there a
>> best practice?
>
> Basically, Debian gives us two sandboxes: home directories and
> /usr/local. More recent versions of Debian also give you /opt, but
> that's used by a lot of larger, proprietary packages, so I avoid it.
> You can do whatever you want in /usr/local and Debian won't touch it.
> So, in your $PATH, just make sure to put /usr/local/bin first and
> everything will be gravy. Stay out of /usr.
>
> Essentially, I have a second filesystem hierarchy under /usr/local.
> If I've got an app in /usr/local, I put its rc file in /usr/local/etc.
> If its got a log file, it goes in /usr/local/var. Man pages are in
> /usr/local/man/. And so on.
>
> Hope this helps.
>
Very much so - thanks! I was not aware that /usr/local is
untouched by Debian. I noticed that Python has directories for
it's user installed modules under there. Not sure if they all end
up there, but based on what you said that sounds like the right
place. I wonder where Ruby Gems get installed. I'll have to dig
around a bit.
Thanks again to you, and everyone else for your help and
suggestions!
--
Glen
More information about the tfug
mailing list