Fedora 44, install/configure improvements, Nextcloud desktop client fixes #24

Merged
obel1x merged 27 commits from unbrot/fedora-OEMDRV:main into main 2026-05-04 17:00:04 +02:00
8 changed files with 47 additions and 27 deletions
Showing only changes of commit 9264ca8e92 - Show all commits
+4 -4
View File
@@ -13,16 +13,16 @@ A Fedora automated mass-installation and post-setup scripting collection. It use
Before any script runs, copy the dist file and fill in your environment: Before any script runs, copy the dist file and fill in your environment:
```sh ```sh
cp /opt/sys_config/config/setup_system.conf.dist /opt/sys_config/config/setup_system.conf cp /opt/sys_config/system_setup/config.dist/setup_system.conf.dist /opt/sys_config/config/setup_system.conf
# Edit setup_system.conf with your domain, server FQDNs, paths, etc. # Edit setup_system.conf with your domain, server FQDNs, paths, etc.
``` ```
Local per-machine overrides go in `config.d/*.conf` (gitignored). These are sourced after `setup_system.conf` and can override any exported variable (e.g. `config.d/system_defines.conf` overrides `UPGRADEBRANCH`). Local per-machine overrides go in `config.d/*.conf` (gitignored). These are sourced after `setup_system.conf` and can override any exported variable (e.g. `config.d/system_defines.conf` overrides `UPGRADEBRANCH`).
`config/skel.tar.zst` (gitignored) holds the `/etc/skel` archive deployed to new installs. The `.dist` version is the default. To modify skel: extract, edit, then repack: `config/skel.tar.zst` (gitignored) holds the `/etc/skel` archive deployed to new installs. The `.dist` version is at `system_setup/skel/skel.tar.zst.dist`. To modify skel: extract, edit, then repack:
```sh ```sh
cd /opt/sys_config/config cd /opt/sys_config/config
tar -I 'zstd -9' -cf skel.tar.zst skel/ # or use pack_skel.sh tar -I 'zstd -9' -cf skel.tar.zst skel/ # or use system_setup/skel/pack_skel.sh
``` ```
## Installation lifecycle ## Installation lifecycle
@@ -51,7 +51,7 @@ tar -I 'zstd -9' -cf skel.tar.zst skel/ # or use pack_skel.sh
| `system_setup/mount_ecrypt_home.sh` | user | called by logon_script.sh | | `system_setup/mount_ecrypt_home.sh` | user | called by logon_script.sh |
| `system_setup/mozilla_starter.sh` | user | called by logon_script.sh; args: `firefox\|thunderbird run\|sync [profile]` | | `system_setup/mozilla_starter.sh` | user | called by logon_script.sh; args: `firefox\|thunderbird run\|sync [profile]` |
| `system_setup/setup_skel.sh` | root | called by setup_system_full.sh or manually | | `system_setup/setup_skel.sh` | root | called by setup_system_full.sh or manually |
| `config/pack_skel.sh` | root | manually, to repack skel archive after editing | | `system_setup/skel/pack_skel.sh` | root | manually, to repack skel archive after editing |
| `system_setup/create_nc_package_from_sys_config.sh` | user | manually, creates `~/temp/sys_config.tar.zst` | | `system_setup/create_nc_package_from_sys_config.sh` | user | manually, creates `~/temp/sys_config.tar.zst` |
## client_software layout ## client_software layout
+1 -1
View File
@@ -44,7 +44,7 @@ Both are optional. That way, install.sh should know what to pull.
Configure your environment before running any installation: Configure your environment before running any installation:
```sh ```sh
cp /opt/sys_config/config/setup_system.conf.dist /opt/sys_config/config/setup_system.conf cp /opt/sys_config/system_setup/config.dist/setup_system.conf.dist /opt/sys_config/config/setup_system.conf
# Edit setup_system.conf — set TLDOMAIN, SERVERFQDN_IPA, SERVERFQDN_NC, and paths. # Edit setup_system.conf — set TLDOMAIN, SERVERFQDN_IPA, SERVERFQDN_NC, and paths.
``` ```
@@ -21,14 +21,13 @@ export DISTCONFIGPATH_SRC="/Shared/sw_geteilt/client_settings"
export CLIENTADMINGROUP="clientadmins" export CLIENTADMINGROUP="clientadmins"
# Method to determine Unique Hostname / FQDN of the Client. May be replaced by your needs # Method to determine Unique Hostname / FQDN of the Client. May be replaced by your needs
#Should always had been set by install.sh and should be there anyway. # MACHINEID should be set by install.sh. The Determination is done by setup_system.inc.sh as root for old installs.
#if [ ! -r ${SYSCONFIGPATH}/config.d/machine_uuid.sys ]; then if [ -z ${MACHINEID} ]; then
#elif [ "$EUID" -eq 0 ]; then #Fallback if not configured, should only be needed once for very old installations
# export HOSTNM="pc-$( dmidecode -t system | grep -i 'UUID' | sed 's/UUID: //' | tr '[:upper:]' '[:lower:]' | sed 's/[^0-9a-z]*//g' | xargs|tail -c 13)" export HOSTNM=$( hostname -s )
#else else
# export HOSTNM=$( hostname -s ) export HOSTNM="pc-${MACHINEID}"
#fi fi
export HOSTNM="pc-$( cat /opt/sys_config/config.d/machine_uuid.sys )"
export FQDN=${HOSTNM}.${DOMAIN} export FQDN=${HOSTNM}.${DOMAIN}
#Additional Client-Software- Repository-Folder in Nextcloud (Shared Folder / Systemwide) #Additional Client-Software- Repository-Folder in Nextcloud (Shared Folder / Systemwide)
+1 -1
View File
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)" SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
CONF_DIST="${SCRIPTDIR}/../config/setup_system.conf.dist" CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist"
CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf" CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf"
if [[ "$EUID" -eq 0 ]]; then if [[ "$EUID" -eq 0 ]]; then
+1 -1
View File
@@ -3,7 +3,7 @@
source $(dirname "$0")/setup_system.inc.sh source $(dirname "$0")/setup_system.inc.sh
EXECDIR=$(pwd) EXECDIR=$(pwd)
SRCFILE="${SYSCONFIGPATH}/config/skel.tar.zst" SRCFILE="${SYSCONFIGPATH}/config/skel.tar.zst"
SRCFILEDIST="${SYSCONFIGPATH}/config/skel.tar.zst.dist" SRCFILEDIST="$(dirname "$0")/skel/skel.tar.zst.dist"
#Check for root #Check for root
if [ "$EUID" -ne 0 ]; then if [ "$EUID" -ne 0 ]; then
+14 -1
View File
@@ -16,6 +16,19 @@
# return 0 # return 0
#} #}
#First, get the machine_uuid wich is needed by some userspace programs.
#As all Parameters that are bound to CPU or Mainboard, are only readable by root, we need to get the values at installtime.
#On old installations without the file, we will write it whenever possible
if [ -f $( dirname "$0" )/config.d/machine_uuid.sys ]; then
export MACHINEID="$( cat $( dirname "$0" )/config.d/machine_uuid.sys )"
elif [ "$EUID" -eq 0 ]; then
dmidecode -t system | grep -i 'UUID' \
| sed 's/UUID: //' | tr '[:upper:]' '[:lower:]' \
| sed 's/[^0-9a-z]*//g' | xargs | tail -c 13 \
> "$( dirname "$0" )/config.d/machine_uuid.sys"
export MACHINEID="$( cat $( dirname "$0" )/config.d/machine_uuid.sys )"
fi
#Check for configure.conf - used for frist setup of system #Check for configure.conf - used for frist setup of system
if [[ -f $(dirname "$0")/../config.d/configure.conf ]]; then if [[ -f $(dirname "$0")/../config.d/configure.conf ]]; then
echo "System in configure-mode. Will use $(dirname "$0")/../config.d/configure.conf for setup." echo "System in configure-mode. Will use $(dirname "$0")/../config.d/configure.conf for setup."
@@ -23,7 +36,7 @@ if [[ -f $(dirname "$0")/../config.d/configure.conf ]]; then
else else
#Load default system setup file #Load default system setup file
if [[ ! -f $(dirname "$0")/../config/setup_system.conf ]]; then if [[ ! -f $(dirname "$0")/../config/setup_system.conf ]]; then
echo "System configuration not found. Please make a copy of setup_system.conf.dist, name it setup_system.conf and check the settings in it before running." echo "System configuration not found. Please copy system_setup/config.dist/setup_system.conf.dist to config/setup_system.conf and adjust the settings before running."
echo "Press any key to continue" && read -n 1 -s -r && exit 1 echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi fi
source $(dirname "$0")/../config/setup_system.conf source $(dirname "$0")/../config/setup_system.conf
-1
View File
@@ -1,7 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
# Usage: will make a tar-file from folder skel found in the directory where executed # Usage: will make a tar-file from folder skel found in the directory where executed
# If you want to change skel- content, extrakt your skel.tar.zstd to this directory, edit the files and use this script to repack # If you want to change skel- content, extrakt your skel.tar.zstd to this directory, edit the files and use this script to repack
source $(dirname "$0")/setup_system.inc.sh
mv skel.tar.zst backup_skel.tar.zst mv skel.tar.zst backup_skel.tar.zst
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Old Archive renamed to backup_skel.tar.zst" echo "Old Archive renamed to backup_skel.tar.zst"
+19 -10
View File
@@ -20,15 +20,20 @@ fi
#Install or update Nextcloud com.nextcloud.desktopclient.nextcloud #Install or update Nextcloud com.nextcloud.desktopclient.nextcloud
echo "Update or install Nextcloud client" echo "Update or install Nextcloud client"
/usr/bin/flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo /usr/bin/flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo && \
/usr/bin/flatpak install -y --or-update --noninteractive flathub com.nextcloud.desktopclient.nextcloud && echo "Done Update/Install of Nextcloud." /usr/bin/flatpak install -y --or-update --noninteractive flathub com.nextcloud.desktopclient.nextcloud && echo "Done Update/Install of Nextcloud."
if [[ $? -ne 0 ]]; then
echo ""
echo "There seems to be a problem with your network connection. Please first check, if your network can be established before reuming."
echo "You can press CRTL+C to abort now. Than your data wont be accessible and you need to run \"$0\" again."
echo "You can also continue without network. You may need your personal encryptionkey for accessing your data."
read -n 1 -s -r -p "Please check Network and press any Key to continue"
fi
echo "" echo ""
#Sync remote Files #Do an upgrade of the Base package if its configured and if there are changes
chown root:${CLIENTADMINGROUP} -R ${SYSCONFIGPATH} chown root:${CLIENTADMINGROUP} -R ${SYSCONFIGPATH}
chmod ug+rwX,o=rX -R ${SYSCONFIGPATH} chmod ug+rwX,o=rX -R ${SYSCONFIGPATH}
#Do an upgrade of the Base package if its configured and if there are changes
if [[ ! -z "${UPGRADEURL}" ]]; then if [[ ! -z "${UPGRADEURL}" ]]; then
echo "Checking for Upgrades on ${UPGRADEURL} and Branch ${UPGRADEBRANCH}" echo "Checking for Upgrades on ${UPGRADEURL} and Branch ${UPGRADEBRANCH}"
REMOTEURL=$( git config --get remote.origin.url ) REMOTEURL=$( git config --get remote.origin.url )
@@ -43,14 +48,17 @@ if [[ ! -z "${UPGRADEURL}" ]]; then
else else
# Doing upgrade, discarding all local changes frist (is more save than forced pull) # Doing upgrade, discarding all local changes frist (is more save than forced pull)
echo "Checks have passed, we are now upgrading via git." echo "Checks have passed, we are now upgrading via git."
git fetch origin #Fetch latest Updates and remove all history
git reset --hard origin/${UPGRADEBRANCH} git fetch origin && git reset --hard origin/${UPGRADEBRANCH} && git rebase HEAD^
#Remove all history if [[ $? -ne 0 ]]; then
git rebase HEAD^ echo "Error: Failure while updating, will continue as is."
fi fi
fi fi
fi
else
echo "UPGRADEURL is not specified in conf - No Upgrade option available."
fi
echo "" echo ""
fi
# At first, sync central configs if they are configured to be synced # At first, sync central configs if they are configured to be synced
if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
@@ -85,12 +93,13 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
echo "System is in configure-mode and configuration repository was found and synced, but still not configuration was found" echo "System is in configure-mode and configuration repository was found and synced, but still not configuration was found"
echo "checking file $(dirname "$0")/../config/setup_system.conf" echo "checking file $(dirname "$0")/../config/setup_system.conf"
echo "" echo ""
echo "Please make a inital copy of config/setup_system.conf.dist to config/setup_system.conf and check all settings there." echo "Please make a copy of system_setup/config.dist/setup_system.conf.dist to config/setup_system.conf and check all settings there."
echo "Then rerun the logon script to sync the file to your repository." echo "Then rerun the logon script to sync the file to your repository."
echo "Press any key to continue" && read -n 1 -s -r && exit 1 echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi fi
fi fi
fi fi
#Check if Repository is defined #Check if Repository is defined
if [ "${CLIENT_SOFTWARE_DST}." == "." ]; then if [ "${CLIENT_SOFTWARE_DST}." == "." ]; then
echo "No central softwarerepository defined (CLIENT_SOFTWARE_DST). Skipping sync." echo "No central softwarerepository defined (CLIENT_SOFTWARE_DST). Skipping sync."