my mistake, being in the wrong directory. On 2010-10-08, at 10:19 AM, Vijayan, Priya wrote:
> Are we submitting from Trunk to Trunk:Testing and also replacing pidgin? > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Anas Nashif > Sent: Friday, October 08, 2010 10:13 AM > To: [email protected] > Subject: [meego-commits] 8203: Changes to Trunk:Testing/PackageKit > > Hi, > I have made the following changes to PackageKit in project Trunk:Testing. > Please review and accept ASAP. > > Thank You, > Anas Nashif > > [This message was auto-generated] > > --- > > Request #8203: > > submit: Trunk/nokia-usb-networking(r7) -> Trunk:Testing/PackageKit > > > Message: > Move to Trunk > > State: new 2010-10-08T10:13:29 nashif > Comment: None > > > > changes files: > -------------- > > ++++++ new changes file: > --- nokia-usb-networking.changes > +++ nokia-usb-networking.changes > +* Tue Aug 17 2010 Carsten Munk <[email protected]> - 1.4 > +- Change back to g_nokia as BME breaks without it and doesn't charge. > + > +* Thu Jul 22 2010 Marko Saukko <[email protected]> - 1.3 > +- Reverted the usb networking to ifconfig as connman does not have > + support for the gadget devices. > + > +Mon Jun 7 12:08:48 UTC 2010 - [email protected] 1.2 > +- Setup ExclusiveArch arm only and init scripts improvements > + > +Thu May 27 13:44:21 UTC 2010 - [email protected] 1.1 > +- Make gateway default off and minor improvements > + > +Mon May 24 19:27:29 UTC 2010 - [email protected] 1.0 > +- Added Connman support > + > +* Tue Apr 28 2010 Marko Saukko <[email protected]> 0.1 > +- Initial release based on nokia-usb-networking script from > + nokia-n900-configs package > > ++++++ deleted changes files: > --- PackageKit.changes > > old: > ---- > 0001-Sent-correct-network-state-for-connman-end.patch > 0001-Transfer-the-correct-size-of-patch.patch > 0002-Patch-should-also-be-considered-while-executing-reso.patch > 0003-Transfer-correct-restart-info-while-updating-package.patch > 0004-use-local-repo.patch > Add-transaction_start-and-transaction_stop.patch > Makefile > PackageKit-0.6.7.tar.bz2 > PackageKit.changes > PackageKit.spec > meego-preupgrade.patch > packagekit-shaddap.patch > pk-meego-policy.patch > pk-meego-vendor.patch > pk-transfer-pk-error-code.patch > pk-yum-disable-preupgrade.patch > pk-yum-ignore-log-format.patch > pk-zypp-add-no-space-support.patch > pk-zypp-patch-only.patch > pk-zypp-refresh-solv-pool-data.patch > pk-zypp-refresh_reload-rpmdb_disable-update-cache.patch > pk-zypp-set-proxy-env.patch > > new: > ---- > nokia-usb-net-confd > nokia-usb-networking.changes > nokia-usb-networking.init > nokia-usb-networking.spec > > spec files: > ----------- > > ++++++ new spec file: > --- nokia-usb-networking.spec > +++ nokia-usb-networking.spec > +Name: nokia-usb-networking > +Version: 1.3 > +Release: 0 > +Summary: Provides init script for USB networking for Nokia devices > +Group: System/Networking > +License: GPLv2 > +URL: > http://gitorious.org/meego-device-adaptation/n900_nokia-usb-networking/ > +Source1: nokia-usb-networking.init > +Source2: nokia-usb-net-confd > +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root > + > +ExclusiveArch: %{arm} > + > +Requires(post): /sbin/chkconfig > +Requires(preun): /sbin/chkconfig > +Requires: dbus-python > +Requires: pygobject2 > +Requires: connman > + > +%description > +Provides init script and configuration daemon for USB networking for Nokia > devices. > + > +%prep > + > +%build > + > +%install > +rm -rf $RPM_BUILD_ROOT > +install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/ > +install -m 755 %{SOURCE1} > $RPM_BUILD_ROOT/etc/rc.d/init.d/nokia-usb-networking > +install -d $RPM_BUILD_ROOT/usr/sbin/ > +install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/sbin/nokia-usb-net-confd > + > +%clean > +rm -rf $RPM_BUILD_ROOT > + > +%post > +/sbin/chkconfig --add nokia-usb-networking > + > +%preun > +if [ "$1" = 0 ] > +then > + /etc/rc.d/init.d/nokia-usb-networking stop > /dev/null 2>&1 || : > + /sbin/chkconfig --del nokia-usb-networking > +fi > + > +%files > +%defattr(644,root,root,-) > +%attr(755,root,root) /etc/rc.d/init.d/nokia-usb-networking > +%attr(755,root,root) /usr/sbin/nokia-usb-net-confd > > ++++++ deleted spec files: > --- PackageKit.spec > > other changes: > -------------- > > ++++++ nokia-usb-net-confd (new) > --- nokia-usb-net-confd > +++ nokia-usb-net-confd > +#!/usr/bin/python > + > +# This is daemon to setup ip address to usb-network using connman > +# > +# It listen singnals send by connmand and setup ip adderss to service when > +# network is available. > + > +__copyright__ = "Copyright 2010, Nokia" > +__license__ = "GPLv2" > +__author__ = "Kalle Lampila" > +__email__ = "[email protected]" > + > +import os > +import sys > +import gobject > +import signal > +import resource > +import atexit > +import dbus > +import dbus.mainloop.glib > + > +# > +#network parameters > +# > + > +IPADDR = "192.168.2.15" > +NETMASK = "255.255.255.0" > +GATEWAY = None > +#GATEWAY = "192.168.2.14" > + > + > +# daemon parameters. > +# File mode creation mask of the daemon. > +UMASK = 0 > + > +# Default working directory for the daemon. > +WORKDIR = "/" > + > +# Define path to PID file > +PIDFILENAME = "/var/run/nokia-usb-net-confd.pid" > + > +# Connman bus names > +CONNMAN_SERVICE = "org.moblin.connman" > +CONNMAN_INTERFACE_MANAGER ="org.moblin.connman.Manager" > +CONNMAN_INTERFACE_DEVICE = "org.moblin.connman.Device" > +CONNMAN_INTERFACE_SERVICE = "org.moblin.connman.Service" > +CONNMAN_INTERFACE_TECHNOLOGY = "org.moblin.connman.Technology" > +CONNMAN_ETHERNET_PATH = "/org/moblin/connman/technology/ethernet" > + > +# The standard I/O file descriptors are redirected to /dev/null by default. > +if (hasattr(os, "devnull")): > + REDIRECT_TO = os.devnull > +else: > + REDIRECT_TO = "/dev/null" > + > +class usbnetconf: > + > + def device_property_changed(self, name, value): > + if name == "Networks": > + for i in value: > + if (i[i.rfind("/"):] == "/carrier"): > + # separate mac address > + mac = (i[i.rfind("/",0,i.rfind("/"))+1:i.rfind("/")]) > + manager = > dbus.Interface(self.bus.get_object(CONNMAN_SERVICE, "/"), > CONNMAN_INTERFACE_MANAGER) > + > + # ask current profile name from connman > + properties = manager.GetProperties() > + path ="%s/ethernet_%s_cable" % > (properties["ActiveProfile"] , mac) > + #setup ip address, reconnect is needed to activate > + print "ip setup to %s" % (path) > + service = > dbus.Interface(self.bus.get_object(CONNMAN_SERVICE, path), > CONNMAN_INTERFACE_SERVICE) > + service.Disconnect() > + if GATEWAY == None: > + service.SetProperty("IPv4.Configuration", > + { "Method": "manual", "Address": > IPADDR, "Netmask": NETMASK}) > + else: > + service.SetProperty("IPv4.Configuration", { > "Method": "manual", "Address": IPADDR, "Netmask": NETMASK , "Gateway": > GATEWAY}) > + service.Connect() > + break > + > + def technology_property_changed(self, name, value): > + if name == "Devices": > + for path in value: > + device = dbus.Interface(self.bus.get_object(CONNMAN_SERVICE, > path), CONNMAN_INTERFACE_DEVICE) > + > + properties = device.GetProperties() > + > + if "Interface" not in properties.keys(): > + continue > + > + if properties["Interface"] != "usb0": > + continue > + > + print "device registering %s" % (path) > + > + # configure networks that already exist > + self.device_property_changed("Networks", > properties["Networks"]) > + > + self.bus.add_signal_receiver(self.device_property_changed, > + bus_name=CONNMAN_SERVICE, > + > dbus_interface=CONNMAN_INTERFACE_DEVICE, > + signal_name = "PropertyChanged", > + path = path) > + > + def run(self): > + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) > + > + self.bus = dbus.SystemBus() > + > + self.bus.add_signal_receiver(self.technology_property_changed, > + bus_name=CONNMAN_SERVICE, > + > dbus_interface=CONNMAN_INTERFACE_TECHNOLOGY, > + signal_name = "PropertyChanged", > + path =CONNMAN_ETHERNET_PATH ) > + > + # Configure devices that already exist > + try: > + technology = dbus.Interface(self.bus.get_object(CONNMAN_SERVICE, > CONNMAN_ETHERNET_PATH), > + CONNMAN_INTERFACE_TECHNOLOGY) > + properties = technology.GetProperties() > + self.technology_property_changed("Devices", > properties["Devices"]); > + except dbus.exceptions.DBusException: > + pass > + > + # start waiting signals > + mainloop = gobject.MainLoop() > + mainloop.run() > + > +def createDaemon(): > + # Fork a child process > + try: > + pid = os.fork() > + except OSError, e: > + print >>sys.stderr, "fork #1 failed: %d (%s)" % (e.errno, e.strerror) > + sys.exit(1) > + if (pid == 0): # The first child. > + os.setsid() > + > + try: > + pid = os.fork() # Fork a second child. > + except OSError, e: > + print >>sys.stderr, "fork #1 failed: %d (%s)" % (e.errno, > e.strerror) > + sys.exit(1) > + if (pid == 0): # The second child. > + os.chdir(WORKDIR) > + os.umask(UMASK) > + else: > + os._exit(0) # Exit parent of the second child. > + else: > + os._exit(0) # Exit parent of the first child. > + > + #close all file descriptors. > + maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1] > + for fd in range(0, maxfd): > + try: > + os.close(fd) > + except OSError: # ERROR, fd wasn't open to begin with (ignored) > + pass > + > + # This call to open is guaranteed to return the lowest file descriptor, > + # which will be 0 (stdin), since it was closed above. > + os.open(REDIRECT_TO, os.O_RDWR) # standard input (0) > + > + # Duplicate standard input to standard output and standard error. > + os.dup2(0, 1) # standard output (1) > + os.dup2(0, 2) # standard error (2) > + > + > +def creatPidFile(): > + if os.path.exists(PIDFILENAME): > + try: > + pidfile = open(PIDFILENAME) > + pid = int(pidfile.read()) > + pidfile.close() > + except (IOError, ValueError, TypeError): > + # can't open file or read PID from file. File is probably > + # invalid or stale, so try to delete it. > + os.unlink(PIDFILENAME) > + else: > + try: > + os.kill(pid, 0) > + except OSError, e: > + # No such process > + os.unlink(PIDFILENAME) > + else: > + return False > + pidfile = open(PIDFILENAME, 'w') > + pidfile.write(str(os.getpid())) > + pidfile.close() > + return True > + > +def removePidFile(): > + os.unlink(PIDFILENAME) > + print "leaving" > + > +def handle_sigterm(): > + os.unlink(PIDFILENAME) > + > (24 more lines skipped) > > ++++++ nokia-usb-networking.init (new) > --- nokia-usb-networking.init > +++ nokia-usb-networking.init > +#!/bin/sh > + > +# Init file for Nokia usb networking > + > +### BEGIN INIT INFO > +# Provides: nokia-usb-networking > +# Required-Start: > +# Required-Stop: > +# Default-Start: 2 3 4 5 > +# Default-Stop: 0 1 6 > +# Short-Description: nokia-usb-networking > +### END INIT INFO > + > +# source function library > +. /etc/rc.d/init.d/functions > + > +RETVAL=0 > +#PID_FILE=/var/run/nokia-usb-net-confd.pid > +USB_NET_MODULE=g_nokia > + > +start() { > + echo -n "Starting nokia-usb-networking: " > + /sbin/modprobe $USB_NET_MODULE > + RETVAL=$? > + if [ "$RETVAL" = 0 ]; then > +# /usr/sbin/nokia-usb-net-confd > + ifconfig usb0 down > + ifconfig usb0 192.168.2.15 up > + RETVAL=$? > + fi > + if [ "$RETVAL" = 0 ]; then > + success > + else > + failure > + fi > + echo > +} > + > +stop() { > + echo -n "Stopping nokia-usb-networking: " > +# killall nokia-usb-net-confd > + /sbin/modprobe -r $USB_NET_MODULE > + RETVAL=$? > + if [ "$RETVAL" = 0 ]; then > + success > + else > + failure > + fi > + echo > +} > + > +case "$1" in > + start) > + start > + ;; > + stop) > + stop > + ;; > + restart) > + stop > + start > + ;; > + status) > +# status -p $PID_FILE nokia-usb-net-confd > + lsmod | grep $USB_NET_MODULE &> /dev/null > + RETVAL=$? > + ;; > + *) > + echo "Usage: $0 {start|stop|restart|status}" > + RETVAL=1 > +esac > + > +exit $RETVAL > > ++++++ deleted files: > --- 0001-Sent-correct-network-state-for-connman-end.patch > --- 0001-Transfer-the-correct-size-of-patch.patch > --- 0002-Patch-should-also-be-considered-while-executing-reso.patch > --- 0003-Transfer-correct-restart-info-while-updating-package.patch > --- 0004-use-local-repo.patch > --- Add-transaction_start-and-transaction_stop.patch > --- Makefile > --- PackageKit-0.6.7.tar.bz2 > --- meego-preupgrade.patch > --- packagekit-shaddap.patch > --- pk-meego-policy.patch > --- pk-meego-vendor.patch > --- pk-transfer-pk-error-code.patch > --- pk-yum-disable-preupgrade.patch > --- pk-yum-ignore-log-format.patch > --- pk-zypp-add-no-space-support.patch > --- pk-zypp-patch-only.patch > --- pk-zypp-refresh-solv-pool-data.patch > --- pk-zypp-refresh_reload-rpmdb_disable-update-cache.patch > --- pk-zypp-set-proxy-env.patch > > _______________________________________________ > Meego-commits mailing list > [email protected] > http://lists.meego.com/listinfo/meego-commits > _______________________________________________ > MeeGo-packaging mailing list > [email protected] > http://lists.meego.com/listinfo/meego-packaging _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
