Bug 76422 - devel/automake ports fail to install when built as non-root
Summary: devel/automake ports fail to install when built as non-root
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2005-01-18 17:50 UTC by John Baldwin
Modified: 2005-03-17 16:21 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description John Baldwin freebsd_committer freebsd_triage 2005-01-18 17:50:32 UTC
The pre-install and post-install targets are not run with elevated privileges, so the mkdir commands in the pre-install target fail when trying to install as non-root (in other words, su seems to only be applied for do-install)

Fix: Change the automake ports to use the pre-su-install and post-su-install targets rather than pre-install and post-install.  Example change for automake19:

        @${RM} -fr ${PREFIX}/share/automake${BUILD_VERSION}
        @${MKDIR} ${PREFIX}/share/automake${BUILD_VERSION}
        @${MKDIR} ${PREFIX}/share/aclocal${BUILD_VERSION}
        @${MKDIR} ${PREFIX}/libexec/automake${BUILD_VERSION}

 .for i in aclocal automake
        @${LN} -sf ${PREFIX}/bin/${i}${BUILD_VERSION} \

Note that all automake ports seem affected however.--gKdLU1rSCEgAhpodCom9rSQK7XWL8JwiGBjeByjEyTVqccKM
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: Makefile
RCS file: /usr/cvs/ports/devel/automake19/Makefile,v
retrieving revision 1.57
diff -u -r1.57 Makefile
--- Makefile    28 Dec 2004 06:43:00 -0000      1.57
+++ Makefile    18 Jan 2005 17:49:27 -0000
@@ -38,13 +38,13 @@
        @${REINPLACE_CMD} -e 's,%%X11BASE%%,${X11BASE},g' ${WRKSRC}/aclocal.in
How-To-Repeat: Run 'make install' for one of the devel/automake* ports
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-01-19 05:05:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ade

Over to maintainer.
Comment 2 Ade Lovett freebsd_committer 2005-03-07 17:47:28 UTC
Responsible Changed
From-To: ade->freebsd-ports-bugs

Return to the fold after releasing autotools back into the wild.
Comment 3 Greg Lewis freebsd_committer 2005-03-17 16:20:31 UTC
State Changed
From-To: open->closed

Committed, thanks! 

Note that we only need pre-su-install.  There is no post-su-install as 
once we've su'ed the privilege is retained for the rest of the install 
step (and do-install always causes this to happen at least at that point).