selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* .desktop files installed by gui/
@ 2019-02-21 20:31 Nicolas Iooss
  2019-02-27 14:02 ` Petr Lautrbach
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Iooss @ 2019-02-21 20:31 UTC (permalink / raw)
  To: selinux

Hello,

Currently, gui/Makefile installs three .desktop files:
* /usr/share/system-config-selinux/selinux-polgengui.desktop (with
"Exec=/usr/bin/selinux-polgengui")
* /usr/share/system-config-selinux/sepolicy.desktop (with
"Exec=/usr/bin/sepolicy gui")
* /usr/share/system-config-selinux/system-config-selinux.desktop (with
Exec=/usr/bin/system-config-selinux)

There are several issues about them:
* The first one does not work because "make install" does not create
/usr/bin/selinux-polgengui. It creates
/usr/share/system-config-selinux/polgengui.py instead.
* The first two ones do not work on Arch Linux because the commands
they use need to be run as root in order to load.
* None of them are seen by GNOME or XFCE, which look for .desktop
files in /usr/share/applications/. This has been reported for Arch
Linux on https://github.com/archlinuxhardened/selinux/issues/20.

Are these files used by other distributions? Would it break things if
these files are moved to /usr/share/applications/ and if pkexec is
introduced in order to run commands as root (ie.
selinux-polgengui.desktop is changed to "Exec=/usr/bin/pkexec
/usr/share/system-config-selinux/polgengui.py" and sepolicy.desktop to
"Exec=/usr/bin/pkexec /usr/bin/sepolicy gui")?

Nicolas


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: .desktop files installed by gui/
  2019-02-21 20:31 .desktop files installed by gui/ Nicolas Iooss
@ 2019-02-27 14:02 ` Petr Lautrbach
  2019-02-28  5:14   ` Jason Zaman
  2019-03-05 16:38   ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Petr Lautrbach
  0 siblings, 2 replies; 11+ messages in thread
From: Petr Lautrbach @ 2019-02-27 14:02 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: selinux


Nicolas Iooss <nicolas.iooss@m4x.org> writes:

> Hello,
>
> Currently, gui/Makefile installs three .desktop files:
> * /usr/share/system-config-selinux/selinux-polgengui.desktop 
> (with
> "Exec=/usr/bin/selinux-polgengui")
> * /usr/share/system-config-selinux/sepolicy.desktop (with
> "Exec=/usr/bin/sepolicy gui")
> * /usr/share/system-config-selinux/system-config-selinux.desktop 
> (with
> Exec=/usr/bin/system-config-selinux)
>
> There are several issues about them:
> * The first one does not work because "make install" does not 
> create
> /usr/bin/selinux-polgengui. It creates
> /usr/share/system-config-selinux/polgengui.py instead.
> * The first two ones do not work on Arch Linux because the 
> commands
> they use need to be run as root in order to load.
> * None of them are seen by GNOME or XFCE, which look for 
> .desktop
> files in /usr/share/applications/. This has been reported for 
> Arch
> Linux on https://github.com/archlinuxhardened/selinux/issues/20.
>
> Are these files used by other distributions? Would it break 
> things if
> these files are moved to /usr/share/applications/ 

This is from Fedora policycoreutils.spec:

---
ln -sf /usr/share/system-config-selinux/polgengui.py 
%{buildroot}%{_bindir}/selinux-polgengui

desktop-file-install --dir %{buildroot}%{_datadir}/applications 
--add-category Settings \
    %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop

desktop-file-install --dir %{buildroot}%{_datadir}/applications 
--add-category Settings \
    %{buildroot}%{_datadir}/system-config-selinux/sepolicy.desktop

desktop-file-install --dir %{buildroot}%{_datadir}/applications \
    %{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop

rm -f 
%{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
rm -f 
%{buildroot}%{_datadir}/system-config-selinux/sepolicy.desktop
rm -f 
%{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
---

It's been like that for more than 6 years already.

Given that it addresses almost all the described problems I can 
say that
your proposed changes won't break anything in Fedora.

> and if pkexec is
> introduced in order to run commands as root (ie.
> selinux-polgengui.desktop is changed to "Exec=/usr/bin/pkexec
> /usr/share/system-config-selinux/polgengui.py" and 
> sepolicy.desktop to
> "Exec=/usr/bin/pkexec /usr/bin/sepolicy gui")?
>

/usr/share/system-config-selinux/polgengui.py works without root 
on
Fedora.

sepolicy gui asks for privileges on "Action:
org.selinux.customized" which is decorated by
@slip.dbus.polkit.require_auth so I'm not sure if pkexec is really 
needed.




> Nicolas


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: .desktop files installed by gui/
  2019-02-27 14:02 ` Petr Lautrbach
