Index: head/sysutils/py-google-compute-engine/Makefile =================================================================== --- head/sysutils/py-google-compute-engine/Makefile (revision 472393) +++ head/sysutils/py-google-compute-engine/Makefile (revision 472394) @@ -1,45 +1,43 @@ # $FreeBSD$ PORTNAME= google-compute-engine -DISTVERSION= 2.7.6 -PORTREVISION= 4 +DISTVERSION= 2.8.3 CATEGORIES= sysutils python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= helen.koike@collabora.com COMMENT= Guest Environment for Google Compute Engine LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}boto>0:devel/py-boto@${FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netaddr>0:net/py-netaddr@${FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netifaces>0:net/py-netifaces@${FLAVOR} \ google_oslogin_control:sysutils/google-compute-engine-oslogin \ sudo:security/sudo USES= python USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes USE_RC_SUBR= google_instance_setup \ - google_network_setup \ google_accounts_daemon \ google_clock_skew_daemon \ - google_ip_forwarding_daemon \ + google_network_daemon \ google_startup SUB_LIST= PYTHON_CMD="${PYTHON_CMD}" REINPLACE_ARGS= -i '' post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/syslog.d ${STAGEDIR}/etc ${INSTALL_DATA} ${FILESDIR}/instance_configs.cfg.distro.sample \ ${STAGEDIR}${PREFIX}/etc/instance_configs.cfg.distro.sample ${INSTALL_DATA} ${FILESDIR}/90-google.conf.sample \ ${STAGEDIR}${PREFIX}/etc/syslog.d/90-google.conf.sample ${INSTALL_DATA} ${FILESDIR}/google_set_hostname \ ${STAGEDIR}/etc/dhclient-exit-hooks .include Index: head/sysutils/py-google-compute-engine/distinfo =================================================================== --- head/sysutils/py-google-compute-engine/distinfo (revision 472393) +++ head/sysutils/py-google-compute-engine/distinfo (revision 472394) @@ -1,3 +1,3 @@ -TIMESTAMP = 1522049559 -SHA256 (google-compute-engine-2.7.6.tar.gz) = 23c764f2fc72db5a0b81cb8f8029c4e5d152bd50faf1eb7322b4a4cff039d003 -SIZE (google-compute-engine-2.7.6.tar.gz) = 40742 +TIMESTAMP = 1528807896 +SHA256 (google-compute-engine-2.8.3.tar.gz) = 14947a0cfc20e1d64d1184bbd137b9f3b66d7c94efcbe1b73e21c090e7002af4 +SIZE (google-compute-engine-2.8.3.tar.gz) = 45988 Property changes on: head/sysutils/py-google-compute-engine/distinfo ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__setup.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__setup.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__setup.py (nonexistent) @@ -1,19 +0,0 @@ ---- google_compute_engine/instance_setup/instance_setup.py.orig 2017-09-14 18:08:49 UTC -+++ google_compute_engine/instance_setup/instance_setup.py -@@ -146,12 +146,12 @@ class InstanceSetup(object): - # Instance setup systemd scripts block sshd from starting. - if os.path.exists(constants.LOCALBASE + '/bin/systemctl'): - return -- elif (os.path.exists('/etc/init.d/ssh') or -- os.path.exists('/etc/init/ssh.conf')): -+ elif (os.path.exists('/etc/rc.d/ssh') or -+ os.path.exists('/etc/rc/ssh.conf')): - subprocess.call(['service', 'ssh', 'start']) - subprocess.call(['service', 'ssh', 'reload']) -- elif (os.path.exists('/etc/init.d/sshd') or -- os.path.exists('/etc/init/sshd.conf')): -+ elif (os.path.exists('/etc/rc.d/sshd') or -+ os.path.exists('/etc/rc/sshd.conf')): - subprocess.call(['service', 'sshd', 'start']) - subprocess.call(['service', 'sshd', 'reload']) - Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__setup.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/google_ip_forwarding_daemon.in =================================================================== --- head/sysutils/py-google-compute-engine/files/google_ip_forwarding_daemon.in (revision 472393) +++ head/sysutils/py-google-compute-engine/files/google_ip_forwarding_daemon.in (nonexistent) @@ -1,34 +0,0 @@ -#!/bin/sh - -# $FreeBSD$ -# -# PROVIDE: google_ip_forwarding_daemon -# BEFORE: LOGIN -# REQUIRE: NETWORKING syslogd google_instance_setup google_network_setup -# KEYWORD: shutdown -# -# google_ip_forwarding_daemon_enable (bool): Set to NO by default. -# Set it to YES to enable google_ip_forwarding_daemon. -# - -. /etc/rc.subr - -name="google_ip_forwarding_daemon" -rcvar="google_ip_forwarding_daemon_enable" - -load_rc_config "${name}" - -: ${google_ip_forwarding_daemon_enable:="NO"} - -command_interpreter="%%PYTHON_CMD%%" -command=%%PREFIX%%/bin/${name} -pidfile=/var/run/${name}.pid -start_cmd="google_ip_forwarding_daemon_start" - -google_ip_forwarding_daemon_start() -{ - check_startmsgs && echo "Starting ${name}." - daemon -p ${pidfile} -t ${name} ${command} -} - -run_rc_command "$1" Property changes on: head/sysutils/py-google-compute-engine/files/google_ip_forwarding_daemon.in ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_clock__skew_clock__skew__daemon.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_clock__skew_clock__skew__daemon.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_clock__skew_clock__skew__daemon.py (nonexistent) @@ -1,17 +0,0 @@ ---- google_compute_engine/clock_skew/clock_skew_daemon.py.orig 2017-09-14 18:08:49 UTC -+++ google_compute_engine/clock_skew/clock_skew_daemon.py -@@ -59,9 +59,12 @@ class ClockSkewDaemon(object): - response: string, the metadata response with the new drift token value. - """ - self.logger.info('Clock drift token has changed: %s.', response) -- command = ['/sbin/hwclock', '--hctosys'] -+ -+ ntpd_inactive = subprocess.call(['service', 'ntpd', 'status']) - try: -- subprocess.check_call(command) -+ if not ntpd_inactive: subprocess.check_call(['service', 'ntpd', 'stop']) -+ subprocess.check_call('ntpdate `awk \'$1=="server" {print $2}\' /etc/ntp.conf`', shell=True) -+ if not ntpd_inactive: subprocess.check_call(['service', 'ntpd', 'start']) - except subprocess.CalledProcessError: - self.logger.warning('Failed to sync system time with hardware clock.') - else: Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_clock__skew_clock__skew__daemon.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__utils.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__utils.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__utils.py (nonexistent) @@ -1,77 +0,0 @@ ---- google_compute_engine/ip_forwarding/ip_forwarding_utils.py.orig 2017-09-14 18:08:49 UTC -+++ google_compute_engine/ip_forwarding/ip_forwarding_utils.py -@@ -17,6 +17,8 @@ - - import re - import subprocess -+import netifaces -+import netaddr - - IP_REGEX = re.compile(r'\A(\d{1,3}\.){3}\d{1,3}\Z') - IP_ALIAS_REGEX = re.compile(r'\A(\d{1,3}\.){3}\d{1,3}/\d{1,2}\Z') -@@ -51,8 +53,8 @@ class IpForwardingUtils(object): - options.update(kwargs) - return options - -- def _RunIpRoute(self, args=None, options=None): -- """Run a command with ip route and return the response. -+ def _RunIfconfig(self, args=None, options=None): -+ """Run a command with ifconfig and return the response. - - Args: - args: list, the string ip route command args to execute. -@@ -63,7 +65,7 @@ class IpForwardingUtils(object): - """ - args = args or [] - options = options or {} -- command = ['ip', 'route'] -+ command = ['ifconfig'] - command.extend(args) - for item in options.items(): - command.extend(item) -@@ -108,10 +110,15 @@ class IpForwardingUtils(object): - Returns: - list, the IP address strings. - """ -- args = ['ls', 'table', 'local', 'type', 'local'] -- options = self._CreateRouteOptions(dev=interface) -- result = self._RunIpRoute(args=args, options=options) -- return self.ParseForwardedIps(result.split()) -+ try: -+ ips = netifaces.ifaddresses('lo' + self.proto_id) -+ ips = ips[netifaces.AF_INET] -+ except (ValueError, KeyError) as e: -+ return [] -+ forwarded_ips = [] -+ for ip in ips: -+ forwarded_ips.append(ip['addr'] + '/' + str(netaddr.IPAddress(ip['netmask']).netmask_bits())) -+ return self.ParseForwardedIps(forwarded_ips) - - def AddForwardedIp(self, address, interface): - """Configure a new IP address on the network interface. -@@ -121,9 +128,12 @@ class IpForwardingUtils(object): - interface: string, the output device to use. - """ - address = address if IP_ALIAS_REGEX.match(address) else '%s/32' % address -- args = ['add', 'to', 'local', address] -- options = self._CreateRouteOptions(dev=interface) -- self._RunIpRoute(args=args, options=options) -+ cmd = 'alias' -+ try: -+ forwarded_ips = netifaces.ifaddresses(interface) -+ except (ValueError, KeyError) as e: -+ cmd = 'create' -+ self._RunIfconfig(args=[interface, cmd, address]) - - def RemoveForwardedIp(self, address, interface): - """Delete an IP address on the network interface. -@@ -132,7 +142,5 @@ class IpForwardingUtils(object): - address: string, the IP address to configure. - interface: string, the output device to use. - """ -- address = address if IP_ALIAS_REGEX.match(address) else '%s/32' % address -- args = ['delete', 'to', 'local', address] -- options = self._CreateRouteOptions(dev=interface) -- self._RunIpRoute(args=args, options=options) -+ address = address if IP_REGEX.match(address) else address[:-3] -+ self._RunIfconfig(args=[interface, '-alias', address]) Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__utils.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__daemon.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__daemon.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__daemon.py (nonexistent) @@ -1,25 +0,0 @@ ---- google_compute_engine/ip_forwarding/ip_forwarding_daemon.py.orig 2017-09-14 18:08:49 UTC -+++ google_compute_engine/ip_forwarding/ip_forwarding_daemon.py -@@ -137,20 +137,20 @@ class IpForwardingDaemon(object): - Args: - result: dict, the metadata response with the new network interfaces. - """ -+ ip_addresses = [] - for network_interface in result: - mac_address = network_interface.get('mac') - interface = self.network_utils.GetNetworkInterface(mac_address) -- ip_addresses = [] - if interface: - ip_addresses.extend(network_interface.get('forwardedIps', [])) - if self.ip_aliases: - ip_addresses.extend(network_interface.get('ipAliases', [])) - if self.target_instance_ips: - ip_addresses.extend(network_interface.get('targetInstanceIps', [])) -- self._HandleForwardedIps(ip_addresses, interface) - else: - message = 'Network interface not found for MAC address: %s.' - self.logger.warning(message, mac_address) -+ self._HandleForwardedIps(ip_addresses, 'lo' + self.ip_forwarding_utils.proto_id) - - - def main(): Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_ip__forwarding_ip__forwarding__daemon.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_metadata__scripts_script__executor.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_metadata__scripts_script__executor.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_metadata__scripts_script__executor.py (nonexistent) @@ -1,11 +0,0 @@ ---- google_compute_engine/metadata_scripts/script_executor.py.orig 2018-02-22 19:44:17 UTC -+++ google_compute_engine/metadata_scripts/script_executor.py -@@ -53,7 +53,7 @@ class ScriptExecutor(object): - """ - process = subprocess.Popen( - metadata_script, shell=True, -- executable=constants.LOCALBASE + '/bin/bash', -+ executable='/bin/sh', - stderr=subprocess.STDOUT, stdout=subprocess.PIPE) - while True: - for line in iter(process.stdout.readline, b''): Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_metadata__scripts_script__executor.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/google_network_setup.in =================================================================== --- head/sysutils/py-google-compute-engine/files/google_network_setup.in (revision 472393) +++ head/sysutils/py-google-compute-engine/files/google_network_setup.in (nonexistent) @@ -1,27 +0,0 @@ -#!/bin/sh - -# $FreeBSD$ -# -# PROVIDE: google_network_setup -# BEFORE: LOGIN -# REQUIRE: NETWORKING syslogd google_instance_setup -# -# google_network_setup_enable (bool): Set to NO by default. -# Set it to YES to enable google_network_setup. -# - -. /etc/rc.subr - -name="google_network_setup" -rcvar="google_network_setup_enable" -stop_cmd=":" - -load_rc_config "${name}" - -: ${google_network_setup_enable:="NO"} - -command_interpreter="%%PYTHON_CMD%%" -command=%%PREFIX%%/bin/${name} -pidfile=/var/run/${name}.pid - -run_rc_command "$1" Property changes on: head/sysutils/py-google-compute-engine/files/google_network_setup.in ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/google_accounts_daemon.in =================================================================== --- head/sysutils/py-google-compute-engine/files/google_accounts_daemon.in (revision 472393) +++ head/sysutils/py-google-compute-engine/files/google_accounts_daemon.in (revision 472394) @@ -1,34 +1,37 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: google_accounts_daemon # BEFORE: LOGIN -# REQUIRE: NETWORKING syslogd google_instance_setup google_network_setup +# REQUIRE: NETWORKING syslogd google_instance_setup google_network_daemon # KEYWORD: shutdown # # google_accounts_daemon_enable (bool): Set to NO by default. # Set it to YES to enable google_accounts_daemon. # . /etc/rc.subr + +# Required to execute scripts +export PATH=%%LOCALBASE%%/bin:$PATH name="google_accounts_daemon" rcvar="google_accounts_daemon_enable" load_rc_config "${name}" : ${google_accounts_daemon_enable:="NO"} command_interpreter="%%PYTHON_CMD%%" command=%%PREFIX%%/bin/${name} pidfile=/var/run/${name}.pid start_cmd="google_accounts_daemon_start" google_accounts_daemon_start() { check_startmsgs && echo "Starting ${name}." daemon -p ${pidfile} -t ${name} ${command} } run_rc_command "$1" Index: head/sysutils/py-google-compute-engine/files/google_clock_skew_daemon.in =================================================================== --- head/sysutils/py-google-compute-engine/files/google_clock_skew_daemon.in (revision 472393) +++ head/sysutils/py-google-compute-engine/files/google_clock_skew_daemon.in (revision 472394) @@ -1,34 +1,34 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: google_clock_skew_daemon # BEFORE: LOGIN -# REQUIRE: NETWORKING syslogd ntpd google_instance_setup google_network_setup +# REQUIRE: NETWORKING syslogd ntpd google_instance_setup google_network_daemon # KEYWORD: shutdown # # google_clock_skew_daemon_enable (bool): Set to NO by default. # Set it to YES to enable google_clock_skew_daemon. # . /etc/rc.subr name="google_clock_skew_daemon" rcvar="google_clock_skew_daemon_enable" load_rc_config "${name}" : ${google_clock_skew_daemon_enable:="NO"} command_interpreter="%%PYTHON_CMD%%" command=%%PREFIX%%/bin/${name} pidfile=/var/run/${name}.pid start_cmd="google_clock_skew_daemon_start" google_clock_skew_daemon_start() { check_startmsgs && echo "Starting ${name}." daemon -p ${pidfile} -t ${name} ${command} } run_rc_command "$1" Index: head/sysutils/py-google-compute-engine/files/google_network_daemon.in =================================================================== --- head/sysutils/py-google-compute-engine/files/google_network_daemon.in (nonexistent) +++ head/sysutils/py-google-compute-engine/files/google_network_daemon.in (revision 472394) @@ -0,0 +1,34 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: google_network_daemon +# BEFORE: LOGIN +# REQUIRE: NETWORKING syslogd google_instance_setup google_network_daemon +# KEYWORD: shutdown +# +# google_network_daemon_enable (bool): Set to NO by default. +# Set it to YES to enable google_network_daemon. +# + +. /etc/rc.subr + +name="google_network_daemon" +rcvar="google_network_daemon_enable" + +load_rc_config "${name}" + +: ${google_network_daemon_enable:="NO"} + +command_interpreter="%%PYTHON_CMD%%" +command=%%PREFIX%%/bin/${name} +pidfile=/var/run/${name}.pid +start_cmd="google_network_daemon_start" + +google_network_daemon_start() +{ + check_startmsgs && echo "Starting ${name}." + daemon -p ${pidfile} -t ${name} ${command} +} + +run_rc_command "$1" Property changes on: head/sysutils/py-google-compute-engine/files/google_network_daemon.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/google_startup.in =================================================================== --- head/sysutils/py-google-compute-engine/files/google_startup.in (revision 472393) +++ head/sysutils/py-google-compute-engine/files/google_startup.in (revision 472394) @@ -1,45 +1,45 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: google_startup # BEFORE: LOGIN -# REQUIRE: NETWORKING syslogd google_instance_setup google_network_setup +# REQUIRE: NETWORKING syslogd google_instance_setup google_network_daemon # KEYWORD: shutdown # # google_startup_enable (bool): Set to NO by default. # Set it to YES to enable google_startup. # . /etc/rc.subr # Required to execute gsutil export PATH=%%LOCALBASE%%/bin:$PATH name="google_startup" rcvar="google_startup_enable" load_rc_config "${name}" : ${google_startup_enable:="NO"} command_interpreter="%%PYTHON_CMD%%" command=%%PREFIX%%/bin/google_metadata_script_runner command_startup_args="--script-type startup" command_shutdown_args="--script-type shutdown" pidfile=/var/run/${name}.pid start_cmd="google_startup_start" stop_cmd="google_startup_stop" google_startup_start() { ${command} ${command_startup_args} } google_startup_stop() { echo "Stopping ${name}." ${command} ${command_shutdown_args} } run_rc_command "$1" Index: head/sysutils/py-google-compute-engine/files/instance_configs.cfg.distro.sample =================================================================== --- head/sysutils/py-google-compute-engine/files/instance_configs.cfg.distro.sample (revision 472393) +++ head/sysutils/py-google-compute-engine/files/instance_configs.cfg.distro.sample (revision 472394) @@ -1,5 +1,8 @@ [Accounts] useradd_cmd = pw useradd {user} -m userdel_cmd = pw userdel {user} -r usermod_cmd = pw usermod {user} -G {groups} groupadd_cmd = pw groupadd {group} + +[MetadataScripts] +default_shell = /bin/bash Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_constants.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_constants.py (nonexistent) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_constants.py (revision 472394) @@ -0,0 +1,11 @@ +--- google_compute_engine/constants.py.orig 2018-06-11 23:51:09 UTC ++++ google_compute_engine/constants.py +@@ -18,7 +18,7 @@ + import platform + + OSLOGIN_CONTROL_SCRIPT = 'google_oslogin_control' +-OSLOGIN_NSS_CACHE = '/etc/oslogin_passwd.cache' ++OSLOGIN_NSS_CACHE = '/usr/local/etc/oslogin_passwd.cache' + OSLOGIN_NSS_CACHE_SCRIPT = 'google_oslogin_nss_cache' + + if platform.system() == 'FreeBSD': Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_constants.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__config.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__config.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__config.py (revision 472394) @@ -1,16 +1,16 @@ ---- google_compute_engine/instance_setup/instance_config.py.orig 2018-02-22 19:44:17 UTC +--- google_compute_engine/instance_setup/instance_config.py.orig 2018-06-11 23:51:09 UTC +++ google_compute_engine/instance_setup/instance_config.py -@@ -73,11 +73,11 @@ class InstanceConfig(config_manager.Conf +@@ -74,11 +74,11 @@ class InstanceConfig(config_manager.Conf }, 'InstanceSetup': { 'host_key_types': 'ecdsa,ed25519,rsa', - 'optimize_local_ssd': 'true', + 'optimize_local_ssd': 'false', 'network_enabled': 'true', 'set_boto_config': 'true', 'set_host_keys': 'true', - 'set_multiqueue': 'true', + 'set_multiqueue': 'false', }, 'IpForwarding': { 'ethernet_proto_id': '66', Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_instance__setup_instance__config.py ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding.py (nonexistent) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding.py (revision 472394) @@ -0,0 +1,22 @@ +--- google_compute_engine/networking/ip_forwarding/ip_forwarding.py.orig 2018-06-11 23:51:09 UTC ++++ google_compute_engine/networking/ip_forwarding/ip_forwarding.py +@@ -85,15 +85,17 @@ class IpForwarding(object): + for address in forwarded_ips: + self.ip_forwarding_utils.RemoveForwardedIp(address, interface) + +- def HandleForwardedIps(self, interface, forwarded_ips): ++ def HandleForwardedIps(self, interface, forwarded_ips, interface_ip): + """Handle changes to the forwarded IPs on a network interface. + + Args: + interface: string, the output device to configure. + forwarded_ips: list, the forwarded IP address strings desired. ++ interface_ip: string, current interface ip address. + """ + desired = self.ip_forwarding_utils.ParseForwardedIps(forwarded_ips) +- configured = self.ip_forwarding_utils.GetForwardedIps(interface) ++ configured = self.ip_forwarding_utils.GetForwardedIps( ++ interface, interface_ip) + to_add = sorted(set(desired) - set(configured)) + to_remove = sorted(set(configured) - set(desired)) + self._LogForwardedIpChanges( Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding__utils.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding__utils.py (nonexistent) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding__utils.py (revision 472394) @@ -0,0 +1,115 @@ +--- google_compute_engine/networking/ip_forwarding/ip_forwarding_utils.py.orig 2018-06-11 23:51:09 UTC ++++ google_compute_engine/networking/ip_forwarding/ip_forwarding_utils.py +@@ -15,6 +15,8 @@ + + """Utilities for configuring IP address forwarding.""" + ++import netaddr ++import netifaces + import re + import subprocess + +@@ -32,27 +34,11 @@ class IpForwardingUtils(object): + logger: logger object, used to write to SysLog and serial port. + proto_id: string, the routing protocol identifier for Google IP changes. + """ +- self.logger = logger +- self.proto_id = proto_id or '66' + +- def _CreateRouteOptions(self, **kwargs): +- """Create a dictionary of parameters to append to the ip route command. +- +- Args: +- **kwargs: dict, the string parameters to update in the ip route command. +- +- Returns: +- dict, the string parameters to append to the ip route command. +- """ +- options = { +- 'proto': self.proto_id, +- 'scope': 'host', +- } +- options.update(kwargs) +- return options ++ self.logger = logger + +- def _RunIpRoute(self, args=None, options=None): +- """Run a command with ip route and return the response. ++ def _RunIfconfig(self, args=None, options=None): ++ """Run a command with ifconfig and return the response. + + Args: + args: list, the string ip route command args to execute. +@@ -63,7 +49,7 @@ class IpForwardingUtils(object): + """ + args = args or [] + options = options or {} +- command = ['ip', 'route'] ++ command = ['ifconfig'] + command.extend(args) + for item in options.items(): + command.extend(item) +@@ -94,25 +80,33 @@ class IpForwardingUtils(object): + forwarded_ips = forwarded_ips or [] + for ip in forwarded_ips: + if ip and (IP_REGEX.match(ip) or IP_ALIAS_REGEX.match(ip)): +- addresses.append(ip[:-3] if ip.endswith('/32') else ip) ++ addresses.extend([str(addr) for addr in list(netaddr.IPNetwork(ip))]) + else: + self.logger.warning('Could not parse IP address: "%s".', ip) + return addresses + +- def GetForwardedIps(self, interface): ++ def GetForwardedIps(self, interface, interface_ip): + """Retrieve the list of configured forwarded IP addresses. + + Args: + interface: string, the output device to query. ++ interface_ip: string, current interface ip address. + + Returns: + list, the IP address strings. + """ +- args = ['ls', 'table', 'local', 'type', 'local'] +- options = self._CreateRouteOptions(dev=interface) +- result = self._RunIpRoute(args=args, options=options) +- result = re.sub(r'local\s', r'', result) +- return self.ParseForwardedIps(result.split()) ++ try: ++ ips = netifaces.ifaddresses(interface) ++ ips = ips[netifaces.AF_INET] ++ except (ValueError, IndexError): ++ return [] ++ forwarded_ips = [] ++ for ip in ips: ++ if ip['addr'] != interface_ip: ++ forwarded_ips.append( ++ '%s/%d' % (ip['addr'], ++ netaddr.IPAddress(ip['netmask']).netmask_bits())) ++ return self.ParseForwardedIps(forwarded_ips) + + def AddForwardedIp(self, address, interface): + """Configure a new IP address on the network interface. +@@ -121,10 +115,8 @@ class IpForwardingUtils(object): + address: string, the IP address to configure. + interface: string, the output device to use. + """ +- address = address if IP_ALIAS_REGEX.match(address) else '%s/32' % address +- args = ['add', 'to', 'local', address] +- options = self._CreateRouteOptions(dev=interface) +- self._RunIpRoute(args=args, options=options) ++ for ip in list(netaddr.IPNetwork(address)): ++ self._RunIfconfig(args=[interface, 'alias', '%s/32' % str(ip)]) + + def RemoveForwardedIp(self, address, interface): + """Delete an IP address on the network interface. +@@ -133,7 +125,5 @@ class IpForwardingUtils(object): + address: string, the IP address to configure. + interface: string, the output device to use. + """ +- address = address if IP_ALIAS_REGEX.match(address) else '%s/32' % address +- args = ['delete', 'to', 'local', address] +- options = self._CreateRouteOptions(dev=interface) +- self._RunIpRoute(args=args, options=options) ++ ip = netaddr.IPNetwork(address) ++ self._RunIfconfig(args=[interface, '-alias', str(ip.ip)]) Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding__utils.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_network__daemon.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_network__daemon.py (nonexistent) +++ head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_network__daemon.py (revision 472394) @@ -0,0 +1,33 @@ +--- google_compute_engine/networking/network_daemon.py.orig 2018-06-11 23:51:09 UTC ++++ google_compute_engine/networking/network_daemon.py +@@ -96,7 +96,7 @@ class NetworkDaemon(object): + for interface in network_interfaces: + if self.ip_forwarding_enabled: + self.ip_forwarding.HandleForwardedIps( +- interface.name, interface.forwarded_ips) ++ interface.name, interface.forwarded_ips, interface.ip) + + def _ExtractInterfaceMetadata(self, metadata): + """Extracts network interface metadata. +@@ -119,7 +119,8 @@ class NetworkDaemon(object): + if self.target_instance_ips: + ip_addresses.extend(network_interface.get('targetInstanceIps', [])) + interfaces.append(NetworkDaemon.NetworkInterface( +- interface, ip_addresses)) ++ interface, ip_addresses, network_interface.get('ip', []))) ++ + else: + message = 'Network interface not found for MAC address: %s.' + self.logger.warning(message, mac_address) +@@ -128,9 +129,10 @@ class NetworkDaemon(object): + class NetworkInterface(object): + """Network interface information extracted from metadata.""" + +- def __init__(self, name, forwarded_ips=None): ++ def __init__(self, name, forwarded_ips=None, ip=None): + self.name = name + self.forwarded_ips = forwarded_ips ++ self.ip = ip + + + def main(): Property changes on: head/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_network__daemon.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/py-google-compute-engine/files/patch-setup.py =================================================================== --- head/sysutils/py-google-compute-engine/files/patch-setup.py (revision 472393) +++ head/sysutils/py-google-compute-engine/files/patch-setup.py (revision 472394) @@ -1,10 +1,10 @@ ---- setup.py.orig 2018-02-22 19:44:17 UTC +--- setup.py.orig 2018-06-11 23:51:09 UTC +++ setup.py @@ -34,7 +34,6 @@ setuptools.setup( long_description='Google Compute Engine guest environment.', name='google-compute-engine', packages=setuptools.find_packages(), - scripts=glob.glob('scripts/*'), url='https://github.com/GoogleCloudPlatform/compute-image-packages', - version='2.7.6', + version='2.8.3', # Entry points create scripts in /usr/bin that call a function. Property changes on: head/sysutils/py-google-compute-engine/files/patch-setup.py ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property Index: head/sysutils/py-google-compute-engine/pkg-message =================================================================== --- head/sysutils/py-google-compute-engine/pkg-message (revision 472393) +++ head/sysutils/py-google-compute-engine/pkg-message (revision 472394) @@ -1,23 +1,21 @@ ============================================================================== google-compute-engine has been installed, and the following services are available: google_accounts_daemon Responsible for provisioning and deprovisioning user accounts google_clock_skew_daemon Responsible for syncing the software clock with the hypervisor clock google_instance_setup Configure the guest at boot -google_ip_forwarding_daemon Responsible to setup or remove IP routes in the - guest -google_network_setup Responsible to enables all associated network - interfaces +google_network_daemon Responsible to manage network interfaces and ip + routes in the guest google_startup Implement support for running host provided startup / shutdown scripts To enable the above services, sysrc _enable=YES Reboot your system or start the services, service start ============================================================================== Property changes on: head/sysutils/py-google-compute-engine/pkg-message ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property