Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452760 - sys-fs/{udev,eudev}: superfluous hard gperf dependency
Summary: sys-fs/{udev,eudev}: superfluous hard gperf dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-18 04:53 UTC by SpanKY
Modified: 2013-09-05 17:34 UTC (History)
2 users (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 2013-01-18 04:53:27 UTC
although it's dumb that they don't just ship generated files in the tarball, we can at least restrict when it gets pulled in

currently, systemd uses gperf for a few things:
  src/udev/keymap/keys-from-name.h
  src/core/syscall-from-name.h
  src/login/logind-gperf.gperf
  src/journal/journald-gperf.gperf

the udev keymap code needs gperf (USE=keymap).  the other three files are systemd specific and not compiled for udev.

so the dep should get put behind keymap?(), and the src_configure can be tweaked to stop the hard fatal configure check:
  use keymap || export ac_cv_path_GPERF=true
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-01-18 07:51:42 UTC
It seems to work like that except it's very easy to miss it when version bumping since it will just return 0 and then generate empty(?) file.

We might need check like done for secure_getenv:

if ! [[ $(grep -i gperf Makefile.am | wc -l) -eq 24 ]]; then
 eerror "The line count of gperf failed, see bug #452760"
 die
fi

:-/
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-01-20 09:57:33 UTC
fixed in tree for -r4 and 9999
Comment 3 Vasily Pupkin 2013-01-21 17:37:32 UTC
 * The line count for secure_getenv() failed, see bug #443030
 * ERROR: sys-fs/udev-9999 failed (prepare phase):
 *   (no error message)

# LC_ALL=C date --utc
Mon Jan 21 17:37:09 UTC 2013

Just synced
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-03-10 17:37:54 UTC
Noticed this is not fixed in sys-fs/eudev, reassigning
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2013-03-10 17:38:47 UTC
I mean Comment #0
Comment 6 Anthony Basile gentoo-dev 2013-03-10 19:09:10 UTC
(In reply to comment #4)
> Noticed this is not fixed in sys-fs/eudev, reassigning

Fixed in eudev.  Thanks for the report!
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2013-07-15 10:58:32 UTC
Upstream (git, after release of udev-205) made the dev-util/gperf dependency even harder to avoid:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=9d7d42bc406a2ac04639674281ce3ff6beeda790

I just made dev-util/gperf a hard DEPEND on sys-fs/udev-9999 again. I don't see gperf being a problematic dependency -- but there might be something I don't know.

vapier?
Comment 8 SpanKY gentoo-dev 2013-09-05 06:50:30 UTC
i was trying to avoid stupid stuff on embedded setups.  if it's not really feasible with the current code like it was before, then i guess there's not much to be done.  ideally they'd include generated files like this in their tarballs, but i'm guessing their releng process sucks and can't cope.
Comment 9 Anthony Basile gentoo-dev 2013-09-05 10:58:17 UTC
(In reply to SpanKY from comment #8)
> i was trying to avoid stupid stuff on embedded setups.  if it's not really
> feasible with the current code like it was before, then i guess there's not
> much to be done.  ideally they'd include generated files like this in their
> tarballs, but i'm guessing their releng process sucks and can't cope.

in eudev we only depend gperf for USE=keymap and we only test in configure.ac for gperf if --enable-keymap.  I just grepped that source tree and I can't see any other reason for it.

Comments on whether I'm missing anything?
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2013-09-05 14:35:37 UTC
(In reply to Anthony Basile from comment #9)
> (In reply to SpanKY from comment #8)
> > i was trying to avoid stupid stuff on embedded setups.  if it's not really
> > feasible with the current code like it was before, then i guess there's not
> > much to be done.  ideally they'd include generated files like this in their
> > tarballs, but i'm guessing their releng process sucks and can't cope.
> 
> in eudev we only depend gperf for USE=keymap and we only test in
> configure.ac for gperf if --enable-keymap.  I just grepped that source tree
> and I can't see any other reason for it.
> 
> Comments on whether I'm missing anything?

that's specific to eudev.

upstream udev (systemd) doesn't have the hwdb support optional, or the keymap (keyboard) hwdb rules separated from the overall hwdb support. it's always installed on every configuration you can throw the build-sys at.
and as per upstream systemd ML from upstream's mouth, the hwdb data may or may not be used for essential functionality, and it may or may not cause undefined behavior when it's missing.
so i don't think restoring the flag to retain it's optionality is either safe, sane or worth the effort of carrying custom #ifdef -patch forever.
imho :)
Comment 11 Anthony Basile gentoo-dev 2013-09-05 17:34:42 UTC
(In reply to Samuli Suominen from comment #10)
> (In reply to Anthony Basile from comment #9)
> > (In reply to SpanKY from comment #8)
> > > i was trying to avoid stupid stuff on embedded setups.  if it's not really
> > > feasible with the current code like it was before, then i guess there's not
> > > much to be done.  ideally they'd include generated files like this in their
> > > tarballs, but i'm guessing their releng process sucks and can't cope.
> > 
> > in eudev we only depend gperf for USE=keymap and we only test in
> > configure.ac for gperf if --enable-keymap.  I just grepped that source tree
> > and I can't see any other reason for it.
> > 
> > Comments on whether I'm missing anything?
> 
> that's specific to eudev.
> 
> upstream udev (systemd) doesn't have the hwdb support optional, or the
> keymap (keyboard) hwdb rules separated from the overall hwdb support. it's
> always installed on every configuration you can throw the build-sys at.
> and as per upstream systemd ML from upstream's mouth, the hwdb data may or
> may not be used for essential functionality, and it may or may not cause
> undefined behavior when it's missing.
> so i don't think restoring the flag to retain it's optionality is either
> safe, sane or worth the effort of carrying custom #ifdef -patch forever.
> imho :)

do we have any known instance of badness here when hwdb is missing?