From d116f43b072cbee55b7d4f3d04246d1adaa5fdb1 Mon Sep 17 00:00:00 2001 From: itsmanjeet Date: Thu, 20 Jun 2024 17:19:03 +0200 Subject: [PATCH] unlocked rlxos --- .github/workflows/build-and-release.yml | 57 +++--------------------- .gitmodules | 3 ++ Makefile | 8 ++-- elements/include/installer.inc | 15 +++---- elements/installer/image.yml | 32 +++++--------- elements/system/image.yml | 58 ------------------------- src/initial-setup | 2 +- src/pkgupd | 2 +- 8 files changed, 29 insertions(+), 148 deletions(-) delete mode 100644 elements/system/image.yml diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 77b948528..c011fb4e7 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -12,12 +12,9 @@ env: SERVER_REPO_PATH: ${{secrets.SERVER_REPO_PATH}} SERVER_REPO_URL: ${{secrets.SERVER_REPO_URL}} CACHE_PATH: ${{secrets.SERVER_REPO_PATH}} - OSTREE_REPO: ${{secrets.OSTREE_REPO}} - OSTREE_GPG: ${{secrets.OSTREE_GPG}} VERSION: ${{ github.run_number }} SOURCEFORGE_PREFIX: ${{secrets.SOURCEFORGE_PREFIX}} CHANNEL: ${{ endsWith(github.ref, 'stable') && 'stable' || (endsWith(github.ref, 'preview') && 'preview' || 'unstable') }} - OSTREE_BRANCH: "x86_64/os/${{ endsWith(github.ref, 'stable') && 'stable' || (endsWith(github.ref, 'preview') && 'preview' || 'unstable') }}" APPMARKET_PATH: ${{secrets.APPMARKET_PATH}} SIGN_KEYS_PATH: ${{secrets.SIGN_KEYS_PATH}} @@ -41,33 +38,14 @@ jobs: - name: Write changelog run: echo "${{ github.event.head_commit.message }}" > ChangeLog - - name: Update Ostree - run: make ELEMENT=system/repo.yml update-ostree - - - name: Update Extensions - run: | - for extension_path in elements/extensions/*.yml; do - extension_path="$(echo ${extension_path} | cut -d '/' -f2-)" - extension="$(basename ${extension_path})" - extension="${extension%.*}" - OSTREE_BRANCH="x86_64/extension/${extension}/${CHANNEL}" \ - ELEMENT=${extension_path} make update-ostree - done - - - name: Update Applications - run: | - for app_path in elements/apps/*.yml; do - app_path="$(echo ${app_path} | cut -d '/' -f2-)" - app="$(basename ${app_path})" - app="${app%.*}" - make ELEMENT=${app_path} || echo "failed to build ${app_path}" - done + - name: Generate metadata + run: make metadata - name: Build Installer ISO run: make ELEMENT=installer/image.yml - build-installer-iso: - name: Build Installer ISO + update-installer-iso: + name: Update Installer ISO runs-on: self-hosted timeout-minutes: 47000 needs: [ build ] @@ -78,32 +56,9 @@ jobs: token: ${{ secrets.CI_TOKEN }} submodules: true - name: Update installer ISO - run: | + run: |- make checkout ELEMENT=installer/image.yml DESTDIR=${SERVER_REPO_PATH}/releases/${CHANNEL}/ (cd ${SERVER_REPO_PATH}/releases/${CHANNEL}/; zsyncmake -b 2048 -C -u ${SERVER_REPO_URL}/releases/${CHANNEL}/rlxos-${CHANNEL}-installer.iso rlxos-${CHANNEL}-installer.iso) - update-market: - name: Update Market - runs-on: self-hosted - needs: [ build ] - steps: - - uses: actions/checkout@v1 - with: - token: ${{ secrets.CI_TOKEN }} - submodules: true - - name: Generate AppImages meta - run: make update-app-market - - update-mirrors: - name: Update ISO on mirrors - runs-on: self-hosted - environment: deploy - needs: [build-installer-iso] - steps: - - uses: actions/checkout@v1 - with: - token: ${{ secrets.CI_TOKEN }} - submodules: true - name: Upload to sourceforge - run: | - scp -pr ${SERVER_REPO_PATH}/releases/${CHANNEL}/ ${SOURCEFORGE_PREFIX}/ \ No newline at end of file + run: scp -pr ${SERVER_REPO_PATH}/releases/${CHANNEL}/ ${SOURCEFORGE_PREFIX}/ diff --git a/.gitmodules b/.gitmodules index f0bcc8457..eb5f39c8a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ path = src/srclang url = git@github.com:itsmanjeet/srclang +[submodule "src/pkgupd"] + path = src/pkgupd + url = git@github.com:itsmanjeet/pkgupd diff --git a/Makefile b/Makefile index cd76e8fdb..19e1815e8 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,9 @@ OSTREE_BRANCH ?= $(shell uname -m)/os/$(CHANNEL) OSTREE_REPO ?= ostree-repo OSTREE_GPG ?= ostree-gpg VERSION ?= 2.0 -PKGUPD ?= build/src/pkgupd/bin/pkgupd +PKGUPD ?= build/src/pkgupd/src/pkgupd CACHE_PATH ?= build/ DESTDIR ?= checkout/ -APPMARKET_PATH ?= appmarket/ KEY_TYPES := PK KEK DB VENDOR linux-module-cert ALL_CERTS = $(foreach KEY,$(KEY_TYPES),files/sign-keys/$(KEY).crt) ALL_KEYS = $(foreach KEY,$(KEY_TYPES),files/sign-keys/$(KEY).key) @@ -87,9 +86,8 @@ $(OSTREE_GPG)/key-config: files/rlxos.gpg: $(OSTREE_GPG)/key-config gpg --homedir=$(OSTREE_GPG) --export --armor >"$@" -update-app-market: $(PKGUPD) version.yml ostree-branch.yml channel.yml - $(PKGUPD) ignite ignite.cache=$(CACHE_PATH) meta $(APPMARKET_PATH)/$(CHANNEL) - ./scripts/extract-icons.sh $(APPMARKET_PATH)/$(CHANNEL)/apps/ $(APPMARKET_PATH)/$(CHANNEL)/icons/ +metadata: $(PKGUPD) version.yml channel.yml + $(PKGUPD) ignite ignite.cache=$(CACHE_PATH) meta $(CHANNEL) update-ostree: files/rlxos.gpg ifndef ELEMENT diff --git a/elements/include/installer.inc b/elements/include/installer.inc index 3405799b5..fc9d2629e 100644 --- a/elements/include/installer.inc +++ b/elements/include/installer.inc @@ -1,4 +1,4 @@ -force-rebuild: true +kargs: "" pre-script: |- mkdir -p ISO/{boot/grub/{fonts,x86_64-efi},efi/boot,isolinux,LiveOS} @@ -6,8 +6,8 @@ pre-script: |- install -vDm0644 /dev/stdin ISO/isolinux/isolinux.cfg << EOF DEFAULT RLXOS GNU/Linux LABEL RLXOS GNU/Linux - KERNEL __KERNEL__ - APPEND initrd=__INITRD__ __KARGS__ + KERNEL /boot/vmlinuz + APPEND initrd=/boot/initramfs root=live:LABEL=RLXOS quiet splash rd.live=1 rd.live.overlay.overlayfs=1 %{kargs} EOF install -vDm0644 /dev/stdin ISO/boot/grub/grub.cfg << EOF @@ -27,8 +27,8 @@ pre-script: |- fi menuentry "RLXOS GNU/Linux" { - linux __KERNEL__ __KARGS__ - initrd __INITRD__ + linux /boot/vmlinuz root=live:LABEL=RLXOS quiet splash rd.live=1 rd.live.overlay.overlayfs=1 %{kargs} + initrd /boot/initramfs } EOF @@ -50,11 +50,6 @@ post-script: |- mmd -i ISO/boot/efiboot.img ::/EFI/BOOT mcopy -i ISO/boot/efiboot.img ISO/efi/boot/bootx64.efi ::/EFI/BOOT - # Dracut otherwise fail to detect OS!! - mkdir -p %{sysroot}/proc - - mksquashfs %{sysroot} ISO/LiveOS/squashfs.img -noappend - mkdir -p %{install-root}/ xorriso -as mkisofs \ -isohybrid-mbr %{datadir}/syslinux/isohdpfx.bin \ diff --git a/elements/installer/image.yml b/elements/installer/image.yml index 088edc5a6..b09d64e37 100644 --- a/elements/installer/image.yml +++ b/elements/installer/image.yml @@ -12,14 +12,6 @@ include-root: /sysroot include-parts: [ doc, devel ] installer-volume-id: RLXOS - -kargs: >- - --karg=root=live:LABEL=RLXOS - --karg=quiet - --karg=splash - --karg=rd.live=1 - --karg=rd.live.overlay.overlayfs=1 -force-rebuild: true strip: false script: |- @@ -27,20 +19,11 @@ script: |- for i in %{datadir}/pkgupd/manifest/*/integration ; do sh -e $i done - - rm -rf /install-root - - mkdir -p /proc /sysroot - ln -sv /sysroot/ostree /ostree update-ca-certificates echo "root:root" | chpasswd - echo -e "\nGTK_CSD=1" >> %{sysconfdir}/environment - - # TODO: should be enabled via systemd user-preset - systemctl enable --global appimaged.service systemctl enable --global wob.socket # TODO: should be done in components/pam::integration @@ -51,10 +34,8 @@ script: |- kerver=$(ls -1 /lib/modules | head -n1) cp /lib/modules/${kerver}/bzImage /lib/modules/${kerver}/vmlinuz - dracut --reproducible -v --no-machineid \ --kver ${kerver} \ - --add ostree \ --add plymouth \ --add dmsquash-live \ --install grep \ @@ -64,11 +45,18 @@ script: |- --install lsof \ --omit lvm \ --install 'fsck.ext4' \ - %{libdir}/modules/${kerver}/initramfs + %{libdir}/modules/${kerver}/initramfs - mv %{sysconfdir} %{prefix}/ EOT mkdir -p %{install-root} - mksquashfs + kerver=$(ls -1 %{include-root}/lib/modules | head -n1) + + mksquashfs %{include-root} ISO/LiveOS/squashfs.img -noappend -noappend + cp %{include-root}%{libdir}/modules/$kerver/vmlinuz ISO/boot/ + cp %{include-root}%{libdir}/modules/$kerver/initramfs ISO/boot/ + +build-depends: + - components/bash.yml + - components/squashfs-tools.yml \ No newline at end of file diff --git a/elements/system/image.yml b/elements/system/image.yml deleted file mode 100644 index e9dd5f355..000000000 --- a/elements/system/image.yml +++ /dev/null @@ -1,58 +0,0 @@ -id: system-image -merge: [ version.yml ] -about: System Image - -include: - - system/deps.yml - -capabilities: - - CAP_SYS_CHROOT - -include-root: /sysroot -include-parts: [ doc, devel ] - -kargs: >- - --karg=root=live:LABEL=RLXOS - --karg=quiet - --karg=splash - --karg=rd.live=1 - --karg=rd.live.overlay.overlayfs=1 - -force-rebuild: true -strip: false - -script: |- - chroot %{include-root} /bin/bash -e << "EOT" - for i in %{datadir}/pkgupd/manifest/*/integration ; do - sh -e $i - done - - rm -rf /install-root - - mkdir -p /proc - - update-ca-certificates - - echo "root:root" | chpasswd - - echo -e "\nGTK_CSD=1" >> %{sysconfdir}/environment - - # TODO: should be enabled via systemd user-preset - systemctl enable --global appimaged.service - systemctl enable --global wob.socket - - # TODO: should be done in components/pam::integration - chmod 4755 %{bindir}/unix_chkpwd -v - - ln -sfv %{datadir}/zoneinfo/UTC %{sysconfdir}/localtime - touch %{sysconfdir}/skel/.zshrc - - kerver=$(ls -1 /lib/modules | head -n1) - cp /lib/modules/${kerver}/bzImage /lib/modules/${kerver}/vmlinuz - - EOT - - mkdir -p %{install-root} - - mksquashfs %{sysroot} %{install-root}/system.img -noappend - cp %{include-root}%{libdir}/modules/*/vmlinuz %{install-root}/vmlinuz diff --git a/src/initial-setup b/src/initial-setup index e96e0781e..a2f1d95ef 160000 --- a/src/initial-setup +++ b/src/initial-setup @@ -1 +1 @@ -Subproject commit e96e0781e4b406c287bb1dd3d6addc76b4871988 +Subproject commit a2f1d95ef16e5ac1e8bf0d396efd96f3b6fb56b5 diff --git a/src/pkgupd b/src/pkgupd index 1e8a41d69..d97809c38 160000 --- a/src/pkgupd +++ b/src/pkgupd @@ -1 +1 @@ -Subproject commit 1e8a41d69f25c03dba47d6146ce4a1347f1f3b0d +Subproject commit d97809c387aa4d7c5243bf30775f2ce2e95a8f52