Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504118 - sys-devel/gcc-config: gcc-config should not source functions.sh from /etc/init.d
Summary: sys-devel/gcc-config: gcc-config should not source functions.sh from /etc/init.d
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal with 6 votes (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 547586 547962 548158 599792
Blocks:
  Show dependency tree
 
Reported: 2014-03-10 20:28 UTC by Kirill Elagin
Modified: 2017-12-04 22:31 UTC (History)
24 users (show)

See Also:
Package list:
sys-devel/gcc-config-1.8-r1
Runtime testing required: Yes
stable-bot: sanity-check+


Attachments
patch for using echo -e and sourcing /lib/gentoo/functions.sh (file_504118.txt,525 bytes, text/plain)
2014-03-11 07:01 UTC, Ulf Dambacher
no flags Details
0001-Don-t-use-functions.sh-from-etc-init.d-anymore-bug-5.patch (0001-Don-t-use-functions.sh-from-etc-init.d-anymore-bug-5.patch,1.08 KB, patch)
2014-03-19 13:37 UTC, Lars Wendler (Polynomial-C) (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Elagin 2014-03-10 20:28:25 UTC
See bug 504116.
Comment 1 Ulf Dambacher 2014-03-11 06:52:52 UTC
and please use  echo -e  or printf when using the color sequences...
Comment 2 Ulf Dambacher 2014-03-11 07:01:01 UTC
Created attachment 372350 [details]
patch for using echo -e and sourcing /lib/gentoo/functions.sh
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-03-19 13:37:05 UTC
Created attachment 373024 [details, diff]
0001-Don-t-use-functions.sh-from-etc-init.d-anymore-bug-5.patch

Slightly improved patch. Also git formatted...
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-21 19:13:00 UTC
<QA hat>

This is a trivial fix that doesn't come with any real backwards compatibility dangers. In fact, it improves safety of packages through replacing implicit dependency on private API of a medium-sized package by explicit dependency on small, dedicated package.

That said, 9 months (1.5yr in case of glibc) to apply the fix is definitely too long. Therefore, I'm setting a deadline on fixing the remaining bugs to 2014-12-27. If the bugs aren't fixed till that point, I will be committing simple 'sed' statements to replace the inherits.

</QA hat>
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-28 22:47:33 UTC
Lars, if you have commit access to proj/gcc-config, please commit. Otherwise, I will ask infra for commit access. QA lead, do you approve?
Comment 6 Anthony Basile gentoo-dev 2014-12-30 14:28:32 UTC
(In reply to Michał Górny from comment #5)
> Lars, if you have commit access to proj/gcc-config, please commit.
> Otherwise, I will ask infra for commit access. QA lead, do you approve?

Let me see if I can get write to gcc-config and binutils-config.
Comment 7 Anthony Basile gentoo-dev 2014-12-30 15:32:42 UTC
(In reply to Anthony Basile from comment #6)
> (In reply to Michał Górny from comment #5)
> > Lars, if you have commit access to proj/gcc-config, please commit.
> > Otherwise, I will ask infra for commit access. QA lead, do you approve?
> 
> Let me see if I can get write to gcc-config and binutils-config.

Sorry binutils-config is done purely in the tree.
Comment 8 Sergey Popov gentoo-dev 2015-01-05 10:36:18 UTC
(In reply to Michał Górny from comment #5)
>QA lead, do you approve?

Yes, do it please
Comment 9 luze 2015-03-21 12:34:32 UTC
Can you please commit this already?
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-04-24 07:41:46 UTC
+*gcc-config-1.8-r1 (24 Apr 2015)
+
+  24 Apr 2015; Lars Wendler <polynomial-c@gentoo.org>
+  +gcc-config-1.8-r1.ebuild,
+  +files/gcc-config-1.8-dont_source_functions_sh_from_etc_initd.patch:
+  Don't use functions.sh from init.d folder (bug #504118). Raised EAPI to
+  version 5.
+

This patch still needs to be merged into the git repository so let's keep this bug upen until that happened.
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2015-04-25 04:26:39 UTC
Thanks for pushing this (and sorry for not getting to it), but please enable FEATURES=test when you're doing development work, especially if you're doing it on behalf of QA.

Bug #504116 indicates we need a dep on sys-apps/gentoo-functions.  Is this still true?

Where did the -e hunk go?
Comment 12 mike@marineau.org 2015-04-28 21:04:57 UTC
One note on switching to gentoo-functions, unlike openrc which logged eerror and ewarn to stderr, gentoo-functions returns to the baselayout-1 behavior of logging all levels to stdout by default. eerror will log to stderr if EINFO_QUIET=yes.

Currently toolchains.eclass assumes the openrc behavior and stdout from gcc-config only contains valid data and proceeds to use it unquoted allowing the '*' prefix to expand to all sorts of nonsense. See https://bugs.gentoo.org/show_bug.cgi?id=547962

I happened to encounter this with gcc-config 1.7.3 and a replacement implementation of /etc/init.d/functions.sh but the issue should be equally applicable to gcc-config 1.8 with /lib/gentoo/functions.sh until toolchains.eclass is fixed.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-04-29 04:25:43 UTC
Could you open a bug against gentoo-functions, please? The stdout behavior is really stupid.
Comment 14 Ryan Hill (RETIRED) gentoo-dev 2015-04-29 05:14:18 UTC
I masked gcc-config-1.8-r1 in the meantime.
Comment 15 mike@marineau.org 2015-04-29 17:05:10 UTC
(In reply to Michał Górny from comment #13)
> Could you open a bug against gentoo-functions, please? The stdout behavior
> is really stupid.

Filed bug 548158 for gentoo-functions
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2015-05-13 04:33:49 UTC
https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=fbf72a0a0c3c5708e68fa493b2014605b828f2e6

Mike it looks like there hasn't been a gcc-config release since 2012 and there's a bunch of changes stacked up.  Can you make a 1.9 with a >=gentoo-functions-0.10 dep?
Comment 17 Alex Xu (Hello71) 2015-06-20 21:00:39 UTC
yes/maybe/no/why not?
Comment 18 Markus Rathgeb 2015-07-18 14:34:14 UTC
Has this been stalled?
Comment 19 djip.perois 2015-09-15 21:39:03 UTC
(In reply to Ryan Hill from comment #16)
> https://gitweb.gentoo.org/proj/gcc-config.git/commit/
> ?id=fbf72a0a0c3c5708e68fa493b2014605b828f2e6
> 
> Mike it looks like there hasn't been a gcc-config release since 2012 and
> there's a bunch of changes stacked up.  Can you make a 1.9 with a
> >=gentoo-functions-0.10 dep?

or unmasque gcc-config-1.8-r1 and add >=g...
may be best creat a 1.9...

please... it is simple... we are waiting for 1,5 years...
Comment 20 Dmitri Seletski 2015-10-09 23:36:55 UTC
How can I raise priority?
I was upgrading system. Now my system is half broke, I am lucky I can still use X. Now I can not upgrade any more. So system is in half usable state. With this catastrophe with multilibs, then problems with systemd, now this. OK, second is not related to Gentoo in any way, but first and third, are really putting me off, to a stage where i want to abandon gentoo all together. I was using it for over 5 years minimum, probably around 8 years or so. Feels like it's getting worse every year.

80% of my most used programs don't work, because I had to remove them or their libraries, so I can do clean installation(with no /etc/portage/package.keywords trickery).

I moved to systemd today, and I can confirm this is bad bug.
I have done a lot of googling. I can see that a lot of other people have exact same problems in forums since 2012

If you can't give solution, please give workaround, pretty please.
My time is running out, i don't want to use other distro, but I really am forced to.
Comment 21 Zac Medico gentoo-dev 2015-10-09 23:45:29 UTC
(In reply to Dmitri Seletski from comment #20)
> If you can't give solution, please give workaround, pretty please.

ln -s /lib/rc/sh/functions.sh /etc/init.d/functions.sh
Comment 22 Dmitri Seletski 2015-10-10 00:11:23 UTC
(In reply to Zac Medico from comment #21)
> (In reply to Dmitri Seletski from comment #20)
> > If you can't give solution, please give workaround, pretty please.
> 
> ln -s /lib/rc/sh/functions.sh /etc/init.d/functions.sh

Thanks, as per suggestion, I found  functions.sh and did
ln -s /lib64/gentoo/functions.sh /etc/init.d/functions.sh
then,
gcc-config  -c
then,
gcc-config  4

and I am able to compile again, thanks a lot!
Comment 23 djip.perois 2015-10-10 17:01:25 UTC
You mean thas you remove openrc... and it works?

if so please update gcc-config!!!
Comment 24 Dmitri Seletski 2015-10-10 17:48:53 UTC
I did, work around helped me, but I hit another issue. I will report it in different place.
Comment 25 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-18 13:26:33 UTC
(In reply to Ryan Hill from comment #16)
> https://gitweb.gentoo.org/proj/gcc-config.git/commit/
> ?id=fbf72a0a0c3c5708e68fa493b2014605b828f2e6
> 
> Mike it looks like there hasn't been a gcc-config release since 2012 and
> there's a bunch of changes stacked up.  Can you make a 1.9 with a
> >=gentoo-functions-0.10 dep?

Ryan, any chance to get some real action here? Mike is clearly busy with other stuff, so either someone else needs to do a new release, or we *need* to unmask -r1 as an intermediate fix.
Comment 26 Lara Maia 2015-10-18 22:53:28 UTC
(In reply to Michał Górny from comment #25)
> (In reply to Ryan Hill from comment #16)
> > https://gitweb.gentoo.org/proj/gcc-config.git/commit/
> > ?id=fbf72a0a0c3c5708e68fa493b2014605b828f2e6
> > 
> > Mike it looks like there hasn't been a gcc-config release since 2012 and
> > there's a bunch of changes stacked up.  Can you make a 1.9 with a
> > >=gentoo-functions-0.10 dep?
> 
> Ryan, any chance to get some real action here? Mike is clearly busy with
> other stuff, so either someone else needs to do a new release, or we *need*
> to unmask -r1 as an intermediate fix.

Why gcc-config needs a gentoo-functions-0.10 dep if the plan is to add this package to @system?
Comment 27 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-19 08:04:27 UTC
I never heard of this plan. And even if it is, people are expected to explicitly depend on it, i.e. to remove the need of having it in @system forever.
Comment 28 Lara Maia 2015-10-19 08:49:23 UTC
(In reply to Michał Górny from comment #27)
> I never heard of this plan. And even if it is, people are expected to
> explicitly depend on it, i.e. to remove the need of having it in @system
> forever.

See the comment 0 at 504116. William Hubbs say:

> When yu make the fix, please do not add a hard dependency to
> sys-apps/gentoo-functions. The plan is to add this package to @system as
> soon as it goes stable.
Comment 29 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-19 09:04:32 UTC
(In reply to Lara Maia from comment #28)
> (In reply to Michał Górny from comment #27)
> > I never heard of this plan. And even if it is, people are expected to
> > explicitly depend on it, i.e. to remove the need of having it in @system
> > forever.
> 
> See the comment 0 at 504116. William Hubbs say:
> 
> > When yu make the fix, please do not add a hard dependency to
> > sys-apps/gentoo-functions. The plan is to add this package to @system as
> > soon as it goes stable.

See comment 1 at the same bug ;-P. He corrected himself.
Comment 30 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-28 15:24:49 UTC
I've added gentoo-functions dep to 1.8-r1. Can we unmask it now, please?
Comment 31 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-30 14:25:44 UTC
commit b6744e549e4104b39c47e0cb0655a56ed0629add
Author: Michał Górny <mgorny@gentoo.org>
Date:   Sat Jan 30 15:24:39 2016

    package.mask: Unmask gcc-config-1.8-r1, #504118
Comment 32 Richard Freeman gentoo-dev 2016-02-06 13:41:31 UTC
Do we need to track this through to stabilization?  I just noticed that gcc-config broke on a stable system I was testing unmerging openrc on.
Comment 33 Kristian Fiskerstrand (RETIRED) gentoo-dev 2016-06-15 20:58:49 UTC
(In reply to Richard Freeman from comment #32)
> Do we need to track this through to stabilization?  I just noticed that
> gcc-config broke on a stable system I was testing unmerging openrc on.

Yes, before the package is in stable it should remain open with InVCS keyword
Comment 34 Matt Turner gentoo-dev 2016-12-01 05:42:16 UTC
Time to stabilize gcc-config-1.8-r1?
Comment 35 Matthias Maier gentoo-dev 2017-05-18 19:16:09 UTC
Arches please stabilize
  sys-devel/gcc-config-1.8-r1


Keywords for sys-devel/gcc-config:
          |                                 |   u   |  
          | a a         p s   a     n r     |   n   |  
          | l m   h i   p p   r m m i i s   | e u s | r
          | p d a p a p c a x m i 6 o s 3   | a s l | e
          | h 6 r p 6 p 6 r 8 6 p 8 s c 9 s | p e o | p
          | a 4 m a 4 c 4 c 6 4 s k 2 v 0 h | i d t | o
----------+---------------------------------+-------+-------
 1.7.3    | + + + + + + + + + + ~ + o o + + | 0 o 0 | gentoo
   1.8    | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o o ~ ~ | 0 #   | gentoo
[I]1.8-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o o ~ ~ | 5 o   | gentoo
Comment 36 Matthias Maier gentoo-dev 2017-05-18 19:19:46 UTC
We have to wait for bug #599792
Comment 37 David Heidelberg (okias) 2017-07-30 19:41:12 UTC
here is standalone stabilization request: https://bugs.gentoo.org/626646
Comment 38 Andreas K. Hüttel archtester gentoo-dev 2017-10-03 20:10:19 UTC
(In reply to David Heidelberg (okias) from comment #37)
> here is standalone stabilization request: https://bugs.gentoo.org/626646

Let's do it there.