Repository navigation
Start live boot modes on Wayland and drop X11 Plasma names #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
633d5f7
35bff04
c085c32
e509de8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,36 @@ | ||
| name: Build Package | ||
|
|
||
| # Controls when the workflow will run | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| push: | ||
| #branches: [ "master", "main", "*" ] | ||
| branches: [ "*" ] | ||
| #pull_request: | ||
| #branches: [ "master", "main", "*" ] | ||
| #branches: [ "*" ] | ||
|
|
||
| # The job only calls the build repository's API with its own token. | ||
| permissions: {} | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflow contains a single job called "build" | ||
| build: | ||
| # The type of runner that the job will run on | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| # - name: Send Hooks BigLinux Build Package | ||
| # shell: bash | ||
| # run: | | ||
| # if [ -z "$(grep biglinux-package-template pkgbuild/PKGBUILD)" ];then | ||
| # curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches | ||
| # curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package-ARM/dispatches | ||
| # fi | ||
| # curl -X POST "https://nebulaapi.nimbusnetwork.dev/webhook" \ | ||
| # -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" \ | ||
| # -H "Content-Type: application/json" \ | ||
| # -d '{ | ||
| # "event_type": "${{ github.repository }}", | ||
| # "branch": "${{ github.ref_name }}", | ||
| # "url": "https://github.com/${{ github.repository }}" | ||
| # }' | ||
|
|
||
| # - name: Invoke deployment hook | ||
| # uses: johannes-huther/webhook.sh@v1 | ||
| # env: | ||
| # webhook_url: https://nebulaapi.nimbusnetwork.dev/webhook | ||
| # webhook_secret: ${{ secrets.WEBHOOK_TOKEN }} | ||
| # data: '{ "event_type": "${{ github.repository }}", "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}"}' | ||
| #xpto28 | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| # Steps represent a sequence of tasks that will be executed as part of the job | ||
| steps: | ||
| - name: Send Hooks BigLinux Build Package | ||
| shell: bash | ||
| # Passed through the environment: a branch name expanded into the script | ||
| # could close its quotes and run commands with the token. | ||
| env: | ||
| WEBHOOK_TOKEN: ${{ secrets.WEBHOOK_TOKEN }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| BRANCH: ${{ github.ref_name }} | ||
| run: | | ||
| curl -X POST -H "Accept: application/json" -H "Authorization: token $WEBHOOK_TOKEN" --data "$(jq -n --arg repository "$REPOSITORY" --arg branch "$BRANCH" '{event_type: $repository, client_payload: {branch: $branch, url: "https://github.com/\($repository)", version: "1.2.3"}}')" https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches | ||
| curl -X POST -H "Accept: application/json" -H "Authorization: token $WEBHOOK_TOKEN" --data "$(jq -n --arg repository "$REPOSITORY" --arg branch "$BRANCH" '{event_type: $repository, client_payload: {branch: $branch, url: "https://github.com/\($repository)"}}')" https://api.github.com/repos/BigLinux-Package-Build/build-package-ARM/dispatches | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -371,26 +371,28 @@ _claim_setup_wizard() { | |
| } | ||
|
|
||
| #------------------------------------------------------------------------------- | ||
| # Start kwin_wayland compositor with health check and multi-stage fallback | ||
| # Start kwin_wayland running a command, with health check and multi-stage fallback | ||
| # Fallback chain: | ||
| # 1. Default hardware rendering | ||
| # 2. Multi-GPU: primary (integrated) GPU only, with Mesa EGL if NVIDIA present | ||
| # 3. Software rendering via llvmpipe | ||
| # Returns 0 if the wizard completed, 1 if kwin could not start at all | ||
| #------------------------------------------------------------------------------- | ||
| _start_kwin_wizard() { | ||
| _claim_setup_wizard || return 0 | ||
| local wizard_command="/usr/bin/python /usr/share/biglinux/livecd/main.py" | ||
| # Arguments: the command, then the launcher that receives kwin_wayland's | ||
| # environment and command line (env, or _run_on_wizard_bus). | ||
| # Returns 0 once kwin stayed up and then exited, 1 if it could not start at all | ||
| #------------------------------------------------------------------------------- | ||
| _run_in_kwin() { | ||
| local session_command=$1 | ||
| shift | ||
| local -a launcher=("$@") | ||
| local -a kwin_args=(--drm --no-lockscreen --xwayland) | ||
| local kwin_pid | ||
|
|
||
| _enable_accessibility | ||
| _detect_multi_gpu | ||
|
|
||
| # Attempt 1: hardware-accelerated rendering (default GPU selection) | ||
| _log "Starting kwin_wayland (hardware rendering)..." | ||
| _run_on_wizard_bus "${wizard_environment[@]}" \ | ||
| kwin_wayland "${kwin_args[@]}" --exit-with-session "$wizard_command" & | ||
| "${launcher[@]}" \ | ||
| kwin_wayland "${kwin_args[@]}" --exit-with-session "$session_command" & | ||
| kwin_pid=$! | ||
|
|
||
| # Give kwin a few seconds to initialize; check it didn't crash immediately | ||
|
|
@@ -414,8 +416,8 @@ _start_kwin_wizard() { | |
| env_vars+=("__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json") | ||
| fi | ||
|
|
||
| _run_on_wizard_bus "${wizard_environment[@]}" "${env_vars[@]}" \ | ||
| kwin_wayland "${kwin_args[@]}" --exit-with-session "$wizard_command" & | ||
| "${launcher[@]}" "${env_vars[@]}" \ | ||
| kwin_wayland "${kwin_args[@]}" --exit-with-session "$session_command" & | ||
| kwin_pid=$! | ||
|
|
||
| sleep 3 | ||
|
|
@@ -433,9 +435,9 @@ _start_kwin_wizard() { | |
| # Attempt 3: software rendering via llvmpipe | ||
| _log "Retrying with software rendering..." | ||
|
|
||
| _run_on_wizard_bus "${wizard_environment[@]}" \ | ||
| "${launcher[@]}" \ | ||
| LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe \ | ||
| kwin_wayland "${kwin_args[@]}" --exit-with-session "$wizard_command" & | ||
| kwin_wayland "${kwin_args[@]}" --exit-with-session "$session_command" & | ||
| kwin_pid=$! | ||
|
|
||
| sleep 3 | ||
|
|
@@ -449,6 +451,14 @@ _start_kwin_wizard() { | |
| return 1 | ||
| } | ||
|
|
||
| # Returns 0 if the wizard completed or already ran, 1 if kwin could not start | ||
| _start_kwin_wizard() { | ||
| _claim_setup_wizard || return 0 | ||
| _enable_accessibility | ||
| _run_in_kwin "/usr/bin/python /usr/share/biglinux/livecd/main.py" \ | ||
| _run_on_wizard_bus "${wizard_environment[@]}" | ||
| } | ||
|
|
||
| #------------------------------------------------------------------------------- | ||
| # Start mutter compositor (GNOME) with health check and multi-stage fallback | ||
| # Fallback chain: | ||
|
|
@@ -616,6 +626,14 @@ if [[ -e /livefs-pkgs.txt ]]; then | |
| if ((boot_mode_status == 0)); then | ||
| if boot_command=$(live_boot_command_path "$boot_mode") && [[ -x $boot_command ]]; then | ||
| _log "Starting allowlisted live boot mode: $boot_mode" | ||
| # A Wayland session from SDDM has no compositor yet. boot-in-plasma | ||
| # starts Plasma's own; every other mode runs inside kwin_wayland. | ||
| if [[ $display_manager == sddm && $session_type == wayland && -z ${WAYLAND_DISPLAY:-} && | ||
| $boot_mode != boot-in-plasma ]]; then | ||
| _wait_for_gpu | ||
| _run_in_kwin "$boot_command" env | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not replay a boot command that already completed. If Track whether KWin started the session command. Retry renderer startup only if it failed before that point. This preserves startup recovery without reopening a completed boot mode.
|
||
| exit | ||
| fi | ||
| exec "$boot_command" | ||
| fi | ||
| _log "ERROR - Refusing unsupported live boot mode: $boot_mode" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,6 @@ live_boot_command_path() { | |
| calamares_polkit) printf '%s\n' /usr/bin/calamares-biglinux_polkit ;; | ||
| konsole) printf '%s\n' /usr/bin/konsole ;; | ||
| urxvt) printf '%s\n' /usr/bin/urxvt ;; | ||
| startplasma-x11) printf '%s\n' /usr/bin/startplasma-x11 ;; | ||
| *) return 1 ;; | ||
| esac | ||
| } | ||
|
|
@@ -73,9 +72,11 @@ sanitize_kernel_arguments() { | |
| case "$argument" in | ||
| # The live GPU choices stay on the medium: the installed system blocks | ||
| # nouveau through modprobe.d when the NVIDIA driver is installed, and | ||
| # needs it loadable when it is not. | ||
| # needs it loadable when it is not. Text mode, the medium check and the | ||
| # copy to memory belong to the live boot only. | ||
| BOOT_IMAGE=* | initrd=* | misobasedir=* | misolabel=* | driver=* | rdinit=* | biglinux.bootcmd=* | sshenable | wayland | rw | ro | \ | ||
| module_blacklist=* | modprobe.blacklist=* | bdm.gpu=* | bignvidia=*) | ||
| module_blacklist=* | modprobe.blacklist=* | bdm.gpu=* | bignvidia=* | nouveau.modeset=* | \ | ||
| systemd.unit=* | checksum=* | copytoram=*) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve installed-system options from the existing GRUB configuration. If the existing GRUB configuration sets
|
||
| continue | ||
| ;; | ||
| esac | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make rejected dispatch requests fail the job.
If either endpoint returns HTTP 403 or 500,
curlcan return zero because neither request uses an HTTP failure option. The job can therefore report success although the requested builds did not start.shell: bashcannot detect an error thatcurlreports as success. (curl.se)Add
--fail-with-bodyto both requests. This preserves successful responses and makes HTTP rejection fail the step. If only the second request fails, the first dispatch remains accepted; account for that before retrying both. (curl.se)