diff --git a/.github/workflows/ci-doc-check.yml b/.github/workflows/ci-doc-check.yml index 9531228a1e..759f8a1c33 100644 --- a/.github/workflows/ci-doc-check.yml +++ b/.github/workflows/ci-doc-check.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Fix the file owner # fix the file owner diff --git a/.github/workflows/ci-integration-tests.yml b/.github/workflows/ci-integration-tests.yml index ec1dff1975..81b01ad142 100644 --- a/.github/workflows/ci-integration-tests.yml +++ b/.github/workflows/ci-integration-tests.yml @@ -21,7 +21,7 @@ jobs: # TODO: Cache the Ruby gems and node packages - name: Git Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # fetch complete history with tags, agama.gemspec calls "git describe --tags" # that would fail with just last commit checked out diff --git a/.github/workflows/ci-rubocop.yml b/.github/workflows/ci-rubocop.yml index 067ee6b367..55aa0bf125 100644 --- a/.github/workflows/ci-rubocop.yml +++ b/.github/workflows/ci-rubocop.yml @@ -48,7 +48,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Rubocop run: /usr/bin/rubocop.*-1.24.1 diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index ffc9857543..d6802c9c13 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -58,7 +58,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure and refresh repositories # disable unused repositories to have faster refresh diff --git a/.github/workflows/ci-service.yml b/.github/workflows/ci-service.yml index c7dced78cc..17061a1cc0 100644 --- a/.github/workflows/ci-service.yml +++ b/.github/workflows/ci-service.yml @@ -57,7 +57,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure and refresh repositories # disable unused repositories to have faster refresh diff --git a/.github/workflows/ci-web.yml b/.github/workflows/ci-web.yml index 4878e021f3..223f2050be 100644 --- a/.github/workflows/ci-web.yml +++ b/.github/workflows/ci-web.yml @@ -46,7 +46,7 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index aa341b39a6..69794c4444 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install DocBook tooling run: | diff --git a/.github/workflows/obs-service-shared.yml b/.github/workflows/obs-service-shared.yml index a7f4871fd0..4c4a33693f 100644 --- a/.github/workflows/obs-service-shared.yml +++ b/.github/workflows/obs-service-shared.yml @@ -10,16 +10,10 @@ on: OBS_PASSWORD: required: true - inputs: - project_name: - description: OBS project name - required: true - type: string - jobs: update_service: - # do not run in forks - if: github.repository == 'openSUSE/agama' + # do not run in forks which do not set the OBS_PROJECT variable + if: vars.OBS_PROJECT != '' runs-on: ubuntu-latest @@ -34,6 +28,7 @@ jobs: - name: Install tools run: zypper --non-interactive install --no-recommends bzip2 + diffutils git obs-service-format_spec_file osc @@ -43,18 +38,17 @@ jobs: - name: Git Checkout (full history) if: ${{ github.ref_type != 'tag' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # fetch all history, we need to find the latest tag and offset for the version number fetch-depth: 0 - name: Git Checkout (release tag only) if: ${{ github.ref_type == 'tag' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Fix file owner - # workaround for a strict git check - run: chown -R -c 0 . + - name: Configure git + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Configure osc run: .github/workflows/configure_osc.sh @@ -62,14 +56,14 @@ jobs: OBS_USER: ${{ secrets.OBS_USER }} OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }} - - name: Commit the rubygem-agama-yast package to ${{ inputs.project_name }} + - name: Commit the rubygem-agama-yast package to ${{ vars.OBS_PROJECT }} run: rake osc:commit working-directory: ./service env: # do not build the package with "osc", it takes long time # and does not provide much value SKIP_OSC_BUILD: 1 - OBS_PROJECT: ${{ inputs.project_name }} + OBS_PROJECT: ${{ vars.OBS_PROJECT }} - name: Submit the rubygem-agama-yast package # only when a tag has been pushed @@ -78,4 +72,4 @@ jobs: run: rake osc:sr:force working-directory: ./service env: - OBS_PROJECT: ${{ inputs.project_name }} + OBS_PROJECT: ${{ vars.OBS_PROJECT }} diff --git a/.github/workflows/obs-staging-live.yml b/.github/workflows/obs-staging-live.yml index 1005bf59e3..cce8091242 100644 --- a/.github/workflows/obs-staging-live.yml +++ b/.github/workflows/obs-staging-live.yml @@ -9,10 +9,13 @@ on: # run only when a live ISO source is changed - live/** + # allow running manually + workflow_dispatch: + jobs: update_staging_package: - # do not run in forks - if: github.repository_owner == 'openSUSE' + # do not run in forks which do not set the OBS_PROJECT variable + if: vars.OBS_PROJECT != '' runs-on: ubuntu-latest @@ -20,16 +23,19 @@ jobs: image: registry.opensuse.org/opensuse/tumbleweed:latest steps: - - name: Git Checkout - uses: actions/checkout@v4 - - name: Configure and refresh repositories # disable unused repositories to have a faster refresh run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref - name: Install tools run: zypper --non-interactive install --no-recommends - make osc + git make osc + + - name: Git Checkout + uses: actions/checkout@v4 + + - name: Configure git + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Configure osc run: .github/workflows/configure_osc.sh @@ -37,8 +43,8 @@ jobs: OBS_USER: ${{ secrets.OBS_USER }} OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }} - - name: Checkout agama-live - run: osc co -o dist systemsmanagement:Agama:Staging agama-live + - name: Checkout ${{ vars.OBS_PROJECT }} agama-live + run: osc co -o dist ${{ vars.OBS_PROJECT }} agama-live working-directory: ./live - name: Build sources @@ -53,6 +59,6 @@ jobs: run: osc diff && osc status working-directory: ./live/dist - - name: Commit agama-live + - name: Commit agama-live to ${{ vars.OBS_PROJECT }} run: osc commit -m "Updated to Agama $GITHUB_SHA" working-directory: ./live/dist diff --git a/.github/workflows/obs-staging-playwright.yml b/.github/workflows/obs-staging-playwright.yml index 3c9d58bc87..dc4a22990f 100644 --- a/.github/workflows/obs-staging-playwright.yml +++ b/.github/workflows/obs-staging-playwright.yml @@ -1,4 +1,4 @@ -name: Submit cockpit-agama-playwright +name: Submit agama-playwright on: # runs on pushes targeting the default branch @@ -9,11 +9,14 @@ on: # run only when a Playwright source is changed - playwright/** + # allow running manually + workflow_dispatch: + jobs: update_staging: uses: ./.github/workflows/obs-staging-shared.yml # pass all secrets secrets: inherit with: - project_name: systemsmanagement:Agama:Staging - package_name: cockpit-agama-playwright + package_name: agama-playwright + service_file: playwright/package/_service diff --git a/.github/workflows/obs-staging-products.yml b/.github/workflows/obs-staging-products.yml index d67b067714..f7bed76802 100644 --- a/.github/workflows/obs-staging-products.yml +++ b/.github/workflows/obs-staging-products.yml @@ -9,11 +9,14 @@ on: # run only when a Rust source is changed - products.d/** + # allow running manually + workflow_dispatch: + jobs: update_staging: uses: ./.github/workflows/obs-staging-shared.yml # pass all secrets secrets: inherit with: - project_name: systemsmanagement:Agama:Staging package_name: agama-products-opensuse + service_file: products.d/_service diff --git a/.github/workflows/obs-staging-rust.yml b/.github/workflows/obs-staging-rust.yml index 0e804b3c2f..e14ca8c207 100644 --- a/.github/workflows/obs-staging-rust.yml +++ b/.github/workflows/obs-staging-rust.yml @@ -1,4 +1,4 @@ -name: Submit agama-cli +name: Submit agama on: # runs on pushes targeting the default branch @@ -9,6 +9,9 @@ on: # run only when a Rust source is changed - rust/** + # allow running manually + workflow_dispatch: + jobs: update_staging: uses: ./.github/workflows/obs-staging-shared.yml @@ -16,5 +19,5 @@ jobs: secrets: inherit with: install_packages: obs-service-cargo_audit obs-service-cargo_vendor - project_name: systemsmanagement:Agama:Staging package_name: agama + service_file: rust/package/_service diff --git a/.github/workflows/obs-staging-service.yml b/.github/workflows/obs-staging-service.yml index 342f2e38f0..c9d7cc7c08 100644 --- a/.github/workflows/obs-staging-service.yml +++ b/.github/workflows/obs-staging-service.yml @@ -10,10 +10,11 @@ on: - service/** - Rakefile + # allow running manually + workflow_dispatch: + jobs: update_service: uses: ./.github/workflows/obs-service-shared.yml # pass all secrets secrets: inherit - with: - project_name: systemsmanagement:Agama:Staging diff --git a/.github/workflows/obs-staging-shared.yml b/.github/workflows/obs-staging-shared.yml index 55eae4315e..0f03ab72b1 100644 --- a/.github/workflows/obs-staging-shared.yml +++ b/.github/workflows/obs-staging-shared.yml @@ -21,15 +21,15 @@ on: required: true type: string - project_name: - description: OBS project name - required: true + service_file: + description: Optional service file to copy from the sources + required: false type: string jobs: update_staging_package: - # do not run in forks - if: github.repository == 'openSUSE/agama' + # do not run in forks which do not set the OBS_PROJECT variable + if: vars.OBS_PROJECT != '' runs-on: ubuntu-latest @@ -37,15 +37,13 @@ jobs: image: registry.opensuse.org/opensuse/tumbleweed:latest steps: - - name: Git Checkout - uses: actions/checkout@v3 - - name: Configure and refresh repositories # disable unused repositories to have a faster refresh run: zypper modifyrepo -d repo-non-oss repo-openh264 repo-update && zypper ref - name: Install tools run: zypper --non-interactive install --no-recommends + git cpio obs-service-download_files obs-service-format_spec_file @@ -53,14 +51,22 @@ jobs: osc ${{ inputs.install_packages }} + - name: Git Checkout + uses: actions/checkout@v4 + with: + fetch-tags: true + - name: Configure osc run: .github/workflows/configure_osc.sh env: OBS_USER: ${{ secrets.OBS_USER }} OBS_PASSWORD: ${{ secrets.OBS_PASSWORD }} - - name: Checkout ${{ inputs.package_name }} - run: osc co ${{ inputs.project_name }} ${{ inputs.package_name }} + - name: Checkout ${{ vars.OBS_PROJECT }} ${{ inputs.package_name }} + run: osc co ${{ vars.OBS_PROJECT }} ${{ inputs.package_name }} + + - name: Configure git + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Update service revision # only when a tag has been pushed @@ -68,23 +74,32 @@ jobs: run: |- echo "Updating revision to ${{ github.ref_name }}" sed -i -e 's#.*#${{ github.ref_name }}#' _service - working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }} + working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }} + + - name: Copy optional service file + # patch the URL in the file so it works also from forks, forks also by + # default do not inherit the tags so remove the version format option if + # no tag is present + if: inputs.service_file != '' + run: | + sed -e 's#.*#https://github.com/${{ github.repository }}.git#' ${{ inputs.service_file }} > ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}/_service + if [ -z "$(git tag -l)" ]; then sed -i -e 's#.*##' ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }}/_service; fi - name: Run services run: osc service manualrun - working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }} + working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }} - name: Check status - run: osc diff && osc status - working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }} + run: osc addremove && osc diff && osc status + working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }} - - name: Commit ${{ inputs.package_name }} + - name: Commit ${{ inputs.package_name }} to ${{ vars.OBS_PROJECT }} run: |- osc commit -m "Updated to $(sed -e '/^version:/!d' -e 's/version: *\(.*\)/\1/' agama.obsinfo) ($(sed -e '/^commit:/!d' -e 's/commit: *\(.*\)/\1/' agama.obsinfo))" - working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }} + working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }} - name: Submit the package # only when a tag has been pushed if: ${{ github.ref_type == 'tag' }} run: osc sr --yes -m "Releasing version ${{ github.ref_name }}" - working-directory: ./${{ inputs.project_name }}/${{ inputs.package_name }} + working-directory: ./${{ vars.OBS_PROJECT }}/${{ inputs.package_name }} diff --git a/.github/workflows/obs-staging-web.yml b/.github/workflows/obs-staging-web.yml index fa2a9731f8..bef124e2fb 100644 --- a/.github/workflows/obs-staging-web.yml +++ b/.github/workflows/obs-staging-web.yml @@ -1,4 +1,4 @@ -name: Submit cockpit-agama +name: Submit agama-web-ui on: # runs on pushes targeting the default branch @@ -9,6 +9,9 @@ on: # run only when a web frontend source is changed - web/** + # allow running manually + workflow_dispatch: + jobs: update_staging: uses: ./.github/workflows/obs-staging-shared.yml @@ -16,5 +19,5 @@ jobs: secrets: inherit with: install_packages: obs-service-node_modules - project_name: systemsmanagement:Agama:Staging - package_name: cockpit-agama + package_name: agama-web-ui + service_file: web/package/_service diff --git a/.github/workflows/weblate-merge-po.yml b/.github/workflows/weblate-merge-po.yml index 6c0d46ad29..1f5a0f85cb 100644 --- a/.github/workflows/weblate-merge-po.yml +++ b/.github/workflows/weblate-merge-po.yml @@ -43,12 +43,12 @@ jobs: git config --global user.email "yast-devel@opensuse.org" - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama - name: Checkout Agama-weblate sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama-weblate repository: openSUSE/agama-weblate diff --git a/.github/workflows/weblate-merge-products-po.yml b/.github/workflows/weblate-merge-products-po.yml index 2f08620718..cbf706b36c 100644 --- a/.github/workflows/weblate-merge-products-po.yml +++ b/.github/workflows/weblate-merge-products-po.yml @@ -43,12 +43,12 @@ jobs: git config --global user.email "yast-devel@opensuse.org" - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama - name: Checkout Agama-weblate sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama-weblate repository: openSUSE/agama-weblate diff --git a/.github/workflows/weblate-merge-service-po.yml b/.github/workflows/weblate-merge-service-po.yml index 615b3f5bd1..9639476090 100644 --- a/.github/workflows/weblate-merge-service-po.yml +++ b/.github/workflows/weblate-merge-service-po.yml @@ -43,12 +43,12 @@ jobs: git config --global user.email "yast-devel@opensuse.org" - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama - name: Checkout Agama-weblate sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama-weblate repository: openSUSE/agama-weblate diff --git a/.github/workflows/weblate-update-pot.yml b/.github/workflows/weblate-update-pot.yml index d9ce376442..ec7dac0486 100644 --- a/.github/workflows/weblate-update-pot.yml +++ b/.github/workflows/weblate-update-pot.yml @@ -32,7 +32,7 @@ jobs: zypper --non-interactive install --no-recommends diffutils git gettext-tools npm-default "rubygem(ruby:$RUBY_VERSION:yast-rake)" "rubygem(ruby:$RUBY_VERSION:gettext)" yast2-devtools - name: Checkout Agama sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama @@ -46,7 +46,7 @@ jobs: run: msgfmt --check-format agama/web/agama.pot - name: Checkout Weblate sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: agama-weblate repository: openSUSE/agama-weblate diff --git a/doc/i18n.md b/doc/i18n.md index 07c61f522c..35de9425bc 100644 --- a/doc/i18n.md +++ b/doc/i18n.md @@ -28,7 +28,7 @@ - [Building POT File](#building-pot-file) - [Loading Web UI Translations](#loading-web-ui-translations) - [Development Server](#development-server) - - [D-Bus Backend](#d-bus-backend) + - [Backend Locale](#backend-locale) - [Backend Translations](#backend-translations) - [Troubleshooting](#troubleshooting) @@ -51,7 +51,7 @@ Users have two ways how to change the used language in the Agama interface. The sidebar of the web UI contains a component that allows to change the language. It was introduced in Agama 5 and it is the recommended way. The list of supported languages is read from the -[manifest.json](https://github.com/openSUSE/agama/blob/master/web/src/manifest.json) +[languages.json](https://github.com/openSUSE/agama/blob/master/web/src/languages.json) file. Check the [The Web Frontend](#the-web-frontend) for further details. ### URL Query Parameter @@ -147,7 +147,7 @@ GitHub action. - It checks out both `agama` and `agama-weblate` repositories - It copies the PO files from the `agama-weblate` to the `agama` repository -- It updates the `manifest.json` file with the list of supported languages. +- It updates the `languages.json` file with the list of supported languages. - It creates a pull request with the changes If there are no changes besides the timestamps in the PO files the pull request @@ -187,16 +187,15 @@ from the backend part so it is important to set the same language in both parts and make sure the translations are available there. The list of supported languages is read from the -[manifest.json](https://github.com/openSUSE/agama/blob/master/web/src/manifest.json), -under the `locales` key. Such a list is automatically refreshed when any of the -PO files is updated (see [Uploading Translatable -Texts](#uploading-translatable-texts)). +[languages.json](https://github.com/openSUSE/agama/blob/master/web/src/languages.json). +Such a list is automatically refreshed when any of the PO files is updated (see +[Uploading Translatable Texts](#uploading-translatable-texts)). The [update-manifest.py script](https://github.com/openSUSE/agama/blob/master/web/share/update-manifest.py) is the responsible for updating the list of supported languages. It goes through all PO files, filters out the ones with less than 70% of translated -content and adds the corresponding locales to the `manifest.json`. +content and adds the corresponding locales to the `languages.json`. The name of the locale is taken from [langtable](https://pypi.org/project/langtable/), so be sure to have it @@ -205,10 +204,10 @@ instead of `es_es`), the script uses the [locales.json map](https://github.com/openSUSE/agama/blob/master/web/share/locales.json) to determine which territory to use. -If you need to manually update the `manifest.json` file, run: +If you need to manually update the `languages.json` file, run: ``` -web/share/update-manifest.py web/src/manifest.json +web/share/update-languages.py > web/src/languages.json ``` ### Marking Texts for Translation diff --git a/live/Makefile b/live/Makefile index 5a263b9e36..3ab01fb4c2 100644 --- a/live/Makefile +++ b/live/Makefile @@ -11,6 +11,10 @@ DESTDIR = ./dist # to build a different flavor run "make build FLAVOR=" FLAVOR = openSUSE +# the default OBS project, +# to use a different project run "make build OBS_PROJECT=" +OBS_PROJECT = "systemsmanagement:Agama:Staging" + # files to copy from src/ COPY_FILES = $(patsubst $(SRCDIR)/%,$(DESTDIR)/%,$(wildcard $(SRCDIR)/*)) @@ -48,7 +52,7 @@ $(DESTDIR)/%.tar.xz: % $$(shell find % -type f,l) # build the ISO locally build: $(DESTDIR) - if [ ! -e $(DESTDIR)/.osc ]; then make clean; osc co -o $(DESTDIR) systemsmanagement:Agama:Staging agama-live; fi + if [ ! -e $(DESTDIR)/.osc ]; then make clean; osc co -o $(DESTDIR) $(OBS_PROJECT) agama-live; fi $(MAKE) all (cd $(DESTDIR) && osc build -M $(FLAVOR) images) diff --git a/live/agama-live.kiwi b/live/agama-live.kiwi deleted file mode 100644 index 3e4df52e3a..0000000000 --- a/live/agama-live.kiwi +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - YaST Team - yast2-maintainers@suse.de - Agama Live ISO - - - - - - - 7.0.0 - zypper - en_US - us - Europe/Berlin - true - false - bgrt - openSUSE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/live/config.sh b/live/config.sh deleted file mode 100644 index 422643bb8b..0000000000 --- a/live/config.sh +++ /dev/null @@ -1,133 +0,0 @@ -#! /bin/bash - -set -x - -# KIWI functions -test -f /.kconfig && . /.kconfig -test -f /.profile && . /.profile - -# greeting -echo "Configure image: [$kiwi_iname]..." - -# setup baseproduct link -suseSetupProduct - -# activate services -systemctl enable sshd.service -systemctl enable NetworkManager.service -systemctl enable avahi-daemon.service -systemctl enable agama.service -systemctl enable agama-auto.service -systemctl enable agama-hostname.service -systemctl enable agama-proxy-setup.service -systemctl enable setup-systemd-proxy-env.path -systemctl enable x11-autologin.service -systemctl enable spice-vdagent.service -systemctl enable zramswap - -# default target -systemctl set-default graphical.target - -# adjust owner of extracted files -chown -R root:root /root -find /etc -user 1000 | xargs chown root:root - -### setup dracut for live system - -label=${kiwi_install_volid:-$kiwi_iname} -arch=$(uname -m) - -echo "Setting default live root: live:LABEL=$label" -mkdir /etc/cmdline.d -echo "root=live:LABEL=$label" >/etc/cmdline.d/10-liveroot.conf -echo "root_disk=live:LABEL=$label" >>/etc/cmdline.d/10-liveroot.conf -# if there's a default network location, add it here -# echo "root_net=" >> /etc/cmdline.d/10-liveroot.conf -echo 'install_items+=" /etc/cmdline.d/10-liveroot.conf "' >/etc/dracut.conf.d/10-liveroot-file.conf -echo 'add_dracutmodules+=" dracut-menu "' >>/etc/dracut.conf.d/10-liveroot-file.conf - -if [ "${arch}" = "s390x" ];then - # workaround for custom bootloader setting - touch /config.bootoptions -fi - -################################################################################ -# Reducing the used space - -# Clean-up logs -rm /var/log/zypper.log /var/log/zypp/history - -du -h -s /usr/{share,lib}/locale/ -# delete translations and unusupported languages (makes ISO about 22MiB smaller) -# build list of ignore options for "ls" with supported languages like "-I cs* -I de* -I es* ..." -readarray -t IGNORE_OPTS < <(ls /usr/share/cockpit/agama/po.*.js.gz | sed -e "s#/usr/share/cockpit/agama/po\.\(.*\)\.js\.gz#-I\n\\1*#") -# additionally keep the en_US translations -ls -1 "${IGNORE_OPTS[@]}" -I en_US /usr/share/locale/ | xargs -I% sh -c "echo 'Removing translations %...' && rm -rf /usr/share/locale/%" - -# delete locale definitions for unsupported languages (explicitly keep the C and en_US locales) -ls -1 "${IGNORE_OPTS[@]}" -I "en_US*" -I "C.*" /usr/lib/locale/ | xargs -I% sh -c "echo 'Removing locale %...' && rm -rf /usr/lib/locale/%" - -# delete unused translations (MO files) -for t in zypper gettext-runtime p11-kit polkit-1 xkeyboard-config; do - rm /usr/share/locale/*/LC_MESSAGES/$t.mo -done -du -h -s /usr/{share,lib}/locale/ - -# remove documentation -du -h -s /usr/share/doc/packages/ -rm -rf /usr/share/doc/packages/* -# remove man pages -du -h -s /usr/share/man -rm -rf /usr/share/man/* - -## removing drivers and firmware makes the Live ISO about 370MiB smaller -# sound related, Agama does not use sound, added by icewm dependencies -rpm -e --nodeps alsa alsa-utils alsa-ucm-conf - -# driver and firmware cleanup -# Note: openSUSE Tumbleweed Live completely removes firmware for some server -# network cars, because you very likely won't run TW KDE Live on a server. -# But for Agama installer it makes more sense to run on server. So we keep it -# and remove the drivers for sound cards and TV cards instead. Those do not -# make sense on a server. -du -h -s /lib/modules /lib/firmware -# delete sound drivers -rm -rfv /lib/modules/*/kernel/sound -# delete TV cards and radio cards -rm -rfv /lib/modules/*/kernel/drivers/media/ - -# remove the unused firmware (not referenced by kernel drivers) -/fw_cleanup.rb --delete -# remove the script, not needed anymore -rm /fw_cleanup.rb -du -h -s /lib/modules /lib/firmware - -################################################################################ -# The rest of the file was copied from the openSUSE Tumbleweed Live ISO -# https://build.opensuse.org/package/view_file/openSUSE:Factory:Live/livecd-tumbleweed-kde/config.sh?expand=1 -# - -# disable the services included by dependencies -for s in purge-kernels; do - systemctl -f disable $s || true -done - -# Only used for OpenCL and X11 acceleration on vmwgfx (?), saves ~50MiB -rpm -e --nodeps Mesa-gallium -# Too big and will have to be dropped anyway (unmaintained, known security issues) -rm -rf /usr/lib*/libmfxhw*.so.* /usr/lib*/mfx/ - -# the new, optional nvidia gsp firmware blobs are huge - ~ 70MB -du -h -s /lib/firmware/nvidia -find /lib/firmware/nvidia -name gsp | xargs -r rm -rf -du -h -s /lib/firmware/nvidia -# The gems are unpackaged already, no need to store them twice -du -h -s /usr/lib*/ruby/gems/*/cache/ -rm -rf /usr/lib*/ruby/gems/*/cache/ - -# Not needed, boo#1166406 -rm -f /boot/vmlinux*.[gx]z -rm -f /lib/modules/*/vmlinux*.[gx]z - -# Remove generated files (boo#1098535) -rm -rf /var/cache/zypp/* /var/lib/zypp/AnonymousUniqueId /var/lib/systemd/random-seed diff --git a/live/root/etc/cockpit/cockpit.conf b/live/root/etc/cockpit/cockpit.conf deleted file mode 100644 index 741cc4b362..0000000000 --- a/live/root/etc/cockpit/cockpit.conf +++ /dev/null @@ -1,6 +0,0 @@ -[WebService] -LoginTitle = Agama Installer -Shell = /agama/index.html - -[Session] -IdleTimeout = 0 diff --git a/live/root/etc/systemd/system/agama-auto.service b/live/root/etc/systemd/system/agama-auto.service index 08be3630ee..5fba1c89e5 100644 --- a/live/root/etc/systemd/system/agama-auto.service +++ b/live/root/etc/systemd/system/agama-auto.service @@ -4,7 +4,7 @@ Description=Agama automatic profile runner After=dbus.socket # it needs to NetworkManager, so it has access to it After=NetworkManager.service -# it needs dinstaller, of course +# it needs Agama, of course After=agama.service Requires=agama.service diff --git a/live/root/etc/systemd/system/cockpit.socket.d/listen.conf b/live/root/etc/systemd/system/cockpit.socket.d/listen.conf deleted file mode 100644 index 74514d041a..0000000000 --- a/live/root/etc/systemd/system/cockpit.socket.d/listen.conf +++ /dev/null @@ -1,8 +0,0 @@ -# see https://cockpit-project.org/guide/latest/listen -[Socket] -# the empty line disables the default port 9090 from the original unit -ListenStream= -# the standard HTTP port (Cockpit automatically redirects all HTTP traffic to HTTPS) -ListenStream=80 -# the standard HTTPS port -ListenStream=443 diff --git a/live/root/root/.mozilla/firefox/profile/user.js b/live/root/root/.mozilla/firefox/profile/user.js deleted file mode 100644 index 2548c9d999..0000000000 --- a/live/root/root/.mozilla/firefox/profile/user.js +++ /dev/null @@ -1,6 +0,0 @@ -// Mozilla User Preferences - -// do not remember or generate passwords -user_pref("signon.management.page.breach-alerts.enabled", false); -user_pref("signon.rememberSignons", false); -user_pref("signon.generation.enabled", false); diff --git a/live/root/root/.mozilla/firefox/profile/user.js.template b/live/root/root/.mozilla/firefox/profile/user.js.template new file mode 100644 index 0000000000..41166d8ab7 --- /dev/null +++ b/live/root/root/.mozilla/firefox/profile/user.js.template @@ -0,0 +1,11 @@ +// Mozilla User Preferences + +// do not remember or generate passwords +user_pref("signon.management.page.breach-alerts.enabled", false); +user_pref("signon.rememberSignons", false); +user_pref("signon.generation.enabled", false); + +// start always in the custom homepage +user_pref("browser.startup.page", 1); +// custom homepage: the value is expected to be replaced with the login URL by the startup script +user_pref("browser.startup.homepage", "__HOMEPAGE__"); diff --git a/live/src/agama-live.kiwi b/live/src/agama-live.kiwi index 215d61be30..e3103e7f0a 100644 --- a/live/src/agama-live.kiwi +++ b/live/src/agama-live.kiwi @@ -10,10 +10,7 @@ - - - 7.0.0 @@ -26,72 +23,27 @@ bgrt openSUSE - + - + - + - - - - - - true - true - /dev/ram1 - false - false - - 3000 - - - - - - - true - true - /dev/ram1 - false - false - - 1900 - - - - - - - true - true - /dev/ram1 - false - false - - 1900 - - - - - - - @@ -140,10 +92,10 @@ - + @@ -161,15 +113,10 @@ - - - - - - + - + diff --git a/live/src/config.sh b/live/src/config.sh index 6698ec685f..e9d2923aa2 100644 --- a/live/src/config.sh +++ b/live/src/config.sh @@ -17,6 +17,7 @@ systemctl enable sshd.service systemctl enable NetworkManager.service systemctl enable avahi-daemon.service systemctl enable agama.service +systemctl enable agama-web-server.service systemctl enable agama-auto.service systemctl enable agama-hostname.service systemctl enable agama-proxy-setup.service diff --git a/playwright/package/_service b/playwright/package/_service index c25ae2dd0b..183d4985f7 100644 --- a/playwright/package/_service +++ b/playwright/package/_service @@ -1,13 +1,14 @@ - @PARENT_TAG@~@TAG_OFFSET@ + @PARENT_TAG@+@TAG_OFFSET@ + v(.*) https://github.com/openSUSE/agama.git git - agama + master playwright enable - package/cockpit-agama-playwright.changes - package/cockpit-agama-playwright.spec + package/agama-playwright.changes + package/agama-playwright.spec agama.obsinfo diff --git a/playwright/package/cockpit-agama-playwright.changes b/playwright/package/agama-playwright.changes similarity index 100% rename from playwright/package/cockpit-agama-playwright.changes rename to playwright/package/agama-playwright.changes diff --git a/playwright/package/cockpit-agama-playwright.spec b/playwright/package/agama-playwright.spec similarity index 85% rename from playwright/package/cockpit-agama-playwright.spec rename to playwright/package/agama-playwright.spec index 126821cf2f..d15e827b9c 100644 --- a/playwright/package/cockpit-agama-playwright.spec +++ b/playwright/package/agama-playwright.spec @@ -1,5 +1,5 @@ # -# spec file for package cockpit-agama-playwright +# spec file for package agama-playwright # # Copyright (c) 2023 SUSE LLC # @@ -16,10 +16,10 @@ # -Name: cockpit-agama-playwright +Name: agama-playwright Version: 0 Release: 0 -Summary: Integration tests for the Agama Cockpit module +Summary: Integration tests for the Agama installer License: GPL-2.0-only URL: https://github.com/openSUSE/agama # source_validator insists that if obscpio has no version then @@ -30,7 +30,7 @@ BuildRequires: coreutils Requires: playwright %description -Playwright integration tests for the Agama Cockpit module. +Playwright integration tests for the Agama installer. %prep %autosetup -p1 -n agama diff --git a/products.d/_service b/products.d/_service new file mode 100644 index 0000000000..fa490c0896 --- /dev/null +++ b/products.d/_service @@ -0,0 +1,20 @@ + + + https://github.com/openSUSE/agama.git + @PARENT_TAG@+@TAG_OFFSET@ + v(.*) + git + master + products.d + enable + agama-products-opensuse.changes + agama-products-opensuse.spec + + + agama.obsinfo + agama + + + agama + + diff --git a/rust/share/agama-web-server.service b/rust/share/agama-web-server.service index 0a6dd71b32..50447a0eec 100644 --- a/rust/share/agama-web-server.service +++ b/rust/share/agama-web-server.service @@ -1,6 +1,8 @@ [Unit] Description=Agama Web Server -After=network-online.target agama.service +# agama-hostname might change the host name which is used when creating +# a self signed certificate, run it before the web server +After=network-online.target agama.service agama-hostname.service [Service] Type=simple diff --git a/web/cspell.json b/web/cspell.json index 57a61da4fa..d1926048ce 100644 --- a/web/cspell.json +++ b/web/cspell.json @@ -6,7 +6,6 @@ "src/languages.json", "src/lib/cockpit.js", "src/lib/cockpit-po-plugin.js", - "src/manifest.json", "src/**/test-data/*" ], "import": [ diff --git a/web/package/_service b/web/package/_service index b6815b5ab4..a1ca8be132 100644 --- a/web/package/_service +++ b/web/package/_service @@ -2,7 +2,7 @@ @PARENT_TAG@+@TAG_OFFSET@ v(.*) - http://github.com/openSUSE/agama.git + https://github.com/openSUSE/agama.git git master web diff --git a/web/src/index.html b/web/src/index.html index 6262f0fd48..918d6d681b 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -11,11 +11,10 @@
- diff --git a/web/src/manifest.json b/web/src/manifest.json deleted file mode 100644 index 2e2bd4cfff..0000000000 --- a/web/src/manifest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "agama", - "requires": { - "cockpit": "137" - }, - "tools": { - "index": { - "label": "Agama" - } - } -} diff --git a/web/webpack.config.js b/web/webpack.config.js index 284b570909..b12dda738c 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -37,7 +37,6 @@ const packageJson = JSON.parse(fs.readFileSync('package.json')); // Non-JS files which are copied verbatim to dist/ const copy_files = [ "./src/index.html", - "./src/manifest.json", // TODO: consider using something more complete like https://github.com/jantimon/favicons-webpack-plugin "./src/assets/favicon.svg", ]; @@ -95,19 +94,8 @@ module.exports = { devServer: { hot: true, // additionally watch these files for changes - watchFiles: ["./src/manifest.json", "./po/*.po"], + watchFiles: ["./po/*.po"], proxy: [ - // TODO: modify it to not depend on cockpit - // forward the manifests.js request and patch the response with the - // current Agama manifest from the ./src/manifest.json file - // "/manifests.js": { - // target: cockpitTarget + "/cockpit/@localhost/", - // // ignore SSL problems (self-signed certificate) - // secure: false, - // // the response is modified by the onProxyRes handler - // selfHandleResponse : true, - // onProxyRes: manifests_handler, - // }, { context: ["/api/ws"], target: agamaServer.replace(/^http/, "ws"),