update 1password & google-cloud-cli-bin

This commit is contained in:
Jared Allard 2025-02-05 14:15:13 -08:00
parent 47e794c2f9
commit 5055f3dd67
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
5 changed files with 140 additions and 0 deletions

View file

@ -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 <<EOF
$(cat "${D}/opt/1Password/com.1password.1Password.policy.tpl")
EOF" >"${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
}

View file

@ -1,2 +1,4 @@
DIST 1password-8.10.58-amd64.tar.gz 204563816 BLAKE2B 0a11f8772e8a4415e18fad3d5170d8658733b5a6b246ce6bf0fcd3ade0f4f6b5d7196ce4f7d4abe8d227417d5faa6c400cd62d57da0d041a24f04aeb6d851ff9 SHA512 1f152b23c501189b9f313633ebc131064ff04edae54c776a519e3f4774e0fca70666dfc5dd9689d38221119c4ce41fae2acfcf3aae6f7b23255dd22d906f32f1 DIST 1password-8.10.58-amd64.tar.gz 204563816 BLAKE2B 0a11f8772e8a4415e18fad3d5170d8658733b5a6b246ce6bf0fcd3ade0f4f6b5d7196ce4f7d4abe8d227417d5faa6c400cd62d57da0d041a24f04aeb6d851ff9 SHA512 1f152b23c501189b9f313633ebc131064ff04edae54c776a519e3f4774e0fca70666dfc5dd9689d38221119c4ce41fae2acfcf3aae6f7b23255dd22d906f32f1
DIST 1password-8.10.58-arm64.tar.gz 202181174 BLAKE2B 06c875762ddeadca0521d534c76197f23ce739bb39a3ad3583024272ef42bcd66c9ae6b004f89c9c490ad49a634e0e174ff56977261325f63a4fcb942941b906 SHA512 3565a264bae200bdcffe90d4e3f5545301da79b210ec4fb17cb058c25ead9295185ff638730c44179e8eb776f4623baa3de631751e80e0e46472bd079f93100b DIST 1password-8.10.58-arm64.tar.gz 202181174 BLAKE2B 06c875762ddeadca0521d534c76197f23ce739bb39a3ad3583024272ef42bcd66c9ae6b004f89c9c490ad49a634e0e174ff56977261325f63a4fcb942941b906 SHA512 3565a264bae200bdcffe90d4e3f5545301da79b210ec4fb17cb058c25ead9295185ff638730c44179e8eb776f4623baa3de631751e80e0e46472bd079f93100b
DIST 1password-8.10.60-amd64.tar.gz 204600746 BLAKE2B 703a17916a8f748b0163a1e6828f7e158b8878f05c4788cc09103fb0ea51259c5bc6052165b1c94ae9997a53f8f04841239deae122024db51dc444bbe87e10b8 SHA512 18ae88975866f1a6d931a7cd6fd809654c244f6e55ec1c42f88c94c4851fa00af2d2fff40c1cbaa11f0dbef536b50394591c0a77e063121de155dec8dee0ab86
DIST 1password-8.10.60-arm64.tar.gz 202213853 BLAKE2B 8c45d0b1503c4690d0e81e1f937aa592df2bdee184681dd739a71e20bbb4f7278d8a207fc75504afd2397692dd4a425fe60e06c97daa67d92eecfa611ac55c39 SHA512 efde99f326ea27e78e55d076aef6c364859687ed2314cdae6a88f477a4768746c5dd826a006a850f2273bfacbdde0225c06bafac9f43d022520d749857a59ac9

View file

