diff options
49 files changed, 3152 insertions, 674 deletions
diff --git a/debian/NetworkManager.sgml b/debian/NetworkManager.sgml deleted file mode 100644 index 61ea2121..00000000 --- a/debian/NetworkManager.sgml +++ /dev/null @@ -1,136 +0,0 @@ -<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ - -<!-- Process this file with docbook-to-man to generate an nroff manual - page: `docbook-to-man manpage.sgml > manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - <!-- Please adjust the date whenever revising the manpage. --> - <!ENTITY date "<date>30 August, 2005</date>"> - <!-- SECTION should be 1-8, maybe w/ subsection other parameters are - allowed: see man(7), man(1). --> - <!ENTITY package "NetworkManager"> - <!ENTITY gnu "<acronym>GNU</acronym>"> - <!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> -]> - -<refentry> - <refentryinfo> - <address> - <email>j@bootlab.org</email>; - </address> - <author> - <firstname>Jan</firstname> - <surname>Gerber</surname> - </author> - <copyright> - <year>2005</year> - <holder>Jan Gerber</holder> - </copyright> - &date; - </refentryinfo> - <refmeta> - <refentrytitle>NetworkManager</refentrytitle> - <manvolnum>1</manvolnum> - </refmeta> - <refnamediv> - <refname>&package;</refname> - - <refpurpose>Network management framework</refpurpose> - </refnamediv> - <refsynopsisdiv> - <cmdsynopsis> - <command>&package;</command> - <arg><option>--no-daemon</option></arg> - <arg><option>--enable-test-devices</option></arg> - <arg><option>--help</option></arg> - </cmdsynopsis> - </refsynopsisdiv> - <refsect1> - <title>DESCRIPTION</title> - - <para>This manual page documents briefly the - <command>&package;</command> command.</para> - - <para><command>&package;</command> monitors all network connections and automatically chooses the best connection to use. It is started as a system service by <command>dbus</command>. <command>nm-applet</command> allows you to specify wireless access points which wireless cards in the computer should associate with</para> - </refsect1> - <refsect1> - <title>OPTIONS</title> - - <para>This program follows the usual &gnu; command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. </para> - - <variablelist> - <varlistentry> - <term> - <option>--no-daemon</option> - </term> - <listitem> - <para>Don't become a daemon, Messages will be logged to stdout</para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <option>--enable-test-devices</option> - </term> - <listitem> - <para>Allow dummy devices to be created via DBUS methods [DEBUG]</para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <option>--help</option> - </term> - <listitem> - <para>Show summary of options.</para> - </listitem> - </varlistentry> - </variablelist> - </refsect1> - <refsect1> - <title>SEE ALSO</title> - - <para>nm-applet (1), NetworkManagerDispatcher (1).</para> - - <para>More Information about NetworkManager can be found at - http://www.gnome.org/projects/NetworkManager/ .</para> - </refsect1> - <refsect1> - <title>AUTHOR</title> - - <para>This manual page was written by Jan Gerber <email>j@bootlab.org</email> and by - Riccardo Setti <email>giskard@autistici.org</email> for - the <productname>Debian/Ubuntu</productname> system. - </para> - - </refsect1> -</refentry> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:2 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:nil -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> diff --git a/debian/NetworkManagerDispatcher.sgml b/debian/NetworkManagerDispatcher.sgml deleted file mode 100644 index d42b2903..00000000 --- a/debian/NetworkManagerDispatcher.sgml +++ /dev/null @@ -1,97 +0,0 @@ -<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ - -<!-- Process this file with docbook-to-man to generate an nroff manual - page: `docbook-to-man manpage.sgml > manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - <!-- Please adjust the date whenever revising the manpage. --> - <!ENTITY date "<date>30 August, 2005</date>"> - <!-- SECTION should be 1-8, maybe w/ subsection other parameters are - allowed: see man(7), man(1). --> - <!ENTITY package "NetworkManagerDispatcher"> - <!ENTITY gnu "<acronym>GNU</acronym>"> - <!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> -]> - -<refentry> - <refentryinfo> - <address> - <email>j@bootlab.org</email>; - </address> - <author> - <firstname>Jan</firstname> - <surname>Gerber</surname> - </author> - <copyright> - <year>2005</year> - <holder>Jan Gerber</holder> - </copyright> - &date; - </refentryinfo> - <refmeta> - <refentrytitle>NetworkManagerDispatcher</refentrytitle> - <manvolnum>1</manvolnum> - </refmeta> - <refnamediv> - <refname>&package;</refname> - - <refpurpose>Network management framework</refpurpose> - </refnamediv> - <refsynopsisdiv> - <cmdsynopsis> - <command>&package;</command> - </cmdsynopsis> - </refsynopsisdiv> - <refsect1> - <title>DESCRIPTION</title> - - <para><command>&package;</command> calls scripts in -/etc/NetworkManager/dispatcher.d each time the network is broght up or down by NetworkManager. Arguments to these scripts are network device and up or down. so it will call something like /etc/NetworkManager/dispatcher.d/example eth0 up -</para> - </refsect1> - <refsect1> - <title>SEE ALSO</title> - - <para>NetworkManager (1), nm-applet (1).</para> - - <para>More Information about NetworkManager can be found at - http://www.gnome.org/projects/NetworkManager/ .</para> - </refsect1> - <refsect1> - <title>AUTHOR</title> - - <para>This manual page was written by Jan Gerber <email>j@bootlab.org</email> and by Riccardo Setti - <email>giskard@autistici.org</email> for the <productname>Debian/Ubuntu</productname> system. - </para> - - </refsect1> -</refentry> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:2 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:nil -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index a34d88d8..00000000 --- a/debian/README.Debian +++ /dev/null @@ -1,11 +0,0 @@ -NetworkManger has two parts one is run on the system level to -manager connections and gather information. The other is an applet -the user can interact with. Since NetworkManager is not part of -main yet, you have to add nm-applet to your session once. - -(instructions for gnome only) -First add yourself to the netdev group -Go to System -> Preferences -> Sessions -In the Startup Programs tab, click Add -type "nm-applet", click OK. -log out of your gnome session, and log back in again. diff --git a/debian/changelog b/debian/changelog index b04ef708..e7dea542 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,22 +1,372 @@ +network-manager (0.6.5-5) unstable; urgency=low + + * Rebuild against libnl1. (Closes: #461922) + * debian/patches/24-get_mode_fix_r3122.patch + - Pull r3122 from upstream stable branch. + - Fix getting mode of device. + * debian/patches/25-libnl_unique_pid_r3155.patch + - Pull r3155 from stable branch. + - Ensures that the netlink pid is unique. + * debian/patches/26-libnl_1.0-pre8_r3206.patch + - Pull r3206 from upstream stable branch. + - Replaces 24-libnl1-pre8_fix.patch, which has been removed. + - Fixes a FTBFS on architectures using SIGTRAP in G_BREAKPOINT(). + (Closes: #459740) + * debian/patches/13-validate_mac_addr.patch + - Drop APs with an invalid MAC address. (Closes: #461500) + Thanks to Sjoerd Simons for the patch. + * debian/patches/27-dont_repeat_errors.patch + - Backported r3160 from upstream stable branch. + - Don't repeat killswitch errors too often. (Closes: #456363) + * debian/network-manager.init, + debian/network-manager.network-manager-dispatcher.init + - Fix LSB init header. Use $remote_fs instead of $local_fs as the + daemon requires /usr to be mounted. + Remove S from Should-Stop. (Closes: #459480) + - Shorten retry-time to 5 secs on stop. + - Don't fail to start if daemon is already running. + + -- Michael Biebl <biebl@debian.org> Fri, 25 Jan 2008 00:11:47 +0100 + +network-manager (0.6.5-4) unstable; urgency=low + + * debian/control + - The Vcs-* fields are now officially supported, so remove the XS- prefix. + - Bump Build-Depends on libnl-dev to (>= 1.0~pre8). + * debian/patches/24-libnl1-pre8_fix.patch + - Backport support for libnl 1.0-pre8 from upstream SVN. + * debian/network-manager.dirs + - Add /var/run/NetworkManager. + * debian/network-manager-dispatcher.script + - Set PHASE="post-up" for scripts in if-up.d and PHASE="pre-down" for + scripts in if-down.d to be compliant with ifupdown. (Closes: #452371) + * debian/patches/12_readme_format.patch + - Fix line break in README file. (Closes: #444038) + + -- Michael Biebl <biebl@debian.org> Tue, 25 Dec 2007 16:51:00 +0100 + +network-manager (0.6.5-3) unstable; urgency=low + + * debian/patches/23-rfkill_return_type.patch + - The return type of the GetPower() method from Device.Killswitch has + changed from UINT32 to INT32 in hal-0.5.10. Fix the code accordingly. + + -- Michael Biebl <biebl@debian.org> Mon, 22 Oct 2007 17:05:44 +0200 + +network-manager (0.6.5-2) unstable; urgency=low + + * debian/patches/21-endianess_fix_r2754.patch + - Fixes a problem with ASCII passphrases on big-endian systems due to a missing + config.h include. (Closes: 391364) + * debian/network-manager.manpages + - Install nm-vpn-properties manpage. + * debian/control + - Use the new "Homepage:" field to specify the upstream URL. + * 22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch + - Patch from Ubuntu. Don't set the GNOME_DISABLE_DEPRECATED flag as + nm-vpn-properties requires gnome druid which has been deprecated in + libgnomeui 2.20. + + -- Michael Biebl <biebl@debian.org> Fri, 28 Sep 2007 21:12:33 +0200 + +network-manager (0.6.5-1) unstable; urgency=low + + * New upstream release. (Closes: #420959, #431658) + - Runs wpa_supplicant in less verbose mode. (Closes: #375302, #431562) + - Adds support for LEAP and phase two authentication. + (Closes: #420959, #402747) + * Removed patches that were merged upstream + - debian/patches/09_fix_bigendian_words.patch + - debian/patches/12_dbus1.0.patch + - debian/patches/13-wep_capabilities + * debian/network-manager.preinst + - Do not parse /var/lib/dpkg/status directly but use dpkg-query instead. + * Rebased and updated patches for new release + - debian/patches/11-man_page_sh_name.patch + - debian/patches/05-debian_backend.patch + * Upstream has split nm-applet into a separate package. This means we no + longer build the network-manager-gnome binary package from this source + package. + - Removed files that are now part of the new nm-applet source package + + debian/network-manager-gnome.README.Debian + + debian/patches/10-po_fr.patch + + debian/patches/14-po_de.patch + + debian/patches/03-dbus_access_nm_applet.patch + + debian/network-manager-gnome.manpages + + debian/nm-applet.sgml + + debian/network-manager.install + + debian/network-manager-gnome.install + - debian/control + + Remove the binary package network-manager-gnome. + + Add Conflicts/Replaces: network-manager-gnome (<< 0.6.5-1) as + nm-vpn-properties is now part of the network-manager binary package. + + Update Build-Depends. Add autotools-dev, libglib2.0-dev and iproute, + remove libpanel-applet2-dev. + - debian/rules + + Do not build the nm-applet.1 manpage anymore. + + Exclude nm-vpn-properties from dh_shlibdeps. This is a temporary + workaround until this binary has also been moved into the nm-applet + source package. + - debian/copyright + + Remove the copyright notices for files which are now in the nm-applet + source package. + * debian/patches/20-stable_branch_updates_r2652.patch + - Pull updates from the stable branch up until revision 2652. + - Fixes broken link detection and a couple of smaller issues. + - Adds support for the rfkill switch. + * debian/patches/02-dbus_access_network_manager.patch + - Add support for at_console dbus access check. (Closes: #426462) + + -- Michael Biebl <biebl@debian.org> Mon, 27 Aug 2007 00:39:16 +0200 + +network-manager (0.6.4-8) unstable; urgency=low + + * Install the NetworkManager and NetworkManagerDispatcher start scripts as + regular SysV init scripts + - Rename debian/network-manager.dbus-event to debian/network-manager.init + and debian/network-manager-dispatcher.dbus-event to + debian/network-manager.network-manager-dispatcher.init. + - Add proper LSB headers to the init scripts. + - debian/rules + Call dh_installinit for network-manager and network-manager-dispatcher. + - debian/network-manager.{preinst,postinst,postrm} + Remove the old conffiles /etc/dbus-1/event.d/25NetworkManager and + /etc/dbus-1/event.d/26NetworkManagerDispatcher or rename them to + *.dpkg-bak if they were changed locally. + + -- Michael Biebl <biebl@debian.org> Tue, 24 Apr 2007 22:30:22 +0200 + +network-manager (0.6.4-7) unstable; urgency=low + + * debian/control + - Add Recommends: network-manager-gnome | network-manager-kde to + network-manager. + - Add Recommends: libpam-keyring to network-manager-gnome. This allows to + unlock the gnome-keyring automatically upon login. + - Add Recommends: network-manager-vpnc, network-manager-openvpn to + network-manager-gnome. (Closes: #406241) + - Add XS-Vcs-* fields. + - Add Depends: gnome-icon-theme to network-manager-gnome, which fixes a + problem with nm-applet failing to start because of missing icons. + (Closes: #372466) + - Change maintainer address to + pkg-utopia-maintainers@lists.alioth.debian.org. + Add Riccardo and myself to Uploaders. + * debian/patches/12_dbus1.0.patch + - Updated to unref rather than close the D-Bus connection. + * debian/patches/13-wep_capabilities.patch + - Correctly set the available WEP capabilities. (Closes: #411867) + Thanks to Andy Whitcroft for the patch! + * debian/network-manager-gnome.README.Debian + - Add a README.Debian file for network-manager-gnome. (Closes: #414187) + * debian/patches/14-po_de.patch + - Added. Small fix for the German translation. + * debian/patches/05-debian_backend.patch + - Updated. Set status variable to return code of ifup/ifdown. + (Closes: #415642) + - Only invalidate the nscd hosts cache when nscd is actually installed. + (Closes: #402436) + - Remove mDNSResponder restart from nm_system_restart_mdns_responder(). + mDNSResponder has been obsoleted by Avahi which does not need a restart. + + -- Michael Biebl <biebl@debian.org> Tue, 03 Apr 2007 02:21:57 +0200 + +network-manager (0.6.4-6) unstable; urgency=medium + + * debian/patches/10-po_fr.patch + - Added. Small fixes for the French translation. (Closes: #401060) + Thanks to Cyril Brulebois. + * debian/patches/12_dbus1.0.patch + - Updated 12_dbus0.9.patch for D-Bus 1.0 to pass the correct flags to + dbus_bus_request_name(). (Closes: #401039) + * debian/patches/11-man_page_sh_name.patch + - Add missing ".SH NAME" stanzas to man pages. + * debian/network-manager-gnome.install + - Install the nm-applet autostart file into /etc/xdg/autostart rather than + /usr/share/gnome/autostart to be compliant to the fd.o autostart spec. + * Urgency medium, as it fixes a FTBFS bug. + + -- Michael Biebl <biebl@debian.org> Thu, 30 Nov 2006 21:30:47 +0100 + +network-manager (0.6.4-5) unstable; urgency=low + + * Small fix for the NetworkManagerDispatcher init script. + + -- Michael Biebl <biebl@debian.org> Wed, 25 Oct 2006 11:00:34 +0200 + +network-manager (0.6.4-4) unstable; urgency=low + + * Correct typo in package description. (Closes: #390062) + * debian/network-manager.postinst + - Create group netdev if not yet existent. Add a Depends on adduser. + * Add instructions to README.Debian how to restart NetworkManager after + modifying /etc/network/interfaces. (Closes: 384892) + * debian/patches/05-debian_backend.patch + - Fix the parser for /etc/network/interfaces. (Closes: #383765) + - Do not restart nscd on dns changes, only invalidate the hosts cache. + + -- Michael Biebl <biebl@debian.org> Tue, 24 Oct 2006 20:18:18 +0200 + +network-manager (0.6.4-3) unstable; urgency=low + + * Changed adeprecated dbus function. (Closes: 385380) + - Added 12_dbus0.9.patch. + + -- Riccardo Setti <giskard@debian.org> Tue, 5 Sep 2006 19:48:00 +0200 + +network-manager (0.6.4-2) unstable; urgency=low + + * Ship the nm-tool binary. (Closes: #384891) + + -- Michael Biebl <biebl@teco.edu> Tue, 15 Aug 2006 23:42:09 +0200 + +network-manager (0.6.4-1) unstable; urgency=low + + [ Riccardo Setti ] + * New upstream release. (Closes: #379163) + - Bumped hal deps to version 0.5.7.1. NM needs user haldaemon for dbus + operations. + * Allow interfaces marked "auto-hotplug" to be managed by NM. + (Closes: #381017) + * Added 09_fix_bigendian_words.patch which will fix the WPA+plain text pw + auth method on powerpc (and on other bigendian archs). (Closes: #381464) + + [ Michael Biebl ] + * Merged the patches 05-resolvconf.patch and 08-disabled_devices.patch into + a single patch called 05-debian_backend.patch. + * Updated 05-debian_backend.patch to not control mapped interfaces. + (Closes: #377498) + + -- Michael Biebl <biebl@teco.edu> Tue, 8 Aug 2006 01:51:13 +0200 + +network-manager (0.6.3-2) unstable; urgency=low + + * Updated 02-dbus_access_network_manager.patch to allow the hal daemon + (running as user "hal") to send events about hotplugged devices to the + NetworkManager daemon. (Closes: 355785) + * Added a Recommends: notification-daemon to network-manager-gnome. + * Improved the package description and the manpage of network-manager-gnome. + (Closes: #362962) + + -- Michael Biebl <biebl@teco.edu> Tue, 20 Jun 2006 23:22:11 +0200 + +network-manager (0.6.3-1) unstable; urgency=low + + * New upstream release. + - Removed 07-libnm_glib_reconnect_dbus.patch, merged upstream. + - Removed 09-nm_bad_mutex_free.patch, fixed upstream. + - Removed 10-interface_parser_fixes.patch, merged upstream. + - Removed 11-carrier_detection.patch, merged upstream. + * Added a watch file. + * Added homepage URL to package description. + + -- Michael Biebl <biebl@teco.edu> Thu, 8 Jun 2006 16:21:43 +0200 + +network-manager (0.6.2-3) unstable; urgency=low + + * Ship the NEWS.Debian file only for the network-manager package. + (Closes: #367063) + * Added 11-carrier_detection.patch to support network cards which can't do + carrier detection. (Closes: #366373) + + -- Michael Biebl <biebl@teco.edu> Tue, 16 May 2006 00:16:43 +0200 + +network-manager (0.6.2-2) unstable; urgency=low + + * More integration work. (Closes: #355244) + - Added network-manager-dispatcher.script and + 06-dispatch_more_events.patch. + This way the scripts in /etc/networks/if-*.d/ are called properly by + NetworkManagerDispatcher. + Thanks to the Ubuntu devs for this work! + - Added 08-disabled_devices.patch. Network interfaces listed in + /etc/network/interfaces which are not configured "auto" and "dhcp" are + not handled by NM. This makes it possible to configure interfaces + statically and have NM not messing with them. + Updated README.Debian to reflect these changes. + - Added 09-nm_bad_mutex_free.patch. Otherwise NM crashes if a device is + disabled. + * Added 07-libnm_glib_reconnect_dbus.patch which makes libnm_glib sleep + between unsuccessful connection attempts to dbus. (Closes: #366010) + * Bumped Standards-Version to 3.7.2, no further changes required. + * Removed *.la files from the dev packages as we also ship pkg-config files + which are a better alternative. + * Added 10-interface_parser_fixes.patch which fixes several problems with + the /etc/network/interfaces parser. (Closes: #355564) + + -- Michael Biebl <biebl@teco.edu> Fri, 5 May 2006 18:01:47 +0200 + +network-manager (0.6.2-1) unstable; urgency=low + + * New upstream release. + * Updated if_fix.patch, parts of it have been fixed upstream. + * Renamed patches to use a more consistent naming scheme. + * Depend on dhcbd (>= 1.12-2) because NM 0.6.2 does not start dhcdbd itself + anymore. + * The wpa_supplicant binary was moved from /usr/sbin to /sbin. Updated + debian/rules accordingly. + * Added dependency on hal (Closes: #356622) + * Added autostart file to network-manager-gnome. This way nm-applet is + started automatically on login. + + -- Michael Biebl <biebl@teco.edu> Sun, 2 Apr 2006 19:48:28 +0200 + +network-manager (0.6.1-1) unstable; urgency=low + + * New upstream release. + * Added myself to uploaders. + * Added a dependency on dbus. + + -- Michael Biebl <biebl@teco.edu> Tue, 14 Mar 2006 15:48:41 +0100 + +network-manager (0.6.0-1) unstable; urgency=low + + * New upstream release (Closes: #355246) + - most of the work is taken from the experimental branch of NM. + Thanks goes to Michael Biebl. + - Added NetworkManagerDebian.patch which introduce supports for resolvconf + * switched to debhelper5. + * added libnl-util0, libnl-util-dev packages. + - added debian/libnl-util0.install , debian/libnl-util-dev.install + * removed debian/dirs as it was useless. + * added a dependency on wpasupplicant as it's necessary for all encrypted + connections. + + -- Riccardo Setti <giskard@autistici.org> Thu, 9 Mar 2006 15:38:01 +0100 + +network-manager (0.5.1-3) unstable; urgency=low + + * improved debian/copyright . I hope this time it will be + good enough to pass the ftp-master check. Thanks to Joerg Jaspert who + has pointed me to the problem. + + -- Riccardo Setti <giskard@autistici.org> Sun, 26 Feb 2006 21:57:29 +0100 + network-manager (0.5.1-2) unstable; urgency=low * improved manpages. - - added nm-vpn-properties, nm-applet manpages - - added debian/network-manager-gnome.manpages - - modifyed NetworManager*.sgml for reflect the correct website. - * uploaded to unstable. - - -- Riccardo Setti <giskard@autistici.org> Wed, 8 Feb 2006 22:32:05 +0100 + - added nm-vpn-properties, nm-applet manpages + - added debian/network-manager-gnome.manpages + - modifyed NetworManager*.sgml for reflect the correct website. + * added nm-vpn-properties.desktop, nm-logo.xpm + * added dbus_access_network_manager and dbus_access_nm_applet patches: + - switched to group netdev + - updated the dep on dhcdbd + - removed debian/network-manager.dbus-conf debian/nm-applet.conf + * removed network-manager.doc as it was empty. + * uploaded to unstable. + + -- Riccardo Setti <giskard@autistici.org> Thu, 9 Feb 2006 10:18:13 +0100 network-manager (0.5.1-1) experimental; urgency=low * renamed 25NetworkManagerDispatcher in 26NetworkManagerDispatcher because - first we need to start NetworkManager and then NetworkManagerDispatcher + first we need to start NetworkManager and then NetworkManagerDispatcher * added networkmanger and networkmanaferdispatcher manpages. * Inital upload to Debian (Closes: #270538) * work based on the ubuntu package * Added 01.patch and 02.patch for fix the problem with recent linux - kernel-headers + kernel-headers -- Riccardo Setti <giskard@autistici.org> Mon, 5 Jan 2006 17:09:29 +0100 diff --git a/debian/control b/debian/control index 91b77181..d67c779c 100644 --- a/debian/control +++ b/debian/control @@ -1,16 +1,20 @@ Source: network-manager Section: net Priority: optional -Maintainer: Riccardo Setti <giskard@autistici.org> -Uploaders: Michael Biebl <biebl@teco.edu> -Build-Depends: debhelper (>= 5), cdbs, gnome-common, intltool, libgnome-keyring-dev, libdbus-glib-1-dev (>= 0.60), libiw-dev(>= 27+28pre9), libgnomeui-dev, libpanel-applet2-dev, libglade2-dev, libgconf2-dev, libhal-dev (>= 0.5.0), libnl-dev (>= 0.99+1.0.svn21), libnotify-dev (>= 0.3), docbook-to-man -Standards-Version: 3.6.2 +Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org> +Uploaders: Riccardo Setti <giskard@debian.org>, Michael Biebl <biebl@debian.org> +Build-Depends: debhelper (>= 5.0.0), cdbs, autotools-dev, intltool, libgnome-keyring-dev, libdbus-glib-1-dev (>= 0.60), libiw-dev(>= 27+28pre9), libgnomeui-dev, libglade2-dev, libglib2.0-dev, libgconf2-dev, libhal-dev (>= 0.5.0), libnl-dev (>= 1.0~pre8), libnotify-dev (>= 0.3), docbook-to-man, iproute +Standards-Version: 3.7.3 +Vcs-Svn: svn://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager +Vcs-Browser: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/networkmanager +Homepage: http://www.gnome.org/projects/NetworkManager/ Package: network-manager Architecture: any -Section: net -Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, iputils-arping, dhcdbd (>= 1.10), lsb-base (>= 2.0-6) -Recommends: wpasupplicant (>= 0.5.1) +Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, iputils-arping, dhcdbd (>=1.12-2), lsb-base (>= 3.0-6), wpasupplicant (>= 0.4.8), dbus (>= 0.60), hal (>= 0.5.7.1), ifupdown, adduser +Recommends: network-manager-gnome | network-manager-kde +Conflicts: network-manager-gnome (<< 0.6.5-1) +Replaces: network-manager-gnome (<< 0.6.5-1) Description: network management framework daemon NetworkManager attempts to keep an active network connection available at all times. It is intended only for the desktop use-case, and is not intended for @@ -21,27 +25,13 @@ Description: network management framework daemon . This package provides the userspace daemons. -Package: network-manager-gnome -Architecture: any -Section: gnome -Depends: ${shlibs:Depends}, ${misc:Depends}, network-manager -Description: network management framework (GNOME frontend) - NetworkManager attempts to keep an active network connection available at all - times. It is intended only for the desktop use-case, and is not intended for - usage on servers. The point of NetworkManager is to make networking - configuration and setup as painless and automatic as possible. If using DHCP, - NetworkManager is _intended_ to replace default routes, obtain IP addresses - from a DHCP server, and change nameservers whenever it sees fit. - . - This package provides the notification applet to the control system. - Package: network-manager-dev Architecture: any Section: devel -Depends: ${shlibs:Depends}, ${misc:Depends}, pkg-config -Description: network management framework daemon (development files) +Depends: pkg-config +Description: network management framework (development files) this package provides header files that are needed to - compile VPN Plugins for NetworManager. + compile VPN Plugins for NetworkManager. Package: libnm-glib0 Section: libs @@ -61,7 +51,7 @@ Description: network management framework (GLib shared library) Package: libnm-glib-dev Section: libdevel Architecture: any -Depends: libnm-glib0 (= ${Source-Version}), libglib2.0-dev, libdbus-glib-1-dev (>= 0.60) +Depends: libnm-glib0 (= ${binary:Version}), libglib2.0-dev, libdbus-glib-1-dev (>= 0.60) Description: network management framework (GLib interface) NetworkManager attempts to keep an active network connection available at all times. It is intended only for the desktop use-case, and is not intended for @@ -72,7 +62,7 @@ Description: network management framework (GLib interface) . This package provides the interface that applications can use to query connection status via NetworkManager. - + Package: libnm-util0 Section: libs Architecture: any @@ -85,13 +75,13 @@ Description: network management framework (shared library) NetworkManager is _intended_ to replace default routes, obtain IP addresses from a DHCP server, and change nameservers whenever it sees fit. . - This package contains a convenience library to ease the access to + This package contains a convenience library to ease the access to NetworkManager. Package: libnm-util-dev Section: libdevel Architecture: any -Depends: libnm-util0 (= ${Source-Version}), libglib2.0-dev, libdbus-glib-1-dev (>= 0.60) +Depends: libnm-util0 (= ${binary:Version}), libglib2.0-dev, libdbus-glib-1-dev (>= 0.60) Description: network management framework (development files) NetworkManager attempts to keep an active network connection available at all times. It is intended only for the desktop use-case, and is not intended for @@ -101,3 +91,4 @@ Description: network management framework (development files) from a DHCP server, and change nameservers whenever it sees fit. . This package contains header and development files. + diff --git a/debian/copyright b/debian/copyright index 2cc573e8..8813c529 100644 --- a/debian/copyright +++ b/debian/copyright @@ -22,13 +22,9 @@ License: License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -src/gnome-keyring-md5.c, gnome-keyring-md5.h is written by Colin Plumb. +libnm-util/gnome-keyring-md5.c, gnome-keyring-md5.h is written by Colin Plumb. This code is in the public domain; do with it what you wish. -gnome/nm-applet/eggtrayicon.c, eggtrayicon.h are copyright of -Anders Carlsson <andersca@gnu.org> and are released under the terms of -the GNU Lesser General Public. (see above). - src/nm-netlink-monitor.c is copyright of Ray Strode, David Zeuthen, <david@fubar.dk> and Novell, Inc. and it's released under the terms of the GNU General Public License. (see below). @@ -67,11 +63,7 @@ are released under the terms of the GNU General Public License. (see below). initscript/Debian/NetworkManager is copyright of <j@bootlab.org>, Mark Roach <mrroach@okmaybe.com>, Thom May <thom@debian.org> -gnome/applet/menu-info.c, menu-info.h are copyright of -Jonathan Blandford <jrb@redhat.com> and are released under the term of -the GNU General Public License. (see below). - -gnome//nm-vpn-properties.c, nm-vpn-properties.h are copyright of +gnome/nm-vpn-properties.c, nm-vpn-properties.h are copyright of David Zeuthen, <davidz@redhat.com> and are licensed to you under your choice of the Academic Free License version 2.0, or the GNU General Public License version 2. (see below) diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 5502ed8f..00000000 --- a/debian/docs +++ /dev/null @@ -1,3 +0,0 @@ -NEWS -README -TODO diff --git a/debian/libnm-glib-dev.install b/debian/libnm-glib-dev.install index 754ac2e6..624f7a5a 100644 --- a/debian/libnm-glib-dev.install +++ b/debian/libnm-glib-dev.install @@ -1,5 +1,4 @@ debian/tmp/usr/lib/pkgconfig/libnm_glib.pc debian/tmp/usr/lib/libnm_glib*.a -debian/tmp/usr/lib/libnm_glib*.la debian/tmp/usr/lib/libnm_glib*.so debian/tmp/usr/include/NetworkManager/libnm_glib.h diff --git a/debian/libnm-util-dev.install b/debian/libnm-util-dev.install index c6b4a027..66abe57e 100644 --- a/debian/libnm-util-dev.install +++ b/debian/libnm-util-dev.install @@ -1,6 +1,5 @@ debian/tmp/usr/lib/pkgconfig/libnm-util.pc debian/tmp/usr/lib/libnm-util.a -debian/tmp/usr/lib/libnm-util.la debian/tmp/usr/lib/libnm-util.so debian/tmp/usr/include/NetworkManager/cipher.h debian/tmp/usr/include/NetworkManager/cipher-wep-hex.h diff --git a/debian/network-manager-dispatcher.dbus-event b/debian/network-manager-dispatcher.dbus-event deleted file mode 100644 index 70747683..00000000 --- a/debian/network-manager-dispatcher.dbus-event +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh -# -# NetworkManager NetworkManagerDispatcher daemon -# Daemon for automatically switching network -# connections to the best available connection. -# This file should be placed in /etc/init.d. -# -# Authors: Christian Bjälevik <nafallo@magicalforest.se> -# Jan Gerber <j@bootlab.org> -# Mark Roach <mrroach@okmaybe.com> -# Thom May <thom@debian.org> -# -# - -set -e - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DESC="NetworkManager dispatcher" -NAME="NetworkManagerDispatcher" -DAEMON=/usr/sbin/$NAME -PIDDIR=/var/run/NetworkManager -PIDFILE=$PIDDIR/$NAME.pid -SCRIPTNAME=/etc/dbus-1/event.d/26$NAME -USER=root - -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - -. /lib/lsb/init-functions - -test -f /etc/default/rcS && . /etc/default/rcS -test -f /etc/default/NetworkManagerDispatcher && . /etc/default/NetworkManagerDispatcher - -# -# Function that starts the daemon/service. -# -d_start() { - log_begin_msg "Starting $DESC" - if [ ! -d $PIDDIR ]; then - mkdir -p $PIDDIR - chown $USER:$USER $PIDDIR - fi - - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE - - log_end_msg $? -} - -# -# Function that stops the daemon/service. -# -d_stop() { - log_begin_msg "Stopping $DESC" - start-stop-daemon --stop --quiet --pidfile $PIDFILE \ - --oknodo --user $USER --exec $DAEMON - log_end_msg $? -} - - -case "$1" in - start) - d_start - ;; - stop) - d_stop - ;; - restart|force-reload) - d_stop - sleep 1 - d_start - ;; - *) - log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/network-manager-dispatcher.script b/debian/network-manager-dispatcher.script new file mode 100644 index 00000000..fd182853 --- /dev/null +++ b/debian/network-manager-dispatcher.script @@ -0,0 +1,44 @@ +#!/bin/sh -e +# Script to dispatch NetworkManager events +# +# Runs ifupdown scripts when NetworkManager fiddles with interfaces. + +if [ -z "$1" ]; then + echo "$0: called with no interface" 1>&2 + exit 1; +fi + +# Fake ifupdown environment +export IFACE="$1" +export LOGICAL="$1" +export ADDRFAM="NetworkManager" +export METHOD="NetworkManager" +export VERBOSITY="0" + +# Run the right scripts +case "$2" in + up) + export MODE="start" + export PHASE="post-up" + exec run-parts /etc/network/if-up.d + ;; + down) + export MODE="stop" + export PHASE="pre-down" + exec run-parts /etc/network/if-down.d + ;; + pre-up) + export MODE="start" + export PHASE="pre-up" + exec run-parts /etc/network/if-pre-up.d + ;; + post-down) + export MODE="stop" + export PHASE="post-down" + exec run-parts /etc/network/if-post-down.d + ;; + *) + echo "$0: called with unknown action \`$2'" 1>&2 + exit 1 + ;; +esac diff --git a/debian/network-manager-gnome.dirs b/debian/network-manager-gnome.dirs deleted file mode 100644 index e628b1eb..00000000 --- a/debian/network-manager-gnome.dirs +++ /dev/null @@ -1 +0,0 @@ -etc/dbus-1/system.d/ diff --git a/debian/network-manager-gnome.install b/debian/network-manager-gnome.install deleted file mode 100644 index dfa048ea..00000000 --- a/debian/network-manager-gnome.install +++ /dev/null @@ -1,7 +0,0 @@ -debian/tmp/usr/bin/nm-vpn-properties -debian/tmp/usr/bin/nm-applet -debian/tmp/usr/share/locale/* -debian/tmp/usr/share/nm-applet/* -debian/tmp/usr/share/icons -debian/tmp/usr/share/gnome-vpn-properties -debian/tmp/etc/dbus-1/system.d/nm-applet.conf diff --git a/debian/network-manager-gnome.manpages b/debian/network-manager-gnome.manpages deleted file mode 100644 index 15a34e96..00000000 --- a/debian/network-manager-gnome.manpages +++ /dev/null @@ -1,2 +0,0 @@ -debian/nm-vpn-properties.1 -debian/nm-applet.1 diff --git a/debian/network-manager.NEWS b/debian/network-manager.NEWS new file mode 100644 index 00000000..0c0f4d7a --- /dev/null +++ b/debian/network-manager.NEWS @@ -0,0 +1,17 @@ +network-manager (0.6.2-2) unstable; urgency=low + + * NetworkManager now reads the network interface configuration specified in + /etc/network/interfaces. Devices that are listed there and match certain + criteria are *not* managed by NetworkManager anymore. + For more on information on what these criteria are please read + /usr/share/doc/network-manager/README.Debian, section "Configuration". + This means that if NetworkManager stops to manage one of your network + devices with this release but you want NetworkManager to take care of this + device, simply remove the device configuration from + /etc/network/interfaces. + This also means that you can now setup a custom configuration without + NetworkManager overriding this setting. E.g. you might setup your wired + network interface eth0 statically in /etc/network/interfaces and for your + wireless network device wlan0 you can let NetworkManager handle it. + + -- Michael Biebl <biebl@teco.edu> Wed, 10 May 2006 22:51:18 +0200 diff --git a/debian/network-manager.README.Debian b/debian/network-manager.README.Debian new file mode 100644 index 00000000..c59c7f9b --- /dev/null +++ b/debian/network-manager.README.Debian @@ -0,0 +1,76 @@ +NetworkManager consists of two parts: one is on the system level daemon that +manages the connections and gathers information about new networks. The other +is a systray applet that users can use to interact with the NetworkManager +daemon. + +Security +~~~~~~~~ +To allow users to connect to the NetworkManager daemon they have to be in the +group "netdev". If you want to add a user to group "netdev" use the command +"adduser username netdev" or one of the graphical user management frontends. +After that you have to reload D-Bus with the command "/etc/init.d/dbus reload". + +Configuration of wireless and ethernet interfaces +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Only devices that are *not* listed in /etc/network/interfaces or which have +been configured "auto" and "dhcp" (with no other options) are managed by NM. + +This way you can setup a custom (static) configuration for a device and NM +will not try to override this setting. + +After modifying /etc/network/interfaces you have to restart NM with the +command "/etc/init.d/network-manager restart". + +Examples: + +1.) +auto wlan0 +iface wlan0 inet dhcp +-> This device is managed by NM. + +1.a) +allow-hotplug eth0 +iface eth0 inet dhcp +-> This device is managed by NM + +2.) +auto wlan0 +iface wlan0 inet dhcp + wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf +-> This devices is *not* managed by NM because it has additional options. + +3.) +iface wlan0 inet dhcp +-> This device is *not* managed by NM because it is not set to "auto". + +4.) +iface eth0 inet static + address 192.168.1.10 + netmask 255.255.255.0 + gateway 192.168.1.1 +-> This device is *not* managed by NM because it is configured as "static" and + has additional options. + +5.) +Device is not listed in /etc/network/interfaces. +-> Device is managed by NM. + +Dial-up configuration +~~~~~~~~~~~~~~~~~~~~~ +After configuring your PPP interface (either manually or by using a tool like +"pppconfig") to work with a peer called "myisp" you should edit +/etc/network/interfaces and add a stanza like this: + +iface ppp0 inet ppp + provider myisp + +NM will then make it possible to dial this connection. +If you want to set up multiple internet service providers simply create a new +stanza as listed above specifying the provider and a different iface, e.g. ppp1. + +After modifying /etc/network/interfaces you have to restart NM with the +command "/etc/init.d/network-manager restart". + +Please read the "Debian Reference Manual", section 10.6.1.4 or the "interfaces" +man page for further information. + diff --git a/debian/network-manager.dbus-event b/debian/network-manager.dbus-event deleted file mode 100644 index d26d18f4..00000000 --- a/debian/network-manager.dbus-event +++ /dev/null @@ -1,91 +0,0 @@ -#! /bin/sh -# -# NetworkManager NetworkManager daemon -# Daemon for automatically switching network -# connections to the best available connection. -# This file should be placed in /etc/init.d. -# -# Authors: Christian Bjälevik <nafallo@magicalforest.se> -# Jan Gerber <j@bootlab.org> -# Mark Roach <mrroach@okmaybe.com> -# Thom May <thom@debian.org> -# -# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl -# - -set -e - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DESC="NetworkManager daemon" -NAME="NetworkManager" - -DAEMON=/usr/sbin/$NAME - -PIDDIR=/var/run/NetworkManager -PIDFILE=$PIDDIR/$NAME.pid - -SCRIPTNAME=/etc/dbus-1/event.d/25$NAME -USER=root - -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - -# We need /sbin/ip -[ -x /sbin/ip ] || exit 1 - -. /lib/lsb/init-functions - -test -f /etc/default/rcS && . /etc/default/rcS -test -f /etc/default/NetworkManager && . /etc/default/NetworkManager - -# -# Function that starts the daemon/service. -# -d_start() { - log_begin_msg "Starting $DESC" - if [ ! -d $PIDDIR ]; then - mkdir -p $PIDDIR - chown $USER:$USER $PIDDIR - fi - modprobe capability >/dev/null 2>&1 || true - - test -d /var/lib/NetworkManager || mkdir -p /var/lib/NetworkManager - chmod 755 /var/lib/NetworkManager - - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE - - log_end_msg $? -} - -# -# Function that stops the daemon/service. -# -d_stop() { - log_begin_msg "Stopping $DESC" - start-stop-daemon --stop --quiet --pidfile $PIDFILE \ - --oknodo --user $USER --exec $DAEMON - - log_end_msg $? -} - - -case "$1" in - start) - d_start - ;; - stop) - d_stop - ;; - restart|force-reload) - d_stop - sleep 1 - d_start - ;; - *) - log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/network-manager.dirs b/debian/network-manager.dirs index 19c18e1e..231b4756 100644 --- a/debian/network-manager.dirs +++ b/debian/network-manager.dirs @@ -1,4 +1,3 @@ -etc/dbus-1/event.d -etc/dbus-1/system.d etc/NetworkManager/dispatcher.d var/lib/NetworkManager +var/run/NetworkManager diff --git a/debian/network-manager.docs b/debian/network-manager.docs deleted file mode 100644 index 8b137891..00000000 --- a/debian/network-manager.docs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/debian/network-manager.init b/debian/network-manager.init new file mode 100644 index 00000000..9e6fcf0b --- /dev/null +++ b/debian/network-manager.init @@ -0,0 +1,86 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: NetworkManager +# Required-Start: $remote_fs dbus dhcdbd hal +# Required-Stop: $remote_fs dbus dhcdbd hal +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: network connection manager +# Description: Daemon for automatically switching network +# connections to the best available connection. +### END INIT INFO + +set -e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="network connection manager" +NAME="NetworkManager" + +DAEMON=/usr/sbin/$NAME + +PIDDIR=/var/run/NetworkManager +PIDFILE=$PIDDIR/$NAME.pid + +SCRIPTNAME=/etc/init.d/network-manager +USER=root + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +# We need /sbin/ip +[ -x /sbin/ip ] || exit 1 + +. /lib/lsb/init-functions + +test -f /etc/default/NetworkManager && . /etc/default/NetworkManager + +# +# Function that starts the daemon/service. +# +d_start() { + if [ ! -d $PIDDIR ]; then + mkdir -p $PIDDIR + chown $USER:$USER $PIDDIR + fi + + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE + +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ + --oknodo --user $USER --exec $DAEMON + +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + d_start + log_end_msg $? + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + d_stop + log_end_msg $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + d_stop + d_start + log_end_msg $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/network-manager.install b/debian/network-manager.install index 0f9b1179..90422942 100644 --- a/debian/network-manager.install +++ b/debian/network-manager.install @@ -1,3 +1,8 @@ debian/tmp/usr/sbin/NetworkManager debian/tmp/usr/sbin/NetworkManagerDispatcher +debian/tmp/usr/lib/network-manager +debian/tmp/usr/share/locale debian/tmp/etc/dbus-1/system.d/NetworkManager.conf +test/nm-tool /usr/bin/ +debian/tmp/usr/bin/nm-vpn-properties +debian/tmp/usr/share/gnome-vpn-properties/nm-vpn-properties.glade diff --git a/debian/network-manager.manpages b/debian/network-manager.manpages index 9ac2586b..50ee9f13 100644 --- a/debian/network-manager.manpages +++ b/debian/network-manager.manpages @@ -1,2 +1,4 @@ -debian/NetworkManagerDispatcher.1 -debian/NetworkManager.1 +man/NetworkManagerDispatcher.1 +man/nm-tool.1 +man/NetworkManager.1 +debian/nm-vpn-properties.1 diff --git a/debian/network-manager.network-manager-dispatcher.init b/debian/network-manager.network-manager-dispatcher.init new file mode 100644 index 00000000..4384f18c --- /dev/null +++ b/debian/network-manager.network-manager-dispatcher.init @@ -0,0 +1,79 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: NetworkManagerDispatcher +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: network events dispatcher +# Description: This daemon automatically runs scripts when +# NetworkManager changes the network state. +### END INIT INFO + +set -e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="network events dispatcher" +NAME="NetworkManagerDispatcher" +DAEMON=/usr/sbin/$NAME +PIDDIR=/var/run/NetworkManager +PIDFILE=$PIDDIR/$NAME.pid +SCRIPTNAME=/etc/init.d/network-manager-dispatcher +USER=root + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +test -f /etc/default/NetworkManagerDispatcher && . /etc/default/NetworkManagerDispatcher + +# +# Function that starts the daemon/service. +# +d_start() { + if [ ! -d $PIDDIR ]; then + mkdir -p $PIDDIR + chown $USER:$USER $PIDDIR + fi + + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --oknodo --user $USER --exec $DAEMON -- $DAEMON_OPTS --pid-file $PIDFILE + +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ + --oknodo --user $USER --exec $DAEMON +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + d_start + log_end_msg $? + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + d_stop + log_end_msg $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + d_stop + d_start + log_end_msg $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst index 849dec1c..c2a445c7 100644 --- a/debian/network-manager.postinst +++ b/debian/network-manager.postinst @@ -1,18 +1,59 @@ -#!/bin/sh -set -e +#!/bin/sh -e +# This script can be called in the following ways: +# +# After the package was installed: +# <postinst> configure <old-version> +# +# +# If prerm fails during upgrade or fails on failed upgrade: +# <old-postinst> abort-upgrade <new-version> +# +# If prerm fails during deconfiguration of a package: +# <postinst> abort-deconfigure in-favour <new-package> <version> +# removing <old-package> <version> +# +# If prerm fails during replacement due to conflict: +# <postinst> abort-remove in-favour <new-package> <version> -case "$1" in - configure) - if [ -x /etc/dbus-1/event.d/zz99NetworkManager ]; then - mv /etc/dbus-1/event.d/zz99NetworkManager /etc/dbus-1/event.d/zz99NetworkManager.disabled - fi - if [ -x /usr/bin/dbus-send ]; then - /usr/bin/dbus-send --system --type=method_call \ - --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig - /etc/dbus-1/event.d/25NetworkManager restart - /etc/dbus-1/event.d/26NetworkManagerDispatcher restart + +# Remove a no-longer used conffile +rm_conffile() +{ + CONFFILE="$1" + + if [ -e "$CONFFILE".dpkg-remove ]; then + echo "Removing obsolete conffile $CONFFILE" + rm -f "$CONFFILE".dpkg-remove fi - ;; +} + + +case "$1" in + configure) + # Upgrade from previous versions + if dpkg --compare-versions "$2" lt "0.6.4-8"; then + rm_conffile /etc/dbus-1/event.d/25NetworkManager + rm_conffile /etc/dbus-1/event.d/26NetworkManagerDispatcher + fi + + if ! getent group netdev > /dev/null; then + addgroup --quiet --system netdev + fi + + if [ -x "/etc/init.d/dbus" ]; then + invoke-rc.d dbus force-reload || true + fi + ;; + + abort-upgrade|abort-deconfigure|abort-remove) + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; esac #DEBHELPER# +exit 0 + diff --git a/debian/network-manager.postrm b/debian/network-manager.postrm new file mode 100644 index 00000000..812369bd --- /dev/null +++ b/debian/network-manager.postrm @@ -0,0 +1,85 @@ +#!/bin/sh -e +# This script can be called in the following ways: +# +# After the package was removed: +# <postrm> remove +# +# After the package was purged: +# <postrm> purge +# +# After the package was upgraded: +# <old-postrm> upgrade <new-version> +# if that fails: +# <new-postrm> failed-upgrade <old-version> +# +# +# After all of the packages files have been replaced: +# <postrm> disappear <overwriting-package> <version> +# +# +# If preinst fails during install: +# <new-postrm> abort-install +# +# If preinst fails during upgrade of removed package: +# <new-postrm> abort-install <old-version> +# +# If preinst fails during upgrade: +# <new-postrm> abort-upgrade <old-version> + + +# Undo removal of a no-longer used conffile +undo_rm_conffile() +{ + CONFFILE="$1" + + if [ ! -e "$CONFFILE" ]; then + if [ -e "$CONFFILE".dpkg-bak ]; then + echo "Restoring modified conffile $CONFFILE" + mv -f "$CONFFILE".dpkg-bak "$CONFFILE" + elif [ -e "$CONFFILE".dpkg-remove ]; then + echo "Restoring conffile $CONFFILE" + mv -f "$CONFFILE".dpkg-remove "$CONFFILE" + fi + fi +} + + +# Purge backup conffile +rm_backup_conffile() +{ + CONFFILE="$1" + if [ -e "$CONFFILE".dpkg-bak ]; then + echo "Purging backup of conffile $CONFFILE" + rm -f "$CONFFILE".dpkg-bak + fi +} + + +case "$1" in + remove) + ;; + + purge) + rm_backup_conffile /etc/dbus-1/event.d/25NetworkManager + rm_backup_conffile /etc/dbus-1/event.d/26NetworkManagerDispatcher + ;; + + upgrade|failed-upgrade|disappear) + ;; + + abort-install|abort-upgrade) + # Abort upgrade from previous versions + if dpkg --compare-versions "$2" lt "0.6.4-8"; then + undo_rm_conffile /etc/dbus-1/event.d/25NetworkManager + undo_rm_conffile /etc/dbus-1/event.d/26NetworkManagerDispatcher + fi + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/network-manager.preinst b/debian/network-manager.preinst new file mode 100644 index 00000000..3f737448 --- /dev/null +++ b/debian/network-manager.preinst @@ -0,0 +1,65 @@ +#!/bin/sh -e +# This script can be called in the following ways: +# +# Before the package is installed: +# <new-preinst> install +# +# Before removed package is upgraded: +# <new-preinst> install <old-version> +# +# Before the package is upgraded: +# <new-preinst> upgrade <old-version> +# +# +# If postrm fails during upgrade or fails on failed upgrade: +# <old-preinst> abort-upgrade <new-version> + + +# Prepare to remove a no-longer used conffile +prep_rm_conffile() +{ + PKGNAME="$1" + CONFFILE="$2" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you, renaming to .dpkg-bak" + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + else + mv -f "$CONFFILE" "$CONFFILE".dpkg-remove + fi + fi +} + + +case "$1" in + install) + ;; + + upgrade) + # Upgrade from previous versions + if dpkg --compare-versions "$2" lt "0.6.4-8"; then + if [ -x "/etc/dbus-1/event.d/25NetworkManager" ]; then + /etc/dbus-1/event.d/25NetworkManager stop + fi + if [ -x "/etc/dbus-1/event.d/26NetworkManagerDispatcher" ]; then + /etc/dbus-1/event.d/26NetworkManagerDispatcher stop + fi + prep_rm_conffile network-manager /etc/dbus-1/event.d/25NetworkManager + prep_rm_conffile network-manager /etc/dbus-1/event.d/26NetworkManagerDispatcher + fi + ;; + + abort-upgrade) + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/network-manager.prerm b/debian/network-manager.prerm deleted file mode 100644 index 356a8b8c..00000000 --- a/debian/network-manager.prerm +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -case "$1" in - configure) - if [ -f /etc/dbus-1/event.d/25NetworkManagerDispatcher ]; then - rm /etc/dbus-1/event.d/25NetworkManagerDispatcher - fi - ;; - remove) - /etc/dbus-1/event.d/25NetworkManager stop - /etc/dbus-1/event.d/26NetworkManagerDispatcher stop - ;; -esac - -#DEBHELPER# diff --git a/debian/nm-applet.sgml b/debian/nm-applet.sgml deleted file mode 100644 index b027f8a0..00000000 --- a/debian/nm-applet.sgml +++ /dev/null @@ -1,97 +0,0 @@ -<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ - -<!-- Process this file with docbook-to-man to generate an nroff manual - page: `docbook-to-man manpage.sgml > manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - <!-- Please adjust the date whenever revising the manpage. --> - <!ENTITY date "<date>8 February, 2006</date>"> - <!-- SECTION should be 1-8, maybe w/ subsection other parameters are - allowed: see man(7), man(1). --> - <!ENTITY package "nm-applet"> - <!ENTITY gnu "<acronym>GNU</acronym>"> - <!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> -]> - -<refentry> - <refentryinfo> - <address> - <email>giskard@autistici.org</email>; - </address> - <author> - <firstname>Riccardo</firstname> - <surname>Setti</surname> - </author> - <copyright> - <year>2006</year> - <holder>Riccardo Setti</holder> - </copyright> - &date; - </refentryinfo> - <refmeta> - <refentrytitle>nm-applet</refentrytitle> - <manvolnum>1</manvolnum> - </refmeta> - <refnamediv> - <refname>&package;</refname> - - <refpurpose>Network management framework</refpurpose> - </refnamediv> - <refsynopsisdiv> - <cmdsynopsis> - <command>&package;</command> - </cmdsynopsis> - </refsynopsisdiv> - <refsect1> - <title>DESCRIPTION</title> - - <para><command>&package;</command> is the gnome front-end for NetworkManager</para> - <para>If you want to know how you can add by default nm-applet in your gnome notify-area, please read README.Debian - in /usr/share/doc/network-manager</para> - </refsect1> - <refsect1> - <title>SEE ALSO</title> - - <para>NetworkManager (1). nm-vpn-properties (1)</para> - - <para>More Information about NetworkManager can be found at - http://www.gnome.org/projects/NetworkManager/ .</para> - </refsect1> - <refsect1> - <title>AUTHOR</title> - - <para>This manual page was written by Riccardo Setti <email>giskard@autistici.org</email> for - the <productname>Debian</productname> system. - </para> - - </refsect1> -</refentry> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:2 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:nil -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: ---> diff --git a/debian/patches/timeout.patch b/debian/patches/01-supplicant_timeout.patch index 0723c83a..45060db4 100644 --- a/debian/patches/timeout.patch +++ b/debian/patches/01-supplicant_timeout.patch @@ -1,6 +1,6 @@ ---- src/nm-device-802-11-wireless.c.orig 2006-02-13 11:46:50.000000000 +0100 -+++ src/nm-device-802-11-wireless.c 2006-02-13 11:47:08.000000000 +0100 -@@ -2205,7 +2205,7 @@ +--- src/nm-device-802-11-wireless.c 2006-06-20 20:15:45.000000000 +0200 ++++ src/nm-device-802-11-wireless.c.new 2006-08-13 22:32:13.000000000 +0200 +@@ -2329,7 +2329,7 @@ } diff --git a/debian/patches/02-dbus_access_network_manager.patch b/debian/patches/02-dbus_access_network_manager.patch new file mode 100644 index 00000000..ced5effe --- /dev/null +++ b/debian/patches/02-dbus_access_network_manager.patch @@ -0,0 +1,19 @@ +Index: src/NetworkManager.conf +=================================================================== +--- src/NetworkManager.conf (Revision 2735) ++++ src/NetworkManager.conf (Arbeitskopie) +@@ -8,6 +8,14 @@ + <allow send_destination="org.freedesktop.NetworkManager"/> + <allow send_interface="org.freedesktop.NetworkManager"/> + </policy> ++ <policy user="haldaemon"> ++ <allow send_destination="org.freedesktop.NetworkManager"/> ++ <allow send_interface="org.freedesktop.NetworkManager"/> ++ </policy> ++ <policy group="netdev"> ++ <allow send_destination="org.freedesktop.NetworkManager"/> ++ <allow send_interface="org.freedesktop.NetworkManager"/> ++ </policy> + <policy at_console="true"> + <allow send_destination="org.freedesktop.NetworkManager"/> + <allow send_interface="org.freedesktop.NetworkManager"/> diff --git a/debian/patches/04-if_fix.patch b/debian/patches/04-if_fix.patch new file mode 100644 index 00000000..ca0b1574 --- /dev/null +++ b/debian/patches/04-if_fix.patch @@ -0,0 +1,12 @@ +--- src/nm-device-802-3-ethernet.c 2006-05-13 21:06:05.000000000 +0200 ++++ src/nm-device-802-3-ethernet.c.new 2006-08-13 22:34:56.000000000 +0200 +@@ -376,7 +376,9 @@ + /**************************************/ + /* MII capability detection */ + /**************************************/ ++#define _LINUX_IF_H + #include <linux/mii.h> ++#undef _LINUX_IF_H + + static int + mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location) diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch new file mode 100644 index 00000000..931a2063 --- /dev/null +++ b/debian/patches/05-debian_backend.patch @@ -0,0 +1,371 @@ +diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c +index 740572a..4e3e44a 100644 +--- a/src/backends/NetworkManagerDebian.c ++++ b/src/backends/NetworkManagerDebian.c +@@ -37,6 +37,7 @@ + #include "nm-utils.h" + + #define ARPING "/usr/sbin/arping" ++#define RESOLVCONF "resolvconf" + + /* + * nm_system_init +@@ -238,14 +239,16 @@ void nm_system_kill_all_dhcp_daemons (void) + /* + * nm_system_update_dns + * +- * Make glibc/nscd aware of any changes to the resolv.conf file by +- * restarting nscd. ++ * Invalidate the nscd host cache, if it exists, since ++ * we changed resolv.conf. + * + */ + void nm_system_update_dns (void) + { +- nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart"); +- ++ if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { ++ nm_info ("Clearing nscd hosts cache."); ++ nm_spawn_process ("/usr/sbin/nscd -i hosts"); ++ } + } + + +@@ -257,8 +260,7 @@ void nm_system_update_dns (void) + * + */ + void nm_system_restart_mdns_responder (void) +-{ +- nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder"); ++{ + } + + +@@ -514,13 +516,60 @@ gboolean nm_system_device_get_use_dhcp (NMDevice *dev) + /* + * nm_system_device_get_disabled + * +- * Return whether the distro-specific system config tells us to use +- * dhcp for this device. ++ * Return whether the distro-specific system config tells us to disable ++ * this device. + * + */ + gboolean nm_system_device_get_disabled (NMDevice *dev) + { +- return FALSE; ++ const char *iface; ++ if_block *curr_device, *curr_b; ++ if_data *curr_d; ++ gboolean blacklist = TRUE; ++ ++ g_return_val_if_fail (dev != NULL, TRUE); ++ ++ iface = nm_device_get_iface (dev); ++ ++ ifparser_init (); ++ ++ /* If the device is listed in a mapping, do not control it */ ++ if (ifparser_getmapping (iface) != NULL) { ++ blacklist = TRUE; ++ goto out; ++ } ++ ++ /* If the interface isn't listed in /etc/network/interfaces then ++ * it's considered okay to control it. ++ */ ++ curr_device = ifparser_getif (iface); ++ if (curr_device == NULL) { ++ blacklist = FALSE; ++ goto out; ++ } ++ ++ /* If the interface is listed and isn't marked "auto" then it's ++ * definitely not okay to control it. ++ */ ++ for (curr_b = ifparser_getfirst (); curr_b; curr_b = curr_b->next) { ++ if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug")) ++ && strstr (curr_b->name, iface)) ++ blacklist = FALSE; ++ } ++ ++ /* If the interface has no options other than just "inet dhcp" ++ * it's probably ok to fiddle with it. ++ */ ++ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { ++ if (strcmp (curr_d->key, "inet") ++ || strcmp (curr_d->data, "dhcp" )) ++ blacklist = TRUE; ++ } ++ ++out: ++ ifparser_destroy (); ++ ++ return blacklist; + } + + +@@ -563,12 +612,18 @@ gboolean nm_system_deactivate_dialup (GSList *list, const char *dialup) + if (strcmp (dialup, config->name) == 0) + { + char *cmd; ++ int status; + + nm_info ("Deactivating dialup device %s (%s) ...", dialup, (char *) config->data); + cmd = g_strdup_printf ("/sbin/ifdown %s", (char *) config->data); +- nm_spawn_process (cmd); ++ status = nm_spawn_process (cmd); + g_free (cmd); +- ret = TRUE; ++ if (status == 0) { ++ ret = TRUE; ++ } else { ++ nm_warning ("Couldn't deactivate dialup device %s (%s) - %d", dialup, (char *) config->data, status); ++ ret = FALSE; ++ } + break; + } + } +@@ -587,12 +642,18 @@ gboolean nm_system_activate_dialup (GSList *list, const char *dialup) + if (strcmp (dialup, config->name) == 0) + { + char *cmd; ++ int status; + + nm_info ("Activating dialup device %s (%s) ...", dialup, (char *) config->data); + cmd = g_strdup_printf ("/sbin/ifup %s", (char *) config->data); +- nm_spawn_process (cmd); ++ status = nm_spawn_process (cmd); + g_free (cmd); +- ret = TRUE; ++ if (status == 0) { ++ ret = TRUE; ++ } else { ++ nm_warning ("Couldn't activate dialup device %s (%s) - %d", dialup, (char *) config->data, status); ++ ret = FALSE; ++ } + break; + } + } +@@ -603,23 +664,26 @@ gboolean nm_system_activate_dialup (GSList *list, const char *dialup) + GSList * nm_system_get_dialup_config (void) + { + const char *buf; +- unsigned int i = 0; ++ const char *provider; + GSList *list = NULL; + if_block *curr; + ifparser_init(); + + /* FIXME: get all ppp(and others?) lines from /e/n/i here */ + curr = ifparser_getfirst(); +- while(curr!=NULL) ++ while (curr != NULL) + { + NMDialUpConfig *config; +- if (strcmp(curr->type,"iface")==0) ++ if (strcmp(curr->type, "iface") == 0) + { +- buf = ifparser_getkey(curr,"inet"); +- if (buf && strcmp (buf, "ppp")==0) ++ buf = ifparser_getkey(curr, "inet"); ++ if (buf && strcmp (buf, "ppp") == 0) + { ++ provider = ifparser_getkey(curr, "provider"); ++ if (!provider) ++ provider = "default provider"; + config = g_malloc (sizeof (NMDialUpConfig)); +- config->name = g_strdup_printf ("Modem (#%d)", i++); ++ config->name = g_strdup_printf ("%s via Modem", provider); + config->data = g_strdup (curr->name); /* interface name */ + + list = g_slist_append (list, config); +@@ -631,14 +695,6 @@ GSList * nm_system_get_dialup_config (void) + } + ifparser_destroy(); + +- /* Hack: Go back and remove the "(#0)" if there is only one device */ +- if (i == 1) +- { +- NMDialUpConfig *config = (NMDialUpConfig *) list->data; +- g_free (config->name); +- config->name = g_strdup ("Modem"); +- } +- + return list; + } + +@@ -679,7 +735,10 @@ void nm_system_set_hostname (NMIP4Config *config) + */ + gboolean nm_system_should_modify_resolv_conf (void) + { +- return TRUE; ++ if (g_find_program_in_path(RESOLVCONF) != NULL) ++ return FALSE; ++ else ++ return TRUE; + } + + +diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c +index 53d6487..b3ad300 100644 +--- a/src/backends/interface_parser.c ++++ b/src/backends/interface_parser.c +@@ -71,14 +73,18 @@ void add_data(const char *key,const char *data) + //printf("added data '%s' with key '%s'\n",data,key); + } + +-#define SPACE_OR_TAB(string,ret) {ret = strchr(string,' ');ret=(ret == NULL?strchr(string,'\t'):ret);} ++// define what we consider a whitespace ++#define WS " \t" + + void ifparser_init(void) + { + FILE *inp = fopen(INTERFACES,"r"); + int ret = 0; ++ int pos; ++ int len; + char *line; +- char *space; ++ char *key; ++ char *data; + char rline[255]; + + if (inp == NULL) +@@ -89,7 +95,7 @@ void ifparser_init(void) + first = last = NULL; + while(1) + { +- line = space = NULL; ++ line = NULL; + ret = fscanf(inp,"%255[^\n]\n",rline); + if (ret == EOF) + break; +@@ -102,50 +108,71 @@ void ifparser_init(void) + line = rline; + while(line[0] == ' ') + line++; +- if (line[0]=='#' || line[0]=='\0') ++ if (line[0] == '#' || line[0] == '\0') + continue; + +- SPACE_OR_TAB(line,space) +- if (space == NULL) ++ len = strlen(line); ++ pos = 0; ++ while (!strchr(WS, line[pos]) && pos < len) pos++; ++ ++ // terminate key string and skip further whitespaces ++ line[pos++] = '\0'; ++ while (strchr(WS, line[pos]) && pos < len) pos++; ++ ++ if (pos >= len) + { +- nm_warning ("Error: Can't parse interface line '%s'\n",line); ++ nm_warning ("Error: Can't parse line '%s'\n", line); + continue; + } +- space[0] = '\0'; +- ++ key = &line[0]; ++ data = &line[pos]; ++ + // There are four different stanzas: + // iface, mapping, auto and allow-*. Create a block for each of them. +- if (strcmp(line,"iface")==0) ++ if (strcmp(key, "iface") == 0) + { +- char *space2 = strchr(space+1,' '); +- if (space2 == NULL) ++ char *key2; ++ ++ while (!strchr(WS, line[pos]) && pos < len ) pos++; ++ ++ // terminate first data string and skip further whitespaces ++ line[pos++] = '\0'; ++ while (strchr(WS, line[pos]) && pos < len) pos++; ++ if (pos >= len) + { +- nm_warning ("Error: Can't parse iface line '%s'\n",space+1); ++ nm_warning ("Error: Can't parse iface line '%s'\n", data); + continue; + } +- space2[0]='\0'; +- add_block(line,space+1); ++ key2 = &line[pos]; ++ ++ add_block(key, data); + +- if (space2[1]!='\0') ++ if (pos < len) + { +- space = strchr(space2+1,' '); +- if (space == NULL) ++ ++ while (!strchr(WS, line[pos]) && pos < len ) pos++; ++ ++ // terminate key2 string and skip further whitespaces ++ line[pos++] = '\0'; ++ while (strchr(WS, line[pos]) && pos < len) pos++; ++ if (pos >= len) + { +- nm_warning ("Error: Can't parse data '%s'\n",space2+1); ++ nm_warning ("Error: Can't parse inet line '%s'\n", key2); + continue; + } +- space[0] = '\0'; +- add_data(space2+1,space+1); ++ data = &line[pos]; ++ ++ add_data(key2, data); + } + } +- else if (strcmp(line,"auto")==0) +- add_block(line,space+1); +- else if (strcmp(line,"mapping")==0) +- add_block(line,space+1); +- else if (strncmp(line,"allow-",6)==0) +- add_block(line,space+1); ++ else if (strcmp(key, "auto") == 0) ++ add_block(key, data); ++ else if (strcmp(key, "mapping") == 0) ++ add_block(key, data); ++ else if (strncmp(key, "allow-", 6) == 0) ++ add_block(key, data); + else +- add_data(line,space+1); ++ add_data(key, data); + + //printf("line: '%s' ret=%d\n",rline,ret); + } +@@ -198,6 +225,18 @@ if_block *ifparser_getif(const char* iface) + return NULL; + } + ++if_block *ifparser_getmapping(const char* iface) ++{ ++ if_block *curr = first; ++ while(curr!=NULL) ++ { ++ if (strcmp(curr->type,"mapping")==0 && strcmp(curr->name,iface)==0) ++ return curr; ++ curr = curr->next; ++ } ++ return NULL; ++} ++ + const char *ifparser_getkey(if_block* iface, const char *key) + { + if_data *curr = iface->info; +diff --git a/src/backends/interface_parser.h b/src/backends/interface_parser.h +index 075f454..8914283 100644 +--- a/src/backends/interface_parser.h ++++ b/src/backends/interface_parser.h +@@ -44,6 +44,7 @@ void ifparser_init(void); + void ifparser_destroy(void); + + if_block *ifparser_getif(const char* iface); ++if_block *ifparser_getmapping(const char* iface); + if_block *ifparser_getfirst(void); + const char *ifparser_getkey(if_block* iface, const char *key); + diff --git a/debian/patches/06-dispatch_more_events.patch b/debian/patches/06-dispatch_more_events.patch new file mode 100644 index 00000000..60d50432 --- /dev/null +++ b/debian/patches/06-dispatch_more_events.patch @@ -0,0 +1,99 @@ +--- dispatcher-daemon/NetworkManagerDispatcher.c.old 2006-08-13 22:40:18.000000000 +0200 ++++ dispatcher-daemon/NetworkManagerDispatcher.c 2006-08-13 22:40:27.000000000 +0200 +@@ -44,6 +44,8 @@ + NMD_DEVICE_DONT_KNOW, + NMD_DEVICE_NOW_INACTIVE, + NMD_DEVICE_NOW_ACTIVE, ++ NMD_DEVICE_GOING_INACTIVE, ++ NMD_DEVICE_GOING_ACTIVE, + }; + typedef enum NMDAction NMDAction; + +@@ -95,6 +97,10 @@ + if (action == NMD_DEVICE_NOW_ACTIVE) + char_act = "up"; + else if (action == NMD_DEVICE_NOW_INACTIVE) ++ char_act = "post-down"; ++ else if (action == NMD_DEVICE_GOING_ACTIVE) ++ char_act = "pre-up"; ++ else if (action == NMD_DEVICE_GOING_INACTIVE) + char_act = "down"; + else + return; +@@ -217,9 +223,13 @@ + } + + if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")) +- action = NMD_DEVICE_NOW_INACTIVE; ++ action = NMD_DEVICE_GOING_INACTIVE; + else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")) + action = NMD_DEVICE_NOW_ACTIVE; ++ else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating")) ++ action = NMD_DEVICE_GOING_ACTIVE; ++ else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceDeactivated")) ++ action = NMD_DEVICE_NOW_INACTIVE; + + if (action != NMD_DEVICE_DONT_KNOW) + { +@@ -234,8 +244,10 @@ + if (dev_object_path && dev_iface_name) + { + nm_info ("Device %s (%s) is now %s.", dev_object_path, dev_iface_name, +- (action == NMD_DEVICE_NOW_INACTIVE ? "down" : +- (action == NMD_DEVICE_NOW_ACTIVE ? "up" : "error"))); ++ (action == NMD_DEVICE_NOW_INACTIVE ? "going down" : ++ (action == NMD_DEVICE_NOW_ACTIVE ? "up" : ++ (action == NMD_DEVICE_GOING_INACTIVE ? "going down" : ++ (action == NMD_DEVICE_GOING_ACTIVE ? "going up" : "error"))))); + + nmd_execute_scripts (action, dev_iface_name); + } +--- man/NetworkManagerDispatcher.1.in 2006-02-01 19:14:15.000000000 +0100 ++++ man/NetworkManagerDispatcher.1.in.new 2006-08-15 20:13:00.000000000 +0200 +@@ -12,10 +12,14 @@ + directory in response to interfaces coming up and down. The scripts are run + alphabetically. The first parameter is the network interface name. The second + parameter is ++.I pre\-up ++before bringing the interface up, + .I up +-if the interface is now up and ++after bringing the interface up, + .I down +-if the interface is now down. ++before taking the interface down and ++.I post\-down ++after taking the interface down. + .SH OPTIONS + The following options are supported: + .TP +--- src/NetworkManagerDbus.c 2006-05-21 19:28:02.000000000 +0200 ++++ src/NetworkManagerDbus.c.new 2006-08-15 20:15:18.000000000 +0200 +@@ -191,6 +191,7 @@ + { DEVICE_NOW_ACTIVE, "DeviceNowActive" }, + { DEVICE_ACTIVATING, "DeviceActivating" }, + { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" }, ++ { DEVICE_DEACTIVATED, "DeviceDeactivated" }, + { DEVICE_ADDED, "DeviceAdded" }, + { DEVICE_REMOVED, "DeviceRemoved" }, + { DEVICE_CARRIER_ON, "DeviceCarrierOn" }, +--- src/NetworkManagerDbus.h 2006-05-21 19:28:02.000000000 +0200 ++++ src/NetworkManagerDbus.h.new 2006-08-15 20:15:39.000000000 +0200 +@@ -40,6 +40,7 @@ + DEVICE_ACTIVATING, + DEVICE_ACTIVATION_FAILED, + DEVICE_ACTIVATION_CANCELED, ++ DEVICE_DEACTIVATED, + DEVICE_ADDED, + DEVICE_REMOVED, + DEVICE_CARRIER_ON, +--- src/nm-device.c 2006-07-10 22:30:49.000000000 +0200 ++++ src/nm-device.c.new 2006-08-15 20:16:11.000000000 +0200 +@@ -1436,6 +1436,7 @@ + NM_DEVICE_GET_CLASS (self)->deactivate (self); + + nm_schedule_state_change_signal_broadcast (self->priv->app_data); ++ nm_dbus_schedule_device_status_change_signal (self->priv->app_data, self, NULL, DEVICE_DEACTIVATED); + } + + diff --git a/debian/patches/11-man_page_sh_name.patch b/debian/patches/11-man_page_sh_name.patch new file mode 100644 index 00000000..b363268c --- /dev/null +++ b/debian/patches/11-man_page_sh_name.patch @@ -0,0 +1,15 @@ +Index: man/nm-tool.1.in +=================================================================== +RCS file: /cvs/gnome/NetworkManager/man/nm-tool.1.in,v +retrieving revision 1.1 +diff -u -3 -p -r1.1 nm-tool.1.in +--- man/nm-tool.1.in 1 Feb 2006 18:14:15 -0000 1.1 ++++ man/nm-tool.1.in 30 Nov 2006 19:33:39 -0000 +@@ -3,6 +3,7 @@ + .\" Copyright (C) 2005 Robert Love + .\" + .TH NM-TOOL "1" ++.SH NAME + nm-tool \- utility to report NetworkManager state + .SH SYNOPSIS + .B nm-tool diff --git a/debian/patches/12_readme_format.patch b/debian/patches/12_readme_format.patch new file mode 100644 index 00000000..5fa39d24 --- /dev/null +++ b/debian/patches/12_readme_format.patch @@ -0,0 +1,14 @@ +Index: README +=================================================================== +--- README (Revision 3190) ++++ README (Arbeitskopie) +@@ -20,7 +20,8 @@ + For wireless networking support, NetworkManager keeps a list of wireless + networks, the preferred list. Preferred Networks are wireless networks that + the user has explicitly made NetworkManager associate with at some previous +-time. So if the user walks into a Starbucks and explicitly asks NetworkManager to associate with that Starbucks network, NetworkManager will remember the ++time. So if the user walks into a Starbucks and explicitly asks NetworkManager ++to associate with that Starbucks network, NetworkManager will remember the + Starbucks network information from that point on. Upon returning to that + Starbucks, NetworkManager will attempt to associate _automatically_ with the + Starbucks network since it is now in the Preferred Networks list. The point of diff --git a/debian/patches/13-validate_mac_addr.patch b/debian/patches/13-validate_mac_addr.patch new file mode 100644 index 00000000..47a81e19 --- /dev/null +++ b/debian/patches/13-validate_mac_addr.patch @@ -0,0 +1,33 @@ +--- network-manager-0.6.5.orig/src/nm-device-802-11-wireless.c ++++ network-manager-0.6.5/src/nm-device-802-11-wireless.c +@@ -3439,6 +3439,20 @@ + } + + static gboolean ++has_valid_ether_addr (NMAccessPoint *ap) ++{ ++ struct ether_addr *addr; ++ int i; ++ ++ addr = nm_ap_get_address (ap); ++ for (i = 0 ; i < ETH_ALEN; i++) ++ if (addr->ether_addr_octet[i] != 0) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++static gboolean + process_scan_results (NMDevice80211Wireless *dev, + const guint8 *res_buf, + guint32 res_buf_len) +@@ -3474,7 +3488,8 @@ + + /* Merge previous AP */ + if (ap) { +- add_new_ap_to_device_list (dev, ap); ++ if (has_valid_ether_addr (ap)) ++ add_new_ap_to_device_list (dev, ap); + nm_ap_unref (ap); + ap = NULL; + } diff --git a/debian/patches/20-stable_branch_updates_r2652.patch b/debian/patches/20-stable_branch_updates_r2652.patch new file mode 100644 index 00000000..aea8e86f --- /dev/null +++ b/debian/patches/20-stable_branch_updates_r2652.patch @@ -0,0 +1,914 @@ +Index: ChangeLog +=================================================================== +--- ChangeLog (Revision 2558) ++++ ChangeLog (Revision 2652) +@@ -1,3 +1,99 @@ ++2007-07-26 Dan Williams <dcbw@redhat.com> ++ ++ Patch from Bernhard Miklautz <bernhard.miklautz@shacknet.at> ++ ++ * src/NetworkManagerSystem.c ++ - (nm_system_device_set_ip4_route): don't add the route if it's on the ++ same subnet (#437396) ++ ++2007-07-26 Dan Williams <dcbw@redhat.com> ++ ++ * src/nm-device-802-11-wireless.c ++ - (real_start): I hate orinoco; apparently has trouble scanning too soon ++ after being brought up, so do the initial scan a bit later. ++ ++2007-06-27 Dan Williams <dcbw@redhat.com> ++ ++ * src/NetworkManager.c ++ - (nm_hal_init): set hardware RF to enabled if no killswitches are found ++ after the initial discovery ++ ++2007-06-21 Dan Williams <dcbw@redhat.com> ++ ++ More fixes for Fedora #194124, gnome.org #354565 ++ ++ * src/nm-device-802-3-ethernet.c ++ - (real_act_stage1_prepare): new function; fail activation if device ++ doesn't have a link ++ ++ * src/NetworkManagerPolicy.c ++ - (nm_policy_activation_finish): ensure device is actually activated ++ before sending out signals. Fixes a race where device cancellation ++ would be processed right after finish was scheduled, but not run. ++ - (nm_policy_device_change_check, nm_policy_schedule_device_change_check): ++ ensure device change check GSource ID is locked across threads; ++ allow interruption of activation of 802.3 ethernet devices that no ++ longer have an active link, and ensure that 802.3 ethernet devices ++ have an active link before starting activation ++ ++2007-06-21 Dan Williams <dcbw@redhat.com> ++ ++ Add HAL-based rfkill support, based on a patch from Benjamin Kahn. ++ ++ * src/NetworkManagerDbus.[ch] ++ - (nm_dbus_signal_wireless_enabled): new function, emit signals when ++ wireless enabled status changes ++ ++ * src/nm-dbus-nm.c ++ - (nm_dbus_nm_set_wireless_enabled): handle hardware rfkill correctly; ++ send errors when hardware switch overrides user request, and send ++ signals when wireless enabled state changes ++ - (nm_dbus_nm_get_wireless_enabled): send additional 'hardware rf enabled' ++ argument in method reply ++ ++ * src/NetworkManager.c ++ - (handle_killswitch_pcall_done, nm_killswitch_getpower_reply_cb, ++ nm_poll_killswitches, nm_add_killswitch_device, ++ nm_add_initial_killswitch_devices): new functions; detect and handle ++ hardware killswitches exported by HAL. Unfortunately we have to ++ poll the switches because HAL doesn't support signals for killswitches ++ yet. ++ - (nm_hal_device_new_capability): detect killswitches added asynchronously ++ - (nm_hal_init): look for killswitches when connecting to HAL ++ - (nm_hal_deinit): dispose of killswitches when deiniting HAL data ++ ++ * src/NetworkManagerMain.h ++ - Add bits to track killswitches ++ ++2007-06-12 Dan Williams <dcbw@redhat.com> ++ ++ * src/nm-device.c ++ - (real_act_stage3_ip_config_start): sometimes the device gets downed ++ during the wpa_supplicant association. Ensure the device is up ++ before it's used for IP configuration. ++ ++2007-06-07 Dan Williams <dcbw@redhat.com> ++ ++ Patch from Jon Nettleton <jon.nettleton@gmail.com> ++ ++ * src/nm-device-802-11-wireless.c: ++ - (real_act_stage2_config): sleep 1 second to allow link status ++ to stabilize ++ ++2007-06-07 Dan Williams <dcbw@redhat.com> ++ ++ * (nm_device_802_3_ethernet_link_activated, ++ nm_device_802_3_ethernet_link_deactivated): fix ethernet link detection ++ behavior due to races between the netlink code and when the ++ device thread recognizes the change. Checking the link state ++ before scheduling the change even on the device thread is wrong. ++ (gnome.org #354565, rh #194124) ++ ++2007-04-25 Dan Williams <dcbw@redhat.com> ++ ++ * initscript/RedHat/NetworkManager.in: remove trailing backslash ++ (gnome.org #432401) ++ + 2007-04-18 Tambet Ingo <tambet@ximian.com> + + * src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network_cb): Update the security +Index: src/NetworkManagerDbus.c +=================================================================== +--- src/NetworkManagerDbus.c (Revision 2558) ++++ src/NetworkManagerDbus.c (Revision 2652) +@@ -434,6 +434,29 @@ + } + + ++void nm_dbus_signal_wireless_enabled (NMData * data) ++{ ++ DBusMessage * message; ++ ++ g_return_if_fail (data != NULL); ++ g_return_if_fail (data->dbus_connection != NULL); ++ ++ if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, "WirelessEnabled"))) ++ { ++ nm_warning ("%s(): Not enough memory for new dbus message!", __func__); ++ return; ++ } ++ ++ dbus_message_append_args (message, ++ DBUS_TYPE_BOOLEAN, &data->wireless_enabled, ++ DBUS_TYPE_BOOLEAN, &data->hw_rf_enabled, ++ DBUS_TYPE_INVALID); ++ if (!dbus_connection_send (data->dbus_connection, message, NULL)) ++ nm_warning ("%s(): Could not emit the WirelessEnabled signal!", __func__); ++ ++ dbus_message_unref (message); ++} ++ + /* + * nm_dbus_signal_filter + * +Index: src/NetworkManagerDbus.h +=================================================================== +--- src/NetworkManagerDbus.h (Revision 2558) ++++ src/NetworkManagerDbus.h (Revision 2652) +@@ -68,6 +68,7 @@ + + void nm_dbus_signal_wireless_network_change (DBusConnection *connection, NMDevice80211Wireless *dev, NMAccessPoint *ap, NMNetworkStatus status, gint strength); + void nm_dbus_signal_device_strength_change (DBusConnection *connection, NMDevice80211Wireless *dev, gint strength); ++void nm_dbus_signal_wireless_enabled (NMData * data); + + NMDevice * nm_dbus_get_device_from_escaped_object_path (NMData *data, const char *path); + +Index: src/nm-dbus-nm.c +=================================================================== +--- src/nm-dbus-nm.c (Revision 2558) ++++ src/nm-dbus-nm.c (Revision 2652) +@@ -483,53 +483,84 @@ + return (reply); + } + +-static DBusMessage *nm_dbus_nm_set_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data) ++static DBusMessage *nm_dbus_nm_set_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *cb_data) + { + gboolean enabled = FALSE; + DBusError err; +- NMData *app_data; ++ NMData * data; ++ DBusMessage * ret = NULL; + +- g_return_val_if_fail (data && data->data && connection && message, NULL); ++ g_return_val_if_fail (cb_data && cb_data->data && connection && message, NULL); + + dbus_error_init (&err); + if (!dbus_message_get_args (message, &err, DBUS_TYPE_BOOLEAN, &enabled, DBUS_TYPE_INVALID)) +- return NULL; ++ goto out; + +- app_data = data->data; +- app_data->wireless_enabled = enabled; ++ data = cb_data->data; ++ if (enabled == data->wireless_enabled) ++ goto out; + +- if (!enabled) +- { +- GSList *elt; ++ /* Hardware rfkill overrides whatever user wants */ ++ if (!data->hw_rf_enabled) { ++ nm_info ("User request to %s wireless overridden by radio killswitch.", ++ enabled ? "enable" : "disable"); + +- /* Physically down all wireless devices */ +- nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__); +- for (elt = app_data->dev_list; elt; elt = g_slist_next (elt)) +- { +- NMDevice *dev = (NMDevice *)(elt->data); +- if (nm_device_is_802_11_wireless (dev)) +- { ++ /* Return error if user tries to re-enable wireless, or just ignore ++ * a disable wireless request when wireless is already disabled. ++ */ ++ if (enabled) { ++ ret = nm_dbus_create_error_message (message, ++ NM_DBUS_INTERFACE, ++ "DisabledBySystem", ++ "Wireless disabled by hardware switch."); ++ } ++ goto out; ++ } ++ ++ nm_info ("User request to %s wireless.", enabled ? "enable" : "disable"); ++ ++ data->wireless_enabled = enabled; ++ if (!data->wireless_enabled) { ++ GSList * elt; ++ ++ /* Deactivate all wireless devices and force them down so they ++ * turn off their radios. ++ */ ++ nm_lock_mutex (data->dev_list_mutex, __FUNCTION__); ++ for (elt = data->dev_list; elt; elt = g_slist_next (elt)) { ++ NMDevice * dev = (NMDevice *) elt->data; ++ if (nm_device_is_802_11_wireless (dev)) { + nm_device_deactivate (dev); + nm_device_bring_down (dev); + } + } +- nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__); ++ nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__); + } + +- nm_policy_schedule_device_change_check (data->data); ++ nm_policy_schedule_device_change_check (data); ++ nm_dbus_signal_wireless_enabled (data); + +- return NULL; ++out: ++ return ret; + } + +-static DBusMessage *nm_dbus_nm_get_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data) ++static DBusMessage *nm_dbus_nm_get_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *cb_data) + { ++ NMData * data; + DBusMessage *reply = NULL; + +- g_return_val_if_fail (data && data->data && connection && message, NULL); ++ g_return_val_if_fail (cb_data && connection && message, NULL); + +- if ((reply = dbus_message_new_method_return (message))) +- dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &data->data->wireless_enabled, DBUS_TYPE_INVALID); ++ data = cb_data->data; ++ g_return_val_if_fail (data != NULL, NULL); + ++ if ((reply = dbus_message_new_method_return (message))) { ++ dbus_message_append_args (reply, ++ DBUS_TYPE_BOOLEAN, &data->wireless_enabled, ++ DBUS_TYPE_BOOLEAN, &data->hw_rf_enabled, ++ DBUS_TYPE_INVALID); ++ } ++ + return reply; + } + +Index: src/nm-device-802-3-ethernet.c +=================================================================== +--- src/nm-device-802-3-ethernet.c (Revision 2558) ++++ src/nm-device-802-3-ethernet.c (Revision 2652) +@@ -108,18 +108,16 @@ + GObject *obj, + NMDevice8023Ethernet *self) + { ++ GSource * source; ++ + /* Make sure signal is for us */ + if (NM_DEVICE (self) != NM_DEVICE (obj)) + return; + +- if (!nm_device_has_active_link (NM_DEVICE (self))) +- { +- GSource * source = g_idle_source_new (); +- +- g_source_set_callback (source, (GSourceFunc) link_activated_helper, self, NULL); +- g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); +- g_source_unref (source); +- } ++ source = g_idle_source_new (); ++ g_source_set_callback (source, (GSourceFunc) link_activated_helper, self, NULL); ++ g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); ++ g_source_unref (source); + } + + +@@ -135,18 +133,16 @@ + GObject *obj, + NMDevice8023Ethernet *self) + { ++ GSource * source; ++ + /* Make sure signal is for us */ + if (NM_DEVICE (self) != NM_DEVICE (obj)) + return; + +- if (nm_device_has_active_link (NM_DEVICE (self))) +- { +- GSource * source = g_idle_source_new (); +- +- g_source_set_callback (source, (GSourceFunc) link_deactivated_helper, self, NULL); +- g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); +- g_source_unref (source); +- } ++ source = g_idle_source_new (); ++ g_source_set_callback (source, (GSourceFunc) link_deactivated_helper, self, NULL); ++ g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); ++ g_source_unref (source); + } + + static void +@@ -211,6 +207,26 @@ + return caps; + } + ++ ++static NMActStageReturn ++real_act_stage1_prepare (NMDevice *dev, NMActRequest *req) ++{ ++ NMDevice8023Ethernet * self = NM_DEVICE_802_3_ETHERNET (dev); ++ NMDevice8023EthernetClass * klass; ++ NMDeviceClass * parent_class; ++ ++ /* Ensure ethernet devices have a link before going further with activation, ++ * partially works around Fedora #194124. ++ */ ++ if (!nm_device_has_active_link (dev)) ++ return NM_ACT_STAGE_RETURN_FAILURE; ++ ++ /* Chain up to parent */ ++ klass = NM_DEVICE_802_3_ETHERNET_GET_CLASS (self); ++ parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); ++ return parent_class->act_stage1_prepare (dev, req); ++} ++ + static void + nm_device_802_3_ethernet_dispose (GObject *object) + { +@@ -275,6 +291,7 @@ + parent_class->get_generic_capabilities = real_get_generic_capabilities; + parent_class->init = real_init; + parent_class->update_link = real_update_link; ++ parent_class->act_stage1_prepare = real_act_stage1_prepare; + + g_type_class_add_private (object_class, sizeof (NMDevice8023EthernetPrivate)); + } +Index: src/NetworkManagerPolicy.c +=================================================================== +--- src/NetworkManagerPolicy.c (Revision 2558) ++++ src/NetworkManagerPolicy.c (Revision 2652) +@@ -52,6 +52,7 @@ + NMDevice *dev = NULL; + NMData *data = NULL; + NMAccessPoint * ap = NULL; ++ NMActRequest * dev_req; + + g_return_val_if_fail (req != NULL, FALSE); + +@@ -61,6 +62,13 @@ + dev = nm_act_request_get_dev (req); + g_assert (dev); + ++ /* Ensure that inactive devices don't get the activated signal ++ * sent due to race conditions. ++ */ ++ dev_req = nm_device_get_act_request (dev); ++ if (!dev_req || (dev_req != req)) ++ return FALSE; ++ + if (nm_device_is_802_11_wireless (dev)) + ap = nm_act_request_get_ap (req); + +@@ -265,14 +273,16 @@ + } + + #if 0 +- nm_info ("AUTO: Best wired device = %s, best wireless device = %s (%s)", best_wired_dev ? nm_device_get_iface (best_wired_dev) : "(null)", +- best_wireless_dev ? nm_device_get_iface (best_wireless_dev) : "(null)", (best_wireless_dev && *ap) ? nm_ap_get_essid (*ap) : "null" ); ++ nm_info ("AUTO: Best wired device = %s, best wireless device = %s (%s)", best_wired_dev ? nm_device_get_iface (NM_DEVICE (best_wired_dev)) : "(null)", ++ best_wireless_dev ? nm_device_get_iface (NM_DEVICE (best_wireless_dev)) : "(null)", (best_wireless_dev && *ap) ? nm_ap_get_essid (*ap) : "null" ); + #endif + + return highest_priority_dev; + } + + ++static GStaticMutex dcc_mutex = G_STATIC_MUTEX_INIT; ++ + /* + * nm_policy_device_change_check + * +@@ -294,7 +304,9 @@ + + g_return_val_if_fail (data != NULL, FALSE); + ++ g_static_mutex_lock (&dcc_mutex); + data->dev_change_check_idle_id = 0; ++ g_static_mutex_unlock (&dcc_mutex); + + old_dev = nm_get_active_device (data); + +@@ -303,11 +315,19 @@ + + if (old_dev) + { ++ gboolean has_link = TRUE; + guint32 caps = nm_device_get_capabilities (old_dev); + ++ /* Ensure ethernet devices have a link before starting activation, ++ * partially works around Fedora #194124. ++ */ ++ if (nm_device_is_802_3_ethernet (old_dev)) ++ has_link = nm_device_has_active_link (old_dev); ++ + /* Don't interrupt a currently activating device. */ + if ( nm_device_is_activating (old_dev) +- && !nm_device_can_interrupt_activation (old_dev)) ++ && !nm_device_can_interrupt_activation (old_dev) ++ && has_link) + { + nm_info ("Old device '%s' activating, won't change.", nm_device_get_iface (old_dev)); + goto out; +@@ -425,13 +445,36 @@ + if (do_switch && (nm_device_is_802_3_ethernet (new_dev) || (nm_device_is_802_11_wireless (new_dev) && ap))) + { + NMActRequest * act_req = NULL; ++ gboolean has_link = TRUE; + +- if ((act_req = nm_act_request_new (data, new_dev, ap, FALSE))) ++ /* Ensure ethernet devices have a link before starting activation, ++ * partially works around Fedora #194124. ++ */ ++ if (nm_device_is_802_3_ethernet (new_dev)) ++ has_link = nm_device_has_active_link (new_dev); ++ ++ if (has_link) + { +- nm_info ("Will activate connection '%s%s%s'.", nm_device_get_iface (new_dev), ap ? "/" : "", ap ? nm_ap_get_essid (ap) : ""); +- nm_policy_schedule_device_activation (act_req); +- nm_act_request_unref (act_req); ++ if ((act_req = nm_act_request_new (data, new_dev, ap, FALSE))) ++ { ++ nm_info ("Will activate connection '%s%s%s'.", ++ nm_device_get_iface (new_dev), ++ ap ? "/" : "", ++ ap ? nm_ap_get_essid (ap) : ""); ++ nm_policy_schedule_device_activation (act_req); ++ nm_act_request_unref (act_req); ++ } ++ else ++ { ++ nm_info ("Error creating activation request for %s", ++ nm_device_get_iface (new_dev)); ++ } + } ++ else ++ { ++ nm_info ("Won't activate %s because it no longer has a link.", ++ nm_device_get_iface (new_dev)); ++ } + } + + if (ap) +@@ -452,11 +495,9 @@ + */ + void nm_policy_schedule_device_change_check (NMData *data) + { +- static GStaticMutex mutex = G_STATIC_MUTEX_INIT; +- + g_return_if_fail (data != NULL); + +- g_static_mutex_lock (&mutex); ++ g_static_mutex_lock (&dcc_mutex); + + if (data->dev_change_check_idle_id == 0) + { +@@ -466,8 +507,7 @@ + data->dev_change_check_idle_id = g_source_attach (source, data->main_context); + g_source_unref (source); + } +- +- g_static_mutex_unlock (&mutex); ++ g_static_mutex_unlock (&dcc_mutex); + } + + +Index: src/nm-ap-security-wpa-eap.c +=================================================================== +--- src/nm-ap-security-wpa-eap.c (Revision 2558) ++++ src/nm-ap-security-wpa-eap.c (Revision 2652) +@@ -57,7 +57,6 @@ + NMAPSecurityWPA_EAP * security = NULL; + int eap_method; + int key_type; +- int phase2_type; + int wpa_version; + char * identity = NULL; + char * passwd = NULL; +Index: src/nm-device.c +=================================================================== +--- src/nm-device.c (Revision 2558) ++++ src/nm-device.c (Revision 2652) +@@ -856,6 +856,12 @@ + data = nm_act_request_get_data (req); + g_assert (data); + ++ /* Sometimes the device gets downed by wpa_supplicant; in any case, make ++ * sure it's up before anything tries to use it. ++ */ ++ if (!nm_device_is_up (self)) ++ nm_device_bring_up (self); ++ + /* DHCP devices try DHCP, non-DHCP default to SUCCESS */ + if (nm_device_get_use_dhcp (self)) + { +Index: src/NetworkManager.c +=================================================================== +--- src/NetworkManager.c (Revision 2558) ++++ src/NetworkManager.c (Revision 2652) +@@ -67,6 +67,7 @@ + + static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer data); + static void nm_data_free (NMData *data); ++static gboolean nm_poll_killswitches(gpointer user_data); + + /* + * nm_get_device_interface_from_hal +@@ -274,7 +275,184 @@ + } + + ++static void handle_killswitch_pcall_done (NMData *data, DBusPendingCall * pcall) ++{ ++ GSource * source; ++ gboolean now_enabled = FALSE; ++ gboolean now_disabled = FALSE; ++ ++ data->ks_pcall_list = g_slist_remove (data->ks_pcall_list, pcall); ++ if (g_slist_length (data->ks_pcall_list) > 0) ++ return; /* not done with all killswitches yet */ ++ ++ if (data->hw_rf_enabled != data->tmp_hw_rf_enabled) { ++ nm_info ("Wireless now %s by radio killswitch", ++ data->tmp_hw_rf_enabled ? "enabled" : "disabled"); ++ if (data->tmp_hw_rf_enabled) ++ now_enabled = TRUE; ++ else ++ now_disabled = TRUE; ++ ++ data->hw_rf_enabled = data->tmp_hw_rf_enabled; ++ } ++ ++ if (data->hw_rf_enabled == data->wireless_enabled) ++ goto out; ++ ++ /* Only re-enabled wireless if killswitch just changed, otherwise ++ * ignore hardware rf enabled state. ++ */ ++ if (now_enabled && !data->wireless_enabled) { ++ data->wireless_enabled = TRUE; ++ nm_policy_schedule_device_change_check (data); ++ nm_dbus_signal_wireless_enabled (data); ++ } else if (!data->hw_rf_enabled && data->wireless_enabled) { ++ GSList * elt; ++ ++ /* Deactivate all wireless devices and force them down so they ++ * turn off their radios. ++ */ ++ nm_lock_mutex (data->dev_list_mutex, __FUNCTION__); ++ for (elt = data->dev_list; elt; elt = g_slist_next (elt)) { ++ NMDevice * dev = (NMDevice *) elt->data; ++ if (nm_device_is_802_11_wireless (dev)) { ++ nm_device_deactivate (dev); ++ nm_device_bring_down (dev); ++ } ++ } ++ nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__); ++ ++ data->wireless_enabled = FALSE; ++ nm_policy_schedule_device_change_check (data); ++ nm_dbus_signal_wireless_enabled (data); ++ } ++ ++out: ++ /* Schedule another killswitch poll */ ++ source = g_timeout_source_new (6000); ++ g_source_set_callback (source, nm_poll_killswitches, data, NULL); ++ g_source_attach (source, data->main_context); ++ g_source_unref (source); ++} ++ ++static void nm_killswitch_getpower_reply_cb (DBusPendingCall *pcall, NMData * data) ++{ ++ DBusError err; ++ DBusMessage * reply = NULL; ++ guint32 status; ++ ++ g_return_if_fail (pcall != NULL); ++ g_return_if_fail (data != NULL); ++ ++ if (!dbus_pending_call_get_completed (pcall)) ++ goto out; ++ ++ if (!(reply = dbus_pending_call_steal_reply (pcall))) ++ goto out; ++ ++ if (message_is_error (reply)) { ++ dbus_error_init (&err); ++ dbus_set_error_from_message (&err, reply); ++ nm_info ("Error getting killswitch power: %s - %s", err.name, err.message); ++ dbus_error_free (&err); ++ goto out; ++ } ++ ++ if (!dbus_message_get_args (reply, &err, DBUS_TYPE_UINT32, &status, DBUS_TYPE_INVALID)) { ++ nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); ++ dbus_error_free (&err); ++ goto out; ++ } ++ ++ if (status == 0) ++ data->tmp_hw_rf_enabled = FALSE; ++ ++out: ++ if (reply) ++ dbus_message_unref (reply); ++ ++ handle_killswitch_pcall_done (data, pcall); ++ dbus_pending_call_unref (pcall); ++} ++ ++ ++static gboolean nm_poll_killswitches (gpointer user_data) ++{ ++ NMData * data = (NMData *) user_data; ++ DBusConnection * connection = data->dbus_connection; ++ GSList * elt; ++ ++ g_return_val_if_fail (data != NULL, FALSE); ++ ++ data->tmp_hw_rf_enabled = TRUE; ++ ++ for (elt = data->killswitch_list; elt; elt = g_slist_next (elt)) ++ { ++ DBusPendingCall * pcall; ++ DBusMessage * message; ++ ++ message = dbus_message_new_method_call ("org.freedesktop.Hal", ++ elt->data, ++ "org.freedesktop.Hal.Device.KillSwitch", ++ "GetPower"); ++ if (!dbus_connection_send_with_reply (connection, message, &pcall, 5000)) { ++ nm_warning ("%s(): could not send dbus message", __func__); ++ } else if (!pcall) { ++ nm_warning ("%s(): could not send dbus message; pcall was NULL", __func__); ++ } else { ++ dbus_pending_call_set_notify (pcall, ++ (DBusPendingCallNotifyFunction) nm_killswitch_getpower_reply_cb, ++ data, ++ NULL); ++ data->ks_pcall_list = g_slist_append (data->ks_pcall_list, pcall); ++ } ++ dbus_message_unref (message); ++ } ++ return FALSE; ++} ++ ++ + /* ++ * nm_add_killswitch_device ++ * ++ * Adds a killswitch device to the list ++ * ++ */ ++static void nm_add_killswitch_device (NMData * data, const char * udi) ++{ ++ char * type; ++ GSList * elt; ++ ++ type = libhal_device_get_property_string (data->hal_ctx, udi, "killswitch.type", NULL); ++ if (!type) ++ return; ++ ++ if (strcmp (type, "wlan") != 0) ++ goto out; ++ ++ /* see if it's already in the list */ ++ for (elt = data->killswitch_list; elt; elt = g_slist_next (elt)) { ++ const char * list_udi = (const char *) elt->data; ++ if (strcmp (list_udi, udi) == 0) ++ goto out; ++ } ++ ++ /* Start polling switches if this is the first switch we've found */ ++ if (g_slist_length (data->killswitch_list) == 0) { ++ GSource * source = g_idle_source_new (); ++ g_source_set_callback (source, nm_poll_killswitches, data, NULL); ++ g_source_attach (source, data->main_context); ++ g_source_unref (source); ++ } ++ ++ data->killswitch_list = g_slist_append (data->killswitch_list, g_strdup (udi)); ++ nm_info ("Found radio killswitch %s", udi); ++ ++out: ++ libhal_free_string (type); ++} ++ ++/* + * nm_hal_device_new_capability + * + */ +@@ -283,10 +461,9 @@ + NMData *data = (NMData *)libhal_ctx_get_user_data (ctx); + + g_return_if_fail (data != NULL); ++ g_return_if_fail (capability != NULL); + +- /*nm_debug ("nm_hal_device_new_capability() called with udi = %s, capability = %s", udi, capability );*/ +- +- if (capability && ((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0))) ++ if (((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0))) + { + char *iface; + +@@ -296,6 +473,10 @@ + g_free (iface); + } + } ++ else if (strcmp (capability, "killswitch") == 0) ++ { ++ nm_add_killswitch_device (data, udi); ++ } + } + + +@@ -340,7 +521,31 @@ + libhal_free_string_array (net_devices); + } + ++void nm_add_initial_killswitch_devices (NMData * data) ++{ ++ char ** udis; ++ int num_udis, i; ++ DBusError error; + ++ g_return_if_fail (data != NULL); ++ ++ dbus_error_init (&error); ++ udis = libhal_find_device_by_capability (data->hal_ctx, "killswitch", &num_udis, &error); ++ if (!udis) ++ return; ++ ++ if (dbus_error_is_set (&error)) { ++ nm_warning("Could not find killswitch devices: %s", error.message); ++ dbus_error_free (&error); ++ return; ++ } ++ ++ for (i = 0; i < num_udis; i++) ++ nm_add_killswitch_device (data, udis[i]); ++ libhal_free_string_array (udis); ++} ++ ++ + /* + * nm_state_change_signal_broadcast + * +@@ -616,28 +821,39 @@ + g_return_if_fail (data != NULL); + + if ((data->hal_ctx = nm_get_hal_ctx (data))) ++ { ++ nm_add_initial_killswitch_devices (data); + nm_add_initial_devices (data); ++ } ++ ++ /* If there weren't any killswitches, mark hardware RF to on */ ++ if (g_slist_length (data->killswitch_list) == 0) ++ data->hw_rf_enabled = TRUE; + } + + + void nm_hal_deinit (NMData *data) + { ++ DBusError error; ++ + g_return_if_fail (data != NULL); + +- if (data->hal_ctx) ++ if (!data->hal_ctx) ++ return; ++ ++ g_slist_foreach (data->killswitch_list, (GFunc) g_free, NULL); ++ g_slist_free (data->killswitch_list); ++ data->killswitch_list = NULL; ++ ++ dbus_error_init (&error); ++ libhal_ctx_shutdown (data->hal_ctx, &error); ++ if (dbus_error_is_set (&error)) + { +- DBusError error; +- +- dbus_error_init (&error); +- libhal_ctx_shutdown (data->hal_ctx, &error); +- if (dbus_error_is_set (&error)) +- { +- nm_warning ("libhal shutdown failed - %s", error.message); +- dbus_error_free (&error); +- } +- libhal_ctx_free (data->hal_ctx); +- data->hal_ctx = NULL; ++ nm_warning ("libhal shutdown failed - %s", error.message); ++ dbus_error_free (&error); + } ++ libhal_ctx_free (data->hal_ctx); ++ data->hal_ctx = NULL; + } + + +Index: src/nm-device-802-11-wireless.c +=================================================================== +--- src/nm-device-802-11-wireless.c (Revision 2558) ++++ src/nm-device-802-11-wireless.c (Revision 2652) +@@ -617,7 +617,10 @@ + /* Start the scanning timeout for devices that can do scanning */ + if (nm_device_get_capabilities (dev) & NM_DEVICE_CAP_WIRELESS_SCAN) + { +- self->priv->pending_scan = g_idle_source_new (); ++ /* Stupid orinoco has problems scanning immediately after being up, ++ * so wait a bit before triggering a scan. ++ */ ++ self->priv->pending_scan = g_timeout_source_new (600); + g_source_set_callback (self->priv->pending_scan, + nm_device_802_11_wireless_scan, + self, +@@ -2981,6 +2984,9 @@ + return NM_ACT_STAGE_RETURN_POSTPONE; + } + ++ /* Some cards are dumb. Wait a second */ ++ sleep (1); ++ + iface = nm_device_get_iface (dev); + if (!supplicant_exec (self)) + { +@@ -3446,10 +3452,9 @@ + char *genie, *gpos, *gend, *custom; + NMAccessPoint *ap = NULL; + size_t clen; +- int maxrate; ++ int maxrate = 0; + struct iw_event iwe_buf, *iwe = &iwe_buf; + struct stream_descr stream; +- struct wireless_scan * wscan = NULL; + int ret; + + g_return_val_if_fail (dev != NULL, FALSE); +Index: src/NetworkManagerMain.h +=================================================================== +--- src/NetworkManagerMain.h (Revision 2558) ++++ src/NetworkManagerMain.h (Revision 2652) +@@ -82,6 +82,7 @@ + GSList * dev_list; + GMutex * dev_list_mutex; + ++ gboolean hw_rf_enabled; + gboolean wireless_enabled; + gboolean modem_active; + gboolean asleep; +@@ -90,6 +91,10 @@ + GSList * dialup_list; + GMutex * dialup_list_mutex; + ++ GSList * killswitch_list; ++ GSList * ks_pcall_list; /* track killswitch D-Bus pending calls */ ++ gboolean tmp_hw_rf_enabled; ++ + struct NMAccessPointList *allowed_ap_list; + struct NMAccessPointList *invalid_ap_list; + } NMData; +Index: src/NetworkManagerSystem.c +=================================================================== +--- src/NetworkManagerSystem.c (Revision 2558) ++++ src/NetworkManagerSystem.c (Revision 2652) +@@ -64,6 +64,7 @@ + struct sockaddr_in *p; + const char * iface; + int err; ++ NMIP4Config * config = NULL; + + iface = nm_device_get_iface (dev); + +@@ -75,6 +76,15 @@ + if (ip4_gateway == 0) + return TRUE; + ++ /* ++ * Do not add the route if the destination is on the same subnet. ++ */ ++ config = nm_device_get_ip4_config(dev); ++ if (config && ++ ((guint32)ip4_dest & nm_ip4_config_get_netmask(config)) == ++ (nm_ip4_config_get_address(config) & nm_ip4_config_get_netmask(config))) ++ return TRUE; ++ + if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL) + return FALSE; + diff --git a/debian/patches/21-endianess_fix_r2754.patch b/debian/patches/21-endianess_fix_r2754.patch new file mode 100644 index 00000000..4932e22a --- /dev/null +++ b/debian/patches/21-endianess_fix_r2754.patch @@ -0,0 +1,28 @@ +Index: ChangeLog +=================================================================== +--- ChangeLog (Revision 2753) ++++ ChangeLog (Revision 2754) +@@ -1,3 +1,8 @@ ++2007-08-30 Dan Williams <dcbw@redhat.com> ++ ++ * libnm-util/sha1.c ++ - Include config.h to get defines for endiannes (gnome.org #420216) ++ + 2007-07-26 Dan Williams <dcbw@redhat.com> + + Patch from Bernhard Miklautz <bernhard.miklautz@shacknet.at> +Index: libnm-util/sha1.c +=================================================================== +--- libnm-util/sha1.c (Revision 2753) ++++ libnm-util/sha1.c (Revision 2754) +@@ -12,6 +12,10 @@ + * See README and COPYING for more details. + */ + ++#ifdef HAVE_CONFIG_H ++#include <config.h> ++#endif ++ + #include <stdlib.h> + #include <string.h> + diff --git a/debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch b/debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch new file mode 100644 index 00000000..ac0459b6 --- /dev/null +++ b/debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch @@ -0,0 +1,44 @@ +=== modified file 'gnome/vpn-properties/Makefile.am' +--- network-manager-0.6.5.old/gnome/vpn-properties/Makefile.am 2007-06-25 13:51:34 +0000 ++++ network-manager-0.6.5/gnome/vpn-properties/Makefile.am 2007-08-03 11:50:32 +0000 +@@ -21,17 +21,16 @@ nm_vpn_properties_CFLAGS = + $(GCONF_CFLAGS) \ + $(GMODULE_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DICONDIR=\""$(datadir)/icons"\" \ + -DGLADEDIR=\""$(gladedir)"\" \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ +- -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DVERSION=\"$(VERSION)\" \ + $(NULL) + + nm_vpn_properties_LDADD = \ + $(GLADE_LIBS) \ + $(GTK_LIBS) \ + $(GCONF_LIBS) \ + +=== modified file 'gnome/vpn-properties/Makefile.in' +--- network-manager-0.6.5.old/gnome/vpn-properties/Makefile.in 2007-06-25 13:51:34 +0000 ++++ network-manager-0.6.5/gnome/vpn-properties/Makefile.in 2007-08-03 11:50:32 +0000 +@@ -258,17 +258,16 @@ nm_vpn_properties_CFLAGS = \ + $(GCONF_CFLAGS) \ + $(GMODULE_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DICONDIR=\""$(datadir)/icons"\" \ + -DGLADEDIR=\""$(gladedir)"\" \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ +- -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DVERSION=\"$(VERSION)\" \ + $(NULL) + + + nm_vpn_properties_LDADD = \ + $(GLADE_LIBS) \ + $(GTK_LIBS) \ + diff --git a/debian/patches/23-rfkill_return_type.patch b/debian/patches/23-rfkill_return_type.patch new file mode 100644 index 00000000..1e327d46 --- /dev/null +++ b/debian/patches/23-rfkill_return_type.patch @@ -0,0 +1,22 @@ +Index: src/NetworkManager.c +=================================================================== +--- src/NetworkManager.c (Revision 2974) ++++ src/NetworkManager.c (Arbeitskopie) +@@ -339,7 +339,7 @@ + { + DBusError err; + DBusMessage * reply = NULL; +- guint32 status; ++ gint32 status; + + g_return_if_fail (pcall != NULL); + g_return_if_fail (data != NULL); +@@ -358,7 +358,7 @@ + goto out; + } + +- if (!dbus_message_get_args (reply, &err, DBUS_TYPE_UINT32, &status, DBUS_TYPE_INVALID)) { ++ if (!dbus_message_get_args (reply, &err, DBUS_TYPE_INT32, &status, DBUS_TYPE_INVALID)) { + nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); + dbus_error_free (&err); + goto out; diff --git a/debian/patches/24-get_mode_fix_r3122.patch b/debian/patches/24-get_mode_fix_r3122.patch new file mode 100644 index 00000000..f89db8d5 --- /dev/null +++ b/debian/patches/24-get_mode_fix_r3122.patch @@ -0,0 +1,13 @@ +Index: src/nm-device-802-11-wireless.c +=================================================================== +--- src/nm-device-802-11-wireless.c (Revision 3121) ++++ src/nm-device-802-11-wireless.c (Revision 3122) +@@ -1144,7 +1144,7 @@ + #endif + if (iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (NM_DEVICE (self)), SIOCGIWMODE, &wrq) == 0) + { +- if ((mode == IW_MODE_ADHOC) || (mode == IW_MODE_INFRA)) ++ if ((wrq.u.mode == IW_MODE_ADHOC) || (wrq.u.mode == IW_MODE_INFRA)) + mode = wrq.u.mode; + } + else diff --git a/debian/patches/25-libnl_unique_pid_r3155.patch b/debian/patches/25-libnl_unique_pid_r3155.patch new file mode 100644 index 00000000..a14aad83 --- /dev/null +++ b/debian/patches/25-libnl_unique_pid_r3155.patch @@ -0,0 +1,417 @@ +Index: src/NetworkManagerSystem.c +=================================================================== +--- src/NetworkManagerSystem.c (Revision 3154) ++++ src/NetworkManagerSystem.c (Revision 3155) +@@ -177,24 +177,6 @@ + } + + +-static struct nl_cache * get_link_cache (struct nl_handle *nlh) +-{ +- static GStaticMutex mutex = G_STATIC_MUTEX_INIT; +- static struct nl_cache * link_cache = NULL; +- +- g_static_mutex_lock (&mutex); +- if (!link_cache) +- link_cache = rtnl_link_alloc_cache (nlh); +- if (!link_cache) +- nm_warning ("ERROR: couldn't allocate rtnl link cache!"); +- else +- nl_cache_update (nlh, link_cache); +- g_static_mutex_unlock (&mutex); +- +- return link_cache; +-} +- +- + static void iface_to_rtnl_index (const char *iface, struct nl_handle *nlh, struct rtnl_addr *addr) + { + struct nl_cache * cache = NULL; +@@ -204,14 +186,17 @@ + g_return_if_fail (nlh != NULL); + g_return_if_fail (addr != NULL); + +- if ((cache = get_link_cache (nlh))) +- { +- i = rtnl_link_name2i (cache, iface); +- if (RTNL_LINK_NOT_FOUND != i) +- rtnl_addr_set_ifindex (addr, i); ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache.", __func__); ++ return; + } +- else +- nm_warning ("iface_to_rtnl_link() couldn't allocate link cache."); ++ ++ nl_cache_update (nlh, cache); ++ i = rtnl_link_name2i (cache, iface); ++ if (RTNL_LINK_NOT_FOUND != i) ++ rtnl_addr_set_ifindex (addr, i); ++ nl_cache_destroy_and_free (cache); + } + + +@@ -223,45 +208,104 @@ + g_return_val_if_fail (iface != NULL, NULL); + g_return_val_if_fail (nlh != NULL, NULL); + +- if ((cache = get_link_cache (nlh))) +- have_link = rtnl_link_get_by_name (cache, iface); +- else +- nm_warning ("iface_to_rtnl_link() couldn't allocate link cache."); ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache.", __func__); ++ return NULL; ++ } + ++ nl_cache_update (nlh, cache); ++ have_link = rtnl_link_get_by_name (cache, iface); ++ nl_cache_destroy_and_free (cache); ++ + return have_link; + } + ++static GStaticMutex nlh_mutex = G_STATIC_MUTEX_INIT; + +-static struct nl_handle * new_nl_handle (void) ++GHashTable *nl_pids = NULL; ++ ++static struct ++nl_handle * new_nl_handle (void) + { +- struct nl_handle * nlh = NULL; ++ struct nl_handle * nlh = NULL; ++ guint32 nl_pid; ++ int i = 0; + +- nlh = nl_handle_alloc_nondefault(NL_CB_VERBOSE); +- nl_handle_set_pid (nlh, (pthread_self() << 16 | getpid())); +- if (nl_connect(nlh, NETLINK_ROUTE) < 0) +- { +- nm_warning ("%s: couldn't connecto to netlink: %s", __func__, nl_geterror()); +- nl_handle_destroy (nlh); +- nlh = NULL; ++ g_static_mutex_lock (&nlh_mutex); ++ ++ if (nl_pids == NULL) { ++ nl_pids = g_hash_table_new (g_direct_hash, g_direct_equal); ++ g_assert (nl_pids); ++ ++ /* Insert the PID used by nm-netlink-monitor.c */ ++ g_hash_table_insert (nl_pids, GUINT_TO_POINTER (getpid ()), GUINT_TO_POINTER (1)); + } + ++ while (i++ < 10) { ++ nl_pid = g_random_int (); ++ if (!g_hash_table_lookup (nl_pids, GUINT_TO_POINTER (nl_pid))) ++ break; ++ } ++ ++ if (i < 10) { ++ nlh = nl_handle_alloc_nondefault (NL_CB_VERBOSE); ++ nl_handle_set_pid (nlh, nl_pid); ++ ++ if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ nm_warning ("%s: couldn't connect to netlink: %s", __func__, nl_geterror ()); ++ nl_handle_destroy (nlh); ++ nlh = NULL; ++ } else { ++ g_hash_table_insert (nl_pids, GUINT_TO_POINTER (nl_pid), GUINT_TO_POINTER (1)); ++ } ++ } else { ++ g_warning ("%s: couldn't find free netlink pid.", __func__); ++ } ++ ++ g_static_mutex_unlock (&nlh_mutex); ++ + return nlh; + } + ++static void ++destroy_nl_handle (struct nl_handle *nlh) ++{ ++ g_return_if_fail (nlh != NULL); + ++ g_static_mutex_lock (&nlh_mutex); ++ g_hash_table_remove (nl_pids, GUINT_TO_POINTER (nl_handle_get_pid (nlh))); ++ g_static_mutex_unlock (&nlh_mutex); ++ ++ nl_close (nlh); ++ nl_handle_destroy (nlh); ++ ++} ++ ++ + int + nm_system_get_rtnl_index_from_iface (const char *iface) + { + struct nl_handle * nlh = NULL; +- struct nl_cache * cache = NULL; ++ struct nl_cache * cache; + int i = RTNL_LINK_NOT_FOUND; + + nlh = new_nl_handle (); +- if (nlh && (cache = get_link_cache (nlh))) +- i = rtnl_link_name2i (cache, iface); +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ if (!nlh) ++ return RTNL_LINK_NOT_FOUND; + ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache."); ++ goto out; ++ } ++ ++ nl_cache_update (nlh, cache); ++ i = rtnl_link_name2i (cache, iface); ++ nl_cache_destroy_and_free (cache); ++ ++out: ++ destroy_nl_handle (nlh); + return i; + } + +@@ -275,18 +319,31 @@ + char * buf = NULL; + + nlh = new_nl_handle (); +- if (nlh && (cache = get_link_cache (nlh))) +- { +- buf = g_malloc0 (MAX_IFACE_LEN); +- if (!rtnl_link_i2name (cache, rtnl_index, buf, MAX_IFACE_LEN - 1)) +- { +- g_free (buf); +- buf = NULL; +- } ++ if (!nlh) ++ return NULL; ++ ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache."); ++ goto out; + } +- nl_close (nlh); +- nl_handle_destroy (nlh); + ++ nl_cache_update (nlh, cache); ++ ++ buf = g_malloc0 (MAX_IFACE_LEN); ++ if (!buf) ++ goto destroy_cache; ++ ++ if (!rtnl_link_i2name (cache, rtnl_index, buf, MAX_IFACE_LEN - 1)) { ++ g_free (buf); ++ buf = NULL; ++ } ++ ++destroy_cache: ++ nl_cache_destroy_and_free (cache); ++ ++out: ++ destroy_nl_handle (nlh); + return buf; + } + +@@ -313,13 +370,15 @@ + config = nm_device_get_ip4_config (dev); + g_return_val_if_fail (config != NULL, FALSE); + ++ nlh = new_nl_handle (); ++ if (!nlh) ++ return FALSE; ++ + nm_system_delete_default_route (); + nm_system_device_flush_addresses (dev); + nm_system_device_flush_routes (dev); + nm_system_flush_arp_cache (); + +- nlh = new_nl_handle (); +- + if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_DEFAULT))) + { + iface_to_rtnl_index (nm_device_get_iface (dev), nlh, addr); +@@ -330,8 +389,7 @@ + else + nm_warning ("nm_system_device_set_from_ip4_config(): couldn't create rtnl address!\n"); + +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ destroy_nl_handle (nlh); + + sleep (1); + nm_system_device_set_ip4_route (dev, nm_ip4_config_get_gateway (config), 0, 0, nm_ip4_config_get_mss (config)); +@@ -424,7 +482,13 @@ + * Set IPv4 configuration of a VPN device from an NMIP4Config object. + * + */ +-gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevice *active_device, const char *iface, NMIP4Config *config, char **routes, int num_routes) ++gboolean ++nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, ++ NMDevice *active_device, ++ const char *iface, ++ NMIP4Config *config, ++ char **routes, ++ int num_routes) + { + NMIP4Config * ad_config = NULL; + struct nl_handle * nlh = NULL; +@@ -437,71 +501,73 @@ + if (active_device && (ad_config = nm_device_get_ip4_config (active_device))) + nm_system_device_set_ip4_route (active_device, nm_ip4_config_get_gateway (ad_config), nm_ip4_config_get_gateway (config), 0xFFFFFFFF, nm_ip4_config_get_mss (config)); + +- if (iface != NULL && strlen (iface)) +- { +- nm_system_device_set_up_down_with_iface (iface, TRUE); ++ if (!iface || !strlen (iface)) ++ goto done; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (); ++ if (!nlh) ++ goto done; + +- if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_PTP_DEFAULT))) +- { +- int err = 0; +- iface_to_rtnl_index (iface, nlh, addr); +- if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) +- nm_warning ("nm_system_device_set_from_ip4_config(): error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); +- rtnl_addr_put (addr); +- } +- else +- nm_warning ("nm_system_vpn_device_set_from_ip4_config(): couldn't create rtnl address!\n"); ++ nm_system_device_set_up_down_with_iface (iface, TRUE); + +- /* Set the MTU */ +- if ((request = rtnl_link_alloc ())) +- { +- struct rtnl_link * old; ++ if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_PTP_DEFAULT))) ++ { ++ int err = 0; ++ iface_to_rtnl_index (iface, nlh, addr); ++ if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) ++ nm_warning ("nm_system_device_set_from_ip4_config(): error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); ++ rtnl_addr_put (addr); ++ } ++ else ++ nm_warning ("nm_system_vpn_device_set_from_ip4_config(): couldn't create rtnl address!\n"); + +- old = iface_to_rtnl_link (iface, nlh); +- rtnl_link_set_mtu (request, 1412); +- rtnl_link_change (nlh, old, request, 0); ++ /* Set the MTU */ ++ if ((request = rtnl_link_alloc ())) ++ { ++ struct rtnl_link * old; + +- rtnl_link_put (old); +- rtnl_link_put (request); +- } ++ old = iface_to_rtnl_link (iface, nlh); ++ rtnl_link_set_mtu (request, 1412); ++ rtnl_link_change (nlh, old, request, 0); + +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ rtnl_link_put (old); ++ rtnl_link_put (request); ++ } + +- sleep (1); ++ destroy_nl_handle (nlh); + +- nm_system_device_flush_routes_with_iface (iface); +- if (num_routes <= 0) ++ sleep (1); ++ ++ nm_system_device_flush_routes_with_iface (iface); ++ if (num_routes <= 0) ++ { ++ nm_system_delete_default_route (); ++ nm_system_device_add_default_route_via_device_with_iface (iface); ++ } ++ else ++ { ++ int i; ++ for (i = 0; i < num_routes; i++) + { +- nm_system_delete_default_route (); +- nm_system_device_add_default_route_via_device_with_iface (iface); +- } +- else +- { +- int i; +- for (i = 0; i < num_routes; i++) ++ char *valid_ip4_route; ++ ++ /* Make sure the route is valid, otherwise it's a security risk as the route ++ * text is simply taken from the user, and passed directly to system(). If ++ * we did not check the route, think of: ++ * ++ * system("/sbin/ip route add `rm -rf /` dev eth0") ++ * ++ * where `rm -rf /` was the route text. As UID 0 (root), we have to be careful. ++ */ ++ if ((valid_ip4_route = validate_ip4_route (routes[i]))) + { +- char *valid_ip4_route; +- +- /* Make sure the route is valid, otherwise it's a security risk as the route +- * text is simply taken from the user, and passed directly to system(). If +- * we did not check the route, think of: +- * +- * system("/sbin/ip route add `rm -rf /` dev eth0") +- * +- * where `rm -rf /` was the route text. As UID 0 (root), we have to be careful. +- */ +- if ((valid_ip4_route = validate_ip4_route (routes[i]))) +- { +- nm_system_device_add_route_via_device_with_iface (iface, valid_ip4_route); +- g_free (valid_ip4_route); +- } ++ nm_system_device_add_route_via_device_with_iface (iface, valid_ip4_route); ++ g_free (valid_ip4_route); + } + } + } + ++done: + nm_named_manager_add_ip4_config (named, config); + + return TRUE; +@@ -548,7 +614,8 @@ + + g_return_val_if_fail (iface != NULL, FALSE); + +- if (!(nlh = new_nl_handle ())) ++ nlh = new_nl_handle (); ++ if (!nlh) + return FALSE; + + if (!(request = rtnl_link_alloc ())) +@@ -569,9 +636,7 @@ + success = TRUE; + + out: +- nl_close (nlh); +- nl_handle_destroy (nlh); +- ++ destroy_nl_handle (nlh); + return success; + } + +@@ -614,6 +679,6 @@ + out_request: + rtnl_link_put (request); + out_nl_close: +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ destroy_nl_handle (nlh); + } ++ diff --git a/debian/patches/26-libnl_1.0-pre8_r3206.patch b/debian/patches/26-libnl_1.0-pre8_r3206.patch new file mode 100644 index 00000000..6f96215d --- /dev/null +++ b/debian/patches/26-libnl_1.0-pre8_r3206.patch @@ -0,0 +1,202 @@ +Index: src/nm-netlink-monitor.c +=================================================================== +--- src/nm-netlink-monitor.c (Revision 3205) ++++ src/nm-netlink-monitor.c (Revision 3206) +@@ -174,7 +174,7 @@ + } + + monitor_address.nl_family = AF_NETLINK; +- monitor_address.nl_pid = getpid (); ++ monitor_address.nl_pid = UINT_MAX; + monitor_address.nl_groups = RTMGRP_LINK; + + if (bind (fd, +@@ -365,7 +365,7 @@ + packet.header.nlmsg_len = NLMSG_LENGTH (sizeof (struct rtgenmsg)); + packet.header.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; + packet.header.nlmsg_type = RTM_GETLINK; +- packet.header.nlmsg_pid = getpid (); ++ packet.header.nlmsg_pid = UINT_MAX; + /* Might be good to generate a unique sequence number and track + the response */ + packet.header.nlmsg_seq = sequence_number << 16; +Index: src/NetworkManagerSystem.c +=================================================================== +--- src/NetworkManagerSystem.c (Revision 3205) ++++ src/NetworkManagerSystem.c (Revision 3206) +@@ -196,7 +196,7 @@ + i = rtnl_link_name2i (cache, iface); + if (RTNL_LINK_NOT_FOUND != i) + rtnl_addr_set_ifindex (addr, i); +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + } + + +@@ -216,55 +216,42 @@ + + nl_cache_update (nlh, cache); + have_link = rtnl_link_get_by_name (cache, iface); +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + + return have_link; + } + +-static GStaticMutex nlh_mutex = G_STATIC_MUTEX_INIT; +- +-GHashTable *nl_pids = NULL; +- + static struct +-nl_handle * new_nl_handle (void) ++nl_handle *new_nl_handle (gboolean recursive) + { +- struct nl_handle * nlh = NULL; +- guint32 nl_pid; +- int i = 0; ++ struct nl_handle *nlh = NULL; ++ struct nl_cb *cb; + +- g_static_mutex_lock (&nlh_mutex); +- +- if (nl_pids == NULL) { +- nl_pids = g_hash_table_new (g_direct_hash, g_direct_equal); +- g_assert (nl_pids); +- +- /* Insert the PID used by nm-netlink-monitor.c */ +- g_hash_table_insert (nl_pids, GUINT_TO_POINTER (getpid ()), GUINT_TO_POINTER (1)); ++ cb = nl_cb_alloc (NL_CB_VERBOSE); ++ nlh = nl_handle_alloc_cb (cb); ++ if (!nlh) { ++ nm_warning ("%s: couldn't allocate netlink handle: %s", __func__, nl_geterror ()); ++ return NULL; + } + +- while (i++ < 10) { +- nl_pid = g_random_int (); +- if (!g_hash_table_lookup (nl_pids, GUINT_TO_POINTER (nl_pid))) +- break; +- } ++ if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ /* HACK: try one more time. Because the netlink monitor for link state ++ * inits before we get here, it grabs the port that matches the PID ++ * of the NM process, which also happens to be the PID that libnl uses ++ * the first time too. The real fix is to convert nm-netlink-monitor.c ++ * over to use libnl. ++ */ ++ nl_handle_destroy (nlh); ++ if (recursive) ++ return NULL; + +- if (i < 10) { +- nlh = nl_handle_alloc_nondefault (NL_CB_VERBOSE); +- nl_handle_set_pid (nlh, nl_pid); +- +- if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ nlh = new_nl_handle (TRUE); ++ if (!nlh) { + nm_warning ("%s: couldn't connect to netlink: %s", __func__, nl_geterror ()); +- nl_handle_destroy (nlh); +- nlh = NULL; +- } else { +- g_hash_table_insert (nl_pids, GUINT_TO_POINTER (nl_pid), GUINT_TO_POINTER (1)); ++ return NULL; + } +- } else { +- g_warning ("%s: couldn't find free netlink pid.", __func__); + } + +- g_static_mutex_unlock (&nlh_mutex); +- + return nlh; + } + +@@ -273,16 +260,10 @@ + { + g_return_if_fail (nlh != NULL); + +- g_static_mutex_lock (&nlh_mutex); +- g_hash_table_remove (nl_pids, GUINT_TO_POINTER (nl_handle_get_pid (nlh))); +- g_static_mutex_unlock (&nlh_mutex); +- + nl_close (nlh); + nl_handle_destroy (nlh); +- + } + +- + int + nm_system_get_rtnl_index_from_iface (const char *iface) + { +@@ -290,7 +271,7 @@ + struct nl_cache * cache; + int i = RTNL_LINK_NOT_FOUND; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return RTNL_LINK_NOT_FOUND; + +@@ -302,7 +283,7 @@ + + nl_cache_update (nlh, cache); + i = rtnl_link_name2i (cache, iface); +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + + out: + destroy_nl_handle (nlh); +@@ -318,7 +299,7 @@ + struct nl_cache * cache = NULL; + char * buf = NULL; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return NULL; + +@@ -340,7 +321,7 @@ + } + + destroy_cache: +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + + out: + destroy_nl_handle (nlh); +@@ -370,7 +351,7 @@ + config = nm_device_get_ip4_config (dev); + g_return_val_if_fail (config != NULL, FALSE); + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return FALSE; + +@@ -504,7 +485,7 @@ + if (!iface || !strlen (iface)) + goto done; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + goto done; + +@@ -614,7 +595,7 @@ + + g_return_val_if_fail (iface != NULL, FALSE); + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return FALSE; + +@@ -658,7 +639,7 @@ + if (!mtu) + return; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return; + diff --git a/debian/patches/27-dont_repeat_errors.patch b/debian/patches/27-dont_repeat_errors.patch new file mode 100644 index 00000000..64e23223 --- /dev/null +++ b/debian/patches/27-dont_repeat_errors.patch @@ -0,0 +1,37 @@ +diff --git a/src/NetworkManager.c b/src/NetworkManager.c +index 4f89f63..ddb5a4a 100644 +--- a/src/NetworkManager.c ++++ b/src/NetworkManager.c +@@ -65,6 +65,8 @@ + */ + static NMData *nm_data = NULL; + ++char *ks_err_message = NULL; ++ + static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer data); + static void nm_data_free (NMData *data); + static gboolean nm_poll_killswitches(gpointer user_data); +@@ -353,13 +355,21 @@ static void nm_killswitch_getpower_reply_cb (DBusPendingCall *pcall, NMData * da + if (message_is_error (reply)) { + dbus_error_init (&err); + dbus_set_error_from_message (&err, reply); +- nm_info ("Error getting killswitch power: %s - %s", err.name, err.message); ++ if (!ks_err_message || strcmp (ks_err_message, err.message)) { ++ nm_info ("Error getting killswitch power: %s - %s", err.name, err.message); ++ g_free (ks_err_message); ++ ks_err_message = g_strdup (err.message); ++ } + dbus_error_free (&err); + goto out; + } + + if (!dbus_message_get_args (reply, &err, DBUS_TYPE_INT32, &status, DBUS_TYPE_INVALID)) { +- nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); ++ if (!ks_err_message || strcmp (ks_err_message, err.message)) { ++ nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); ++ g_free (ks_err_message); ++ ks_err_message = g_strdup (err.message); ++ } + dbus_error_free (&err); + goto out; + } diff --git a/debian/patches/dbus_access_network_manager.patch b/debian/patches/dbus_access_network_manager.patch deleted file mode 100644 index 06886be3..00000000 --- a/debian/patches/dbus_access_network_manager.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/NetworkManager.conf.orig 2006-02-07 04:24:38.000000000 +0100 -+++ src/NetworkManager.conf 2006-02-07 04:25:00.000000000 +0100 -@@ -8,7 +8,7 @@ - <allow send_destination="org.freedesktop.NetworkManager"/> - <allow send_interface="org.freedesktop.NetworkManager"/> - </policy> -- <policy at_console="true"> -+ <policy group="netdev"> - <allow send_destination="org.freedesktop.NetworkManager"/> - <allow send_interface="org.freedesktop.NetworkManager"/> - </policy> diff --git a/debian/patches/dbus_access_nm_applet.patch b/debian/patches/dbus_access_nm_applet.patch deleted file mode 100644 index 94053ea2..00000000 --- a/debian/patches/dbus_access_nm_applet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnome/applet/nm-applet.conf.orig 2006-02-07 04:22:39.000000000 +0100 -+++ gnome/applet/nm-applet.conf 2006-02-07 04:23:00.000000000 +0100 -@@ -8,7 +8,7 @@ - <allow send_destination="org.freedesktop.NetworkManagerInfo"/> - <allow send_interface="org.freedesktop.NetworkManagerInfo"/> - </policy> -- <policy at_console="true"> -+ <policy group="netdev"> - <allow own="org.freedesktop.NetworkManagerInfo"/> - - <allow send_destination="org.freedesktop.NetworkManagerInfo"/> diff --git a/debian/patches/if_fix.patch b/debian/patches/if_fix.patch deleted file mode 100644 index 379e9b38..00000000 --- a/debian/patches/if_fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: src/nm-device-802-3-ethernet.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v -retrieving revision 1.3 -diff -u -r1.3 nm-device-802-3-ethernet.c ---- src/nm-device-802-3-ethernet.c 3 Jan 2006 17:47:38 -0000 1.3 -+++ src/nm-device-802-3-ethernet.c 4 Jan 2006 17:13:33 -0000 -@@ -328,7 +328,9 @@ - /**************************************/ - /* MII capability detection */ - /**************************************/ -+#define _LINUX_IF_H - #include <linux/mii.h> -+#undef _LINUX_IF_H - - static int - mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location) -Index: src/nm-netlink-monitor.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/nm-netlink-monitor.c,v -retrieving revision 1.17 -diff -u -r1.17 nm-netlink-monitor.c ---- src/nm-netlink-monitor.c 12 Aug 2005 19:06:09 -0000 1.17 -+++ src/nm-netlink-monitor.c 4 Jan 2006 17:13:33 -0000 -@@ -30,7 +30,7 @@ - #include <linux/types.h> - #include <linux/netlink.h> - #include <linux/rtnetlink.h> --#include <linux/if.h> -+#include <net/if.h> - #include <linux/unistd.h> - #include <unistd.h> - diff --git a/debian/rules b/debian/rules index 55f1b30c..a4a1c76d 100755 --- a/debian/rules +++ b/debian/rules @@ -4,27 +4,28 @@ include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/simple-patchsys.mk +DEB_INSTALL_DOCS_ALL := README AUTHORS TODO + DEB_CONFIGURE_EXTRA_FLAGS += \ --with-dbus-sys=/etc/dbus-1/system.d \ + --with-wpa_supplicant=/sbin/wpa_supplicant \ --with-dhcdbd=/usr/sbin/dhcdbd \ - --with-wpa_supplicant=/usr/sbin/wpa_supplicant \ --with-distro=debian +DEB_DH_INSTALLINIT_ARGS := -- start 26 2 3 4 5 . stop 14 0 1 6 . + +DEB_DH_SHLIBDEPS_ARGS := -Xnm-vpn-properties + clean:: - rm -f po/*.gmo rm -f debian/*.1 build/network-manager:: - - /usr/bin/docbook-to-man debian/NetworkManagerDispatcher.sgml > debian/NetworkManagerDispatcher.1 - /usr/bin/docbook-to-man debian/NetworkManager.sgml > debian/NetworkManager.1 /usr/bin/docbook-to-man debian/nm-vpn-properties.sgml > debian/nm-vpn-properties.1 - /usr/bin/docbook-to-man debian/nm-applet.sgml > debian/nm-applet.1 binary-install/network-manager:: - install -m 755 debian/network-manager.dbus-event \ - debian/network-manager/etc/dbus-1/event.d/25NetworkManager - install -m 755 debian/network-manager-dispatcher.dbus-event \ - debian/network-manager/etc/dbus-1/event.d/26NetworkManagerDispatcher + dh_installinit --name network-manager-dispatcher $(DEB_DH_INSTALLINIT_ARGS) + install -m 755 debian/network-manager-dispatcher.script \ + debian/network-manager/etc/NetworkManager/dispatcher.d/01ifupdown + diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..f2d66b4c --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://download.gnome.org/sources/NetworkManager/0.6/NetworkManager-(.*)\.tar\.gz |