'sudo make install' for build dependencies in code form on debian/rules should work on launchpad buildbots

Bug #1093768 reported by i30817
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Undecided
Unassigned

Bug Description

Edit: for googlers trying to make this: the whole discussion was predicated on a false assumption (that there was no way to add a debian package dependency not on the official packages). In fact, there is: send your dependencies builds to the 'main' ppa of the recipe. So the way to success is using a debian packaging still)

For static dependencies of course.
Currently it fails by either 'no tty and no askpass program specified' or 'permission denied' if not using sudo. The workaround is changing the makefile to not use the system library but a relative path to it (without install) and copying the headers to a place the makefile finds or adding that too to the makefile.

Very ugly workaround, and gives not allowing the install additional advantage afaik, since the build env is temporary.

Revision history for this message
William Grant (wgrant) wrote :

Builds deliberately don't run as root, and you're not meant to use sudo. Debian packages need to be able to build in a self-contained environment without root access, so libraries need to be installed as a package build dependency, or as a last resort installed into a subdirectory of the build tree.

http://developer.ubuntu.com/packaging/html/ might be a helpful reference.

Changed in launchpad:
status: New → Invalid
Revision history for this message
i30817 (i30817) wrote :

Yes yes. I know. However THIS library is not on the ubuntu repositories, so specifying it in the debian/control file is useless.

Changed in launchpad:
status: Invalid → New
Revision history for this message
i30817 (i30817) wrote :

Also i can't see the harm. If you're going to run in a chroot, why shouldn't we be able to install libraries from repo form? After all isn't that what launchpad recipes are all about, leveraging the repositories?

Revision history for this message
i30817 (i30817) wrote :

And even if it WAS on the repositories, a person may legitimatily use a svn build library for a daily build.
Then they would have to patch a working makefile using the normal one when they could install it from source and leave everything else as it is.

Revision history for this message
todaioan (alan-ar06) wrote :

<email address hidden>

Changed in launchpad:
assignee: nobody → todaioan (alan-ar06)
status: New → Fix Committed
Revision history for this message
Micah Gersten (micahg) wrote :

Sorry, this is still wrong. Debian packages install into a temp directory, so sudo isn't needed. If it's required as part of the build, you're doing something wrong. If you need help, there's askubuntu.com, answers.launchpad.net/ubuntu, and #ubuntu-packaging on freenode IRC.

Changed in launchpad:
assignee: todaioan (alan-ar06) → nobody
status: Fix Committed → Invalid
Revision history for this message
i30817 (i30817) wrote :

And who says it's a debian package? I'm trying to install _from source_ so it can be used as a _compile time only static library_ for the actual program.

Changed in launchpad:
status: Invalid → New
Revision history for this message
i30817 (i30817) wrote :

If you don't want to accept the RFE, close 'won't fix'.

Revision history for this message
William Grant (wgrant) wrote :

It's not a valid bug or enhancement request, because Debian packages are forbidden from requiring to be built as root. The rules for Debian packages apply here because you're building a Debian package -- even if the library isn't packaged (which it probably should be), you're still building it as part of building a Debian package, so the unprivileged rule continues to apply.

In general, static linking is strongly discouraged, as is building two unrelated source trees in a single package build.

Changed in launchpad:
status: New → Invalid
Revision history for this message
i30817 (i30817) wrote :

Even if it WAS packaged, there is no way to specify a non-'official release' package on launchpad - which means there is no way expect building from source to make a daily build with daily build libraries.

Which means not supporting make install just makes patches to link the library or makefiles _more_ different than the official package, because the linking of the library has to be modified.

Revision history for this message
William Grant (wgrant) wrote :

What do you mean when you say "there is no way to specify a non-'official release' package"? You can package a snapshot of the library in your PPA, then have your other package build-depend on that to get the new version.

It's not that we don't support "make install". It's that Debian packages fundamentally cannot expect to be built as root (and in practice no successful packages expect to be able to, because no build system lets them). This is not going to change.

i30817 (i30817)
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.