commit: 2a5236ca46fc9d3df3c859af1690dc658b639278 Author: Mike Rivnak <rivnakm1 <AT> gmail <DOT> com> AuthorDate: Wed Oct 30 23:13:58 2024 +0000 Commit: Mike Rivnak <rivnakm1 <AT> gmail <DOT> com> CommitDate: Wed Oct 30 23:13:58 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2a5236ca
gui-apps/1password: install polkit policies Signed-off-by: Mike Rivnak <rivnakm1 <AT> gmail.com> gui-apps/1password/1password-8.10.48.ebuild | 95 +++++++++++++++++++++++++++++ gui-apps/1password/Manifest | 1 + 2 files changed, 96 insertions(+) diff --git a/gui-apps/1password/1password-8.10.48.ebuild b/gui-apps/1password/1password-8.10.48.ebuild new file mode 100644 index 000000000..dae27a716 --- /dev/null +++ b/gui-apps/1password/1password-8.10.48.ebuild @@ -0,0 +1,95 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit optfeature rpm xdg + +DESCRIPTION="The world’s most-loved password manager" +HOMEPAGE="https://1password.com" +SRC_URI="amd64? ( https://downloads.1password.com/linux/rpm/stable/x86_64/${P}.x86_64.rpm )" +S="${WORKDIR}" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+pam" + +RESTRICT="mirror strip test bindist" + +DEPEND=" + x11-misc/xdg-utils + acct-group/1password +" +RDEPEND=" + ${DEPEND} + app-accessibility/at-spi2-core:2 + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/mesa + net-print/cups + sys-apps/dbus + || ( + sys-apps/systemd-utils + sys-apps/systemd + ) + sys-auth/polkit + sys-libs/zlib + x11-libs/cairo + x11-libs/gtk+:3 + x11-libs/libdrm + x11-libs/libX11 + x11-libs/libxcb + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libxkbcommon + x11-libs/libXrandr + x11-libs/pango +" + +src_unpack() { + rpm_unpack ${P}.x86_64.rpm +} + +QA_PREBUILT="opt/1Password/*" + +src_install() { + # Fill in policy kit file with a list of (the first 10) human users of the system. + export POLICY_OWNERS + POLICY_OWNERS="$(cut -d: -f1,3 /etc/passwd \ + | grep -E ':[0-9]{4}$' \ + | cut -d: -f1 \ + | head -n 10 \ + | sed 's/^/unix-user:/' \ + | tr '\n' ' ')" + + eval "cat <<EOF +$(cat opt/1Password/com.1password.1Password.policy.tpl) +EOF" > ./com.1password.1Password.policy + rm opt/1Password/com.1password.1Password.policy.tpl + + insinto /usr/share/polkit-1/actions + doins com.1password.1Password.policy + + unset POLICY_OWNERS + + cp -ar opt "${ED}" || die "Install failed!" + cp -ar usr "${ED}" || die "Install failed!" + + fowners root:1password /opt/1Password/1Password-BrowserSupport || die + fperms 4755 /opt/1Password/chrome-sandbox + fperms 2755 /opt/1Password/1Password-BrowserSupport + + dosym -r /opt/1Password/1password /usr/bin/1password +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature "cli support" app-misc/1password-cli +} diff --git a/gui-apps/1password/Manifest b/gui-apps/1password/Manifest index 3bac72fa2..d658e9c3e 100644 --- a/gui-apps/1password/Manifest +++ b/gui-apps/1password/Manifest @@ -1 +1,2 @@ DIST 1password-8.10.28.x86_64.rpm 139002692 BLAKE2B 2c2713e7df8020ab348cbeefc094ec79239ab5481c38798f67f21b86eb49a0701c71b11b11a3f04fecaf04589bee6df8dfb80ee9a8aba8f6ab565187e5f351a7 SHA512 b6e24e7b4c2b2940e1d798ab162d71f8926a1f1ec6310d3112f44af35bb17d70602c4bafcb6ed7358ba10516d1991765089e7ee5231d3bea6935c4f359755095 +DIST 1password-8.10.48.x86_64.rpm 132173932 BLAKE2B f164bda036bfe045b68f2a95372a6bd544d52c8c0ef688192e4321dc102b277e83eb04afb437bba1ec0a9852670d9ee8f30c31a8bc0be6815d2b5ef11c3b3ccb SHA512 9455ad8fc045d463b69e8f8e1e6a04233bfd2ef780b09164441704015bcadf48d8d67717bf7aefbb39f386148f01454c375107d26ec618669cf97df2653acb09