Case:
Make it easy for a packager to show an end user license during
- installation or
- first execution of application
The EULA display dialog will be standalone applications. The exact selection of the display application will take into account the desktop environment during the installation session. The control of the dialog will be integrated into autopackage support code.
Implementation:
EULA display during installation is controlled with package metadata. The automated method of EULA display during first execution will be with a package metadata key. Both methods can be used at the same time. There is a configuration override which will suppress the EULA display and automatically accept the license. This will allow for non-interactive sessions when necessary. All of the EULA files in the meta dir are copied over to the package database. The EULA files include the localized EULAFILENAME(s) and display binaries.
Controls
Metadata:
- EULAFILENAME[xx] - relative source location of license TXT/HTML that can be localized
- EULADISPLAY = INSTALLATION|EXECUTION|BOTH|NONE - EULA dialog appears at what time
- INSTALLATION - full integration with installation session
- EXECUTION - a wrapper stub will be automatically generated
- BOTH - setup for installation and wrapper EULA dialog
- NONE - no action
If there is a wrapper script for the binary already, we will provide drop-in logic to support first execution mode. Only use 'EXECUTION' or 'BOTH' if automatic wrapper script stub generation is needed.
File Marker:
A file marker for EULA acceptance is introduced. The location will be a copy of the license text relative to execution user. The location will be /etc/xdg/eulas/$SHORTNAME-$SOFTWAREVERSION-$PACKAGEVERSION or /home/user/.local/share/eulas/$SHORTNAME-$SOFTWAREVERSION-$PACKAGEVERSION. The existence of the file is the acknowledgment and acceptance of the license. The location should be useful for other tools to share. Hmmm, if this is a shared space maybe we should prefix the files or directory.
Configuration Key:
In the configuration file, a new key is 'autopackage_suppress_eula'. Defaulting the key to 'false' will show any EULA to the installing user. If changed to 'true' then no dialog is shown and the EULA is automatically accepted and the file marker is generated. This configuration key's setting allows for non-interactive installation sessions to occur.
Things to take into account:
If wanting a first execution EULA display and multiple binaries are installed then all binaries should be handled the same way. This makes me move to a metadata control instead of an installExe argument. Any first execution binary would throw the EULA dialog.
Need to add logic for installExe .proxy situation. Not difficult just adds a second stub for the .proxy .
Using a qt based EULA display allows the display of HTML without additional logic. The display applications will be packaged with the package and not included within the autopackage support code. The packager could easily implement the display application into their own package if required. Probably locating the apps within the '$meta_dir/libexec'. A static qt app was 4.3MB and 1.7MB compressed.
makepackage will be checking for eula file existence in payload and adjusting key/value in the environment files.
