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,2 @@
EBUILD entropy-server-325-r1.ebuild 936 BLAKE2B 1997a88d907a7da9ad6683476f6dab434954ad26abcfbfb0315b7d897b884d4617ce08c307c110e2aeea67e9892cd31d33d44bf0a840479c6fc42c897bf0401f SHA512 d2adda2dc7bcbfd0340d9b320079ce3fdf0b1764e7282ede8161a41b21f76cdf07073b6af3240aeca1116930f226fbed1ba714ab84aa8b60ea0bb609e71aff4f
MISC metadata.xml 633 BLAKE2B abe63152fb6184baf743d4e5c67bc14092c42bd58313357573cb107f6fd8522f3e93eab35024ed254c1707503bc55ee0a99ec06599db3546ca7abb0b852580d7 SHA512 739cf74e2e56e178616c4b8e205e7bd21aabb30ea845eb006f18070ad2fee9b532d64b0fa84cf17ac390ab6b64dc67e87b752aa719ea9bc5942b1a013db980fd

View File

@@ -0,0 +1,39 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_6 python3_7 python3_8 python3_9 )
inherit eutils python-r1 bash-completion-r1 git-r3
DESCRIPTION="Entropy Package Manager server-side tools"
HOMEPAGE="http://www.sabayon.org"
LICENSE="GPL-2"
EGIT_REPO_URI=https://github.com/Sabayon/entropy.git
EGIT_COMMIT=${PV}
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="+matter"
S="${WORKDIR}/${P}/server"
RDEPEND="~sys-apps/entropy-${PV}[${PYTHON_USEDEP}]
matter? ( ~app-admin/matter-${PV}[${PYTHON_USEDEP},entropy] )
${PYTHON_DEPS}
"
DEPEND="app-text/asciidoc"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_install() {
installation() {
emake DESTDIR="${D}" PYTHON_SITEDIR="$(python_get_sitedir)" install
python_optimize
}
python_foreach_impl installation
python_replicate_script "${ED}usr/bin/eit"
newbashcomp "${S}/eit-completion.bash" eit
}

View File

@@ -0,0 +1,21 @@
<?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>
<use>
<flag name="matter">Pull in app-admin/matter</flag>
</use>
</pkgmetadata>

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>

View File

@@ -0,0 +1,2 @@
EBUILD magneto-core-325-r1.ebuild 838 BLAKE2B c012b2d248590218241875e9237738ed5f3a2bbfd0a59e033b6770b00f6594e5bdeb8d2abe3ce33425b309ecfc8be396447d7befbdd42dfd4b5e59271f7786dc SHA512 782cc12bcbc32df52687b1d4a46cddc2a664b20b429c2cbcacf90d016a45c06898a4af987f2ad176a697a16e3f8b472d6d563a9a7c0743e6a9fdf5c5dd56d7a5
MISC metadata.xml 599 BLAKE2B 35d3731aa343c99413b172d14a9a67cdaecb4ab5986e7035a4e3f7eaf029b1c601621712ef47a536e8572bcdb6294f70ce3ff4a6557db2e9986f2285da64b5ac SHA512 fb7694d3986a3c7228f3ff9be42f1d1387f00e7702e943514d7a4943c7e75419b3dc10e88a5893153b945edf6b07c8bcf5a500096694648bbc0ee2ce1450df81

View File

@@ -0,0 +1,37 @@
# 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 )
inherit eutils python-r1 multilib git-r3
DESCRIPTION="Entropy Package Manager notification applet library"
HOMEPAGE="http://www.sabayon.org"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
EGIT_REPO_URI=https://github.com/Sabayon/entropy.git
EGIT_COMMIT=${PV}
S="${WORKDIR}/${P}/magneto"
DEPEND="~sys-apps/rigo-daemon-${PV}[${PYTHON_USEDEP}]
${PYTHON_DEPS}"
RDEPEND="${DEPEND}
x11-misc/xdg-utils"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_install() {
installation() {
emake DESTDIR="${D}" LIBDIR="usr/lib" PYTHON_SITEDIR="$(python_get_sitedir)" \
magneto-core-install
python_optimize
}
python_foreach_impl installation
}

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>

View File

