add Emby Theater

This commit is contained in:
Mario Fetka
2021-08-20 15:58:48 +02:00
parent e265aa7331
commit 123ebbf1df
69 changed files with 2066 additions and 75 deletions

View File

@@ -0,0 +1,8 @@
AUX 0001-entropy.client-fix-equo-pkg-quickpkg.patch 1491 BLAKE2B ddbffb72b55b6da763ab4f73aea772be20f0538cce0c8ea28f656f9df0d748f6955f787b62558162d47125e4c9d2a49cb7106a3fee1f594bcd1e1221f0c31287 SHA512 212870c3e941f6a92fef415be2500a63d01c5e692148e02c1277abbd876f6ad78c070ff4bddb403e8dd21ae04ef968dd2c37925f47f1e677d5e3069bd17ccaaf
AUX 0001-entropy.client-fixes-for-dictionary-changed-size-dur.patch 1923 BLAKE2B f822c6993a79e1554b4179e851760631ec4c5ad1bced255089f9f4ee31736434da5d334226cf6d083857e30297dda1a369be59eaec56982e5c1ef2a926787e95 SHA512 470220de9799e225297ab3760c063ddd121b152b5d93e85212da838bced33ce8400af927c96185c5eb1c8f675ed62743e78b84e559113b84633faec0f51c6740
AUX 0001-entropy.server-gpg-related-fix-for-Python-3.patch 1802 BLAKE2B 2dfaac1e6d5a13b8691118ce3b6b6286fdc6ec363969933a76e8c544b0f210275eeda6fa9f9f2ca992f01fac0ce5cb45a6ec9bcf1741893631486cc58e79a085 SHA512 3a068be4d0dd56d41bd49db7a9c15b3d0c73e355fb6120410af1fd48ac0c19aee4cb1f60a551603b73d164d4838ae47454d5dc3c6a92baf8f474a5171ea2e9f6
AUX 0001-entropy.spm-Rigo-related-Python-3-fix.patch 1250 BLAKE2B 5ed91f1ac753098d3b63c164ea8b19786aee6215384573ded6acdeb033f2577b2247f8d4fbbf2705aab177a76b76cbfa0aeed14ba4fd3a2d1e2d671885c2d8b0 SHA512 922d7e131779b7dec2e3171603a80a393ad35235f5621bef771909bddccbbcd43576293c9d693e8c410f887468bdd34008d74f1e8ce21c3dcb4c8350b9d860a5
AUX 0001-entropy.spm-rigo-Rigo-related-Python-3-fixes.patch 1610 BLAKE2B 70b28fdccb7f9c984532cd622f03a6846ee4725e065a692e78b33ee615d8fee763219a2f7a3e0a3c71fb074f097faf378a38af1001c55dae5726ab217606fe46 SHA512 bc7e7d3880bcc5965e4595b9dbc0df980bb2da255ff7946d844cd07355f20751379b5da5c9d30ebd107d0a4f8bf031720e21d0335c72922a5f1d00b8a0a4898a
AUX fileobjs.patch 3401 BLAKE2B 1401c9acedd93894a0ebf51ccf584e8af15ba50a2435f0f2bf55fd182bc0f3db24782ab27c63f54ec03ce8c0cac550e215842a4832e33b73899e2fab44ef1d8d SHA512 56d3587d259226d4f3e3c32f35d5504882d87d2af2ab9b135f39fb043a2d7804d90913b12bf1ec1e3423ac310c6066d04c7f9fe6b669233d81e91543711e0c7e
EBUILD entropy-325-r1.ebuild 3571 BLAKE2B e33615a5089a998f61d42ab4063f1b1b6f6aa6f84fe29e8404393621f1ed48d56e5bbdbfc6d2d3779232d0212888e11d02cbc79444ea7e91df9be0dc5bfffe39 SHA512 3c397d629b0f28f1febcef6d099470d37bfc5720d154ffb22fec723207ac5fd0746f6e574653c13e92ddf4cdbf2da3c1fbda6386073fabc74f3d1ad900502e26
MISC metadata.xml 564 BLAKE2B 3354c64b6bbb6209e9e72bc648da1156ad0ad3a30430093389c2e26f2f515a216c6a38461ea15288bd8e12092e6957052cea6d4a6caad6907881cd61b7c42b10 SHA512 ea1622a0abb791d9b98b1534077c62f96595835bd352e41362030df988426568bbfeac54be76d270f756693dc433182a67d734c6f9e64c36979a91718b0ca54c

View File

@@ -0,0 +1,125 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_6 python3_7 python3_8 python3_9 )
PYTHON_REQ_USE="sqlite"
inherit eutils python-r1 user git-r3
DESCRIPTION="Entropy Package Manager foundation library"
HOMEPAGE="http://www.sabayon.org"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
EGIT_REPO_URI=https://github.com/Sabayon/entropy.git
EGIT_COMMIT=${PV}
IUSE=""
RDEPEND=">=app-misc/pax-utils-0.7
>=app-portage/portage-utils-0.81
dev-db/sqlite:3[soundex(+)]
net-misc/rsync
sys-apps/diffutils
sys-apps/sandbox
>=sys-apps/portage-2.1.9[${PYTHON_USEDEP}]
sys-devel/gettext
${PYTHON_DEPS}"
DEPEND="${RDEPEND}
dev-util/intltool"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
S="${S}/lib"
PACKAGE_MASK_CONFPATH="${ROOT}/etc/entropy/packages/package.mask"
PACKAGE_UNMASK_CONFPATH="${ROOT}/etc/entropy/packages/package.unmask"
REPO_CONFPATH="${ROOT}/etc/entropy/repositories.conf"
REPO_D_CONFPATH="${ROOT}/etc/entropy/repositories.conf.d"
ENTROPY_CACHEDIR="${ROOT}/var/lib/entropy/caches"
PATCHES=()
pkg_setup() {
# Can:
# - update repos
# - update security advisories
# - handle on-disk cache (atm)
enewgroup entropy || die "failed to create entropy group"
# Create unprivileged entropy user
enewgroup entropy-nopriv || die "failed to create entropy-nopriv group"
enewuser entropy-nopriv -1 -1 -1 entropy-nopriv || die "failed to create entropy-nopriv user"
}
src_install() {
installation() {
emake DESTDIR="${D}" LIBDIR="usr/lib" PYTHON_SITEDIR="$(python_get_sitedir)" \
install || die "make install failed"
python_optimize
}
python_foreach_impl installation
}
pkg_preinst() {
local pyc=${EROOT}/usr/lib/entropy/lib/kswitch/__init__.pyc
rm -fv "${pyc}"
}
pkg_postinst() {
for ex_conf in "${REPO_D_CONFPATH}"/_entropy_sabayon-limbo.example; do
real_conf="${ex_conf%.example}"
if [ -f "${real_conf}" ] || [ -f "${real_conf/_}" ]; then
# skip installation then
continue
fi
elog "Installing: ${real_conf}"
cp "${ex_conf}" "${real_conf}" -p
done
# Copy config files over
for cfg in "${PACKAGE_MASK_CONFPATH}" "${PACKAGE_UNMASK_CONFPATH}" "${REPO_CONFPATH}"; do
if [ -f "${cfg}.example" ] && [ ! -f "${cfg}" ]; then
elog "Copying ${cfg}.example over to ${cfg}"
cp -p "${cfg}.example" "${cfg}"
fi
done
if [ -d "${ENTROPY_CACHEDIR}" ]; then
einfo "Purging current Entropy cache"
rm -rf "${ENTROPY_CACHEDIR}"/*
fi
# Fixup Entropy Resources Lock, and /etc/entropy/packages
# files permissions. This fixes unprivileged Entropy Library usage
local res_file="${ROOT}"/var/lib/entropy/client/database/*/.using_resources
if [ -f "${res_file}" ]; then
chown root:entropy "${res_file}"
chmod g+rw "${res_file}"
chmod o+r "${res_file}"
fi
local pkg_files="package.mask package.unmask package.mask.d package.unmask.d"
local pkg_file
for pkg_file in ${pkg_files}; do
pkg_file="${ROOT}/etc/entropy/packages/${pkg_file}"
recursive=""
if [ -d "${pkg_file}" ]; then
recursive="-R"
fi
if [ -e "${pkg_file}" ]; then
chown ${recursive} root:entropy "${pkg_file}"
chmod ${recursive} go+r "${pkg_file}"
fi
done
# Setup Entropy Library directories ownership
chown root:entropy "${ROOT}/var/lib/entropy" # no recursion
chown root:entropy "${ROOT}/var/lib/entropy/client/packages" # no recursion
chown root:entropy "${ROOT}/var/log/entropy" # no recursion
elog "If you want to enable Entropy packages delta download support, please"
elog "install dev-util/bsdiff."
}

View File

@@ -0,0 +1,36 @@
From b9e17e16cd55a43af90ab310380085911c131565 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Nizio?= <slawomir.nizio@sabayon.org>
Date: Tue, 17 Mar 2020 19:45:26 +0100
Subject: [PATCH] [entropy.client] fix equo pkg quickpkg
- Python 3 fix
- re-encoding the path actually made it skip files with funny names
---
lib/entropy/client/interfaces/methods.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git lib/entropy/client/interfaces/methods.py lib/entropy/client/interfaces/methods.py
index 487a61d1b..89a45bb0e 100644
--- lib/entropy/client/interfaces/methods.py
+++ lib/entropy/client/interfaces/methods.py
@@ -2215,16 +2215,13 @@ class MiscMixin:
# collect files
for orig_path in contents:
- # convert back to filesystem str
- encoded_path = orig_path
- orig_path = const_convert_to_rawstring(orig_path)
strip_orig_path = orig_path.lstrip(os.path.sep)
path = os.path.join(shiftpath, strip_orig_path)
try:
exist = os.lstat(path)
except OSError:
continue # skip file
- ftype = entropy_package_metadata['content'][encoded_path]
+ ftype = entropy_package_metadata['content'][orig_path]
if str(ftype) == '0':
# force match below, '0' means databases without ftype
ftype = 'dir'
--
2.24.1

View File

@@ -0,0 +1,43 @@
From 08da648a202d3c8587fedf7ef83f557fef41e2d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Nizio?= <slawomir.nizio@sabayon.org>
Date: Wed, 18 Dec 2019 22:20:29 +0100
Subject: [PATCH] [entropy.client] fixes for "dictionary changed size during
iteration"
---
lib/entropy/client/interfaces/db.py | 4 ++--
lib/entropy/client/interfaces/dep.py | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git lib/entropy/client/interfaces/db.py lib/entropy/client/interfaces/db.py
index 7e7856e65..2a03580da 100644
--- lib/entropy/client/interfaces/db.py
+++ lib/entropy/client/interfaces/db.py
@@ -2564,8 +2564,8 @@ class MaskableRepository(EntropyRepositoryBase):
# if we get here, it means we didn't find a match in repositories
# so we scan packages, last chance
- for keyword in keyword_pkg.keys():
- # use .keys() because keyword_pkg gets modified during iteration
+ for keyword in list(keyword_pkg.keys()):
+ # use list() because keyword_pkg gets modified during iteration
# first of all check if keyword is in mykeywords
if keyword not in mykeywords:
diff --git lib/entropy/client/interfaces/dep.py lib/entropy/client/interfaces/dep.py
index 52bc611c1..ecbae5e4d 100644
--- lib/entropy/client/interfaces/dep.py
+++ lib/entropy/client/interfaces/dep.py
@@ -2855,7 +2855,8 @@ class CalculatorsMixin:
change = False
# now try to deeply remove unused packages
# iterate over a copy
- for pkg_match in deep_dep_map.keys():
+ # list() because the dict gets modified in setup_revdeps()
+ for pkg_match in list(deep_dep_map.keys()):
deep_dep_map[pkg_match] -= flat_dep_tree
if (not deep_dep_map[pkg_match]) and \
(pkg_match not in flat_dep_tree):
--
2.23.0

View File

@@ -0,0 +1,44 @@
From c06eb76644b1edfcfd614a279fa77a1278e717b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Nizio?= <slawomir.nizio@sabayon.org>
Date: Sun, 9 Feb 2020 22:18:26 +0100
Subject: [PATCH] [entropy.server] gpg related fix for Python 3
With Python 3, data in sqlite from packagesignatures.gpg column was binary on
read (because it was binary on write) but a string was actually required.
The problem was visible with GPG signed packages: when injected into database
using eit with Python 3, it would then explode during equo update/install on
client side.
error from Python 2:
File "/usr/lib64/python2.7/site-packages/entropy/client/interfaces/package/actions/fetch.py", line 1063, in do_signatures_validation
if hash_val in signatures:
TypeError: writable buffers are not hashable
error from Python 3:
File "/usr/lib64/python3.6/site-packages/entropy/client/interfaces/package/actions/fetch.py", line 1023, in do_compare_gpg
tmp_f.write(hash_val)
TypeError: write() argument must be str, not bytes
---
lib/entropy/server/interfaces/main.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git lib/entropy/server/interfaces/main.py lib/entropy/server/interfaces/main.py
index 4a7103ff6..cac4fdb7e 100644
--- lib/entropy/server/interfaces/main.py
+++ lib/entropy/server/interfaces/main.py
@@ -7126,7 +7126,8 @@ class Server(Client):
return None
gpg_sign_path = repo_sec.sign_file(repo, pkg_path)
# read file content and add to 'gpg' signature
- with open(gpg_sign_path, "rb") as gpg_f:
+ enc = etpConst['conf_encoding']
+ with codecs.open(gpg_sign_path, "r", encoding = enc) as gpg_f:
gpg_signature = gpg_f.read()
os.remove(gpg_sign_path)
return gpg_signature
--
2.24.1

View File

@@ -0,0 +1,28 @@
From 0869912ec4c630d2946e835b2585367e233c1c15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Nizio?= <slawomir.nizio@sabayon.org>
Date: Wed, 12 Feb 2020 21:44:01 +0100
Subject: [PATCH] [entropy.spm] Rigo related Python 3 fix
File "/usr/lib64/python3.6/site-packages/entropy/spm/plugins/interfaces/portage_plugin/__init__.py", line 101, in _pusher
self._std.buffer.write(chunk)
AttributeError: 'FakeOutFile' object has no attribute 'buffer'
---
lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py
index a23e46290..d6d624fb0 100644
--- lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py
+++ lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py
@@ -97,7 +97,7 @@ class StdoutSplitter(object):
break
raise
try:
- if const_is_python3():
+ if const_is_python3() and isinstance(self._std, io.TextIOWrapper):
self._std.buffer.write(chunk)
else:
self._std.write(chunk)
--
2.24.1

View File

