Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7012213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:13:37+00:00 2026-05-27T22:13:37+00:00

Most packages using Autotools are user-level utilities or at least high-enough level to be

  • 0

Most packages using Autotools are user-level utilities or at least high-enough level to be completely under /usr, or low enough to be entirely below /usr.

I’m writing a package that would need to install some files into /bin, some into /sbin, /usr/bin and /usr/sbin. It’s replacing several existing binaries that are traditionally placed under those locations.

It also needs to install a PAM module in /lib/security (and obviously /usr/lib/security wouldn’t work).

Now the problem is: default configure’s prefix seems to be /usr/local. I can control that default in my configure.ac. And at least Gentoo Linux’s default is --prefix=/usr. That’s a problem because it overrides any defaults I put in my configure.ac.

I took a brief look at how other, similar packages are dealing with this issue. Here are my findings:

  • bash-4.1 seems to install into /usr/bin, and distro build scripts move the bash binary to /bin
  • Linux-PAM has hacks in configure.ac so that if prefix is /usr, it’s going to use /sbin and /lib for some of its files. It also sets the default prefix to /usr. I’m not sure what happens if the user passes a different --prefix.
  • shadow-utils set exec_prefix to "" if prefix is /usr. Then bin_PROGRAMS refers to /bin, and ubindir is declared to point to ${prefix}/bin so that ubin_PROGRAMS refers to /usr/bin.

My questions are:

  • What are other distros’ defaults for --prefix? Can I reasonably assume it’s always /usr? I’m only concerned about Linux at this point, not BSDs.
  • Which of the above solutions seems the cleanest? Do you see some better solutions?
  • What are potential problems with the above solutions? Are there some solutions to those problems?
  • I’m fine with installing everything into /bin and creating compatibility symlinks. Does it make the problem simpler?
  • Is there some other common build system that is acceptable for low-level system utilities that would better handle my requirements?

Feel free to ask for clarification of what I’m trying to do. Note that if I want to retain compatibility with what I’m replacing, if it used to ship binaries A and B, one in /sbin and one in /usr/bin, I think I just have to put replacements in those places or at least have symlinks. PAM modules also have a fixed install location.

I’m obviously going to upvote any useful answer. I an “accepted answer” I’m mostly looking for advice “what should I do”, what’s the cleanest solution to the problem and if applicable a discussion of options and drawbacks, pros and cons.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:13:38+00:00Added an answer on May 27, 2026 at 10:13 pm

    Essentially, the distinction between the / and the /usr hierarchies is not and should not lie in the hands of the packages’ upstream maintainer (read: Is not your responsibility). Since / should only contain files necessary for booting and making /usr available, it is an administrative decision what goes to /. For installations from source, this decision is made by the installer, and for distributions, by the package maintainer.

    For a rationale, suppose someone is trying to build a chroot environment. The distinction between /usr and / is meaningless in the environment, and will not be made. All prefixes are set to /foo/bar/chroot, and any configure script messing with $prefix is likely to induce strange behaviour. The same arguments goes for scripts like the Debian packaging helpers, which rely on the usual $prefix semantics to work.

    The cleanest solution is therefore the bash-4.1 solution. You have basically two clean options: Split your package into boot-critical and non-boot-critical parts, or let your configure script offer an alternative prefix for the boot-critical parts, which is set by default to /, leaving $prefix as /usr.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Instead of just using urllib does anyone know of the most efficient package for
So most Java resources when speaking of packages mention a com.yourcompany.project setup. However, I
Here's what should and does happen using rpy2.robjects.packages.importr for base R-packages (e.g. stats ):
When testing scipy using the nose package using scipy.test() , the test fails under
I have installed some python packages which I am able to access using IDLE
I just got through tracking down a random bug while using Twisted: Traceback (most
I've recently started using emacs and I'm enjoying using it for the most part.
Question: How do I move all of the most up-to-date R packages into one
Python throws this when using the wolfram alpha api: Traceback (most recent call last):
I am not able to wrap the most simple TCL application using TclDevKit5.2 .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.