@@ -0,0 +1,4 @@
AUX 0001-entropy.spm-rigo-Rigo-related-Python-3-fixes.patch 1542 BLAKE2B f093f06f244d44f85854d7c633de442dfd21909568278ed8d956fbdaef2935f2aff8f8c41b8baeb4ea8da3b44fc1f4122b7db4fb1dbb9dcf2d84208868692921 SHA512 bbb4228547cf1d7f0825d0187d6880b43e4253795c801eb579d30431fdf90bc88024c57cec42f5f752724763e0016d04e9ef78ef149673cc87343c81b77e7111
AUX fileobjs-rigo.patch 2980 BLAKE2B 924913acb7c36ae8692b31a151dcbe1b8e14b04674715d2f70256b735e0c79155c9d4bd4b985b0f5745bffc03ecaef593add18bbc3e83504b96ec8ba70adf524 SHA512 aae5987dd5ae9b35d89bca07540cd41c4f3bdb65a214389036980a131167242af6f5b4682e3d0f2622fba795fe7ce238594eade8dae2766ee7dc28215e313819
EBUILD rigo-daemon-325-r1.ebuild 992 BLAKE2B 6b2467484540e5c74eafeaae32c26416fa9f54355f0c850c4ce72d160594fa2e2ec8578f3cf8681695ec2f7b88a7064121e83791651829a0118e224850923c33 SHA512 d12f9047437d143f540160b25ea5509db3be6d49e500fefc4fe66b2f75e0afd917497ccb3535cf22ec7d1f695ed3f4b55c32d330b7b07c89c5becb14a18facc0
MISC metadata.xml 599 BLAKE2B 35d3731aa343c99413b172d14a9a67cdaecb4ab5986e7035a4e3f7eaf029b1c601621712ef47a536e8572bcdb6294f70ce3ff4a6557db2e9986f2285da64b5ac SHA512 fb7694d3986a3c7228f3ff9be42f1d1387f00e7702e943514d7a4943c7e75419b3dc10e88a5893153b945edf6b07c8bcf5a500096694648bbc0ee2ce1450df81

View File

@@ -0,0 +1,37 @@
(part of the commit below)
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 rigo/RigoDaemon/app/RigoDaemon_app.py rigo/RigoDaemon/app/RigoDaemon_app.py
index bc89ea0f1..39c4aeefe 100755
--- a/app/RigoDaemon_app.py
+++ b/app/RigoDaemon_app.py
@@ -3158,7 +3158,7 @@ class RigoDaemonService(dbus.service.Object):
"enqueue_application_action: "
"busied, but cannot remove previous path")
try:
- fobj = os.fdopen(tmp_fd, "w")
+ fobj = os.fdopen(tmp_fd, "wb")
except OSError as err:
write_output(
"enqueue_application_action: "
--
2.24.1

View File

@@ -0,0 +1,75 @@
(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 a/app/RigoDaemon_app.py b/app/RigoDaemon_app.py
index 39c4aeefe..33b45e5b8 100755
--- a/app/RigoDaemon_app.py
+++ b/app/RigoDaemon_app.py
@@ -79,7 +79,7 @@ from entropy.exceptions import DependenciesNotFound, \
EntropyPackageException, InterruptError, RepositoryError
from entropy.i18n import _
from entropy.misc import LogFile, ParallelTask, TimeScheduled, \
- ReadersWritersSemaphore
+ ReadersWritersSemaphore, FileobjCompatBuffer
from entropy.fetchers import UrlFetcher, MultipleUrlFetcher
from entropy.output import TextInterface, purple, teal
from entropy.client.interfaces import Client
@@ -340,6 +340,10 @@ class FakeOutFile(object):
self._app_mgmt_mutex = app_mgmt_mutex
self._app_mgmt_notes = app_mgmt_notes
self._rfd, self._wfd = os.pipe()
+
+ if const_is_python3():
+ self.buffer = FileobjCompatBuffer(self)
+
task = ParallelTask(self._pusher)
task.name = "FakeOutFilePusher"
task.daemon = True

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>

View File

@@ -0,0 +1,41 @@
# Copyright 1999-2020 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 )
inherit eutils python-r1 git-r3
MY_PN="RigoDaemon"
DESCRIPTION="Entropy Client DBus Services, aka RigoDaemon"
HOMEPAGE="http://www.sabayon.org"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
EGIT_REPO_URI=https://github.com/Sabayon/entropy.git
EGIT_COMMIT=${PV}
S="${WORKDIR}/${P}/rigo/RigoDaemon"
DEPEND="${PYTHON_DEPS}"
RDEPEND="${PYTHON_DEPS}
dev-python/dbus-python[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
~sys-apps/entropy-${PV}[${PYTHON_USEDEP}]
sys-auth/polkit[introspection]
sys-devel/gettext"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_install() {
installation() {
emake DESTDIR="${D}" PYTHON_SITEDIR="$(python_get_sitedir)" install
python_optimize
}
python_foreach_impl installation
python_replicate_script "${ED}usr/libexec/RigoDaemon_app.py"
}