Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536196 - net-misc/tor-0.2.6.2_alpha - USE=systemd tries to link to -lsystemd-daemon instead of -lsystemd
Summary: net-misc/tor-0.2.6.2_alpha - USE=systemd tries to link to -lsystemd-daemon in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 11:44 UTC by Michał Górny
Modified: 2015-01-28 18:32 UTC (History)
3 users (show)

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


Attachments
Build log .gz (net-misc:tor-0.2.6.2_alpha-r1:20150110-113712.log.gz,16.64 KB, application/gzip)
2015-01-10 11:44 UTC, Michał Górny
Details
tor with fixed systemd patch - local portage archive (tor.local.portage.fixed-systemd.tar.gz,20.83 KB, application/gzip)
2015-01-20 10:12 UTC, Tom-Steve Watzke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-10 11:44:32 UTC
Created attachment 393600 [details]
Build log .gz

/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsystemd-daemon
collect2: error: ld returned 1 exit status

In other words, they do:

    PKG_CHECK_MODULES(SYSTEMD,
        [libsystemd-daemon],
        have_systemd=yes,
        have_systemd=no)

and then...

    TOR_SYSTEMD_LIBS="-lsystemd-daemon"

like they couldn't just use whatever pkg-config found...
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-10 11:52:50 UTC
They also fail to support --disable-systemd.

      [case "${enableval}" in
        yes) systemd=true ;;
        no)  systemd=false ;;
        * ) AC_MSG_ERROR(bad value for --enable-systemd) ;;

but...

if test x$enable_systemd = xfalse ; then
    have_systemd=no;
else
    PKG_CHECK_MODULES(SYSTEMD,
        [libsystemd-daemon],
        have_systemd=yes,
        have_systemd=no)
fi

(note different variables used)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-10 11:54:59 UTC
And while at it, please also fix it to support 'libsystemd' pkg-config module :P.
Comment 3 Anthony Basile gentoo-dev 2015-01-10 13:13:18 UTC
Upstream is supposed to have fixed this:

https://gitweb.torproject.org/tor.git/commit/?id=fcc78e5f8a3249eadfea31db1aca6884b31c1873

It was reported in bug #534246.  But looking at it now, it looks wrong.
Comment 4 Tom-Steve Watzke 2015-01-20 10:12:36 UTC
Created attachment 394392 [details]
tor with fixed systemd patch - local portage archive

For those who cannot wait for this to be fixed in portage or 
are annoyed about world update skipping, 
I just put it all together and installed it locally.
Comment 5 Anthony Basile gentoo-dev 2015-01-20 11:43:54 UTC
(In reply to Tom-Steve Watzke from comment #4)
> Created attachment 394392 [details]
> tor with fixed systemd patch - local portage archive
> 
> For those who cannot wait for this to be fixed in portage or 
> are annoyed about world update skipping, 
> I just put it all together and installed it locally.

Please don't post tarballs like that.  Just upload the patch.  Users can then place it in /etc/portage/patches/net-misc/tor and let epatch_user do its magic.

Having said that, this is an alpha.  I only put it in the tree for testing with the expectation that we will collect breakage for upstream for the next release.  I really don't recommend its use in the wild.

Finally, that patch is wrong and needs to be rewritten.
Comment 6 Anthony Basile gentoo-dev 2015-01-28 18:32:39 UTC
The upstream code here is in flux, and last I looked at it --disable-systemd was broken.  I fixed that and they merged, so hopefully the next release will be good.  

  https://trac.torproject.org/projects/tor/ticket/14350

I've p.masked this for now.  I'm not backporting patches for the alpha.