@@ -0,0 +1,43 @@
(part of the commit)
From 8700aade27cb4117bf102afc7bd22ba6acfd8aa8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Nizio?= <slawomir.nizio@sabayon.org>
Date: Tue, 11 Feb 2020 22:25:08 +0100
Subject: [PATCH] [entropy.spm, rigo] Rigo related Python 3 fixes
1)
File "/usr/lib/python-exec/python3.6/RigoDaemon_app.py", line 362, in _pusher
fobj.write(chunk)
TypeError: write() argument must be str, not bytes
2)
File "/usr/lib64/python3.6/site-packages/entropy/spm/plugins/interfaces/portage_plugin/__init__.py", line 77, in __init__
self.buffer = Writer(self, self._std.buffer)
AttributeError: 'FakeOutFile' object has no attribute 'buffer'
---
lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py | 4 +++-
rigo/RigoDaemon/app/RigoDaemon_app.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py
index 83dca0b6e..a23e46290 100644
--- lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py
+++ lib/entropy/spm/plugins/interfaces/portage_plugin/__init__.py
@@ -10,6 +10,7 @@
"""
import os
+import io
import errno
import bz2
import hashlib
@@ -74,7 +75,8 @@ class StdoutSplitter(object):
self._buf.flush()
self._parent.flush()
- self.buffer = Writer(self, self._std.buffer)
+ if isinstance(self._std, io.TextIOWrapper):
+ self.buffer = Writer(self, self._std.buffer)
def __iter__(self):
return self._std

View File

@@ -0,0 +1,100 @@
(part of)
commit 0019b6e68af9bda8b368a7073e5eb927607f00e2
Author: Sławomir Nizio <slawomir.nizio@sabayon.org>
Date: Sat Mar 21 22:08:50 2020 +0100
[entropy.misc, rigo] fix file-like objects with Python 3
FakeOutFile and LogFile need .buffer like Python 3 "text" file objects
which is needed when in rigo standard output/error is replaced, and then
it reaches Portage which does this:
if sys.hexversion >= 0x3000000 and fd in (sys.stdout, sys.stderr):
fd = fd.buffer
fd.write(mystr)
(/usr/lib64/python3.6/site-packages/portage/util/__init__.py).
Entropy internal code did not need this.
Note, after this commit, changes done previously:
1)
commit 0869912ec4c630d2946e835b2585367e233c1c15
[entropy.spm] Rigo related Python 3 fix
File "/usr/lib64/python3.6/site-packages/entropy/spm/plugins/interfaces/portage_plugin/__init__.py", line 101, in _pusher
self._std.buffer.write(chunk)
AttributeError: 'FakeOutFile' object has no attribute 'buffer'
2)
commit 8700aade27cb4117bf102afc7bd22ba6acfd8aa8
[entropy.spm, rigo] Rigo related Python 3 fixes
1)
File "/usr/lib/python-exec/python3.6/RigoDaemon_app.py", line 362, in _pusher
fobj.write(chunk)
TypeError: write() argument must be str, not bytes
2)
File "/usr/lib64/python3.6/site-packages/entropy/spm/plugins/interfaces/portage_plugin/__init__.py", line 77, in __init__
self.buffer = Writer(self, self._std.buffer)
AttributeError: 'FakeOutFile' object has no attribute 'buffer'
(...)
could be likely reverted; not tested, it could be better to have them anyway to
avoid futher re/encoding/checks if conversions are needed (subjective).
Fixes bug 5899.
diff --git lib/entropy/misc.py lib/entropy/misc.py
index bb4a94af8..d216bd693 100644
--- lib/entropy/misc.py
+++ lib/entropy/misc.py
@@ -35,7 +35,8 @@ import threading
from collections import deque
from entropy.const import etpConst, const_isunicode, \
- const_isfileobj, const_convert_log_level, const_setup_file
+ const_isfileobj, const_convert_log_level, const_setup_file, \
+ const_convert_to_unicode
from entropy.exceptions import EntropyException
import entropy.tools
@@ -1665,6 +1666,24 @@ class FastRSS(object):
const_setup_file(self.__file, etpConst['entropygid'], 0o664)
+class FileobjCompatBuffer:
+
+ """
+ Compatibility shim for file object with the buffer attribute.
+ To be used with classes whose write method expect strings.
+ """
+
+ def __init__(self, parent):
+ self._parent = parent
+
+ def write(self, msg):
+ msg_str = const_convert_to_unicode(msg)
+ self._parent.write(msg_str)
+
+ def flush(self):
+ self._parent.flush()
+
+
class LogFile:
""" Entropy simple logging interface, works as file object """
@@ -1715,6 +1734,9 @@ class LogFile:
LogFile.DATE_FORMAT))
self.__logger.addHandler(self.__handler)
+ if const_is_python3():
+ self.buffer = FileobjCompatBuffer(self)
+
def __enter__(self):
"""
Just return self, configuration is done in __init__

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>mudler@gentoo.org</email>
<name>Ettore Di Giacinto</name>
<description>Assign bugs to him</description>
</maintainer>
<maintainer type="person">
<email>skullbocks@sabayon.org</email>
<name>Francesco Ferretti</name>
</maintainer>
<maintainer type="person">
<email>lxnay@gentoo.org</email>
<name>Fabio Erculiani</name>
<description>CC on bugs</description>
</maintainer>
</pkgmetadata>