commit f6f3240e618459dcdca1b2b0ab6b862b69f1617741f248c2e988da2923abd0cc Author: Adrian Schröter Date: Fri May 3 11:37:05 2024 +0200 Sync from SUSE:SLFO:Main cloud-netconfig revision e96c072bdb77d9aaadff0ae7ffb96739 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..90d7551 --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + + azure + ec2 + gce + diff --git a/cloud-netconfig-1.13.tar.bz2 b/cloud-netconfig-1.13.tar.bz2 new file mode 100644 index 0000000..dbc0efe --- /dev/null +++ b/cloud-netconfig-1.13.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09d110f880237769e075f17f5a9d779d32fbc3c90523ab4d129be9ca302a18db +size 24663 diff --git a/cloud-netconfig.changes b/cloud-netconfig.changes new file mode 100644 index 0000000..1bb3354 --- /dev/null +++ b/cloud-netconfig.changes @@ -0,0 +1,203 @@ +------------------------------------------------------------------- +Sat Mar 9 11:22:32 UTC 2024 - Robert Schweikert + +- Add version settings to Provides/Obsoletes + +------------------------------------------------------------------- +Sat Mar 9 02:53:11 UTC 2024 - Robert Schweikert + +- Update to version 1.12 (bsc#1221202) + + If token access succeeds using IPv4 do not use the IPv6 endpoint + only use the IPv6 IMDS endpoint if IPv4 access fails. + +------------------------------------------------------------------- +Mon Feb 26 16:24:48 UTC 2024 - Joachim Gleissner + +- Add Provides/Obsoletes for dropped cloud-netconfig-nm +- Install dispatcher script into /etc/NetworkManager/dispatcher.d + on older distributions +- Add BuildReqires: NetworkManager to avoid owning dispatcher.d + parent directory + +------------------------------------------------------------------- +Thu Feb 8 10:15:40 UTC 2024 - Joachim Gleissner + +- Update to version 1.11: + + Revert address metadata lookup in GCE to local lookup (bsc#1219454) + + Fix hang on warning log messages + + Check whether getting IPv4 addresses from metadata failed and abort + if true + + Only delete policy rules if they exist + + Skip adding/removing IPv4 ranges if metdata lookup failed + + Improve error handling and logging in Azure + + Set SCRIPTDIR when installing netconfig wrapper + +------------------------------------------------------------------- +Fri Jan 19 14:20:48 UTC 2024 - Joachim Gleissner + +- Update to version 1.10: + + Drop cloud-netconfig-nm sub package and include NM dispatcher + script in main packages (bsc#1219007) + + Spec file cleanup + +------------------------------------------------------------------- +Wed Jan 17 11:24:02 UTC 2024 - Joachim Gleissner + +- Update to version 1.9: + + Drop package dependency on sysconfig-netconfig + + Improve log level handling + + Support IPv6 IMDS endpoint in EC2 (bsc#1218069) + +------------------------------------------------------------------- +Wed Aug 30 06:26:29 UTC 2023 - Joachim Gleissner + +- Update to version 1.8: + + Fix Azure metadata check (bsc#1214715) + + Fix cleanup on ifdown + +------------------------------------------------------------------- +Fri Dec 16 14:32:31 UTC 2022 - Joachim Gleissner + +- Update to version 1.7: + + Overhaul policy routing setup (issue #19) + + Support alias IPv4 ranges (issue #14) + + Add support for NetworkManager (bsc#1204549) + + Remove dependency on netconfig + + Install into libexec directory + + Clear stale ifcfg files for accelerated NICs (bsc#1199853) + + More debug messages + + Documentation update + +------------------------------------------------------------------- +Sun Sep 18 17:14:16 UTC 2022 - Christian Boltz + +- /etc/netconfig.d/ moved to /usr/libexec/netconfig/netconfig.d/ in + Tumbleweed, update path (poo#116221) + +------------------------------------------------------------------- +Fri Aug 27 15:00:18 UTC 2021 - Joachim Gleissner + +- Update to version 1.6: + + Ignore proxy when accessing metadata (bsc#1187939) + + Print warning in case metadata is not accessible + + Documentation update + +------------------------------------------------------------------- +Thu Nov 5 16:12:48 UTC 2020 - Joachim Gleissner + +- Update to version 1.5: + + Add support for GCE (bsc#1159460, bsc#1178486) + + Improve default gateway determination + +------------------------------------------------------------------- +Tue Feb 4 17:31:29 UTC 2020 - Joachim Gleissner + +- Update to version 1.4: + + copy routes from default routing table (bsc#1162705, bsc#1162707) + + make CLOUD_NETCONFIG_MANAGE default configurable + +------------------------------------------------------------------- +Mon Feb 3 12:10:34 UTC 2020 - Dominique Leuenberger + +- BuildRequire pkgconfig(udev) instead of udev: allow OBS to + shortcut through the -mini flavors. + +------------------------------------------------------------------- +Thu Nov 28 15:22:49 UTC 2019 - Joachim Gleissner + +- Removed obsolete Group tag from spec file + +------------------------------------------------------------------- +Tue Nov 26 16:31:27 UTC 2019 - Joachim Gleissner + +- Update to version 1.3: + + Fix IPv4 address handling on secondary NICs in Azure + +------------------------------------------------------------------- +Tue Nov 26 08:43:38 UTC 2019 - Joachim Gleissner + +- Update to version 1.2: + + support AWS IMDSv2 token + +------------------------------------------------------------------- +Thu Nov 21 13:19:18 UTC 2019 - Joachim Gleissner + +- Update to version 1.1 + + fix use of GATEWAY variable (bsc#1157117, bsc#1157190) + + remove secondary IPv4 address only when added by cloud-netconfig + (bsc#1144282) + + simplify routing setup for single NIC systems (partly fixes + bsc#1135592) + +------------------------------------------------------------------- +Thu May 16 13:32:26 UTC 2019 - Joachim Gleissner + +- Update to version 1.0: + + pause and retry if API call throttling is detected in Azure + (bsc#1135257 bsc#1135263) + +------------------------------------------------------------------- +Thu Jan 31 13:14:18 UTC 2019 - Joachim Gleissner + +- Update to version 0.9: + + run cloud-netconfig periodically (bsc#1118783 bsc#1122013) + + do not treat eth0 special wrt routing policies (bsc#1123008) + + reduce timeout on metadata read (bsc#1112822) + +------------------------------------------------------------------- +Fri Jun 1 06:51:37 UTC 2018 - jgleissner@suse.com + +- Update to version 0.7: + + no persistent interface names in Azure (bsc#1095485) + +------------------------------------------------------------------- +Wed Jan 17 10:51:05 UTC 2018 - jgleissner@suse.com + +- Added dependency on curl +- Use otherproviders() only on SLES 11 builds + +------------------------------------------------------------------- +Fri Jan 12 15:44:29 UTC 2018 - jgleissner@suse.com + +- Remove dependency on udev-persistent-ifnames (bsc#1075484) + +------------------------------------------------------------------- +Thu Nov 9 15:57:52 UTC 2017 - adrian.glaubitz@suse.com + +- Add missing Provides/Conflicts statements to spec file + +------------------------------------------------------------------- +Fri Oct 13 15:18:33 UTC 2017 - jgleissner@suse.com + +- Prepare for SLE11 submission (bsc#1063292) + +------------------------------------------------------------------- +Fri Oct 13 13:47:05 UTC 2017 - jgleissner@suse.com + +- Update to version 0.6: + + Use tested and supported metadata API versions + +------------------------------------------------------------------- +Wed Oct 11 21:21:52 UTC 2017 - rjschwei@suse.com + +- Update to version 0.5 + + New API version for Azure metadata server + + Wait for the metadata server in EC2 + +------------------------------------------------------------------- +Tue Oct 10 07:24:43 UTC 2017 - jgleissner@suse.com + +- Update to version 0.4: + Do not touch VF interfaces in Azure (bsc#1055553) +- Prepare for SLE submission (FATE#323820, bsc#1027212) + +------------------------------------------------------------------- +Thu Sep 7 16:30:30 UTC 2017 - jgleissner@suse.com + +- Added conflict tags +- Fix requires for non-Leap platforms + +------------------------------------------------------------------- +Mon Aug 14 08:40:32 UTC 2017 - jgleissner@suse.com + +- Initial version 0.3 diff --git a/cloud-netconfig.spec b/cloud-netconfig.spec new file mode 100644 index 0000000..52b395b --- /dev/null +++ b/cloud-netconfig.spec @@ -0,0 +1,156 @@ +# +# spec file for package cloud-netconfig +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define base_name cloud-netconfig + +%if "@BUILD_FLAVOR@" == "" +%define flavor_suffix %nil +%define csp_string None +ExclusiveArch: do-not-build +%endif +%if "@BUILD_FLAVOR@" == "azure" +%define flavor_suffix -azure +%define csp_string Microsoft Azure +%endif +%if "@BUILD_FLAVOR@" == "ec2" +%define flavor_suffix -ec2 +%define csp_string Amazon EC2 +%endif +%if "@BUILD_FLAVOR@" == "gce" +%define flavor_suffix -gce +%define csp_string Google Compute Engine +%endif + +%if ! %{defined _distconfdir} +%define _distconfdir %{_sysconfdir} +%define no_dist_conf 1 +%endif + +%if 0%{?suse_version} == 1600 +%define with_sysconfig 0 +%else +%define with_sysconfig 1 +%endif + +Name: %{base_name}%{flavor_suffix} +Version: 1.13 +Release: 0 +License: GPL-3.0-or-later +Summary: Network configuration scripts for %{csp_string} +URL: https://github.com/SUSE-Enceladus/cloud-netconfig +Group: System/Management +Source0: %{base_name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +BuildRequires: NetworkManager +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(udev) +Requires: curl +Requires: udev +Provides: cloud-netconfig +Provides: cloud-netconfig-nm = %{version} +Obsoletes: cloud-netconfig-nm < %{version} +Conflicts: cloud-netconfig +%if 0%{?suse_version} == 1315 +%{?systemd_requires} +%else +%{?systemd_ordering} +%endif +%define _scriptdir %{_libexecdir}/cloud-netconfig +%if 0%{?suse_version} > 1550 +%define _netconfigdir %{_libexecdir}/netconfig.d +%define _dispatcherdir /usr/lib/NetworkManager/dispatcher.d +%else +%define _netconfigdir %{_sysconfdir}/netconfig.d +%define _dispatcherdir %{_sysconfdir}/NetworkManager/dispatcher.d +%endif + +%description -n %{base_name}%{flavor_suffix} +This package contains scripts for automatically configuring network interfaces +in %{csp_string} with full support for hotplug. + +%prep +%setup -q -n %{base_name}-%{version} + +%build + +%install +make install%{flavor_suffix} \ + DESTDIR=%{buildroot} \ + PREFIX=%{_usr} \ + SYSCONFDIR=%{_sysconfdir} \ + DISTCONFDIR=%{_distconfdir} \ + SCRIPTDIR=%{_scriptdir} \ + UDEVRULESDIR=%{_udevrulesdir} \ + UNITDIR=%{_unitdir} \ + NETCONFIGDIR=%{_netconfigdir} \ + NMDISPATCHDIR=%{_dispatcherdir} + +# Disable persistent net generator from udev-persistent-ifnames as +# it does not work for xen interfaces. This will likely produce a warning. +%if 0%{?suse_version} >= 1315 +mkdir -p %{buildroot}/%{_sysconfdir}/udev/rules.d +ln -s /dev/null %{buildroot}/%{_sysconfdir}/udev/rules.d/75-persistent-net-generator.rules +%endif + +%if %{with_sysconfig} == 1 +make install-netconfig-wrapper \ + SCRIPTDIR=%{_scriptdir} \ + DESTDIR=%{buildroot} \ + NETCONFIGDIR=%{_netconfigdir} + +# install link to cleanup script in /etc/sysconfig/network/scripts to wicked +# will find it +mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig/network/scripts +ln -s %{_scriptdir}/cloud-netconfig-cleanup %{buildroot}/%{_sysconfdir}/sysconfig/network/scripts/cloud-netconfig-cleanup +%endif + +%files -n %{base_name}%{flavor_suffix} +%defattr(-,root,root) +%{_scriptdir} +%if %{defined no_dist_conf} +%config(noreplace) %{_distconfdir}/default/cloud-netconfig +%else +%{_distconfdir}/default/cloud-netconfig +%endif +%if %{with_sysconfig} == 1 +%{_netconfigdir} +%{_sysconfdir}/sysconfig/network +%endif +%if 0%{?suse_version} >= 1315 +%{_sysconfdir}/udev/rules.d +%endif +%{_udevrulesdir}/* +%{_unitdir}/* +%{_dispatcherdir} +%doc README.md +%license LICENSE + +%pre +%service_add_pre %{base_name}.service %{base_name}.timer + +%post +%service_add_post %{base_name}.service %{base_name}.timer + +%preun +%service_del_preun %{base_name}.service %{base_name}.timer + +%postun +%service_del_postun %{base_name}.service %{base_name}.timer + +%changelog