@ 2019-02-28  5:14   ` Jason Zaman
  2019-03-05 16:38   ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Petr Lautrbach
  1 sibling, 0 replies; 11+ messages in thread
From: Jason Zaman @ 2019-02-28  5:14 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: Nicolas Iooss, selinux

On Wed, Feb 27, 2019 at 03:02:06PM +0100, Petr Lautrbach wrote:
> 
> Nicolas Iooss <nicolas.iooss@m4x.org> writes:
> 
> > Hello,
> >
> > Currently, gui/Makefile installs three .desktop files:
> > * /usr/share/system-config-selinux/selinux-polgengui.desktop 
> > (with
> > "Exec=/usr/bin/selinux-polgengui")
> > * /usr/share/system-config-selinux/sepolicy.desktop (with
> > "Exec=/usr/bin/sepolicy gui")
> > * /usr/share/system-config-selinux/system-config-selinux.desktop 
> > (with
> > Exec=/usr/bin/system-config-selinux)
> >
> > There are several issues about them:
> > * The first one does not work because "make install" does not 
> > create
> > /usr/bin/selinux-polgengui. It creates
> > /usr/share/system-config-selinux/polgengui.py instead.
> > * The first two ones do not work on Arch Linux because the 
> > commands
> > they use need to be run as root in order to load.
> > * None of them are seen by GNOME or XFCE, which look for 
> > .desktop
> > files in /usr/share/applications/. This has been reported for 
> > Arch
> > Linux on https://github.com/archlinuxhardened/selinux/issues/20.
> >
> > Are these files used by other distributions? Would it break 
> > things if
> > these files are moved to /usr/share/applications/ 
> 
> This is from Fedora policycoreutils.spec:
> 
> ---
> ln -sf /usr/share/system-config-selinux/polgengui.py 
> %{buildroot}%{_bindir}/selinux-polgengui
> 
> desktop-file-install --dir %{buildroot}%{_datadir}/applications 
> --add-category Settings \
>     %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
> 
> desktop-file-install --dir %{buildroot}%{_datadir}/applications 
> --add-category Settings \
>     %{buildroot}%{_datadir}/system-config-selinux/sepolicy.desktop
> 
> desktop-file-install --dir %{buildroot}%{_datadir}/applications \
>     %{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
> 
> rm -f 
> %{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
> rm -f 
> %{buildroot}%{_datadir}/system-config-selinux/sepolicy.desktop
> rm -f 
> %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
> ---
> 
> It's been like that for more than 6 years already.
> 
> Given that it addresses almost all the described problems I can 
> say that
> your proposed changes won't break anything in Fedora.

I haven't even packaged the gui on Gentoo, so its definitely not a
regression here :) 
> 
> > and if pkexec is
> > introduced in order to run commands as root (ie.
> > selinux-polgengui.desktop is changed to "Exec=/usr/bin/pkexec
> > /usr/share/system-config-selinux/polgengui.py" and 
> > sepolicy.desktop to
> > "Exec=/usr/bin/pkexec /usr/bin/sepolicy gui")?
> >
> 
> /usr/share/system-config-selinux/polgengui.py works without root 
> on
> Fedora.
> 
> sepolicy gui asks for privileges on "Action:
> org.selinux.customized" which is decorated by
> @slip.dbus.polkit.require_auth so I'm not sure if pkexec is really 
> needed.

If it works without thats obviously the best. But also I seem to recall
pkexec had issues on my machine. It might need policy updates?

Not that I'd be opposed if you added pkexec since its not used here at
all right now so if I added the gui I'd just fix pkexec first.

-- Jason

> 
> > Nicolas
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui
  2019-02-27 14:02 ` Petr Lautrbach
  2019-02-28  5:14   ` Jason Zaman
@ 2019-03-05 16:38   ` Petr Lautrbach
  2019-03-05 16:38     ` [PATCH 2/2] gui: Install .desktop files to /usr/share/applications by default Petr Lautrbach
  2019-03-17 19:11     ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Nicolas Iooss
  1 sibling, 2 replies; 11+ messages in thread
From: Petr Lautrbach @ 2019-03-05 16:38 UTC (permalink / raw)
  To: selinux; +Cc: Petr Lautrbach

polgengui.py is a standalone gui tool which should be in /usr/bin with other
tools.

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 gui/Makefile       | 2 +-
 gui/modulesPage.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gui/Makefile b/gui/Makefile
index c2f982de..b2375fbf 100644
--- a/gui/Makefile
+++ b/gui/Makefile
@@ -31,7 +31,7 @@ install: all
 	-mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
 	install -m 755 system-config-selinux.py $(DESTDIR)$(SHAREDIR)
 	install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
-	install -m 755 polgengui.py $(DESTDIR)$(SHAREDIR)
+	install -m 755 polgengui.py $(DESTDIR)$(BINDIR)/selinux-polgengui
 	install -m 644 $(TARGETS) $(DESTDIR)$(SHAREDIR)
 	install -m 644 system-config-selinux.8 $(DESTDIR)$(MANDIR)/man8
 	install -m 644 selinux-polgengui.8 $(DESTDIR)$(MANDIR)/man8
diff --git a/gui/modulesPage.py b/gui/modulesPage.py
index 34c5d9e3..cb856b2d 100644
--- a/gui/modulesPage.py
+++ b/gui/modulesPage.py
@@ -118,7 +118,7 @@ class modulesPage(semanagePage):
 
     def new_module(self, args):
         try:
-            Popen(["/usr/share/system-config-selinux/polgengui.py"])
+            Popen(["selinux-polgengui"])
         except ValueError as e:
             self.error(e.args[0])
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] gui: Install .desktop files to /usr/share/applications by default
  2019-03-05 16:38   ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Petr Lautrbach
@ 2019-03-05 16:38     ` Petr Lautrbach
  2019-03-17 13:35       ` Nicolas Iooss
  2019-03-17 19:11     ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Nicolas Iooss
  1 sibling, 1 reply; 11+ messages in thread
From: Petr Lautrbach @ 2019-03-05 16:38 UTC (permalink / raw)
  To: selinux; +Cc: Petr Lautrbach

/usr/share/applications is a standard directory for .desktop files.
Installation path can be changed using DESKTOPDIR variable in installation
phase, e.g.

make DESKTOPDIR=/usr/local/share/applications install

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 gui/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gui/Makefile b/gui/Makefile
index b2375fbf..5e64c3a1 100644
--- a/gui/Makefile
+++ b/gui/Makefile
@@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
 SHAREDIR ?= $(PREFIX)/share/system-config-selinux
 DATADIR ?= $(PREFIX)/share
 MANDIR ?= $(PREFIX)/share/man
+DESKTOPDIR ?= $(PREFIX)/share/applications
 
 TARGETS= \
 booleansPage.py \
@@ -44,7 +45,7 @@ install: all
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/system-config-selinux
-	install -m 644 *.desktop $(DESTDIR)$(DATADIR)/system-config-selinux
+	install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 sepolicy_256.png $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
 	for i in 16 22 32 48 256; do \
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] gui: Install .desktop files to /usr/share/applications by default
  2019-03-05 16:38     ` [PATCH 2/2] gui: Install .desktop files to /usr/share/applications by default Petr Lautrbach
