Skip to content
Snippets Groups Projects
Adrian Ratiu's avatar
Adrian Ratiu authored
The selinux use flag is default enabled, so /etc/selinux
exists in board sysroots, however some CrOS builds like
KernelCI does disable selinux for lab devices, so image
builds can fail with errors like this for eg for cherry:

rsync -av "/build/cherry/etc/selinux/"* "/build/cherry/tmp/portage/chromeos-base/chromeos-initramfs-0.0.1-r581/work/stage_minios/etc/selinux/"
sending incremental file list
rsync: [sender] change_dir "/build/cherry/etc/selinux" failed: No such file or directory (2)

Only do the copy if /etc/selinux exists, so both enabled
and disabled states of the selinux USE flag can work.

Change-Id: I1060de604967e46f632690de4989e564928bd4f6
0f1fe9f0
History