@ -1,2 +1,4 @@
DIST google-cloud-cli-508.0.0-linux-arm.tar.gz 54936146 BLAKE2B beb0c46646b51f9f8c1762e14c6d179a3e52b5bcadf2aa07bde0de72be3ba8b2f190cd6f6279cbb4ec64a38959b65f5dcba20aa00720c57e724855af53443597 SHA512 eb90df0266c1bbee64f27acff9f01313a1d3c72660b3df30784bb07ae557ee9ada7b726833ee0de1beadb3e7dca94328b5b508f526c0e40259e0ec09d26c3514 DIST google-cloud-cli-508.0.0-linux-arm.tar.gz 54936146 BLAKE2B beb0c46646b51f9f8c1762e14c6d179a3e52b5bcadf2aa07bde0de72be3ba8b2f190cd6f6279cbb4ec64a38959b65f5dcba20aa00720c57e724855af53443597 SHA512 eb90df0266c1bbee64f27acff9f01313a1d3c72660b3df30784bb07ae557ee9ada7b726833ee0de1beadb3e7dca94328b5b508f526c0e40259e0ec09d26c3514
DIST google-cloud-cli-508.0.0-linux-x86_64.tar.gz 132717763 BLAKE2B cfaf7fc605fe24144e521e9d729dd6b7ff42aa08e7f6f3e2447ac0e35ce835b1738e1b96682c90e27a6a6dbdf2512885c69c1cefaa6cbff45f0bf512e9bcf5fd SHA512 b63a468816bc0447fdbe950b14c7be02000c8d8a74bba572644323ca9a935046016b85cdf97af3651b9624c743ef7dee8b068642b100aa9fe5534bb345f71422 DIST google-cloud-cli-508.0.0-linux-x86_64.tar.gz 132717763 BLAKE2B cfaf7fc605fe24144e521e9d729dd6b7ff42aa08e7f6f3e2447ac0e35ce835b1738e1b96682c90e27a6a6dbdf2512885c69c1cefaa6cbff45f0bf512e9bcf5fd SHA512 b63a468816bc0447fdbe950b14c7be02000c8d8a74bba572644323ca9a935046016b85cdf97af3651b9624c743ef7dee8b068642b100aa9fe5534bb345f71422
DIST google-cloud-cli-509.0.0-linux-arm.tar.gz 55119113 BLAKE2B f01453f7cb9d3e758d8b701be5fc505f474dffb72fc7f77c19a0159085658632dd9ae155beb6d9cb66dcd6bcaf400e51f413c3270a14d4a53c60e95da09455d9 SHA512 66b973fc4f5550f631feaee408c0dc39925ab6e533575161921cce34b23fa1d9cd47c7351ff91ef174b89840c8648a79154bd1425a729613918bedde3a148f39
DIST google-cloud-cli-509.0.0-linux-x86_64.tar.gz 148442771 BLAKE2B 6ab4f338010b6f3ea840eb492a49915fd43c5462d8bc0b732763857ce078b81a19141a71d29c0d71c10b0518804818ba47decf0a5e6f9fbf352e06473460f9f8 SHA512 69fe1f426dbd009732ec4732c010cc22c4e992b7be89b006fb76cda52d8989edbe5febcc463d6765455b6a6d376123803211bd5eaa2bc95defb97c1102775492

View file

@ -0,0 +1,59 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} python3_13t )
inherit python-single-r1
DESCRIPTION="Interact with the Google Cloud Platform"
HOMEPAGE="https://cloud.google.com/cli"
SITE="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"
SRC_URI="
amd64? ( ${SITE}/google-cloud-cli-${PV}-linux-x86_64.tar.gz )
arm64? ( ${SITE}/google-cloud-cli-${PV}-linux-arm.tar.gz )
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE="anthoscli"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="
virtual/libcrypt:=
${PYTHON_DEPS}
"
RDEPEND="${DEPEND}"
RESTRICT="bindist mirror strip"
S="${WORKDIR}/google-cloud-sdk"
src_prepare() {
default
rm -rf deb rpm install.*
rm -rf "platform/gsutil/third_party/crcmod_osx"
rm -rf "platform/bundledpythonunix"
find -type d -name "python2" -prune -exec rm -rf "{}" \;
use anthoscli || rm bin/anthoscli
python_fix_shebang --force .
}
src_install() {
dodir /usr/share/google-cloud-sdk
cp -R "${S}/" "${ED}/usr/share/" || die "Install failed!"
dosym "../share/google-cloud-sdk/bin/gcloud" /usr/bin/gcloud
dosym "../share/google-cloud-sdk/bin/gcloud-crc32c" /usr/bin/gcloud-crc32c
dosym "../share/google-cloud-sdk/bin/gsutil" /usr/bin/gsutil
dosym "../share/google-cloud-sdk/bin/bq" /usr/bin/bq
dosym "../share/google-cloud-sdk/bin/docker-credential-gcloud" /usr/bin/docker-credential-gcloud
dosym "../share/google-cloud-sdk/bin/git-credential-gcloud.sh" /usr/bin/git-credential-gcloud.sh
use anthoscli && dosym "../share/google-cloud-sdk/bin/anthoscli" /usr/bin/anthoscli
python_optimize "${ED}/usr/share/google-cloud-sdk"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB