diff --git a/Dockerfile b/application/Dockerfile similarity index 100% rename from Dockerfile rename to application/Dockerfile diff --git a/src/app.py b/application/src/app.py similarity index 70% rename from src/app.py rename to application/src/app.py index 9dc2427..f700f9c 100644 --- a/src/app.py +++ b/application/src/app.py @@ -1,7 +1,8 @@ import platform from flask import Flask, render_template -app = Flask(__name__) +app = Flask(__name__, template_folder="/app/templates") + @app.route('/') def system_info(): @@ -13,7 +14,7 @@ def system_info(): 'Machine': platform.machine(), 'Processor': platform.processor() } - return render_template('system_info.html', system_info=system_info) + return render_template('index.html', system_info=system_info) if __name__ == '__main__': - app.run(debug=True) \ No newline at end of file + app.run(host="0.0.0.0", debug=True) \ No newline at end of file diff --git a/src/static/style.css b/application/src/static/style.css similarity index 100% rename from src/static/style.css rename to application/src/static/style.css diff --git a/src/templates/index.html b/application/src/templates/index.html similarity index 100% rename from src/templates/index.html rename to application/src/templates/index.html diff --git a/chrome_repackage/README.md b/chrome_repackage/README.md new file mode 100644 index 0000000..3775dce --- /dev/null +++ b/chrome_repackage/README.md @@ -0,0 +1,70 @@ +# Google Chrome RPM Installation Guide + +This guide provides step-by-step instructions for downloading and rebuilding the Google Chrome RPM package on a RPM-based Linux distribution. + +## Prerequisites + +Before you proceed, ensure that you have the following prerequisites installed on your system: + +- `rpmrebuild`: A tool for rebuilding RPM packages. +- `rpmbuild`: The RPM Package Manager build tool. + +## Installation Steps + +1. **Download Google RPM** + + ```bash + # Replace with the actual download URL + wget /google-chrome-stable-119.0.6045.199-1.x86_64.rpm + ``` + +2. **Rebuild the RPM Package** + + ```bash + rpmrebuild -s google-chrome-stable.spec -p google-chrome-stable-119.0.6045.199-1.x86_64.rpm + ``` + +3. **Extract the Contents** + + ```bash + rpm2cpio google-chrome-stable-119.0.6045.199-1.x86_64.rpm | cpio -idmv + ``` + +4. **Move Google Chrome to the Desired Location** + + ```bash + mv opt/google usr/bin/ + ``` + +5. **Create Symbolic Links** + + ```bash + cd usr/bin/ + rm -f google-chrome-stable + ln -s google/chrome/google-chrome google-chrome-stable + ln -s google/chrome/google-chrome chrome + cd ../.. + ``` + +6. **Create RPM Build Directory** + + ```bash + mkdir -p $HOME/rpmbuild/BUILDROOT/google-chrome-stable-119.0.6045.199-1.x86_64 + ``` + +7. **Copy Files to RPM Build Directory** + + ```bash + for i in etc usr; do cp -r $i $HOME/rpmbuild/BUILDROOT/google-chrome-stable-119.0.6045.199-1.x86_64/; done + ``` + +8. **Build the RPM Package** + + ```bash + rpmbuild -bb google-chrome-stable.spec + ``` + +After completing these steps, you should have successfully downloaded, rebuilt, and repackaged the Google Chrome RPM for your system. The resulting RPM package will be available in the RPM build directory (`$HOME/rpmbuild/RPMS/x86_64/`). + +Note: Ensure that you replace `` with the actual download URL of the Google Chrome RPM. + diff --git a/chrome_repackage/google_chrome_repackage.spec b/chrome_repackage/google_chrome_repackage.spec new file mode 100644 index 0000000..18660c6 --- /dev/null +++ b/chrome_repackage/google_chrome_repackage.spec @@ -0,0 +1,1555 @@ +# rpmrebuild autogenerated specfile + +BuildRoot: /home/cloud-user/.tmp/rpmrebuild.469989/work/root +AutoProv: no +%undefine __find_provides +AutoReq: no +%undefine __find_requires +# Do not try autogenerate prereq/conflicts/obsoletes and check files +%undefine __check_files +%undefine __find_prereq +%undefine __find_conflicts +%undefine __find_obsoletes +# Be sure buildpolicy set to do nothing +%define __spec_install_post %{nil} +# Something that need for rpm-4.1 +%define _missing_doc_files_terminate_build 0 +#dummy +#dummy +#BUILDHOST: NSJAIL +#BUILDTIME: Mon Nov 27 16:02:46 2023 +#SOURCERPM: google-chrome-stable-119.0.6045.199-1.src.rpm + +#RPMVERSION: 4.14.1 + + + +#OS: linux +#SIZE: 334068301 +#ARCHIVESIZE: 334084684 +#ARCH: x86_64 +BuildArch: x86_64 +Name: google-chrome-stable +Version: 119.0.6045.199 +Release: 1 +License: Multiple, see https://chrome.google.com/ +Group: Applications/Internet +Summary: Google Chrome + + +URL: https://chrome.google.com/ +Vendor: Google LLC +Packager: Chrome Linux Team + + + + + +Prefix: /usr/bin +Provides: google-chrome = 119.0.6045.199 +Provides: google-chrome-stable = 119.0.6045.199-1 +Provides: google-chrome-stable(x86-64) = 119.0.6045.199-1 +Requires(pre): /bin/sh +Requires(post): /bin/sh +Requires(preun): /bin/sh +Requires(postun): /bin/sh +Requires(post): /usr/sbin/update-alternatives +Requires(preun): /usr/sbin/update-alternatives +Requires: ca-certificates +Requires: ld-linux-x86-64.so.2()(64bit) +Requires: ld-linux-x86-64.so.2(GLIBC_2.2.5)(64bit) +Requires: ld-linux-x86-64.so.2(GLIBC_2.3)(64bit) +Requires: libX11.so.6()(64bit) +Requires: libXcomposite.so.1()(64bit) +Requires: libXdamage.so.1()(64bit) +Requires: libXext.so.6()(64bit) +Requires: libXfixes.so.3()(64bit) +Requires: libXrandr.so.2()(64bit) +Requires: libasound.so.2()(64bit) +Requires: libasound.so.2(ALSA_0.9)(64bit) +Requires: libasound.so.2(ALSA_0.9.0rc4)(64bit) +Requires: libatk-1.0.so.0()(64bit) +Requires: libatk-bridge-2.0.so.0()(64bit) +Requires: libatspi.so.0()(64bit) +Requires: libc.so.6()(64bit) +Requires: libc.so.6(GLIBC_2.10)(64bit) +Requires: libc.so.6(GLIBC_2.11)(64bit) +Requires: libc.so.6(GLIBC_2.14)(64bit) +Requires: libc.so.6(GLIBC_2.15)(64bit) +Requires: libc.so.6(GLIBC_2.16)(64bit) +Requires: libc.so.6(GLIBC_2.17)(64bit) +Requires: libc.so.6(GLIBC_2.2.5)(64bit) +Requires: libc.so.6(GLIBC_2.3)(64bit) +Requires: libc.so.6(GLIBC_2.3.2)(64bit) +Requires: libc.so.6(GLIBC_2.3.3)(64bit) +Requires: libc.so.6(GLIBC_2.3.4)(64bit) +Requires: libc.so.6(GLIBC_2.4)(64bit) +Requires: libc.so.6(GLIBC_2.6)(64bit) +Requires: libc.so.6(GLIBC_2.7)(64bit) +Requires: libc.so.6(GLIBC_2.8)(64bit) +Requires: libc.so.6(GLIBC_2.9)(64bit) +Requires: libcairo.so.2()(64bit) +Requires: libcups.so.2()(64bit) +Requires: libcurl.so.4()(64bit) +Requires: libdbus-1.so.3()(64bit) +Requires: libdbus-1.so.3(LIBDBUS_1_3)(64bit) +Requires: libdl.so.2()(64bit) +Requires: libdl.so.2(GLIBC_2.2.5)(64bit) +Requires: libdrm.so.2()(64bit) +Requires: liberation-fonts +Requires: libexpat.so.1()(64bit) +Requires: libgbm.so.1()(64bit) +Requires: libgcc_s.so.1()(64bit) +Requires: libgcc_s.so.1(GCC_3.0)(64bit) +Requires: libgio-2.0.so.0()(64bit) +Requires: libglib-2.0.so.0()(64bit) +Requires: libgobject-2.0.so.0()(64bit) +Requires: libgtk-3.so.0()(64bit) +Requires: libm.so.6()(64bit) +Requires: libm.so.6(GLIBC_2.2.5)(64bit) +Requires: libnspr4.so()(64bit) +Requires: libnss3.so()(64bit) +Requires: libnss3.so(NSS_3.11)(64bit) +Requires: libnss3.so(NSS_3.12)(64bit) +Requires: libnss3.so(NSS_3.12.1)(64bit) +Requires: libnss3.so(NSS_3.12.4)(64bit) +Requires: libnss3.so(NSS_3.2)(64bit) +Requires: libnss3.so(NSS_3.22)(64bit) +Requires: libnss3.so(NSS_3.3)(64bit) +Requires: libnss3.so(NSS_3.30)(64bit) +Requires: libnss3.so(NSS_3.31)(64bit) +Requires: libnss3.so(NSS_3.39)(64bit) +Requires: libnss3.so(NSS_3.4)(64bit) +Requires: libnss3.so(NSS_3.5)(64bit) +Requires: libnss3.so(NSS_3.6)(64bit) +Requires: libnss3.so(NSS_3.7)(64bit) +Requires: libnss3.so(NSS_3.9.2)(64bit) +Requires: libnssutil3.so()(64bit) +Requires: libnssutil3.so(NSSUTIL_3.12.3)(64bit) +Requires: libpango-1.0.so.0()(64bit) +Requires: libpthread.so.0()(64bit) +Requires: libpthread.so.0(GLIBC_2.12)(64bit) +Requires: libpthread.so.0(GLIBC_2.2.5)(64bit) +Requires: libpthread.so.0(GLIBC_2.3.2)(64bit) +Requires: libpthread.so.0(GLIBC_2.3.3)(64bit) +Requires: libpthread.so.0(GLIBC_2.3.4)(64bit) +Requires: librt.so.1()(64bit) +Requires: librt.so.1(GLIBC_2.2.5)(64bit) +Requires: libsmime3.so()(64bit) +Requires: libsmime3.so(NSS_3.10)(64bit) +Requires: libsmime3.so(NSS_3.2)(64bit) +Requires: libvulkan.so.1()(64bit) +Requires: libxcb.so.1()(64bit) +Requires: libxkbcommon.so.0()(64bit) +Requires: libxkbcommon.so.0(V_0.5.0)(64bit) +#Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 +#Requires: rpmlib(FileDigests) <= 4.6.0-1 +#Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 +#Requires: rpmlib(PayloadIsXz) <= 5.2-1 +Requires: rtld(GNU_HASH) +Requires: wget +Requires: xdg-utils + + + + + +%description +The web browser from Google + +Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. +%files +%attr(0755, root, root) "/etc/cron.daily/google-chrome" +%dir %attr(0755, root, root) "/usr/bin/google/chrome" +%dir %attr(0755, root, root) "/usr/bin/google/chrome/MEIPreload" +%attr(0644, root, root) "/usr/bin/google/chrome/MEIPreload/manifest.json" +%attr(0644, root, root) "/usr/bin/google/chrome/MEIPreload/preloaded_data.pb" +%dir %attr(0755, root, root) "/usr/bin/google/chrome/WidevineCdm" +%attr(0644, root, root) "/usr/bin/google/chrome/WidevineCdm/LICENSE" +%dir %attr(0755, root, root) "/usr/bin/google/chrome/WidevineCdm/_platform_specific" +%dir %attr(0755, root, root) "/usr/bin/google/chrome/WidevineCdm/_platform_specific/linux_x64" +%attr(0755, root, root) "/usr/bin/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" +%attr(0644, root, root) "/usr/bin/google/chrome/WidevineCdm/manifest.json" +%attr(0755, root, root) "/usr/bin/google/chrome/chrome" +%attr(0755, root, root) "/usr/bin/google/chrome/chrome-management-service" +%attr(4755, root, root) "/usr/bin/google/chrome/chrome-sandbox" +%attr(0644, root, root) "/usr/bin/google/chrome/chrome_100_percent.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/chrome_200_percent.pak" +%attr(0755, root, root) "/usr/bin/google/chrome/chrome_crashpad_handler" +%attr(0644, root, root) "/usr/bin/google/chrome/default-app-block" +%dir %attr(0755, root, root) "/usr/bin/google/chrome/default_apps" +%attr(0644, root, root) "/usr/bin/google/chrome/default_apps/external_extensions.json" +%attr(0755, root, root) "/usr/bin/google/chrome/google-chrome" +%attr(0644, root, root) "/usr/bin/google/chrome/icudtl.dat" +%attr(0755, root, root) "/usr/bin/google/chrome/libEGL.so" +%attr(0755, root, root) "/usr/bin/google/chrome/libGLESv2.so" +%attr(0755, root, root) "/usr/bin/google/chrome/liboptimization_guide_internal.so" +%attr(0755, root, root) "/usr/bin/google/chrome/libqt5_shim.so" +%attr(0755, root, root) "/usr/bin/google/chrome/libqt6_shim.so" +%attr(0755, root, root) "/usr/bin/google/chrome/libvk_swiftshader.so" +%attr(0755, root, root) "/usr/bin/google/chrome/libvulkan.so.1" +%dir %attr(0755, root, root) "/usr/bin/google/chrome/locales" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/af.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/am.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ar.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/bg.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/bn.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ca.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/cs.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/da.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/de.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/el.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/en-GB.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/en-US.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/es-419.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/es.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/et.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/fa.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/fi.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/fil.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/fr.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/gu.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/he.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/hi.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/hr.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/hu.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/id.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/it.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ja.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/kn.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ko.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/lt.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/lv.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ml.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/mr.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ms.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/nb.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/nl.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/pl.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/pt-BR.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/pt-PT.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ro.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ru.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/sk.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/sl.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/sr.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/sv.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/sw.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ta.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/te.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/th.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/tr.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/uk.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/ur.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/vi.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/zh-CN.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/locales/zh-TW.pak" +%attr(0755, root, root) "/usr/bin/google/chrome/nacl_helper" +%attr(0755, root, root) "/usr/bin/google/chrome/nacl_helper_bootstrap" +%attr(0644, root, root) "/usr/bin/google/chrome/nacl_irt_x86_64.nexe" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_128.png" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_16.png" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_24.png" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_256.png" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_32.png" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_32.xpm" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_48.png" +%attr(0644, root, root) "/usr/bin/google/chrome/product_logo_64.png" +%attr(0644, root, root) "/usr/bin/google/chrome/resources.pak" +%attr(0644, root, root) "/usr/bin/google/chrome/v8_context_snapshot.bin" +%attr(0644, root, root) "/usr/bin/google/chrome/vk_swiftshader_icd.json" +%attr(0755, root, root) "/usr/bin/google/chrome/xdg-mime" +%attr(0755, root, root) "/usr/bin/google/chrome/xdg-settings" +%ghost %attr(0755, root, root) %verify(not md5 size link mtime) "/usr/bin/google-chrome" +%attr(0777, root, root) "/usr/bin/google-chrome-stable" +%attr(0644, root, root) "/usr/share/appdata/google-chrome.appdata.xml" +%attr(0644, root, root) "/usr/share/applications/google-chrome.desktop" +%attr(0644, root, root) "/usr/share/gnome-control-center/default-apps/google-chrome.xml" +%doc %attr(0644, root, root) "/usr/share/man/man1/google-chrome-stable.1.gz" +%doc %attr(0777, root, root) "/usr/share/man/man1/google-chrome.1.gz" + + +%pre -p /bin/sh + +exit 0 + + + + +#------------------------------------------------------------------------------ +# Post install script +#------------------------------------------------------------------------------ + + +%post -p /bin/sh + +# System-wide package configuration. +DEFAULTS_FILE="/etc/default/google-chrome" + +# Add icons to the system icons +XDG_ICON_RESOURCE="`command -v xdg-icon-resource 2> /dev/null || true`" +if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 +fi +for icon in product_logo_32.png product_logo_48.png product_logo_256.png product_logo_128.png product_logo_16.png product_logo_64.png product_logo_24.png ; do + size="$(echo ${icon} | sed 's/[^0-9]//g')" + "$XDG_ICON_RESOURCE" install --size "${size}" "/usr/bin/google/chrome/${icon}" \ + "google-chrome" +done + +UPDATE_MENUS="`command -v update-menus 2> /dev/null || true`" +if [ -x "$UPDATE_MENUS" ]; then + update-menus +fi + +# Update cache of .desktop file MIME types. Non-fatal since it's just a cache. +update-desktop-database > /dev/null 2>&1 || true + +# Updates defaults.list file if present. +update_defaults_list() { + # $1: name of the .desktop file + + local DEFAULTS_LIST="/usr/share/applications/defaults.list" + + if [ ! -f "${DEFAULTS_LIST}" ]; then + return + fi + + # Split key-value pair out of MimeType= line from the .desktop file, + # then split semicolon-separated list of mime types (they should not contain + # spaces). + mime_types="$(grep MimeType= /usr/share/applications/${1} | + cut -d '=' -f 2- | + tr ';' ' ')" + for mime_type in ${mime_types}; do + if egrep -q "^${mime_type}=" "${DEFAULTS_LIST}"; then + if ! egrep -q "^${mime_type}=.*${1}" "${DEFAULTS_LIST}"; then + default_apps="$(grep ${mime_type}= "${DEFAULTS_LIST}" | + cut -d '=' -f 2-)" + egrep -v "^${mime_type}=" "${DEFAULTS_LIST}" > "${DEFAULTS_LIST}.new" + echo "${mime_type}=${default_apps};${1}" >> "${DEFAULTS_LIST}.new" + mv "${DEFAULTS_LIST}.new" "${DEFAULTS_LIST}" + fi + else + # If there's no mention of the mime type in the file, add it. + echo "${mime_type}=${1};" >> "${DEFAULTS_LIST}" + fi + done +} + +update_defaults_list "google-chrome.desktop" + +# This function uses sed to insert the contents of one file into another file, +# after the first line matching a given regular expression. If there is no +# matching line, then the file is unchanged. +insert_after_first_match() { + # $1: file to update + # $2: regular expression + # $3: file to insert + sed -i -e "1,/$2/ { + /$2/ r $3 + }" "$1" +} + +# If /usr/share/gnome-control-center/default-apps/gnome-default-applications.xml +# exists, it may need to be updated to add ourselves to the default applications +# list. If we find the file and it does not seem to contain our patch already +# (the patch is safe to leave even after uninstall), update it. +GNOME_DFL_APPS=/usr/share/gnome-control-center/default-apps/gnome-default-applications.xml +if [ -f "$GNOME_DFL_APPS" ]; then +# Conditionally insert the contents of the file "default-app-block" after the +# first "" line we find in gnome-default-applications.xml + fgrep -q "Google Chrome" "$GNOME_DFL_APPS" || insert_after_first_match \ + "$GNOME_DFL_APPS" \ + "^[ ]*[ ]*$" \ + "/usr/bin/google/chrome/default-app-block" +fi + +# This function performs the setup for the chrome management service process. +# It creates a new chromemgmt group, creates the signing key file, and updates +# permissions for both the signing key file and the binary. +chrome_management_service_setup() { + if [ ! -f "$DEFAULTS_FILE" ]; then + return + fi + + if ! grep -q "install_device_trust_key_management_command=true" \ + "$DEFAULTS_FILE"; then + return + fi + + getent group chromemgmt > /dev/null || groupadd chromemgmt + + chgrp chromemgmt "/usr/bin/google/chrome/chrome-management-service" + chmod 2755 "/usr/bin/google/chrome/chrome-management-service" + + mkdir -p "/etc/usr/bin/chrome/policies/enrollment" + SIGNING_KEY_FILE="/etc/usr/bin/chrome/policies/enrollment/DeviceTrustSigningKey" + if [ ! -e "$SIGNING_KEY_FILE" ]; then + touch "$SIGNING_KEY_FILE" + fi + + chgrp chromemgmt "$SIGNING_KEY_FILE" + chmod 664 "$SIGNING_KEY_FILE" +} + +chrome_management_service_setup + +# sources.list setting for google-chrome updates. +REPOCONFIG="https://dl.google.com/linux/chrome/rpm/stable" +REPOCONFIGREGEX="" + +# Install the repository signing key (see also: +# https://www.google.com/linuxrepositories/) +install_rpm_key() { + KEY_PACKAGE="gpg-pubkey-d38b4796-570c8cd3" + # Check to see if all keys already exists. + # Make sure all the most recent signing subkeys are installed. + NEED_KEYS=0 + + SUB_KEY_LIST=( + # 2017 signing subkey + "6494C6D6997C215E" + # 2019 signing subkey + "78BD65473CB3BD13" + # 2021 signing subkey + "4EB27DB2A3B88B8B" + # 2023 signing subkey + "E88979FB9B30ACF2" + ) + + for SUB_KEY in "${SUB_KEY_LIST[@]}"; do + rpm -q ${KEY_PACKAGE} --qf '%%{Pubkeys:armor}\n' | \ + gpg --with-colons - 2>/dev/null | \ + grep -q "$SUB_KEY" + if [ "$?" -ne "0" ]; then + NEED_KEYS=1 + fi + done + + if [ $NEED_KEYS -ne 1 ]; then + return + fi + + # Make sure no older version of the key is installed because it appears + # 'rpm --import' won't overwrite an existing key package. + rpm -q ${KEY_PACKAGE} >/dev/null 2>&1 + if [ "$?" -eq "0" ]; then + # Note, if this is run during the package install, it will fail because rpm + # can't recursively run rpm, but it should work when run later as part of + # the installed cron job (and probably nothing needs the new keys before + # then). + rpm -e --allmatches ${KEY_PACKAGE} >/dev/null 2>&1 || return + fi + + # RPM on Mandriva 2009 is dumb and does not understand "rpm --import -" + TMPKEY=$(mktemp /tmp/google.sig.XXXXXX) + if [ -n "$TMPKEY" ]; then + cat > "$TMPKEY" < /dev/null | sed 's/:\t/:/' | cut -d ':' -f 2-) + case $RELEASE in + "Fedora"|"Amazon"|"Mageia"|"OpenMandrivaLinux") + PACKAGEMANAGERS=(yum) + ;; + "SUSE LINUX"|"openSUSE") + PACKAGEMANAGERS=(zypp) + ;; + esac + fi + + if [ "$PACKAGEMANAGERS" ]; then + return + fi + + # Fallback methods that are probably unnecessary on modern systems. + if [ -f "/etc/fedora-release" ] || [ -f "/etc/redhat-release" ]; then + PACKAGEMANAGERS=(yum) + elif [ -f "/etc/system-release" ] && grep -Fq "Amazon Linux" "/etc/system-release"; then + PACKAGEMANAGERS=(yum) + elif [ -f "/etc/SuSE-release" ]; then + PACKAGEMANAGERS=(zypp) + fi +} + +DEFAULT_ARCH="x86_64" +YUM_REPO_FILE="/etc/yum.repos.d/google-chrome.repo" +ZYPPER_REPO_FILE="/etc/zypp/repos.d/google-chrome.repo" + +install_yum() { + install_rpm_key + + if [ ! "$REPOCONFIG" ]; then + return 0 + fi + + if [ -d "/etc/yum.repos.d" ]; then +cat > "$YUM_REPO_FILE" << REPOCONTENT +[google-chrome] +name=google-chrome +baseurl=$REPOCONFIG/$DEFAULT_ARCH +enabled=1 +gpgcheck=1 +gpgkey=https://dl.google.com/linux/linux_signing_key.pub +REPOCONTENT + fi +} + +install_zypp() { + if [ ! "$REPOCONFIG" ]; then + return 0 + fi + + # Ideally, we would run: zypper addrepo -t YUM -f \ + # "$REPOCONFIG/$DEFAULT_ARCH" "google-chrome" + # but that does not work when zypper is running. + if [ -d "/etc/zypp/repos.d" ]; then +cat > "$ZYPPER_REPO_FILE" << REPOCONTENT +[google-chrome] +name=google-chrome +enabled=1 +autorefresh=1 +baseurl=$REPOCONFIG/$DEFAULT_ARCH +gpgcheck=1 +gpgkey=https://dl.google.com/linux/linux_signing_key.pub +type=rpm-md +keeppackages=0 +REPOCONTENT + fi +} + +# Check if the automatic repository configuration is done, so we know when to +# stop trying. +verify_install() { + # It's probably enough to see that the repo configs have been created. If they + # aren't configured properly, update_bad_repo should catch that when it's run. + case $1 in + "yum") + [ -f "$YUM_REPO_FILE" ] + ;; + "zypp") + [ -f "$ZYPPER_REPO_FILE" ] + ;; + esac +} + +# Update the Google repository if it's not set correctly. +update_bad_repo() { + if [ ! "$REPOCONFIG" ]; then + return 0 + fi + + determine_rpm_package_manager + + for PACKAGEMANAGER in ${PACKAGEMANAGERS[*]} + do + case $PACKAGEMANAGER in + "yum") + update_repo_file "$YUM_REPO_FILE" + ;; + "zypp") + update_repo_file "$ZYPPER_REPO_FILE" + ;; + esac + done +} + +update_repo_file() { + REPO_FILE="$1" + + # Don't do anything if the file isn't there, since that probably means the + # user disabled it. + if [ ! -r "$REPO_FILE" ]; then + return 0 + fi + + # Check if the correct repository configuration is in there. + REPOMATCH=$(grep "^baseurl=$REPOCONFIG/$DEFAULT_ARCH" "$REPO_FILE" \ + 2>/dev/null) + # If it's there, nothing to do + if [ "$REPOMATCH" ]; then + return 0 + fi + + # Check if it's there but disabled by commenting out (as opposed to using the + # 'enabled' setting). + MATCH_DISABLED=$(grep "^[[:space:]]*#.*baseurl=$REPOCONFIG/$DEFAULT_ARCH" \ + "$REPO_FILE" 2>/dev/null) + if [ "$MATCH_DISABLED" ]; then + # It's OK for it to be disabled, as long as nothing bogus is enabled in its + # place. + ACTIVECONFIGS=$(grep "^baseurl=.*" "$REPO_FILE" 2>/dev/null) + if [ ! "$ACTIVECONFIGS" ]; then + return 0 + fi + fi + + # If we get here, the correct repository wasn't found, or something else is + # active, so fix it. This assumes there is a 'baseurl' setting, but if not, + # then that's just another way of disabling, so we won't try to add it. + sed -i -e "s,^baseurl=.*,baseurl=$REPOCONFIG/$DEFAULT_ARCH," "$REPO_FILE" +} + +# We only remove the repository configuration during a purge. Since RPM has +# no equivalent to dpkg --purge, the code below is actually never used. We +# keep it only for reference purposes, should we ever need it. +# +#remove_yum() { +# rm -f "$YUM_REPO_FILE" +#} +# +#remove_zypp() { +# # Ideally, we would run: zypper removerepo "google-chrome" +# # but that does not work when zypper is running. +# rm -f /etc/zypp/repos.d/google-chrome.repo +#} + +DEFAULT_ARCH="x86_64" + +get_lib_dir() { + if [ "$DEFAULT_ARCH" = "i386" ] || [ "$DEFAULT_ARCH" = "armhf" ] || \ + [ "$DEFAULT_ARCH" = "mipsel" ]; then + LIBDIR=lib + elif [ "$DEFAULT_ARCH" = "x86_64" ] || [ "$DEFAULT_ARCH" = "aarch64" ] || \ + [ "$DEFAULT_ARCH" = "mips64el" ]; then + LIBDIR=lib64 + else + echo Unknown CPU Architecture: "$DEFAULT_ARCH" + exit 1 + fi +} + +NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \ + libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d" + +add_nss_symlinks() { + get_lib_dir + for f in $NSS_FILES + do + target=$(echo $f | sed 's/\.[01]d$//') + if [ -f "/$LIBDIR/$target" ]; then + ln -snf "/$LIBDIR/$target" "/usr/bin/google/chrome/$f" + elif [ -f "/usr/$LIBDIR/$target" ]; then + ln -snf "/usr/$LIBDIR/$target" "/usr/bin/google/chrome/$f" + else + echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target". + exit 1 + fi + done +} + +remove_nss_symlinks() { + for f in $NSS_FILES + do + rm -rf "/usr/bin/google/chrome/$f" + done +} + +remove_udev_symlinks() { + rm -rf "/usr/bin/google/chrome/libudev.so.0" +} + +remove_nss_symlinks +add_nss_symlinks + +remove_udev_symlinks + +if [ ! -e "$DEFAULTS_FILE" ]; then + echo 'repo_add_once="true"' > "$DEFAULTS_FILE" +fi + +. "$DEFAULTS_FILE" + +if [ "$repo_add_once" = "true" ]; then + determine_rpm_package_manager + + for PACKAGEMANAGER in ${PACKAGEMANAGERS[*]} + do + case $PACKAGEMANAGER in + "yum") + install_yum + ;; + "zypp") + install_zypp + ;; + esac + done +fi + +CHANNEL=stable +case $CHANNEL in + stable ) + PRIORITY=200 + ;; + beta ) + PRIORITY=150 + ;; + unstable ) + PRIORITY=120 + ;; + * ) + PRIORITY=0 + ;; +esac + +/usr/sbin/update-alternatives --install /usr/bin/google-chrome \ + google-chrome /usr/bin/google-chrome-stable $PRIORITY + +exit 0 + + +#------------------------------------------------------------------------------ +# Pre uninstallation script +#------------------------------------------------------------------------------ + + +%preun -p /bin/sh + +if [ "$1" -eq "0" ]; then + mode="uninstall" +elif [ "$1" -eq "1" ]; then + mode="upgrade" +fi + +# sources.list setting for google-chrome updates. +REPOCONFIG="https://dl.google.com/linux/chrome/rpm/stable" +REPOCONFIGREGEX="" + +# Install the repository signing key (see also: +# https://www.google.com/linuxrepositories/) +install_rpm_key() { + KEY_PACKAGE="gpg-pubkey-d38b4796-570c8cd3" + # Check to see if all keys already exists. + # Make sure all the most recent signing subkeys are installed. + NEED_KEYS=0 + + SUB_KEY_LIST=( + # 2017 signing subkey + "6494C6D6997C215E" + # 2019 signing subkey + "78BD65473CB3BD13" + # 2021 signing subkey + "4EB27DB2A3B88B8B" + # 2023 signing subkey + "E88979FB9B30ACF2" + ) + + for SUB_KEY in "${SUB_KEY_LIST[@]}"; do + rpm -q ${KEY_PACKAGE} --qf '%%{Pubkeys:armor}\n' | \ + gpg --with-colons - 2>/dev/null | \ + grep -q "$SUB_KEY" + if [ "$?" -ne "0" ]; then + NEED_KEYS=1 + fi + done + + if [ $NEED_KEYS -ne 1 ]; then + return + fi + + # Make sure no older version of the key is installed because it appears + # 'rpm --import' won't overwrite an existing key package. + rpm -q ${KEY_PACKAGE} >/dev/null 2>&1 + if [ "$?" -eq "0" ]; then + # Note, if this is run during the package install, it will fail because rpm + # can't recursively run rpm, but it should work when run later as part of + # the installed cron job (and probably nothing needs the new keys before + # then). + rpm -e --allmatches ${KEY_PACKAGE} >/dev/null 2>&1 || return + fi + + # RPM on Mandriva 2009 is dumb and does not understand "rpm --import -" + TMPKEY=$(mktemp /tmp/google.sig.XXXXXX) + if [ -n "$TMPKEY" ]; then + cat > "$TMPKEY" < /dev/null | sed 's/:\t/:/' | cut -d ':' -f 2-) + case $RELEASE in + "Fedora"|"Amazon"|"Mageia"|"OpenMandrivaLinux") + PACKAGEMANAGERS=(yum) + ;; + "SUSE LINUX"|"openSUSE") + PACKAGEMANAGERS=(zypp) + ;; + esac + fi + + if [ "$PACKAGEMANAGERS" ]; then + return + fi + + # Fallback methods that are probably unnecessary on modern systems. + if [ -f "/etc/fedora-release" ] || [ -f "/etc/redhat-release" ]; then + PACKAGEMANAGERS=(yum) + elif [ -f "/etc/system-release" ] && grep -Fq "Amazon Linux" "/etc/system-release"; then + PACKAGEMANAGERS=(yum) + elif [ -f "/etc/SuSE-release" ]; then + PACKAGEMANAGERS=(zypp) + fi +} + +DEFAULT_ARCH="x86_64" +YUM_REPO_FILE="/etc/yum.repos.d/google-chrome.repo" +ZYPPER_REPO_FILE="/etc/zypp/repos.d/google-chrome.repo" + +install_yum() { + install_rpm_key + + if [ ! "$REPOCONFIG" ]; then + return 0 + fi + + if [ -d "/etc/yum.repos.d" ]; then +cat > "$YUM_REPO_FILE" << REPOCONTENT +[google-chrome] +name=google-chrome +baseurl=$REPOCONFIG/$DEFAULT_ARCH +enabled=1 +gpgcheck=1 +gpgkey=https://dl.google.com/linux/linux_signing_key.pub +REPOCONTENT + fi +} + +install_zypp() { + if [ ! "$REPOCONFIG" ]; then + return 0 + fi + + # Ideally, we would run: zypper addrepo -t YUM -f \ + # "$REPOCONFIG/$DEFAULT_ARCH" "google-chrome" + # but that does not work when zypper is running. + if [ -d "/etc/zypp/repos.d" ]; then +cat > "$ZYPPER_REPO_FILE" << REPOCONTENT +[google-chrome] +name=google-chrome +enabled=1 +autorefresh=1 +baseurl=$REPOCONFIG/$DEFAULT_ARCH +gpgcheck=1 +gpgkey=https://dl.google.com/linux/linux_signing_key.pub +type=rpm-md +keeppackages=0 +REPOCONTENT + fi +} + +# Check if the automatic repository configuration is done, so we know when to +# stop trying. +verify_install() { + # It's probably enough to see that the repo configs have been created. If they + # aren't configured properly, update_bad_repo should catch that when it's run. + case $1 in + "yum") + [ -f "$YUM_REPO_FILE" ] + ;; + "zypp") + [ -f "$ZYPPER_REPO_FILE" ] + ;; + esac +} + +# Update the Google repository if it's not set correctly. +update_bad_repo() { + if [ ! "$REPOCONFIG" ]; then + return 0 + fi + + determine_rpm_package_manager + + for PACKAGEMANAGER in ${PACKAGEMANAGERS[*]} + do + case $PACKAGEMANAGER in + "yum") + update_repo_file "$YUM_REPO_FILE" + ;; + "zypp") + update_repo_file "$ZYPPER_REPO_FILE" + ;; + esac + done +} + +update_repo_file() { + REPO_FILE="$1" + + # Don't do anything if the file isn't there, since that probably means the + # user disabled it. + if [ ! -r "$REPO_FILE" ]; then + return 0 + fi + + # Check if the correct repository configuration is in there. + REPOMATCH=$(grep "^baseurl=$REPOCONFIG/$DEFAULT_ARCH" "$REPO_FILE" \ + 2>/dev/null) + # If it's there, nothing to do + if [ "$REPOMATCH" ]; then + return 0 + fi + + # Check if it's there but disabled by commenting out (as opposed to using the + # 'enabled' setting). + MATCH_DISABLED=$(grep "^[[:space:]]*#.*baseurl=$REPOCONFIG/$DEFAULT_ARCH" \ + "$REPO_FILE" 2>/dev/null) + if [ "$MATCH_DISABLED" ]; then + # It's OK for it to be disabled, as long as nothing bogus is enabled in its + # place. + ACTIVECONFIGS=$(grep "^baseurl=.*" "$REPO_FILE" 2>/dev/null) + if [ ! "$ACTIVECONFIGS" ]; then + return 0 + fi + fi + + # If we get here, the correct repository wasn't found, or something else is + # active, so fix it. This assumes there is a 'baseurl' setting, but if not, + # then that's just another way of disabling, so we won't try to add it. + sed -i -e "s,^baseurl=.*,baseurl=$REPOCONFIG/$DEFAULT_ARCH," "$REPO_FILE" +} + +# We only remove the repository configuration during a purge. Since RPM has +# no equivalent to dpkg --purge, the code below is actually never used. We +# keep it only for reference purposes, should we ever need it. +# +#remove_yum() { +# rm -f "$YUM_REPO_FILE" +#} +# +#remove_zypp() { +# # Ideally, we would run: zypper removerepo "google-chrome" +# # but that does not work when zypper is running. +# rm -f /etc/zypp/repos.d/google-chrome.repo +#} + +DEFAULT_ARCH="x86_64" + +get_lib_dir() { + if [ "$DEFAULT_ARCH" = "i386" ] || [ "$DEFAULT_ARCH" = "armhf" ] || \ + [ "$DEFAULT_ARCH" = "mipsel" ]; then + LIBDIR=lib + elif [ "$DEFAULT_ARCH" = "x86_64" ] || [ "$DEFAULT_ARCH" = "aarch64" ] || \ + [ "$DEFAULT_ARCH" = "mips64el" ]; then + LIBDIR=lib64 + else + echo Unknown CPU Architecture: "$DEFAULT_ARCH" + exit 1 + fi +} + +NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \ + libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d" + +add_nss_symlinks() { + get_lib_dir + for f in $NSS_FILES + do + target=$(echo $f | sed 's/\.[01]d$//') + if [ -f "/$LIBDIR/$target" ]; then + ln -snf "/$LIBDIR/$target" "/usr/bin/google/chrome/$f" + elif [ -f "/usr/$LIBDIR/$target" ]; then + ln -snf "/usr/$LIBDIR/$target" "/usr/bin/google/chrome/$f" + else + echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target". + exit 1 + fi + done +} + +remove_nss_symlinks() { + for f in $NSS_FILES + do + rm -rf "/usr/bin/google/chrome/$f" + done +} + +remove_udev_symlinks() { + rm -rf "/usr/bin/google/chrome/libudev.so.0" +} + +# Only remove menu items and symlinks on uninstall. When upgrading, +# old_pkg's %%preun runs after new_pkg's %%post. +if [ "$mode" = "uninstall" ]; then +# Remove icons from the system icons +XDG_ICON_RESOURCE="`command -v xdg-icon-resource 2> /dev/null || true`" +if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 +fi +for icon in product_logo_32.png product_logo_48.png product_logo_256.png product_logo_128.png product_logo_16.png product_logo_64.png product_logo_24.png ; do + size="$(echo ${icon} | sed 's/[^0-9]//g')" + "$XDG_ICON_RESOURCE" uninstall --size "${size}" "google-chrome" +done + +UPDATE_MENUS="`command -v update-menus 2> /dev/null || true`" +if [ -x "$UPDATE_MENUS" ]; then + update-menus +fi + +# Update cache of .desktop file MIME types. Non-fatal since it's just a cache. +update-desktop-database > /dev/null 2>&1 || true + remove_nss_symlinks + remove_udev_symlinks + + /usr/sbin/update-alternatives --remove google-chrome \ + /usr/bin/google-chrome-stable +fi + +# On Debian we only remove when we purge. However, RPM has no equivalent to +# dpkg --purge, so this is all disabled. +# +#determine_rpm_package_manager +# +#for PACKAGEMANAGER in ${PACKAGEMANAGERS[*]} +#do +# case $PACKAGEMANAGER in +# "yum") +# remove_yum +# ;; +# "zypp") +# remove_zypp +# ;; +# esac +#done + +exit 0 + +#------------------------------------------------------------------------------ +# Post uninstallation script +#------------------------------------------------------------------------------ + +%postun -p /bin/sh + +exit 0 + +%changelog + diff --git a/kiosk.ks b/imagebuilder/kiosk.ks similarity index 59% rename from kiosk.ks rename to imagebuilder/kiosk.ks index 7145b72..8e6a8ae 100644 --- a/kiosk.ks +++ b/imagebuilder/kiosk.ks @@ -8,11 +8,11 @@ zerombr clearpart --all --initlabel autopart --type=plain --fstype=xfs --nohome network --bootproto=dhcp -rootpw --iscrypted $6$3OrUXJfD.64WiZl2$4/oBFyFgIyPI6LdLCbE.h99YBrFa..pC3x3WlHNH8mUf4ssZmhlhy17CHc0n3kAvHvWecpqunVOd/4kOGB7Ms. +rootpw --iscrypted $6$vnnc7bdpgCJMBDB.$TRBsboYscXsKPv57IHnKuy1BzLhuejJgft17s07ZQRSsgFhPI9QLPX6Spt4AiND4TaolQAR8FzMV2Osf2dhj10 #Use this line if creating an Edge Installer ISO that includes a local ostree commit #ostreesetup --osname=rhel --url=file:///ostree/repo --ref=rhel/9/x86_64/edge --nogpg #Use this to fetch from a remote URL -ostreesetup --osname=rhel --url=http://[YOUR_SERVER_IP:PORT]/repo --ref=rhel/9/x86_64/edge --nogpg +ostreesetup --osname=rhel --url=http://192.168.0.116:30239/repo --ref=rhel/9/x86_64/edge --nogpg %post #Default to graphical boot target @@ -30,17 +30,31 @@ Session=gnome-kiosk-script SystemAccount=false EOF +#Add url environment variable +cat >> /home/kiosk/.bashrc << 'EOF' +export KIOSK_URL=http://`ip -br a | grep -oP 'br-ex\s+UNKNOWN\s+\K[0-9.]+'`:30000 +EOF + #Configure the kiosk script to run firefox in kiosk mode and display our example URL mkdir -p /home/kiosk/.local/bin/ cat > /home/kiosk/.local/bin/gnome-kiosk-script << 'EOF' #!/bin/sh +. ~/.bashrc while true; do - firefox -kiosk https://voyage.kiosk.fr/ + /usr/bin/google/chrome/chrome --password-store=basic --no-default-browser-check --no-first-run --ash-no-nudges --disable-search-engine-choice-screen -kiosk ${KIOSK_URL} done EOF #Ensure the files are owned by our unprivileged user and the script is executable -chown -R 1000:1000 /home/kiosk -chmod 755 /home/kiosk/.local/bin/gnome-kiosk-script +chown -R 1001:1001 /home/kiosk +chmod 555 /home/kiosk/.local/bin/gnome-kiosk-script + +/etc/crio/openshift-pull-secret + +cat > /etc/crio/openshift-pull-secret << 'EOF' + +EOF + + %end diff --git a/imagebuilder/kiosk.toml b/imagebuilder/kiosk.toml new file mode 100644 index 0000000..7ffef14 --- /dev/null +++ b/imagebuilder/kiosk.toml @@ -0,0 +1,69 @@ +name = "kiosk" +description = "Example Kiosk" +version = "0.0.8" +modules = [] +groups = [] + +[[packages]] +name = "gdm" +version = "*" + +[[packages]] +name = "gnome-kiosk" +version = "*" + +[[packages]] +name = "gnome-kiosk-script-session" +version = "*" + +[[packages]] +name = "firefox" +version = "*" + +[[packages]] +name = "google-chrome-stable-119.0.6045.199-1" +version = "*" + +[[packages]] +name = "cockpit" + +[[packages]] +name = "microshift" +version = "*" + +[[packages]] +name = "cockpit-system" + + +[customizations] +hostname = "kiosk.local" + +[customizations.services] +enabled = ["cockpit.socket", "sshd", "microshift"] +#disabled = ["postfix", "telnetd"] + +[customizations.timezone] +timezone = "Europe/Paris" +ntpservers = ["0.fr.pool.ntp.org", "1.fr.pool.ntp.org"] + +[customizations.locale] +languages = ["fr_FR.UTF-8"] +keyboard = "fr" + +#22 ssh / 9090 cockpit / 6443 microshift +[customizations.firewall] +ports = ["22:tcp", "30000:tcp", "9090:tcp", "6443:tcp"] + +[[customizations.user]] +name = "kiosk" +description = "kiosk" +password = '' + +[[customizations.user]] +name = "admin" +description = "admin" +password = '' +key = "" +home = "/home/admin/" +shell = "/usr/bin/bash" +groups = ["users", "wheel"] diff --git a/kiosk.toml b/kiosk.toml deleted file mode 100644 index 7bb4614..0000000 --- a/kiosk.toml +++ /dev/null @@ -1,46 +0,0 @@ -name = "kiosk" -description = "Kiosk blueprint" -version = "0.0.3" -modules = [] -groups = [] - -[[packages]] -name = "gdm" -version = "*" - -[[packages]] -name = "gnome-kiosk" -version = "*" - -[[packages]] -name = "gnome-kiosk-script-session" -version = "*" - -[[packages]] -name = "firefox" -version = "*" - - -[[packages]] -name = "cockpit-system" - - -[customizations] - -[customizations.services] -enabled = ["cockpit.socket"] -hostname = "kiosk" - - -[customizations.firewall] -ports = ["22:tcp", "80:tcp", "443:tcp", "9090:tcp"] - -[[customizations.user]] -name = "kiosk" -description = "kiosk" -#password hash obtained with: -# python3 -c 'import crypt,getpass;pw=getpass.getpass();print(crypt.crypt(pw) if (pw==getpass.getpass("Confirm: ")) else exit())' -password = "" -key = "" -home = "/home/admin/" -shell = "/usr/bin/bash"