From dff9d0c6f2decedaaec81bf9b98f1d96b442013a Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Thu, 16 Dec 2021 22:00:57 +0300 Subject: [PATCH] Workaround sisyphus_check prohibiting FHS violation [00:00:11] /.out/kometa-xdg-pam-env-1.2-alt1.noarch.rpm: FHS violations: /root/.kometa_env [00:00:11] sisyphus_check: check-fhs ERROR: FHS violation It would better allow /root/* in this case. --- kometa-xdg.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/kometa-xdg.spec b/kometa-xdg.spec index c3d3d90..fea854f 100644 --- a/kometa-xdg.spec +++ b/kometa-xdg.spec @@ -89,10 +89,15 @@ QT_QPA_PLATFORMTHEME=gtk3 для root, благодаря чему Qt5 начи пользовательскую тему иконок под root. Удаление пакета отключает выставление переменной. %files pam-env -/root/.kometa_env +# copied to /root/.kometa_env by scriptlet +%_datadir/kometa-pam-env -# echo -e is a bashism %post pam-env +# sisyphus_check does not allow to package files inside /root, +# that is why I have to make this hack. +# IMHO it's OK to package /root/* here as in rootfiles. +cp %_datadir/kometa-pam-env /root/.kometa_env + # This scriptlet sees if pam_env.so <...> exists in PAM configuration and adds it to there if it does not. # It does not add if if a sysadmin manually commented it out. # /etc/control.d/facilities/ seemed to be too complex and not easy to use for this task, so inventing a bicycle. @@ -124,6 +129,7 @@ if [ "$1" -eq 0 ]; then sed -i'.rpmsave' -E -e "/^%regex/d" "$file" fi done + unlink /root/.kometa_env fi #-------------------------------------------------------------- @@ -148,8 +154,8 @@ install -m0755 scripts/systemd.sh %buildroot%_user_env_gen_dir/10-kometa-xdg.sh mkdir -p %buildroot/etc/xdg/kometa install -m0644 plasma5/* %buildroot/etc/xdg/kometa -mkdir -p %buildroot/root -echo QT_QPA_PLATFORMTHEME=gtk3 > %buildroot/root/.kometa_env +mkdir -p %buildroot%_datadir +echo QT_QPA_PLATFORMTHEME=gtk3 > %buildroot/%_datadir/kometa-pam-env %check cd scripts