Skip to content

Commit

Permalink
unlocked rlxos
Browse files Browse the repository at this point in the history
  • Loading branch information
itsManjeet committed Jun 20, 2024
1 parent 8ac62d1 commit d116f43
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 148 deletions.
57 changes: 6 additions & 51 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

Expand All @@ -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 ]
Expand All @@ -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}/
run: scp -pr ${SERVER_REPO_PATH}/releases/${CHANNEL}/ ${SOURCEFORGE_PREFIX}/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
path = src/srclang
url = [email protected]:itsmanjeet/srclang

[submodule "src/pkgupd"]
path = src/pkgupd
url = [email protected]:itsmanjeet/pkgupd
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
15 changes: 5 additions & 10 deletions elements/include/installer.inc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
force-rebuild: true
kargs: ""

pre-script: |-
mkdir -p ISO/{boot/grub/{fonts,x86_64-efi},efi/boot,isolinux,LiveOS}

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
Expand All @@ -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
Expand All @@ -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 \
Expand Down
32 changes: 10 additions & 22 deletions elements/installer/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,18 @@ 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: |-
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 /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
Expand All @@ -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 \
Expand All @@ -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
58 changes: 0 additions & 58 deletions elements/system/image.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/initial-setup

0 comments on commit d116f43

Please sign in to comment.