semanage fcontext -a -t bin_t "/usr/lib/rustdesk/rustdesk"
restorecon -v "/usr/lib/rustdesk/rustdesk"
In the rpm spec file, but, the AI continuously said I should check SELinux status before running semanage and restorecon command, because it may fail, but from my testing(On ublue/kinoite custom image), it is not
bash-5.2# semanage fcontext -a -t bin_t "/usr/lib/rustdesk/rustdesk"
libsemanage.semanage_rename: WARNING: rename(/etc/selinux/targeted/active, /etc/selinux/targeted/previous) failed: Invalid cross-device link, fall back to non-atomic semanage_copy_dir_flags()
bash-5.2# echo $?
0
bash-5.2# restorecon -v "/usr/lib/rustdesk/rustdesk"
bash-5.2# echo $?
0
If I added conditional expressions (if) in the script, it means it will never run on the Atomic image builds, but I can’t sure if it is only not failed on Fedora, or it is really a potential that running semanage and restorecon may failed? If so, what should I do? Making it fail open?
/usr/bin/rustdesk is linking to /usr/lib/rustdesk/rustdesk because it needs some externel assets(On /usr/lib/rustdesk/ folder)
bash-5.2# pwd
/usr/bin
bash-5.2# ls -l | grep rustdesk
lrwxrwxrwx 1 root root 26 Dec 16 15:19 rustdesk -> /usr/lib/rustdesk/rustdesk
In this case, what is the proper way to do if this is not single binary? (Or I should call them to join this discussion, or give advice directly in their PR cause I’m not the devs)
Hi, they decided to put in /usr/local/rustdesk They now decided to put in /usr/share, but I’m curious is this a bug or user fault?
But I’m having problem that the /usr/local/rustdesk folder never exists after custom image build, also rpm-ostree layering, is this correct procedure to make correct symlink?