@ 2019-03-17 13:35       ` Nicolas Iooss
  2019-03-18 13:39         ` [PATCH v2] " Petr Lautrbach
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Iooss @ 2019-03-17 13:35 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: selinux

On Tue, Mar 5, 2019 at 5:39 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> /usr/share/applications is a standard directory for .desktop files.
> Installation path can be changed using DESKTOPDIR variable in installation
> phase, e.g.
>
> make DESKTOPDIR=/usr/local/share/applications install
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Thanks for your patch and sorry for the delay (I have been on holidays
the last two weeks). I agree with moving .desktop files to
/usr/share/applications/ by default and your patch looks good, but it
does not create the directory if it does not exist (Travis-CI fails
with "install: target
'/home/travis/build/fishilico/selinux/installdir/usr/share/applications'
is not a directory"). Could you please add "-mkdir -p
$(DESTDIR)$(DESKTOPDIR)" next to the other mkdir commands?

Nicolas

> ---
>  gui/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gui/Makefile b/gui/Makefile
> index b2375fbf..5e64c3a1 100644
> --- a/gui/Makefile
> +++ b/gui/Makefile
> @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
>  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
>  DATADIR ?= $(PREFIX)/share
>  MANDIR ?= $(PREFIX)/share/man
> +DESKTOPDIR ?= $(PREFIX)/share/applications
>
>  TARGETS= \
>  booleansPage.py \
> @@ -44,7 +45,7 @@ install: all
>         install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/pixmaps
>         install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
>         install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/system-config-selinux
> -       install -m 644 *.desktop $(DESTDIR)$(DATADIR)/system-config-selinux
> +       install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
>         -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
>         install -m 644 sepolicy_256.png $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
>         for i in 16 22 32 48 256; do \
> --
> 2.20.1
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui
  2019-03-05 16:38   ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Petr Lautrbach
  2019-03-05 16:38     ` [PATCH 2/2] gui: Install .desktop files to /usr/share/applications by default Petr Lautrbach
@ 2019-03-17 19:11     ` Nicolas Iooss
  1 sibling, 0 replies; 11+ messages in thread
From: Nicolas Iooss @ 2019-03-17 19:11 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: selinux

On Tue, Mar 5, 2019 at 5:39 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> polgengui.py is a standalone gui tool which should be in /usr/bin with other
> tools.
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Thanks, I applied this patch.

Nicolas

> ---
>  gui/Makefile       | 2 +-
>  gui/modulesPage.py | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gui/Makefile b/gui/Makefile
> index c2f982de..b2375fbf 100644
> --- a/gui/Makefile
> +++ b/gui/Makefile
> @@ -31,7 +31,7 @@ install: all
>         -mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
>         install -m 755 system-config-selinux.py $(DESTDIR)$(SHAREDIR)
>         install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
> -       install -m 755 polgengui.py $(DESTDIR)$(SHAREDIR)
> +       install -m 755 polgengui.py $(DESTDIR)$(BINDIR)/selinux-polgengui
>         install -m 644 $(TARGETS) $(DESTDIR)$(SHAREDIR)
>         install -m 644 system-config-selinux.8 $(DESTDIR)$(MANDIR)/man8
>         install -m 644 selinux-polgengui.8 $(DESTDIR)$(MANDIR)/man8
> diff --git a/gui/modulesPage.py b/gui/modulesPage.py
> index 34c5d9e3..cb856b2d 100644
> --- a/gui/modulesPage.py
> +++ b/gui/modulesPage.py
> @@ -118,7 +118,7 @@ class modulesPage(semanagePage):
>
>      def new_module(self, args):
>          try:
> -            Popen(["/usr/share/system-config-selinux/polgengui.py"])
> +            Popen(["selinux-polgengui"])
>          except ValueError as e:
>              self.error(e.args[0])
>
> --
> 2.20.1
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] gui: Install .desktop files to /usr/share/applications by default
  2019-03-17 13:35       ` Nicolas Iooss
@ 2019-03-18 13:39         ` Petr Lautrbach
  2019-03-18 15:26           ` Petr Lautrbach
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Lautrbach @ 2019-03-18 13:39 UTC (permalink / raw)
  To: selinux; +Cc: Petr Lautrbach

/usr/share/applications is a standard directory for .desktop files.
Installation path can be changed using DESKTOPDIR variable in installation
phase, e.g.

make DESKTOPDIR=/usr/local/share/applications install

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 gui/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gui/Makefile b/gui/Makefile
index b2375fbf..ca965c94 100644
--- a/gui/Makefile
+++ b/gui/Makefile
@@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
 SHAREDIR ?= $(PREFIX)/share/system-config-selinux
 DATADIR ?= $(PREFIX)/share
 MANDIR ?= $(PREFIX)/share/man
+DESKTOPDIR ?= $(PREFIX)/share/applications
 
 TARGETS= \
 booleansPage.py \
@@ -29,6 +30,7 @@ install: all
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	-mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	-mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
+	-mkdir -p $(DESTDIR)$(DESKTOPDIR)
 	install -m 755 system-config-selinux.py $(DESTDIR)$(SHAREDIR)
 	install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
 	install -m 755 polgengui.py $(DESTDIR)$(BINDIR)/selinux-polgengui
@@ -44,7 +46,7 @@ install: all
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/system-config-selinux
-	install -m 644 *.desktop $(DESTDIR)$(DATADIR)/system-config-selinux
+	install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 sepolicy_256.png $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
 	for i in 16 22 32 48 256; do \
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] gui: Install .desktop files to /usr/share/applications by default
  2019-03-18 13:39         ` [PATCH v2] " Petr Lautrbach
