-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(24.04): netplan.io and dependencies #276
Open
Meulengracht
wants to merge
7
commits into
canonical:ubuntu-24.04
Choose a base branch
from
Meulengracht:slices/netplan
base: ubuntu-24.04
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c4c949a
slices: add netplan and dependencies
Meulengracht 83c89fe
tests,slices: correct a couple of slices, add tests
Meulengracht df4c241
slices/netplan-generator: sort bins contents
Meulengracht 75a57e3
slices: do not add the python3 symlink, do it in test instead
Meulengracht 260fea7
Merge branch 'ubuntu-24.04' into slices/netplan
Meulengracht e814b0e
Merge branch 'ubuntu-24.04' into slices/netplan
cjdcordeiro 0cfb43f
Merge branch 'ubuntu-24.04' into slices/netplan
cjdcordeiro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package: iproute2 | ||
|
||
essential: | ||
- iproute2_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- iproute2_config | ||
- iproute2_libs | ||
- libbpf1_libs | ||
- libc6_libs | ||
- libcap2-bin_bins | ||
- libcap2_libs | ||
- libdb5.3t64_libs | ||
- libelf1t64_libs | ||
- libmnl0_libs | ||
- libselinux1_libs | ||
- libtirpc3t64_libs | ||
- libxtables12_libs | ||
contents: | ||
/bin/ip: | ||
/bin/ss: | ||
/sbin/bridge: | ||
/sbin/dcb: | ||
/sbin/devlink: | ||
/sbin/ip: | ||
/sbin/rtacct: | ||
/sbin/rtmon: | ||
/sbin/tc: | ||
/sbin/tipc: | ||
/sbin/vdpa: | ||
/usr/bin/ctstat: | ||
/usr/bin/lnstat: | ||
/usr/bin/nstat: | ||
/usr/bin/rdma: | ||
/usr/bin/routel: | ||
/usr/bin/rtstat: | ||
/usr/sbin/arpd: | ||
/usr/sbin/genl: | ||
|
||
config: | ||
contents: | ||
/etc/iproute2/bpf_pinning: | ||
/etc/iproute2/ematch_map: | ||
/etc/iproute2/group: | ||
/etc/iproute2/nl_protos: | ||
/etc/iproute2/rt_dsfield: | ||
/etc/iproute2/rt_protos: | ||
/etc/iproute2/rt_realms: | ||
/etc/iproute2/rt_scopes: | ||
/etc/iproute2/rt_tables: | ||
|
||
libs: | ||
contents: | ||
/usr/lib/*-linux-*/tc/experimental.dist: | ||
/usr/lib/*-linux-*/tc/m_ipt.so: | ||
/usr/lib/*-linux-*/tc/m_xt.so: | ||
/usr/lib/*-linux-*/tc/normal.dist: | ||
/usr/lib/*-linux-*/tc/pareto.dist: | ||
/usr/lib/*-linux-*/tc/paretonormal.dist: | ||
/usr/lib/*-linux-*/tc/q_atm.so: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/iproute2/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package: libbpf1 | ||
|
||
essential: | ||
- libbpf1_copyright | ||
|
||
slices: | ||
libs: | ||
essential: | ||
- libc6_libs | ||
- libelf1t64_libs | ||
- zlib1g_libs | ||
contents: | ||
/usr/lib/*-linux-*/libbpf.so.1*: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/libbpf1/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package: libmnl0 | ||
|
||
essential: | ||
- libmnl0_copyright | ||
|
||
slices: | ||
libs: | ||
essential: | ||
- libc6_libs | ||
contents: | ||
/usr/lib/*-linux-*/libmnl.so.0*: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/libmnl0/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package: libnetplan1 | ||
|
||
essential: | ||
- libnetplan1_copyright | ||
|
||
slices: | ||
libs: | ||
essential: | ||
- libc6_libs | ||
- libglib2.0-0t64_libs | ||
- libuuid1_libs | ||
- libyaml-0-2_libs | ||
contents: | ||
/usr/lib/*-linux-*/libnetplan.so.1*: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/libnetplan1/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package: libxtables12 | ||
|
||
essential: | ||
- libxtables12_copyright | ||
|
||
slices: | ||
libs: | ||
essential: | ||
- libc6_libs | ||
contents: | ||
/usr/lib/*-linux-*/libxtables.so.12*: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/libxtables12/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package: netplan-generator | ||
|
||
essential: | ||
- netplan-generator_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- libc6_libs | ||
- libglib2.0-0t64_libs | ||
- libnetplan1_libs | ||
- systemd_bins | ||
contents: | ||
/usr/lib/systemd/system-generators/netplan: | ||
/usr/libexec/netplan/generate: | ||
|
||
# the generator needs the folder and thus carry | ||
# a placeholder file, it will be removed and a | ||
# symlink to /usr/libexec/netplan/generate will | ||
# be created in this folder | ||
placeholder: | ||
contents: | ||
/usr/lib/netplan/PLACEHOLDER: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/netplan-generator/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package: netplan.io | ||
|
||
essential: | ||
- netplan.io_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- iproute2_bins | ||
- libc6_libs | ||
- libglib2.0-0t64_libs | ||
- libnetplan1_libs | ||
- libsystemd0_libs | ||
- netplan-generator_bins | ||
- netplan.io_scripts | ||
- python3-dbus_data | ||
- python3-netifaces_data | ||
- python3-netplan_data | ||
- python3-yaml_data | ||
- python3.12_standard | ||
- systemd_bins | ||
contents: | ||
/usr/sbin/netplan: | ||
|
||
scripts: | ||
contents: | ||
/usr/share/netplan/netplan.script: | ||
/usr/share/netplan/netplan_cli/**: | ||
|
||
dbus-service: | ||
contents: | ||
/usr/libexec/netplan/netplan-dbus: | ||
/usr/share/dbus-1/system-services/io.netplan.Netplan.service: | ||
/usr/share/dbus-1/system.d/io.netplan.Netplan.conf: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/netplan.io/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package: python3-cffi-backend | ||
|
||
essential: | ||
- python3-cffi-backend_copyright | ||
|
||
slices: | ||
data: | ||
essential: | ||
- libc6_libs | ||
- libffi8_libs | ||
- python3.12_standard | ||
contents: | ||
/usr/lib/python3/dist-packages/_cffi_backend.cpython-*-linux-*.so: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/python3-cffi-backend/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package: python3-dbus | ||
|
||
essential: | ||
- python3-dbus_copyright | ||
|
||
slices: | ||
data: | ||
essential: | ||
- libc6_libs | ||
- libdbus-1-3_libs | ||
- libglib2.0-0t64_libs | ||
- python3.12_standard | ||
contents: | ||
/usr/lib/python3/dist-packages/_dbus_bindings.cpython-*-linux-*.so: | ||
/usr/lib/python3/dist-packages/_dbus_glib_bindings.cpython-*-linux-*.so: | ||
/usr/lib/python3/dist-packages/dbus/**: | ||
/usr/lib/python3/dist-packages/dbus_python-1.3.2.egg-info/PKG-INFO: | ||
/usr/lib/python3/dist-packages/dbus_python-1.3.2.egg-info/dependency_links.txt: | ||
/usr/lib/python3/dist-packages/dbus_python-1.3.2.egg-info/not-zip-safe: | ||
/usr/lib/python3/dist-packages/dbus_python-1.3.2.egg-info/top_level.txt: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/python3-dbus/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package: python3-netifaces | ||
|
||
essential: | ||
- python3-netifaces_copyright | ||
|
||
slices: | ||
data: | ||
essential: | ||
- libc6_libs | ||
- python3.12_standard | ||
contents: | ||
/usr/lib/python3/dist-packages/netifaces-0.11.0.egg-info/PKG-INFO: | ||
/usr/lib/python3/dist-packages/netifaces-0.11.0.egg-info/dependency_links.txt: | ||
/usr/lib/python3/dist-packages/netifaces-0.11.0.egg-info/top_level.txt: | ||
/usr/lib/python3/dist-packages/netifaces-0.11.0.egg-info/zip-safe: | ||
/usr/lib/python3/dist-packages/netifaces.cpython-*.so: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/python3-netifaces/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package: python3-netplan | ||
|
||
essential: | ||
- python3-netplan_copyright | ||
|
||
slices: | ||
data: | ||
essential: | ||
- libc6_libs | ||
- libnetplan1_libs | ||
- python3-cffi-backend_data | ||
- python3.12_standard | ||
contents: | ||
/usr/lib/python3/dist-packages/netplan/**: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/python3-netplan/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package: python3-yaml | ||
|
||
essential: | ||
- python3-yaml_copyright | ||
|
||
slices: | ||
data: | ||
essential: | ||
- libc6_libs | ||
- libyaml-0-2_libs | ||
- python3.12_standard | ||
contents: | ||
/usr/lib/python3/dist-packages/PyYAML-6.0.1.dist-info/INSTALLER: | ||
/usr/lib/python3/dist-packages/PyYAML-6.0.1.dist-info/METADATA: | ||
/usr/lib/python3/dist-packages/PyYAML-6.0.1.dist-info/WHEEL: | ||
/usr/lib/python3/dist-packages/PyYAML-6.0.1.dist-info/top_level.txt: | ||
/usr/lib/python3/dist-packages/_yaml/__init__.py: | ||
/usr/lib/python3/dist-packages/yaml/**: | ||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/python3-yaml/copyright: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
summary: Integration tests for iproute2 | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices bash_bins passwd_config base-files_base grep_bins iproute2_bins)" | ||
|
||
# iproute2 needs dev mounted | ||
mkdir "${rootfs}"/dev | ||
mount --rbind /dev "${rootfs}"/dev | ||
|
||
cp test.sh "${rootfs}/" | ||
chroot "${rootfs}/" /test.sh | ||
|
||
umount -l "${rootfs}"/dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# smoketest ip commands | ||
ip --help | grep "Usage:" | ||
|
||
# test some basic commands and against loopback that | ||
# we can kinda expect is there | ||
ip link | grep "LOOPBACK,UP" | ||
ip addr | grep "inet 127.0.0.1" | ||
ip route | grep -E "default via [0-9\.]+" | ||
|
||
# iproute carries many binaries | ||
# so maybe extend as needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
summary: Integration tests for netplan.io | ||
|
||
execute: | | ||
# Chisel a minimum number of slices to give us a runnable system that we can | ||
# test in. | ||
rootfs="$(install-slices bash_bins coreutils_bins passwd_config base-files_base grep_bins netplan.io_bins)" | ||
|
||
# netplan needs proc and dev mounted | ||
mkdir "${rootfs}"/proc | ||
mount -t proc /proc "${rootfs}"/proc | ||
|
||
mkdir "${rootfs}"/dev | ||
mount --rbind /dev "${rootfs}"/dev | ||
|
||
cp test.sh "${rootfs}/" | ||
chroot "${rootfs}/" /test.sh | ||
|
||
umount -l "${rootfs}"/dev | ||
umount "${rootfs}"/proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are any of the |
||
|
||
# create python3 symlink | ||
ln -s /usr/bin/python3.12 /usr/bin/python3 | ||
|
||
# smoketest a couple of netplan commands | ||
netplan --help | grep "Network configuration in YAML" | ||
netplan info | grep "features" | ||
|
||
# 'netplan generate' needs udevadm to work | ||
# 'netplan apply' needs udevadm to work | ||
# 'netplan status' does not properly work inside chroot |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please also test the other binaries being installed? I know it might be tedious, but that's the only way we can ensure the slice has all it needs for them to behave properly