From 1904d12974eff195b08830fd7ed97359da2d6868 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 06:24:36 +0100 Subject: [PATCH] create packager user/group in case it does not exist [release 3.90.0-2mamba;Sat Sep 02 2017] --- livecd-tools.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/livecd-tools.spec b/livecd-tools.spec index 5580d64..41c23de 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -1,9 +1,11 @@ %define liveuser_uid 999 +%define packager_groupid 65028 +%define packager_userid 65028 %define lpadmin_uid 65032 %define lpadmin_gid 65032 Name: livecd-tools Version: 3.90.0 -Release: 1mamba +Release: 2mamba Summary: Live cd environment and utilities Group: System/Tools Vendor: openmamba @@ -71,11 +73,14 @@ Calamares installer configuration for the openmamba distribution. %pre -n live-user-environment if [ $1 -eq 1 ]; then -# add lpadmin user if cups is not installed before + # add package user if rpm package is not installed before + /usr/sbin/groupadd packager -g %{packager_groupid} 2>/dev/null || : + /usr/sbin/useradd packager -u %{packager_userid} -g packager -d /dev/null -s /bin/false 2>/dev/null || : + # add lpadmin user if cups is not installed before /usr/sbin/groupadd lpadmin -g %{lpadmin_gid} &>/dev/null /usr/sbin/useradd lpadmin -c "Cups printing daemon" -d /dev/null \ -s /bin/false -u %{lpadmin_uid} -g %{lpadmin_gid} &>/dev/null -# add default liveuser user + # add default liveuser user useradd liveuser \ -c "Live User" \ -G audio,filesharing,sysadmin,lpadmin,video,nopermfs,packager \ @@ -182,6 +187,9 @@ fi %attr(-,liveuser,users) /home/liveuser/.kde4/share/config/* %changelog +* Sat Sep 02 2017 Silvan Calarco 3.90.0-2mamba +- create packager user/group in case it does not exist + * Sat Dec 03 2016 Silvan Calarco 3.90.0-1mamba - update to 3.90.0