@ 2019-03-18 15:26           ` Petr Lautrbach
  2019-03-18 21:39             ` Nicolas Iooss
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Lautrbach @ 2019-03-18 15:26 UTC (permalink / raw)
  To: selinux


Petr Lautrbach <plautrba@redhat.com> writes:

> /usr/share/applications is a standard directory for .desktop 
> files.
> Installation path can be changed using DESKTOPDIR variable in 
> installation
> phase, e.g.
>
> make DESKTOPDIR=/usr/local/share/applications install
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Travis CI passed
https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/507842594


> ---
>  gui/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gui/Makefile b/gui/Makefile
> index b2375fbf..ca965c94 100644
> --- a/gui/Makefile
> +++ b/gui/Makefile
> @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
>  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
>  DATADIR ?= $(PREFIX)/share
>  MANDIR ?= $(PREFIX)/share/man
> +DESKTOPDIR ?= $(PREFIX)/share/applications
>  
>  TARGETS= \
>  booleansPage.py \
> @@ -29,6 +30,7 @@ install: all
>  	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
>  	-mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
>  	-mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
> +	-mkdir -p $(DESTDIR)$(DESKTOPDIR)
>  	install -m 755 system-config-selinux.py 
>  $(DESTDIR)$(SHAREDIR)
>  	install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
>  	install -m 755 polgengui.py 
>  $(DESTDIR)$(BINDIR)/selinux-polgengui
> @@ -44,7 +46,7 @@ install: all
>  	install -m 644 system-config-selinux.png 
>  $(DESTDIR)$(DATADIR)/pixmaps
>  	install -m 644 system-config-selinux.png 
>  $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
>  	install -m 644 system-config-selinux.png 
>  $(DESTDIR)$(DATADIR)/system-config-selinux
> -	install -m 644 *.desktop 
> $(DESTDIR)$(DATADIR)/system-config-selinux
> +	install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
>  	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
>  	install -m 644 sepolicy_256.png 
>  $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
>  	for i in 16 22 32 48 256; do \


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] gui: Install .desktop files to /usr/share/applications by default
  2019-03-18 15:26           ` Petr Lautrbach
@ 2019-03-18 21:39             ` Nicolas Iooss
  2019-03-26 21:22               ` Nicolas Iooss
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Iooss @ 2019-03-18 21:39 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: selinux

On Mon, Mar 18, 2019 at 4:26 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> Petr Lautrbach <plautrba@redhat.com> writes:
>
> > /usr/share/applications is a standard directory for .desktop
> > files.
> > Installation path can be changed using DESKTOPDIR variable in
> > installation
> > phase, e.g.
> >
> > make DESKTOPDIR=/usr/local/share/applications install
> >
> > Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
>
> Travis CI passed
> https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/507842594

Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Thanks!
Nicolas

> > ---
> >  gui/Makefile | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/gui/Makefile b/gui/Makefile
> > index b2375fbf..ca965c94 100644
> > --- a/gui/Makefile
> > +++ b/gui/Makefile
> > @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
> >  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
> >  DATADIR ?= $(PREFIX)/share
> >  MANDIR ?= $(PREFIX)/share/man
> > +DESKTOPDIR ?= $(PREFIX)/share/applications
> >
> >  TARGETS= \
> >  booleansPage.py \
> > @@ -29,6 +30,7 @@ install: all
> >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> >       -mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> >       -mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
> > +     -mkdir -p $(DESTDIR)$(DESKTOPDIR)
> >       install -m 755 system-config-selinux.py
> >  $(DESTDIR)$(SHAREDIR)
> >       install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
> >       install -m 755 polgengui.py
> >  $(DESTDIR)$(BINDIR)/selinux-polgengui
> > @@ -44,7 +46,7 @@ install: all
> >       install -m 644 system-config-selinux.png
> >  $(DESTDIR)$(DATADIR)/pixmaps
> >       install -m 644 system-config-selinux.png
> >  $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> >       install -m 644 system-config-selinux.png
> >  $(DESTDIR)$(DATADIR)/system-config-selinux
> > -     install -m 644 *.desktop
> > $(DESTDIR)$(DATADIR)/system-config-selinux
> > +     install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
> >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> >       install -m 644 sepolicy_256.png
> >  $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
> >       for i in 16 22 32 48 256; do \
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] gui: Install .desktop files to /usr/share/applications by default
  2019-03-18 21:39             ` Nicolas Iooss
