Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 502384 - www-servers/apache: apxs should be in /usr/bin, not /usr/sbin
Summary: www-servers/apache: apxs should be in /usr/bin, not /usr/sbin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-25 08:21 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2023-12-31 17:38 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
apxs_usage_in_tree.txt (apxs_usage_in_tree.txt,2.89 KB, text/plain)
2014-02-25 08:52 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
0001-depend.apache.eclass-use-usr-bin-apxs-not-sbin-as-ap.patch (0001-depend.apache.eclass-use-usr-bin-apxs-not-sbin-as-ap.patch,1.23 KB, patch)
2015-11-24 17:45 UTC, Michael Orlitzky
Details | Diff
remove USE=split-usr and the symlink hack (apache-splitusr-drop.patch,111.54 KB, patch)
2023-12-31 06:13 UTC, Eli Schwartz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirkjan Ochtman (RETIRED) gentoo-dev 2014-02-25 08:21:12 UTC
We install apxs in /usr/bin, but I don't think that makes sense. After all, it's just a tool to help compile stuff, right? We don't put gcc or libtool in /usr/sbin, either.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-02-25 08:52:31 UTC
Created attachment 371206 [details]
apxs_usage_in_tree.txt

This is a short list of packages/eclasses which needs this to be fixed as well. 

To be honest, I don't think this small change justifies the effort...
Comment 2 Ulrich Müller gentoo-dev 2014-02-25 11:07:52 UTC
(In reply to Dirkjan Ochtman from comment #0)
> We install apxs in /usr/bin, [...]

s/bin/sbin/ ? Otherwise this makes no sense.

If it's a build tool, then one would typically invoke it as non-root user. Which means that it should indeed be installed in /usr/bin.
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-02-25 12:06:34 UTC
(In reply to Ulrich Müller from comment #2)
> s/bin/sbin/ ? Otherwise this makes no sense.

Err, yes, sorry.
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-02-25 12:08:03 UTC
For context, some IRC remarks from Lars:

11:01 <@Poly-C_atwork> djc: the problem is, we either fix everything at once or we have to make sure all ebuilds look for both 
                       places while being in the transition period...
11:01 <@Poly-C_atwork> Dunno if we can touch everything at once.
11:01 <@Poly-C_atwork> And there's still the question if this is worth the effort...

I think we can mitigate this somewhat if those ebuilds can rely on the APXS variable set in apache-module.eclass, then simply revbump them all closely together?
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-24 10:10:12 UTC
FTR, I don't wanna abandon this request. I just haven't figured out yet how to fix this properly without any breakage in our tree.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-25 20:08:00 UTC
Okay, here is the deal:

The next apache-2.{2,4} ebuilds will install apxs into /usr/bin with a symlink in /usr/sbin pointing to /usr/bin/apxs. Then I can easily fix all ebuilds/eclasses in out tree. Once all the fixes are done, I gonna drop the symlink from newer apache ebuilds.

What do you think?
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-04-26 06:14:08 UTC
Sounds great, thank you!
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-05-22 14:03:41 UTC
+*apache-2.4.9-r3 (22 May 2014)
+*apache-2.2.27-r3 (22 May 2014)
+
+  22 May 2014; Lars Wendler <polynomial-c@gentoo.org> -apache-2.2.27-r2.ebuild,
+  +apache-2.2.27-r3.ebuild, -apache-2.4.9-r2.ebuild, +apache-2.4.9-r3.ebuild:
+  Revbumps. Cleaned up ebuilds a bit. Moved apxs to /usr/bin (bug #502384).
+  Fixed bugs #489236, #493020, #493360, #503986 and #509772.
+
Comment 9 Michael Orlitzky gentoo-dev 2015-11-24 17:45:38 UTC
Created attachment 417760 [details, diff]
0001-depend.apache.eclass-use-usr-bin-apxs-not-sbin-as-ap.patch

We're already inheriting depend.apache in the PHP ebuilds, so once that eclass is fixed, I'll get the path from the eclass instead of duplicating it in the ebuild.

I've tested this with PHP, but nowhere else.
Comment 10 Pacho Ramos gentoo-dev 2018-03-20 13:55:55 UTC
I see eclass is already using /usr/bin/apxs instead of sbin
Comment 11 Eli Schwartz 2023-12-31 03:40:28 UTC
Can't imagine how this is "fixed" if the USE flag and workaround is still there...
Comment 12 Michael Orlitzky gentoo-dev 2023-12-31 04:50:59 UTC
(In reply to Eli Schwartz from comment #11)
> Can't imagine how this is "fixed" if the USE flag and workaround is still
> there...

What USE flag?

The symlink is still being created by the apache ebuilds, but I'm pretty sure nothing is using it any more.
Comment 13 Eli Schwartz 2023-12-31 06:13:11 UTC
Created attachment 881064 [details, diff]
remove USE=split-usr and the symlink hack

Needing to use split-usr for this is a bit terrible IMO -- Sam and I were discussing it tonight. It seems the sole reason Apache has this USE flag is to accommodate the symlink.

If we can drop the symlink, we don't need split-usr anymore.

As for it being used, I grepped the tree and it appears that yes, everything either uses ${APXS} or else hardcodes ${EPREFIX}/usr/bin/apxs, so we should be good.
Comment 14 Larry the Git Cow gentoo-dev 2023-12-31 17:37:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90f738b661e9e6cf903cd2a65418a6e00482c19f

commit 90f738b661e9e6cf903cd2a65418a6e00482c19f
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2023-12-31 03:40:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-31 17:36:16 +0000

    www-servers/apache: clean up ancient outdated split-usr hack
    
    For nearly a decade, USE=split-usr has been declared in apache-2.eclass
    and provides a hack intended as a short-term migration for moving a
    binary from /usr/sbin to /usr/bin.
    
    No remaining cases of /usr/sbin/apxs exist in tree, so drop the symlink
    and the USE flag and revbump.
    
    Closes: https://bugs.gentoo.org/502384
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../apache/{apache-2.4.57-r5.ebuild => apache-2.4.57-r6.ebuild}    | 7 -------
 .../apache/{apache-2.4.58-r1.ebuild => apache-2.4.58-r2.ebuild}    | 7 -------
 2 files changed, 14 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d696d0acb609eb856c3052c8f9f3aea848d2d6d1

commit d696d0acb609eb856c3052c8f9f3aea848d2d6d1
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2023-12-31 03:56:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-31 17:36:16 +0000

    www-servers/apache: apache-2.eclass: inline USE=split-usr
    
    It is undesirable and should be removed, which requires inlining into
    each ebuild and then removing it in a revbump.
    
    Bug: https://bugs.gentoo.org/502384
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/apache-2.eclass                     | 2 +-
 www-servers/apache/apache-2.4.57-r5.ebuild | 3 +++
 www-servers/apache/apache-2.4.57.ebuild    | 3 +++
 www-servers/apache/apache-2.4.58-r1.ebuild | 3 +++
 www-servers/apache/apache-2.4.58.ebuild    | 3 +++
 5 files changed, 13 insertions(+), 1 deletion(-)