From 833aa2e3a201de3e3b63651e28abcd540e8536db Mon Sep 17 00:00:00 2001 From: MrPiglr <31398225+MrPiglr@users.noreply.github.com> Date: Sat, 27 Dec 2025 19:16:34 +0000 Subject: [PATCH] Simplify: Remove complex ISO build, use GitHub Actions verification only --- .github/workflows/build-iso.yml | 100 ++------------- script/build-linux-iso.sh | 220 -------------------------------- script/create-usb.sh | 61 --------- script/test-in-vm.sh | 110 ---------------- 4 files changed, 12 insertions(+), 479 deletions(-) delete mode 100755 script/build-linux-iso.sh delete mode 100755 script/create-usb.sh delete mode 100755 script/test-in-vm.sh diff --git a/.github/workflows/build-iso.yml b/.github/workflows/build-iso.yml index 60c2b0a..e2cc70b 100644 --- a/.github/workflows/build-iso.yml +++ b/.github/workflows/build-iso.yml @@ -1,26 +1,16 @@ -name: Build AeThex Linux ISO +name: Build & Verify AeThex on: + push: + branches: + - main workflow_dispatch: - inputs: - build_type: - description: 'Build type' - required: true - default: 'iso' - type: choice - options: - - iso - - test jobs: - build-iso: + build: runs-on: ubuntu-latest - timeout-minutes: 90 + timeout-minutes: 30 - permissions: - contents: write - packages: write - steps: - name: Checkout code uses: actions/checkout@v4 @@ -31,80 +21,14 @@ jobs: node-version: '20' cache: 'npm' - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - name: Install dependencies + run: npm ci - - name: Install system dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -y -qq \ - debootstrap \ - squashfs-tools \ - xorriso \ - grub-pc-bin \ - grub-efi-amd64-bin \ - mtools \ - dosfstools \ - isolinux \ - syslinux-common \ - libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - file \ - libxdo-dev \ - libssl-dev \ - libayatana-appindicator3-dev \ - librsvg2-dev - - - name: Install Node dependencies - run: npm ci --prefer-offline + - name: Type check + run: npm run check - name: Build client run: npm run build - continue-on-error: true - - name: Build Tauri app - run: npm run build:tauri - continue-on-error: true - - - name: Build AeThex Linux ISO - run: sudo bash script/build-linux-iso.sh - continue-on-error: true - - - name: Check for ISO - id: check-iso - run: | - if [ -f ~/aethex-linux-build/AeThex-Linux-*.iso ]; then - echo "iso_exists=true" >> $GITHUB_OUTPUT - ls -lh ~/aethex-linux-build/AeThex-Linux-*.iso - else - echo "iso_exists=false" >> $GITHUB_OUTPUT - echo "ISO file not found - build may have failed" - ls -lh ~/aethex-linux-build/ 2>/dev/null || echo "Build directory not found" - fi - - - name: Upload ISO as artifact - if: steps.check-iso.outputs.iso_exists == 'true' - uses: actions/upload-artifact@v4 - with: - name: AeThex-Linux-ISO - path: ~/aethex-linux-build/AeThex-Linux-*.iso* - retention-days: 90 - - - name: Report Status - if: always() - run: | - echo "## Build Status" >> $GITHUB_STEP_SUMMARY - if [ "${{ steps.check-iso.outputs.iso_exists }}" == "true" ]; then - echo "✅ ISO build successful - check artifacts" >> $GITHUB_STEP_SUMMARY - else - echo "⚠️ ISO build incomplete - check logs above" >> $GITHUB_STEP_SUMMARY - fi - - - name: Debug Info - if: always() - run: | - echo "Build completed at: $(date)" - echo "Checking build directory..." - ls -la ~/aethex-linux-build/ 2>/dev/null || echo "Build directory does not exist yet" + - name: ✅ Build complete + run: echo "AeThex-OS verified and built successfully" diff --git a/script/build-linux-iso.sh b/script/build-linux-iso.sh deleted file mode 100755 index 40af679..0000000 --- a/script/build-linux-iso.sh +++ /dev/null @@ -1,220 +0,0 @@ -#!/bin/bash -set -e - -# AeThex Linux - ISO Builder Script (Proof of Concept) -# Builds a bootable Ubuntu-based ISO with AeThex Desktop Environment - -VERSION="1.0.0-alpha" -BUILD_DIR="$HOME/aethex-linux-build" -REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -ISO_NAME="AeThex-Linux-${VERSION}-amd64.iso" - -echo "======================================" -echo " AeThex Linux ISO Builder" -echo " Version: ${VERSION}" -echo "======================================" -echo "" - -# Check for root -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root (sudo)" - exit 1 -fi - -# Install dependencies -echo "[1/10] Installing build dependencies..." -apt-get update -qq -apt-get install -y \ - debootstrap \ - squashfs-tools \ - xorriso \ - grub-pc-bin \ - grub-efi-amd64-bin \ - mtools \ - dosfstools \ - isolinux \ - syslinux-common \ - > /dev/null 2>&1 - -echo "[2/10] Creating build directory..." -mkdir -p "${BUILD_DIR}"/{chroot,iso,iso/boot/{grub,isolinux}} -cd "${BUILD_DIR}" - -# Bootstrap Ubuntu base system -echo "[3/10] Bootstrapping Ubuntu 24.04 base system (this may take 5-10 minutes)..." -if [ ! -d "chroot/bin" ]; then - debootstrap --arch=amd64 noble chroot http://archive.ubuntu.com/ubuntu/ -fi - -# Chroot configuration -echo "[4/10] Configuring base system..." -cat > chroot/etc/apt/sources.list << 'EOF' -deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse -deb http://archive.ubuntu.com/ubuntu noble-security main restricted universe multiverse -EOF - -# Install packages in chroot -echo "[5/10] Installing system packages..." -chroot chroot /bin/bash -c " -export DEBIAN_FRONTEND=noninteractive -apt-get update -qq -apt-get install -y \ - linux-image-generic \ - linux-headers-generic \ - grub-efi-amd64 \ - grub-pc-bin \ - systemd \ - network-manager \ - pulseaudio \ - mesa-utils \ - xorg \ - lightdm \ - openbox \ - wget \ - curl \ - git \ - sudo \ - > /dev/null 2>&1 -" - -echo "[6/10] Building AeThex Desktop binary..." -cd "${REPO_DIR}" -if [ ! -f "src-tauri/target/release/aethex-os" ]; then - echo "Building Tauri app (this may take a few minutes)..." - npm run tauri:build || { - echo "ERROR: Tauri build failed. Make sure Rust and dependencies are installed." - exit 1 - } -fi - -# Copy AeThex Desktop to chroot -echo "[7/10] Installing AeThex Desktop..." -cp "${REPO_DIR}/src-tauri/target/release/aethex-os" "${BUILD_DIR}/chroot/usr/bin/aethex-desktop" -chmod +x "${BUILD_DIR}/chroot/usr/bin/aethex-desktop" - -# Copy assets if they exist -if [ -d "${REPO_DIR}/dist/public" ]; then - mkdir -p "${BUILD_DIR}/chroot/usr/share/aethex-desktop" - cp -r "${REPO_DIR}/dist/public"/* "${BUILD_DIR}/chroot/usr/share/aethex-desktop/" -fi - -# Create desktop session -echo "[8/10] Configuring desktop environment..." -mkdir -p "${BUILD_DIR}/chroot/usr/share/xsessions" -cat > "${BUILD_DIR}/chroot/usr/share/xsessions/aethex.desktop" << 'EOF' -[Desktop Entry] -Name=AeThex OS -Comment=AeThex Desktop Environment -Exec=/usr/bin/aethex-desktop -Type=Application -DesktopNames=AeThex -X-Ubuntu-Gettext-Domain=aethex-session -EOF - -# Create default user -chroot chroot /bin/bash -c " -useradd -m -s /bin/bash aethex || true -echo 'aethex:aethex' | chpasswd -usermod -aG sudo,audio,video,plugdev aethex -" - -# Configure auto-login -cat > "${BUILD_DIR}/chroot/etc/lightdm/lightdm.conf" << 'EOF' -[Seat:*] -autologin-user=aethex -autologin-user-timeout=0 -user-session=aethex -EOF - -# Configure hostname -echo "aethex-linux" > "${BUILD_DIR}/chroot/etc/hostname" - -# Create systemd service -mkdir -p "${BUILD_DIR}/chroot/etc/systemd/system" -cat > "${BUILD_DIR}/chroot/etc/systemd/system/aethex-desktop.service" << 'EOF' -[Unit] -Description=AeThex Desktop Environment -After=graphical.target network.target -Wants=network.target - -[Service] -Type=simple -User=aethex -Environment=DISPLAY=:0 -ExecStart=/usr/bin/aethex-desktop -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=graphical.target -EOF - -chroot chroot systemctl enable lightdm aethex-desktop || true - -# Create GRUB config -echo "[9/10] Configuring bootloader..." -cat > "${BUILD_DIR}/iso/boot/grub/grub.cfg" << 'EOF' -set default="0" -set timeout=10 - -menuentry "AeThex Linux (Live)" { - linux /boot/vmlinuz boot=casper quiet splash - initrd /boot/initrd -} - -menuentry "AeThex Linux (Install)" { - linux /boot/vmlinuz boot=casper only-ubiquity quiet splash - initrd /boot/initrd -} -EOF - -# Copy kernel and initrd -echo "[10/10] Creating ISO image..." -cp "${BUILD_DIR}/chroot/boot/vmlinuz-"* "${BUILD_DIR}/iso/boot/vmlinuz" -cp "${BUILD_DIR}/chroot/boot/initrd.img-"* "${BUILD_DIR}/iso/boot/initrd" - -# Create squashfs -mksquashfs "${BUILD_DIR}/chroot" "${BUILD_DIR}/iso/live/filesystem.squashfs" \ - -comp xz -e boot || { - echo "ERROR: Failed to create squashfs" - exit 1 -} - -# Create ISO -cd "${BUILD_DIR}" -xorriso -as mkisofs \ - -iso-level 3 \ - -full-iso9660-filenames \ - -volid "AETHEX_LINUX" \ - -appid "AeThex Linux ${VERSION}" \ - -publisher "AeThex Corporation" \ - -eltorito-boot boot/grub/grub.cfg \ - -eltorito-catalog boot/grub/boot.cat \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - -eltorito-alt-boot \ - -e EFI/efiboot.img \ - -no-emul-boot \ - -isohybrid-gpt-basdat \ - -output "${ISO_NAME}" \ - iso/ 2>&1 | grep -v "NOTE: The file is larger" || true - -# Generate checksum -sha256sum "${ISO_NAME}" > "${ISO_NAME}.sha256" - -echo "" -echo "======================================" -echo " Build Complete!" -echo "======================================" -echo "" -echo "ISO Location: ${BUILD_DIR}/${ISO_NAME}" -echo "ISO Size: $(du -h "${BUILD_DIR}/${ISO_NAME}" | cut -f1)" -echo "Checksum: ${BUILD_DIR}/${ISO_NAME}.sha256" -echo "" -echo "Next steps:" -echo " 1. Test in VM: sudo bash script/test-in-vm.sh" -echo " 2. Write to USB: sudo dd if=${ISO_NAME} of=/dev/sdX bs=4M status=progress" -echo " 3. Boot from USB on real hardware" -echo "" diff --git a/script/create-usb.sh b/script/create-usb.sh deleted file mode 100755 index 332acf0..0000000 --- a/script/create-usb.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# AeThex Linux - Create Bootable USB Drive -# Usage: sudo bash create-usb.sh /dev/sdX - -set -e - -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root (sudo)" - exit 1 -fi - -if [ -z "$1" ]; then - echo "Usage: sudo bash create-usb.sh /dev/sdX" - echo "" - echo "Available devices:" - lsblk -d -o NAME,SIZE,TYPE,MOUNTPOINT | grep disk - echo "" - echo "Example: sudo bash create-usb.sh /dev/sdb" - exit 1 -fi - -DEVICE=$1 -BUILD_DIR="$HOME/aethex-linux-build" -ISO_FILE="${BUILD_DIR}/AeThex-Linux-1.0.0-alpha-amd64.iso" - -# Check if ISO exists -if [ ! -f "$ISO_FILE" ]; then - echo "ERROR: ISO not found at $ISO_FILE" - echo "Build it first: sudo bash script/build-linux-iso.sh" - exit 1 -fi - -# Confirm device -echo "WARNING: This will ERASE all data on ${DEVICE}" -echo "Device info:" -lsblk "${DEVICE}" || exit 1 -echo "" -read -p "Are you sure you want to continue? (yes/no): " -r -if [[ ! $REPLY =~ ^[Yy][Ee][Ss]$ ]]; then - echo "Cancelled." - exit 1 -fi - -# Unmount if mounted -echo "Unmounting ${DEVICE}..." -umount ${DEVICE}* 2>/dev/null || true - -# Write ISO to USB -echo "Writing ISO to ${DEVICE}..." -echo "This may take 5-10 minutes..." -dd if="${ISO_FILE}" of="${DEVICE}" bs=4M status=progress oflag=sync - -# Sync to ensure all data is written -sync - -echo "" -echo "Success! USB drive is ready." -echo "You can now:" -echo " 1. Remove the USB drive safely" -echo " 2. Boot from it on any PC" -echo " 3. Default login: aethex / aethex" diff --git a/script/test-in-vm.sh b/script/test-in-vm.sh deleted file mode 100755 index 3e1e97e..0000000 --- a/script/test-in-vm.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash -set -e - -# AeThex Linux - VM Testing Script -# Automatically creates and launches a VirtualBox VM with the AeThex Linux ISO - -VM_NAME="AeThex-Linux-Test" -BUILD_DIR="$HOME/aethex-linux-build" -ISO_PATH="${BUILD_DIR}/AeThex-Linux-1.0.0-alpha-amd64.iso" -MEMORY_MB=4096 -VRAM_MB=128 -DISK_SIZE_MB=20480 # 20GB - -echo "======================================" -echo " AeThex Linux VM Testing" -echo "======================================" -echo "" - -# Check for VirtualBox -if ! command -v VBoxManage &> /dev/null; then - echo "ERROR: VirtualBox not found" - echo "Install with: sudo apt install virtualbox" - exit 1 -fi - -# Check for ISO -if [ ! -f "${ISO_PATH}" ]; then - echo "ERROR: ISO not found at ${ISO_PATH}" - echo "Build it first with: sudo bash script/build-linux-iso.sh" - exit 1 -fi - -# Remove existing VM if present -echo "[1/5] Cleaning up existing VM..." -VBoxManage unregistervm "${VM_NAME}" --delete 2>/dev/null || true - -# Create new VM -echo "[2/5] Creating virtual machine..." -VBoxManage createvm \ - --name "${VM_NAME}" \ - --ostype "Ubuntu_64" \ - --register - -# Configure VM -echo "[3/5] Configuring VM settings..." -VBoxManage modifyvm "${VM_NAME}" \ - --memory ${MEMORY_MB} \ - --vram ${VRAM_MB} \ - --cpus 2 \ - --audio pulse \ - --audiocontroller ac97 \ - --boot1 dvd \ - --boot2 disk \ - --nic1 nat \ - --graphicscontroller vmsvga \ - --accelerate3d on - -# Create storage controllers -VBoxManage storagectl "${VM_NAME}" \ - --name "SATA" \ - --add sata \ - --controller IntelAhci - -# Create and attach virtual hard disk -echo "[4/5] Creating virtual disk..." -VBoxManage createhd \ - --filename "${HOME}/VirtualBox VMs/${VM_NAME}/${VM_NAME}.vdi" \ - --size ${DISK_SIZE_MB} - -VBoxManage storageattach "${VM_NAME}" \ - --storagectl "SATA" \ - --port 0 \ - --device 0 \ - --type hdd \ - --medium "${HOME}/VirtualBox VMs/${VM_NAME}/${VM_NAME}.vdi" - -# Attach ISO -VBoxManage storageattach "${VM_NAME}" \ - --storagectl "SATA" \ - --port 1 \ - --device 0 \ - --type dvddrive \ - --medium "${ISO_PATH}" - -# Enable EFI (optional, for UEFI boot testing) -# VBoxManage modifyvm "${VM_NAME}" --firmware efi - -echo "[5/5] Starting VM..." -VBoxManage startvm "${VM_NAME}" --type gui - -echo "" -echo "======================================" -echo " VM Launched Successfully!" -echo "======================================" -echo "" -echo "Test checklist:" -echo " [ ] System boots to AeThex desktop" -echo " [ ] Window manager responds (drag/drop)" -echo " [ ] Terminal opens and functions" -echo " [ ] File manager shows directories" -echo " [ ] Network connectivity works" -echo " [ ] Applications launch correctly" -echo "" -echo "Login credentials:" -echo " Username: aethex" -echo " Password: aethex" -echo "" -echo "To stop VM: VBoxManage controlvm '${VM_NAME}' poweroff" -echo "To delete VM: VBoxManage unregistervm '${VM_NAME}' --delete" -echo ""