Bug 700894 - yum-builddep does not include compiler when geting build dependencies for coreutils, wget, cutecw, bash,...
yum-builddep does not include compiler when geting build dependencies for cor...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-29 14:37 EDT by Jirka Daněk
Modified: 2014-01-21 18:18 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-29 16:16:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jirka Daněk 2011-04-29 14:37:06 EDT
Description of problem:
Using yum-builddep on a clean install of Fedora 15 Beta installed libraries, but not GCC compler that was needed for acutually performing the build

Version-Release number of selected component (if applicable):
yum-builddep - 1.0 (yum - 3.2.29)

How reproducible:
Install Fedora 15 Beta, run i.e. yum-builddep wget

Actual results:
Many library rpms get installed

Expected results:
Libraries and GCC gets installed, so when I run make, it gets built.

Additional info:
[jirka@private CuteCW]$ make
g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtMultimedia -I/usr/include -I. -I. -o main.o main.cpp
make: g++: Command not found
make: *** [main.o] Error 127

[root@private jirka]# yum-builddep cutecw
Loaded plugins: langpacks, presto, refresh-packagekit
Enabling fedora-source repository
Enabling rpmfusion-free-source repository
Enabling rpmfusion-free-rawhide-source repository
Enabling rpmfusion-nonfree-source repository
Enabling rpmfusion-nonfree-rawhide-source repository
Enabling updates-source repository
Enabling updates-testing-source repository
Getting requirements for cutecw-1.0-1.fc15.src
 --> Already installed : desktop-file-utils-0.18-3.fc15.x86_64
 --> Already installed : 1:qt-devel-4.7.2-8.fc15.x86_64
No uninstalled build requires
Comment 1 James Antill 2011-04-29 16:16:57 EDT
It doesn't bring them in because they aren't requirements, and they aren't requirements due to:

http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2

...which are assumed installed (via. groupinstall buildsys-build). Now you could argue that yum-builddep should do that too, but I bet we'd get more complaints if we changed it (due to the fact it'd need to download the groups data).
Comment 2 Jirka Daněk 2011-04-30 10:28:50 EDT
I see. Does rpm (or Fedora) use metapackages? Metapackage build-minimal or so could be created...

Also, I guess the list in Packaging Guidelines is pretty stable, so the minimal build environment packages could be hard-coded into the yum-builddep. That fact could be mentioned in Packaging Guidelines, so any further change there would be transfered to yum-builddep too.

Or yum-builddep should stop boast about its nonexisting ability to "Download and install all the RPMs needed to build the kernel RPM with yum-builddep kernel". That is quotation from its manual page.

So, I guess metapackages aren't the Fedora way, therefore I suggest ammending the first paragraph in man yum-builddep or creating new section Notes with something like this:

There are some packages, so called minimal build environment, that are assumed installed by yum-builddep. In case you are unable to perform the build after running yum-builddep, install these with groupinstall buildsys-build. The list can be also found at http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2

The first sentence could be changed from "yum-builddep  is  a program which installs the RPMs needed to build the specified package." to "yum-builddep  is  a program which installs the RPMs listed as build requirements of the specified package."

The descripion of the example should be changed to 

Download and install all build dependencies of kernel RPM:

or maybe

Download and install all the RPMs needed to build the kernel RPM (except the minimal build environment):
Comment 3 Panu Matilainen 2011-05-02 03:29:09 EDT
(In reply to comment #1)
> It doesn't bring them in because they aren't requirements, and they aren't
> requirements due to:
> 
> http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions_2
> 
> ...which are assumed installed (via. groupinstall buildsys-build). Now you
> could argue that yum-builddep should do that too, but I bet we'd get more
> complaints if we changed it (due to the fact it'd need to download the groups
> data).

One option could be adding a cli-switch to also install the implicit build-requires. Might be at least a little bit more discoverable than the hidden (IIRC) buildsys-build group.
Comment 4 James Antill 2011-05-02 12:21:09 EDT
Jirka: I think changing the description will be worthless, I doubt you would have seen the difference before you opened this bug ... and I doubt anyone else will either.

Panu: I'd thought of something like this. But having the option be default off won't improve anything (people won't look for it), having it default on will ... but then there's a whole bunch of problems about when you do upgrades, what you do if groupinstall buildsys-build fails etc. ... and at the end of it you just end up with mock anyway, which we already have.

In many ways I think this would be one of the few cases where a metapackage would be better than a group, all the fedora packages could just BuildDep on it and everything would magically work.
Comment 5 Panu Matilainen 2011-05-03 01:58:27 EDT
As much as a dislike metapackages... no disagreement there. FWIW, Debian has had such a metapackage ('build-essential') for ages and dpkg knows about it as well. As long as the implicit build-dependencies are in comps, there's no way to integrate it with rpm.
Comment 6 Jirka Daněk 2011-05-03 12:06:28 EDT
(In reply to comment #4)
> Jirka: I think changing the description will be worthless, I doubt you would
> have seen the difference before you opened this bug ... and I doubt anyone else
> will either.

Believe me, I would have. I am rather new to fedora and I stil rely on manpages a lot. So if it was phrased in a clear easilly understandable way, I definitely would have found it and acted according to it. For example if the text was something like you wrote in your first comment here and "build-essentials" packages were explicitely listed in the man page, as they are in the packaging how to, it would be very hard to miss...

I have one more suggestion how to solve this. yum-builddep could be made dependent on all the packages listed in the how-to. It sort of makes sense, because it will not work properly in all situations if all of those packages are not installed. Some über admins could argue that this will bring to their systems some not desired packages they do not really need, but I think that people like that do not need yum-builddep to figure out which build packages need to be installed, so it could be accepted without much complaining.

You haven't commented on one of my original ideas - hard coding the current listo of minimal build packages into yum-builddep. Then it could do something like
build-minimal=[gcc, ...];
for each package in build-minimal; do
if is_installed(package); then
continue;
else
packages_to_install.add(package);
fi
done

What about reopening this, not as a bug, but as a feature request?

Note You need to log in before you can comment on or make changes to this bug.