bundlewrap/bundles/kodi/metadata.py

58 lines
1.4 KiB
Python
Raw Permalink Normal View History

2021-03-21 18:10:49 +00:00
from bundlewrap.metadata import atomic
2020-10-03 11:36:12 +00:00
defaults = {
'apt': {
'repos': {
'deb-multimedia': {
'items': {
2021-03-08 20:06:25 +00:00
'deb https://ftp-stud.hs-esslingen.de/pub/Mirrors/debian-multimedia/ {os_release} main',
#'deb https://ftp-stud.hs-esslingen.de/pub/Mirrors/debian-multimedia/ {os_release}-backports main',
},
},
},
2020-10-03 11:36:12 +00:00
'packages': {
'cec-utils': {},
'fonts-noto': {},
'fonts-roboto': {},
'kodi': {},
2021-03-08 20:06:25 +00:00
'kodi-inputstream-adaptive': {},
'libasound2': {},
2020-10-03 11:36:12 +00:00
'ttf-mscorefonts-installer': {},
'tv-fonts': {},
'xfonts-base': {},
2020-10-03 16:36:48 +00:00
'xinit': {},
'xserver-xorg': {},
2020-10-03 11:36:12 +00:00
'xserver-xorg-legacy': {},
},
},
2020-11-13 11:37:26 +00:00
'backups': {
'paths': {
'/home/kodi',
},
},
2020-10-03 11:36:12 +00:00
'users': {
'kodi': {
'groups': {
'audio',
'tty',
'video',
2020-10-03 11:36:12 +00:00
},
},
},
}
2021-03-21 18:10:49 +00:00
@metadata_reactor.provides(
2023-09-24 18:59:58 +00:00
'firewall/port_rules',
'firewall/port_rules',
2021-03-21 18:10:49 +00:00
)
def firewall(metadata):
2021-03-21 18:10:49 +00:00
return {
'firewall': {
2021-03-21 18:10:49 +00:00
'port_rules': {
2023-09-24 18:59:58 +00:00
'8080/tcp': atomic(metadata.get('kodi/restrict-to', {'*'})),
'9090/tcp': atomic(metadata.get('kodi/restrict-to', {'*'})),
2021-03-21 18:10:49 +00:00
},
},
}