Skip to content

Commit 75be112

Browse files
authored
Add new flavours of Ubuntu (#190)
1 parent bb9075e commit 75be112

3 files changed

Lines changed: 29 additions & 8 deletions

File tree

.github/workflows/CI.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
target:
1212
- image: ubuntu
1313
- image: kubuntu
14+
- image: ubuntu-budgie
15+
- image: ubuntucinnamon
16+
- image: ubuntu-mate
17+
#- image: ubuntukylin
18+
- image: xubuntu
1419
#- image: ubuntu-unity
1520

1621
runs-on: ubuntu-latest
@@ -40,8 +45,9 @@ jobs:
4045
chmod +x ${{ github.workspace }}/build_in_docker.sh
4146
${{ github.workspace }}/build_in_docker.sh ${{ matrix.target.image }}
4247
43-
- name: print sha256sum
48+
- name: List items built and print sha256sum
4449
run: |
50+
ls -l ${{ github.workspace }}/output
4551
cat ${{ github.workspace }}/output/sha256*
4652
SHA256=$(cat ${{ github.workspace }}/output/sha256* | cut -d " " -f 1)
4753
echo "sha256=${SHA256}" >> $GITHUB_ENV

01_edit_iso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
mount -o loop "$(pwd)/$ISO_IMAGE" "$ISO_MOUNT_DIR"
1818

1919
if [ "$SUBIQUITY" = "yes" ]; then
20-
rsync -a "$ISO_MOUNT_DIR/" "$ISO_WORK_DIR" --include="casper/initrd" --include="casper/vmlinuz" --include="casper/minimal.standard.live.squashfs" --include="casper/minimal.standard.live.manifest" --include="casper/minimal.standard.live.size" --exclude="casper/*" --exclude="md5sum.txt" --exclude="MD5SUMS" --exclude=".disk/release_notes_url" --exclude="casper/*.gpg"
20+
rsync -a "$ISO_MOUNT_DIR/" "$ISO_WORK_DIR" --include="casper/initrd" --include="casper/vmlinuz" --include="casper/minimal.standard.live.squashfs" --include="casper/minimal.standard.live.manifest" --include="casper/minimal.standard.live.size" --include="casper/install-sources.yaml" --exclude="casper/*" --exclude="md5sum.txt" --exclude="MD5SUMS" --exclude=".disk/release_notes_url" --exclude="casper/*.gpg"
2121
unsquashfs -d "$CHROOT_DIR" "$ISO_MOUNT_DIR/casper/minimal.squashfs"
2222
unsquashfs -d "$CHROOT_DIR_EXTRA" "$ISO_MOUNT_DIR/casper/minimal.standard.squashfs"
2323
rsync -a "$CHROOT_DIR_EXTRA/" "$CHROOT_DIR/"

build.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ ROOT_PATH=$(pwd)/work
66
OUTPUT_PATH=$(pwd)/output
77

88
FLAVOUR=$1
9-
FLAVOUR_CAP=$(echo "${FLAVOUR}" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2); print}')
9+
if [ "$FLAVOUR" = "ubuntucinnamon" ]; then
10+
FLAVOUR_CAP="Ubuntu Cinnamon"
11+
elif [ "$FLAVOUR" = "ubuntu-mate" ]; then
12+
FLAVOUR_CAP="Ubuntu MATE"
13+
elif [ "$FLAVOUR" = "ubuntukylin" ]; then
14+
FLAVOUR_CAP="Ubuntu Kylin"
15+
else
16+
FLAVOUR_CAP=$(echo "${FLAVOUR}" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2); print}')
17+
fi
1018
ISO_MOUNT_DIR="$ROOT_PATH/${FLAVOUR}-original" # Temporary mount point for the original ISO
1119
VER=25.10
1220
CODENAME=questing
@@ -18,10 +26,10 @@ ISO_WORK_DIR="$ROOT_PATH/${FLAVOUR}-iso"
1826
CHROOT_DIR="$ROOT_PATH/${FLAVOUR}-edit"
1927
CHROOT_DIR_EXTRA="$ROOT_PATH/${FLAVOUR}-edit-extra"
2028

21-
if [ "$FLAVOUR" = "ubuntu" ]; then
22-
SUBIQUITY=yes
23-
else
29+
if [ "$FLAVOUR" = "kubuntu" ] || [ "$FLAVOUR" = "ubuntu-unity" ]; then
2430
SUBIQUITY=no
31+
else
32+
SUBIQUITY=yes
2533
fi
2634

2735
echo "ROOT_PATH=$ROOT_PATH"
@@ -105,9 +113,10 @@ if [ "$SUBIQUITY" = "yes" ]; then
105113
ln -s minimal.manifest filesystem.manifest
106114
FILESYSTEM_SIZE=$(($(cat minimal.size)+$(cat minimal.standard.live.size)))
107115
echo ${FILESYSTEM_SIZE} > filesystem.size
116+
LINUXGENERIC=$(cat ./install-sources.yaml | grep default | grep generic | cut -d ":" -f 2 | xargs)
108117
cat <<EOF | tee ./install-sources.yaml
109118
kernel:
110-
default: linux-generic-hwe-24.04
119+
default: ${LINUXGENERIC}
111120
sources:
112121
- default: true
113122
description:
@@ -141,7 +150,13 @@ echo >&2 "===]> Info: Creating iso ... "
141150
$(pwd)/02_create_iso.sh"
142151
# split iso
143152

144-
split -b 2000M -x "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso."
153+
ISO_SIZE=$(du -m "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" | cut -f1)
154+
if [ "$ISO_SIZE" -lt 4000 ]; then
155+
SPLIT_SIZE=1500M
156+
else
157+
SPLIT_SIZE=2000M
158+
fi
159+
split -b "${SPLIT_SIZE}" -x "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso" "${OUTPUT_PATH}/${FLAVOUR}-${VER}-${KERNEL_VERSION}-t2-${CODENAME}.iso."
145160
sha256sum "${OUTPUT_PATH}"/*.iso > "${OUTPUT_PATH}/sha256-${FLAVOUR}-${VER}"
146161

147162

0 commit comments

Comments
 (0)