[PATCH v2 4/6] CI: use Alpine's network setup

Marek Marczykowski-Górecki posted 6 patches 1 day ago
[PATCH v2 4/6] CI: use Alpine's network setup
Posted by Marek Marczykowski-Górecki 1 day ago
This allows Alpine startup script to properly handle service
dependencies - necessary for starting dropbear ssh server.
For the latter, always take the IP address from DHCP, in addition to the
test-local one.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/scripts/qubes-x86-64.sh | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
index 7a59fa5f1116..91c0d5bec829 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -214,25 +214,23 @@ cat "${dom0_rootfs_parts[@]}" > binaries/dom0-rootfs.cpio.gz
 # test-local configuration
 mkdir -p rootfs
 cd rootfs
-mkdir -p boot etc/local.d root
+mkdir -p boot etc/local.d root etc/network
 cp -a ../automation/scripts/run-tools-tests root/
 
+echo "
+auto xenbr0
+iface xenbr0 inet dhcp
+    bridge-ports eth0
+    bridge-stp 0
+    up ip a a 192.168.0.1/24 dev \$IFACE
+" > etc/network/interfaces
+
 echo "#!/bin/bash
 
 bash /etc/init.d/xencommons start
 
-brctl addbr xenbr0
-brctl addif xenbr0 eth0
-ifconfig eth0 up
-ifconfig xenbr0 up
-ifconfig xenbr0 192.168.0.1
-
 " > etc/local.d/xen.start
 
-if [ -n "$retrieve_xml" ]; then
-    echo "timeout 30s udhcpc -i xenbr0" >> etc/local.d/xen.start
-fi
-
 if [ -n "$domU_check" ]; then
     echo "
 # get domU console content into test log
-- 
git-series 0.9.1

Re: [PATCH v2 4/6] CI: use Alpine's network setup
Posted by Ariadne Conill 6 hours ago
Hi,

On 3/31/26 16:24, Marek Marczykowski-Górecki wrote:
> This allows Alpine startup script to properly handle service
> dependencies - necessary for starting dropbear ssh server.
> For the latter, always take the IP address from DHCP, in addition to the
> test-local one.
>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
>   automation/scripts/qubes-x86-64.sh | 20 +++++++++-----------
>   1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> index 7a59fa5f1116..91c0d5bec829 100755
> --- a/automation/scripts/qubes-x86-64.sh
> +++ b/automation/scripts/qubes-x86-64.sh
> @@ -214,25 +214,23 @@ cat "${dom0_rootfs_parts[@]}" > binaries/dom0-rootfs.cpio.gz
>   # test-local configuration
>   mkdir -p rootfs
>   cd rootfs
> -mkdir -p boot etc/local.d root
> +mkdir -p boot etc/local.d root etc/network
>   cp -a ../automation/scripts/run-tools-tests root/
>   
> +echo "
> +auto xenbr0
> +iface xenbr0 inet dhcp
> +    bridge-ports eth0
> +    bridge-stp 0
> +    up ip a a 192.168.0.1/24 dev \$IFACE

Why not "address 192.168.0.1/24" here?  The DHCP client will still get 
run.  You can verify with ifquery(8).

Ariadne