anaconda icon indicating copy to clipboard operation
anaconda copied to clipboard

Rhel 10 flatpak preinstallation

Open jkonecny12 opened this issue 7 months ago • 10 comments

Implement support for Flatpak installation using preinstall.d feature to RHEL-10.

Backport mostly of: https://github.com/rhinstaller/anaconda/pull/6056

The code from the original PR is almost identical to https://github.com/rhinstaller/anaconda/pull/6056 with exception of commit messages and dropped commits:

I also added two commits:

  • first commit is backport of dependency to add Flatpak remote address to configuration file
  • last commit fixes issue with offline installations

Resolves: RHEL-75804

Steps for testing (testable only on RHEL-10):

For testing we will use this snipped in the KS file:

%packages
@graphical-server-environment  # optional for easier testing after installation
redhat-flatpak-preinstall-firefox
redhat-flatpak-preinstall-thunderbird
%end
  • Boot.iso testing
    • Create a kickstart file and add the kickstart snipped above
    • Verify that the installation source have the Flatpaks directory in the URL you are using as the main repository.
    • Verify that you have AppStream repository enabled.
    • Run the installation with RHEL-10 boot.iso from latest compose and set URL for installation source for this compose.
  • DVD.iso testing
    • Create a kickstart file and add the kickstart snipped above
    • Run the installation with RHEL-10 DVD.iso with this kickstart and leave the rest of the kickstart undefined so you are using offline installation sources and interactive installation.
  • Unified repository testing
    • Create a kickstart file and add the kickstart snipped above
    • Verify that the installation source is pointing the the unified repository (usually URL should have suffix compose/unified/x86_64/)
    • Verify that the installation source has the Flatpaks directory in the URL you are using as the main repository.
    • Run the installation with RHEL-10 boot.iso with installation source set to this unified source.
  • Boot.iso with proxy
    • Create a kickstart file and add the kickstart snipped above
    • Add BaseOS and AppStream repositories with proxy to the kickstart file above.
    • Run the installation with RHEL-10 boot.iso with defined kickstart file.

jkonecny12 avatar Jun 03 '25 15:06 jkonecny12

/kickstart-test --testtype smoke

jkonecny12 avatar Jun 03 '25 16:06 jkonecny12

/kickstart-test --testtype payload

jkonecny12 avatar Jun 03 '25 16:06 jkonecny12

/kickstart-test --testtype coverage

jkonecny12 avatar Jun 03 '25 16:06 jkonecny12

/kickstart-test --kstest-pr 1428 flatpak-preinstall flatpak-preinstall-ftp

jkonecny12 avatar Jun 04 '25 17:06 jkonecny12

/build-image --boot.iso

jkonecny12 avatar Jun 10 '25 09:06 jkonecny12

Images built based on commit 1f27b4c878ed511ac4768b3ce32e3db5610b17c0:

  • boot.iso: success

Download the images from the bottom of the job status page.

github-actions[bot] avatar Jun 10 '25 09:06 github-actions[bot]

I've completed an initial testing of several use cases (offline DVD installation, http(s), nfs, proxy) using updates.img and almost all went fine.

There is one use case to discuss: I intentionally removed the ./Flatpak directory in the unified installation source and installed the redhat-flatpak-preinstall-firefox RPM via the %packages section in the kickstart file. It is clear that it's not possible to install the firefox flatpak in such a case, so I expected anaconda to show an error or a warning before starting the installation. But, anaconda didn't show any warning and the installation completed successfully. IMO, this is not a correct behavior and the user should be notified about not being able to install the firefox flatpak - either before beginning the installation (preferred) or during the installation process. What do you think, @jkonecny12 ? I've uploaded the installation logs to http://10.0.151.231/jstodola/flatpak_dir_removed/ (VPN access needed).

jstodola avatar Jun 12 '25 16:06 jstodola

I've completed an initial testing of several use cases (offline DVD installation, http(s), nfs, proxy) using updates.img and almost all went fine.

There is one use case to discuss: I intentionally removed the ./Flatpak directory in the unified installation source and installed the redhat-flatpak-preinstall-firefox RPM via the %packages section in the kickstart file. It is clear that it's not possible to install the firefox flatpak in such a case, so I expected anaconda to show an error or a warning before starting the installation. But, anaconda didn't show any warning and the installation completed successfully. IMO, this is not a correct behavior and the user should be notified about not being able to install the firefox flatpak - either before beginning the installation (preferred) or during the installation process. What do you think, @jkonecny12 ? I've uploaded the installation logs to http://10.0.151.231/jstodola/flatpak_dir_removed/ (VPN access needed).

Hmm, it was on purpose implemented to avoid being invasive but you are correct that the install system doesn't reflect user requirement. This is something we probably want to fix. The question is how to fix it... Could we track this as bug which should be resolved to avoid making this PR bigger than necessary? I will take a look on how to fix this but I don't think it should be blocking right now.

jkonecny12 avatar Jun 19 '25 12:06 jkonecny12

Yes, I think it's a good idea to track it as a separate issue and do not block this PR.

jstodola avatar Jun 19 '25 15:06 jstodola

/kickstart-test --kstest-pr 1428 flatpak-preinstall flatpak-preinstall-ftp

jkonecny12 avatar Jun 23 '25 11:06 jkonecny12

Hi there! Has this been tested with Image Mode?

imbev avatar Jun 30 '25 14:06 imbev

Yes, I think it's a good idea to track it as a separate issue and do not block this PR.

Reported as https://issues.redhat.com/browse/RHEL-101748

jstodola avatar Jul 03 '25 15:07 jstodola