Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443030 - >=sys-fs/udev-197-r3: replace the workaround for secure_getenv() with an upstream patch (was: does not build with sys-libs/uclibc-0.9.33)
Summary: >=sys-fs/udev-197-r3: replace the workaround for secure_getenv() with an upst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 00:17 UTC by SpanKY
Modified: 2018-02-13 16:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2012-11-14 00:17:53 UTC
udev requires these symbols which uclibc does not provide:
 __secure_getenv
 dup3
 mkostemp

the latter two should be straight forward, but that first one is a glibc-ism ...
Comment 1 SpanKY gentoo-dev 2012-11-14 05:54:54 UTC
i committed dup3/mkostemp support upstream.  need to review secure_getenv.
Comment 2 Anthony Basile gentoo-dev 2012-11-14 22:56:51 UTC
(In reply to comment #1)
> i committed dup3/mkostemp support upstream.  need to review secure_getenv.

I'm pretty sure secure_gentenv isn't POSIX.  But, I'm not sure what uclibc policy is towards POSIX purity.  Should the fix be to patch udev-189?
Comment 3 SpanKY gentoo-dev 2012-11-15 00:17:20 UTC
it's not POSIX, but the systemd guys don't care.  they code for Linux/glibc only.
Comment 4 Anthony Basile gentoo-dev 2012-11-19 06:56:43 UTC
(In reply to comment #3)
> it's not POSIX, but the systemd guys don't care.  they code for Linux/glibc
> only.

In case you haven't heard already, some of us have started a fork of the systemd codebase.  So I looked at this.  You can just remove the env variable stuff from udev.  Here are the commits:

https://github.com/gentoo/eudev/commit/d626c1395bb217bd154ec9131038222295ca3eb0

https://github.com/gentoo/eudev/commit/dbc4814264667d2ebf2f7300a4028461fdf532bd

For the second commit, just look at the src/libudev/libudev.c.  I mixed issues in that commit which I shouldn't have.

If this looks sane, I'll produce a proper patch against udev-189.
Comment 5 SpanKY gentoo-dev 2012-11-19 07:10:55 UTC
(In reply to comment #4)

i'm aware, but not interested

in the udev ebuild, we could do (at the end of src_configure):
 use elibc_glibc || echo '#define secure_getenv(x) NULL' >> config.h

it should only affect log customization via envvars ... not a big deal
Comment 6 Anthony Basile gentoo-dev 2012-11-19 07:30:26 UTC
(In reply to comment #5)
> (In reply to comment #4)
> 
> i'm aware, but not interested
> 
> in the udev ebuild, we could do (at the end of src_configure):
>  use elibc_glibc || echo '#define secure_getenv(x) NULL' >> config.h
> 
> it should only affect log customization via envvars ... not a big deal

The current use is just for logs.  We'd have to watch it in case they use secure_getenv(x) for something more important in the future when bumping that ebuild.
Comment 7 William Hubbs gentoo-dev 2013-01-17 18:20:06 UTC
(In reply to comment #3)
> it's not POSIX, but the systemd guys don't care.  they code for Linux/glibc
> only.

How do we know they code for glibc only? I haven't heard this anywhere on their irc channel, and glibc isn't listed specifically as a system requirement in their README.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 18:23:50 UTC
Can we close this in favour of eudev since they are supposed to support uclibc too? Will we wait for it to stabilize? Wasn't that one of the points the eudev guys presented?
Is masking sys-fs/udev in the embedded/ profile an option so eudev gets picked instead?
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 18:24:51 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > 
> > i'm aware, but not interested
> > 
> > in the udev ebuild, we could do (at the end of src_configure):
> >  use elibc_glibc || echo '#define secure_getenv(x) NULL' >> config.h
> > 
> > it should only affect log customization via envvars ... not a big deal
> 
> The current use is just for logs.  We'd have to watch it in case they use
> secure_getenv(x) for something more important in the future when bumping
> that ebuild.

We could use grep to check how many matches the source tree has, and abort if it finds more than the defined amount of secure_getenv's so maintainers won't miss it?
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 19:09:58 UTC
(In reply to comment #5)
> (In reply to comment #4)
> 
> i'm aware, but not interested
> 
> in the udev ebuild, we could do (at the end of src_configure):
>  use elibc_glibc || echo '#define secure_getenv(x) NULL' >> config.h
> 
> it should only affect log customization via envvars ... not a big deal

okay,

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-197-r3.ebuild?r1=1.3&r2=1.4
Comment 11 SpanKY gentoo-dev 2013-01-17 21:56:21 UTC
(In reply to comment #7)

because they define _GNU_SOURCE and use functions that are specific to glibc
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2013-01-20 09:58:34 UTC
no need to keep this open, same as bug 452760

both are still very clear visible and can be improved.
Comment 13 Larry the Git Cow gentoo-dev 2018-02-13 16:03:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7346a1c028fb1d242b50c3a1cff4fd49d88af224

commit 7346a1c028fb1d242b50c3a1cff4fd49d88af224
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-02-13 16:03:11 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-02-13 16:03:36 +0000

    sys-fs/udev: bump to 237
    
    This update also drops the workaround for missing secure_getenv, which
    hasn't worked properly since the build system was switched to meson.
    
    Bug: https://bugs.gentoo.org/443030
    Closes: https://bugs.gentoo.org/647260
    Package-Manager: Portage-2.3.24_p18, Repoman-2.3.6_p99

 sys-fs/udev/Manifest         |   1 +
 sys-fs/udev/udev-237.ebuild  | 327 +++++++++++++++++++++++++++++++++++++++++++
 sys-fs/udev/udev-9999.ebuild |  21 +--
 3 files changed, 332 insertions(+), 17 deletions(-)}