Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec_prefix is set to / for prefix=/usr #1229

Open
zeha opened this issue Feb 24, 2025 · 2 comments · May be fixed by #1231
Open

exec_prefix is set to / for prefix=/usr #1229

zeha opened this issue Feb 24, 2025 · 2 comments · May be fixed by #1231

Comments

@zeha
Copy link
Contributor

zeha commented Feb 24, 2025

configure.ac contains these "hacks":

dnl Some hacks...
test "$prefix" = "NONE" && prefix="/usr"
test "$prefix" = "/usr" && exec_prefix=""

At least the last of the three lines should IMO go away. src/Makefile.am has these lines:

ubindir = ${prefix}/bin
usbindir = ${prefix}/sbin
...

# XXX why are login and su in /bin anyway (other than for
# historical reasons)?
#
# if the system is screwed so badly that it can't mount /usr,
# you can (hopefully) boot single user, and then you're root
# so you don't need these programs for recovery.
#
# also /lib/libshadow.so.x.xx (if any) could be moved to /usr/lib
# and installation would be much simpler (just two directories,
# $prefix/bin and $prefix/sbin, no install-data hacks...)

bin_PROGRAMS   = login
sbin_PROGRAMS  = nologin
ubin_PROGRAMS  = faillog chage chfn chsh expiry gpasswd newgrp passwd

...

I agree with the comment. IMO all of this (exec_)prefix trickery should go away.

@zeha
Copy link
Contributor Author

zeha commented Feb 24, 2025

I've initially mentioned this in #1224. Also I do not know enough autotools-fu to fix this.

@alejandro-colomar
Copy link
Collaborator

alejandro-colomar commented Feb 24, 2025

I've initially mentioned this in #1224.

Thanks!

Also I do not know enough autotools-fu to fix this.

I don't know autotools either, but I guess I can do something (having read many times the GNU coding standards about directory variables). I'll write the obvious fix, and will ask for review from distro people.

alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue Feb 24, 2025
…directory variables

Closes: <shadow-maint#1229>
Reported-by: Chris Hofstaedtler <[email protected]>
Cc: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue Feb 26, 2025
…directory variables

According to Sam, if we just remove the definitions, autotools will
provide the right values.

Note that this changes the default from /usr to /usr/local, which is the
right value according to the GNU conding standards (and also what the
BSDs prefer, according to one conversation I had with Ingo Schwarze from
OpenBSD).

Closes: <shadow-maint#1229>
Link: <https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Default-Prefix.html>
Reported-by: Chris Hofstaedtler <[email protected]>
Cc: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this issue Mar 3, 2025
…directory variables

According to Sam, if we just remove the definitions, autotools will
provide the right values.

Note that this changes the default from /usr to /usr/local, which is the
right value according to the GNU conding standards (and also what the
BSDs prefer, according to one conversation I had with Ingo Schwarze from
OpenBSD).

Closes: <shadow-maint#1229>
Link: <https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Default-Prefix.html>
Reported-by: Chris Hofstaedtler <[email protected]>
Cc: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants