Add apparmor config to data_files for Debian and Ubuntu

This commit is contained in:
citizenaspirant 2020-04-30 19:05:11 +00:00 committed by Dmitri Bogomolov
parent 84b5f2982c
commit 93bf7ad62c
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 36 additions and 8 deletions

View File

@ -0,0 +1,19 @@
# Last Modified: Wed Apr 29 21:04:08 2020
#include <tunables/global>
/usr/bin/pybitmessage {
#include <abstractions/base>
#include <abstractions/fonts>
#include <abstractions/lightdm>
#include <abstractions/python>
#include <abstractions/user-tmp>
owner /home/*/.ICEauthority r,
owner /home/*/.Xauthority r,
owner /home/*/.config/PyBitmessage/ rw,
owner /home/*/.config/PyBitmessage/* rwk,
owner /home/*/.config/Trolltech.conf rwk,
owner /home/*/.config/Trolltech.conf.* rw,
owner /proc/*/mounts r,
}

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python2.7
import os
import platform
import shutil
import sys
@ -84,6 +85,21 @@ if __name__ == "__main__":
except ImportError:
packages += ['pybitmessage.fallback.umsgpack']
data_files = [
('share/applications/',
['desktop/pybitmessage.desktop']),
('share/icons/hicolor/scalable/apps/',
['desktop/icons/scalable/pybitmessage.svg']),
('share/icons/hicolor/24x24/apps/',
['desktop/icons/24x24/pybitmessage.png'])
]
if platform.dist()[0] in ('Debian', 'Ubuntu'):
data_files += [
("etc/apparmor.d/",
['packages/apparmor/pybitmessage'])
]
dist = setup(
name='pybitmessage',
version=softwareVersion,
@ -115,14 +131,7 @@ if __name__ == "__main__":
'translations/*.ts', 'translations/*.qm',
'images/*.png', 'images/*.ico', 'images/*.icns'
]},
data_files=[
('share/applications/',
['desktop/pybitmessage.desktop']),
('share/icons/hicolor/scalable/apps/',
['desktop/icons/scalable/pybitmessage.svg']),
('share/icons/hicolor/24x24/apps/',
['desktop/icons/24x24/pybitmessage.png'])
],
data_files=data_files,
ext_modules=[bitmsghash],
zip_safe=False,
entry_points={