Browse code

Update cloud-init to 0.7.9, add guestinfo datasource Add lang packages for cpio, e2fsprogs, findutils, gdbm, grep, procps-ng

Change-Id: If32df9fc3324508b2f77baa719f22c838569ee8e
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2577
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>

suezzelur authored on 2017/04/20 21:23:37
Showing 20 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+diff -rup cloud-init-0.7.9/requirements.txt cloud-init-0.7.9-new/requirements.txt
1
+--- cloud-init-0.7.9/requirements.txt	2016-12-23 08:37:45.000000000 -0800
2
+@@ -27,9 +27,6 @@ configobj>=5.0.2
3
+ # All new style configurations are in the yaml format
4
+ pyyaml
5
+ 
6
+-# The new main entrypoint uses argparse instead of optparse
7
+-argparse
8
+-
9
+ # Requests handles ssl correctly!
10
+ requests
11
+ 
12
+diff -rup cloud-init-0.7.9/setup.py cloud-init-0.7.9-new/setup.py
13
+--- cloud-init-0.7.9/setup.py	2016-12-23 08:37:45.000000000 -0800
14
+@@ -185,8 +185,6 @@ else:
15
+ 
16
+ 
17
+ requirements = read_requires()
18
+-if sys.version_info < (3,):
19
+-    requirements.append('cheetah')
20
+ 
21
+ setuptools.setup(
22
+     name='cloud-init',
0 23
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-diff -uNr cloud-init-0.7.6-orig/config/cloud.cfg.d/05_logging.cfg cloud-init-0.7.6/config/cloud.cfg.d/05_logging.cfg
2
-+++ cloud-init-0.7.6/config/cloud.cfg.d/05_logging.cfg	2015-06-17 21:28:29.676352327 -0700
3
-@@ -54,7 +54,8 @@
4
- 
5
- log_cfgs:
6
- # These will be joined into a string that defines the configuration
7
-- - [ *log_base, *log_syslog ]
8
-+# Suppress log_syslog to allow logging to /var/log/cloud-init.log
9
-+# - [ *log_base, *log_syslog ]
10
- # These will be joined into a string that defines the configuration
11
-  - [ *log_base, *log_file ]
12
- # A file path can also be used
... ...
@@ -1,36 +1,46 @@
1 1
 Name:           cloud-init
2
-Version:        0.7.6
3
-Release:        17%{?dist}
2
+Version:        0.7.9
3
+Release:        1%{?dist}
4 4
 Summary:        Cloud instance init scripts
5 5
 Group:          System Environment/Base
6 6
 License:        GPLv3
7 7
 URL:            http://launchpad.net/cloud-init
8 8
 Source0:        https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz
9
-%define sha1 cloud-init=9af02f68d68abce91463bec22b17964d1618e1da
9
+%define sha1 cloud-init=3b4345267e72e28b877e2e3f0735c1f672674cfc
10 10
 Source1:        cloud-photon.cfg
11 11
 
12 12
 Patch0:         photon-distro.patch
13
-Patch1:         cloud-init-log.patch
13
+Patch1:         change-requires.patch
14 14
 Patch2:         vca-admin-pwd.patch
15
-Patch3:         remove-netstat.patch
16
-Patch4:         distro-systemctl.patch
17
-Patch5:         photon-hosts-template.patch
18
-Patch6:         resizePartitionUUID.patch
15
+Patch3:         photon-hosts-template.patch
16
+Patch4:         resizePartitionUUID.patch
17
+Patch5:         datasource-guestinfo.patch
18
+Patch6:         systemd-service-changes.patch
19 19
 
20 20
 BuildRequires:  python2
21 21
 BuildRequires:  python2-libs
22 22
 BuildRequires:  python-setuptools
23 23
 BuildRequires:  systemd
24
-BuildRequires:  dbus, python-ipaddr, iproute2, automake
24
+BuildRequires:  dbus
25
+BuildRequires:  python-ipaddr
26
+BuildRequires:  iproute2
27
+BuildRequires:  automake
28
+
25 29
 Requires:       systemd
30
+Requires:       net-tools
26 31
 Requires:       python2
27 32
 Requires:       python2-libs
28 33
 Requires:       python-configobj
29 34
 Requires:       python-prettytable
30 35
 Requires:       python-requests
36
+Requires:       python-setuptools
31 37
 Requires:       PyYAML
32 38
 Requires:       python-jsonpatch
39
+Requires:       python-oauthlib
33 40
 Requires:       python-jinja2
41
+Requires:       python-markupsafe
42
+Requires:       python-six
43
+
34 44
 BuildArch:      noarch
35 45
 
36 46
 %description
... ...
@@ -127,7 +137,15 @@ rm -rf $RPM_BUILD_ROOT
127 127
 
128 128
 %files
129 129
 %license LICENSE
130
-%{_sysconfdir}/cloud/*
130
+%doc %{_sysconfdir}/cloud/cloud.cfg.d/README
131
+%dir %{_sysconfdir}/cloud/templates
132
+%config(noreplace) %{_sysconfdir}/cloud/templates/*
133
+%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/05_logging.cfg
134
+%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg
135
+%{_sysconfdir}/NetworkManager/dispatcher.d/hook-network-manager
136
+%{_sysconfdir}/dhcp/dhclient-exit-hooks.d/hook-dhclient
137
+/lib/systemd/system-generators/cloud-init-generator
138
+/lib/udev/rules.d/66-azure-ephemeral.rules
131 139
 /lib/systemd/system/*
132 140
 %{_docdir}/cloud-init/*
133 141
 %{_libdir}/cloud-init/*
... ...
@@ -137,6 +155,9 @@ rm -rf $RPM_BUILD_ROOT
137 137
 
138 138
 
139 139
 %changelog
140
+*   Thu Apr 27 2017 Anish Swaminathan <anishs@vmware.com> 0.7.9-1
141
+-   Upgraded to version 0.7.9
142
+-   Enabled VmxGuestinfo datasource
140 143
 *   Thu Apr 27 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.7.6-17
141 144
 -   Fix Arch
142 145
 *   Wed Mar 29 2017 Kumar Kaushik <kaushikk@vmware.com>  0.7.6-16
... ...
@@ -31,7 +31,8 @@ datasource_list: [
31 31
 #                  OpenStack, 
32 32
 #                  CloudSigma, 
33 33
 #                  Ec2, 
34
-#                  CloudStack, 
34
+#                  CloudStack,
35
+#                  VmxGuestinfo, 
35 36
                   None 
36 37
                  ]
37 38
 
38 39
new file mode 100644
... ...
@@ -0,0 +1,143 @@
0
+diff -rupN cloud-init-0.7.9/cloudinit/sources/DataSourceVmxGuestinfo.py cloud-init-0.7.9-new/cloudinit/sources/DataSourceVmxGuestinfo.py
1
+--- cloud-init-0.7.9/cloudinit/sources/DataSourceVmxGuestinfo.py    1969-12-31 16:00:00.000000000 -0800
2
+@@ -0,0 +1,139 @@
3
++# vi: ts=4 expandtab
4
++#
5
++# Copyright (C) 2017 VMware Inc.
6
++#
7
++# Author: Anish Swaminathan <anishs@vmware.com>
8
++#
9
++import os
10
++
11
++from cloudinit import log as logging
12
++from cloudinit import sources
13
++from cloudinit import util
14
++
15
++from distutils.spawn import find_executable
16
++
17
++LOG = logging.getLogger(__name__)
18
++
19
++class DataSourceVmxGuestinfo(sources.DataSource):
20
++    def __init__(self, sys_cfg, distro, paths, ud_proc=None):
21
++        sources.DataSource.__init__(self, sys_cfg, distro, paths, ud_proc)
22
++        self.metadata = {}
23
++        self.userdata_raw = ''
24
++        self.vmtoolsd = find_executable("vmtoolsd")
25
++        if not self.vmtoolsd:
26
++            LOG.error("Failed to find vmtoolsd")
27
++
28
++    def get_data(self):
29
++        if not self.vmtoolsd:
30
++            LOG.error("vmtoolsd is required to fetch guestinfo value")
31
++            return False
32
++        hostname = self._get_guestinfo_value('hostname')
33
++        if hostname:
34
++            self.distro.set_hostname(hostname)
35
++        found = True
36
++        dev_index = 0
37
++        network_settings = ''
38
++        while found:
39
++            key_begin = 'interface.' + str(dev_index)
40
++            key_iname = key_begin + '.name'
41
++            interface_name = self._get_guestinfo_value(key_iname)
42
++            if interface_name:
43
++                network_settings += 'auto ' + interface_name + '\n'
44
++                network_settings += 'iface ' + interface_name
45
++                key_proto = key_begin + '.dhcp'
46
++                dhcp_enabled = self._get_guestinfo_value(key_proto)
47
++                key_address = key_begin + '.address'
48
++                address = self._get_guestinfo_value(key_address)
49
++                bootproto = 'dhcp'
50
++                if dhcp_enabled:
51
++                    if dhcp_enabled == 'yes':
52
++                        network_settings += ' dhcp\n'
53
++                    elif dhcp_enabled == 'no':
54
++                        network_settings += ' static\n'
55
++                        bootproto = 'static'
56
++                    else:
57
++                        LOG.warning("Invalid value for yes/no parameter for %s, setting to dhcp", key_proto)
58
++                elif address:
59
++                    bootproto = 'static'
60
++                    dhcp_enabled == 'no'
61
++                    network_settings += ' static\n'
62
++                else:
63
++                    dhcp_enabled == 'yes'
64
++                    network_settings += ' dhcp\n'
65
++                    LOG.debug("Setting network bootproto to dhcp by default")
66
++                key_mac = key_begin + '.mac'
67
++                mac = self._get_guestinfo_value(key_mac)
68
++                if address:
69
++                    network_settings += 'address ' + address + '\n'
70
++                if mac:
71
++                    network_settings += 'hwaddress ' + mac + '\n'
72
++                key_netmask = key_begin + '.netmask'
73
++                netmask = self._get_guestinfo_value(key_netmask)
74
++                if netmask:
75
++                    network_settings += 'netmask ' + netmask + '\n'
76
++                key_dnsserver = 'dns.servers'
77
++                dnsserver = self._get_guestinfo_value(key_dnsserver)
78
++                if dnsserver:
79
++                    network_settings += 'dns-nameservers '
80
++                    dnsserver = dnsserver.split(',')
81
++                    for d in dnsserver:
82
++                        network_settings += d + ' '
83
++                    network_settings += '\n'
84
++                key_dnsdomain = 'dns.domains'
85
++                dnsdomain = self._get_guestinfo_value(key_dnsdomain)
86
++                if dnsdomain:
87
++                    network_settings += 'dns-search '
88
++                    dnsdomain = dnsdomain.split(',')
89
++                    for d in dnsdomain:
90
++                        network_settings += d + ' '
91
++                    network_settings += '\n'
92
++                route_index = 0
93
++                default_destination_set = False
94
++                while True:
95
++                    key_route = key_begin + '.route.' + str(route_index)
96
++                    route = self._get_guestinfo_value(key_route)
97
++                    if route:
98
++                        network_settings += "routes.%s " % (route_index)
99
++                        route = route.split(',')
100
++                        if len(route) > 2:
101
++                            LOG.debug("Route information for %s route in %s device incorrect - ", 
102
++                                                "expected 2 values", route_index, dev_index)
103
++                            continue
104
++                        elif len(route) == 2:
105
++                            network_settings += route[0] + ' ' + route[1] + '\n'# Gateway Destination
106
++                        else: #length = 1
107
++                            if not default_destination_set:
108
++                                network_settings += route[0] + ' 0.0.0.0/0' + '\n'
109
++                                default_destination_set = True
110
++                            else:
111
++                                LOG.debug("Default destination set previously, not setting route %s", route_index) 
112
++                    else:
113
++                        break
114
++                    route_index += 1
115
++            else:
116
++                found = False
117
++            dev_index += 1
118
++        self.distro.apply_network(network_settings)
119
++
120
++    def _get_guestinfo_value(self, key):
121
++        LOG.debug("Getting guestinfo value for key %s", key)
122
++        value = ''
123
++        try:
124
++            (value, _err) = util.subp([self.vmtoolsd, "--cmd", "info-get guestinfo." + key])
125
++            if _err:
126
++                LOG.error("Failed to get guestinfo value for key %s", key)
127
++        except util.ProcessExecutionError as error:
128
++            util.logexc(LOG,"Failed to get guestinfo value for key %s: %s", key, error)
129
++        except Exception:
130
++            util.logexc(LOG,"Unexpected error while trying to get guestinfo value for key %s", key)
131
++        return value.rstrip()
132
++
133
++    def get_instance_id(self):
134
++        with open('/sys/class/dmi/id/product_uuid', 'r') as id_file:
135
++            return str(f.read()).rstrip()
136
++
137
++def get_datasource_list(depends):
138
++    """
139
++    Return a list of data sources that match this set of dependencies
140
++    """
141
++    return [DataSourceVmxGuestinfo]
0 142
deleted file mode 100644
... ...
@@ -1,11 +0,0 @@
1
-diff -rupr a/cloudinit/distros/photon.py b/cloudinit/distros/photon.py
2
-+++ b/cloudinit/distros/photon.py	2016-12-13 18:39:03.396187698 -0800
3
-@@ -20,6 +20,7 @@ class Distro(distros.Distro):
4
-     hostname_conf_fn = "/etc/hostname"
5
-     locale_conf_fn = "/etc/default/locale"
6
-     network_conf_fn = "/etc/network/interfaces"
7
-+    init_cmd = ['systemctl']  # init scripts
8
- 
9
-     def __init__(self, name, cfg, paths):
10
-         distros.Distro.__init__(self, name, cfg, paths)
... ...
@@ -1,9 +1,10 @@
1 1
 === added file './cloudinit/distros/photon.py'
2 2
 --- ./cloudinit/distros/photon.py	1970-01-01 00:00:00 +0000
3
-+++ ./cloudinit/distros/photon.py	2015-03-06 01:28:00 +0000
4
-@@ -0,0 +1,134 @@
3
+@@ -0,0 +1,299 @@
5 4
 +# vi: ts=4 expandtab
6 5
 +#
6
++# Copyright (C) 2017 VMware Inc.
7 7
 +#    Author: Mahmoud Bassiouny <mbassiouny@vmware.com>
8 8
 +#
9 9
 +
... ...
@@ -13,7 +14,7 @@
13 13
 +from cloudinit import helpers
14 14
 +from cloudinit import log as logging
15 15
 +from cloudinit import util
16
-+
16
++from cloudinit.distros import net_util
17 17
 +from cloudinit.distros.parsers.hostname import HostnameConf
18 18
 +
19 19
 +from cloudinit.settings import PER_INSTANCE
... ...
@@ -23,7 +24,9 @@
23 23
 +class Distro(distros.Distro):
24 24
 +    hostname_conf_fn = "/etc/hostname"
25 25
 +    locale_conf_fn = "/etc/default/locale"
26
-+    network_conf_fn = "/etc/network/interfaces"
26
++    network_conf_dir = "/etc/systemd/network/"
27
++    resolve_conf_fn = "/etc/resolv.conf"
28
++    init_cmd = ['systemctl']  # init scripts
27 29
 +
28 30
 +    def __init__(self, name, cfg, paths):
29 31
 +        distros.Distro.__init__(self, name, cfg, paths)
... ...
@@ -51,18 +54,113 @@
51 51
 +        self.package_command('install', pkgs=pkglist)
52 52
 +
53 53
 +    def _write_network(self, settings):
54
-+        util.write_file(self.network_conf_fn, settings)
55
-+        return ['all']
54
++        entries = net_util.translate_network(settings)
55
++        LOG.debug("Translated ubuntu style network settings %s into %s",
56
++                  settings, entries)
57
++        route_entries = []
58
++        route_entries = translate_routes(settings)
59
++        dev_names = entries.keys()
60
++        dev_index = 10;
61
++        nameservers = []
62
++        searchdomains = []
63
++        # Format for systemd
64
++        for (dev, info) in entries.items():
65
++            if dev == 'lo':
66
++                continue
67
++            net_fn = self.network_conf_dir + str(dev_index) + '-' + dev + '.network'
68
++            dhcp_enabled = 'no'
69
++            if info.get('bootproto') == 'dhcp':
70
++                dhcp_enabled = 'yes'        
71
++            net_cfg = {
72
++                'Name': dev,
73
++                'DHCP': dhcp_enabled,
74
++            }
75
++            if info.get('hwaddress'):
76
++                net_cfg['MACAddress'] = info.get('hwaddress')
77
++            if info.get('address'):
78
++                net_cfg['Address'] = "%s" % (info.get('address'))
79
++                if info.get('netmask'):
80
++                    net_cfg['Address'] += "/%s" % (info.get('netmask'))
81
++            if info.get('gateway'):
82
++                net_cfg['Gateway'] = info.get('gateway')
83
++            if info.get('dns-nameservers'):
84
++                net_cfg['DNS'] = str(tuple(info.get('dns-nameservers'))).replace(',', '')
85
++            if info.get('dns-search'):
86
++                net_cfg['Domains'] = str(tuple(info.get('dns-search'))).replace(',', '')
87
++            route_entry = []
88
++            if dev in route_entries:
89
++                route_entry = route_entries[dev]
90
++                route_index = 0
91
++                found = True
92
++                while found:
93
++                    route_name = 'routes.' + str(route_index)
94
++                    if route_name in route_entries[dev]:
95
++                        val = str(tuple(route_entries[dev][route_name])).replace(',', '')
96
++                        if val:
97
++                            net_cfg[route_name] = val
98
++                    else:
99
++                        found = False
100
++                    route_index += 1
56 101
 +
57
-+    def _bring_up_interfaces(self, device_names):
58
-+        use_all = False
59
-+        for d in device_names:
60
-+            if d == 'all':
61
-+                use_all = True
62
-+        if use_all:
63
-+            return distros.Distro._bring_up_interface(self, '--all')
102
++            if info.get('auto'):
103
++                self._write_interface_file(net_fn, net_cfg, route_entry)
104
++            if 'dns-nameservers' in info:
105
++                nameservers.extend(info['dns-nameservers'])
106
++            if 'dns-search' in info:
107
++                searchdomains.extend(info['dns-search'])
108
++            dev_index = dev_index + 1;
109
++
110
++        if nameservers or searchdomains:
111
++            util.write_file(self.resolve_conf_fn,
112
++                            convert_resolv_conf(nameservers, searchdomains))
113
++
114
++        return dev_names
115
++
116
++    def _write_interface_file(self, net_fn, net_cfg, route_entry):
117
++        if not net_cfg['Name']:
118
++            return
119
++        content = "[Match]\n"
120
++        content += "Name=%s\n" % (net_cfg['Name'])
121
++        if 'MACAddress' in net_cfg:
122
++            content += "MACAddress=%s\n" % (net_cfg['MACAddress'])
123
++        content += "[Network]\n"
124
++        if 'DHCP' in net_cfg and net_cfg['DHCP'] == 'yes':
125
++            content += "DHCP=%s\n" % (net_cfg['DHCP'])
64 126
 +        else:
65
-+            return distros.Distro._bring_up_interfaces(self, device_names)
127
++            if 'Address' in net_cfg:
128
++                content += "Address=%s\n" % (net_cfg['Address'])
129
++            if 'Gateway' in net_cfg:
130
++                content += "Gateway=%s\n" % (net_cfg['Gateway'])
131
++            route_index = 0
132
++            found = True
133
++            if route_entry:
134
++                while found:
135
++                    route_name = 'routes.' + str(route_index)
136
++                    if route_name in route_entry:
137
++                        content += "[Route]\n"
138
++                        if len(route_entry[route_name]) != 2:
139
++                            continue
140
++                        content += "Gateway=%s\n" % (route_entry[route_name][0])
141
++                        content += "Destination=%s\n" % (route_entry[route_name][1])
142
++                    else:
143
++                        found = False
144
++                    route_index += 1
145
++
146
++        util.write_file(net_fn, content)
147
++
148
++
149
++    def _bring_up_interfaces(self, device_names):
150
++        cmd = ['systemctl', 'restart', 'systemd-networkd', 'systemd-resolved']
151
++        LOG.debug("Attempting to run bring up interfaces using command %s",
152
++                  cmd)
153
++        try:
154
++            (_out, err) = util.subp(cmd)
155
++            if len(err):
156
++                LOG.warn("Running %s resulted in stderr output: %s", cmd, err)
157
++            return True
158
++        except util.ProcessExecutionError:
159
++            util.logexc(LOG, "Running network bringup command %s failed", cmd)
160
++            return False
66 161
 +
67 162
 +    def _select_hostname(self, hostname, fqdn):
68 163
 +        # Prefer the short hostname over the long
... ...
@@ -136,4 +234,70 @@
136 136
 +        self._runner.run("update-sources", self.package_command,
137 137
 +                         ["makecache"], freq=PER_INSTANCE)
138 138
 +
139
-
139
++def convert_resolv_conf(nameservers, searchdomains):
140
++    """Returns a string formatted for resolv.conf."""
141
++    result = ''
142
++    if isinstance(nameservers, list):
143
++        for ns in nameservers:
144
++            result = result + 'nameserver %s\n' % ns
145
++    if isinstance(searchdomains, list):
146
++        for sd in searchdomains:
147
++            result = result + 'search %s\n' % sd
148
++    return result
149
++
150
++def translate_routes(settings):
151
++    entries = []
152
++    for line in settings.splitlines():
153
++        line = line.strip()
154
++        if not line or line.startswith("#"):
155
++            continue
156
++        split_up = line.split(None, 1)
157
++        if len(split_up) <= 1:
158
++            continue
159
++        entries.append(split_up)
160
++    consume = {}
161
++    ifaces = []
162
++    for (cmd, args) in entries:
163
++        if cmd == 'iface':
164
++            if consume:
165
++                ifaces.append(consume)
166
++                consume = {}
167
++            consume[cmd] = args
168
++        else:
169
++            consume[cmd] = args
170
++
171
++    absorb = False
172
++    for (cmd, args) in consume.items():
173
++        if cmd == 'iface':
174
++            absorb = True
175
++    if absorb:
176
++        ifaces.append(consume)
177
++    out_ifaces = {}
178
++    for info in ifaces:
179
++        if 'iface' not in info:
180
++            continue
181
++        iface_details = info['iface'].split(None)
182
++        dev_name = None
183
++        if len(iface_details) >= 1:
184
++            dev = iface_details[0].strip().lower()
185
++            if dev:
186
++                dev_name = dev
187
++        if not dev_name:
188
++            continue
189
++        route_info = {}
190
++        route_index = 0
191
++        found = True
192
++        while found:
193
++            route_name = 'routes.' + str(route_index)
194
++            if route_name in info:
195
++                val = info[route_name].split()
196
++                if val:
197
++                    route_info[route_name] = val
198
++            else:
199
++                found = False
200
++            route_index += 1
201
++        if dev_name in out_ifaces:
202
++            out_ifaces[dev_name].update(route_info)
203
++        else:
204
++            out_ifaces[dev_name] = route_info
205
++    return out_ifaces
140 206
deleted file mode 100644
... ...
@@ -1,114 +0,0 @@
1
-diff -ru cloud-init-0.7.6/cloudinit/netinfo.py cloud-init-0.7.6-modify/cloudinit/netinfo.py
2
-+++ cloud-init-0.7.6-modify/cloudinit/netinfo.py	2015-09-17 15:05:41.299270875 -0700
3
-@@ -93,49 +93,50 @@
4
- 
5
-     return devs
6
- 
7
--
8
- def route_info():
9
--    (route_out, _err) = util.subp(["netstat", "-rn"])
10
-+    (route_out, _err) = util.subp(["ip", "route"])
11
-     routes = []
12
--    entries = route_out.splitlines()[1:]
13
-+    entries = route_out.splitlines()
14
-     for line in entries:
15
-         if not line:
16
-             continue
17
-         toks = line.split()
18
--
19
--        # FreeBSD shows 6 items in the routing table:
20
--        #  Destination  Gateway    Flags Refs    Use  Netif Expire
21
--        #  default      10.65.0.1  UGS      0  34920 vtnet0
22
--        #
23
--        # Linux netstat shows 2 more:
24
--        #  Destination  Gateway    Genmask  Flags MSS Window irtt Iface
25
--        #  0.0.0.0      10.65.0.1  0.0.0.0  UG      0 0         0 eth0
26
--        if (len(toks) < 6 or toks[0] == "Kernel" or
27
--                toks[0] == "Destination" or toks[0] == "Internet" or
28
--                toks[0] == "Internet6" or toks[0] == "Routing"):
29
--            continue
30
--
31
--        if len(toks) < 8:
32
--            toks.append("-")
33
--            toks.append("-")
34
--            toks[7] = toks[5]
35
--            toks[5] = "-"
36
-+        dest = toks[0].split('/')
37
-+        listlen = len(dest)
38
-+        if listlen == 1:
39
-+            subnet = "32"
40
-+        else:
41
-+            subnet = dest[1]
42
-+        if toks[0] == "default":
43
-+            gat = toks[2]
44
-+            mask = "0.0.0.0"
45
-+            dest[0] = "0.0.0.0"
46
-+            dev = toks[4]
47
-+            df = "yes"
48
-+        else:
49
-+            gat = "0.0.0.0"
50
-+            dev = toks[2]
51
-+            df = "no"
52
-+
53
-+            if subnet == "32":
54
-+                mask = "255.255.255.255"
55
-+            if subnet == "24":
56
-+                mask = "255.255.255.0"
57
-+            if subnet == "16":
58
-+                mask = "255.255.0.0"
59
-+            if subnet == "8":
60
-+                mask = "255.0.0.0"
61
- 
62
-         entry = {
63
--            'destination': toks[0],
64
--            'gateway': toks[1],
65
--            'genmask': toks[2],
66
--            'flags': toks[3],
67
--            'metric': toks[4],
68
--            'ref': toks[5],
69
--            'use': toks[6],
70
--            'iface': toks[7],
71
-+            'destination': dest[0],
72
-+            'gateway': gat,
73
-+            'genmask': mask,
74
-+            'iface': dev,
75
-+            'DefGateway': df,
76
-         }
77
--
78
-         routes.append(entry)
79
-     return routes
80
- 
81
--
82
- def getgateway():
83
-     routes = []
84
-     try:
85
-@@ -143,11 +144,10 @@
86
-     except:
87
-         pass
88
-     for r in routes:
89
--        if r['flags'].find("G") >= 0:
90
-+        if r['DefGateway'] == "yes":
91
-             return "%s[%s]" % (r['gateway'], r['iface'])
92
-     return None
93
- 
94
--
95
- def netdev_pformat():
96
-     lines = []
97
-     try:
98
-@@ -177,13 +177,13 @@
99
-         routes = None
100
-     if routes is not None:
101
-         fields = ['Route', 'Destination', 'Gateway',
102
--                  'Genmask', 'Interface', 'Flags']
103
-+                  'Genmask', 'Interface', 'IsDefaultGateway']
104
-         tbl = PrettyTable(fields)
105
-         for (n, r) in enumerate(routes):
106
-             route_id = str(n)
107
-             tbl.add_row([route_id, r['destination'],
108
-                         r['gateway'], r['genmask'],
109
--                        r['iface'], r['flags']])
110
-+                        r['iface'], r['DefGateway']])
111
-         route_s = tbl.get_string()
112
-         max_len = len(max(route_s.splitlines(), key=len))
113
-         header = util.center("Route info", "+", max_len)
... ...
@@ -1,24 +1,102 @@
1
-diff -ru cloud-init-0.7.6/cloudinit/config/cc_growpart.py cloud-init-0.7.6-modified/cloudinit/config/cc_growpart.py
2
-+++ cloud-init-0.7.6-modified/cloudinit/config/cc_growpart.py	2017-03-29 17:12:40.059392874 -0700
3
-@@ -276,7 +276,7 @@
4
-             log.debug("use ignore_growroot_disabled to ignore")
5
-             return
1
+diff -rup cloud-init-0.7.9/cloudinit/config/cc_growpart.py cloud-init-0.7.9-new/cloudinit/config/cc_growpart.py
2
+--- cloud-init-0.7.9/cloudinit/config/cc_growpart.py	2016-12-23 08:37:45.000000000 -0800
3
+@@ -247,7 +247,20 @@ def devent2dev(devent):
4
+         result = util.get_mount_info(devent)
5
+         if not result:
6
+             raise ValueError("Could not determine device of '%s' % dev_ent")
7
+-        return result[0]
8
++        dev = result[0]
9
++
10
++    container = util.is_container()
11
++
12
++    # Ensure the path is a block device.
13
++    if (dev == "/dev/root" and not container):
14
++        dev = util.rootdev_from_cmdline(util.get_cmdline())
15
++        if dev is None:
16
++            if os.path.exists(dev):
17
++                # if /dev/root exists, but we failed to convert
18
++                # that to a "real" /dev/ path device, then return it.
19
++                return dev
20
++            raise ValueError("Unable to find device '/dev/root'")
21
++    return dev
6 22
  
7
--    devices = util.get_cfg_option_list(cfg, "devices", ["/"])
8
-+    devices = util.get_cfg_option_list(mycfg, "devices", ["/"])
9
-     if not len(devices):
10
-         log.debug("growpart: empty device list")
11
-         return
12
-diff -ru cloud-init-0.7.6/cloudinit/config/cc_resizefs.py cloud-init-0.7.6-modified/cloudinit/config/cc_resizefs.py
13
-+++ cloud-init-0.7.6-modified/cloudinit/config/cc_resizefs.py	2017-03-29 17:00:59.965405389 -0700
14
-@@ -71,6 +71,8 @@
15
-         return "/dev/disk/by-label/" + found[len("LABEL="):]
16
-     if found.startswith("UUID="):
17
-         return "/dev/disk/by-uuid/" + found[len("UUID="):]
18
-+    if found.startswith("PARTUUID="):
19
-+        return "/dev/disk/by-partuuid/" + found[len("PARTUUID="):]
20 23
  
21
-     return "/dev/" + found
24
+ def resize_devices(resizer, devices):
25
+diff -rup cloud-init-0.7.9/cloudinit/config/cc_resizefs.py cloud-init-0.7.9-new/cloudinit/config/cc_resizefs.py
26
+--- cloud-init-0.7.9/cloudinit/config/cc_resizefs.py	2016-12-23 08:37:45.000000000 -0800
27
+@@ -71,25 +71,6 @@ RESIZE_FS_PREFIXES_CMDS = [
28
+ NOBLOCK = "noblock"
29
+ 
22 30
  
31
+-def rootdev_from_cmdline(cmdline):
32
+-    found = None
33
+-    for tok in cmdline.split():
34
+-        if tok.startswith("root="):
35
+-            found = tok[5:]
36
+-            break
37
+-    if found is None:
38
+-        return None
39
+-
40
+-    if found.startswith("/dev/"):
41
+-        return found
42
+-    if found.startswith("LABEL="):
43
+-        return "/dev/disk/by-label/" + found[len("LABEL="):]
44
+-    if found.startswith("UUID="):
45
+-        return "/dev/disk/by-uuid/" + found[len("UUID="):]
46
+-
47
+-    return "/dev/" + found
48
+-
49
+-
50
+ def handle(name, cfg, _cloud, log, args):
51
+     if len(args) != 0:
52
+         resize_root = args[0]
53
+@@ -121,7 +102,7 @@ def handle(name, cfg, _cloud, log, args)
54
+     # Ensure the path is a block device.
55
+     if (devpth == "/dev/root" and not os.path.exists(devpth) and
56
+             not container):
57
+-        devpth = rootdev_from_cmdline(util.get_cmdline())
58
++        devpth = util.rootdev_from_cmdline(util.get_cmdline())
59
+         if devpth is None:
60
+             log.warn("Unable to find device '/dev/root'")
61
+             return
62
+diff -rup cloud-init-0.7.9/cloudinit/util.py cloud-init-0.7.9-new/cloudinit/util.py
63
+--- cloud-init-0.7.9/cloudinit/util.py	2016-12-23 08:37:45.000000000 -0800
64
+@@ -2402,4 +2402,34 @@ def system_is_snappy():
65
+         return True
66
+     return False
67
+ 
68
++def rootdev_from_cmdline(cmdline):
69
++    found = None
70
++    for tok in cmdline.split():
71
++        if tok.startswith("root="):
72
++            found = tok[5:]
73
++            break
74
++    if found is None:
75
++        return None
76
++
77
++    if found.startswith("/dev/"):
78
++        return found
79
++    if found.startswith("LABEL="):
80
++        return "/dev/disk/by-label/" + found[len("LABEL="):]
81
++    if found.startswith("UUID="):
82
++        return "/dev/disk/by-uuid/" + found[len("UUID="):].lower()
83
++    if found.startswith("PARTUUID="):
84
++        disks_path = ("/dev/disk/by-partuuid/" +
85
++                      found[len("PARTUUID="):].lower())
86
++        if os.path.exists(disks_path):
87
++            return disks_path
88
++        results = find_devs_with(found)
89
++        if results:
90
++            return results[0]
91
++        # we know this doesn't exist, but for consistency return the path as
92
++        # it /would/ exist
93
++        return disks_path
94
++
95
++    return "/dev/" + found
96
++
97
++
98
+ # vi: ts=4 expandtab
99
+
23 100
new file mode 100644
... ...
@@ -0,0 +1,31 @@
0
+diff -rup cloud-init-0.7.9/systemd/cloud-final.service cloud-init-0.7.9-new/systemd/cloud-final.service
1
+--- cloud-init-0.7.9/systemd/cloud-final.service	2016-12-23 08:37:45.000000000 -0800
2
+@@ -1,6 +1,6 @@
3
+ [Unit]
4
+ Description=Execute cloud user/final scripts
5
+-After=network-online.target cloud-config.service rc-local.service multi-user.target
6
++After=network-online.target cloud-config.service rc-local.service
7
+ Wants=network-online.target cloud-config.service
8
+ 
9
+ [Service]
10
+diff -rup cloud-init-0.7.9/systemd/cloud-init.service cloud-init-0.7.9-new/systemd/cloud-init.service
11
+--- cloud-init-0.7.9/systemd/cloud-init.service	2016-12-23 08:37:45.000000000 -0800
12
+@@ -1,6 +1,5 @@
13
+ [Unit]
14
+ Description=Initial cloud-init job (metadata service crawler)
15
+-DefaultDependencies=no
16
+ Wants=cloud-init-local.service
17
+ Wants=sshd-keygen.service
18
+ Wants=sshd.service
19
+@@ -9,9 +8,7 @@ After=networking.service
20
+ Before=network-online.target
21
+ Before=sshd-keygen.service
22
+ Before=sshd.service
23
+-Before=sysinit.target
24
+ Before=systemd-user-sessions.service
25
+-Conflicts=shutdown.target
26
+ 
27
+ [Service]
28
+ Type=oneshot
... ...
@@ -1,9 +1,9 @@
1
-diff -ru cloud-init-0.7.6/cloudinit/distros/__init__.py cloud-init-0.7-modified/cloudinit/distros/__init__.py
2
-+++ cloud-init-0.7-modified/cloudinit/distros/__init__.py	2015-08-11 14:22:09.814582603 +0000
3
-@@ -376,6 +376,9 @@
4
-         if 'plain_text_passwd' in kwargs and kwargs['plain_text_passwd']:
5
-             self.set_passwd(name, kwargs['plain_text_passwd'])
1
+diff -rup cloud-init-0.7.9/cloudinit/distros/__init__.py cloud-init-0.7.9-new/cloudinit/distros/__init__.py
2
+--- cloud-init-0.7.9/cloudinit/distros/__init__.py	2016-12-23 08:37:45.000000000 -0800
3
+@@ -488,6 +488,9 @@ class Distro(object):
4
+         if 'hashed_passwd' in kwargs and kwargs['hashed_passwd']:
5
+             self.set_passwd(name, kwargs['hashed_passwd'], hashed=True)
6 6
  
7 7
 +        if 'passwd' in kwargs and kwargs['passwd']:
8 8
 +            self.set_passwd(name,kwargs['passwd'],True)
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	cpio-2.12
2 2
 Name:		cpio
3 3
 Version:	2.12
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		http://www.gnu.org/software/cpio/
7 7
 Group:		System Environment/System utilities
... ...
@@ -11,6 +11,14 @@ Source0:	http://ftp.gnu.org/pub/gnu/cpio/%{name}-%{version}.tar.bz2
11 11
 %define sha1 cpio=60358408c76db354f6716724c4bcbcb6e18ab642
12 12
 %description
13 13
 The cpio package contains tools for archiving.
14
+
15
+%package lang
16
+Summary: Additional language files for cpio
17
+Group:   System Environment/System utilities
18
+Requires: %{name} = %{version}-%{release}
19
+%description lang
20
+These are the additional language files of cpio
21
+
14 22
 %prep
15 23
 %setup -q
16 24
 %build
... ...
@@ -30,6 +38,7 @@ install -v -m755 -d %{buildroot}/%{_docdir}/%{name}-%{version}/html
30 30
 install -v -m644    doc/html/* %{buildroot}/%{_docdir}/%{name}-%{version}/html
31 31
 install -v -m644    doc/cpio.{html,txt} %{buildroot}/%{_docdir}/%{name}-%{version}
32 32
 rm -rf %{buildroot}%{_infodir}
33
+%find_lang %{name}
33 34
 
34 35
 %check
35 36
 make %{?_smp_mflags} check
... ...
@@ -37,10 +46,15 @@ make %{?_smp_mflags} check
37 37
 %files
38 38
 %defattr(-,root,root)
39 39
 %{_bindir}/*
40
-%{_datarootdir}/locale/*
41 40
 %{_mandir}/man1/*
42 41
 %{_docdir}/%{name}-%{version}/*
42
+
43
+%files lang -f %{name}.lang
44
+%defattr(-,root,root)
45
+
43 46
 %changelog
47
+*       Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 2.12-3
48
+-       Add lang package
44 49
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.12-2
45 50
 -	GA - Bump release of all rpms
46 51
 * 	Thu Jan 14 2016 Xiaolin Li <xiaolinl@vmware.com> 2.12-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Contains the utilities for the ext2 file system
2 2
 Name:           e2fsprogs
3 3
 Version:        1.43.4
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        GPLv2+
6 6
 URL:            http://e2fsprogs.sourceforge.net
7 7
 Group:          System Environment/Base
... ...
@@ -24,10 +24,19 @@ Summary:    Header and development files for e2fsprogs
24 24
 Requires:   %{name} = %{version}
25 25
 %description    devel
26 26
 It contains the libraries and header files to create applications 
27
+
28
+%package lang
29
+Summary: Additional language files for e2fsprogs
30
+Group:   System Environment/Base
31
+Requires: %{name} = %{version}-%{release}
32
+%description lang
33
+These are the additional language files of e2fsprogs
34
+
27 35
 %prep
28 36
 %setup -q
29 37
 install -vdm 755 build
30 38
 sed -i -e 's|^LD_LIBRARY_PATH.*|&:/tools/lib|' tests/test_config
39
+
31 40
 %build
32 41
 cd build
33 42
 LIBS=-L/tools/lib \
... ...
@@ -44,6 +53,7 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \
44 44
     --disable-silent-rules \
45 45
     --enable-symlink-install
46 46
 make %{?_smp_mflags}
47
+
47 48
 %install
48 49
 pushd build
49 50
 make DESTDIR=%{buildroot} install
... ...
@@ -61,7 +71,8 @@ make %{?_smp_mflags} check
61 61
 /sbin/ldconfig
62 62
 %postun
63 63
 /sbin/ldconfig
64
-%files -f %{name}.lang
64
+
65
+%files
65 66
 %defattr(-,root,root)
66 67
 %config %{_sysconfdir}/mke2fs.conf
67 68
 %{_bindir}/compile_et
... ...
@@ -118,7 +129,13 @@ make %{?_smp_mflags} check
118 118
 %{_libdir}/libe2p.a
119 119
 %{_libdir}/libext2fs.a
120 120
 %{_mandir}/man3/*
121
+
122
+%files lang -f %{name}.lang
123
+%defattr(-,root,root)
124
+
121 125
 %changelog
126
+*   Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 1.43.4-2
127
+-   Add lang package.
122 128
 *   Mon Apr 03 2017 Chang Lee <changlee@vmware.com> 1.43.4-1
123 129
 -   Updated to version 1.43.4
124 130
 *   Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 1.42.13-5
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	This package contains programs to find files
2 2
 Name:		findutils
3 3
 Version:	4.6.0
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		http://www.gnu.org/software/findutils
7 7
 Group:		Applications/File
... ...
@@ -14,6 +14,14 @@ These programs are provided to recursively search through a
14 14
 directory tree and to create, maintain, and search a database
15 15
 (often faster than the recursive find, but unreliable if the
16 16
 database has not been recently updated).
17
+
18
+%package lang
19
+Summary: Additional language files for findutils
20
+Group:   Applications/File
21
+Requires: %{name} = %{version}-%{release}
22
+%description lang
23
+These are the additional language files of findutils
24
+
17 25
 %prep
18 26
 %setup -q
19 27
 %build
... ...
@@ -35,13 +43,20 @@ make %{?_smp_mflags} check
35 35
 
36 36
 %post	-p /sbin/ldconfig
37 37
 %postun	-p /sbin/ldconfig
38
-%files -f %{name}.lang
38
+
39
+%files
39 40
 %defattr(-,root,root)
40 41
 /bin/find
41 42
 %{_bindir}/*
42 43
 %{_libexecdir}/*
43 44
 %{_mandir}/*/*
45
+
46
+%files lang -f %{name}.lang
47
+%defattr(-,root,root)
48
+
44 49
 %changelog
50
+*       Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 4.6.0-3
51
+-       Add lang package.
45 52
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.6.0-2
46 53
 -	GA - Bump release of all rpms
47 54
 *   	Tue Apr 26 2016 Anish Swaminathan <anishs@vmware.com> 4.6.0-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	The GNU Database Manager
2 2
 Name:		gdbm
3 3
 Version:	1.13
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		http://www.gnu.org/software/gdbm
7 7
 Group:		Applications/Databases
... ...
@@ -16,6 +16,13 @@ single files. The actual data of any record being stored is indexed
16 16
 by a unique key, which can be retrieved in less time than if it was
17 17
 stored in a text file.
18 18
 
19
+%package lang
20
+Summary: Additional language files for gdbm
21
+Group:   Applications/Databases
22
+Requires: %{name} = %{version}-%{release}
23
+%description lang
24
+These are the additional language files of gdbm
25
+
19 26
 %prep
20 27
 %setup -q
21 28
 
... ...
@@ -39,7 +46,7 @@ make %{?_smp_mflags} check
39 39
 
40 40
 %postun	-p /sbin/ldconfig
41 41
 
42
-%files -f %{name}.lang
42
+%files
43 43
 %defattr(-,root,root)
44 44
 %{_bindir}/*
45 45
 %{_libdir}/*.so.*
... ...
@@ -48,7 +55,12 @@ make %{?_smp_mflags} check
48 48
 %{_includedir}/*
49 49
 %{_mandir}/*/*
50 50
 
51
+%files lang -f %{name}.lang
52
+%defattr(-,root,root)
53
+
51 54
 %changelog
55
+*       Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 1.13-2
56
+-       Add lang package.
52 57
 *	Wed Apr 05 2017 Danut Moraru <dmoraru@vmware.com> 1.13-1
53 58
 -	Upgrade gdbm to 1.13
54 59
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.11-2
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Programs for searching through files
2 2
 Name:		grep
3 3
 Version:	3.0
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		http://www.gnu.org/software/grep
7 7
 Group:		Applications/File
... ...
@@ -11,6 +11,14 @@ Source0:	http://ftp.gnu.org/gnu/grep/%{name}-%{version}.tar.xz
11 11
 %define sha1 grep=7b742a6278f28ff056da799c62c1b9e417fe86ba
12 12
 %description
13 13
 The Grep package contains programs for searching through files.
14
+
15
+%package lang
16
+Summary: Additional language files for grep
17
+Group:   System Environment/Base
18
+Requires: %{name} = %{version}-%{release}
19
+%description lang
20
+These are the additional language files of grep
21
+
14 22
 %prep
15 23
 %setup -q
16 24
 %build
... ...
@@ -19,24 +27,33 @@ The Grep package contains programs for searching through files.
19 19
 	--bindir=/bin \
20 20
 	--disable-silent-rules
21 21
 make %{?_smp_mflags}
22
+
22 23
 %install
23 24
 make DESTDIR=%{buildroot} install
24 25
 rm -rf %{buildroot}%{_infodir}
25 26
 %find_lang %{name}
27
+
26 28
 %check
27 29
 make  %{?_smp_mflags} check
28
-%files -f %{name}.lang
30
+
31
+%files
29 32
 %defattr(-,root,root)
30 33
 /bin/*
31 34
 %{_mandir}/*/*
35
+
36
+%files lang -f %{name}.lang
37
+%defattr(-,root,root)
38
+
32 39
 %changelog
40
+*       Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 3.0-2
41
+-       Add lang package.
33 42
 *       Fri Mar 24 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0-1
34 43
 -       Upgrading grep to 3.0 version
35 44
 *       Thu Oct 06 2016 ChangLee <changlee@vmware.com> 2.21-3
36 45
 -       Modified %check
37 46
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.21-2
38 47
 -	GA - Bump release of all rpms
39
-*   Mon Apr 6 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 2.21-1
40
--   Upgrading grep to 2.21 version, and adding 
48
+*       Mon Apr 6 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 2.21-1
49
+-       Upgrading grep to 2.21 version, and adding 
41 50
 *	Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 2.16-1
42 51
 -	Initial build. First version
... ...
@@ -1,8 +1,7 @@
1
-
2 1
 Summary:	SELinux library and simple utilities
3 2
 Name:		libselinux
4 3
 Version:	2.5
5
-Release:	2%{?dist}
4
+Release:	3%{?dist}
6 5
 License:	Public Domain
7 6
 Group:		System Environment/Libraries
8 7
 Source0:	https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160107/%{name}-%{version}-rc1.tar.gz
... ...
@@ -13,7 +12,7 @@ Distribution:	Photon
13 13
 BuildRequires:	libsepol-devel
14 14
 BuildRequires:	pcre-devel, swig
15 15
 BuildRequires:	python2-devel, python2-libs
16
-Requires:	pcre
16
+Requires:	pcre-libs
17 17
 
18 18
 %description
19 19
 Security-enhanced Linux is a feature of the Linux® kernel and a number
... ...
@@ -112,9 +111,11 @@ rm -rf %{buildroot}
112 112
 %{python_sitearch}/selinux/*
113 113
 
114 114
 %changelog
115
+*       Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 2.5-3
116
+-       Remove pcre requires and add requires on pcre-libs
115 117
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.5-2
116 118
 -	GA - Bump release of all rpms
117
-*   Fri Jan 22 2016 Xiaolin Li <xiaolinl@vmware.com> 2.5-1
118
--   Updated to version 2.5
119
+*       Fri Jan 22 2016 Xiaolin Li <xiaolinl@vmware.com> 2.5-1
120
+-       Updated to version 2.5
119 121
 *	Wed Feb 25 2015 Divya Thaluru <dthaluru@vmware.com> 2.4-1
120 122
 -	Initial build.	First version
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Programs for monitoring processes
2 2
 Name:           procps-ng
3 3
 Version:        3.3.12
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        GPLv2
6 6
 URL:            http://procps.sourceforge.net/
7 7
 Group:          Applications/System
... ...
@@ -18,6 +18,14 @@ Summary:    Header and development files for procps-ng
18 18
 Requires:   %{name} = %{version}
19 19
 %description    devel
20 20
 It contains the libraries and header files to create applications 
21
+
22
+%package lang
23
+Summary: Additional language files for procps-ng
24
+Group:   Applications/Databases
25
+Requires: %{name} = %{version}-%{release}
26
+%description lang
27
+These are the additional language files of procps-ng
28
+
21 29
 %prep
22 30
 %setup -q
23 31
 %build
... ...
@@ -38,6 +46,7 @@ ln -sfv ../..%{_lib}/$(readlink %{buildroot}/%{_libdir}/libprocps.so) %{buildroo
38 38
 install -vdm 755 %{buildroot}/%{_sbindir}
39 39
 ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof
40 40
 find %{buildroot} -name '*.la' -delete
41
+%find_lang %{name}
41 42
 
42 43
 %check
43 44
 make %{?_smp_mflags} check
... ...
@@ -84,7 +93,13 @@ make %{?_smp_mflags} check
84 84
 %{_libdir}/pkgconfig/libprocps.pc
85 85
 %{_libdir}/libprocps.so
86 86
 %{_mandir}/man3/*
87
+
88
+%files lang -f %{name}.lang
89
+%defattr(-,root,root)
90
+
87 91
 %changelog
92
+*   Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 3.3.12-2
93
+-   Add lang package.
88 94
 *   Mon Apr 03 2017 Rongrong Qiu <rqiu@vmware.com> 3.3.12-1
89 95
 -   Upgrade to 3.3.12
90 96
 *   Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 3.3.11-5
91 97
new file mode 100644
... ...
@@ -0,0 +1,73 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Summary:        An implementation of the OAuth request-signing logic
4
+Name:           python-oauthlib
5
+Version:        2.0.2
6
+Release:        1%{?dist}
7
+License:        BSD
8
+Url:            https://pypi.python.org/pypi/python-oauthlib/
9
+Group:          Development/Languages/Python
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/fa/2e/25f25e6c69d97cf921f0a8f7d520e0ef336dd3deca0142c0b634b0236a90/oauthlib-2.0.2.tar.gz
13
+%define sha1    oauthlib=e9d2d2dba4526cad5db3d6a18bf2ca168087efcf
14
+
15
+BuildRequires:  python2-devel
16
+BuildRequires:  python-setuptools
17
+Requires:       python2
18
+Requires:       python2-libs
19
+
20
+BuildArch:      noarch
21
+
22
+%description
23
+OAuthLib is a generic utility which implements the logic of OAuth without assuming a specific HTTP request object or web framework
24
+
25
+%package -n python3-oauthlib
26
+Summary:        Python3 package for oauthlib
27
+BuildRequires:  python3-devel
28
+Requires:       python3
29
+Requires:       python3-libs
30
+
31
+%description -n python3-oauthlib
32
+Python 3 version of oauthlib
33
+
34
+%prep
35
+%setup -q -n oauthlib-%{version}
36
+rm -rf ../p3dir
37
+cp -a . ../p3dir
38
+
39
+%build
40
+python2 setup.py build
41
+
42
+pushd ../p3dir
43
+python3 setup.py build
44
+popd
45
+
46
+
47
+%install
48
+rm -rf %{buildroot}
49
+python2 setup.py install --root=%{buildroot}
50
+
51
+pushd ../p3dir
52
+python3 setup.py install --root=%{buildroot}
53
+popd
54
+
55
+%check
56
+python2 setup.py test
57
+
58
+pushd ../p3dir
59
+python3 setup.py test
60
+popd
61
+
62
+%files
63
+%defattr(-, root, root, -)
64
+%{python2_sitelib}/*
65
+
66
+%files -n python3-oauthlib
67
+%{python3_sitelib}/*
68
+
69
+%changelog
70
+*   Thu Apr 13 2017 Anish Swaminathan <anishs@vmware.com> 2.0.2-1
71
+-   Initial packaging for Photon
72
+
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:        Text editor
4 4
 Name:           vim
5 5
 Version:        8.0.0533
6
-Release:        1%{?dist}
6
+Release:        2%{?dist}
7 7
 License:        Charityware
8 8
 URL:            http://www.vim.org
9 9
 Group:          Applications/Editors
... ...
@@ -12,7 +12,6 @@ Distribution:   Photon
12 12
 Source0:        %{name}-%{version}.tar.gz
13 13
 %define sha1    vim=6169cece15cb139db3ceff9c9ba2bf74013b1e02
14 14
 BuildRequires:  ncurses-devel
15
-Requires:       tcsh
16 15
 
17 16
 %description
18 17
 The Vim package contains a powerful text editor.
... ...
@@ -165,6 +164,8 @@ make test
165 165
 %{_bindir}/vimdiff
166 166
 
167 167
 %changelog
168
+*   Tue May 02 2017 Anish Swaminathan <anishs@vmware.com>  8.0.0533-2
169
+-   Remove tcsh requires
168 170
 *   Fri Apr 14 2017 Xiaolin Li <xiaolinl@vmware.com> 8.0.0533-1
169 171
 -   Updated to version 8.0.0533.
170 172
 *   Tue Feb 28 2017 Anish Swaminathan <anishs@vmware.com>  7.4-10