Re: [PATCH] moving vpn helpers to libexecdir / vpn libs to $(libdir)/NetworkManager



Michael Biebl wrote:
Some of the vpn plugin binaries are in $(bindir), some in $(libexecdir).

The attached patch moves them all to $(libexecdir).

In addition it moves the libnm-*-properties.so modules to $(libdir)/NetworkManager. They are private modules imo and no system libraries.

And last, I cleaned up a few oddities, whenever I stumbled upon then (like target specific -g and -Wall flags).

Please review and apply.

I missed to update the pptp plugin. Although it currently isn't ported to the new API and doesn't build, I thought it would make sense to apply those changes to this plugin, too.

Updated patch attached.

Cheers,
Michael


--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
Index: vpn-daemons/pptp/src/Makefile.am
===================================================================
--- vpn-daemons/pptp/src/Makefile.am	(Revision 3824)
+++ vpn-daemons/pptp/src/Makefile.am	(Arbeitskopie)
@@ -8,7 +8,6 @@
 	$(NETWORK_MANAGER_CFLAGS)				\
 	$(PPPD_CFLAGS)						\
 	$(NM_VPN_CFLAGS)					\
-	-Wall							\
 	-DDBUS_API_SUBJECT_TO_CHANGE				\
 	-DG_DISABLE_DEPRECATED					\
 	-DBINDIR=\"$(bindir)\"					\
@@ -18,10 +17,9 @@
 	-DLIBDIR=\""$(libdir)"\"				\
 	-DLIBEXECDIR=\""$(libexecdir)"\"			\
 	-DLOCALSTATEDIR=\""$(localstatedir)"\"		 	\
-	-DDATADIR=\"$(datadir)\"				\
-	-fPIC
+	-DDATADIR=\"$(datadir)\"
 
-bin_PROGRAMS = nm-ppp-starter
+libexec_PROGRAMS = nm-ppp-starter
 
 pppdplugindir = $(libexecdir)/pppd/$(PPPD_VERSION)
 pppdplugin_LTLIBRARIES = nm-pppd-plugin.la
Index: vpn-daemons/pptp/properties/Makefile.am
===================================================================
--- vpn-daemons/pptp/properties/Makefile.am	(Revision 3824)
+++ vpn-daemons/pptp/properties/Makefile.am	(Arbeitskopie)
@@ -1,9 +1,9 @@
+plugindir = $(libdir)/NetworkManager
 
+plugin_LTLIBRARIES = libnm-ppp-properties.la
 
-lib_LTLIBRARIES = libnm-ppp-properties.la
-
 libnm_ppp_properties_la_SOURCES = 			\
-				nm-ppp-properties.c \
+                nm-ppp-properties.c \
                 vpnui_impl.c \
                 vpnui_expand.c \
                 vpnui_opt.c \
Index: vpn-daemons/pptp/Makefile.am
===================================================================
--- vpn-daemons/pptp/Makefile.am	(Revision 3824)
+++ vpn-daemons/pptp/Makefile.am	(Arbeitskopie)
@@ -11,10 +11,8 @@
 nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
 nmvpnservice_DATA = $(nmvpnservice_in_files:.name.in=.name)
 
-%.name: %.name.in Makefile
-	@sed -e "s|%bindir%|$(bindir)|g" \
-	     -e "s|%libdir%|$(libdir)|g" \
-	     -e "s|%libexecdir%|$(libexecdir)|g" $< > $@
+%.name: %.name.in
+	@sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' $< > $@
 
 if WITH_GNOME
 desktopdir = $(datadir)/applications
Index: vpn-daemons/pptp/nm-ppp-starter.name.in
===================================================================
--- vpn-daemons/pptp/nm-ppp-starter.name.in	(Revision 3824)
+++ vpn-daemons/pptp/nm-ppp-starter.name.in	(Arbeitskopie)
@@ -1,8 +1,8 @@
 [VPN Connection]
 name=ppp
 service=org.freedesktop.NetworkManager.ppp_starter
-program= BINDIR@/nm-ppp-starter
+program= LIBEXECDIR@/nm-ppp-starter
 
 [GNOME]
