SHA256
1
0
forked from pool/cloud-init

112 Commits

Author SHA256 Message Date
fb205e0def Accepting request 1295166 from Cloud:Tools
- Update to version 25.1.3 (bsc#1245403)
  + Forward port
    - cloud-init-no-openstack-guess.patch
  + docs: provide example3 for PAM and ssh_pwauth behavior (#27)
  + fix: Make hotplug socket writable only by root (#25) (CVE-2024-11584)
  + fix: Don't attempt to identify non-x86 OpenStack instances (LP: #2069607)
    (CVE-2024-6174)
From 25.1.2
  + fix: ensure MAAS datasource retries on failure (#6167)

OBS-URL: https://build.opensuse.org/request/show/1295166
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=107
2025-07-24 16:34:37 +00:00
b3d3a8bcbd - Update to version 25.1.3 (bsc#1245403)
+ Forward port
    - cloud-init-no-openstack-guess.patch
  + docs: provide example3 for PAM and ssh_pwauth behavior (#27)
  + fix: Make hotplug socket writable only by root (#25) (CVE-2024-11584)
  + fix: Don't attempt to identify non-x86 OpenStack instances (LP: #2069607)
    (CVE-2024-6174)
From 25.1.2
  + fix: ensure MAAS datasource retries on failure (#6167)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=247
2025-07-22 18:59:22 +00:00
55263e441e Accepting request 1277881 from Cloud:Tools
- Update to version 25.1.1 (bsc#1239715,jsc#PED-8680,bsc#1228414)
 + Removed included upstream
   - pep-594-drop-pipes.patch
   - cloud-init-fix-python313.patch
   - cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch
   - cloud-init-direxist.patch
   - cloud-init-wait-for-net.patch
   - cloud-init-usr-sudoers.patch
   - cloud-init-no-nmcfg-needed.patch
   - cloud-init-keep-flake.patch
   - cloud-init-lint-fixes.patch
   - cloud-init-pckg-reboot.patch
   - cloud-init-ds-deterministic.patch
   - cloud-init-write-routes.patch
   - cloud-init-skip-empty-conf.patch
 + Forward port
   - cloud-init-no-tempnet-oci.patch
   - cloud-init-no-openstack-guess.patch
   - cloud-init-lint-set-interpreter.patch
 + Add
   - cloud-init-ssh-usrmerge.patch (bsc#1237764)
   - cloud-init-lint-set-interpreter.patch
   - cloud-init-lint-fix.patch
   - cloud-init-no-single-process.patch
   - cloud-init-needs-action.patch
 + Drop hidesensitivedata in 16 & greater
 + test: pytestify cc_chef tests, add migration test
 + chef: migrate files in old config directories for backups and cache
 + fix: correct the path for Chef's backups (#5994)
 + fix(Azure): don't reraise FileNotFoundError during ephemeral setup (#6113)

OBS-URL: https://build.opensuse.org/request/show/1277881
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=106
2025-05-20 07:31:26 +00:00
333e9dfd77 apply the patch dummy
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=246
2025-05-15 18:32:08 +00:00
45e0874bb7 - Update to version 25.1.1 (bsc#1239715,jsc#PED-8680,bsc#1228414)
+ Removed included upstream
   - pep-594-drop-pipes.patch
   - cloud-init-fix-python313.patch
   - cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch
   - cloud-init-direxist.patch
   - cloud-init-wait-for-net.patch
   - cloud-init-usr-sudoers.patch
   - cloud-init-no-nmcfg-needed.patch
   - cloud-init-keep-flake.patch
   - cloud-init-lint-fixes.patch
   - cloud-init-pckg-reboot.patch
   - cloud-init-ds-deterministic.patch
   - cloud-init-write-routes.patch
   - cloud-init-skip-empty-conf.patch
 + Forward port
   - cloud-init-no-tempnet-oci.patch
   - cloud-init-no-openstack-guess.patch
   - cloud-init-lint-set-interpreter.patch
 + Add
   - cloud-init-ssh-usrmerge.patch (bsc#1237764)
   - cloud-init-lint-set-interpreter.patch
   - cloud-init-lint-fix.patch
   - cloud-init-no-single-process.patch
   - cloud-init-needs-action.patch
 + Drop hidesensitivedata in 16 & greater
 + test: pytestify cc_chef tests, add migration test
 + chef: migrate files in old config directories for backups and cache
 + fix: correct the path for Chef's backups (#5994)
 + fix(Azure): don't reraise FileNotFoundError during ephemeral setup (#6113)

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=245
2025-05-15 18:10:38 +00:00
9d54ca0906 Accepting request 1245372 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1245372
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=105
2025-02-12 20:30:43 +00:00
b1469b941b Add missing bugzilla reference:
- Support python 3.13 (bsc#1233649):

resst is just end-of-line whitespace removal.

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=244
2025-02-12 12:27:05 +00:00
f155ed52a6 + Make sure the directory exists, if not create it, before writing in that
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=243
2025-02-11 21:02:04 +00:00
1a0cecdf92 - Add cloud-init-direxist.patch (bsc#1236720)
+ Make sur ethe directory exists, if not create it, before writing in that
    location.

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=242
2025-02-04 16:57:48 +00:00
e330242ba5 Accepting request 1239349 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1239349
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=104
2025-01-23 16:56:32 +00:00
ae07dd3a29 - Support python 3.13:
+ pep-594-drop-pipes.patch, gh#canonical/cloud-init#4392
  + cloud-init-fix-python313.patch, gh#canonical/cloud-init#4669
  + cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch gh#canonical/cloud-init#5052

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=241
2025-01-21 21:05:02 +00:00
d2277ce376 Accepting request 1235207 from Cloud:Tools
- Add cloud-init-wait-for-net.patch (bsc#1227237)
  + Wait for udev once if we cannot find the expected MAC

  + Brute force approach to skip renames if the device is already present

OBS-URL: https://build.opensuse.org/request/show/1235207
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=103
2025-01-07 19:50:09 +00:00
0338649d15 fix syntx error in patch
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=240
2025-01-06 13:59:55 +00:00
14e9c00f78 handle missing udev process
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=239
2025-01-06 13:51:27 +00:00
fb5493d9e8 update patch
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=238
2025-01-06 13:27:30 +00:00
882510dff4 - Add cloud-init-wait-for-net.patch (bsc#1227237)
+ Wait for udev once if we cannot find the expected MAC

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=237
2025-01-06 13:18:52 +00:00
26859a25ae + Brute force approach to skip renames if the device is already present
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=236
2025-01-06 12:29:16 +00:00
3c7c6e256e Accepting request 1181325 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1181325
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=102
2024-06-17 17:27:15 +00:00
c05d6e2f74 Accepting request 1179854 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1179854
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=101
2024-06-11 16:27:02 +00:00
84c6e02742 Accepting request 1172791 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1172791
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=100
2024-05-11 16:18:44 +00:00
fff63196cf Accepting request 1168393 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1168393
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=99
2024-04-17 12:45:19 +00:00
cade3403b4 Accepting request 1163386 from Cloud:Tools
- Add  cloud-init-ds-deterministic.patch (bsc#1221132)
  + Do not guess a data source when checking for a CloudStack
    environment

OBS-URL: https://build.opensuse.org/request/show/1163386
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=98
2024-03-29 12:09:29 +00:00
06f0391ead Accepting request 1155557 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1155557
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=97
2024-03-07 17:27:47 +00:00
e17e51b4cf Accepting request 1152513 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1152513
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=96
2024-02-28 18:44:31 +00:00
2bf1ee4ee3 Accepting request 1142867 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1142867
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=95
2024-01-31 22:53:26 +00:00
7e0ec650d8 Accepting request 1133887 from Cloud:Tools
- Switch build dependency to the generic distribution-release package

OBS-URL: https://build.opensuse.org/request/show/1133887
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=94
2023-12-19 22:15:31 +00:00
8330229f84 Accepting request 1132673 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1132673
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=93
2023-12-13 17:34:05 +00:00
62347769ec Accepting request 1130860 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/1130860
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=92
2023-12-05 16:02:51 +00:00
bb6ef29f74 Accepting request 1130563 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1130563
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=91
2023-12-04 22:00:45 +00:00
baff025f5c Accepting request 1128348 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1128348
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=90
2023-11-23 20:38:38 +00:00
32d6bc0624 Accepting request 1103818 from Cloud:Tools
- update to 23.1.2:
  * Make user/vendor data sensitive and remove log permissions
  * source: Force OpenStack when it is only option (#2045)
  * sources/azure: fix regressions in IMDS behavior
- drop 
  cloud-init-cve-2023-1786-redact-instance-data-json-main.patch (upstream)
- spec-file cleanups, including dropping flake8 (as build fails
  with newer flake8 versions)

OBS-URL: https://build.opensuse.org/request/show/1103818
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=89
2023-08-14 20:35:06 +00:00
c4435ac5c3 Accepting request 1098540 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1098540
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=88
2023-07-18 19:53:44 +00:00
2ae4318ae4 Accepting request 1068502 from Cloud:Tools
- Update to version 23.1
  + Remove patches included upstream:
    - cloud-init-btrfs-queue-resize.patch
    - cloud-init-micro-is-suse.patch
    - cloud-init-suse-afternm.patch
    - cloud-init-prefer-nm.patch
    - cloud-init-transact-up.patch
  + Forward port
    - cloud-init-write-routes.patch
  + Added
    - cloud-init-fix-ca-test.patch
  + Support transactional-updates for SUSE based distros (#1997)
    [Robert Schweikert]
  + Set ownership for new folders in Write Files Module (#1980)
    [Jack] (LP: #1990513)
  + add OpenCloudOS and TencentOS support (#1964) [wynnfeng]
  + lxd: Retry if the server isn't ready (#2025)
  + test: switch pycloudlib source to pypi (#2024)
  + test: Fix integration test deprecation message (#2023)
  + Recognize opensuse-microos, dev tooling fixes [Robert Schweikert]
  + sources/azure: refactor imds handler into own module (#1977)
    [Chris Patterson]
  + docs: deprecation generation support [1/2] (#2013)
  + add function is_virtual to distro/FreeBSD (#1957) [Mina Galić]
  + cc_ssh: support multiple hostcertificates (#2018) (LP: #1999164)
  + Fix minor schema validation regression and fixup typing (#2017)
  + doc: Reword user data debug section (#2019)
  + Overhaul/rewrite of certificate handling as follows: (#1962)
    [dermotbradley] (LP: #1931174)
  + disk_setup: use byte string when purging the partition table (#2012)

OBS-URL: https://build.opensuse.org/request/show/1068502
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=87
2023-03-02 22:01:51 +00:00
7be73db30b Accepting request 976076 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/976076
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=86
2022-05-12 20:57:46 +00:00
63de3a8f9f Accepting request 964920 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/964920
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=85
2022-03-28 15:00:18 +00:00
a4fc101552 Accepting request 936053 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/936053
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=84
2021-12-08 21:08:41 +00:00
0eecf8bdf0 Accepting request 913169 from Cloud:Tools
- Update to version 21.2 (bsc#1186004)
  + Remove patches included upstream:
    - cloud-init-azure-def-usr-pass.patch
    - cloud-init-after-kvp.diff
    - cloud-init-recognize-hpc.patch
    - use_arroba_to_include_sudoers_directory-bsc_1181283.patch
    - cloud-init-bonding-opts.patch
    - cloud-init-log-file-mode.patch
    - cloud-init-no-pwd-in-log.patch
    - 0001-templater-drop-Jinja-Python-2-compatibility-shim.patch
  + Remove cloud-init-sle12-compat.patch, version in SLE 12 is frozen to 20.2
  + Remove cloud-init-tests-set-exec.patch no longer needed 
  + Forward port:
    - cloud-init-write-routes.patch
    - cloud-init-break-resolv-symlink.patch
    - cloud-init-sysconf-path.patch
    - cloud-init-no-tempnet-oci.patch
  +  Add \r\n check for SSH keys in Azure (#889)
  +  Revert "Add support to resize rootfs if using LVM (#721)" (#887)
     (LP: #1922742)
  +  Add Vultaire as contributor (#881) [Paul Goins]
  +  Azure: adding support for consuming userdata from IMDS (#884) [Anh Vo]
  +  test_upgrade: modify test_upgrade_package to run for more sources (#883)
  +  Fix chef module run failure when chef_license is set (#868) [Ben Hughes]
  +  Azure: Retry net metadata during nic attach for non-timeout errs (#878)
     [aswinrajamannar]
  +  Azure: Retrieve username and hostname from IMDS (#865) [Thomas Stringer]
  +  Azure: eject the provisioning iso before reporting ready (#861) [Anh Vo]
  +  Use `partprobe` to re-read partition table if available (#856)
     [Nicolas Bock] (LP: #1920939)

OBS-URL: https://build.opensuse.org/request/show/913169
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=83
2021-08-24 08:54:11 +00:00
Richard Brown
6b19333bfc Accepting request 911577 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/911577
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=82
2021-08-16 08:08:31 +00:00
8ffc3d9cdf Accepting request 905298 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/905298
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=81
2021-07-10 20:54:08 +00:00
68888fb944 Accepting request 899108 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/899108
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=80
2021-06-15 14:36:45 +00:00
934063986c Accepting request 885452 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/885452
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=79
2021-04-18 19:44:15 +00:00
3e03d52384 Accepting request 866971 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/866971
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=78
2021-01-29 13:55:04 +00:00
fd0b3499be Accepting request 860463 from Cloud:Tools
- Update cloud-init-write-routes.patch (bsc#1180176)
  + Follow up to previous changes. Fix order of operations
    error to make gateway comparison between subnet configuration and
    route configuration valuable rather than self-comparing.

- Add cloud-init-sle12-compat.patch (jsc#PM-2335)
  - Python 3.4 compatibility in setup.py
  - Disable some test for mock version compatibility

OBS-URL: https://build.opensuse.org/request/show/860463
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=77
2021-01-06 18:56:11 +00:00
65bba0838b Accepting request 853763 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/853763
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=76
2020-12-09 21:12:15 +00:00
cc3eeff32f Accepting request 842287 from Cloud:Tools
- Update cloud-init-write-routes.patch (bsc#1177526)
  + Avoid exception if no gateway information is present and warning
    is triggered for existing routing.

OBS-URL: https://build.opensuse.org/request/show/842287
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=75
2020-10-20 14:03:17 +00:00
74b5fabc82 Accepting request 826089 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/826089
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=74
2020-08-14 07:29:39 +00:00
d174a8cd19 Accepting request 815739 from Cloud:Tools
- Disable testing to aid elimination of unittest2 in Factory

OBS-URL: https://build.opensuse.org/request/show/815739
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=73
2020-06-21 16:52:06 +00:00
91dfbf22af Accepting request 810865 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/810865
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=72
2020-06-03 18:29:47 +00:00
197013d386 Accepting request 807397 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/807397
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=71
2020-05-26 15:13:37 +00:00
1673a5770a Accepting request 792960 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/792960
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=70
2020-04-10 21:52:33 +00:00
a931efbd63 Accepting request 791202 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/791202
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=69
2020-04-05 18:49:53 +00:00
df49ce6d46 Accepting request 782655 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/782655
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=68
2020-03-11 17:33:15 +00:00
31adfdd05a Accepting request 777713 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/777713
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=67
2020-02-22 17:58:28 +00:00
e8539a971b Accepting request 765394 from Cloud:Tools
- Add cloud-init-no-tempnet-oci.patch (bsc#1161132, bsc#1161133)
  + Do not attempt to configure an ephemeral network on OCI. We
    boot off iSCSI and the network is up. Just read the data.

- Add patch to build properly with python 3.8:
  * 0001-Make-tests-work-with-Python-3.8-139.patch

- Update to version 19.4
  + Remove patches included upstream:
    - cloud-init-after-wicked.patch
    - cloud-init-noresolv-merge-no-dns-data.diff
    - cloud-init-renderer-detect.patch
    - cloud-init-trigger-udev.patch
  + Removed patches merged with cloud-init-mix-static-dhcp.patch
    - cloud-init-proper-ipv6-setting.patch
    - cloud-init-static-net.patch
  + Added cloud-init-mix-static-dhcp.patch (bsc#1157894)
  + Forward port cloud-init-sysconf-path.patch
  + doc: specify _ over - in cloud config modules
  + [Joshua Powers] (LP: #1293254)
  + tools: Detect python to use via env in migrate-lp-user-to-github
  + [Adam Dobrawy]
  + Partially revert "fix unlocking method on FreeBSD" (#116)
  + tests: mock uid when running as root (#113)
  + [Joshua Powers] (LP: #1856096)
  + cloudinit/netinfo: remove unused getgateway (#111)
  + docs: clear up apt config sections (#107) [Joshua Powers] (LP: #1832823)
  + doc: add kernel command line option to user data (#105)
  + [Joshua Powers] (LP: #1846524)
  + config/cloud.cfg.d: update README [Joshua Powers] (LP: #1855006)

OBS-URL: https://build.opensuse.org/request/show/765394
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=66
2020-01-23 15:08:30 +00:00
493166b275 Accepting request 753049 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/753049
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=65
2019-12-07 14:15:39 +00:00
6dbf527a2c Accepting request 746646 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/746646
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=64
2019-11-10 21:36:38 +00:00
83f69b8b12 Accepting request 741941 from Cloud:Tools
- Add cloud-init-renderer-detect.patch (bsc#1154092, boo#1142988)
  + Short curcuit the conditional for identifying the sysconfig renderer.
    If we find ifup/ifdown accept the renderer as available.

- Add cloud-init-break-resolv-symlink.patch (bsc#1151488)
  + If /etc/resolv.conf is a symlink break it. This will avoid netconfig
    from clobbering the changes cloud-init applied.

OBS-URL: https://build.opensuse.org/request/show/741941
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=63
2019-10-25 16:40:22 +00:00
08601df903 Accepting request 738480 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/738480
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=62
2019-10-18 12:30:07 +00:00
0764e8e2b0 Accepting request 734782 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/734782
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=61
2019-10-05 14:16:17 +00:00
67d0e4641b Accepting request 728523 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/728523
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=60
2019-09-11 08:21:43 +00:00
522b534b46 Accepting request 709158 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/709158
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=59
2019-06-24 19:48:51 +00:00
a88363e6e1 Accepting request 699769 from Cloud:Tools
- Update cloud-init-write-routes.patch (bsc#1132692)
  + Properly accumulate all the defined routes for a given network device.
    Previously only the last defined route was written to the routes file.

- Update cloud-init-trigger-udev.patch (bsc#1125950)
  + Write the udev rules to a different file than the default
  + Settle udev if not all configured devices are in the device tree to
    avoid race condition between udev and cloud-init

  + Fix the order of calls, the SUSE implementation of route config file

OBS-URL: https://build.opensuse.org/request/show/699769
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=58
2019-05-03 20:23:07 +00:00
Stephan Kulow
40dff8d618 Accepting request 678302 from Cloud:Tools
- Add cloud-init-trigger-udev.patch (bsc#1125950)
  + When the user configures a new rules file for network devices
    the rules may not apply immediately, trigger udevadm

- Modify cloud-init-write-routes.patch (bsc#1125992)
  + Fix the order of calls, the SUSE imaplementation of route config file
    writing must clobber the default implementation.

- Add cloud-init-proper-ipv6-varname.patch (bsc#1126101)
  + Use the proper name to designate IPv6 addresses in ifcfg-* files

OBS-URL: https://build.opensuse.org/request/show/678302
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=57
2019-02-28 20:24:27 +00:00
Stephan Kulow
15110b1354 Accepting request 670422 from Cloud:Tools
- Modify cloud-init-write-routes.patch (boo#1123694)
  + Drop a '-' in the route file for the last column

OBS-URL: https://build.opensuse.org/request/show/670422
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=56
2019-02-08 11:06:58 +00:00
0349f08ea9 Accepting request 668094 from Cloud:Tools
- Add cloud-init-no-empty-resolv.patch (bsc#1119397)

- Update to version 18.5 (bsc#1121878, boo#1116767)
  + Remove 
    0001-Fix-the-service-order-for-SUSE-distributions.patch
    0001-Follow-the-ever-bouncing-ball-for-openSUSE-distribut.patch
    0002-Add-tests-for-additional-openSUSE-distro-condition-m.patch
    included upstream
  + Forward port cloud-init-sysconf-ethsetup.patch
  + Add cloud-init-write-routes.patch
  + Add cloud-init-handle-def-route-set.patch
  + tests: add Disco release [Joshua Powers]
  + net: render 'metric' values in per-subnet routes (LP: #1805871)
  + write_files: add support for appending to files. [James Baxter]
  + config: On ubuntu select cloud archive mirrors for armel, armhf, arm64.
    (LP: #1805854)
  + dhclient-hook: cleanups, tests and fix a bug on 'down' event.
  + NoCloud: Allow top level 'network' key in network-config. (LP: #1798117)
  + ovf: Fix ovf network config generation gateway/routes (LP: #1806103)
  + azure: detect vnet migration via netlink media change event
    [Tamilmani Manoharan]
  + Azure: fix copy/paste error in error handling when reading azure ovf.
  + [Adam DePue]
  + tests: fix incorrect order of mocks in test_handle_zfs_root.
  + doc: Change dns_nameserver property to dns_nameservers. [Tomer Cohen]
  + OVF: identify label iso9660 filesystems with label 'OVF ENV'.
  + logs: collect-logs ignore instance-data-sensitive.json on non-root user
    (LP: #1805201)
  + net: Ephemeral*Network: add connectivity check via URL
  + azure: _poll_imds only retry on 404. Fail on Timeout (LP: #1803598)

OBS-URL: https://build.opensuse.org/request/show/668094
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=55
2019-01-24 13:15:09 +00:00
d8c0fcb2ba Accepting request 646077 from Cloud:Tools
- Add cloud-init-ostack-metadat-dencode.patch (bsc#1101894)

- Add cloud-init-static-net.patch (boo#1114160)

OBS-URL: https://build.opensuse.org/request/show/646077
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=54
2018-11-05 21:54:45 +00:00
c952884add Accepting request 644740 from Cloud:Tools
- Update to version 18.4 (bsc#1087331, bsc#1097388, boo#1111427, bsc#1095627)
  + Remove cloud-init-no-user-lock-if-already-locked.patch
    cloud-init 18.4 is not supported on SLE 11 code base
  + Remove 0001-Support-chrony-configuration-lp-1731619.patch
    Included upstream
  + Remove 0003-Distro-dependent-chrony-config-file.patch
    Included upstream
  + Remove 0001-switch-to-using-iproute2-tools.patch
    Included upstream
  + Remove cloud-init-no-python-linux-dist.patch
    Included upstream
  + Remove cloud-init-no-trace-empt-sect.patch
    Included upstream
  + Remove cloud-init-setpath-dsitentify.patch
    Included upstream
  + Modify fix-default-systemd-unit-dir.patch
    Use pkg-config, only modify the generator
  + Remove cloud-init-sysconfig-netpathfix.patch
    Fixed upstream
  + Removed cloud-init-skip-ovf-tests.patch
    Fixed upstream
  + Removed cloud-init-translate-netconf-ipv4-keep-gw.patch
    Fixed upstream
  + Add cloud-init-template-py2.patch avoid Python 3 dependency when we build
    for distros with Python 2 support
  + Add 0001-Follow-the-ever-bouncing-ball-for-openSUSE-distribut.patch
  + Add 0002-Add-tests-for-additional-openSUSE-distro-condition-m.patch
  + Add cloud-init-sysconf-path.patch
  + Add cloud-init-sysconf-ethsetup.patch
  + Add 0001-Fix-the-service-order-for-SUSE-distributions.patch

OBS-URL: https://build.opensuse.org/request/show/644740
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=53
2018-10-29 13:21:17 +00:00
a3bf6024e3 Accepting request 611409 from Cloud:Tools
- Re-add generator (bsc#1089824, boo#1093501)
  + Add cloud-init-setpath-dsitentify.patch, upstream solution to
    hanle PATH issue
  + Re-enable th egenerator to reduce effort in cloud-init configuration

OBS-URL: https://build.opensuse.org/request/show/611409
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=52
2018-05-23 14:09:30 +00:00
cb26e87bdc Accepting request 609843 from Cloud:Tools
- Drop the generator (bsc#1089824, boo#1093501)
  + The generator spawns a script called ds-identify which in turn calls
    blkid. When the generator executes the environment may or may not be
    ready. The generator speeds up the boot process in cases where
    cloud-init is enabled but we are not in an environment where cloud-init
    should run -> Don't do that.

- Update to version 18.2 (bsc#1092637, bsc#1084509)

OBS-URL: https://build.opensuse.org/request/show/609843
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=51
2018-05-16 16:46:53 +00:00
a60ee52798 Accepting request 607053 from Cloud:Tools
- Update to version 18.1 (bsc#1092637, bsc#1084509)
  + Forward port cloud-init-python2-sigpipe.patch
  + Forward port cloud-init-no-python-linux-dist.patch
  + Add cloud-init-no-trace-empt-sect.patch
  + Hetzner: Exit early if dmi system-manufacturer is not Hetzner.
  + Add missing dependency on isc-dhcp-client to trunk ubuntu packaging.
  + (LP: #1759307)
  + FreeBSD: resizefs module now able to handle zfs/zpool.
  + [Dominic Schlegel] (LP: #1721243)
  + cc_puppet: Revert regression of puppet creating ssl and ssl_cert dirs
  + Enable IBMCloud datasource in settings.py.
  + IBMCloud: Initial IBM Cloud datasource.
  + tests: remove jsonschema from xenial tox environment.
  + tests: Fix newly added schema unit tests to skip if no jsonschema.
  + ec2: Adjust ec2 datasource after exception_cb change.
  + Reduce AzurePreprovisioning HTTP timeouts.
  + [Douglas Jordan] (LP: #1752977)
  + Revert the logic of exception_cb in read_url.
  + [Kurt Garloff] (LP: #1702160, #1298921)
  + ubuntu-advantage: Add new config module to support
  + ubuntu-advantage-tools
  + Handle global dns entries in netplan (LP: #1750884)
  + Identify OpenTelekomCloud Xen as OpenStack DS.
  + [Kurt Garloff] (LP: #1756471)
  + datasources: fix DataSource subclass get_hostname method signature
  + (LP: #1757176)
  + OpenNebula: Update network to return v2 config rather than ENI.
  + [Akihiko Ota]
  + Add Hetzner Cloud DataSource
  + net: recognize iscsi root cases without ip= on kernel command line.

OBS-URL: https://build.opensuse.org/request/show/607053
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=50
2018-05-15 08:15:58 +00:00
64e80bc062 Accepting request 591769 from Cloud:Tools
- Update to version 18.1 (bsc#1085787, bsc#1084749)
  + Forward port cloud-init-python2-sigpipe.patch
  + Forward port 0003-Distro-dependent-chrony-config-file.patch
    partial integration into 0001-Support-chrony-configuration-lp-1731619.patch
  + Forward port cloud-init-no-python-linux-dist.patch
  + Remove 0002-Disable-method-deprecation-warning-for-pylint.patch
    use new cloud-init internal distro detection code
  + Remove cloud-init-resize-ro-btrfs.patch included upstream
  + Remove 0001-Set-syslog_fix_perms-for-SUSE-distro-addresses-bsc-1.patch
    included upstream
  + OVF: Fix VMware support for 64-bit platforms. [Sankar Tanguturi]
  + ds-identify: Fix searching for iso9660 OVF cdroms. (LP: #1749980)
  + SUSE: Fix groups used for ownership of cloud-init.log [Robert Schweikert]
  + ds-identify: check /writable/system-data/ for nocloud seed.
    (LP: #1747070)
  + tests: run nosetests in cloudinit/ directory, fix py26 fallout.
  + tools: run-centos: git clone rather than tar.
  + tests: add support for logs with lxd from snap and future lxd 3.
    (LP: #1745663)
  + EC2: Fix get_instance_id called against cached datasource pickle.
    (LP: #1748354)
  + cli: fix cloud-init status to report running when before result.json
    (LP: #1747965)
  + net: accept network-config in netplan format for renaming interfaces
    (LP: #1709715)
  + Fix ssh keys validation in ssh_util [Tatiana Kholkina]
  + docs: Update RTD content for cloud-init subcommands.
  + OVF: Extend well-known labels to include OVFENV. (LP: #1698669)
  + Fix potential cases of uninitialized variables. (LP: #1744796)
  + tests: Collect script output as binary, collect systemd journal, fix lxd.

OBS-URL: https://build.opensuse.org/request/show/591769
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=49
2018-03-28 08:34:25 +00:00
6fc02fc32c Accepting request 577256 from Cloud:Tools
- update cloud-init-sysconfig-netpathfix.patch:
  * skip checking for files in /etc/sysconfig that never exist
  on a wickedd based system

OBS-URL: https://build.opensuse.org/request/show/577256
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=48
2018-02-16 20:46:26 +00:00
99e541cc85 Accepting request 576385 from Cloud:Tools
- Fix logfile permission settings (bsc#1080595)
  + Add 0001-Set-syslog_fix_perms-for-SUSE-distro-addresses-bsc-1.patch

OBS-URL: https://build.opensuse.org/request/show/576385
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=47
2018-02-14 09:52:26 +00:00
697db804a2 Accepting request 571062 from Cloud:Tools
- drop dependency on boto (only used in examples, and
  should really be ported to botocore/boto3 instead)

- Update to version 17.2 (boo#1069635, bsc#1072811)
  + Add cloud-init-skip-ovf-tests.patch
  + Add cloud-init-no-python-linux-dist.patch
  + Add 0001-switch-to-using-iproute2-tools.patch
  + Add 0001-Support-chrony-configuration-lp-1731619.patch
  + Add 0002-Disable-method-deprecation-warning-for-pylint.patch
  + Add 0003-Distro-dependent-chrony-config-file.patch
  + removed cloud-init-add-variant-cloudcfg.patch replaced by
    cloud-init-no-python-linux-dist.patch
  + removed zypp_add_repos.diff included upstream
  + removed zypp_add_repo_test.patch included upstream
  + removed cloud-init-hosts-template.patch included upstream
  + removed cloud-init-more-tasks.patch included upstream
  + removed cloud-init-final-no-apt.patch included upstream
  + removed cloud-init-ntp-conf-suse.patch included upstream
  + removed cloud-init-break-cycle-local-service.patch included upstream
  + removed cloud-init-reproduce-build.patch included upstream
  + For the complete changelog see https://launchpad.net/cloud-init/trunk/17.2

OBS-URL: https://build.opensuse.org/request/show/571062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=46
2018-01-30 14:46:07 +00:00
588515308f Accepting request 569384 from Cloud:Tools
- patch distribution detection until a fix is delivered to python3 (bsc#997614)
  add cloud-init-add-variant-cloudcfg.patch

OBS-URL: https://build.opensuse.org/request/show/569384
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=45
2018-01-25 11:40:57 +00:00
d326454b18 Accepting request 566429 from Cloud:Tools
OBS-URL: https://build.opensuse.org/request/show/566429
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=44
2018-01-17 20:57:58 +00:00
a2137d41ee Accepting request 556684 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/556684
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=43
2017-12-14 10:03:05 +00:00
2041458081 Accepting request 546125 from Cloud:Tools
- Add cloud-init-resize-ro-btrfs.patch
  + cc_resizefs fails if the current root is a read-only btrfs
    subvolume, use an always writeable subvolume instead [bsc#1042913]

OBS-URL: https://build.opensuse.org/request/show/546125
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=42
2017-11-29 09:53:57 +00:00
db79f76cde Accepting request 543937 from Cloud:Tools
- Add cloud-init-break-cycle-local-service.patch
  + Let systemd pull in the default targets. This breaks a cycle

- Fix variable name in cloud-init-translate-netconf-ipv4-keep-gw.patch

- Add cloud-init-translate-netconf-ipv4-keep-gw.patch (boo#1064854)
  + Properly insert the gateway information for v1 json network config data

- Add cloud-init-ntp-conf-suse.patch
  + ntp configuration was broken on sles and opensuse lp#1726572

- Add cloud-init-hosts-template.patch (bsc#1064594)
  + Properly expand the /etc/hosst file when manage_etc_hosts is set

OBS-URL: https://build.opensuse.org/request/show/543937
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=41
2017-11-21 14:33:52 +00:00
45a3cf07eb Accepting request 538365 from Cloud:Tools
- Fix sed expression to set distro properly (boo#1063716)

- Update to version 17.1 (bsc#1035106)
  + Version numbering scheme change now YY.NUMBER_OF_RELESE_THAT_YEAR
  + Remove cloud.cfg.suse, use generated default config file
  + Remove addopenSUSEBase.patch, included upstream
  + Remove suseIntegratedHandler.patch, included upstream
  + Remove openSUSEhostsTemplate.diff, included upstream
  + Remove cloud-init-handle-no-carrier.patch, included upstream
  + Remove cloud-init-digital-ocean-datasource.patch,
    use upstream implementation
  + Remove cloud-init-digital-ocean-datasource-enable-by-default.patch,
    use upstream implementation
  + Remove cloud-init-fix-unicode-handling-binarydecode.patch,
    included upstream
  + Remove cloud-init-no-dmidecode-on-ppc64.patch, included upstream
  + Remove dataSourceOpenNebula.patch, use upstream implementation
  + Remove setupSUSEsysVInit.diff, included upstream
  + Remove suseSysVInit.diff, included upstream
  + Remove cloud-init-finalbeforelogin.patch, don't block login 
  + Remove cloud-init-handle-not-implemented-query.patch, query option removed
  + Remove cloud-init-spceandtabs-clean.patch, indentation fixed upstream
  + Remove dynamicInitCmd.diff, different solution from upstream
  + Added cloud-init-more-tasks.patch, (bsc#1047363)
    replace cloud-init-finalbeforelogin.patch
  + Forward port cloud-init-python2-sigpipe.patch
  + Remove cloud-init-net-eni.patch, included upstream
  + Remove cloud-init-service.patch, included upstream
  + Forward port cloud-init-sysconfig-netpathfix.patch
  + Remove cloud-init-net-sysconfig-lp1665441.patch, included upstream

OBS-URL: https://build.opensuse.org/request/show/538365
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=40
2017-11-03 15:28:01 +00:00
f6b14a20b8 Accepting request 527526 from Cloud:Tools
- add skip-argparse-on-python3.patch: don't depend on argparse
  for python3, it is builtin there (as of python 3.2, so the
  patch should be good enough)

OBS-URL: https://build.opensuse.org/request/show/527526
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=39
2017-09-20 15:14:12 +00:00
250140c9eb Accepting request 527050 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/527050
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=38
2017-09-19 15:35:23 +00:00
e6b386982d Accepting request 523370 from Cloud:Tools
- Drop python-cheetah as requirement
  + Cheetah is no maintained and cloud-init switches to Jinja2 as
    templating engine if Cheetah is not available
- Drop argparse as dependency for Py3 build
  + argparse is built into Python

- Modify cloud-init-finalbeforelogin.patch (bsc#1047363)
  + Support user processes running in coud-init-final to consume a
    large number of threads.
- Modify cloud-init-service.patch (bsc#1055649)
  + Start after dbus.service, needed by hotnamectl
- Modify cloud-init-handle-not-implemented-query.patch
  + print needs () for Python3
- Add cloud-init-spceandtabs-clean.patch
  + Fix inconsistent use of spaces and tabs in various files
- Modify suseIntegratedHandler.patch
  + Fix mode setting passed to function for file writing
- Set packag up to build with Python 3 for distros later than SLE 12

OBS-URL: https://build.opensuse.org/request/show/523370
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=37
2017-09-12 17:56:07 +00:00
9e9fc2359a Accepting request 479042 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/479042
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=36
2017-03-16 08:41:47 +00:00
f783a08ce7 Accepting request 477254 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/477254
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=35
2017-03-12 19:01:49 +00:00
95c27c2348 Accepting request 460303 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/460303
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=34
2017-03-02 18:30:12 +00:00
1d7f0a7f70 Accepting request 452043 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/452043
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=33
2017-01-24 09:42:58 +00:00
81acd45fdf Accepting request 445795 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/445795
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=32
2017-01-21 23:26:12 +00:00
ab14e844b6 Accepting request 445076 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/445076
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=31
2016-12-10 17:29:58 +00:00
0f04f406b8 Accepting request 440711 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/440711
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=30
2016-11-18 21:01:48 +00:00
64856189e6 Accepting request 439242 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/439242
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=29
2016-11-12 12:02:31 +00:00
aca7aa8b6a Accepting request 429511 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/429511
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=28
2016-10-01 22:07:20 +00:00
205b8307c2 Accepting request 401664 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/401664
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=27
2016-06-14 21:08:41 +00:00
60a6dbc83d Accepting request 394743 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/394743
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=26
2016-05-14 10:23:29 +00:00
cc978c570e Accepting request 378315 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/378315
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=25
2016-03-26 14:27:12 +00:00
ad1328957f Accepting request 338802 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/338802
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=24
2015-10-19 20:51:16 +00:00
Stephan Kulow
dc3424e990 Accepting request 315241 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/315241
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=23
2015-07-14 15:43:06 +00:00
4e2670406e Accepting request 308957 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/308957
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=22
2015-06-01 07:51:22 +00:00
cdf9171a36 Accepting request 305308 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/305308
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=21
2015-05-06 05:49:01 +00:00
aa1e646265 Accepting request 295726 from Cloud:Tools
New upstream release (forwarded request 295648 from tbechtold)

OBS-URL: https://build.opensuse.org/request/show/295726
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=20
2015-04-13 18:31:47 +00:00
7cfbd29a31 Accepting request 287588 from Cloud:Tools
- Fix (bnc#919305 & bnc#918952)
  - Properly handle persistent network device names for OpenNebula 
    + add dataSourceOpenNebula.patch
  - Properly set up network mode if interface config file 
    + modified suseIntegratedHandler.patch

OBS-URL: https://build.opensuse.org/request/show/287588
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=19
2015-02-27 09:59:05 +00:00
5693821dbb Accepting request 285781 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/285781
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=18
2015-02-13 07:35:22 +00:00
68acaf254d Accepting request 283920 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/283920
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=17
2015-02-04 08:32:09 +00:00
84a6d9d4cc Accepting request 263690 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/263690
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=16
2014-12-03 21:47:59 +00:00
Stephan Kulow
fbb9e17899 Accepting request 245117 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/245117
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=14
2014-08-27 14:53:10 +00:00
0b8569a353 Accepting request 244242 from Cloud:Tools
1

OBS-URL: https://build.opensuse.org/request/show/244242
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=13
2014-08-13 06:49:08 +00:00
Stephan Kulow
0e265ccf0d Accepting request 239820 from Cloud:Tools
- fix "typo" the rhel_util module is imported as rhutil, use the
  proper name when accessing (modifies suseIntegratedHandler.patch)

- add rsyslog filter rule to send cloud-init messages to
  /var/log/cloud-init.log

- initialize variable in method setting the instance hostname (BNC #884392)
  modifies: suseIntegratedHandler.patch

- add the python magic for package build on SLE 11

- add more dependencies to ensure commands used by the scripts are present
- add dynamicInitCmd.diff
  + support diffirent init systems across distribution versions for
    service restart
- add suseSetInitCmd.patch
  + properly setup the init command to support proper service restart

- integrate openSUSE and SLE handler code
  + remove openSUSEHandler.diff
  + add suseIntegratedHandler.patch

OBS-URL: https://build.opensuse.org/request/show/239820
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=12
2014-07-10 12:55:23 +00:00
Stephan Kulow
c4fe0e3c05 Accepting request 230970 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/230970
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=11
2014-06-04 16:39:02 +00:00
Stephan Kulow
6554f0e50b Accepting request 228217 from Cloud:Tools
- fix implementation of the openSUSE handler, properly read the configuration
  from sysconfig

- do not package any none SUSE/openSUSE templates bnc#839707
- add patch openSUSEhostsTemplate.diff to add an openSUSE hosts template

- enable growing of root partition by default bnc#861473

- include the LICENSE

- include in SLE 12 (FATE #315990, #315991, and 316167)
- add patch azure_1269626.diff, fix for upstream bug 1269626
  + Azure instance do not boot properly after a capture operation

- add dependency on growpart to support root partition expansion

OBS-URL: https://build.opensuse.org/request/show/228217
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=10
2014-04-08 11:01:38 +00:00
Stephan Kulow
f91df56437 Accepting request 215317 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/215317
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=9
2014-01-30 13:54:04 +00:00
Stephan Kulow
193aae788d Accepting request 213608 from Cloud:Tools
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/213608
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=8
2014-01-13 12:49:30 +00:00
Stephan Kulow
a3dddb319c Accepting request 185659 from Cloud:Tools
- remove the "nofail" option for the ephemeral storage
  + when using nofail an attempt is made to mount the filesystem twice
    once via udev and once through localfs, this results in a hanging
    system if fsck needs to run on the device

OBS-URL: https://build.opensuse.org/request/show/185659
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=6
2013-08-04 14:48:15 +00:00
19 changed files with 2461 additions and 1268 deletions

BIN
cloud-init-23.3.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
cloud-init-25.1.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,54 +0,0 @@
--- tests/unittests/test_ds_identify.py.orig
+++ tests/unittests/test_ds_identify.py
@@ -1488,7 +1488,6 @@ VALID_CFG = {
},
"IBMCloud-metadata": {
"ds": "IBMCloud",
- "policy_dmi": POLICY_FOUND_ONLY,
"mocks": [
MOCK_VIRT_IS_XEN,
{"name": "is_ibm_provisioning", "ret": shell_false},
@@ -1555,7 +1554,6 @@ VALID_CFG = {
},
"IBMCloud-nodisks": {
"ds": "IBMCloud",
- "policy_dmi": POLICY_FOUND_ONLY,
"mocks": [
MOCK_VIRT_IS_XEN,
{"name": "is_ibm_provisioning", "ret": shell_false},
@@ -1642,7 +1640,6 @@ VALID_CFG = {
},
"VMware-NoValidTransports": {
"ds": "VMware",
- "policy_dmi": POLICY_FOUND_ONLY,
"mocks": [
MOCK_VIRT_IS_VMWARE,
],
@@ -1665,7 +1662,6 @@ VALID_CFG = {
},
"VMware-EnvVar-NoData": {
"ds": "VMware",
- "policy_dmi": POLICY_FOUND_ONLY,
"mocks": [
{
"name": "vmware_has_envvar_vmx_guestinfo",
@@ -1775,7 +1771,6 @@ VALID_CFG = {
},
"VMware-GuestInfo-NoData": {
"ds": "VMware",
- "policy_dmi": POLICY_FOUND_ONLY,
"mocks": [
{
"name": "vmware_has_rpctool",
--- tools/ds-identify.orig
+++ tools/ds-identify
@@ -739,9 +739,6 @@ probe_floppy() {
dscheck_CloudStack() {
is_container && return ${DS_NOT_FOUND}
dmi_product_name_matches "CloudStack*" && return $DS_FOUND
- if [ "$DI_VIRT" = "vmware" ] || [ "$DI_VIRT" = "xen" ]; then
- return $DS_MAYBE
- fi
return $DS_NOT_FOUND
}

View File

@@ -1,11 +0,0 @@
--- tools/run-lint.orig
+++ tools/run-lint
@@ -11,7 +11,7 @@ else
files=( "$@" )
fi
-cmd=( "python3" -m "ruff" "${files[@]}" )
+cmd=( "python3" -m "flake8" "${files[@]}" )
echo "Running: " "${cmd[@]}" 1>&2
exec "${cmd[@]}"

553
cloud-init-lint-fix.patch Normal file
View File

@@ -0,0 +1,553 @@
--- cloudinit/cmd/main.py.orig
+++ cloudinit/cmd/main.py
@@ -684,7 +684,7 @@ def di_report_warn(datasource, cfg):
# where Name is the thing that shows up in datasource_list.
modname = datasource.__module__.rpartition(".")[2]
if modname.startswith(sources.DS_PREFIX):
- modname = modname[len(sources.DS_PREFIX) :]
+ modname = modname[len(sources.DS_PREFIX):]
else:
LOG.warning(
"Datasource '%s' came from unexpected module '%s'.",
--- cloudinit/config/cc_apt_configure.py.orig
+++ cloudinit/config/cc_apt_configure.py
@@ -270,7 +270,7 @@ def mirrorurl_to_apt_fileprefix(mirror):
string = string[0:-1]
pos = string.find("://")
if pos >= 0:
- string = string[pos + 3 :]
+ string = string[pos + 3:]
string = string.replace("/", "_")
return string
--- cloudinit/config/cc_mounts.py.orig
+++ cloudinit/config/cc_mounts.py
@@ -414,7 +414,7 @@ def sanitize_mounts_configuration(
updated_line[index] = str(updated_line[index])
# fill remaining values with defaults from defvals above
- updated_line += default_fields[len(updated_line) :]
+ updated_line += default_fields[len(updated_line):]
updated_lines.append(updated_line)
return updated_lines
--- cloudinit/config/cc_ssh_authkey_fingerprints.py.orig
+++ cloudinit/config/cc_ssh_authkey_fingerprints.py
@@ -31,7 +31,7 @@ LOG = logging.getLogger(__name__)
def _split_hash(bin_hash):
split_up = []
for i in range(0, len(bin_hash), 2):
- split_up.append(bin_hash[i : i + 2])
+ split_up.append(bin_hash[i:i + 2])
return split_up
--- cloudinit/config/modules.py.orig
+++ cloudinit/config/modules.py
@@ -57,7 +57,7 @@ class ModuleDetails(NamedTuple):
def form_module_name(name):
canon_name = name.replace("-", "_")
if canon_name.lower().endswith(".py"):
- canon_name = canon_name[0 : (len(canon_name) - 3)]
+ canon_name = canon_name[0:(len(canon_name) - 3)]
canon_name = canon_name.strip()
if not canon_name:
return None
--- cloudinit/distros/parsers/ifconfig.py.orig
+++ cloudinit/distros/parsers/ifconfig.py
@@ -143,7 +143,7 @@ class Ifconfig:
dev.index = int(toks[1])
if toks[0] == "description:":
- dev.description = line[line.index(":") + 2 :]
+ dev.description = line[line.index(":") + 2:]
if (
toks[0].startswith("options=")
@@ -168,7 +168,7 @@ class Ifconfig:
dev.groups += toks[1:]
if toks[0] == "media:":
- dev.media = line[line.index(": ") + 2 :]
+ dev.media = line[line.index(": ") + 2:]
if toks[0] == "nd6":
nd6_opts = re.split(r"<|>", toks[0])
--- cloudinit/net/dhcp.py.orig
+++ cloudinit/net/dhcp.py
@@ -495,24 +495,24 @@ class IscDhclient(DhcpClient):
if len(tokens[idx:]) < req_toks:
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
- net_address = ".".join(tokens[idx + 1 : idx + 5])
- gateway = ".".join(tokens[idx + 5 : idx + req_toks])
+ net_address = ".".join(tokens[idx + 1:idx + 5])
+ gateway = ".".join(tokens[idx + 5:idx + req_toks])
current_idx = idx + req_toks
elif net_length in range(17, 25):
req_toks = 8
if len(tokens[idx:]) < req_toks:
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
- net_address = ".".join(tokens[idx + 1 : idx + 4] + ["0"])
- gateway = ".".join(tokens[idx + 4 : idx + req_toks])
+ net_address = ".".join(tokens[idx + 1:idx + 4] + ["0"])
+ gateway = ".".join(tokens[idx + 4:idx + req_toks])
current_idx = idx + req_toks
elif net_length in range(9, 17):
req_toks = 7
if len(tokens[idx:]) < req_toks:
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
- net_address = ".".join(tokens[idx + 1 : idx + 3] + ["0", "0"])
- gateway = ".".join(tokens[idx + 3 : idx + req_toks])
+ net_address = ".".join(tokens[idx + 1:idx + 3] + ["0", "0"])
+ gateway = ".".join(tokens[idx + 3:idx + req_toks])
current_idx = idx + req_toks
elif net_length in range(1, 9):
req_toks = 6
@@ -520,9 +520,9 @@ class IscDhclient(DhcpClient):
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
net_address = ".".join(
- tokens[idx + 1 : idx + 2] + ["0", "0", "0"]
+ tokens[idx + 1:idx + 2] + ["0", "0", "0"]
)
- gateway = ".".join(tokens[idx + 2 : idx + req_toks])
+ gateway = ".".join(tokens[idx + 2:idx + req_toks])
current_idx = idx + req_toks
elif net_length == 0:
req_toks = 5
@@ -530,7 +530,7 @@ class IscDhclient(DhcpClient):
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
net_address = "0.0.0.0"
- gateway = ".".join(tokens[idx + 1 : idx + req_toks])
+ gateway = ".".join(tokens[idx + 1:idx + req_toks])
current_idx = idx + req_toks
else:
LOG.error(
@@ -767,7 +767,7 @@ class Dhcpcd(DhcpClient):
while len(data) >= index + 2:
code = data[index]
length = data[1 + index]
- option = data[2 + index : 2 + index + length]
+ option = data[2 + index:2 + index + length]
yield code, option
index = 2 + length + index
--- cloudinit/net/network_manager.py.orig
+++ cloudinit/net/network_manager.py
@@ -175,7 +175,8 @@ class NMConnection:
self.config[family]["method"] = method
# Network Manager sets the value of `may-fail` to `True` by default.
- # Please see https://www.networkmanager.dev/docs/api/1.32.10/settings-ipv6.html.
+ # Please see
+ # https://www.networkmanager.dev/docs/api/1.32.10/settings-ipv6.html.
# Therefore, when no configuration for ipv4 or ipv6 is specified,
# `may-fail = True` applies. When the user explicitly configures ipv4
# or ipv6, `may-fail` is set to `False`. This is so because it is
--- cloudinit/reporting/handlers.py.orig
+++ cloudinit/reporting/handlers.py
@@ -295,13 +295,13 @@ class HyperVKvpReportingHandler(Reportin
)
)
k = (
- record_data[0 : self.HV_KVP_EXCHANGE_MAX_KEY_SIZE]
+ record_data[0:self.HV_KVP_EXCHANGE_MAX_KEY_SIZE]
.decode("utf-8")
.strip("\x00")
)
v = (
record_data[
- self.HV_KVP_EXCHANGE_MAX_KEY_SIZE : self.HV_KVP_RECORD_SIZE
+ self.HV_KVP_EXCHANGE_MAX_KEY_SIZE:self.HV_KVP_RECORD_SIZE
]
.decode("utf-8")
.strip("\x00")
@@ -322,7 +322,7 @@ class HyperVKvpReportingHandler(Reportin
def _break_down(self, key, meta_data, description):
del meta_data[self.MSG_KEY]
des_in_json = json.dumps(description)
- des_in_json = des_in_json[1 : (len(des_in_json) - 1)]
+ des_in_json = des_in_json[1:(len(des_in_json) - 1)]
i = 0
result_array = []
message_place_holder = '"' + self.MSG_KEY + '":""'
@@ -355,7 +355,7 @@ class HyperVKvpReportingHandler(Reportin
Values will be truncated as needed.
"""
if len(value) >= self.HV_KVP_AZURE_MAX_VALUE_SIZE:
- value = value[0 : self.HV_KVP_AZURE_MAX_VALUE_SIZE - 1]
+ value = value[0:self.HV_KVP_AZURE_MAX_VALUE_SIZE - 1]
data = [self._encode_kvp_item(key, value)]
--- cloudinit/sources/__init__.py.orig
+++ cloudinit/sources/__init__.py
@@ -789,7 +789,7 @@ class DataSource(CloudInitPickleMixin, m
if not short_name.startswith(nfrom):
continue
for nto in tlist:
- cand = "/dev/%s%s" % (nto, short_name[len(nfrom) :])
+ cand = "/dev/%s%s" % (nto, short_name[len(nfrom):])
if os.path.exists(cand):
return cand
return None
--- cloudinit/sources/helpers/azure.py.orig
+++ cloudinit/sources/helpers/azure.py
@@ -492,7 +492,7 @@ class OpenSSLManager:
"""
raw_fp = self._run_x509_action("-fingerprint", certificate)
eq = raw_fp.find("=")
- octets = raw_fp[eq + 1 : -1].split(":")
+ octets = raw_fp[eq + 1:-1].split(":")
return "".join(octets)
@azure_ds_telemetry_reporter
--- cloudinit/sources/helpers/netlink.py.orig
+++ cloudinit/sources/helpers/netlink.py
@@ -146,7 +146,7 @@ def unpack_rta_attr(data, offset):
return None # Should mean our offset is >= remaining data
# Unpack just the attribute's data. Offset by 4 to skip length/type header
- attr_data = data[offset + RTA_DATA_START_OFFSET : offset + length]
+ attr_data = data[offset + RTA_DATA_START_OFFSET:offset + length]
return RTAAttr(length, rta_type, attr_data)
--- cloudinit/ssh_util.py.orig
+++ cloudinit/ssh_util.py
@@ -659,7 +659,7 @@ def get_opensshd_version():
prefix = "OpenSSH_"
for line in err.split("\n"):
if line.startswith(prefix):
- return line[len(prefix) : line.find(",")]
+ return line[len(prefix):line.find(",")]
return None
--- cloudinit/user_data.py.orig
+++ cloudinit/user_data.py
@@ -210,13 +210,13 @@ class UserDataProcessor:
for line in content.splitlines():
lc_line = line.lower()
if lc_line.startswith("#include-once"):
- line = line[len("#include-once") :].lstrip()
+ line = line[len("#include-once"):].lstrip()
# Every following include will now
# not be refetched.... but will be
# re-read from a local urlcache (if it worked)
include_once_on = True
elif lc_line.startswith("#include"):
- line = line[len("#include") :].lstrip()
+ line = line[len("#include"):].lstrip()
# Disable the include once if it was on
# if it wasn't, then this has no effect.
include_once_on = False
--- cloudinit/util.py.orig
+++ cloudinit/util.py
@@ -585,7 +585,7 @@ def get_linux_distro():
dist = ("", "", "")
try:
# Was removed in 3.8
- dist = platform.dist() # type: ignore # pylint: disable=W1505,E1101
+ dist = platform.dist() # type: ignore pylint: disable=W1505,E1101
except Exception:
pass
finally:
@@ -1172,7 +1172,7 @@ def read_cc_from_cmdline(cmdline=None):
if end < 0:
end = clen
tokens.append(
- parse.unquote(cmdline[begin + begin_l : end].lstrip()).replace(
+ parse.unquote(cmdline[begin + begin_l:end].lstrip()).replace(
"\\n", "\n"
)
)
@@ -1744,7 +1744,7 @@ def get_output_cfg(
found = False
for s in swlist:
if val.startswith(s):
- val = "%s %s" % (s, val[len(s) :].strip())
+ val = "%s %s" % (s, val[len(s):].strip())
found = True
break
if not found:
@@ -2360,7 +2360,7 @@ def shellify(cmdlist, add_header=True):
def strip_prefix_suffix(line, prefix=None, suffix=None):
if prefix and line.startswith(prefix):
- line = line[len(prefix) :]
+ line = line[len(prefix):]
if suffix and line.endswith(suffix):
line = line[: -len(suffix)]
return line
@@ -2869,7 +2869,7 @@ def human2bytes(size):
for m in mpliers:
if size.endswith(m):
mplier = m
- num = size[0 : -len(m)]
+ num = size[0:-len(m)]
try:
num = float(num)
@@ -2947,12 +2947,12 @@ def rootdev_from_cmdline(cmdline):
if found.startswith("/dev/"):
return found
if found.startswith("LABEL="):
- return "/dev/disk/by-label/" + found[len("LABEL=") :]
+ return "/dev/disk/by-label/" + found[len("LABEL="):]
if found.startswith("UUID="):
- return "/dev/disk/by-uuid/" + found[len("UUID=") :].lower()
+ return "/dev/disk/by-uuid/" + found[len("UUID="):].lower()
if found.startswith("PARTUUID="):
disks_path = (
- "/dev/disk/by-partuuid/" + found[len("PARTUUID=") :].lower()
+ "/dev/disk/by-partuuid/" + found[len("PARTUUID="):].lower()
)
if os.path.exists(disks_path):
return disks_path
--- setup.py.orig
+++ setup.py
@@ -194,7 +194,7 @@ elif os.path.isfile("/etc/system-release
else:
# String formatted CPE
inc = 1
- (cpe_vendor, cpe_product, cpe_version) = cpe_data[2 + inc : 5 + inc]
+ (cpe_vendor, cpe_product, cpe_version) = cpe_data[2 + inc:5 + inc]
if cpe_vendor == "amazon":
USR_LIB_EXEC = "usr/libexec"
--- tests/integration_tests/conftest.py.orig
+++ tests/integration_tests/conftest.py
@@ -501,6 +501,7 @@ def pytest_sessionstart(session) -> None
def pytest_sessionfinish(session, exitstatus) -> None:
"""do session teardown"""
+ global _SESSION_CLOUD
global REAPER
log.info("finishing session")
try:
--- tests/integration_tests/dropins/test_custom_modules.py.orig
+++ tests/integration_tests/dropins/test_custom_modules.py
@@ -20,7 +20,7 @@ def test_custom_module_24_1(client: Inte
"""
client.push_file(
ASSETS_DIR / "dropins/cc_custom_module_24_1.py",
- "/usr/lib/python3/dist-packages/cloudinit/config/cc_custom_module_24_1.py",
+ "/usr/lib/python3/dist-packages/cloudinit/config/cc_custom_module_24_1.py", # noqa: E501
)
output = client.execute("cloud-init single --name cc_custom_module_24_1")
if releases.CURRENT_RELEASE >= releases.PLUCKY:
--- tests/unittests/config/test_apt_source_v3.py.orig
+++ tests/unittests/config/test_apt_source_v3.py
@@ -1,4 +1,5 @@
# This file is part of cloud-init. See LICENSE file for license information.
+# flake8: noqa
# pylint: disable=attribute-defined-outside-init
"""test_handler_apt_source_v3
@@ -1429,7 +1430,6 @@ Suites: mantic-backports
Components: main
"""
-
DEB822_DISABLED_SINGLE_SUITE = """\
## Entry disabled by cloud-init, due to disable_suites
# disabled by cloud-init: Types: deb
@@ -1446,7 +1446,6 @@ DEB822_DISABLED_MULTIPLE_SUITES = """\
# disabled by cloud-init: Components: main
"""
-
class TestDisableSuitesDeb822:
@pytest.mark.parametrize(
"disabled_suites,src,expected",
--- tests/unittests/config/test_cc_apt_configure.py.orig
+++ tests/unittests/config/test_cc_apt_configure.py
@@ -293,7 +293,7 @@ class TestAptConfigure:
cc_apt.UBUNTU_DEFAULT_APT_SOURCES_LIST,
"ubuntu",
cc_apt.UBUNTU_DEFAULT_APT_SOURCES_LIST,
- id="ubuntu_no_warning_when_existig_sources_list_content_allowed",
+ id="ubuntu_no_warning_when_existig_sources_list_content_allowed", # noqa: E501
),
),
)
--- tests/unittests/config/test_cc_yum_add_repo.py.orig
+++ tests/unittests/config/test_cc_yum_add_repo.py
@@ -90,7 +90,7 @@ class TestConfig(helpers.FilesystemMocki
"yum_repos": {
"epel-testing": {
"name": "Extra Packages for Enterprise Linux 5 - Testing",
- "mirrorlist": "http://mirrors.blah.org/metalink?repo=rhel-$releasever",
+ "mirrorlist": "http://mirrors.blah.org/metalink?repo=rhel-$releasever", # noqa: E501
"enabled": False,
"gpgcheck": True,
"gpgkey": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL",
@@ -110,7 +110,7 @@ class TestConfig(helpers.FilesystemMocki
"failovermethod": "priority",
"gpgkey": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL",
"enabled": "0",
- "mirrorlist": "http://mirrors.blah.org/metalink?repo=rhel-$releasever",
+ "mirrorlist": "http://mirrors.blah.org/metalink?repo=rhel-$releasever", # noqa: E501
"gpgcheck": "1",
}
}
--- tests/unittests/config/test_schema.py.orig
+++ tests/unittests/config/test_schema.py
@@ -1293,7 +1293,7 @@ class TestMain:
"vd2_key": "vendor2_cloud_config",
"net_key": "network_config",
},
- id="prefer_processed_vd_file_path_when_raw_and_processed_empty",
+ id="prefer_processed_vd_file_path_when_raw_and_processed_empty", # noqa: E501
),
),
)
@@ -2047,7 +2047,7 @@ apt_reboot_if_required: Deprecated in ve
Valid schema {cfg_file}
""" # noqa: E501
),
- id="test_deprecation_info_boundary_does_unannotated_unredacted",
+ id="test_deprecation_info_boundary_does_unannotated_unredacted", # noqa: E501
),
],
)
--- tests/unittests/distros/test_create_users.py.orig
+++ tests/unittests/distros/test_create_users.py
@@ -260,7 +260,7 @@ class TestCreateUser:
"ubuntu",
True,
["Not unlocking blank password for existing user foo_user."],
- id="no_unlock_in_snappy_on_locked_empty_user_passwd_in_extrausers",
+ id="no_unlock_in_snappy_on_locked_empty_user_passwd_in_extrausers", # noqa: E501
),
pytest.param(
{"/etc/shadow": f"dnsmasq::\n{USER}::"},
@@ -281,14 +281,14 @@ class TestCreateUser:
"dragonflybsd",
False,
["Not unlocking blank password for existing user foo_user."],
- id="no_unlock_on_locked_format1_empty_user_passwd_dragonflybsd",
+ id="no_unlock_on_locked_format1_empty_user_passwd_dragonflybsd", # noqa: E501
),
pytest.param(
{"/etc/master.passwd": f"dnsmasq::\n{USER}:*LOCKED*:"},
"dragonflybsd",
False,
["Not unlocking blank password for existing user foo_user."],
- id="no_unlock_on_locked_format2_empty_user_passwd_dragonflybsd",
+ id="no_unlock_on_locked_format2_empty_user_passwd_dragonflybsd", # noqa: E501
),
pytest.param(
{"/etc/master.passwd": f"dnsmasq::\n{USER}::"},
--- tests/unittests/helpers.py.orig
+++ tests/unittests/helpers.py
@@ -315,7 +315,7 @@ class FilesystemMockingTestCase(Resource
real_root = os.path.join(real_root, "roots", example_root)
for dir_path, _dirnames, filenames in os.walk(real_root):
real_path = dir_path
- make_path = rebase_path(real_path[len(real_root) :], target_root)
+ make_path = rebase_path(real_path[len(real_root):], target_root)
util.ensure_dir(make_path)
for f in filenames:
real_path = os.path.abspath(os.path.join(real_path, f))
@@ -541,7 +541,7 @@ def dir2dict(startdir, prefix=None):
for root, _dirs, files in os.walk(startdir):
for fname in files:
fpath = os.path.join(root, fname)
- key = fpath[len(prefix) :]
+ key = fpath[len(prefix):]
flist[key] = util.load_text_file(fpath)
return flist
--- tests/unittests/sources/test_akamai.py.orig
+++ tests/unittests/sources/test_akamai.py
@@ -278,7 +278,7 @@ class TestDataSourceAkamai:
(
False,
"H4sIAAAAAAACAytJLS7hAgDGNbk7BQAAAA==",
- b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\x03+I-.\xe1\x02\x00\xc65\xb9;\x05\x00\x00\x00",
+ b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\x03+I-.\xe1\x02\x00\xc65\xb9;\x05\x00\x00\x00", # noqa: E501
"base64-encoded gzipped data",
),
(
--- tests/unittests/sources/test_configdrive.py.orig
+++ tests/unittests/sources/test_configdrive.py
@@ -412,7 +412,7 @@ class TestConfigDriveDataSource(CiTestCa
}
for name, dev_name in name_tests.items():
with ExitStack() as mocks:
- provided_name = dev_name[len("/dev/") :]
+ provided_name = dev_name[len("/dev/"):]
provided_name = "s" + provided_name[1:]
find_mock = mocks.enter_context(
mock.patch.object(
--- tests/unittests/sources/test_hetzner.py.orig
+++ tests/unittests/sources/test_hetzner.py
@@ -109,7 +109,8 @@ class TestDataSourceHetzner(CiTestCase):
iface="eth0",
connectivity_urls_data=[
{
- "url": "http://169.254.169.254/hetzner/v1/metadata/instance-id"
+ "url":
+ "http://169.254.169.254/hetzner/v1/metadata/instance-id"
}
],
)
--- tests/unittests/sources/test_maas.py.orig
+++ tests/unittests/sources/test_maas.py
@@ -113,7 +113,7 @@ class TestMAASDataSource:
if not url.startswith(prefix):
raise ValueError("unexpected call %s" % url)
- short = url[len(prefix) :]
+ short = url[len(prefix):]
if short not in data:
raise url_helper.UrlError("not found", code=404, url=url)
return url_helper.StringResponse(data[short], url)
--- tests/unittests/sources/test_smartos.py.orig
+++ tests/unittests/sources/test_smartos.py
@@ -792,7 +792,7 @@ class ShortReader:
rsize = next_null - self.index + 1
i = self.index
self.index += rsize
- ret = self.data[i : i + rsize]
+ ret = self.data[i:i + rsize]
if len(ret) and ret[-1:] == self.endbyte:
ret = ret[:-1]
return ret
--- tests/unittests/test_url_helper.py.orig
+++ tests/unittests/test_url_helper.py
@@ -324,7 +324,7 @@ class TestReadUrl:
expected_headers["User-Agent"] = "Cloud-Init/%s" % (
version.version_string()
)
- headers_cb = lambda _: headers
+ headers_cb = lambda _: headers # noqa: E731
class FakeSession(requests.Session):
@classmethod
--- tests/unittests/test_util.py.orig
+++ tests/unittests/test_util.py
@@ -3334,7 +3334,7 @@ class TestLogExc:
def test_logexc(self, caplog):
try:
_ = 1 / 0
- except Exception as _:
+ except Exception as _: # noqa: F841
util.logexc(LOG, "an error occurred")
assert caplog.record_tuples == [
@@ -3353,7 +3353,7 @@ class TestLogExc:
def test_logexc_with_log_level(self, caplog, log_level):
try:
_ = 1 / 0
- except Exception as _:
+ except Exception as _: # noqa: F841
util.logexc(LOG, "an error occurred", log_level=log_level)
assert caplog.record_tuples == [

View File

@@ -1,412 +0,0 @@
--- cloudinit/cmd/main.py.orig
+++ cloudinit/cmd/main.py
@@ -28,26 +28,27 @@ from cloudinit.config.modules import Mod
patcher.patch_logging()
-from cloudinit.config.schema import validate_cloudconfig_schema
-from cloudinit import log as logging
-from cloudinit import netinfo
-from cloudinit import signal_handler
-from cloudinit import sources
-from cloudinit import stages
-from cloudinit import url_helper
-from cloudinit import util
-from cloudinit import version
-from cloudinit import warnings
-
-from cloudinit import reporting
-from cloudinit.reporting import events
+from cloudinit.config.schema import validate_cloudconfig_schema # noqa: E402
+from cloudinit import log as logging # noqa: E402
+from cloudinit import netinfo # noqa: E402
+from cloudinit import signal_handler # noqa: E402
+from cloudinit import sources # noqa: E402
+from cloudinit import stages # noqa: E402
+from cloudinit import url_helper # noqa: E402
+from cloudinit import util # noqa: E402
+from cloudinit import version # noqa: E402
+from cloudinit import warnings # noqa: E402
+
+from cloudinit import reporting # noqa: E402
+from cloudinit.reporting import events # noqa: E402
-from cloudinit.settings import PER_INSTANCE, PER_ALWAYS, PER_ONCE, CLOUD_CONFIG
+from cloudinit.settings import ( # noqa: E402
+ PER_INSTANCE, PER_ALWAYS, PER_ONCE, CLOUD_CONFIG) # noqa: E402
-from cloudinit import atomic_helper
+from cloudinit import atomic_helper # noqa: E402
-from cloudinit.config import cc_set_hostname
-from cloudinit.cmd.devel import read_cfg_paths
+from cloudinit.config import cc_set_hostname # noqa: E402
+from cloudinit.cmd.devel import read_cfg_paths # noqa: E402
# Welcome message template
@@ -538,7 +539,7 @@ def di_report_warn(datasource, cfg):
# where Name is the thing that shows up in datasource_list.
modname = datasource.__module__.rpartition(".")[2]
if modname.startswith(sources.DS_PREFIX):
- modname = modname[len(sources.DS_PREFIX) :]
+ modname = modname[len(sources.DS_PREFIX):]
else:
LOG.warning(
"Datasource '%s' came from unexpected module '%s'.",
--- cloudinit/config/cc_apt_configure.py.orig
+++ cloudinit/config/cc_apt_configure.py
@@ -354,7 +354,7 @@ def mirrorurl_to_apt_fileprefix(mirror):
string = string[0:-1]
pos = string.find("://")
if pos >= 0:
- string = string[pos + 3 :]
+ string = string[pos + 3:]
string = string.replace("/", "_")
return string
--- cloudinit/config/cc_ssh_authkey_fingerprints.py.orig
+++ cloudinit/config/cc_ssh_authkey_fingerprints.py
@@ -44,7 +44,7 @@ LOG = logging.getLogger(__name__)
def _split_hash(bin_hash):
split_up = []
for i in range(0, len(bin_hash), 2):
- split_up.append(bin_hash[i : i + 2])
+ split_up.append(bin_hash[i: i + 2])
return split_up
--- cloudinit/config/modules.py.orig
+++ cloudinit/config/modules.py
@@ -39,7 +39,7 @@ class ModuleDetails(NamedTuple):
def form_module_name(name):
canon_name = name.replace("-", "_")
if canon_name.lower().endswith(".py"):
- canon_name = canon_name[0 : (len(canon_name) - 3)]
+ canon_name = canon_name[0: (len(canon_name) - 3)]
canon_name = canon_name.strip()
if not canon_name:
return None
--- cloudinit/distros/parsers/ifconfig.py.orig
+++ cloudinit/distros/parsers/ifconfig.py
@@ -140,7 +140,7 @@ class Ifconfig:
dev.index = int(toks[1])
if toks[0] == "description:":
- dev.description = line[line.index(":") + 2 :]
+ dev.description = line[line.index(":") + 2:]
if (
toks[0].startswith("options=")
@@ -165,7 +165,7 @@ class Ifconfig:
dev.groups += toks[1:]
if toks[0] == "media:":
- dev.media = line[line.index(": ") + 2 :]
+ dev.media = line[line.index(": ") + 2:]
if toks[0] == "nd6":
nd6_opts = re.split(r"<|>", toks[0])
--- cloudinit/net/dhcp.py.orig
+++ cloudinit/net/dhcp.py
@@ -415,24 +415,24 @@ class IscDhclient(DhcpClient):
if len(tokens[idx:]) < req_toks:
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
- net_address = ".".join(tokens[idx + 1 : idx + 5])
- gateway = ".".join(tokens[idx + 5 : idx + req_toks])
+ net_address = ".".join(tokens[idx + 1: idx + 5])
+ gateway = ".".join(tokens[idx + 5: idx + req_toks])
current_idx = idx + req_toks
elif net_length in range(17, 25):
req_toks = 8
if len(tokens[idx:]) < req_toks:
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
- net_address = ".".join(tokens[idx + 1 : idx + 4] + ["0"])
- gateway = ".".join(tokens[idx + 4 : idx + req_toks])
+ net_address = ".".join(tokens[idx + 1: idx + 4] + ["0"])
+ gateway = ".".join(tokens[idx + 4: idx + req_toks])
current_idx = idx + req_toks
elif net_length in range(9, 17):
req_toks = 7
if len(tokens[idx:]) < req_toks:
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
- net_address = ".".join(tokens[idx + 1 : idx + 3] + ["0", "0"])
- gateway = ".".join(tokens[idx + 3 : idx + req_toks])
+ net_address = ".".join(tokens[idx + 1: idx + 3] + ["0", "0"])
+ gateway = ".".join(tokens[idx + 3: idx + req_toks])
current_idx = idx + req_toks
elif net_length in range(1, 9):
req_toks = 6
@@ -440,9 +440,9 @@ class IscDhclient(DhcpClient):
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
net_address = ".".join(
- tokens[idx + 1 : idx + 2] + ["0", "0", "0"]
+ tokens[idx + 1: idx + 2] + ["0", "0", "0"]
)
- gateway = ".".join(tokens[idx + 2 : idx + req_toks])
+ gateway = ".".join(tokens[idx + 2: idx + req_toks])
current_idx = idx + req_toks
elif net_length == 0:
req_toks = 5
@@ -450,7 +450,7 @@ class IscDhclient(DhcpClient):
_trunc_error(net_length, req_toks, len(tokens[idx:]))
return static_routes
net_address = "0.0.0.0"
- gateway = ".".join(tokens[idx + 1 : idx + req_toks])
+ gateway = ".".join(tokens[idx + 1: idx + req_toks])
current_idx = idx + req_toks
else:
LOG.error(
--- cloudinit/net/network_state.py.orig
+++ cloudinit/net/network_state.py
@@ -135,7 +135,7 @@ class CommandHandlerMeta(type):
command_handlers = {}
for attr_name, attr in dct.items():
if callable(attr) and attr_name.startswith("handle_"):
- handles_what = attr_name[len("handle_") :]
+ handles_what = attr_name[len("handle_"):]
if handles_what:
command_handlers[handles_what] = attr
dct["command_handlers"] = command_handlers
--- cloudinit/reporting/handlers.py.orig
+++ cloudinit/reporting/handlers.py
@@ -295,13 +295,13 @@ class HyperVKvpReportingHandler(Reportin
)
)
k = (
- record_data[0 : self.HV_KVP_EXCHANGE_MAX_KEY_SIZE]
+ record_data[0: self.HV_KVP_EXCHANGE_MAX_KEY_SIZE]
.decode("utf-8")
.strip("\x00")
)
v = (
record_data[
- self.HV_KVP_EXCHANGE_MAX_KEY_SIZE : self.HV_KVP_RECORD_SIZE
+ self.HV_KVP_EXCHANGE_MAX_KEY_SIZE: self.HV_KVP_RECORD_SIZE
]
.decode("utf-8")
.strip("\x00")
@@ -320,7 +320,7 @@ class HyperVKvpReportingHandler(Reportin
def _break_down(self, key, meta_data, description):
del meta_data[self.MSG_KEY]
des_in_json = json.dumps(description)
- des_in_json = des_in_json[1 : (len(des_in_json) - 1)]
+ des_in_json = des_in_json[1: (len(des_in_json) - 1)]
i = 0
result_array = []
message_place_holder = '"' + self.MSG_KEY + '":""'
@@ -353,7 +353,7 @@ class HyperVKvpReportingHandler(Reportin
Values will be truncated as needed.
"""
if len(value) >= self.HV_KVP_AZURE_MAX_VALUE_SIZE:
- value = value[0 : self.HV_KVP_AZURE_MAX_VALUE_SIZE - 1]
+ value = value[0: self.HV_KVP_AZURE_MAX_VALUE_SIZE - 1]
data = [self._encode_kvp_item(key, value)]
--- cloudinit/sources/__init__.py.orig
+++ cloudinit/sources/__init__.py
@@ -747,7 +747,7 @@ class DataSource(CloudInitPickleMixin, m
if not short_name.startswith(nfrom):
continue
for nto in tlist:
- cand = "/dev/%s%s" % (nto, short_name[len(nfrom) :])
+ cand = "/dev/%s%s" % (nto, short_name[len(nfrom):])
if os.path.exists(cand):
return cand
return None
--- cloudinit/sources/helpers/azure.py.orig
+++ cloudinit/sources/helpers/azure.py
@@ -566,7 +566,7 @@ class OpenSSLManager:
"""
raw_fp = self._run_x509_action("-fingerprint", certificate)
eq = raw_fp.find("=")
- octets = raw_fp[eq + 1 : -1].split(":")
+ octets = raw_fp[eq + 1: -1].split(":")
return "".join(octets)
@azure_ds_telemetry_reporter
--- cloudinit/sources/helpers/netlink.py.orig
+++ cloudinit/sources/helpers/netlink.py
@@ -150,7 +150,7 @@ def unpack_rta_attr(data, offset):
return None # Should mean our offset is >= remaining data
# Unpack just the attribute's data. Offset by 4 to skip length/type header
- attr_data = data[offset + RTA_DATA_START_OFFSET : offset + length]
+ attr_data = data[offset + RTA_DATA_START_OFFSET: offset + length]
return RTAAttr(length, rta_type, attr_data)
--- cloudinit/ssh_util.py.orig
+++ cloudinit/ssh_util.py
@@ -659,7 +659,7 @@ def get_opensshd_version():
prefix = "OpenSSH_"
for line in err.split("\n"):
if line.startswith(prefix):
- return line[len(prefix) : line.find(",")]
+ return line[len(prefix): line.find(",")]
return None
--- cloudinit/url_helper.py.orig
+++ cloudinit/url_helper.py
@@ -73,7 +73,7 @@ def read_file_or_url(url, **kwargs) -> U
if url.lower().startswith("file://"):
if kwargs.get("data"):
LOG.warning("Unable to post data to file resource %s", url)
- file_path = url[len("file://") :]
+ file_path = url[len("file://"):]
try:
with open(file_path, "rb") as fp:
contents = fp.read()
--- cloudinit/user_data.py.orig
+++ cloudinit/user_data.py
@@ -211,13 +211,13 @@ class UserDataProcessor:
for line in content.splitlines():
lc_line = line.lower()
if lc_line.startswith("#include-once"):
- line = line[len("#include-once") :].lstrip()
+ line = line[len("#include-once"):].lstrip()
# Every following include will now
# not be refetched.... but will be
# re-read from a local urlcache (if it worked)
include_once_on = True
elif lc_line.startswith("#include"):
- line = line[len("#include") :].lstrip()
+ line = line[len("#include"):].lstrip()
# Disable the include once if it was on
# if it wasn't, then this has no effect.
include_once_on = False
--- cloudinit/util.py.orig
+++ cloudinit/util.py
@@ -1177,7 +1177,7 @@ def read_cc_from_cmdline(cmdline=None):
if end < 0:
end = clen
tokens.append(
- parse.unquote(cmdline[begin + begin_l : end].lstrip()).replace(
+ parse.unquote(cmdline[begin + begin_l: end].lstrip()).replace(
"\\n", "\n"
)
)
@@ -1724,7 +1724,7 @@ def get_output_cfg(cfg, mode):
found = False
for s in swlist:
if val.startswith(s):
- val = "%s %s" % (s, val[len(s) :].strip())
+ val = "%s %s" % (s, val[len(s):].strip())
found = True
break
if not found:
@@ -2362,7 +2362,7 @@ def shellify(cmdlist, add_header=True):
def strip_prefix_suffix(line, prefix=None, suffix=None):
if prefix and line.startswith(prefix):
- line = line[len(prefix) :]
+ line = line[len(prefix):]
if suffix and line.endswith(suffix):
line = line[: -len(suffix)]
return line
@@ -2942,7 +2942,7 @@ def human2bytes(size):
for m in mpliers:
if size.endswith(m):
mplier = m
- num = size[0 : -len(m)]
+ num = size[0: -len(m)]
try:
num = float(num)
@@ -3022,12 +3022,12 @@ def rootdev_from_cmdline(cmdline):
if found.startswith("/dev/"):
return found
if found.startswith("LABEL="):
- return "/dev/disk/by-label/" + found[len("LABEL=") :]
+ return "/dev/disk/by-label/" + found[len("LABEL="):]
if found.startswith("UUID="):
- return "/dev/disk/by-uuid/" + found[len("UUID=") :].lower()
+ return "/dev/disk/by-uuid/" + found[len("UUID="):].lower()
if found.startswith("PARTUUID="):
disks_path = (
- "/dev/disk/by-partuuid/" + found[len("PARTUUID=") :].lower()
+ "/dev/disk/by-partuuid/" + found[len("PARTUUID="):].lower()
)
if os.path.exists(disks_path):
return disks_path
--- setup.py.orig
+++ setup.py
@@ -187,7 +187,7 @@ elif os.path.isfile("/etc/system-release
else:
# String formatted CPE
inc = 1
- (cpe_vendor, cpe_product, cpe_version) = cpe_data[2 + inc : 5 + inc]
+ (cpe_vendor, cpe_product, cpe_version) = cpe_data[2 + inc: 5 + inc]
if cpe_vendor == "amazon":
USR_LIB_EXEC = "usr/libexec"
--- tests/unittests/helpers.py.orig
+++ tests/unittests/helpers.py
@@ -265,7 +265,7 @@ class FilesystemMockingTestCase(Resource
real_root = os.path.join(real_root, "roots", example_root)
for (dir_path, _dirnames, filenames) in os.walk(real_root):
real_path = dir_path
- make_path = rebase_path(real_path[len(real_root) :], target_root)
+ make_path = rebase_path(real_path[len(real_root):], target_root)
util.ensure_dir(make_path)
for f in filenames:
real_path = util.abs_join(real_path, f)
@@ -469,7 +469,7 @@ def dir2dict(startdir, prefix=None):
for root, _dirs, files in os.walk(startdir):
for fname in files:
fpath = os.path.join(root, fname)
- key = fpath[len(prefix) :]
+ key = fpath[len(prefix):]
flist[key] = util.load_file(fpath)
return flist
--- tests/unittests/reporting/test_reporting_hyperv.py.orig
+++ tests/unittests/reporting/test_reporting_hyperv.py
@@ -293,7 +293,7 @@ class TextKvpReporter(CiTestCase):
reporter,
2,
[
- log_content[-azure.MAX_LOG_TO_KVP_LENGTH :].encode(),
+ log_content[-azure.MAX_LOG_TO_KVP_LENGTH:].encode(),
extra_content.encode(),
],
)
--- tests/unittests/sources/test_configdrive.py.orig
+++ tests/unittests/sources/test_configdrive.py
@@ -412,7 +412,7 @@ class TestConfigDriveDataSource(CiTestCa
}
for name, dev_name in name_tests.items():
with ExitStack() as mocks:
- provided_name = dev_name[len("/dev/") :]
+ provided_name = dev_name[len("/dev/"):]
provided_name = "s" + provided_name[1:]
find_mock = mocks.enter_context(
mock.patch.object(
--- tests/unittests/sources/test_maas.py.orig
+++ tests/unittests/sources/test_maas.py
@@ -131,7 +131,7 @@ class TestMAASDataSource(CiTestCase):
if not url.startswith(prefix):
raise ValueError("unexpected call %s" % url)
- short = url[len(prefix) :]
+ short = url[len(prefix):]
if short not in data:
raise url_helper.UrlError("not found", code=404, url=url)
return url_helper.StringResponse(data[short])
--- tests/unittests/sources/test_smartos.py.orig
+++ tests/unittests/sources/test_smartos.py
@@ -766,7 +766,7 @@ class ShortReader:
rsize = next_null - self.index + 1
i = self.index
self.index += rsize
- ret = self.data[i : i + rsize]
+ ret = self.data[i: i + rsize]
if len(ret) and ret[-1:] == self.endbyte:
ret = ret[:-1]
return ret

View File

@@ -0,0 +1,14 @@
--- tools/run-lint.orig
+++ tools/run-lint
@@ -13,7 +13,10 @@ else
files=( "$@" )
fi
-cmd=( "python3" -m "flake8" "${files[@]}" )
+if [ -z "$PYTHON" ]; then
+ PYTHON="python3"
+fi
+cmd=( "$PYTHON" -m "flake8" "${files[@]}" )
echo "Running: " "${cmd[@]}" 1>&2
exec "${cmd[@]}"

View File

@@ -0,0 +1,19 @@
--- cloudinit/cmd/main.py.orig
+++ cloudinit/cmd/main.py
@@ -1334,8 +1334,14 @@ def all_stages(parser):
def sub_main(args):
- # Subparsers.required = True and each subparser sets action=(name, functor)
- (name, functor) = args.action
+ try:
+ # Subparsers.required = True
+ # and each subparser sets action=(name, functor)
+ (name, functor) = args.action
+ except AttributeError:
+ print('No Subcommand specified. Please specify a subcommand '
+ 'in addition to the option')
+ sys.exit(1)
# Setup basic logging for cloud-init:
# - for cloud-init stages if --debug

View File

@@ -1,27 +0,0 @@
--- cloudinit/net/network_manager.py.orig
+++ cloudinit/net/network_manager.py
@@ -9,7 +9,6 @@
import configparser
import io
import itertools
-import os
import uuid
from typing import Optional
@@ -401,7 +400,6 @@ def available(target=None):
# It is imported here to avoid circular import
from cloudinit.distros import uses_systemd
- config_present = os.path.isfile(subp.target_path(target, path=NM_CFG_FILE))
nmcli_present = subp.which("nmcli", target=target)
service_active = True
if uses_systemd():
@@ -410,7 +408,7 @@ def available(target=None):
except subp.ProcessExecutionError:
service_active = False
- return config_present and bool(nmcli_present) and service_active
+ return bool(nmcli_present) and service_active
# vi: ts=4 expandtab

View File

@@ -1,15 +1,26 @@
--- tests/unittests/test_ds_identify.py.orig
+++ tests/unittests/test_ds_identify.py
@@ -951,7 +951,7 @@ class TestDsIdentify(DsIdentifyBase):
nova does not identify itself on platforms other than intel.
https://bugs.launchpad.net/cloud-init/+bugs?field.tag=dsid-nova"""
-
+ return
data = copy.deepcopy(VALID_CFG["OpenStack"])
del data["files"][P_PRODUCT_NAME]
data.update(
--- tools/ds-identify.orig
+++ tools/ds-identify
@@ -95,7 +95,7 @@ DI_MAIN=${DI_MAIN:-main}
@@ -101,7 +101,7 @@ DI_MAIN=${DI_MAIN:-main}
DI_BLKID_EXPORT_OUT=""
DI_GEOM_LABEL_STATUS_OUT=""
DI_DEFAULT_POLICY="search,found=all,maybe=all,notfound=${DI_DISABLED}"
-DI_DEFAULT_POLICY_NO_DMI="search,found=all,maybe=all,notfound=${DI_ENABLED}"
+DI_DEFAULT_POLICY_NO_DMI="search,found=all,maybe=all,notfound=${DI_DISABLED}"
DI_DEFAULT_POLICY="search,found=all,maybe=none,notfound=${DI_DISABLED}"
-DI_DEFAULT_POLICY_NO_DMI="search,found=all,maybe=none,notfound=${DI_ENABLED}"
+DI_DEFAULT_POLICY_NO_DMI="search,found=all,maybe=none,notfound=${DI_DISABLED}"
DI_DMI_BOARD_NAME=""
DI_DMI_CHASSIS_ASSET_TAG=""
DI_DMI_PRODUCT_NAME=""
@@ -1261,12 +1261,6 @@ dscheck_OpenStack() {
@@ -1474,11 +1474,6 @@ dscheck_OpenStack() {
return ${DS_FOUND}
fi
@@ -18,18 +29,6 @@
- i?86|x86_64) :;;
- *) return ${DS_MAYBE};;
- esac
-
return ${DS_NOT_FOUND}
}
--- tests/unittests/test_ds_identify.py.orig
+++ tests/unittests/test_ds_identify.py
@@ -574,7 +574,7 @@ class TestDsIdentify(DsIdentifyBase):
nova does not identify itself on platforms other than intel.
https://bugs.launchpad.net/cloud-init/+bugs?field.tag=dsid-nova"""
-
+ return
data = copy.deepcopy(VALID_CFG["OpenStack"])
del data["files"][P_PRODUCT_NAME]
data.update(

View File

@@ -0,0 +1,308 @@
--- cloudinit/cmd/status.py.orig
+++ cloudinit/cmd/status.py
@@ -318,9 +318,8 @@ def systemd_failed(wait: bool) -> bool:
for service in [
"cloud-final.service",
"cloud-config.service",
- "cloud-init-network.service",
+ "cloud-init.service",
"cloud-init-local.service",
- "cloud-init-main.service",
]:
try:
stdout = query_systemctl(
--- cloudinit/config/cc_mounts.py.orig
+++ cloudinit/config/cc_mounts.py
@@ -519,7 +519,7 @@ def handle(name: str, cfg: Config, cloud
# fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno
uses_systemd = cloud.distro.uses_systemd()
default_mount_options = (
- "defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev"
+ "defaults,nofail,x-systemd.after=cloud-init.service,_netdev"
if uses_systemd
else "defaults,nobootwait"
)
--- cloudinit/config/schemas/schema-cloud-config-v1.json.orig
+++ cloudinit/config/schemas/schema-cloud-config-v1.json
@@ -2034,12 +2034,12 @@
},
"mount_default_fields": {
"type": "array",
- "description": "Default mount configuration for any mount entry with less than 6 options provided. When specified, 6 items are required and represent ``/etc/fstab`` entries. Default: ``defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev``.",
+ "description": "Default mount configuration for any mount entry with less than 6 options provided. When specified, 6 items are required and represent ``/etc/fstab`` entries. Default: ``defaults,nofail,x-systemd.after=cloud-init.service,_netdev``.",
"default": [
null,
null,
"auto",
- "defaults,nofail,x-systemd.after=cloud-init-network.service",
+ "defaults,nofail,x-systemd.after=cloud-init.service",
"0",
"2"
],
--- systemd/cloud-config.service.orig
+++ systemd/cloud-config.service
@@ -9,14 +9,7 @@ ConditionEnvironment=!KERNEL_CMDLINE=clo
[Service]
Type=oneshot
-# This service is a shim which preserves systemd ordering while allowing a
-# single Python process to run cloud-init's logic. This works by communicating
-# with the cloud-init process over a unix socket to tell the process that this
-# stage can start, and then wait on a return socket until the cloud-init
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc -Uu -W1 /run/cloud-init/share/config.sock -s /run/cloud-init/share/config-return.sock | sh'
+ExecStart=/usr/bin/cloud-init modules --mode=config
RemainAfterExit=yes
TimeoutSec=0
--- systemd/cloud-config.target.orig
+++ systemd/cloud-config.target
@@ -14,5 +14,5 @@
[Unit]
Description=Cloud-config availability
-Wants=cloud-init-local.service cloud-init-network.service
-After=cloud-init-local.service cloud-init-network.service
+Wants=cloud-init-local.service cloud-init.service
+After=cloud-init-local.service cloud-init.service
--- systemd/cloud-final.service.orig
+++ systemd/cloud-final.service
@@ -12,16 +12,10 @@ ConditionEnvironment=!KERNEL_CMDLINE=clo
[Service]
Type=oneshot
-# This service is a shim which preserves systemd ordering while allowing a
-# single Python process to run cloud-init's logic. This works by communicating
-# with the cloud-init process over a unix socket to tell the process that this
-# stage can start, and then wait on a return socket until the cloud-init
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc -Uu -W1 /run/cloud-init/share/final.sock -s /run/cloud-init/share/final-return.sock | sh'
+ExecStart=/usr/bin/cloud-init modules --mode=final
RemainAfterExit=yes
TimeoutSec=0
+KillMode=process
TasksMax=infinity
# Output needs to appear in instance console output
--- systemd/cloud-init-main.service.tmpl.orig
+++ systemd/cloud-init-main.service.tmpl
@@ -1,42 +0,0 @@
-## template:jinja
-# systemd ordering resources
-# ==========================
-# https://systemd.io/NETWORK_ONLINE/
-# https://docs.cloud-init.io/en/latest/explanation/boot.html
-# https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
-# https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html
-# https://www.freedesktop.org/software/systemd/man/latest/systemd-remount-fs.service.html
-[Unit]
-Description=Cloud-init: Single Process
-{% if variant in ["almalinux", "cloudlinux", "ubuntu", "unknown", "debian", "rhel"] %}
-DefaultDependencies=no
-{% endif %}
-{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
-Requires=dbus.socket
-After=dbus.socket
-{% endif %}
-
-After=systemd-remount-fs.service
-Before=cloud-init-local.service
-Before=shutdown.target
-Conflicts=shutdown.target
-RequiresMountsFor=/var/lib/cloud
-ConditionPathExists=!/etc/cloud/cloud-init.disabled
-ConditionKernelCommandLine=!cloud-init=disabled
-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/cloud-init --all-stages
-KillMode=process
-TasksMax=infinity
-TimeoutStartSec=infinity
-{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
-ExecStartPre=/sbin/restorecon /run/cloud-init
-{% endif %}
-
-# Output needs to appear in instance console output
-StandardOutput=journal+console
-
-[Install]
-WantedBy=cloud-init.target
--- systemd/cloud-init-network.service.tmpl.orig
+++ systemd/cloud-init-network.service.tmpl
@@ -1,64 +0,0 @@
-## template:jinja
-[Unit]
-# https://docs.cloud-init.io/en/latest/explanation/boot.html
-Description=Cloud-init: Network Stage
-{% if variant not in ["almalinux", "cloudlinux", "photon", "rhel"] %}
-DefaultDependencies=no
-{% endif %}
-Wants=cloud-init-local.service
-Wants=sshd-keygen.service
-Wants=sshd.service
-After=cloud-init-local.service
-{% if variant not in ["ubuntu"] %}
-After=systemd-networkd-wait-online.service
-{% endif %}
-{% if variant in ["ubuntu", "unknown", "debian"] %}
-After=networking.service
-{% endif %}
-{% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora",
- "miraclelinux", "openeuler", "OpenCloudOS", "openmandriva", "rhel", "rocky",
- "suse", "TencentOS", "virtuozzo"] %}
-After=NetworkManager.service
-After=NetworkManager-wait-online.service
-{% endif %}
-{% if variant in ["suse"] %}
-After=wicked.service
-# setting hostname via hostnamectl depends on dbus, which otherwise
-# would not be guaranteed at this point.
-After=dbus.service
-{% endif %}
-Before=network-online.target
-Before=sshd-keygen.service
-Before=sshd.service
-Before=systemd-user-sessions.service
-{% if variant in ["ubuntu", "unknown", "debian"] %}
-Before=sysinit.target
-Before=shutdown.target
-Conflicts=shutdown.target
-{% endif %}
-{% if variant in ["suse"] %}
-Before=shutdown.target
-Conflicts=shutdown.target
-{% endif %}
-ConditionPathExists=!/etc/cloud/cloud-init.disabled
-ConditionKernelCommandLine=!cloud-init=disabled
-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
-
-[Service]
-Type=oneshot
-# This service is a shim which preserves systemd ordering while allowing a
-# single Python process to run cloud-init's logic. This works by communicating
-# with the cloud-init process over a unix socket to tell the process that this
-# stage can start, and then wait on a return socket until the cloud-init
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc -Uu -W1 /run/cloud-init/share/network.sock -s /run/cloud-init/share/network-return.sock | sh'
-RemainAfterExit=yes
-TimeoutSec=0
-
-# Output needs to appear in instance console output
-StandardOutput=journal+console
-
-[Install]
-WantedBy=cloud-init.target
--- /dev/null
+++ systemd/cloud-init.service.tmpl
@@ -0,0 +1,55 @@
+## template:jinja
+[Unit]
+# https://docs.cloud-init.io/en/latest/explanation/boot.html
+Description=Cloud-init: Network Stage
+{% if variant not in ["almalinux", "cloudlinux", "photon", "rhel"] %}
+DefaultDependencies=no
+{% endif %}
+Wants=cloud-init-local.service
+Wants=sshd-keygen.service
+Wants=sshd.service
+After=cloud-init-local.service
+After=systemd-networkd-wait-online.service
+{% if variant in ["ubuntu", "unknown", "debian"] %}
+After=networking.service
+{% endif %}
+{% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora",
+ "miraclelinux", "openeuler", "OpenCloudOS", "openmandriva", "rhel", "rocky",
+ "suse", "TencentOS", "virtuozzo"] %}
+
+After=NetworkManager.service
+After=NetworkManager-wait-online.service
+{% endif %}
+{% if variant in ["suse"] %}
+After=wicked.service
+# setting hostname via hostnamectl depends on dbus, which otherwise
+# would not be guaranteed at this point.
+After=dbus.service
+{% endif %}
+Before=network-online.target
+Before=sshd-keygen.service
+Before=sshd.service
+Before=systemd-user-sessions.service
+{% if variant in ["ubuntu", "unknown", "debian"] %}
+Before=sysinit.target
+Before=shutdown.target
+Conflicts=shutdown.target
+{% endif %}
+{% if variant in ["suse"] %}
+Before=shutdown.target
+Conflicts=shutdown.target
+{% endif %}
+ConditionPathExists=!/etc/cloud/cloud-init.disabled
+ConditionKernelCommandLine=!cloud-init=disabled
+ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/cloud-init init
+RemainAfterExit=yes
+TimeoutSec=0
+
+# Output needs to appear in instance console output
+StandardOutput=journal+console
+
+[Install]
--- tests/unittests/config/test_cc_mounts.py.orig
+++ tests/unittests/config/test_cc_mounts.py
@@ -566,9 +566,9 @@ class TestFstabHandling:
LABEL=keepme none ext4 defaults 0 0
LABEL=UEFI
/dev/sda4 /mnt2 auto nofail,comment=cloudconfig 1 2
- /dev/sda5 /mnt3 auto defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev,comment=cloudconfig 0 2
+ /dev/sda5 /mnt3 auto defaults,nofail,x-systemd.after=cloud-init.service,_netdev,comment=cloudconfig 0 2
/dev/sda1 /mnt xfs auto,comment=cloudconfig 0 2
- /dev/sda3 /mnt4 btrfs defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev,comment=cloudconfig 0 2
+ /dev/sda3 /mnt4 btrfs defaults,nofail,x-systemd.after=cloud-init.service,_netdev,comment=cloudconfig 0 2
/dev/sdb1 none swap sw,comment=cloudconfig 0 0
""" # noqa: E501
).strip()
--- systemd/cloud-init-local.service.tmpl.orig
+++ systemd/cloud-init-local.service.tmpl
@@ -7,6 +7,7 @@ DefaultDependencies=no
{% endif %}
Wants=network-pre.target
After=hv_kvp_daemon.service
+After=systemd-remount-fs.service
Before=network-pre.target
Before=shutdown.target
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
@@ -16,6 +17,7 @@ Before=firewalld.target
Before=sysinit.target
{% endif %}
Conflicts=shutdown.target
+RequiresMountsFor=/var/lib/cloud
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
@@ -25,14 +27,7 @@ Type=oneshot
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
ExecStartPre=/sbin/restorecon /run/cloud-init
{% endif %}
-# This service is a shim which preserves systemd ordering while allowing a
-# single Python process to run cloud-init's logic. This works by communicating
-# with the cloud-init process over a unix socket to tell the process that this
-# stage can start, and then wait on a return socket until the cloud-init
-# process has completed this stage. The output from the return socket is piped
-# into a shell so that the process can send a completion message (defaults to
-# "done", otherwise includes an error message) and an exit code to systemd.
-ExecStart=sh -c 'echo "start" | nc -Uu -W1 /run/cloud-init/share/local.sock -s /run/cloud-init/share/local-return.sock | sh'
+ExecStart=/usr/bin/cloud-init init --local
RemainAfterExit=yes
TimeoutSec=0

View File

@@ -1,6 +1,6 @@
--- cloudinit/sources/DataSourceOracle.py.orig
+++ cloudinit/sources/DataSourceOracle.py
@@ -204,6 +204,8 @@ class DataSourceOracle(sources.DataSourc
@@ -274,6 +274,8 @@ class DataSourceOracle(sources.DataSourc
def _is_iscsi_root(self) -> bool:
"""Return whether we are on a iscsi machine."""
@@ -11,10 +11,11 @@
def _get_iscsi_config(self) -> dict:
--- tests/unittests/sources/test_oracle.py.orig
+++ tests/unittests/sources/test_oracle.py
@@ -996,6 +996,7 @@ class TestNonIscsiRoot_GetDataBehaviour:
@@ -1331,7 +1331,7 @@ class TestNonIscsiRoot_GetDataBehaviour:
def test_read_opc_metadata_called_with_ephemeral_dhcp(
self, m_find_fallback_nic, m_EphemeralDHCPv4, oracle_ds
self, m_find_fallback_nic, m_ephemeral_network, oracle_ds
):
-
+ return
in_context_manager = False

View File

@@ -1,28 +0,0 @@
--- cloudinit/config/cc_package_update_upgrade_install.py.orig
+++ cloudinit/config/cc_package_update_upgrade_install.py
@@ -18,7 +18,7 @@ from cloudinit.config.schema import Meta
from cloudinit.distros import ALL_DISTROS
from cloudinit.settings import PER_INSTANCE
-REBOOT_FILE = "/var/run/reboot-required"
+REBOOT_FILES = ("/var/run/reboot-required", "/run/reboot-needed")
REBOOT_CMD = ["/sbin/reboot"]
MODULE_DESCRIPTION = """\
@@ -120,11 +120,14 @@ def handle(name: str, cfg: Config, cloud
# kernel and openssl (possibly some other packages)
# write a file /var/run/reboot-required after upgrading.
# if that file exists and configured, then just stop right now and reboot
- reboot_fn_exists = os.path.isfile(REBOOT_FILE)
+ for reboot_marker in REBOOT_FILES:
+ reboot_fn_exists = os.path.isfile(reboot_marker)
+ if reboot_fn_exists:
+ break
if (upgrade or pkglist) and reboot_if_required and reboot_fn_exists:
try:
LOG.warning(
- "Rebooting after upgrade or install per %s", REBOOT_FILE
+ "Rebooting after upgrade or install per %s", reboot_marker
)
# Flush the above warning + anything else out...
logging.flushLoggers(LOG)

View File

@@ -1,374 +0,0 @@
--- tests/unittests/config/test_cc_yum_add_repo.py.orig
+++ tests/unittests/config/test_cc_yum_add_repo.py
@@ -2,7 +2,7 @@
import configparser
import logging
-import re
+# import re
import shutil
import tempfile
@@ -137,10 +137,10 @@ class TestAddYumRepoSchema:
{"yum_repo_dir": True},
"yum_repo_dir: True is not of type 'string'",
),
- (
- {"yum_repos": {}},
- re.escape("yum_repos: {} does not have enough properties"),
- ),
+ # (
+ # {"yum_repos": {}},
+ # re.escape("yum_repos: {} does not have enough properties"),
+ # ),
# baseurl required
(
{"yum_repos": {"My-Repo": {}}},
--- tests/unittests/config/test_cc_apk_configure.py.orig
+++ tests/unittests/config/test_cc_apk_configure.py
@@ -352,11 +352,11 @@ class TestApkConfigureSchema:
" allowed ('bogus' was unexpected)"
),
),
- (
- {"apk_repos": {"alpine_repo": {}}},
- "apk_repos.alpine_repo: 'version' is a required property,"
- " apk_repos.alpine_repo: {} does not have enough properties",
- ),
+ # (
+ # {"apk_repos": {"alpine_repo": {}}},
+ # "apk_repos.alpine_repo: 'version' is a required property,"
+ # " apk_repos.alpine_repo: {} does not have enough properties",
+ # ),
(
{"apk_repos": {"alpine_repo": True}},
"apk_repos.alpine_repo: True is not of type 'object', 'null'",
@@ -366,10 +366,10 @@ class TestApkConfigureSchema:
"apk_repos.preserve_repositories: 'wrongtype' is not of type"
" 'boolean'",
),
- (
- {"apk_repos": {}},
- "apk_repos: {} does not have enough properties",
- ),
+ # (
+ # {"apk_repos": {}},
+ # "apk_repos: {} does not have enough properties",
+ # ),
(
{"apk_repos": {"local_repo_base_url": None}},
"apk_repos.local_repo_base_url: None is not of type 'string'",
--- tests/unittests/config/test_cc_apt_configure.py.orig
+++ tests/unittests/config/test_cc_apt_configure.py
@@ -32,7 +32,7 @@ class TestAPTConfigureSchema:
" ('boguskey' was unexpected)"
),
),
- ({"apt": {}}, "apt: {} does not have enough properties"),
+ # ({"apt": {}}, "apt: {} does not have enough properties"),
(
{"apt": {"preserve_sources_list": 1}},
"apt.preserve_sources_list: 1 is not of type 'boolean'",
@@ -41,10 +41,10 @@ class TestAPTConfigureSchema:
{"apt": {"disable_suites": 1}},
"apt.disable_suites: 1 is not of type 'array'",
),
- (
- {"apt": {"disable_suites": []}},
- re.escape("apt.disable_suites: [] is too short"),
- ),
+ # (
+ # {"apt": {"disable_suites": []}},
+ # re.escape("apt.disable_suites: [] is too short"),
+ # ),
(
{"apt": {"disable_suites": [1]}},
"apt.disable_suites.0: 1 is not of type 'string'",
@@ -61,18 +61,18 @@ class TestAPTConfigureSchema:
{"apt": {"primary": "nonlist"}},
"apt.primary: 'nonlist' is not of type 'array'",
),
- (
- {"apt": {"primary": []}},
- re.escape("apt.primary: [] is too short"),
- ),
+ # (
+ # {"apt": {"primary": []}},
+ # re.escape("apt.primary: [] is too short"),
+ # ),
(
{"apt": {"primary": ["nonobj"]}},
"apt.primary.0: 'nonobj' is not of type 'object'",
),
- (
- {"apt": {"primary": [{}]}},
- "apt.primary.0: 'arches' is a required property",
- ),
+ # (
+ # {"apt": {"primary": [{}]}},
+ # "apt.primary.0: 'arches' is a required property",
+ # ),
(
{"apt": {"primary": [{"boguskey": True}]}},
re.escape(
@@ -98,10 +98,10 @@ class TestAPTConfigureSchema:
},
"apt.primary.0.search: 'non-array' is not of type 'array'",
),
- (
- {"apt": {"primary": [{"arches": ["amd64"], "search": []}]}},
- re.escape("apt.primary.0.search: [] is too short"),
- ),
+ # (
+ # {"apt": {"primary": [{"arches": ["amd64"], "search": []}]}},
+ # re.escape("apt.primary.0.search: [] is too short"),
+ # ),
(
{
"apt": {
@@ -130,10 +130,10 @@ class TestAPTConfigureSchema:
{"apt": {"debconf_selections": True}},
"apt.debconf_selections: True is not of type 'object'",
),
- (
- {"apt": {"debconf_selections": {}}},
- "apt.debconf_selections: {} does not have enough properties",
- ),
+ # (
+ # {"apt": {"debconf_selections": {}}},
+ # "apt.debconf_selections: {} does not have enough properties",
+ # ),
(
{"apt": {"sources_list": True}},
"apt.sources_list: True is not of type 'string'",
@@ -166,10 +166,10 @@ class TestAPTConfigureSchema:
{"apt": {"sources": {"opaquekey": True}}},
"apt.sources.opaquekey: True is not of type 'object'",
),
- (
- {"apt": {"sources": {"opaquekey": {}}}},
- "apt.sources.opaquekey: {} does not have enough properties",
- ),
+ # (
+ # {"apt": {"sources": {"opaquekey": {}}}},
+ # "apt.sources.opaquekey: {} does not have enough properties",
+ # ),
(
{"apt": {"sources": {"opaquekey": {"boguskey": True}}}},
re.escape(
--- tests/unittests/config/test_cc_bootcmd.py.orig
+++ tests/unittests/config/test_cc_bootcmd.py
@@ -1,5 +1,5 @@
# This file is part of cloud-init. See LICENSE file for license information.
-import re
+# import re
import tempfile
import pytest
@@ -128,13 +128,13 @@ class TestBootCMDSchema:
"Cloud config schema errors: bootcmd: 1 is not of type"
" 'array'",
),
- ({"bootcmd": []}, re.escape("bootcmd: [] is too short")),
- (
- {"bootcmd": []},
- re.escape(
- "Cloud config schema errors: bootcmd: [] is too short"
- ),
- ),
+ # ({"bootcmd": []}, re.escape("bootcmd: [] is too short")),
+ # (
+ # {"bootcmd": []},
+ # re.escape(
+ # "Cloud config schema errors: bootcmd: [] is too short"
+ # ),
+ # ),
(
{
"bootcmd": [
--- tests/unittests/config/test_cc_ca_certs.py.orig
+++ tests/unittests/config/test_cc_ca_certs.py
@@ -394,10 +394,10 @@ class TestCACertsSchema:
{"ca_certs": 1},
"ca_certs: 1 is not of type 'object'",
),
- (
- {"ca_certs": {}},
- re.escape("ca_certs: {} does not have enough properties"),
- ),
+ # (
+ # {"ca_certs": {}},
+ # re.escape("ca_certs: {} does not have enough properties"),
+ # ),
(
{"ca_certs": {"boguskey": 1}},
re.escape(
@@ -413,10 +413,10 @@ class TestCACertsSchema:
{"ca_certs": {"trusted": [1]}},
"ca_certs.trusted.0: 1 is not of type 'string'",
),
- (
- {"ca_certs": {"trusted": []}},
- re.escape("ca_certs.trusted: [] is too short"),
- ),
+ # (
+ # {"ca_certs": {"trusted": []}},
+ # re.escape("ca_certs.trusted: [] is too short"),
+ # ),
),
)
@skipUnlessJsonSchema()
--- tests/unittests/config/test_cc_chef.py.orig
+++ tests/unittests/config/test_cc_chef.py
@@ -304,10 +304,10 @@ class TestBootCMDSchema:
{"chef": 1},
"chef: 1 is not of type 'object'",
),
- (
- {"chef": {}},
- re.escape(" chef: {} does not have enough properties"),
- ),
+ # (
+ # {"chef": {}},
+ # re.escape(" chef: {} does not have enough properties"),
+ # ),
(
{"chef": {"boguskey": True}},
re.escape(
@@ -319,10 +319,10 @@ class TestBootCMDSchema:
{"chef": {"directories": 1}},
"chef.directories: 1 is not of type 'array'",
),
- (
- {"chef": {"directories": []}},
- re.escape("chef.directories: [] is too short"),
- ),
+ # (
+ # {"chef": {"directories": []}},
+ # re.escape("chef.directories: [] is too short"),
+ # ),
(
{"chef": {"directories": [1]}},
"chef.directories.0: 1 is not of type 'string'",
--- tests/unittests/config/test_cc_lxd.py.orig
+++ tests/unittests/config/test_cc_lxd.py
@@ -385,7 +385,7 @@ class TestLXDSchema:
# Require bridge.mode
({"lxd": {"bridge": {}}}, "bridge: 'mode' is a required property"),
# Require init or bridge keys
- ({"lxd": {}}, "lxd: {} does not have enough properties"),
+ # ({"lxd": {}}, "lxd: {} does not have enough properties"),
# Require some non-empty preseed config of type string
({"lxd": {"preseed": {}}}, "not of type 'string'"),
({"lxd": {"preseed": ""}}, None),
--- tests/unittests/config/test_cc_mounts.py.orig
+++ tests/unittests/config/test_cc_mounts.py
@@ -583,9 +583,9 @@ class TestMountsSchema:
"config, error_msg",
[
# We expect to see one mount if provided in user-data.
- ({"mounts": []}, re.escape("mounts: [] is too short")),
+ # ({"mounts": []}, re.escape("mounts: [] is too short")),
# Disallow less than 1 item per mount entry
- ({"mounts": [[]]}, re.escape("mounts.0: [] is too short")),
+ # ({"mounts": [[]]}, re.escape("mounts.0: [] is too short")),
# Disallow more than 6 items per mount entry
({"mounts": [["1"] * 7]}, "mounts.0:.* is too long"),
# Disallow mount_default_fields will anything other than 6 items
--- tests/unittests/config/test_cc_package_update_upgrade_install.py.orig
+++ tests/unittests/config/test_cc_package_update_upgrade_install.py
@@ -17,7 +17,7 @@ class TestPackageUpdateUpgradeSchema:
# packages list with three entries (2 required)
({"packages": ["p1", ["p2", "p3", "p4"]]}, ""),
# empty packages list
- ({"packages": []}, "is too short"),
+ # ({"packages": []}, "is too short"),
(
{"apt_update": False},
(
--- tests/unittests/config/test_cc_runcmd.py.orig
+++ tests/unittests/config/test_cc_runcmd.py
@@ -90,7 +90,7 @@ class TestRunCmdSchema:
({"runcmd": ["echo bye", "echo bye"]}, None),
# Invalid schemas
({"runcmd": 1}, "1 is not of type 'array'"),
- ({"runcmd": []}, r"runcmd: \[\] is too short"),
+ # ({"runcmd": []}, r"runcmd: \[\] is too short"),
(
{
"runcmd": [
--- tests/unittests/config/test_cc_set_passwords.py.orig
+++ tests/unittests/config/test_cc_set_passwords.py
@@ -715,12 +715,12 @@ class TestSetPasswordsSchema:
{"chpasswd": {"list": ["user"]}},
pytest.raises(SchemaValidationError),
),
- (
- {"chpasswd": {"list": []}},
- pytest.raises(
- SchemaValidationError, match=r"\[\] is too short"
- ),
- ),
+ # (
+ # {"chpasswd": {"list": []}},
+ # pytest.raises(
+ # SchemaValidationError, match=r"\[\] is too short"
+ # ),
+ # ),
],
)
@skipUnlessJsonSchema()
--- tests/unittests/config/test_cc_snap.py.orig
+++ tests/unittests/config/test_cc_snap.py
@@ -279,16 +279,17 @@ class TestSnapSchema:
{"snap": {"commands": ["ls"], "invalid-key": ""}},
"Additional properties are not allowed",
),
- ({"snap": {}}, "{} does not have enough properties"),
+ # ({"snap": {}}, "{} does not have enough properties"),
(
{"snap": {"commands": "broken"}},
"'broken' is not of type 'object', 'array'",
),
- ({"snap": {"commands": []}}, r"snap.commands: \[\] is too short"),
- (
- {"snap": {"commands": {}}},
- r"snap.commands: {} does not have enough properties",
- ),
+ # ({"snap": {
+ # "commands": []}}, r"snap.commands: \[\] is too short"),
+ # (
+ # {"snap": {"commands": {}}},
+ # r"snap.commands: {} does not have enough properties",
+ # ),
({"snap": {"commands": [123]}}, ""),
({"snap": {"commands": {"01": 123}}}, ""),
({"snap": {"commands": [["snap", "install", 123]]}}, ""),
@@ -302,11 +303,11 @@ class TestSnapSchema:
{"snap": {"assertions": "broken"}},
"'broken' is not of type 'object', 'array'",
),
- ({"snap": {"assertions": []}}, r"\[\] is too short"),
- (
- {"snap": {"assertions": {}}},
- r"\{} does not have enough properties",
- ),
+ # ({"snap": {"assertions": []}}, r"\[\] is too short"),
+ # (
+ # {"snap": {"assertions": {}}},
+ # r"\{} does not have enough properties",
+ # ),
],
)
@skipUnlessJsonSchema()
--- tests/unittests/config/test_cc_write_files.py.orig
+++ tests/unittests/config/test_cc_write_files.py
@@ -222,7 +222,7 @@ class TestWriteFilesSchema:
[
# Top-level write_files type validation
({"write_files": 1}, "write_files: 1 is not of type 'array'"),
- ({"write_files": []}, re.escape("write_files: [] is too short")),
+ # ({"write_files": []}, re.escape("write_files: [] is too short")),
(
{"write_files": [{}]},
"write_files.0: 'path' is a required property",

View File

@@ -0,0 +1,34 @@
--- cloudinit/ssh_util.py.orig
+++ cloudinit/ssh_util.py
@@ -544,6 +544,10 @@ def parse_ssh_config_map(fname):
def _includes_dconf(fname: str) -> bool:
+ # Handle cases where sshd_config is handled in /usr/etc/ssh/sshd_config
+ # so /etc/ssh/sshd_config.d/ exists but /etc/ssh/sshd_config doesn't
+ if not os.path.exists(fname) and os.path.exists(f"{fname}.d"):
+ return True
if not os.path.isfile(fname):
return False
for line in util.load_text_file(fname).splitlines():
--- tests/unittests/test_ssh_util.py.orig
+++ tests/unittests/test_ssh_util.py
@@ -561,6 +561,18 @@ class TestUpdateSshConfig:
expected_conf_file = f"{mycfg}.d/50-cloud-init.conf"
assert not os.path.isfile(expected_conf_file)
+ def test_without_sshd_config(self, tmpdir):
+ """In some cases /etc/ssh/sshd_config.d exists but /etc/ssh/sshd_config
+ doesn't. In this case we shouldn't create /etc/ssh/sshd_config but make
+ /etc/ssh/sshd_config.d/50-cloud-init.conf."""
+ mycfg = tmpdir.join("sshd_config")
+ os.mkdir(os.path.join(tmpdir, "sshd_config.d"))
+ assert ssh_util.update_ssh_config({"key": "value"}, mycfg)
+ expected_conf_file = f"{mycfg}.d/50-cloud-init.conf"
+ assert os.path.isfile(expected_conf_file)
+ assert not os.path.isfile(mycfg)
+ assert "key value\n" == util.load_text_file(expected_conf_file)
+
@pytest.mark.parametrize(
"cfg",
["Include {mycfg}.d/*.conf", "Include {mycfg}.d/*.conf # comment"],

View File

@@ -1,68 +0,0 @@
--- cloudinit/distros/__init__.py.orig
+++ cloudinit/distros/__init__.py
@@ -880,9 +880,12 @@ class Distro(persistence.CloudInitPickle
# it actually exists as a directory
sudoers_contents = ""
base_exists = False
+ system_sudo_base = "/usr/etc/sudoers"
if os.path.exists(sudo_base):
sudoers_contents = util.load_file(sudo_base)
base_exists = True
+ elif os.path.exists(system_sudo_base):
+ sudoers_contents = util.load_file(system_sudo_base)
found_include = False
for line in sudoers_contents.splitlines():
line = line.strip()
@@ -907,7 +910,7 @@ class Distro(persistence.CloudInitPickle
"#includedir %s" % (path),
"",
]
- sudoers_contents = "\n".join(lines)
+ sudoers_contents += "\n".join(lines)
util.write_file(sudo_base, sudoers_contents, 0o440)
else:
lines = [
--- tests/unittests/distros/test__init__.py.orig
+++ tests/unittests/distros/test__init__.py
@@ -230,6 +230,41 @@ class TestGenericDistro(helpers.Filesyst
self.assertIn("josh", contents)
self.assertEqual(2, contents.count("josh"))
+ def test_sudoers_ensure_append_sudoer_file(self):
+ cls = distros.fetch("ubuntu")
+ d = cls("ubuntu", {}, None)
+ self.patchOS(self.tmp)
+ self.patchUtils(self.tmp)
+ util.write_file("/etc/sudoers", "josh, josh\n")
+ d.ensure_sudo_dir("/b", "/etc/sudoers")
+ contents = util.load_file("/etc/sudoers")
+ self.assertIn("includedir /b", contents)
+ self.assertTrue(os.path.isdir("/b"))
+ self.assertIn("josh", contents)
+ self.assertEqual(2, contents.count("josh"))
+
+ def test_usr_sudoers_ensure_new(self):
+ cls = distros.fetch("ubuntu")
+ d = cls("ubuntu", {}, None)
+ self.patchOS(self.tmp)
+ self.patchUtils(self.tmp)
+ util.write_file("/usr/etc/sudoers", "josh, josh\n")
+ d.ensure_sudo_dir("/b")
+ contents = util.load_file("/etc/sudoers")
+ self.assertIn("josh", contents)
+ self.assertEqual(2, contents.count("josh"))
+ self.assertIn("includedir /b", contents)
+ self.assertTrue(os.path.isdir("/b"))
+
+ def test_usr_sudoers_ensure_no_etc_creat(self):
+ cls = distros.fetch("ubuntu")
+ d = cls("ubuntu", {}, None)
+ self.patchOS(self.tmp)
+ self.patchUtils(self.tmp)
+ util.write_file("/usr/etc/sudoers", "#includedir /b")
+ d.ensure_sudo_dir("/b")
+ self.assertTrue(not os.path.exists("/etc/sudoers"))
+
def test_sudoers_ensure_only_one_includedir(self):
cls = distros.fetch("ubuntu")
d = cls("ubuntu", {}, None)

View File

@@ -1,177 +0,0 @@
--- cloudinit/distros/__init__.py.orig
+++ cloudinit/distros/__init__.py
@@ -287,6 +287,15 @@ class Distro(persistence.CloudInitPickle
network_state = parse_net_config_data(netconfig, renderer=renderer)
self._write_network_state(network_state, renderer)
+ # The sysconfig renderer has no route writing implementation
+ # for SUSE yet use the old code for now that depends on the
+ # raw config.
+ try:
+ # Only exists for SUSE distro via this patch all other
+ # implementations throw which breaks testing
+ self._write_routes(netconfig)
+ except AttributeError:
+ pass
# Now try to bring them up
if bring_up:
--- cloudinit/distros/opensuse.py.orig
+++ cloudinit/distros/opensuse.py
@@ -10,7 +10,7 @@
import os
-from cloudinit import distros, helpers
+from cloudinit import distros, helpers, net
from cloudinit import log as logging
from cloudinit import subp, util
from cloudinit.distros import rhel_util as rhutil
@@ -238,6 +238,147 @@ class Distro(distros.Distro):
conf.set_hostname(hostname)
util.write_file(filename, str(conf), 0o644)
+ def _write_routes_v1(self, netconfig):
+ """Write route files, not part of the standard distro interface"""
+ # Due to the implementation of the sysconfig renderer default routes
+ # are setup in ifcfg-* files. But this does not work on SLES or
+ # openSUSE https://bugs.launchpad.net/cloud-init/+bug/1812117
+ # this is a very hacky way to get around the problem until a real
+ # solution is found in the sysconfig renderer
+ device_configs = netconfig.get('config', [])
+ default_nets = ('::', '0.0.0.0')
+ for config in device_configs:
+ if_name = config.get('name')
+ subnets = config.get('subnets', [])
+ config_routes = ''
+ has_default_route = False
+ seen_default_gateway = None
+ for subnet in subnets:
+ # Render the default gateway if it is present
+ gateway = subnet.get('gateway')
+ if gateway:
+ config_routes += ' '.join(
+ ['default', gateway, '-', '-\n']
+ )
+ has_default_route = True
+ if not seen_default_gateway:
+ seen_default_gateway = gateway
+ # Render subnet routes
+ routes = subnet.get('routes', [])
+ for route in routes:
+ dest = route.get('destination') or route.get('network')
+ if not dest or dest in default_nets:
+ dest = 'default'
+ if not has_default_route:
+ has_default_route = True
+ if dest != 'default':
+ netmask = route.get('netmask')
+ if netmask:
+ if net.is_ipv4_network(netmask):
+ prefix = net.ipv4_mask_to_net_prefix(netmask)
+ if net.is_ipv6_network(netmask):
+ prefix = net.ipv6_mask_to_net_prefix(netmask)
+ dest += '/' + str(prefix)
+ if '/' not in dest:
+ LOG.warning(
+ 'Skipping route; has no prefix "%s"', dest
+ )
+ continue
+ gateway = route.get('gateway')
+ if not gateway:
+ LOG.warning(
+ 'Missing gateway for "%s", skipping', dest
+ )
+ continue
+ if (
+ dest == 'default'
+ and has_default_route
+ and gateway == seen_default_gateway
+ ):
+ dest_info = dest
+ if gateway:
+ dest_info = ' '.join([dest, gateway, '-', '-'])
+ LOG.warning(
+ '%s already has default route, skipping "%s"',
+ if_name, dest_info
+ )
+ continue
+ config_routes += ' '.join(
+ [dest, gateway, '-', '-\n']
+ )
+ if config_routes:
+ route_file = '/etc/sysconfig/network/ifroute-%s' % if_name
+ util.write_file(route_file, config_routes)
+
+ def _render_route_string(self, netconfig_route):
+ route_to = netconfig_route.get('to', None)
+ route_via = netconfig_route.get('via', None)
+ route_metric = netconfig_route.get('metric', None)
+ route_string = ''
+
+ if route_to and route_via:
+ route_string = ' '.join([route_to, route_via, '-', '-'])
+ if route_metric:
+ route_string += ' metric {}\n'.format(route_metric)
+ else:
+ route_string += '\n'
+ else:
+ LOG.warning('invalid route definition, skipping route')
+
+ return route_string
+
+ def _write_routes_v2(self, netconfig):
+ for device_type in netconfig:
+ if device_type == 'version':
+ continue
+
+ if device_type == 'routes':
+ # global static routes
+ config_routes = ''
+ for route in netconfig['routes']:
+ config_routes += self._render_route_string(route)
+ if config_routes:
+ route_file = '/etc/sysconfig/network/routes'
+ util.write_file(route_file, config_routes)
+ else:
+ devices = netconfig[device_type]
+ for device_name in devices:
+ config_routes = ''
+ device_config = devices[device_name]
+ try:
+ gateways = [
+ v for k, v in device_config.items()
+ if 'gateway' in k
+ ]
+ for gateway in gateways:
+ config_routes += ' '.join(
+ ['default', gateway, '-', '-\n']
+ )
+ for route in device_config.get('routes', []):
+ config_routes += self._render_route_string(route)
+ if config_routes:
+ route_file = \
+ '/etc/sysconfig/network/ifroute-{}'.format(
+ device_name
+ )
+ util.write_file(route_file, config_routes)
+ except Exception:
+ # the parser above epxects another level of nesting
+ # which should be there in case it's properly
+ # formatted; if not we may get an exception on items()
+ pass
+
+ def _write_routes(self, netconfig):
+ netconfig_ver = netconfig.get('version')
+ if netconfig_ver == 1:
+ self._write_routes_v1(netconfig)
+ elif netconfig_ver == 2:
+ self._write_routes_v2(netconfig)
+ else:
+ LOG.warning(
+ 'unsupported or missing netconfig version, not writing routes'
+ )
+
@property
def preferred_ntp_clients(self):
"""The preferred ntp client is dependent on the version."""

File diff suppressed because it is too large Load Diff

View File

@@ -17,8 +17,16 @@
# change this whenever config changes incompatible
%global configver 0.7
%if 0%{?suse_version} >= 1600
%define pythons %{primary_python}
%else
%define pythons python311
%endif
%global _sitelibdir %{%{pythons}_sitelib}
Name: cloud-init
Version: 23.3
Version: 25.1.3
Release: 0
License: GPL-3.0
Summary: Cloud node initialization tool
@@ -34,25 +42,24 @@ Patch2: cloud-init-break-resolv-symlink.patch
Patch3: cloud-init-sysconf-path.patch
# FIXME (lp#1860164)
Patch4: cloud-init-no-tempnet-oci.patch
# FIXME (lp#1812117)
Patch6: cloud-init-write-routes.patch
# FIXME (https://github.com/canonical/cloud-init/issues/4339)
Patch7: cloud-init-keep-flake.patch
Patch8: cloud-init-lint-fixes.patch
# FIXME (https://github.com/canonical/cloud-init/pull/4788)
Patch9: cloud-init-pckg-reboot.patch
# FIXME
Patch10: cloud-init-skip-empty-conf.patch
# FIXME (https://github.com/canonical/cloud-init/commit/d0f00bd54649e527d69ad597cbcad6efa8548e58)
Patch11: cloud-init-ds-deterministic.patch
# FIXME https://github.com/canonical/cloud-init/issues/5152 adn LP#1715241
Patch12: cloud-init-no-openstack-guess.patch
# FIXME upstream comit 812df5038
Patch13: cloud-init-no-nmcfg-needed.patch
# FIXME https://github.com/canonical/cloud-init/pull/5161
Patch14: cloud-init-usr-sudoers.patch
# FIXME https://github.com/canonical/cloud-init/issues/5152 and LP#1715241
Patch5: cloud-init-no-openstack-guess.patch
# FIXME https://github.com/canonical/cloud-init/issues/5075
Patch15: cloud-init-skip-rename.patch
Patch6: cloud-init-skip-rename.patch
# FIXME https://github.com/canonical/cloud-init/pull/6105
Patch7: cloud-init-ssh-usrmerge.patch
# FIXME https://github.com/canonical/cloud-init/pull/6121
Patch8: cloud-init-lint-set-interpreter.patch
Patch9: cloud-init-lint-fix.patch
# FIXME https://github.com/canonical/cloud-init/blob/ubuntu/noble/debian/patches/no-single-process.patch
# We have an old version of netcat that does not support the necessary
# feature to support a single process for cloud-init. Once we have netcat
# 1.226 or later available we can get rid of this patch
# Maybe there is hope for 16 https://jira.suse.com/browse/PED-12810
Patch11: cloud-init-no-single-process.patch
# FIXME https://github.com/canonical/cloud-init/pull/6214
Patch12: cloud-init-needs-action.patch
BuildRequires: fdupes
BuildRequires: filesystem
# pkg-config is needed to find correct systemd unit dir
@@ -61,49 +68,50 @@ BuildRequires: pkg-config
BuildRequires: pkgconfig(udev)
BuildRequires: procps
BuildRequires: python-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: %{pythons}-devel
BuildRequires: %{pythons}-setuptools
# Test requirements
BuildRequires: python3-Jinja2
BuildRequires: python3-PyYAML
BuildRequires: python3-configobj >= 5.0.2
BuildRequires: python3-flake8
BuildRequires: python3-httpretty
BuildRequires: python3-jsonpatch
BuildRequires: python3-jsonschema
BuildRequires: python3-netifaces
BuildRequires: python3-oauthlib
BuildRequires: python3-passlib
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-mock
BuildRequires: python3-requests
BuildRequires: python3-responses
BuildRequires: python3-serial
BuildRequires: %{pythons}-Jinja2
BuildRequires: %{pythons}-PyYAML
BuildRequires: %{pythons}-configobj >= 5.0.2
BuildRequires: %{pythons}-flake8
BuildRequires: %{pythons}-httpretty
BuildRequires: %{pythons}-jsonpatch
BuildRequires: %{pythons}-jsonschema
BuildRequires: %{pythons}-oauthlib
BuildRequires: %{pythons}-passlib
BuildRequires: %{pythons}-pytest
BuildRequires: %{pythons}-pytest-cov
BuildRequires: %{pythons}-pytest-mock
BuildRequires: %{pythons}-requests
BuildRequires: %{pythons}-responses
BuildRequires: %{pythons}-serial
BuildRequires: system-user-nobody
BuildRequires: distribution-release
BuildRequires: util-linux
Requires: bash
%if 0%{?suse_version} >= 1600
Requires: dhcpcd
%else
Requires: dhcp-client
%endif
Requires: file
Requires: growpart
Requires: e2fsprogs
Requires: net-tools
Requires: openssh
Requires: procps
Requires: python3-configobj >= 5.0.2
Requires: python3-Jinja2
Requires: python3-jsonpatch
Requires: python3-jsonschema
Requires: python3-netifaces
Requires: python3-oauthlib
Requires: python3-passlib
Requires: python3-pyserial
Requires: python3-PyYAML
Requires: python3-requests
Requires: python3-serial
Requires: python3-setuptools
Requires: python3-xml
Requires: %{pythons}-configobj >= 5.0.2
Requires: %{pythons}-Jinja2
Requires: %{pythons}-jsonpatch
Requires: %{pythons}-jsonschema
Requires: %{pythons}-oauthlib
Requires: %{pythons}-passlib
Requires: %{pythons}-PyYAML
Requires: %{pythons}-requests
Requires: %{pythons}-serial
Requires: %{pythons}-setuptools
Requires: %{pythons}-xml
Requires: sudo
Requires: util-linux
Requires: wget
@@ -156,16 +164,13 @@ Documentation and examples for cloud-init tools
%patch -P 2
%patch -P 3
%patch -P 4
%patch -P 5
%patch -P 6
%patch -P 7
%patch -P 8
%patch -P 9
%patch -P 10
%patch -P 11
%patch -P 12
%patch -P 13
%patch -P 14
%patch -P 15
# patch in the full version to version.py
version_pys=$(find . -name version.py -type f)
@@ -174,14 +179,26 @@ version_pys=$(find . -name version.py -type f)
sed -i "s,@@PACKAGED_VERSION@@,%{version}-%{release}," $version_pys
%build
%python3_build
%python_build
%check
# Total HACK, we have no macro that expands the proper Python interpreter
# in a way that it can be used to set en environment variable
if [ -e /usr/bin/python3.13 ]; then
export PYTHON=/usr/bin/python3.13
else
export PYTHON=/usr/bin/python3.11
fi
make unittest
make lint
# Disable the flake checks and accept the bugs we may introduce with the
# patches. On SLE 15 SP5 flake dies with some weird internal error
#make lint
%install
%python3_install --init-system=%{initsys} --distro=suse
%python_exec setup.py install --prefix=%{_prefix} --init-system=%{initsys} --distro=suse --root=%{buildroot}
find %{buildroot} \( -name .gitignore -o -name .placeholder \) -delete
# from debian install script
for x in "%{buildroot}%{_bindir}/"*.py; do
@@ -206,12 +223,15 @@ sed -i s/suse/opensuse/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
sed -i s/suse/sles/ %{buildroot}/%{_sysconfdir}/cloud/cloud.cfg
%endif
%endif
mkdir -p %{buildroot}/%{systemd_prefix}/systemd/system/sshd-keygen@.service.d
mkdir -p %{buildroot}/%{_sysconfdir}/rsyslog.d
mkdir -p %{buildroot}/usr/lib/udev/rules.d/
cp -a %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
mkdir -p %{buildroot}%{_sbindir}
%if 0%{?suse_version} < 1600
install -m 755 %{SOURCE2} %{buildroot}%{_sbindir}
sed -i "s/python3/python3.11/" %{buildroot}%{_sbindir}/hidesensitivedata
%endif
# remove debian/ubuntu specific profile.d file (bnc#779553)
rm -f %{buildroot}%{_sysconfdir}/profile.d/Z99-cloud-locale-test.sh
@@ -222,50 +242,56 @@ rm %{buildroot}/%{_sysconfdir}/cloud/templates/*.ubuntu.*
# remove duplicate files
%if 0%{?suse_version}
%fdupes %{buildroot}%{python3_sitelib}
%fdupes %{buildroot}%{_sitelibdir}
%endif
%if 0%{?suse_version} < 1600
%post
/usr/sbin/hidesensitivedata
%endif
%files
%defattr(-,root,root)
%dir %attr(0755, root, root) %{_localstatedir}/lib/cloud
%dir %{_sysconfdir}/cloud
%dir %{docdir}
%dir %{_sysconfdir}/rsyslog.d
%dir %{systemd_prefix}/systemd/system/sshd-keygen@.service.d
%license LICENSE LICENSE-GPLv3
%{_bindir}/cloud-id
%{_bindir}/cloud-init
%{_bindir}/cloud-init-per
%if 0%{?suse_version} < 1600
%{_sbindir}/hidesensitivedata
%dir %{_sysconfdir}/cloud
%dir %{_sysconfdir}/cloud/clean.d
%{_sysconfdir}/cloud/clean.d/README
%endif
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d
%config(noreplace) %{_sysconfdir}/cloud/templates
%{_sysconfdir}/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf
%{systemd_prefix}/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf
%{_mandir}/man*/*
%if 0%{?suse_version} && 0%{?suse_version} < 1500
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%endif
%{_datadir}/bash-completion/completions/cloud-init
%{python3_sitelib}/cloudinit
%{python3_sitelib}/cloud_init-%{version}*.egg-info
%{_sitelibdir}/cloudinit
%{_sitelibdir}/cloud_init-%{version}*.egg-info
%{_prefix}/lib/cloud-init
%{systemd_prefix}/systemd/system-generators/cloud-init-generator
%{systemd_prefix}/systemd/system/cloud-config.service
%{systemd_prefix}/systemd/system/cloud-config.target
%{systemd_prefix}/systemd/system/cloud-init-local.service
%{systemd_prefix}/systemd/system/cloud-init.service
%{systemd_prefix}/systemd/system/cloud-init-main.service
%{systemd_prefix}/systemd/system/cloud-init-network.service
%{systemd_prefix}/systemd/system/cloud-init.target
%{systemd_prefix}/systemd/system/cloud-final.service
%dir %{_sysconfdir}/rsyslog.d
%{_sysconfdir}/rsyslog.d/21-cloudinit.conf
/usr/lib/udev/rules.d/66-azure-ephemeral.rules
%{_prefix}/lib/udev/rules.d/66-azure-ephemeral.rules
# We use cloud-netconfig to handle new interfaces added to the instance
%exclude %{systemd_prefix}/systemd/system/cloud-init-hotplugd.service
%exclude %{systemd_prefix}/systemd/system/cloud-init-hotplugd.socket
%dir %attr(0755, root, root) %{_localstatedir}/lib/cloud
%dir %{docdir}
%dir /etc/systemd/system/sshd-keygen@.service.d
%files config-suse