Skip to content

Commit

Permalink
Add support for Kde Neon which is based on Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
aitorpazos committed Sep 19, 2021
1 parent c73f07b commit 6725b09
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,15 @@ jobs:
- name: Test Ubuntu Focal ISO
id: test_focal_iso
run: make testExampleFocal
buildNeon:
name: Create Kde Neon ISO
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Ubuntu Focal ISO
id: build_neon_iso
run: make buildKdeNeon
- name: Test Kde Neon ISO
id: test_neon_iso
run: make testExampleNeon
34 changes: 33 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
buildFocal:
name: Create Ubuntu Focal ISO
runs-on: ubuntu-latest
needs:
needs:
- checkout
steps:
- name: Checkout code
Expand Down Expand Up @@ -121,13 +121,45 @@ jobs:
- name: Push Ubuntu Focal version
id: push_focal_version_iso_builder
run: docker push aitorpazos/create-debian-iso:ubuntu-focal-${{ steps.get_version.outputs.VERSION }}
buildNeon:
name: Create Kde Neon ISO
runs-on: ubuntu-latest
needs:
- checkout
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build Kde Neon ISO
id: build_neon_iso
run: make buildKdeNeon
- name: Test Kde Neon ISO
id: test_neon_iso
run: make testExampleNeon
- name: Tag Kde Neon
id: tag_neon_iso_builder
run: docker tag aitorpazos/create-debian-iso:kde-neon aitorpazos/create-debian-iso:kde-neon-${{ steps.get_version.outputs.VERSION }}
- name: Login into Docker Hub
uses: docker/#-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Kde Neon
id: push_neon_iso_builder
run: docker push aitorpazos/create-debian-iso:kde-neon
- name: Push Kde Neon version
id: push_neon_version_iso_builder
run: docker push aitorpazos/create-debian-iso:kde-neon-${{ steps.get_version.outputs.VERSION }}
doRelease:
name: Perform release
runs-on: ubuntu-latest
needs:
- buildBuster
- buildBionic
- buildFocal
- buildNeon
steps:
- name: Create Release
id: create_release
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.0] - 2021-09-19

### Added

- Support for Kde Neon (Based on Ubuntu)

## [0.3.4] - 2021-09-19

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM ${DISTRO}:${DISTRO_VERSION}

ARG DISTRO
ARG DISTRO_VERSION
ARG DISTRO_FLAVOR=${DISTRO_VERSION}

ADD create-iso.sh /usr/local/bin/create-iso.sh
ADD chroot-script.sh /tmp/chroot-script.sh
Expand All @@ -12,7 +13,8 @@ RUN chmod +x /usr/local/bin/create-iso.sh

ENV DISTRO=${DISTRO} \
DISTRO_VERSION=${DISTRO_VERSION} \
OUTPUT_FILE=${DISTRO}-${DISTRO_VERSION}-custom.iso \
DISTRO_FLAVOR=${DISTRO_FLAVOR} \
OUTPUT_FILE=${DISTRO}-${DISTRO_FLAVOR}-custom.iso \
ROOT_PASSWD=toor

ENTRYPOINT [ "/usr/local/bin/create-iso.sh" ]
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IMAGE_TAG:=aitorpazos/create-debian-iso

.PHONY: build
build: buildDebianBuster buildUbuntuBionic buildUbuntuFocal
build: buildDebianBuster buildUbuntuBionic buildUbuntuFocal buildKdeNeon

.PHONY: buildDebianBuster
buildDebianBuster:
Expand All @@ -15,8 +15,12 @@ buildUbuntuBionic:
buildUbuntuFocal:
docker build --rm --build-arg DISTRO=ubuntu --build-arg DISTRO_VERSION=focal -t $(IMAGE_TAG) -t $(IMAGE_TAG):ubuntu-focal .

.PHONY: buildKdeNeon
buildKdeNeon:
docker build --rm --build-arg DISTRO=ubuntu --build-arg DISTRO_VERSION=focal --build-arg DISTRO_FLAVOR=neon -t $(IMAGE_TAG) -t $(IMAGE_TAG):kde-neon .

.PHONY: test
test: testExampleBuster testExampleBionic testExampleFocal
test: testExampleBuster testExampleBionic testExampleFocal testExampleNeon

.PHONY: testExampleBuster
testExampleBuster:
Expand All @@ -29,3 +33,7 @@ testExampleBionic:
.PHONY: testExampleFocal
testExampleFocal:
docker run -t --rm --privileged -v $(shell pwd)/example:/root/files $(IMAGE_TAG):ubuntu-focal

.PHONY: testExampleNeon
testExampleNeon:
docker run -t --rm --privileged -v $(shell pwd)/example:/root/files $(IMAGE_TAG):kde-neon
21 changes: 21 additions & 0 deletions chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,27 @@ deb http://security.ubuntu.com/ubuntu/ ${DISTRO_VERSION}-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ ${DISTRO_VERSION}-security multiverse
EOF
fi

# Add support for KDE Neon
if [ "${DISTRO_FLAVOR}" == "neon" ]; then
# add the KDE Neon repository
wget -qO - 'https://archive.neon.kde.org/public.key' | sudo apt-key add -

cat <<EOF > /etc/apt/sources.list.d/neon.list
deb http://archive.neon.kde.org/user/ ${DISTRO_VERSION} main
deb-src http://archive.neon.kde.org/user/ ${DISTRO_VERSION} main
EOF

# pin base-files to not install the Neon version
# - this prevents the install identifying as Neon,
# and stops problems with programs that this confuses,
# eg the Docker install script
cat <<EOF > /etc/apt/preferences.d/99block-neon
Package: base-files
Pin: origin archive.neon.kde.org
Pin-Priority: 1
EOF
fi

# Update ATP repos
apt-get update
Expand Down

0 comments on commit 6725b09

Please # to comment.