-auth-dialog= LIBEXECDIR@/nm-ppp-auth-dialog
-properties= PREFIX@/${LIB}/libnm-ppp-properties
+auth-dialog=nm-ppp-auth-dialog
+properties=libnm-ppp-properties
Index: vpn-daemons/openvpn/nm-openvpn-service.name.in
===================================================================
--- vpn-daemons/openvpn/nm-openvpn-service.name.in	(Revision 3824)
+++ vpn-daemons/openvpn/nm-openvpn-service.name.in	(Arbeitskopie)
@@ -1,7 +1,7 @@
 [VPN Connection]
 name=openvpn
 service=org.freedesktop.NetworkManager.openvpn
-program= BINDIR@/nm-openvpn-service
+program= LIBEXECDIR@/nm-openvpn-service
 
 [GNOME]
 auth-dialog=nm-openvpn-auth-dialog
Index: vpn-daemons/openvpn/src/Makefile.am
===================================================================
--- vpn-daemons/openvpn/src/Makefile.am	(Revision 3824)
+++ vpn-daemons/openvpn/src/Makefile.am	(Arbeitskopie)
@@ -1,7 +1,6 @@
 AM_CPPFLAGS =							\
 	$(DBUS_CFLAGS)						\
 	$(NETWORK_MANAGER_CFLAGS)				\
-	-Wall							\
 	-DDBUS_API_SUBJECT_TO_CHANGE				\
 	-DG_DISABLE_DEPRECATED					\
 	-DBINDIR=\"$(bindir)\"					\
@@ -13,7 +12,7 @@
 	-DLOCALSTATEDIR=\""$(localstatedir)"\"		 	\
 	-DDATADIR=\"$(datadir)\"
 
-bin_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
+libexec_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
 
 nm_openvpn_service_SOURCES =				\
 				nm-openvpn-service.c	\
Index: vpn-daemons/openvpn/src/nm-openvpn-service.c
===================================================================
--- vpn-daemons/openvpn/src/nm-openvpn-service.c	(Revision 3824)
+++ vpn-daemons/openvpn/src/nm-openvpn-service.c	(Arbeitskopie)
@@ -53,7 +53,7 @@
 #include "nm-openvpn-service.h"
 #include "nm-utils.h"
 
-#define NM_OPENVPN_HELPER_PATH		BINDIR"/nm-openvpn-service-openvpn-helper"
+#define NM_OPENVPN_HELPER_PATH		LIBEXECDIR"/nm-openvpn-service-openvpn-helper"
 
 G_DEFINE_TYPE (NMOpenvpnPlugin, nm_openvpn_plugin, NM_TYPE_VPN_PLUGIN)
 
Index: vpn-daemons/openvpn/properties/Makefile.am
===================================================================
--- vpn-daemons/openvpn/properties/Makefile.am	(Revision 3824)
+++ vpn-daemons/openvpn/properties/Makefile.am	(Arbeitskopie)
@@ -1,7 +1,7 @@
+plugindir = $(libdir)/NetworkManager
 
+plugin_LTLIBRARIES = libnm-openvpn-properties.la
 
-lib_LTLIBRARIES = libnm-openvpn-properties.la
-
 libnm_openvpn_properties_la_SOURCES = \
 	nm-openvpn.c \
 	nm-openvpn.h \
Index: vpn-daemons/openvpn/Makefile.am
===================================================================
--- vpn-daemons/openvpn/Makefile.am	(Revision 3824)
+++ vpn-daemons/openvpn/Makefile.am	(Arbeitskopie)
@@ -22,10 +22,8 @@
 icon_DATA = gnome-mime-application-x-openvpn-settings.png
 endif
 
-nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in Makefile
-	sed	-e 's|[ ]BINDIR[@]|$(bindir)|g' \
-		< $(srcdir)/nm-openvpn-service.name.in \
-		> nm-openvpn-service.name
+nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in
+	sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
 
 EXTRA_DIST = nm-openvpn-service.name.in \
              $(dbusservice_DATA)  \
