1password-beta
This commit is contained in:
13 files changed
+174
-261
No files matched your search
@@ -0,0 +1,27 @@
|
||||
pkgbase = 1password-beta
|
||||
pkgdesc = Password manager and secure wallet
|
||||
pkgver = 8.12.12_43.BETA
|
||||
pkgrel = 43.1
|
||||
url = https://1password.com
|
||||
install = 1password.install
|
||||
arch = x86_64
|
||||
arch = aarch64
|
||||
license = LicenseRef-1Password-Proprietary
|
||||
conflicts = 1password
|
||||
conflicts = 1password-beta-bin
|
||||
options = !strip
|
||||
validpgpkeys = 3FEF9748469ADBE15DA7CA80AC2D62742012EA22
|
||||
source_x86_64 = https://downloads.1password.com/linux/tar/beta/x86_64/1password-8.12.12-43.BETA.x64.tar.gz
|
||||
source_x86_64 = https://downloads.1password.com/linux/tar/beta/x86_64/1password-8.12.12-43.BETA.x64.tar.gz.sig
|
||||
sha256sums_x86_64 = 74c9d8330f9e8316595d1d3710184ec8bde67518e9d27caec4befc7952a4947b
|
||||
sha256sums_x86_64 = 9b48e299bd2ba6aa034668261683494d5e1c3e1e465750adaa91e3d94e8e840d
|
||||
source_aarch64 = https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.12.12-43.BETA.arm64.tar.gz
|
||||
source_aarch64 = https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.12.12-43.BETA.arm64.tar.gz.sig
|
||||
sha256sums_aarch64 = 9e07b88d3f0cf17d8b475f2f1df65346720471fc558276dc1efbc025cbde6712
|
||||
sha256sums_aarch64 = 2bc26e69738bbfe78390574e40767e1fc028e289536f0b0ecb9e488a5bf12713
|
||||
|
||||
pkgname = 1password-beta
|
||||
depends = hicolor-icon-theme
|
||||
depends = libgtk-3.so=0
|
||||
depends = nss
|
||||
depends = xdg-utils
|
||||
@@ -0,0 +1,3 @@
|
||||
include:
|
||||
- project: 'dev/core/1password-archlinux-aur-ci'
|
||||
file: '/ci.yml'
|
||||
@@ -0,0 +1,40 @@
|
||||
# 1Password Beta - aarch64 Support
|
||||
|
||||
## Overview
|
||||
|
||||
`post-sync.sh` adds aarch64 (ARM64) support to the AUR `1password-beta` PKGBUILD after each sync.
|
||||
|
||||
This is implemented as a dynamic sync hook instead of a static patch because the aarch64 checksums include the current upstream version and need to be refreshed whenever AUR updates `_tarver`.
|
||||
|
||||
## Background
|
||||
|
||||
1Password officially provides ARM64 builds for Linux:
|
||||
|
||||
- https://downloads.1password.com/linux/tar/beta/aarch64/
|
||||
- https://downloads.1password.com/linux/tar/stable/aarch64/
|
||||
|
||||
The AUR PKGBUILD only supports x86_64.
|
||||
|
||||
## Changes Made
|
||||
|
||||
1. Adds aarch64 to the arch array: `arch=('x86_64' 'aarch64')`
|
||||
2. Uses architecture-specific source arrays:
|
||||
- x86_64: `.x64.tar.gz`
|
||||
- aarch64: `.arm64.tar.gz`
|
||||
3. Keeps the AUR x86_64 checksums
|
||||
4. Downloads and calculates current aarch64 checksums during sync
|
||||
5. Uses `${_archdir}` for source directory names instead of hardcoded `.x64`
|
||||
6. Updates `.SRCINFO` to match the rewritten PKGBUILD
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
bin/sync-aur 1password-beta
|
||||
bin/repo build --arch aarch64 --package 1password-beta
|
||||
```
|
||||
|
||||
The aarch64 build should download from:
|
||||
|
||||
```text
|
||||
https://downloads.1password.com/linux/tar/beta/aarch64/1password-<version>.arm64.tar.gz
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"source": "aur",
|
||||
"release_ring": "fast"
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Keep the AUR x86_64 checksums and add aarch64 sources. The aarch64
|
||||
# artifacts are signed by 1Password's validpgpkeys, so we skip checksums there
|
||||
# instead of baking version-specific hashes into Omarchy metadata.
|
||||
set +u
|
||||
CARCH=x86_64 source PKGBUILD
|
||||
set -u
|
||||
|
||||
if declare -p sha256sums >/dev/null 2>&1 && [[ ${#sha256sums[@]} -ge 2 ]]; then
|
||||
x86_sums=("${sha256sums[@]}")
|
||||
elif declare -p sha256sums_x86_64 >/dev/null 2>&1 && [[ ${#sha256sums_x86_64[@]} -ge 2 ]]; then
|
||||
x86_sums=("${sha256sums_x86_64[@]}")
|
||||
else
|
||||
echo "Unable to read x86_64 checksums from PKGBUILD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sha256_from_url() {
|
||||
curl -fsSL "$1" | sha256sum | awk '{ print $1 }'
|
||||
}
|
||||
|
||||
arm_url="https://downloads.1password.com/linux/tar/beta/aarch64/1password-${_tarver}.arm64.tar.gz"
|
||||
arm_tar_sum=$(sha256_from_url "$arm_url")
|
||||
arm_sig_sum=$(sha256_from_url "$arm_url.sig")
|
||||
|
||||
emit_archdir() {
|
||||
cat <<'EOF'
|
||||
case "${CARCH}" in
|
||||
x86_64)
|
||||
_archdir="x64"
|
||||
;;
|
||||
aarch64)
|
||||
_archdir="arm64"
|
||||
;;
|
||||
esac
|
||||
EOF
|
||||
}
|
||||
|
||||
emit_sources() {
|
||||
cat <<EOF
|
||||
source=()
|
||||
sha256sums=()
|
||||
source_x86_64=(https://downloads.1password.com/linux/tar/beta/x86_64/1password-\${_tarver}.x64.tar.gz{,.sig})
|
||||
source_aarch64=(https://downloads.1password.com/linux/tar/beta/aarch64/1password-\${_tarver}.arm64.tar.gz{,.sig})
|
||||
sha256sums_x86_64=('${x86_sums[0]}'
|
||||
'${x86_sums[1]}')
|
||||
sha256sums_aarch64=('$arm_tar_sum'
|
||||
'$arm_sig_sum')
|
||||
EOF
|
||||
}
|
||||
|
||||
tmpfile=$(mktemp)
|
||||
skip_checksums=false
|
||||
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
if [[ "$skip_checksums" == true ]]; then
|
||||
[[ "$line" == ")" ]] && skip_checksums=false
|
||||
continue
|
||||
fi
|
||||
|
||||
case "$line" in
|
||||
'_tar="1password-${_tarver}.x64.tar.gz"')
|
||||
emit_archdir >> "$tmpfile"
|
||||
;;
|
||||
"arch=('x86_64')")
|
||||
echo "arch=('x86_64' 'aarch64')" >> "$tmpfile"
|
||||
;;
|
||||
source=\(*)
|
||||
emit_sources >> "$tmpfile"
|
||||
;;
|
||||
sha256sums=\(*)
|
||||
[[ "$line" == *")" ]] || skip_checksums=true
|
||||
;;
|
||||
*)
|
||||
line=${line//1password-\$\{_tarver\}.x64/1password-\$\{_tarver\}.\$\{_archdir\}}
|
||||
printf '%s\n' "$line" >> "$tmpfile"
|
||||
;;
|
||||
esac
|
||||
done < PKGBUILD
|
||||
|
||||
mv "$tmpfile" PKGBUILD
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
# Do not add your user, or any others, to this group.
|
||||
GROUP_NAME="onepassword"
|
||||
|
||||
app_group_exists() {
|
||||
if [ $(getent group "${GROUP_NAME}") ]; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
setup_browser_helper() {
|
||||
# Setup the Core App Integration helper binary with the correct permissions and group
|
||||
BROWSER_SUPPORT_PATH="/opt/1Password/1Password-BrowserSupport"
|
||||
|
||||
chgrp "${GROUP_NAME}" $BROWSER_SUPPORT_PATH
|
||||
chmod g+s $BROWSER_SUPPORT_PATH
|
||||
}
|
||||
|
||||
pre_install() {
|
||||
if app_group_exists; then
|
||||
: # Do nothing
|
||||
else
|
||||
groupadd "${GROUP_NAME}"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_upgrade() {
|
||||
if app_group_exists; then
|
||||
: # Do nothing
|
||||
else
|
||||
groupadd "${GROUP_NAME}"
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
setup_browser_helper
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
setup_browser_helper
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if app_group_exists; then
|
||||
groupdel "${GROUP_NAME}"
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
* @people/build-release
|
||||
@@ -0,0 +1,77 @@
|
||||
pkgname=1password-beta
|
||||
|
||||
_tarver=8.12.12-43.BETA
|
||||
case "${CARCH}" in
|
||||
x86_64)
|
||||
_archdir="x64"
|
||||
;;
|
||||
aarch64)
|
||||
_archdir="arm64"
|
||||
;;
|
||||
esac
|
||||
pkgver=${_tarver//-/_}
|
||||
pkgrel=43.1
|
||||
conflicts=('1password' '1password-beta-bin')
|
||||
pkgdesc="Password manager and secure wallet"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url='https://1password.com'
|
||||
license=('LicenseRef-1Password-Proprietary')
|
||||
options=(!strip)
|
||||
install="1password.install"
|
||||
source=()
|
||||
sha256sums=()
|
||||
source_x86_64=(https://downloads.1password.com/linux/tar/beta/x86_64/1password-${_tarver}.x64.tar.gz{,.sig})
|
||||
source_aarch64=(https://downloads.1password.com/linux/tar/beta/aarch64/1password-${_tarver}.arm64.tar.gz{,.sig})
|
||||
sha256sums_x86_64=('74c9d8330f9e8316595d1d3710184ec8bde67518e9d27caec4befc7952a4947b'
|
||||
'9b48e299bd2ba6aa034668261683494d5e1c3e1e465750adaa91e3d94e8e840d')
|
||||
sha256sums_aarch64=('9e07b88d3f0cf17d8b475f2f1df65346720471fc558276dc1efbc025cbde6712'
|
||||
'2bc26e69738bbfe78390574e40767e1fc028e289536f0b0ecb9e488a5bf12713')
|
||||
validpgpkeys=('3FEF9748469ADBE15DA7CA80AC2D62742012EA22')
|
||||
|
||||
package() {
|
||||
depends=('hicolor-icon-theme' 'libgtk-3.so=0' 'nss' 'xdg-utils')
|
||||
|
||||
# Go to source directory
|
||||
cd "1password-${_tarver}.${_archdir}"
|
||||
|
||||
# Install icons
|
||||
resolutions=(32x32 64x64 256x256 512x512)
|
||||
for resolution in "${resolutions[@]}"
|
||||
do
|
||||
install -Dm0644 "resources/icons/hicolor/${resolution}/apps/1password.png" \
|
||||
"${pkgdir}/usr/share/icons/hicolor/${resolution}/apps/1password.png"
|
||||
done
|
||||
# Install desktop file
|
||||
install -Dm0644 resources/1password.desktop -t "${pkgdir}"/usr/share/applications/
|
||||
|
||||
# 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 ./com.1password.1Password.policy.tpl)
|
||||
EOF" > ./com.1password.1Password.policy
|
||||
|
||||
# Install system unlock PolKit policy file
|
||||
install -Dm0644 com.1password.1Password.policy -t "${pkgdir}"/usr/share/polkit-1/actions/
|
||||
|
||||
# Install examples
|
||||
install -Dm0644 resources/custom_allowed_browsers -t "${pkgdir}"/usr/share/doc/1password/examples/
|
||||
|
||||
# Move package contents to /opt/1Password
|
||||
cd "${srcdir}"
|
||||
install -dm0755 "${pkgdir}"/opt
|
||||
mv "1password-${_tarver}.${_archdir}" "${pkgdir}/opt/1Password"
|
||||
|
||||
# Cleanup un-needed files
|
||||
rm "${pkgdir}"/opt/1Password/com.1password.1Password.policy "${pkgdir}"/opt/1Password/com.1password.1Password.policy.tpl "${pkgdir}"/opt/1Password/install_biometrics_policy.sh
|
||||
rm -r "${pkgdir}"/opt/1Password/resources/icons/
|
||||
rm "${pkgdir}"/opt/1Password/resources/1password.desktop "${pkgdir}"/opt/1Password/resources/custom_allowed_browsers
|
||||
|
||||
# Symlink /usr/bin executable to opt
|
||||
install -dm0755 "${pkgdir}"/usr/bin
|
||||
ln -s /opt/1Password/1password "${pkgdir}"/usr/bin/1password
|
||||
|
||||
# chrome-sandbox requires the setuid bit to be specifically set.
|
||||
# See https://github.com/electron/electron/issues/17972
|
||||
chmod 4755 "${pkgdir}"/opt/1Password/chrome-sandbox
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
SSH_PRIVATE_KEY_B64 = "op://cgl-build-release-archlinux-aur-prod/AUR_SSH_PRIVATE_KEY_B64/credential"
|
||||
SSH_PASSPHRASE_B64 = "op://cgl-build-release-archlinux-aur-prod/AUR_SSH_PASSPHRASE_B64/credential"
|
||||
Reference in new issue
Block a user