Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519986 - net-misc/networkmanager hardcodes 2.4.5 ppp plugin directory if it's not specified to other value
Summary: net-misc/networkmanager hardcodes 2.4.5 ppp plugin directory if it's not spec...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-15 11:48 UTC by Clemente Aguiar
Modified: 2014-09-22 19:22 UTC (History)
6 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 Clemente Aguiar 2014-08-15 11:48:26 UTC
I use VPN a lot, I connect regularly to at least 3 different VPN servers (linux based).

I use Network-Manager gui interface to connect.

After I upgraded to net-dialup/ppp-2.4.7 VPN won't connect.

Downgraded to net-dialup/ppp--2.4.5-r3 and it works fine.

Here is the log of a failed attempt:
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> Starting VPN service 'pptp'...
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 3213
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> VPN service 'pptp' appeared; activating connections
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> VPN plugin state changed: starting (3)
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> VPN connection 'CAF' (Connect) reply received.
Aug 15 11:04:25 caguiar-home pppd[3219]: Plugin /usr/lib64/pppd/2.4.5/nm-pptp-pppd-plugin.so is for pppd version 2.4.5, this is 2.4.7
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <warn> VPN plugin failed: 0
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> VPN plugin state changed: stopped (6)
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <info> VPN plugin state change reason: 10
Aug 15 11:04:25 caguiar-home NetworkManager[2107]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Aug 15 11:04:30 caguiar-home NetworkManager[2107]: <info> VPN service 'pptp' disappeared

I noticed in the log the following:
nm-pptp-pppd-plugin.so is for pppd version 2.4.5, this is 2.4.7

nm-pptp-pppd-plugin.so is generated by net-misc/networkmanager-pptp.

So I upgraded net-dialup/ppp-2.4.7 and re-emerge networkmanager-pptp.

VPN now works, however I think that the ebuilds should take care of this.


Reproducible: Always




These are the NM builds:

$ emerge -pv networkmanager networkmanager-pptp
[ebuild   R    ] net-misc/networkmanager-0.9.8.10-r1  USE="bluetooth dhcpcd introspection modemmanager nss ppp systemd wext wifi -avahi -connection-sharing (-consolekit) -dhclient -gnutls -resolvconf {-test} -vala" 0 kB
[ebuild   R    ] net-misc/networkmanager-pptp-0.9.8.4  USE="gtk" 0 kB

$ emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.7.3, glibc-2.19-r1, 3.15.8-gentoo x86_64)
=================================================================
System uname: Linux-3.15.8-gentoo-x86_64-Intel-R-_Core-TM-_i3-2100_CPU_@_3.10GHz-with-gentoo-2.2
KiB Mem:     4032420 total,     72788 free
KiB Swap:    2097148 total,   2097052 free
Timestamp of tree: Fri, 15 Aug 2014 02:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo wirelay sunrise espenaf my_local_overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pt_PT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/wirelay /var/lib/layman/sunrise /var/lib/layman/espenaf /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli colord corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif gimp gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 java jpeg lame lcms ldap libnotify libsecret mad mmx mng modules mp3 mp4 mpeg mtp multilib musepack nautilus ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 quicktime readline samba scanner sdl session smp socialweb spell sse sse2 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vorbis wavpack wmf wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pt_PT pt en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-15 12:05:26 UTC
So it's fixed by re-emerging net-misc/networkmanager-pptp.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-08-15 12:10:53 UTC
Replace 

  net-dialup/ppp

with

  net-dialup/ppp:=

in RDEPEND to fix this.
Comment 3 Clemente Aguiar 2014-08-15 12:46:12 UTC
Yes it's fixed by re-emerging net-misc/networkmanager-pptp.

However the libraries re-built land in the following directory
/usr/lib64/pppd/2.4.5

$ ls /usr/lib64/pppd/2.4.5
nm-pppd-plugin.so  nm-pptp-pppd-plugin.so

