[lfs-patches] r2407 - trunk/NetworkManager

wblaszcz at linuxfromscratch.org wblaszcz at linuxfromscratch.org
Mon Apr 2 05:27:55 PDT 2012


Author: wblaszcz
Date: 2012-04-02 06:27:45 -0600 (Mon, 02 Apr 2012)
New Revision: 2407

Added:
   trunk/NetworkManager/NetworkManager-0.9.4.0-lfs-1.patch
Log:
Updated NetworkManager patch for version 0.9.4.0.

Added: trunk/NetworkManager/NetworkManager-0.9.4.0-lfs-1.patch
===================================================================
--- trunk/NetworkManager/NetworkManager-0.9.4.0-lfs-1.patch	                        (rev 0)
+++ trunk/NetworkManager/NetworkManager-0.9.4.0-lfs-1.patch	2012-04-02 12:27:45 UTC (rev 2407)
@@ -0,0 +1,292 @@
+Submitted By: Wayne Blaszczyk <wblaszcz at bigpond dot net dot au>
+Date: 2012-01-10
+Initial Package Version: 0.8.998
+Upstream Status: Not submitted
+Origin: Wayne Blaszczyk
+Description: Modified the NetworkManagerLFS.c file. Altered the
+nm_system_update_dns function to be more appropriate
+(we probably don't run nscd, but we might).
+
+diff -Naur c/config.h.in d/config.h.in
+--- c/config.h.in	2012-03-24 07:11:38.000000000 +1100
++++ d/config.h.in	2012-04-02 21:14:32.000000000 +1000
+@@ -180,6 +180,9 @@
+ /* Define if you have Gentoo */
+ #undef TARGET_GENTOO
+ 
++/* Define if you have LFS */
++#undef TARGET_LFS
++
+ /* Define if you have linexa */
+ #undef TARGET_LINEXA
+ 
+diff -Naur c/configure d/configure
+--- c/configure	2012-03-24 07:11:23.000000000 +1100
++++ d/configure	2012-04-02 21:24:18.000000000 +1000
+@@ -728,6 +728,8 @@
+ LIBM
+ WITH_WEXT_FALSE
+ WITH_WEXT_TRUE
++TARGET_LFS_FALSE
++TARGET_LFS_TRUE
+ TARGET_EXHERBO_FALSE
+ TARGET_EXHERBO_TRUE
+ TARGET_LINEXA_FALSE
+@@ -1687,7 +1689,7 @@
+   --with-docs             Build NetworkManager documentation
+   --with-distro=DISTRO    Specify the Linux distribution to target: One of
+                           redhat, suse, gentoo, debian, arch, slackware,
+-                          paldo, mandriva, pardus, linexa or exherbo
++                          paldo, mandriva, pardus, linexa, exherbo or lfs
+   --with-dist-version=<NM-distribution-version>
+                           Define the NM's distribution version string
+   --with-wext=yes         Enable or disable Linux Wireless Extensions
+@@ -19602,6 +19604,25 @@
+   with_distro="exherbo"
+ fi
+ 
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /etc/lfs-release" >&5
++$as_echo_n "checking for /etc/lfs-release... " >&6; }
++if test "${ac_cv_file__etc_lfs_release+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  test "$cross_compiling" = yes &&
++  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
++if test -r "/etc/lfs-release"; then
++  ac_cv_file__etc_lfs_release=yes
++else
++  ac_cv_file__etc_lfs_release=no
++fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__etc_lfs_release" >&5
++$as_echo "$ac_cv_file__etc_lfs_release" >&6; }
++if test "x$ac_cv_file__etc_lfs_release" = x""yes; then :
++  with_distro="lfs"
++fi
++
+ 	if test "z$with_distro" = "z"; then
+ 		with_distro=`lsb_release -is`
+ 	fi
+@@ -19613,7 +19634,7 @@
+ 	exit 1
+ else
+ 	case $with_distro in
+-		redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic) ;;
++		redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|lfs|generic) ;;
+ 		*)
+ 			echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
+ 			exit 1
+@@ -19803,6 +19824,20 @@
+ 
+ fi
+ 
++ if test x"$with_distro" = xlfs; then
++  TARGET_LFS_TRUE=
++  TARGET_LFS_FALSE='#'
++else
++  TARGET_LFS_TRUE='#'
++  TARGET_LFS_FALSE=
++fi
++
++if test x"$with_distro" = xlfs; then
++
++$as_echo "#define TARGET_LFS 1" >>confdefs.h
++
++fi
++
+ 
+ # Check whether --with-dist-version was given.
+ if test "${with_dist_version+set}" = set; then :
+@@ -23295,6 +23330,10 @@
+   as_fn_error $? "conditional \"TARGET_EXHERBO\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
++if test -z "${TARGET_LFS_TRUE}" && test -z "${TARGET_LFS_FALSE}"; then
++  as_fn_error $? "conditional \"TARGET_LFS\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
+ if test -z "${WITH_WEXT_TRUE}" && test -z "${WITH_WEXT_FALSE}"; then
+   as_fn_error $? "conditional \"WITH_WEXT\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+diff -Naur c/configure.ac d/configure.ac
+--- c/configure.ac	2012-03-24 07:11:15.000000000 +1100
++++ d/configure.ac	2012-04-02 21:28:21.000000000 +1000
+@@ -107,7 +107,7 @@
+ dnl
+ AC_C_BIGENDIAN
+ 
+-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva, pardus, linexa or exherbo]))
++AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch, slackware, paldo, mandriva, pardus, linexa, exherbo or lfs]))
+ if test "z$with_distro" = "z"; then
+ 	AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
+ 	AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
+@@ -121,6 +121,7 @@
+ 	AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
+ 	AC_CHECK_FILE(/etc/linexa-release,with_distro="linexa")
+ 	AC_CHECK_FILE(/etc/exherbo-release,with_distro="exherbo")
++	AC_CHECK_FILE(/etc/lfs-release,with_distro="lfs")
+ 	if test "z$with_distro" = "z"; then
+ 		with_distro=`lsb_release -is`
+ 	fi
+@@ -132,7 +133,7 @@
+ 	exit 1
+ else
+ 	case $with_distro in
+-		redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|generic) ;;
++		redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo|lfs|generic) ;;
+ 		*)
+ 			echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
+ 			exit 1
+@@ -205,6 +206,11 @@
+   AC_DEFINE(TARGET_EXHERBO, 1, [Define if you have Exherbo])
+ fi
+ 
++AM_CONDITIONAL(TARGET_LFS, test x"$with_distro" = xlfs)
++if test x"$with_distro" = xlfs; then
++  AC_DEFINE(TARGET_LFS, 1, [Define if you have LFS])
++fi
++
+ dnl
+ dnl Distribution version string
+ dnl
+diff -Naur c/src/backends/Makefile.am d/src/backends/Makefile.am
+--- c/src/backends/Makefile.am	2012-02-28 02:57:16.000000000 +1100
++++ d/src/backends/Makefile.am	2012-04-02 21:01:46.000000000 +1000
+@@ -64,6 +64,10 @@
+ libnmbackend_la_SOURCES += NetworkManagerExherbo.c
+ endif
+ 
++if TARGET_LFS
++libnmbackend_la_SOURCES += NetworkManagerLFS.c
++endif
++
+ libnmbackend_la_LIBADD += \
+ 	$(top_builddir)/src/logging/libnm-logging.la \
+ 	$(LIBNL_LIBS) \
+diff -Naur c/src/backends/Makefile.in d/src/backends/Makefile.in
+--- c/src/backends/Makefile.in	2012-03-24 07:11:29.000000000 +1100
++++ d/src/backends/Makefile.in	2012-04-02 21:13:10.000000000 +1000
+@@ -47,6 +47,7 @@
+ @TARGET_PARDUS_TRUE at am__append_11 = NetworkManagerPardus.c
+ @TARGET_LINEXA_TRUE at am__append_12 = NetworkManagerLinexa.c
+ @TARGET_EXHERBO_TRUE at am__append_13 = NetworkManagerExherbo.c
++ at TARGET_LFS_TRUE@am__append_14 = NetworkManagerLFS.c
+ subdir = src/backends
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+@@ -80,7 +81,7 @@
+ 	NetworkManagerArch.c NetworkManagerPaldo.c \
+ 	NetworkManagerFrugalware.c NetworkManagerMandriva.c \
+ 	NetworkManagerPardus.c NetworkManagerLinexa.c \
+-	NetworkManagerExherbo.c
++	NetworkManagerExherbo.c NetworkManagerLFS.c
+ @TARGET_REDHAT_TRUE at am__objects_1 =  \
+ @TARGET_REDHAT_TRUE@	libnmbackend_la-NetworkManagerRedHat.lo
+ @TARGET_SUSE_TRUE at am__objects_2 =  \
+@@ -102,11 +103,14 @@
+ @TARGET_LINEXA_TRUE@	libnmbackend_la-NetworkManagerLinexa.lo
+ @TARGET_EXHERBO_TRUE at am__objects_12 =  \
+ @TARGET_EXHERBO_TRUE@	libnmbackend_la-NetworkManagerExherbo.lo
++ at TARGET_LFS_TRUE@am__objects_13 =  \
++ at TARGET_LFS_TRUE@	libnmbackend_la-NetworkManagerLFS.lo
+ am_libnmbackend_la_OBJECTS = libnmbackend_la-NetworkManagerGeneric.lo \
+ 	$(am__objects_1) $(am__objects_2) $(am__objects_3) \
+ 	$(am__objects_4) $(am__objects_5) $(am__objects_6) \
+ 	$(am__objects_7) $(am__objects_8) $(am__objects_9) \
+-	$(am__objects_10) $(am__objects_11) $(am__objects_12)
++	$(am__objects_10) $(am__objects_11) $(am__objects_12) \
++	$(am__objects_13)
+ libnmbackend_la_OBJECTS = $(am_libnmbackend_la_OBJECTS)
+ AM_V_lt = $(am__v_lt_$(V))
+ am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+@@ -381,7 +385,7 @@
+ 	$(am__append_2) $(am__append_3) $(am__append_4) \
+ 	$(am__append_5) $(am__append_6) $(am__append_7) \
+ 	$(am__append_8) $(am__append_10) $(am__append_11) \
+-	$(am__append_12) $(am__append_13)
++	$(am__append_12) $(am__append_13) $(am__append_14)
+ libnmbackend_la_LIBADD = $(am__append_9) \
+ 	$(top_builddir)/src/logging/libnm-logging.la $(LIBNL_LIBS) \
+ 	$(DBUS_LIBS) $(GLIB_LIBS)
+@@ -452,6 +456,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerFrugalware.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerGeneric.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerGentoo.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerLFS.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerLinexa.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerMandriva.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libnmbackend_la-NetworkManagerPaldo.Plo at am__quote@
+@@ -591,6 +596,14 @@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnmbackend_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnmbackend_la-NetworkManagerExherbo.lo `test -f 'NetworkManagerExherbo.c' || echo '$(srcdir)/'`NetworkManagerExherbo.c
+ 
++libnmbackend_la-NetworkManagerLFS.lo: NetworkManagerLFS.c
++ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnmbackend_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libnmbackend_la-NetworkManagerLFS.lo -MD -MP -MF $(DEPDIR)/libnmbackend_la-NetworkManagerLFS.Tpo -c -o libnmbackend_la-NetworkManagerLFS.lo `test -f 'NetworkManagerLFS.c' || echo '$(srcdir)/'`NetworkManagerLFS.c
++ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libnmbackend_la-NetworkManagerLFS.Tpo $(DEPDIR)/libnmbackend_la-NetworkManagerLFS.Plo
++ at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='NetworkManagerLFS.c' object='libnmbackend_la-NetworkManagerLFS.lo' libtool=yes @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libnmbackend_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libnmbackend_la-NetworkManagerLFS.lo `test -f 'NetworkManagerLFS.c' || echo '$(srcdir)/'`NetworkManagerLFS.c
++
+ mostlyclean-libtool:
+ 	-rm -f *.lo
+ 
+diff -Naur c/src/backends/NetworkManagerLFS.c d/src/backends/NetworkManagerLFS.c
+--- c/src/backends/NetworkManagerLFS.c	1970-01-01 10:00:00.000000000 +1000
++++ d/src/backends/NetworkManagerLFS.c	2012-04-02 22:09:39.000000000 +1000
+@@ -0,0 +1,55 @@
++/* NetworkManager -- Network link manager
++ *
++ * Backend implementation for Beyond Linux From Scratch
++ * http://www.linuxfromscratch.org/blfs/
++ *
++ * Wayne Blaszczyk <wblaszcz at bigpond.net.au>
++ *
++ * Heavily based on NetworkManagerPaldo.c by Jürg Billeter <juerg at paldo.org>
++ *
++ * Heavily based on NetworkManagerRedhat.c by Dan Williams <dcbw at redhat.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * (C) Copyright 2004 - 2012 Red Hat, Inc.
++ * (C) Copyright 2006 Jürg Billeter
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include "NetworkManagerGeneric.h"
++#include "NetworkManagerUtils.h"
++#include "nm-logging.h"
++
++void nm_backend_enable_loopback (void)
++{
++       nm_spawn_process ("/etc/rc.d/init.d/localnet restart");
++}
++
++void nm_backend_update_dns (void)
++{
++        if (g_file_test("/var/run/nscd/nscd.pid", G_FILE_TEST_EXISTS)) {
++               nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
++               nm_spawn_process ("/usr/sbin/nscd -i hosts");
++    }
++}
++
++int nm_backend_ipv6_use_tempaddr (void)
++{
++	return nm_generic_ipv6_use_tempaddr ();
++}
++




More information about the patches mailing list