Skip to contentSkip to conversation

gui: remove selinux-sepolgengui (#77)

SELinuxProject/selinux Petr Lautrbach 2 participants 2 messages Feb 2, 2018 – Feb 5, 2018 1 message not in the archive SELinux security module

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · Nicolas Iooss

Hi,
I sent a few hours ago these two patches on the mailing list, by as the first one seems to be blocked somewhere (I have only received back the second one), I am publishing them on Github too, as a Pull Request.

These patches removes selinux-sepolgengui because this application is not compatible with Gtk3, Python 3 (it requires PyGTK), etc. and would otherwise require some effort to update it.
More precisely, even though ``pygi-convert.sh`` updated the code in order to try making the application compatible with Python 3, PyGI... (in commit 0f3beeb00e7a42cc2f44ef0392b8a3a7566a17d7), ``polgen.glade`` is still incompatible with Gtk-Builder (it would need to be converted). I do not want to spend time converting this file when I see that a bug preventing this application to launch has been present for more than one year.

polgengui.py is not compatible with Gtk3, Python 3, etc. Moreover it fails to load at least since the release 2.6-rc1:

Quoted 7 lines
$ python2 /usr/share/system-config-selinux/polgengui.py
Traceback (most recent call last):
  File "/usr/share/system-config-selinux/polgengui.py", line 778, in <module>
    app = childWindow()
  File "/usr/share/system-config-selinux/polgengui.py", line 205, in __init__
    self.all_types = sepolicy.generate.get_all_types()
AttributeError: 'module' object has no attribute 'generate'

This particular problem was fixed in Fedora by
https://github.com/fedora-selinux/selinux/commit/ecd050d12cde54f3d7a31029be8582223d3d6eba

I must have forgotten to re-send it. Sorry.

Quoted 7 lines

In fact, this bug has been introduced more than a year ago by commit b43991f ("policycoreutils: import sepolicy directly"), which replaced "from sepolicy import generate" with "import sepolicy" instead of "import sepolicy.generate".

As no one seems to have noticed, this application seems to be no longer used. Remove it from gui/.

I'd like to ask to postpone accepting this patch for another 2 weeks. I'll try to port/convert polgengui.py to be compatible with Gtk-Builder. I'll come back either with patch or with Ack to drop it.

Thanks,

Petr

Quoted 29 lines

Cheers
You can view, comment on, or merge this pull request online at:

https://github.com/SELinuxProject/selinux/pull/77

-- Commit Summary --

* gui: remove selinux-polgengui application
* gui: remove "new" button in Modules page

-- File Changes --

M gui/Makefile (5)
M gui/modulesPage.py (8)
D gui/polgen.glade (2468)
D gui/polgengui.py (779)
D gui/selinux-polgengui.8 (35)
D gui/selinux-polgengui.desktop (66)
M gui/system-config-selinux.ui (12)

-- Patch Links --

https://github.com/SELinuxProject/selinux/pull/77.patch
https://github.com/SELinuxProject/selinux/pull/77.diff

Signature · 3 lines
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/SELinuxProject/selinux/pull/77
#2 lore raw
Quoted 33 lines · Petr Lautrbach
Quoted 10 lines · Nicolas Iooss

Hi,
I sent a few hours ago these two patches on the mailing list, by as the first one seems to be blocked somewhere (I have only received back the second one), I am publishing them on Github too, as a Pull Request.

These patches removes selinux-sepolgengui because this application is not compatible with Gtk3, Python 3 (it requires PyGTK), etc. and would otherwise require some effort to update it.
More precisely, even though ``pygi-convert.sh`` updated the code in order to try making the application compatible with Python 3, PyGI... (in commit 0f3beeb00e7a42cc2f44ef0392b8a3a7566a17d7), ``polgen.glade`` is still incompatible with Gtk-Builder (it would need to be converted). I do not want to spend time converting this file when I see that a bug preventing this application to launch has been present for more than one year.

polgengui.py is not compatible with Gtk3, Python 3, etc. Moreover it fails to load at least since the release 2.6-rc1:

Quoted 7 lines
$ python2 /usr/share/system-config-selinux/polgengui.py
Traceback (most recent call last):
  File "/usr/share/system-config-selinux/polgengui.py", line 778, in <module>
    app = childWindow()
  File "/usr/share/system-config-selinux/polgengui.py", line 205, in __init__
    self.all_types = sepolicy.generate.get_all_types()
AttributeError: 'module' object has no attribute 'generate'

This particular problem was fixed in Fedora by
https://github.com/fedora-selinux/selinux/commit/ecd050d12cde54f3d7a31029be8582223d3d6eba

I must have forgotten to re-send it. Sorry.

Quoted 7 lines

In fact, this bug has been introduced more than a year ago by commit b43991f ("policycoreutils: import sepolicy directly"), which replaced "from sepolicy import generate" with "import sepolicy" instead of "import sepolicy.generate".

As no one seems to have noticed, this application seems to be no longer used. Remove it from gui/.

Quoted 7 lines

I'd like to ask to postpone accepting this patch for another 2 weeks. I'll try to port/convert polgengui.py to be compatible with Gtk-Builder. I'll come back either with patch or with Ack to drop it.

Thanks,

Petr

Sure, I agree with this plan. I will wait to hear back from you before merging or dropping the patches I posted.

Thanks,
Nicolas