Bug 48127 - unbreak build when running as non root
Summary: unbreak build when running as non root
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: All OpenBSD
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-31 11:13 UTC by Antoine Jacoutot
Modified: 2012-04-25 11:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
don't chown root when installing test files at build time (1.23 KB, patch)
2012-03-31 11:13 UTC, Antoine Jacoutot
Details | Splinter Review
use cp and mkdir -p (1.15 KB, patch)
2012-04-04 07:17 UTC, Antoine Jacoutot
Details | Splinter Review

Description Antoine Jacoutot 2012-03-31 11:13:37 UTC
Created attachment 59313 [details] [review]
don't chown root when installing test files at build time

Hi.

Trying to build dbus-1.4.20 as a regular user fails because INSTALL and INSTALL_DATA try to change ownerships to root:bin when copying tests to builddir.
Using mkinstalldirs and install_sh_DATA as a replacement allows a non privilege user to install these files properly.

Thoughts?
Comment 1 Simon McVittie 2012-04-04 05:10:14 UTC
(In reply to comment #0)
> Trying to build dbus-1.4.20 as a regular user fails because INSTALL and
> INSTALL_DATA try to change ownerships to root:bin when copying tests to
> builddir.

I hadn't spotted that you were on *BSD until your other bug report about BSD make. Presumably this is a difference in behaviour between GNU and BSD install(1): the one in GNU coreutils doesn't try-and-fail to change ownership if you're not root. (Have you considered making your install(1) more helpful?)

./install-sh (as provided in tarballs by automake) only changes ownership if you use -o, as far as I can see, so it would probably work too?

I suspect the right solution is to use AC_PROG_MKDIR_P (I think we already do) then $(MKDIR_P) instead of install -d, and use a simple cp instead of install, when copying things around within the source tree.
Comment 2 Antoine Jacoutot 2012-04-04 07:16:47 UTC
(In reply to comment #1)
> I suspect the right solution is to use AC_PROG_MKDIR_P (I think we already do)
> then $(MKDIR_P) instead of install -d, and use a simple cp instead of install,
> when copying things around within the source tree.

Sure. This should do the trick.
Comment 3 Antoine Jacoutot 2012-04-04 07:17:28 UTC
Created attachment 59478 [details] [review]
use cp and mkdir -p
Comment 4 Antoine Jacoutot 2012-04-25 06:42:00 UTC
Any news?
Comment 5 Simon McVittie 2012-04-25 11:37:23 UTC
(In reply to comment #4)
> Any news?

Sorry for the delay, patch applied for 1.4.22 and 1.5.14.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.