@ 2019-03-26 21:22               ` Nicolas Iooss
  0 siblings, 0 replies; 11+ messages in thread
From: Nicolas Iooss @ 2019-03-26 21:22 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: selinux

On Mon, Mar 18, 2019 at 10:39 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote:
>
> On Mon, Mar 18, 2019 at 4:26 PM Petr Lautrbach <plautrba@redhat.com> wrote:
> >
> > Petr Lautrbach <plautrba@redhat.com> writes:
> >
> > > /usr/share/applications is a standard directory for .desktop
> > > files.
> > > Installation path can be changed using DESKTOPDIR variable in
> > > installation
> > > phase, e.g.
> > >
> > > make DESKTOPDIR=/usr/local/share/applications install
> > >
> > > Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
> >
> > Travis CI passed
> > https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/507842594
>
> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
>
> Thanks!
> Nicolas

Merged.

Nicolas

>
> > > ---
> > >  gui/Makefile | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/gui/Makefile b/gui/Makefile
> > > index b2375fbf..ca965c94 100644
> > > --- a/gui/Makefile
> > > +++ b/gui/Makefile
> > > @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
> > >  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
> > >  DATADIR ?= $(PREFIX)/share
> > >  MANDIR ?= $(PREFIX)/share/man
> > > +DESKTOPDIR ?= $(PREFIX)/share/applications
> > >
> > >  TARGETS= \
> > >  booleansPage.py \
> > > @@ -29,6 +30,7 @@ install: all
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
> > > +     -mkdir -p $(DESTDIR)$(DESKTOPDIR)
> > >       install -m 755 system-config-selinux.py
> > >  $(DESTDIR)$(SHAREDIR)
> > >       install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
> > >       install -m 755 polgengui.py
> > >  $(DESTDIR)$(BINDIR)/selinux-polgengui
> > > @@ -44,7 +46,7 @@ install: all
> > >       install -m 644 system-config-selinux.png
> > >  $(DESTDIR)$(DATADIR)/pixmaps
> > >       install -m 644 system-config-selinux.png
> > >  $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> > >       install -m 644 system-config-selinux.png
> > >  $(DESTDIR)$(DATADIR)/system-config-selinux
> > > -     install -m 644 *.desktop
> > > $(DESTDIR)$(DATADIR)/system-config-selinux
> > > +     install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> > >       install -m 644 sepolicy_256.png
> > >  $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
> > >       for i in 16 22 32 48 256; do \
> >


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-26 21:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-21 20:31 .desktop files installed by gui/ Nicolas Iooss
2019-02-27 14:02 ` Petr Lautrbach
2019-02-28  5:14   ` Jason Zaman
2019-03-05 16:38   ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Petr Lautrbach
2019-03-05 16:38     ` [PATCH 2/2] gui: Install .desktop files to /usr/share/applications by default Petr Lautrbach
2019-03-17 13:35       ` Nicolas Iooss
2019-03-18 13:39         ` [PATCH v2] " Petr Lautrbach
2019-03-18 15:26           ` Petr Lautrbach
2019-03-18 21:39             ` Nicolas Iooss
2019-03-26 21:22               ` Nicolas Iooss
2019-03-17 19:11     ` [PATCH 1/2] gui: Install polgengui.py to /usr/bin/selinux-polgengui Nicolas Iooss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).