diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8829dfd..25431c0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,5 +1,5 @@ --- -name: CI +name: CI - Kinetic # yamllint disable-line rule:truthy on: [push] @@ -22,30 +22,41 @@ jobs: VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2) REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) echo "kerneltag=${VERSION}-${REL}" >> $GITHUB_ENV - sudo apt install git - mkdir /tmp/artifacts - git clone https://github.com/t2linux/T2-Ubuntu-Kernel.git - sed -i 's/LOCALVERSION=-t2-\"${CODENAME}\"/LOCALVERSION=-t2-external/g' ${{ github.workspace }}/T2-Ubuntu-Kernel/build.sh - cd ${{ github.workspace }}/T2-Ubuntu-Kernel/patches - wget https://github.com/AdityaGarg8/T2-Ubuntu/raw/ssd/ssd.patch - cd ${{ github.workspace }}/T2-Ubuntu-Kernel - sudo ./build.sh - sudo rm /tmp/artifacts/*dbg* - sudo rm /tmp/artifacts/*libc-dev* + + DOCKER_IMAGE=ubuntu:22.10 + docker pull ${DOCKER_IMAGE} + docker run \ + -t \ + -v "$(pwd)":/repo \ + ${DOCKER_IMAGE} \ + /bin/bash -c 'cd /repo && \ + apt-get update && \ + apt-get install -y lsb-release git wget && \ + mkdir /tmp/artifacts && \ + git clone https://github.com/t2linux/T2-Ubuntu-Kernel.git && \ + sed -i 's/LOCALVERSION=-t2-\"${CODENAME}\"/LOCALVERSION=-t2-external/g' /repo/T2-Ubuntu-Kernel/build.sh && cd /repo/T2-Ubuntu-Kernel && \ + cd /repo/T2-Ubuntu-Kernel/patches && \ + wget https://github.com/AdityaGarg8/T2-Ubuntu/raw/ssd/ssd.patch && \ + cd /repo/T2-Ubuntu-Kernel && \ + ./build.sh && mkdir /repo/debs && \ + rm /tmp/artifacts/*dbg* + rm /tmp/artifacts/*libc-dev* + cp -r /tmp/artifacts/* /repo/debs' + cp -r "$(pwd)"/debs/* /tmp/artifacts - name: Upload package artifact uses: actions/upload-artifact@v2 with: - name: kernel-${{ env.kerneltag }} + name: kernel-${{ env.kerneltag }}-kinetic path: /tmp/artifacts/* - name: Release - if: github.ref == 'refs/heads/jammy' + if: github.ref == 'refs/heads/kinetic' uses: softprops/action-gh-release@v1 with: files: | /tmp/artifacts/*.deb - tag_name: v${{ env.kerneltag }}-kernel + tag_name: v${{ env.kerneltag }}-kernel-kinetic draft: false prerelease: true env: @@ -55,7 +66,7 @@ jobs: needs: [Kernel] runs-on: ubuntu-22.04 steps: - - name: 'Checkout Jammy Repo' + - name: 'Checkout Kinetic Repo' uses: actions/checkout@v3 - name: Get version @@ -65,13 +76,13 @@ jobs: echo "ver=${VERSION}" >> $GITHUB_ENV echo "release=${REL}" >> $GITHUB_ENV - - name: 'Checkout jammy-16,4 Repo' + - name: 'Checkout kinetic-16,4 Repo' uses: actions/checkout@v3 with: - ref: jammy-16,4 + ref: kinetic-16,4 persist-credentials: false - - name: 'Push new version to jammy-16,4' + - name: 'Push new version to kinetic-16,4' id: publish run: | sed -i "s/KERNEL_VERSION=6.*/KERNEL_VERSION=${{ env.ver }}/g" build.sh @@ -83,7 +94,7 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.PAT }} - branch: jammy-16,4 + branch: kinetic-16,4 ISO: needs: [Kernel] @@ -92,7 +103,15 @@ jobs: - uses: actions/checkout@v3 - name: Build - run: sudo ./build.sh + run: | + DOCKER_IMAGE=ubuntu:22.10 + docker pull ${DOCKER_IMAGE} + docker run \ + -t \ + -v "$(pwd)":/repo \ + ${DOCKER_IMAGE} \ + /bin/bash -c 'cd /repo && \ + ./build.sh' - name: print sha256sum run: cat output/sha256 @@ -122,11 +141,11 @@ jobs: EOF - name: Release - if: github.ref == 'refs/heads/jammy' + if: github.ref == 'refs/heads/kinetic' uses: softprops/action-gh-release@v1 with: files: ${{ github.workspace }}/*.iso - tag_name: v22.04-${{ env.isotag }} + tag_name: ${{ env.isotag }} body_path: ${{ github.workspace }}/.github/workflows/instructions.txt draft: false prerelease: false @@ -134,10 +153,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Delete kernel from releases - if: github.ref == 'refs/heads/jammy' + if: github.ref == 'refs/heads/kinetic' uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: delete_release: true - tag_name: v${{ env.isotag }}-kernel + tag_name: v${{ env.isotag }}-kernel-kinetic env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/01_build_file_system.sh b/01_build_file_system.sh index 265e0ae..3be7cec 100755 --- a/01_build_file_system.sh +++ b/01_build_file_system.sh @@ -5,7 +5,7 @@ echo >&2 "===]> Info: Checkout bootstrap... " debootstrap \ --arch=amd64 \ --variant=minbase \ - jammy \ + kinetic \ "${CHROOT_PATH}" \ http://archive.ubuntu.com/ubuntu/ diff --git a/02_build_image.sh b/02_build_image.sh index 1f8a66a..3df0d93 100755 --- a/02_build_image.sh +++ b/02_build_image.sh @@ -37,7 +37,7 @@ done echo >&2 "===]> Info: Create diskdefines... " cat <"${IMAGE_PATH}"/README.diskdefines -#define DISKNAME Ubuntu MBP 22.04 LTS "Jammy Jellyfish" - Beta amd64 +#define DISKNAME Ubuntu MBP 22.10 "Kinetic Kudu" - Beta amd64 #define TYPE binary #define TYPEbinary 1 #define ARCH amd64 diff --git a/04_create_iso.sh b/04_create_iso.sh index 0abbe28..6060059 100755 --- a/04_create_iso.sh +++ b/04_create_iso.sh @@ -23,7 +23,7 @@ xorriso -as mkisofs \ -no-emul-boot \ -isohybrid-mbr "${ROOT_PATH}/files/isohdpfx.bin" \ -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ - -output "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}.iso" \ + -output "${ROOT_PATH}/ubuntu-22.10-${KERNEL_VERSION}.iso" \ -graft-points \ "." \ /boot/grub/bios.img=isolinux/bios.img \ diff --git a/build.sh b/build.sh index 57f85f3..e1a5924 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ ROOT_PATH=$(pwd) WORKING_PATH=/root/work CHROOT_PATH="${WORKING_PATH}/chroot" IMAGE_PATH="${WORKING_PATH}/image" -KERNEL_VERSION=6.0.7 +KERNEL_VERSION=6.0.6 PKGREL=1 sed -i "s/KVER/${KERNEL_VERSION}/g" $(pwd)/files/chroot_build.sh sed -i "s/PREL/${PKGREL}/g" $(pwd)/files/chroot_build.sh @@ -40,7 +40,7 @@ for ALTERNATIVE in t2-jammy t2-external do echo >&2 "===]> Info: Start building ${ALTERNATIVE}... " - echo >&2 "===]> Info: Build Ubuntu Jammy... " + echo >&2 "===]> Info: Build Ubuntu Kinetic... " /bin/bash -c " ROOT_PATH=${ROOT_PATH} \\ WORKING_PATH=${WORKING_PATH} \\ @@ -51,7 +51,7 @@ do ${ROOT_PATH}/01_build_file_system.sh " - echo >&2 "===]> Info: Build Image Jammy... " + echo >&2 "===]> Info: Build Image Kinetic... " /bin/bash -c " ROOT_PATH=${ROOT_PATH} \\ WORKING_PATH=${WORKING_PATH} \\ @@ -85,7 +85,7 @@ do fi ### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that cd "${ROOT_PATH}" - zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso" + zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-22.10-${KERNEL_VERSION}-${ALTERNATIVE}.iso" done ## Calculate sha256 sums of built ISO sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256" diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 2229392..14a9a5b 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -11,17 +11,17 @@ mount none -t devpts /dev/pts export HOME=/root export LC_ALL=C -echo "ubuntu-jammy-live" >/etc/hostname +echo "ubuntu-kinetic-live" >/etc/hostname echo >&2 "===]> Info: Configure and update apt... " cat </etc/apt/sources.list -deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ kinetic main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ kinetic main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ kinetic-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ kinetic-security main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ kinetic-updates main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ kinetic-updates main restricted universe multiverse EOF apt-get update @@ -162,13 +162,13 @@ apt-get purge -y -qq \ vim \ binutils \ linux-generic \ - linux-headers-5.15.0-30 \ - linux-headers-5.15.0-30-generic \ + linux-headers-5.19.0-21 \ + linux-headers-5.19.0-21-generic \ linux-headers-generic \ - linux-image-5.15.0-30-generic \ + linux-image-5.19.0-21-generic \ linux-image-generic \ - linux-modules-5.15.0-30-generic \ - linux-modules-extra-5.15.0-30-generic + linux-modules-5.19.0-21-generic \ + linux-modules-extra-5.19.0-21-generic apt-get autoremove -y diff --git a/files/grub/grub.cfg b/files/grub/grub.cfg index c31253d..c5d98ce 100644 --- a/files/grub/grub.cfg +++ b/files/grub/grub.cfg @@ -6,15 +6,15 @@ insmod all_video set default="0" set timeout=30 -menuentry "Try Ubuntu Jammy Jellyfish without installing" { +menuentry "Try Ubuntu Kinetic Kudu without installing" { linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro pcie_ports=compat intel_iommu=on iommu=pt --- initrd /casper/initrd } -menuentry "Try Ubuntu Jammy Jellyfish without installing (Safe Graphics)" { +menuentry "Try Ubuntu Kinetic Kudu without installing (Safe Graphics)" { linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro nomodeset pcie_ports=compat intel_iommu=on iommu=pt --- initrd /casper/initrd } -menuentry "Install Ubuntu Jammy Jellyfish" { +menuentry "Install Ubuntu Kinetic Kudu" { linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity pcie_ports=compat intel_iommu=on iommu=pt --- initrd /casper/initrd }