Gentoo Archives: gentoo-proxy-maint

From: "Michał Górny" <mgorny@g.o>
To: "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>, gentoo-proxy-maint@l.g.o
Subject: Re: [gentoo-proxy-maint] [PATCH] www-plugins/passff-host: Fix for firefox-bin with no-symlink-lib
Date: Fri, 28 Jun 2019 10:13:30
Message-Id: 4daece2a24969a5c8b529e743900c2fca9307a8c.camel@gentoo.org
In Reply to: Re: [gentoo-proxy-maint] [PATCH] www-plugins/passff-host: Fix for firefox-bin with no-symlink-lib by "Haelwenn (lanodan) Monnier"
1 On Fri, 2019-06-28 at 12:09 +0200, Haelwenn (lanodan) Monnier wrote:
2 > [2019-06-28 10:31:51+0200] Michał Górny:
3 > > On Fri, 2019-06-28 at 08:48 +0200, Haelwenn (lanodan) Monnier wrote:
4 > > > Closes: https://bugs.gentoo.org/show_bug.cgi?id=687746
5 > > > Signed-off-by: Haelwenn (lanodan) Monnier <contact@×××××××××.me>
6 > > > ---
7 > > > ...sff-host-1.2.0.ebuild => passff-host-1.2.0-r1.ebuild} | 9 ++++++++-
8 > > > 1 file changed, 8 insertions(+), 1 deletion(-)
9 > > > rename www-plugins/passff-host/{passff-host-1.2.0.ebuild => passff-host-1.2.0-r1.ebuild} (84%)
10 > > >
11 > > > diff --git a/www-plugins/passff-host/passff-host-1.2.0.ebuild b/www-plugins/passff-host/passff-host-1.2.0-r1.ebuild
12 > > > similarity index 84%
13 > > > rename from www-plugins/passff-host/passff-host-1.2.0.ebuild
14 > > > rename to www-plugins/passff-host/passff-host-1.2.0-r1.ebuild
15 > > > index f42fb96ba19..75bebf643b8 100644
16 > > > --- a/www-plugins/passff-host/passff-host-1.2.0.ebuild
17 > > > +++ b/www-plugins/passff-host/passff-host-1.2.0-r1.ebuild
18 > > > @@ -1,52 +1,59 @@
19 > > > # Copyright 2018-2019 Gentoo Authors
20 > > > # Distributed under the terms of the GNU General Public License v2
21 > > >
22 > > > EAPI=7
23 > > >
24 > > > PYTHON_COMPAT=( python3_5 python3_6 python3_7 )
25 > > >
26 > > > inherit python-single-r1
27 > > >
28 > > > DESCRIPTION="Host app for the PassFF WebExtension"
29 > > > HOMEPAGE="https://github.com/passff/passff-host"
30 > > >
31 > > > SRC_URI="
32 > > > https://github.com/passff/passff-host/releases/download/${PV}/passff.py -> ${P}.py
33 > > > https://github.com/passff/passff-host/releases/download/${PV}/passff.json -> ${P}.json
34 > > > "
35 > > >
36 > > > LICENSE="GPL-2"
37 > > > SLOT="0"
38 > > > KEYWORDS="~amd64 ~x86"
39 > > > IUSE="chrome chromium firefox vivaldi"
40 > > > REQUIRED_USE="|| ( chrome chromium firefox vivaldi )"
41 > > >
42 > > > S="${WORKDIR}"
43 > > >
44 > > > src_unpack() {
45 > > > cp "${DISTDIR}/${P}.json" . || die
46 > > > cp "${DISTDIR}/${P}.py" . || die
47 > > > }
48 > > >
49 > > > src_prepare() {
50 > > > default
51 > > > python_fix_shebang "${P}.py"
52 > > > }
53 > > >
54 > > > src_install() {
55 > > > local target_dirs=()
56 > > >
57 > > > use chrome && target_dirs+=( "/etc/opt/chrome/native-messaging-hosts" )
58 > > > use chromium && target_dirs+=( "/etc/chromium/native-messaging-hosts" )
59 > > > - use firefox && target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" )
60 > > > + if use firefox; then
61 > > > + target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" )
62 > > > +
63 > > > + # firefox-bin compatibility
64 > > > + if [[ "$(get_libdir)" != "lib" ]]; then
65 > > > + target_dirs+=( "/usr/lib/mozilla/native-messaging-hosts" )
66 > > > + fi
67 > > > + fi
68 > >
69 > > Wouldn't this break the migration? I think this will cause unsymlink-
70 > > lib to detect collision if this package is installed before the switch.
71 >
72 > Ah, yes it does, tried on a fresh chroot and I get this message when
73 > running `unsymlink-lib --analyze`:
74 >
75 > One or more files are both in /usr/lib/ and /usr/lib64/, making the conversion impossible.
76 >
77 > mozilla/native-messaging-hosts/passff.json
78 > mozilla/native-messaging-hosts/passff.py
79 >
80 > ---
81 >
82 > So do you have any recommendation for fixing this issue as it needs to
83 > be in both /usr/$(get_libdir) for www-client/firefox with
84 > SYMLINK_LIB=no and /usr/lib for www-client/firefox-bin.
85
86 I think some packages solve this by checking SYMLINK_LIB value
87 explicitly.
88
89 >
90 > Otherwise I guess I would file a bug report referencing
91 > https://bugs.gentoo.org/show_bug.cgi?id=687746 to get firefox-bin
92 > fixed instead or assign the maintainers to the bug.
93 >
94 > > > use vivaldi && target_dirs+=( "/etc/vivaldi/native-messaging-hosts" )
95 > > >
96 > > > for target_dir in "${target_dirs[@]}"; do
97 > > > sed "s;PLACEHOLDER;${target_dir}/passff.py;g" "${P}.json" > "passff.json" || die
98 > > >
99 > > > insinto "${target_dir}"
100 > > > doins passff.json
101 > > > exeinto "${target_dir}"
102 > > > newexe "${P}.py" passff.py
103 > > > done
104 > > > }
105 > >
106 > > --
107 > > Best regards,
108 > > Michał Górny
109
110 --
111 Best regards,
112 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-proxy-maint] [PATCH] www-plugins/passff-host: Fix for firefox-bin with no-symlink-lib "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>