Index: vpn-daemons/vpnc/src/Makefile.am
===================================================================
--- vpn-daemons/vpnc/src/Makefile.am	(Revision 3824)
+++ vpn-daemons/vpnc/src/Makefile.am	(Arbeitskopie)
@@ -4,7 +4,6 @@
 	$(DBUS_CFLAGS) \
 	$(GTHREAD_CFLAGS) \
 	$(NM_UTILS_CFLAGS) \
-	-Wall \
 	-DDBUS_API_SUBJECT_TO_CHANGE \
 	-DG_DISABLE_DEPRECATED \
 	-DBINDIR=\"$(bindir)\" \
@@ -16,7 +15,7 @@
 	-DLOCALSTATEDIR=\""$(localstatedir)"\" \
 	-DDATADIR=\"$(datadir)\"
 
-bin_PROGRAMS = nm-vpnc-service nm-vpnc-service-vpnc-helper
+libexec_PROGRAMS = nm-vpnc-service nm-vpnc-service-vpnc-helper
 
 nm_vpnc_service_SOURCES = \
 				nm-vpnc-service.c \
Index: vpn-daemons/vpnc/src/nm-vpnc-service.c
===================================================================
--- vpn-daemons/vpnc/src/nm-vpnc-service.c	(Revision 3824)
+++ vpn-daemons/vpnc/src/nm-vpnc-service.c	(Arbeitskopie)
@@ -30,7 +30,7 @@
 	NULL
 };
 
-#define NM_VPNC_HELPER_PATH		BINDIR"/nm-vpnc-service-vpnc-helper"
+#define NM_VPNC_HELPER_PATH		LIBEXECDIR"/nm-vpnc-service-vpnc-helper"
 #define NM_VPNC_UDP_ENCAPSULATION_PORT	0 /* random port */
 
 typedef struct {
Index: vpn-daemons/vpnc/properties/Makefile.am
===================================================================
--- vpn-daemons/vpnc/properties/Makefile.am	(Revision 3824)
+++ vpn-daemons/vpnc/properties/Makefile.am	(Arbeitskopie)
@@ -1,7 +1,7 @@
+plugindir = $(libdir)/NetworkManager
 
+plugin_LTLIBRARIES = libnm-vpnc-properties.la
 
-lib_LTLIBRARIES = libnm-vpnc-properties.la
-
 libnm_vpnc_properties_la_SOURCES = \
 	pcf-file.c \
 	pcf-file.h \
Index: vpn-daemons/vpnc/nm-vpnc-service.name.in
===================================================================
--- vpn-daemons/vpnc/nm-vpnc-service.name.in	(Revision 3824)
+++ vpn-daemons/vpnc/nm-vpnc-service.name.in	(Arbeitskopie)
@@ -1,7 +1,7 @@
 [VPN Connection]
 name=vpnc
 service=org.freedesktop.NetworkManager.vpnc
-program= BINDIR@/nm-vpnc-service
+program= LIBEXECDIR@/nm-vpnc-service
 
 [GNOME]
 auth-dialog=nm-vpnc-auth-dialog
Index: vpn-daemons/vpnc/Makefile.am
===================================================================
--- vpn-daemons/vpnc/Makefile.am	(Revision 3824)
+++ vpn-daemons/vpnc/Makefile.am	(Arbeitskopie)
@@ -22,10 +22,8 @@
 icon_DATA = gnome-mime-application-x-cisco-vpn-settings.png
 endif
 
-nm-vpnc-service.name: $(srcdir)/nm-vpnc-service.name.in Makefile
-	sed	-e 's|[ ]BINDIR[@]|$(bindir)|g' \
-		< $(srcdir)/nm-vpnc-service.name.in \
-		> nm-vpnc-service.name
+nm-vpnc-service.name: $(srcdir)/nm-vpnc-service.name.in
+	sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
 
 EXTRA_DIST = nm-vpnc-service.name.in \
              $(dbusservice_DATA)  \
Index: marshallers/Makefile.am
===================================================================
--- marshallers/Makefile.am	(Revision 3824)
+++ marshallers/Makefile.am	(Arbeitskopie)
@@ -9,8 +9,6 @@
 
 libmarshallers_la_CPPFLAGS = \
 	$(GTHREAD_CFLAGS) \
-	-g \
-	-Wall \
 	-DG_DISABLE_DEPRECATED
 
 

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]