Skip to content

Commit 39a3f0a

Browse files
committed
Merge branch 'main' into 2.0
2 parents 120e640 + b225a2e commit 39a3f0a

File tree

5 files changed

+150
-0
lines changed

5 files changed

+150
-0
lines changed

SPECS/LICENSES-AND-NOTICES/data/licenses.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,6 +2400,12 @@
24002400
"zstd"
24012401
]
24022402
},
2403+
"Netplan source": {
2404+
"license": "[GPLv3](https://github.com/canonical/netplan/blob/main/COPYING)",
2405+
"specs": [
2406+
"netplan"
2407+
]
2408+
},
24032409
"NVIDIA": {
24042410
"license": "[ASL 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)",
24052411
"specs": [
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Signatures": {
3+
"netplan-0.95.tar.gz": "54d297c9bef910a63580a03ddf04eabe44be894b961c5efce3788daedf9dd527"
4+
}
5+
}

SPECS/netplan/netplan.spec

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Ubuntu calls their own software netplan.io in the archive due to name conflicts
2+
%global ubuntu_name netplan.io
3+
4+
# If the definition isn't available for python3_pkgversion, define it
5+
%global python3_pkgversion 3
6+
7+
# If this isn't defined, define it
8+
%{?!_systemdgeneratordir:%global _systemdgeneratordir /usr/lib/systemd/system-generators}
9+
10+
# Force auto-byte-compilation to Python 3
11+
%global __python %{__python3}
12+
13+
14+
Name: netplan
15+
Version: 0.95
16+
Release: 1%{?dist}
17+
Summary: Network configuration tool using YAML
18+
Group: System Environment/Base
19+
Vendor: Microsoft Corporation
20+
Distribution: Mariner
21+
License: GPLv3
22+
URL: https://netplan.io/
23+
# Source0: https://github.com/canonical/%{name}/archive/%{version}/%{version}.tar.gz
24+
Source0: %{name}-%{version}.tar.gz
25+
26+
BuildRequires: gcc
27+
BuildRequires: make
28+
BuildRequires: bash-completion-devel
29+
BuildRequires: libgcc-devel
30+
BuildRequires: bash-devel
31+
BuildRequires: systemd-devel
32+
BuildRequires: glib-devel
33+
BuildRequires: libyaml-devel
34+
BuildRequires: util-linux-devel
35+
BuildRequires: python%{python3_pkgversion}-devel
36+
# For tests
37+
BuildRequires: iproute
38+
BuildRequires: python%{python3_pkgversion}-coverage
39+
BuildRequires: python%{python3_pkgversion}-netifaces
40+
BuildRequires: python%{python3_pkgversion}-pycodestyle
41+
BuildRequires: python%{python3_pkgversion}-PyYAML
42+
43+
# /usr/sbin/netplan is a Python 3 script that requires netifaces and PyYAML
44+
Requires: python%{python3_pkgversion}-netifaces
45+
Requires: python%{python3_pkgversion}-PyYAML
46+
# 'ip' command is used in netplan apply subcommand
47+
Requires: iproute
48+
49+
# netplan supports either systemd or NetworkManager as backends to configure the network
50+
Requires: systemd
51+
Requires: wpa_supplicant
52+
53+
%description
54+
netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators,
55+
installers, cloud image instantiations, or other OS deployments. During early boot, it generates
56+
backend specific configuration files in /run to hand off control of devices to a particular
57+
networking daemon.
58+
59+
Currently supported backends are systemd-networkd and NetworkManager.
60+
61+
62+
%prep
63+
%autosetup -p1
64+
65+
# Drop -Werror to avoid the following error:
66+
# /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: 'ip_str' may be used uninitialized in this function [-Werror=maybe-uninitialized]
67+
sed -e "s/-Werror//g" -i Makefile
68+
# Do not use Pandoc to format documentation
69+
sed -e "s/pandoc/echo pandoc/g" -i Makefile
70+
cp doc/netplan.md doc/netplan.5
71+
cp doc/netplan.md doc/netplan.html
72+
# No man8 files only man5 files are generated
73+
sed -e "s/*.8/*.5/g" -i Makefile
74+
sed -e "s/man8/man5/g" -i Makefile
75+
76+
%build
77+
%make_build CFLAGS="%{optflags}"
78+
79+
80+
%install
81+
%make_install ROOTPREFIX=%{_prefix}
82+
83+
# Pre-create the config directory
84+
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
85+
# Invalid symlink. Make it correct symlink
86+
rm -r %{buildroot}%{_systemdgeneratordir}/%{name}
87+
ln -s %{_libdir}/netplan/generate %{buildroot}%{_systemdgeneratordir}/%{name}
88+
89+
%check
90+
make check
91+
92+
%files
93+
%license COPYING
94+
%doc debian/changelog
95+
%doc %{_docdir}/%{name}/
96+
%{_sbindir}/%{name}
97+
%{_datadir}/%{name}/
98+
%{_unitdir}/%{name}*.service
99+
%{_systemdgeneratordir}/%{name}
100+
%{_mandir}/man5/%{name}.5*
101+
%dir %attr(0755, root, root) %{_sysconfdir}/%{name}
102+
%{_prefix}/lib/%{name}/
103+
%{_datadir}/bash-completion/completions/%{name}
104+
105+
106+
%changelog
107+
* Fri Sep 17 2021 Suresh Babu Chalamalasetty <[email protected]> - 0.95-1
108+
- Initial CBL-Mariner import from Netplan source (license: GPLv3)
109+
- License verified
110+
- Update netplan to Netplan
111+
112+
* Fri Dec 14 2018 Mathieu Trudel-Lapierre <[email protected]> - 0.95
113+
- Update to 0.95
114+
115+
* Sat Oct 13 2018 Neal Gompa <[email protected]> - 0.40.3-0
116+
- Rebase to 0.40.3
117+
118+
* Tue Mar 13 2018 Neal Gompa <[email protected]> - 0.34-0.1
119+
- Update to 0.34
120+
121+
* Wed Mar 7 2018 Neal Gompa <[email protected]> - 0.33-0.1
122+
- Rebase to 0.33
123+
124+
* Sat Nov 4 2017 Neal Gompa <[email protected]> - 0.30-1
125+
- Rebase to 0.30
126+
127+
* Sun Jul 2 2017 Neal Gompa <[email protected]> - 0.23~17.04.1-1
128+
- Initial packaging

cgmanifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14508,6 +14508,16 @@
1450814508
}
1450914509
}
1451014510
},
14511+
{
14512+
"component": {
14513+
"type": "other",
14514+
"other": {
14515+
"name": "netplan",
14516+
"version": "0.95",
14517+
"downloadUrl": "https://github.com/canonical/netplan/archive/0.95/0.95.tar.gz"
14518+
}
14519+
}
14520+
},
1451114521
{
1451214522
"component": {
1451314523
"type": "other",

toolkit/scripts/spec_source_attributions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"Microsoft": r'\n-\s+(Original version for CBL-Mariner|Initial CBL-Mariner import from Azure)( \(license: MIT\))?(\.|\n|$)',
1111
"CentOS": r'\n-\s+Initial CBL-Mariner import from CentOS \d+ \(license: MIT\)(\.|\n|$)',
1212
"Ceph source": r'\n-\s+Initial CBL-Mariner import from Ceph source \(license: LGPLv2.1\)(\.|\n|$)',
13+
"Netplan source": r'\n-\s+Initial CBL-Mariner import from Netplan source \(license: GPLv3\)(\.|\n|$)',
1314
"Fedora": r'\n-\s+Initial CBL-Mariner import from Fedora \d+ \(license: MIT\)(\.|\n|$)',
1415
"Magnus Edenhill Open Source": r'\n-\s+Initial CBL-Mariner import from Magnus Edenhill Open Source \(license: BSD\)(\.|\n|$)',
1516
"NVIDIA": r'\n-\s+Initial CBL-Mariner import from NVIDIA \(license: ASL 2\.0\)(\.|\n|$)',

0 commit comments

Comments
 (0)