diff --git a/app-admin/1password/1password-8.10.34.ebuild b/app-admin/1password/1password-8.10.34.ebuild new file mode 100644 index 0000000..0794b0c --- /dev/null +++ b/app-admin/1password/1password-8.10.34.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# shellcheck shell=bash + +EAPI=8 + +inherit desktop xdg + +DESCRIPTION="Password Manager" +HOMEPAGE="https://1password.com" +SRC_URI=" + amd64? ( https://downloads.1password.com/linux/tar/stable/x86_64/${PN}-${PV}.x64.tar.gz -> ${P}-amd64.tar.gz ) + arm64? ( https://downloads.1password.com/linux/tar/stable/aarch64/${PN}-${PV}.arm64.tar.gz -> ${P}-arm64.tar.gz )" + +LICENSE="all-rights-reserved" +KEYWORDS="amd64 arm64" +IUSE="policykit cli" +DEPEND=" +x11-misc/xdg-utils +acct-group/onepassword +policykit? ( sys-auth/polkit ) +cli? ( app-admin/op-cli-bin ) +" +RDEPEND="${DEPEND}" +SLOT="0" + +RESTRICT="bindist mirror strip" + +QA_PREBUILT="usr/bin/${MY_PN}" + +S="${WORKDIR}" + +src_prepare() { + default + xdg_environment_reset +} + +src_install() { + mkdir -p "${D}/opt/1Password/" + cp -ar "${S}/${PN}-"**"/"* "${D}/opt/1Password/" || die "Install failed!" + + # Fill in policy kit file with a list of (the first 10) human users of + # the system. + mkdir -p "${D}/usr/share/polkit-1/actions/" + 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 <"${D}/usr/share/polkit-1/actions/com.1password.1Password.policy" + chmod 644 "${D}/usr/share/polkit-1/actions/com.1password.1Password.policy" + + dosym /opt/1Password/1password /usr/bin/1password + dosym /opt/1Password/op-ssh-sign /usr/bin/op-ssh-sign + + dosym /opt/1Password/resources/1password.desktop "/usr/share/applications/${PN}.desktop" + newicon "${D}/opt/1Password/resources/icons/hicolor/512x512/apps/1password.png" "${PN}.png" + + dodoc "${D}/opt/1Password/resources/custom_allowed_browsers" +} + +pkg_postinst() { + # chrome-sandbox requires the setuid bit to be specifically set. + # See https://github.com/electron/electron/issues/17972 + chmod 4755 /opt/1Password/chrome-sandbox + + # This gives no extra permissions to the binary. It only hardens it against environmental tampering. + chgrp onepassword /opt/1Password/1Password-BrowserSupport + chmod g+s /opt/1Password/1Password-BrowserSupport + + xdg_pkg_postinst +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} diff --git a/app-admin/1password/Manifest b/app-admin/1password/Manifest index dbe1274..4d62f5d 100644 --- a/app-admin/1password/Manifest +++ b/app-admin/1password/Manifest @@ -1,2 +1,4 @@ +DIST 1password-8.10.34-amd64.tar.gz 191389023 BLAKE2B 6e58c961889d98a062d920861055d234d7916a4fee996518152f3281a08217df231e1b807f88b41ea8b1bdcc49536b8012ac76741f6814eebc4f8dffe194439c SHA512 91154248da31c3fe2185972421a0a63acbdd6e9d6097071584ec966845cdd112be05a5e3c2fa02c0a892f3f6d30fb1e112cbc8faa48794e9a602dffc19300dcc +DIST 1password-8.10.34-arm64.tar.gz 189902221 BLAKE2B f2f838ffd8248bba301bb4eb1f0435a383f0f0ebd00050908a4c08b0aade238c82fe25e687fbf5b8c61d566b5a17dcf3f7a15834c0f02c21a6442901006db328 SHA512 0d16c688b092763d87dec3a7dc66cae471320f47a8089010e42d297b9877f733cdcf0b2a5572bc25179efb9c4033f68969f8156938e2f6106ac439671be89d67 DIST 1password-8.10.36-amd64.tar.gz 193898712 BLAKE2B 8e22df57aac1519763c9c446d9c6a322f71b48609b0deb57b3ee43389badef6623b7a33417e3093e17f6fa9647302748ae883236123b1c44fbb5b829249d7594 SHA512 43f2e59f1450b3790bddb8efb65b3fd1d1f719aea469dbc8cc090339cb1cef3383cf908b75b7c1ed28da0d8d967b2818d57c4a31f33d75a7131707ae2d675026 DIST 1password-8.10.36-arm64.tar.gz 192293571 BLAKE2B bbab0545489f385e3f6f654db5fb39c07a8fea9e93cad32d149698bb11416e6e04079d65da7c59f447221e2c868c77859f96900bf910f832ef7cb2b039536b9c SHA512 7c5907167acab1c13ef45828293a37e81e86d20b39233f2e136b4056da791b30afd667a0aebf92859badca0b7666a24e02ba96de97e7ecca0ad5db44bd2acb16