commit:     6c32161a8a2db662c49c7763803a4219fd994612
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Fri May 18 04:07:24 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May 18 16:06:39 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6c32161a

misc-functions: fix selinux labelling on musl

musl's implementation of getopt is different from glibc's in that it
does not accept flags after non-flag arguments, moving the flags earlier
makes SELinux labelling work on musl also.

Bug: https://bugs.gentoo.org/655996
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 bin/misc-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index f3ad52305..de8af955d 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -447,7 +447,7 @@ preinst_selinux_labels() {
 
                                addwrite /sys/fs/selinux/context
 
-                               /usr/sbin/setfiles -F "${file_contexts_path}" 
-r "${D}" "${D}"
+                               /usr/sbin/setfiles -F -r "${D}" 
"${file_contexts_path}" "${D}"
                        ) || die "Failed to set SELinux security labels."
                else
                        # nonfatal, since merging can happen outside a SE kernel

Reply via email to