From 6cb3fa816591129bf87200b5e24fc85c41665cce Mon Sep 17 00:00:00 2001 From: Tatsuya Kitagawa Date: Wed, 10 Jun 2020 23:29:55 +0900 Subject: [PATCH] Support archiso v44 --- .env.template | 2 +- .travis.yml | 4 ++-- README.md | 4 +--- build/iso.mk | 2 +- build/profile/checksum | 17 +++++++++-------- build/profile/mods/disable-dhcp | 6 ++++++ build/profile/mods/disable-dhcpd | 5 ----- .../disable-predictable-network-interface-names | 5 ++++- test/cidata/user-data | 4 +--- 9 files changed, 25 insertions(+), 24 deletions(-) create mode 100755 build/profile/mods/disable-dhcp delete mode 100755 build/profile/mods/disable-dhcpd diff --git a/.env.template b/.env.template index 269473f..4078af0 100644 --- a/.env.template +++ b/.env.template @@ -1,4 +1,4 @@ -OUT_ISO_DIR=${CONTAINER_OUT_DIR} +OUT_ISO_DIR=${CONTAINER_OUT_DIR}/iso # build/iso ISO_NAME=archlinux-cloud diff --git a/.travis.yml b/.travis.yml index eee19f3..2bcef78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,9 @@ deploy: api_key: secure: bAY1lV6dfCKWAwreXCi68s0v6c9LThAgGbksbScTuTJO0f1hrhT6pGNOkG4IMKkaLHdjt3P11NKlutPHYZWpXa+buYv7d6KeWweUI8J441sML5qSXM4yZ2los6pdiRcH0ioKII0Yr1/dZM6a07I9MuWffiqv7dQgZv3YQ5vOc6wb98j5BVoHOyzJF479AK21sOgy4klKglQGQsH/RT6SVJDNx2D41z73sBVmSVJiqebPRHYlUa6dVwBISwcaArmJTkFFlyl7SWplqxJrSsI2dLrBS4Jg22GY0io2lOZI+0Txs61ovJs4zw9kz25qf+mpZMIhb0dqDYdhXoWA6iNv0PUqhMqYi7S2HWh37NX9soNtdkDejAwqRY2jKJVy/jtBPJvnvI/hIXVfKdK0mpJpRnJf0wU5uejPCnrChS/Id0bG8/HEteZWyclD7GFIAxBuPClQRJW9UBJ3p32wkhUd9WrVV993yFtWQ/djsGua0lQeQ8iPJUuUOJODCf1kye3rZqb2dBqXkrnd17ihe+G9WS1hJWkE1nnVySD9ySiVEdZd4iTlJjSPspCgUgYBluaSwa6HiqoGG996+wx159Ord0XAGTC+MoFVU154rkqxc8ASiQ6w0Mi6WN7V0qhQ6+rWVGrdAkduxnH3UDEGFDo/k2Dahvm+PlR/knMMvbovfh8= file_glob: true - file: out/*.iso + file: out/iso/*.iso skip_cleanup: true on: all_branches: true - condition: $(git tag --points-at=HEAD $TRAVIS_BRANCH | wc -l) -eq 1 + condition: $(git tag --points-at=HEAD $TRAVIS_BRANCH | wc -l) -eq 1 overwrite: true diff --git a/README.md b/README.md index c22749f..7584ce9 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,13 @@ In Arch Linux, cloud-init 19.1 tries network configuration with [netctl](https:/ ... bootcmd: - | - cat << EOF > /etc/systemd/network/20-wired.network + cat << EOF > /etc/systemd/network/ethernet.network [Match] Name=eth0 [Network] DHCP=ipv4 EOF -- ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf -- systemctl start systemd-networkd systemd-resolved ... ``` diff --git a/build/iso.mk b/build/iso.mk index ea03a02..24ccbff 100644 --- a/build/iso.mk +++ b/build/iso.mk @@ -1,4 +1,4 @@ -export OUT_ISO_WORK_DIR := $(OUT_DIR)/iso +export OUT_ISO_WORK_DIR := $(OUT_DIR)/iso.work export OUT_ISO := $(OUT_ISO_DIR)/$(ISO_NAME)-$(ISO_VERSION)-x86_64.iso CLEAN_FILES += \ diff --git a/build/profile/checksum b/build/profile/checksum index 3688c87..ca0958b 100644 --- a/build/profile/checksum +++ b/build/profile/checksum @@ -3,25 +3,26 @@ a9168a4fabfff3fe22da8b9a3e1cae17f3f46d9f37779ff365a33c4d16f0b99b ./airootfs/etc 033252d5100cbb0028d7c15e075f63e4eb5ff7f1a923cd5cb547bcfd6b024f5b ./airootfs/etc/locale.conf e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./airootfs/etc/machine-id 12821379472766c37e93bdf3caba774063d8d418912aeb76cee6746d646cf07f ./airootfs/etc/modprobe.d/broadcom-wl.conf +02bbc9cf1eda6f2e82f73f28ad6c285229c0ed4bc91312d2401b5b28e1f34e0d ./airootfs/etc/systemd/network/ethernet.network +5bd7ca0d7afacd1fa98e5b8df5f08889b3e832d0b996760619f643558969f380 ./airootfs/etc/systemd/network/wireless.network 878663b61d007e54d1e64fc74232903ecb7fc054cb7c6f81ade98ea6fe15c39a ./airootfs/etc/systemd/scripts/choose-mirror 756024ef6681010980a689ac46af8ff54b371203faf06dbe00ca9ea26884bee9 ./airootfs/etc/systemd/system/choose-mirror.service b6d14727ec465bb66d0a0358163b1bbfafcb4eaed55a0f57c30aabafae7eed68 ./airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount 1c0f19ea3f816071ed8325eda522f03daf24cf6b8220a56d0299193702f9be57 ./airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf 4cda08bdb13b2a0a5c564f208dfed4a4f0282b61bf4568fe511987bc3267c170 ./airootfs/etc/systemd/system/pacman-init.service -bec077c76fdd108bad0c54c3e74708b0bc7751b7c58efad1b5b8a1e357510896 ./airootfs/etc/udev/rules.d/81-dhcpcd.rules -9c45ee4bbd17a0e4ac7c43acb03ccf1014339e270d24a19d3080b2bbadc6ae6d ./airootfs/root/.automated_script.sh -1a759d6925719ad7b213e79844466cff03469abd05f87ae13f9583101530bab3 ./airootfs/root/customize_airootfs.sh +01f10ed81ea1d43b2dcdabc5e4c5993e690e52c754bcc081b43481e6b03cc8f9 ./airootfs/root/.automated_script.sh +24d8d4fd35fcf44700173762927a4f0048eb847e8b7f6e5282b23b83769cc7a2 ./airootfs/root/customize_airootfs.sh 41ca2e505f34cf3b403db0badaac6989b196e1e2eefed312d3591353c2512866 ./airootfs/root/install.txt 37799b2579b450a070b986b0df6fb3eaf5c6dedf135800bb46409cec9614ceb2 ./airootfs/root/.zlogin -e0efaf5a966caa9e1b2063a51809b26c0a768450def2a18305768fefa223e8d8 ./build.sh +cbfaf771659f010d05ad9b762f199769e4ed61865091c2009424fbce7e49729a ./build.sh 21a816bd0efc211e271f9cde06edc37ec78ed6532921a2bef58c69e04c3063d3 ./efiboot/loader/entries/archiso-x86_64-cd.conf 162c01a34a0c2438ba29c548c45660c2959e3c907041ed1aec668995615c8ff5 ./efiboot/loader/entries/archiso-x86_64-usb.conf -026ffb24a313b18b5a633cf90a935d016d11c044c73dc9fab9728f851ccfd999 ./efiboot/loader/entries/uefi-shell-v1-x86_64.conf -21abce4a798f4c94e093352cec9a53341693be872ecb2c51b93f45e3cf802995 ./efiboot/loader/entries/uefi-shell-v2-x86_64.conf -4ef5b8859892ed5e6821c04d2c60f55bbc1037cfa2432ab3fcdbe006a876a58d ./efiboot/loader/loader.conf +dbf934e7eb34cfb4a009b4f3bae464a491d557be5ab8384068c89edef2e2e8fa ./efiboot/loader/entries/uefi-shell-full-x86_64.conf +2ed2fe8e3146b04609756e30d8b08e396b249b2c68d919556fb2b3f7b8df2586 ./efiboot/loader/entries/uefi-shell-x86_64.conf +9c6f8ee73027dac879f93916314b021ef069389a608375d1797c61f54e0d096d ./efiboot/loader/loader.conf 3ea110029dbd7320924988b36670090fe3f1ec4f7c6b30ddb6607a0bb6d5562c ./isolinux/isolinux.cfg a1c6d59b35c770ad68e136d3d6a98d997ab721c47c6d08bc523906e7bf01fec4 ./mkinitcpio.conf -36e67e3a7ee86c35deca57479bea2b9ea57a1ed52c60e852762cf1c9394b493f ./packages.x86_64 +f26a08922b3afb617afd87545fb4d44eb339fcbe34ab3fcb43d5cd372e8e65ee ./packages.x86_64 2b72622095ef6bc1ea6243607a1a97cba068cc92e5d41451e4a72f23532c9686 ./pacman.conf d965988d9232f7e6c3e7e7d7e4fd7473cea8203d749c8b51be1ecf0bb4b8dfab ./syslinux/archiso.cfg 4637d2ff5addeac8fc49b3c659f96cd2c39a3a14e9f5a7366a46ce948377a73f ./syslinux/archiso_head.cfg diff --git a/build/profile/mods/disable-dhcp b/build/profile/mods/disable-dhcp new file mode 100755 index 0000000..e7601e2 --- /dev/null +++ b/build/profile/mods/disable-dhcp @@ -0,0 +1,6 @@ +#!/bin/bash + +set -euxo pipefail + +rm airootfs/etc/systemd/network/ethernet.network +rm airootfs/etc/systemd/network/wireless.network diff --git a/build/profile/mods/disable-dhcpd b/build/profile/mods/disable-dhcpd deleted file mode 100755 index 8c63929..0000000 --- a/build/profile/mods/disable-dhcpd +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -rm airootfs/etc/udev/rules.d/81-dhcpcd.rules diff --git a/build/profile/mods/disable-predictable-network-interface-names b/build/profile/mods/disable-predictable-network-interface-names index 5d4c0d4..651e80e 100755 --- a/build/profile/mods/disable-predictable-network-interface-names +++ b/build/profile/mods/disable-predictable-network-interface-names @@ -2,4 +2,7 @@ set -euxo pipefail -ln -s /dev/null airootfs/etc/udev/rules.d/80-net-setup-link.rules +LINK_NAME=airootfs/etc/udev/rules.d/80-net-setup-link.rules + +mkdir -p "$(dirname "${LINK_NAME}")" +ln -s /dev/null "${LINK_NAME}" diff --git a/test/cidata/user-data b/test/cidata/user-data index 0c66a7f..a64dd38 100755 --- a/test/cidata/user-data +++ b/test/cidata/user-data @@ -11,15 +11,13 @@ cat << EOF # @ref: https://bugs.launchpad.net/cloud-init/+bug/1714495 bootcmd: - | - cat << EOF > /etc/systemd/network/20-wired.network + cat << EOF > /etc/systemd/network/ethernet.network [Match] Name=eth0 [Network] DHCP=ipv4 EOF -- ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf -- systemctl start systemd-networkd systemd-resolved ssh_authorized_keys: - "$(cat "${OUT_SSH_KEY_PUB}")"