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.
old/sisyphus-task299056
Mikhail Novosyolov 3 years ago
parent 445d438c45
commit dff9d0c6f2
  1. 14
      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

Loading…
Cancel
Save