All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: Antoine Tenart <atenart@kernel.org>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/refpolicy: fix build with minidlna
Date: Fri, 30 Jul 2021 09:23:23 +0200	[thread overview]
Message-ID: <20210730072323.3645837-1-fontaine.fabrice@gmail.com> (raw)

Fix build failure with minidlna raised since commit
e3c31814adaa3e773c310cd97e28ffea9b980a10

Fixes:
 - http://autobuild.buildroot.org/results/52490172afd9b72b08a7deb0bd3c2124398bbffa

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ervices-minidlna.te-make-xdg-optiona.patch | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch

diff --git a/package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch b/package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch
new file mode 100644
index 0000000000..c4e98ad141
--- /dev/null
+++ b/package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch
@@ -0,0 +1,52 @@
+From 65c87bdfb1c895934582988f03f1c9c452c1426b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 25 Jul 2021 17:59:15 +0200
+Subject: [PATCH] policy/modules/services/minidlna.te: make xdg optional
+
+Make xdg optional to avoid the following build failure:
+
+ Compiling targeted policy.28
+ env LD_LIBRARY_PATH="/home/buildroot/autobuild/instance-1/output-1/host/lib:/home/buildroot/autobuild/instance-1/output-1/host/usr/lib" /home/buildroot/autobuild/instance-1/output-1/host/usr/bin/checkpolicy -c 28 -U deny -S -O -E policy.conf -o policy.28
+ policy/modules/services/minidlna.te:85:ERROR 'unknown type xdg_music_t' at token ';' on line 146109:
+ #line 85
+	allow minidlna_t xdg_music_t:dir { getattr search open };
+ checkpolicy:  error(s) encountered while parsing configuration
+ Rules.monolithic:78: recipe for target 'policy.28' failed
+
+Fixes:
+ - http://autobuild.buildroot.org/results/52490172afd9b72b08a7deb0bd3c2124398bbffa/build-end.log
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/SELinuxProject/refpolicy/pull/396]
+---
+ policy/modules/services/minidlna.te | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/policy/modules/services/minidlna.te b/policy/modules/services/minidlna.te
+index b980d2707..4d87e8ee7 100644
+--- a/policy/modules/services/minidlna.te
++++ b/policy/modules/services/minidlna.te
+@@ -82,10 +82,6 @@ logging_search_logs(minidlna_t)
+ miscfiles_read_localization(minidlna_t)
+ miscfiles_read_public_files(minidlna_t)
+ 
+-xdg_read_music(minidlna_t)
+-xdg_read_pictures(minidlna_t)
+-xdg_read_videos(minidlna_t)
+-
+ tunable_policy(`minidlna_read_generic_user_content',`
+ 	userdom_list_user_tmp(minidlna_t)
+ 	userdom_read_user_home_content_files(minidlna_t)
+@@ -101,3 +97,9 @@ tunable_policy(`minidlna_read_generic_user_content',`
+ 	userdom_dontaudit_read_user_home_content_files(minidlna_t)
+ 	userdom_dontaudit_read_user_tmp_files(minidlna_t)
+ ')
++
++optional_policy(`
++	xdg_read_music(minidlna_t)
++	xdg_read_pictures(minidlna_t)
++	xdg_read_videos(minidlna_t)
++')
+-- 
+2.30.2
+
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

             reply	other threads:[~2021-07-30  7:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30  7:23 Fabrice Fontaine [this message]
2021-07-30 21:35 ` [Buildroot] [PATCH 1/1] package/refpolicy: fix build with minidlna Thomas Petazzoni
2021-08-05  8:12 ` Peter Korsgaard
2021-08-05  8:25   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210730072323.3645837-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=atenart@kernel.org \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.