From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 16229158089 for ; Wed, 18 Oct 2023 04:26:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 451912BC037; Wed, 18 Oct 2023 04:26:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B7D32BC036 for ; Wed, 18 Oct 2023 04:26:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 60F28335CA6 for ; Wed, 18 Oct 2023 04:26:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C24551185 for ; Wed, 18 Oct 2023 04:26:13 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1697603158.09d6fc876a52edee389a3473f102970420ad72a2.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/calibre/calibre-5.44.0-r2.ebuild X-VCS-Directories: app-text/calibre/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 09d6fc876a52edee389a3473f102970420ad72a2 X-VCS-Branch: master Date: Wed, 18 Oct 2023 04:26:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 09aed965-622c-405a-a016-d6494b6f18cb X-Archives-Hash: 35b19d3f2f44a3206d80391e256125fe commit: 09d6fc876a52edee389a3473f102970420ad72a2 Author: Eli Schwartz gmail com> AuthorDate: Mon Oct 2 05:29:10 2023 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Oct 18 04:25:58 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09d6fc87 app-text/calibre: remove outdated workarounds for xdg install steps I do not know what kbuildsyscoca is, other than "does not exist anymore"? So I am skeptical it is still relevant. I do know that it is no longer necessary to fake out xdg-utils programs, since I fixed this in 2019, as part of calibre 3.43.0; it now detects when we are running a DESTDIR install and refrains from running: - `xdg-desktop-menu forceupdate` - `xdg-mime` at all (instead it uses shutil.copyfile to copy over one file) and sets up the requisite $XDG_* variables to make the utils operate on a staged installation directory. Signed-off-by: Eli Schwartz gmail.com> Signed-off-by: Zac Medico gentoo.org> app-text/calibre/calibre-5.44.0-r2.ebuild | 36 +++---------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/app-text/calibre/calibre-5.44.0-r2.ebuild b/app-text/calibre/calibre-5.44.0-r2.ebuild index 35ad30fb7576..759f990001f0 100644 --- a/app-text/calibre/calibre-5.44.0-r2.ebuild +++ b/app-text/calibre/calibre-5.44.0-r2.ebuild @@ -163,18 +163,6 @@ src_prepare() { # -i src/calibre/constants.py || \ # die "sed failed to patch constants.py" - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py - # calls xdg-* (bug #258938). - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ - -e "s|, PreserveMIMEDefaults():|:|" \ - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ - -e "s|cmd\[2\]|cmd[4]|" \ - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ - -i src/calibre/linux.py || die "sed failed to patch linux.py" - # Disable unnecessary privilege dropping for bug #287067. sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ -i setup/install.py || die "sed failed to patch install.py" @@ -214,24 +202,8 @@ src_test() { } src_install() { - # Bypass kbuildsycoca and update-mime-database in order to - # avoid sandbox violations if xdg-mime tries to call them. - mkdir "${T}/bin" || die - cat - > "${T}/bin/kbuildsycoca" <<-EOF - #!${BASH} - echo $0 : $@ - exit 0 - EOF - - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die - export QMAKE="$(qt5_get_bindir)/qmake" - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox - # violation with kbuildsycoca as in bug #287067, comment #13. - export -n DISPLAY - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale # return _parse_localename(localename) @@ -244,10 +216,8 @@ src_install() { # Bug #295672 - Avoid sandbox violation in ~/.config by forcing # variables to point to our fake temporary $HOME. export HOME="${T}/fake_homedir" - export XDG_CONFIG_HOME="${HOME}/.config" - export XDG_DATA_HOME="${HOME}/.local/share" - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die + export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre" + mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die tc-export CC CXX # Bug #334243 - respect LDFLAGS when building extensions @@ -257,7 +227,7 @@ src_install() { addpredict /dev/dri #665310 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ + PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ "${PYTHON}" setup.py install \ --root="${D}" \ --prefix="${EPREFIX}/usr" \