diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 78878789..8b0443ed 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,7 +29,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: core-snap - path: "${{ github.workspace }}/core22.artifact" + path: "${{ github.workspace }}/core24.artifact" - name: Discard spread workers if: always() @@ -52,7 +52,7 @@ jobs: - uses: actions/download-artifact@v2 with: name: core-snap - path: "${{ github.workspace }}/core22.artifact" + path: "${{ github.workspace }}/core24.artifact" - name: Run tests run: | @@ -92,29 +92,30 @@ jobs: - name: Build image working-directory: '${{ github.workspace }}' run: | + PROJECT_PATH=core-base . "core-base/tests/lib/prepare-utils.sh" echo "************* INSTALLING DEPS *************" - install_core22_deps + install_base_deps echo "************* DOWNLOADING SNAPS *************" - download_core22_snaps 'edge' + download_core24_snaps 'edge' echo "************* WRITING CLOUD-INIT CONFIG *************" - prepare_core22_cloudinit + prepare_base_cloudinit - echo "************* BUILDING CORE22 IMAGE *************" + echo "************* BUILDING CORE24 IMAGE *************" uc_snap="$(get_core_snap_name)" - mv core22.artifact "$uc_snap" - build_core22_image + mv core24.artifact "$uc_snap" + build_base_image - echo "************* STARTING CORE22 VM *************" + echo "************* STARTING CORE24 VM *************" start_snapd_core_vm '${{ github.workspace }}' cd snapd - + # add any test suites that should be tested here - SPREAD_EXTERNAL_ADDRESS=localhost:8022 spread external:ubuntu-core-22-64:tests/smoke/ + SPREAD_EXTERNAL_ADDRESS=localhost:8022 spread external:ubuntu-core-24-64:tests/smoke/ - name: Discard spread workers if: always() diff --git a/.travis.yml b/.travis.yml index 947f8e33..b0c53830 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,5 +23,5 @@ install: script: - sg lxd 'snapcraft' - - sudo unsquashfs -d prime core22*.snap + - sudo unsquashfs -d prime core24*.snap - make test diff --git a/Makefile b/Makefile index 7664b56b..1df0b694 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ # dir that contans the filesystem that must be checked TESTDIR ?= "prime/" +SNAP_NAME=core24 +BUILDDIR=/build/$(SNAP_NAME) .PHONY: all all: check @@ -46,9 +48,9 @@ install: touch $(DESTDIR)/usr/lib/clock-epoch # only generate manifest and dpkg.yaml files for lp build - if [ -e /build/core22 ]; then \ - /bin/cp $(DESTDIR)/usr/share/snappy/dpkg.list /build/core22/core22-$$(date +%Y%m%d%H%M)_$(DPKG_ARCH).manifest; \ - /bin/cp $(DESTDIR)/usr/share/snappy/dpkg.yaml /build/core22/core22-$$(date +%Y%m%d%H%M)_$(DPKG_ARCH).dpkg.yaml; \ + if [ -e $(BUILDDIR) ]; then \ + /bin/cp $(DESTDIR)/usr/share/snappy/dpkg.list $(BUILDDIR)/$(SNAP_NAME)-$$(date +%Y%m%d%H%M)_$(DPKG_ARCH).manifest; \ + /bin/cp $(DESTDIR)/usr/share/snappy/dpkg.yaml $(BUILDDIR)/$(SNAP_NAME)-$$(date +%Y%m%d%H%M)_$(DPKG_ARCH).dpkg.yaml; \ fi; .PHONY: check diff --git a/README.md b/README.md index fcbfc91b..4237b438 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Core22 snap for snapd & Ubuntu Core +# Core24 snap for snapd & Ubuntu Core -This is a base snap for snapd & Ubuntu Core that is based on Ubuntu 22.04 +This is a base snap for snapd & Ubuntu Core that is based on Ubuntu 22.10 (will be base on 24.04) # Building locally @@ -58,7 +58,7 @@ mv autopkgtest-focal-amd64.img ubuntu-20.04-64.img ``` 4. Now you are ready to run spread tests with the qemu backend ``` -cd ~/core22 # or wherever you checked out this repository +cd ~/core24 # or wherever you checked out this repository spread qemu-nested ``` @@ -74,18 +74,18 @@ and yq (needed for yaml manipulation), download the newest image and import it i ``` sudo snap install lxd sudo snap install yq -curl -o lxd-core22-img.tar.gz https://storage.googleapis.com/snapd-spread-core/lxd/lxd-spread-core22-img.tar.gz -lxc image import lxd-core22-img.tar.gz --alias ucspread22 +curl -o lxd-core24-img.tar.gz https://storage.googleapis.com/snapd-spread-core/lxd/lxd-spread-core24-img.tar.gz +lxc image import lxd-core24-img.tar.gz --alias ucspread22 lxc image show ucspread22 > temp.profile yq e '.properties.aliases = "ucspread22,amd64"' -i ./temp.profile yq e '.properties.remote = "images"' -i ./temp.profile cat ./temp.profile | lxc image edit ucspread22 -rm ./temp.profile ./lxd-core22-img.tar.gz +rm ./temp.profile ./lxd-core24-img.tar.gz ``` -2. Import the LXD core22 test profile. Make sure your working directory is the root of this repository. +2. Import the LXD core24 test profile. Make sure your working directory is the root of this repository. ``` -lxc profile create core22 -cat tests/spread/core22.lxdprofile | lxc profile edit core22 +lxc profile create core24 +cat tests/spread/core24.lxdprofile | lxc profile edit core24 ``` 3. Set environment variable to enable KVM acceleration for the nested qemu instance ``` diff --git a/hook-tests/600-no-debian.chroot b/hook-tests/600-no-debian.chroot index 1bb60779..30c16897 100755 --- a/hook-tests/600-no-debian.chroot +++ b/hook-tests/600-no-debian.chroot @@ -13,7 +13,7 @@ then else echo "Error! PPA section of dpkg.yaml not as expected." echo "If that is intentional, please update the ppa_section content in the" - echo "test file: core22/hook-tests/600-no-debian.test." + echo "test file: hook-tests/600-no-debian.test." exit 1 fi @@ -25,7 +25,7 @@ do echo "Couldn't find package: $pkg in $FILE." echo "If that is intentional, please update the packages_section " echo "content in the " - echo "test file: core22/hook-tests/600-no-debian.test." + echo "test file: hook-tests/600-no-debian.test." exit 1 fi done diff --git a/hooks/000-provide-uids-gids.chroot b/hooks/000-provide-uids-gids.chroot index ce6080e6..2ed6cd82 100755 --- a/hooks/000-provide-uids-gids.chroot +++ b/hooks/000-provide-uids-gids.chroot @@ -28,7 +28,6 @@ www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin _apt:x:100:65534::/nonexistent:/usr/sbin/nologin EOF @@ -65,7 +64,6 @@ operator:x:37: list:x:38: irc:x:39: src:x:40: -gnats:x:41: shadow:x:42: utmp:x:43: video:x:44: @@ -105,7 +103,6 @@ www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin messagebus:x:100:103::/var/run/dbus:/bin/false snappypkg:x:101:104:Reserved:/nonexistent:/bin/false @@ -139,7 +136,6 @@ www-data:*:16329:0:99999:7::: backup:*:16329:0:99999:7::: list:*:16329:0:99999:7::: irc:*:16329:0:99999:7::: -gnats:*:16329:0:99999:7::: nobody:*:16329:0:99999:7::: messagebus:*:16413:0:99999:7::: snappypkg:*:16413:0:99999:7::: @@ -186,7 +182,6 @@ operator:x:37: list:x:38: irc:x:39: src:x:40: -gnats:x:41: shadow:x:42: utmp:x:43: video:x:44: @@ -248,7 +243,6 @@ operator:*:: list:*:: irc:*:: src:*:: -gnats:*:: shadow:*:: utmp:*:: video:*:: diff --git a/hooks/001-extra-packages.chroot b/hooks/001-extra-packages.chroot index 0ab9471c..616aa1ea 100755 --- a/hooks/001-extra-packages.chroot +++ b/hooks/001-extra-packages.chroot @@ -23,13 +23,15 @@ mkdir -p /var/log/journal apt update apt install --no-install-recommends -y ca-certificates -# shellcheck disable=SC1091 -CODENAME=$(. /etc/os-release; echo "$UBUNTU_CODENAME") -# enable the ucdev PPA with additional packages to build bases -echo "deb https://ppa.launchpadcontent.net/ucdev/base-ppa/ubuntu/ $CODENAME main" \ - > /etc/apt/sources.list.d/ubuntu-image.list - -cat >/etc/apt/trusted.gpg.d/ucdev-base-ppa.asc <<'EOF' +# TODO: There is no PPA for kinetic yet. +if false; then + # shellcheck disable=SC1091 + CODENAME=$(. /etc/os-release; echo "$UBUNTU_CODENAME") + # enable the ucdev PPA with additional packages to build bases + echo "deb https://ppa.launchpadcontent.net/ucdev/base-ppa/ubuntu/ $CODENAME main" \ + > /etc/apt/sources.list.d/ubuntu-image.list + + cat >/etc/apt/trusted.gpg.d/ucdev-base-ppa.asc <<'EOF' -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBGLW9dwBEAC7UJatAWOrUgfJlElkTUfmjL6JCTONYGy1Qzrw65YgzjdJGvXQ @@ -59,6 +61,7 @@ jdVw2j6diVag+TBwXXX/pBCBMFvUHJph5afKSfnrIuDk6yzCV8TaGAer =L0hK -----END PGP PUBLIC KEY BLOCK----- EOF +fi cat </etc/apt/sources.list.d/local-packages.list deb [trusted=yes] file:/install-data/local-debs ./ @@ -113,6 +116,7 @@ PACKAGES=( systemd systemd-sysv systemd-timesyncd + systemd-resolved tzdata udev vim-tiny diff --git a/hooks/018-set-os-release.chroot b/hooks/018-set-os-release.chroot index 48751f29..6b7b74be 100755 --- a/hooks/018-set-os-release.chroot +++ b/hooks/018-set-os-release.chroot @@ -2,10 +2,10 @@ cat >/usr/lib/os-release<