Bug 1195005 - Drop the gcc dependency
Summary: Drop the gcc dependency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abrt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: abrt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1381242 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-21 22:20 UTC by Vít Ondruch
Modified: 2016-10-03 13:58 UTC (History)
24 users (show)

Fixed In Version: gdb-7.8.90.20150214-9.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-20 17:06:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vít Ondruch 2015-02-21 22:20:05 UTC
Description of problem:
Please drop the gcc dependency (i.e. revert the http://pkgs.fedoraproject.org/cgit/gdb.git/commit/?id=b6bc0d53767a9750b5291f6d3080c43da5a10a01). So far, I was always happily using my computer without gcc, I hope it will stay like that.

Please note that gdb is required by ABRT, which probably makes some sense, hence I have to have gdb on my system.

Version-Release number of selected component (if applicable):
gdb-7.8.90.20150214-7.fc23

Comment 1 Jan Kratochvil 2015-02-22 18:08:39 UTC
That was in fact a bug, thanks for catching it.  It is "Recommends:" now.

Comment 2 Peter Robinson 2016-09-07 17:14:26 UTC
This problem has come up again:

$ dnf upgrade 
Last metadata expiration check: 0:04:06 ago on Wed Sep  7 18:06:06 2016.
Dependencies resolved.
===========================================================================
 Package         Arch     Version                   Repository        Size
===========================================================================
Installing:
 cpp            armv7hl  6.2.1-1.fc25             updates-testing  7.1 M
 gcc            armv7hl  6.2.1-1.fc25             updates-testing   15 M
 gcc-gdb-plugin armv7hl  6.2.1-1.fc25             updates-testing   73 k
 glibc-devel    armv7hl  2.24-3.fc25              fedora           936 k
 glibc-headers  armv7hl  2.24-3.fc25              fedora           482 k
 isl            armv7hl  0.14-5.fc24              fedora           382 k
 kernel-headers armv7hl  4.8.0-0.rc4.git0.1.fc25  fedora           1.0 M
 libasan        armv7hl  6.2.1-1.fc25             updates-testing  307 k
 libatomic      armv7hl  6.2.1-1.fc25             updates-testing   32 k
 libmpc         armv7hl  1.0.2-5.fc24             fedora            47 k
 libubsan       armv7hl  6.2.1-1.fc25             updates-testing  122 k
Upgrading:
 gdb            armv7hl  7.12-0.11.20160904.fc25  updates-testing  2.8 M

Transaction Summary
===========================================================================
Install  11 Packages
Upgrade   1 Package

Total download size: 29 M
Is this ok [y/N]:

Comment 3 Jan Kratochvil 2016-09-07 18:18:49 UTC
GDB still has:
Recommends: gcc-gdb-plugin%{?_isa}

Comment 4 Igor Gnatenko 2016-09-07 21:46:09 UTC
you can use --setopt=install_weak_deps=0 or set it in dnf.conf to not install weak deps.

Comment 5 Peter Robinson 2016-09-08 10:53:55 UTC
(In reply to Igor Gnatenko from comment #4)
> you can use --setopt=install_weak_deps=0 or set it in dnf.conf to not
> install weak deps.

oh great, so we now default to installing vast amounts of extra crap, I look forward to the security implications of that.....

Comment 6 Igor Gnatenko 2016-09-08 11:53:46 UTC
(In reply to Peter Robinson from comment #5)
> (In reply to Igor Gnatenko from comment #4)
> > you can use --setopt=install_weak_deps=0 or set it in dnf.conf to not
> > install weak deps.
> 
> oh great, so we now default to installing vast amounts of extra crap, I look
> forward to the security implications of that.....
It's like this for long time.

I don't know what you're referring to about security implications.

Actually this is something how langpacks are working. Unfortunately we have to keep yum-compatibility. Personally I would prefer to remove this option.

Comment 7 Peter Robinson 2016-09-08 11:55:29 UTC
> I don't know what you're referring to about security implications.

It randonly, by default, potentially pulling in vast amounts of random extra crap by default (not just the example above) has security implications....

Comment 8 Igor Gnatenko 2016-09-08 12:07:57 UTC
(In reply to Peter Robinson from comment #7)
> > I don't know what you're referring to about security implications.
> 
> It randonly, by default, potentially pulling in vast amounts of random extra
> crap by default (not just the example above) has security implications....

There is Suggests tag which in future should be used for such purposes (like examples, etc.). But it should be used only when DNF will get support for choosing packages which to install based on Suggests tag.

Comment 9 Peter Robinson 2016-09-08 12:10:54 UTC
> Actually this is something how langpacks are working. Unfortunately we have
> to keep yum-compatibility. Personally I would prefer to remove this option.

This isn't "yum compatible" as yum has explicit deterministic deps and it wouldn't have pulled that stuff in. This will basically pull in entire compiler stacks for devices/use cases where it was never required/needed. This is still a regression IMO.

Comment 10 Peter Robinson 2016-09-08 12:12:29 UTC
> There is Suggests tag which in future should be used for such purposes (like
> examples, etc.). But it should be used only when DNF will get support for
> choosing packages which to install based on Suggests tag.

Is that the same future where we'll have proper verbose debug? If it's the future it should be enabled when that feature lands, not closed a not a bug so it can be swept under the carpet and lost.

Comment 11 Igor Gnatenko 2016-09-08 12:14:11 UTC
(In reply to Peter Robinson from comment #9)
> > Actually this is something how langpacks are working. Unfortunately we have
> > to keep yum-compatibility. Personally I would prefer to remove this option.
> 
> This isn't "yum compatible" as yum has explicit deterministic deps and it
> wouldn't have pulled that stuff in. This will basically pull in entire
> compiler stacks for devices/use cases where it was never required/needed.
> This is still a regression IMO.
Right. It just doesn't support weak deps. Not having feature is better, yes ;)

Comment 12 Igor Gnatenko 2016-09-08 12:15:18 UTC
(In reply to Peter Robinson from comment #10)
> > There is Suggests tag which in future should be used for such purposes (like
> > examples, etc.). But it should be used only when DNF will get support for
> > choosing packages which to install based on Suggests tag.
> 
> Is that the same future where we'll have proper verbose debug? If it's the
> future it should be enabled when that feature lands, not closed a not a bug
> so it can be swept under the carpet and lost.
This is future feature.

If you are referring to showing reason why particular package has been pulled in, then it's already implemented and on review.

Comment 13 Igor Gnatenko 2016-09-08 12:16:09 UTC
(In reply to Igor Gnatenko from comment #12)
> (In reply to Peter Robinson from comment #10)
> > > There is Suggests tag which in future should be used for such purposes (like
> > > examples, etc.). But it should be used only when DNF will get support for
> > > choosing packages which to install based on Suggests tag.
> > 
> > Is that the same future where we'll have proper verbose debug? If it's the
> > future it should be enabled when that feature lands, not closed a not a bug
> > so it can be swept under the carpet and lost.
> This is future feature.
> 
> If you are referring to showing reason why particular package has been
> pulled in, then it's already implemented and on review.
Feel free to submit separate request for implementing this.

Comment 14 Peter Robinson 2016-09-08 12:19:24 UTC
> > If you are referring to showing reason why particular package has been
> > pulled in, then it's already implemented and on review.
> Feel free to submit separate request for implementing this.

I don't even understand what you mean by this last statement. Please explain?

Comment 15 Jan Kratochvil 2016-09-08 12:32:55 UTC
(In reply to Peter Robinson from comment #7)
> It randonly, by default, potentially pulling in vast amounts of random extra
> crap by default (not just the example above)

Compiler is not "extra crap" for a debugger, GCC is required for GDB, this was already discussed in Bug 1306591, see that Bug 1306591 Comment 8.

For example lldb.rpm does Requires (not Recommends) libclang8.so()(64bit).  GDB has Recommends as it can fall back on its internal barely working expression evaluator.  Plus in some cases debuggers have use cases without any expression evaluation.

I do not understand why Comment 13 has reassigned it back to GDB but in such case it is a duplicate now.

*** This bug has been marked as a duplicate of bug 1306591 ***

Comment 16 Dennis Gilmore 2016-09-08 12:40:36 UTC
It is a really bad idea on servers and many machines to have a compiler installed. given that gdb is pulled into default installations, also pulling in gcc everywhere is not a good idea. for one it makes the minimal footprint of Fedora bigger and two it makes it trivial for someone that breaks into a machine to compile malicious code, though by then you have other issues. It also has the possibility of encouraging bad behaviour.

Comment 17 Jan Kratochvil 2016-09-08 13:05:20 UTC
(In reply to Dennis Gilmore from comment #16)
> It is a really bad idea on servers and many machines to have a compiler
> installed. given that gdb is pulled into default installations,

I see GDB is required from some common non-development rpms only by abrt-addon-ccpp.rpm and abrt-desktop.rpm.  I do not see the reason, maybe ABRT could be repackaged to avoid that given that AFAIK normal bugreports should go through server-side-GDB retrace server.

Comment 18 Jakub Filak 2016-09-08 13:25:49 UTC
(In reply to Jan Kratochvil from comment #17)
> I see GDB is required from some common non-development rpms only by
> abrt-addon-ccpp.rpm and abrt-desktop.rpm.  I do not see the reason, maybe
> ABRT could be repackaged to avoid that given that AFAIK normal bugreports
> should go through server-side-GDB retrace server.

ABRT packages pull in gdb because users are allowed to choose between generating backtrace on local machine or on remote machine. This setup ensures that in case of security concerns users are not forced to upload their core files to a remote server.

We might be able to tweak ABRT to support only the remote variant of generating backtrace, but I'm not sure it is worth it and I'm not sure users will appreciate such a setup (retrace-server is not a critical service so we sometimes experience some outages /o\)

Anyway ABRT must support the local variant of generating backtrace by default.

Jan, what about to create a gdb package providing core gdb functionality without the dependency on gcc. We would make ABRT requiring that package instead of full featured gdb?

Comment 19 Jan Kratochvil 2016-09-08 13:34:44 UTC
(In reply to Jakub Filak from comment #18)
> ABRT packages pull in gdb because users are allowed to choose between
> generating backtrace on local machine or on remote machine. This setup
> ensures that in case of security concerns users are not forced to upload
> their core files to a remote server.
> 
> We might be able to tweak ABRT to support only the remote variant of
> generating backtrace,

The GDB dependency could be only optional.  Either via Recommends or via Suggests.  Then ABRT would show the GDB option disabled if GDB is not installed.

Although it is a similar situation as with GDB and its optional expressions evaluation.  Making the ABRT->GDB dependency Recommends would not fix the complaint of automatically installed GCC during server installation.


> Jan, what about to create a gdb package providing core gdb functionality
> without the dependency on gcc. We would make ABRT requiring that package
> instead of full featured gdb?

If /usr/bin/gdb gets installed then user runs it and the expressions do not work well.  No additional GDB-extended package gets installed.

GDB could ask user during expression evaluation that gdb-gcc-plugin is not installed and that the user should install it.  Similarly to ABRT could ask for GDB installation.


I guess this issue should be formalized and submitted to FESCo.  For example I am not aware how to do universal package installation - 'dnf install' is not suitable when GDB as a backend of GUI applications.

Comment 20 Jan Kratochvil 2016-09-10 20:51:10 UTC
I have sent it to fedora-devel (instead of FESCo):
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6ZJ3MOQ5IFDCAY2UJ3XQQPRZCG3HB36M/

Comment 21 Fedora Update System 2016-09-14 22:08:47 UTC
gdb-7.12-0.16.20160907.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c9d8d46388

Comment 22 Fedora Update System 2016-09-16 01:24:53 UTC
gdb-7.12-0.16.20160907.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c9d8d46388

Comment 23 Fedora Update System 2016-09-20 17:06:23 UTC
gdb-7.12-0.16.20160907.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 David H. Gutteridge 2016-10-03 13:58:02 UTC
*** Bug 1381242 has been marked as a duplicate of this bug. ***


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