Just a comment.
Comment 4 Agostino Sarubbo gentoo-dev 2014-08-23 19:31:06 UTC
(In reply to Jeroen Roovers from comment #1)
> So it's fixed by re-emerging net-misc/networkmanager-pptp.

(In reply to Lars Wendler (Polynomial-C) from comment #2)
> Replace 
> 
>   net-dialup/ppp
> 
> with
> 
>   net-dialup/ppp:=
> 
> in RDEPEND to fix this.

in short: that's wrong.


in long:
net-misc/networkmanager-pptp writes in /usr/lib64/pppd/$ppp_version

but if you update ppp from 2.4.5 to 2.4.7 while you recompile networkmanager-pptp you can see in the build log that it points to ppp-2.4.5:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I..  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -I/usr/include/NetworkManager -I/usr/include/libnm-glib -I/usr/include/NetworkManager -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -DBINDIR=\"/usr/bin\" -DPREFIX=\""/usr"\" -DSYSCONFDIR=\""/etc"\" -DNM_VERSION="\"0.9.8.4\"" -DLIBDIR=\""/usr/lib64"\" -DLIBEXECDIR=\""/usr/libexec"\" -DLOCALSTATEDIR=\""/var/lib"\" -DDATADIR=\"/usr/share\" -DNM_PPTP_LOCALEDIR=\"/usr/share/locale\" -DPLUGINDIR=\"/usr/lib64/pppd/2.4.5\"    -O2 -pipe -march=x86-64 -c -o nm-pptp-service.o nm-pptp-service.c

the highlight is:
-DPLUGINDIR=\"/usr/lib64/pppd/2.4.5\"

So, you need to rebuild first networkmanager; infact, after upgrade ppp and rebuild networkmanager-pptp you have:

arcadia ~ # qfile /usr/lib64/pppd/2.4.5
net-misc/networkmanager-pptp (/usr/lib64/pppd/2.4.5)                                 
net-misc/networkmanager (/usr/lib64/pppd/2.4.5)                                      

arcadia ~ # qfile /usr/lib64/pppd/2.4.7
net-dialup/ppp (/usr/lib64/pppd/2.4.7)

The problem is that when you recompile networkmanager it always points to 2.4.5:
(before and after recompile networkmanager)
ago@arcadia ~ $ qlist -e networkmanager | grep "/usr/lib64/ppp"
/usr/lib64/pppd/2.4.5/nm-pppd-plugin.so


and in the build log we have always -DPLUGINDIR=\"/usr/lib64/pppd/2.4.5\"

The final question is:
is networkmanager able to work with ppp-2.4.7? Why with ppp-2.4.7 installed, networkmanager compiles against 2.4.5?
Comment 5 Pacho Ramos gentoo-dev 2014-09-07 18:17:12 UTC
This is because we need to specify it with --with-pppd-plugin-dir=$(ppp_version)

The problem is that the only way I see to get $(ppp_version) would be to run "pppd --version" and something to get only the version :S

ppp maintainers, isn't there anyway to query for current ppp plugindir?
Comment 6 Agostino Sarubbo gentoo-dev 2014-09-07 18:42:33 UTC
(In reply to Pacho Ramos from comment #5)
> This is because we need to specify it with
> --with-pppd-plugin-dir=$(ppp_version)
> 
> The problem is that the only way I see to get $(ppp_version) would be to run
> "pppd --version" and something to get only the version :S
> 
> ppp maintainers, isn't there anyway to query for current ppp plugindir?

We can obtain the version of ppp but I don't know another clean way and if we can put it in the ebuild:

grep VERSION /usr/include/pppd/patchlevel.h | awk '{print $3}' | sed "s:\"::g"
Comment 7 Sergey Popov gentoo-dev 2014-09-08 11:47:08 UTC
(In reply to Agostino Sarubbo from comment #6)
> (In reply to Pacho Ramos from comment #5)
> > This is because we need to specify it with
> > --with-pppd-plugin-dir=$(ppp_version)
> > 
> > The problem is that the only way I see to get $(ppp_version) would be to run
> > "pppd --version" and something to get only the version :S
> > 
> > ppp maintainers, isn't there anyway to query for current ppp plugindir?
> 
> We can obtain the version of ppp but I don't know another clean way and if
> we can put it in the ebuild:
> 
> grep VERSION /usr/include/pppd/patchlevel.h | awk '{print $3}' | sed
> "s:\"::g"

I recommend to add subslot to ppp dependency - i add it to ppp ebuilds just for such cases(net-misc/pptpd suffered from the same problem). Plugin version changes at every release of ppp, thus - networkmanager with USE="ppp" should be rebuilded too.
Comment 8 Pacho Ramos gentoo-dev 2014-09-09 15:05:06 UTC
(In reply to Sergey Popov from comment #7)
[...] 
> I recommend to add subslot to ppp dependency - i add it to ppp ebuilds just
> for such cases(net-misc/pptpd suffered from the same problem). Plugin
> version changes at every release of ppp, thus - networkmanager with
> USE="ppp" should be rebuilded too.

Yes, we will need subslot dependency to force rebuild, but we also need the way to check for version to specify it at configure time when package is rebuild :| Not sure if there are any other ideas for checking for the plugin dir for ppp :/ 

For now I have reported this to upstream:
https://github.com/paulusmack/ppp/issues/19

To try to convince them to provide a mechanism to check for plugin dir (as every distribution is providing a different hack :S, and also NM configure check sucks due this problem)
Comment 9 Sergey Popov gentoo-dev 2014-09-10 11:46:51 UTC
(In reply to Pacho Ramos from comment #8)
> (In reply to Sergey Popov from comment #7)
> [...] 
> > I recommend to add subslot to ppp dependency - i add it to ppp ebuilds just
> > for such cases(net-misc/pptpd suffered from the same problem). Plugin
> > version changes at every release of ppp, thus - networkmanager with
> > USE="ppp" should be rebuilded too.
> 
> Yes, we will need subslot dependency to force rebuild, but we also need the
> way to check for version to specify it at configure time when package is
> rebuild :| Not sure if there are any other ideas for checking for the plugin
> dir for ppp :/ 

I use dirty hack in pptpd ebuild for that:

# Match pptpd-logwtmp.so's version with pppd's version (#89895)
local PPPD_VER=`best_version net-dialup/ppp`
PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision

Not very beatiful, but at least working solution
Comment 10 Pacho Ramos gentoo-dev 2014-09-22 19:22:58 UTC
+*networkmanager-0.9.10.0 (22 Sep 2014)
+
+  22 Sep 2014; Pacho Ramos <pacho@gentoo.org> +networkmanager-0.9.10.0.ebuild,
+  -networkmanager-0.9.8.8.ebuild, metadata.xml:
+  Version bump, default to dhclient instead of dhcpcd (#493732), set proper pppd
+  plugindir (#519986 by Clemente Aguiar, Sergey Popov, Agostino Sarubbo and
+  others), remove wimax support (#522822 by Dion Moult), drop old.
+