1password-beta

This commit is contained in:
Ryan Hughes
2026-05-08 01:04:50 -04:00
parent 2b7be2dc26
commit c51bd3d111
13 changed files with 174 additions and 261 deletions
+27
View File
@@ -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,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
View File
@@ -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
@@ -1,27 +1,38 @@
pkgname=1password-beta pkgname=1password-beta
_tarver=8.12.12-43.BETA _tarver=8.12.12-43.BETA
_tar="1password-${_tarver}.x64.tar.gz" case "${CARCH}" in
x86_64)
_archdir="x64"
;;
aarch64)
_archdir="arm64"
;;
esac
pkgver=${_tarver//-/_} pkgver=${_tarver//-/_}
pkgrel=43 pkgrel=43.1
conflicts=('1password' '1password-beta-bin') conflicts=('1password' '1password-beta-bin')
pkgdesc="Password manager and secure wallet" pkgdesc="Password manager and secure wallet"
arch=('x86_64') arch=('x86_64' 'aarch64')
url='https://1password.com' url='https://1password.com'
license=('LicenseRef-1Password-Proprietary') license=('LicenseRef-1Password-Proprietary')
options=(!strip) options=(!strip)
install="1password.install" install="1password.install"
source=(https://downloads.1password.com/linux/tar/beta/${CARCH}/${_tar}{,.sig}) source=()
sha256sums=('74c9d8330f9e8316595d1d3710184ec8bde67518e9d27caec4befc7952a4947b' sha256sums=()
'9b48e299bd2ba6aa034668261683494d5e1c3e1e465750adaa91e3d94e8e840d' 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') validpgpkeys=('3FEF9748469ADBE15DA7CA80AC2D62742012EA22')
package() { package() {
depends=('hicolor-icon-theme' 'libgtk-3.so=0' 'nss' 'xdg-utils') depends=('hicolor-icon-theme' 'libgtk-3.so=0' 'nss' 'xdg-utils')
# Go to source directory # Go to source directory
cd "1password-${_tarver}.x64" cd "1password-${_tarver}.${_archdir}"
# Install icons # Install icons
resolutions=(32x32 64x64 256x256 512x512) resolutions=(32x32 64x64 256x256 512x512)
@@ -49,7 +60,7 @@ EOF" > ./com.1password.1Password.policy
# Move package contents to /opt/1Password # Move package contents to /opt/1Password
cd "${srcdir}" cd "${srcdir}"
install -dm0755 "${pkgdir}"/opt install -dm0755 "${pkgdir}"/opt
mv "1password-${_tarver}.x64" "${pkgdir}/opt/1Password" mv "1password-${_tarver}.${_archdir}" "${pkgdir}/opt/1Password"
# Cleanup un-needed files # 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 "${pkgdir}"/opt/1Password/com.1password.1Password.policy "${pkgdir}"/opt/1Password/com.1password.1Password.policy.tpl "${pkgdir}"/opt/1Password/install_biometrics_policy.sh
-22
View File
@@ -1,22 +0,0 @@
pkgbase = 1password-beta
pkgdesc = Password manager and secure wallet
pkgver = 8.12.12_43.BETA
pkgrel = 43
url = https://1password.com
install = 1password.install
arch = x86_64
license = LicenseRef-1Password-Proprietary
conflicts = 1password
conflicts = 1password-beta-bin
options = !strip
source = https://downloads.1password.com/linux/tar/beta/x86_64/1password-8.12.12-43.BETA.x64.tar.gz
source = https://downloads.1password.com/linux/tar/beta/x86_64/1password-8.12.12-43.BETA.x64.tar.gz.sig
validpgpkeys = 3FEF9748469ADBE15DA7CA80AC2D62742012EA22
sha256sums = 74c9d8330f9e8316595d1d3710184ec8bde67518e9d27caec4befc7952a4947b
sha256sums = 9b48e299bd2ba6aa034668261683494d5e1c3e1e465750adaa91e3d94e8e840d
pkgname = 1password-beta
depends = hicolor-icon-theme
depends = libgtk-3.so=0
depends = nss
depends = xdg-utils
@@ -1,98 +0,0 @@
# 1Password Beta aarch64 Support - Patch Summary
## Changes Made
Updated the 1Password Beta PKGBUILD to support both x86_64 and aarch64 architectures.
### Key Modifications
1. **Architecture Support**: Added `'aarch64'` to the `arch` array
2. **Dynamic Source URLs**: Removed hardcoded `.x64` filename, made it architecture-dependent
3. **Architecture-specific Variables**:
- `_tar`: Tarball filename (`.x64.tar.gz` or `.arm64.tar.gz`)
- `_archdir`: Directory name inside tarball (`x64` or `arm64`)
4. **Split Checksums**: Changed from single `sha256sums` to arch-specific arrays
5. **Updated Directory References**: Changed hardcoded `.x64` to `${_archdir}` variable
### Patch Location
- **File**: `patches/add-aarch64-support.patch`
- **Documentation**: `patches/README.md`
### Checksums Verified
Downloaded and verified SHA256 checksums for aarch64 files:
- **Tarball**: `661a45bb57f8b6e184d7b7603221cf938774aec674a357672d6cc1d4387fab40`
- **Signature**: `5cec37c65607760df4cc1734a51154b70ff660b5147160323905178aee23b7e2`
## Testing
### ✅ Build Results
**Successfully built for aarch64!**
```
Package: 1password-beta-8.11.16_30.BETA-30-aarch64.pkg.tar.xz
Size: 139MB
Location: build-output/aarch64/
Built: 2025-10-27
```
The package was successfully:
- Downloaded from 1Password's aarch64 repository
- Verified with SHA256 checksums
- GPG signature verified
- Extracted and packaged for aarch64
### Syntax Validation
```bash
# Test x86_64 configuration
CARCH=x86_64 source PKGBUILD && echo "Source: ${source_x86_64[0]}"
# Test aarch64 configuration
CARCH=aarch64 source PKGBUILD && echo "Source: ${source_aarch64[0]}"
```
### Expected Behavior
**x86_64**:
- Downloads from: `https://downloads.1password.com/linux/tar/beta/x86_64/`
- Tarball: `1password-8.11.16-30.BETA.x64.tar.gz`
- Extracts to: `1password-8.11.16-30.BETA.x64/`
**aarch64**:
- Downloads from: `https://downloads.1password.com/linux/tar/beta/aarch64/`
- Tarball: `1password-8.11.16-30.BETA.arm64.tar.gz`
- Extracts to: `1password-8.11.16-30.BETA.arm64/`
## Building
```bash
# Build for x86_64
bin/repo build --arch x86_64 --package 1password-beta
# Build for aarch64
bin/repo build --arch aarch64 --package 1password-beta
```
## Patch Stats
- **Lines changed**: 19
- **Lines added**: 29
- **Lines removed**: 10
- **Net change**: +19 lines
## Upstream Source
1Password officially supports ARM64 Linux:
- Stable: https://downloads.1password.com/linux/tar/stable/aarch64/
- Beta: https://downloads.1password.com/linux/tar/beta/aarch64/
## Notes
- GPG signature verification works for both architectures
- Same signing key is used: `3FEF9748469ADBE15DA7CA80AC2D62742012EA22`
- Package structure is identical between architectures
- This patch can be auto-applied by `bin/sync-aur` if placed in `patches/` directory
@@ -1,76 +0,0 @@
# 1Password Beta - aarch64 Support Patch
## Overview
This patch adds aarch64 (ARM64) architecture support to the 1Password Beta PKGBUILD.
## 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 original PKGBUILD only supported x86_64, but the source URLs use `${CARCH}` which should work for both architectures.
## Changes Made
1. **Added aarch64 to arch array**: `arch=('x86_64' 'aarch64')`
2. **Architecture-specific variables**:
- x86_64: Uses `.x64.tar.gz` files and `x64` directory
- aarch64: Uses `.arm64.tar.gz` files and `arm64` directory
3. **Architecture-specific checksums**:
- `sha256sums_x86_64=()` - Kept original checksums
- `sha256sums_aarch64=()` - Downloaded and verified real checksums
4. **Dynamic directory names**: Changed hardcoded `.x64` to `${_archdir}`
## Testing
To test on aarch64:
```bash
# Build for aarch64
bin/repo build --arch aarch64 --package 1password-beta
# The package should download from:
# https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.11.16-30.BETA.arm64.tar.gz
```
## Applying the Patch
If syncing from AUR in the future, apply this patch:
```bash
cd pkgbuilds/1password-beta
patch -p0 < patches/add-aarch64-support.patch
```
Or if the patch is in the patches/ directory, it will be auto-applied by the sync script.
## Checksums
The aarch64 checksums were obtained by downloading directly from 1Password:
```bash
# Tarball
curl -sSL https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.11.16-30.BETA.arm64.tar.gz | sha256sum
# 661a45bb57f8b6e184d7b7603221cf938774aec674a357672d6cc1d4387fab40
# Signature
curl -sSL https://downloads.1password.com/linux/tar/beta/aarch64/1password-8.11.16-30.BETA.arm64.tar.gz.sig | sha256sum
# 5cec37c65607760df4cc1734a51154b70ff660b5147160323905178aee23b7e2
```
## TODO
- [ ] Test installation on actual aarch64 hardware (Asahi Linux)
- [ ] Consider upstreaming to AUR (if maintainer is interested)
- [ ] Update checksums when 1Password beta version changes
## Notes
- The 1Password desktop app is proprietary and distributed as binary
- GPG signature verification works for both architectures using the same key
- The package structure is identical between x86_64 and aarch64 versions
@@ -1,56 +0,0 @@
--- PKGBUILD.orig 2025-10-27 16:49:24.211786922 -0400
+++ PKGBUILD 2025-10-27 16:53:01.902479709 -0400
@@ -1,27 +1,37 @@
pkgname=1password-beta
_tarver=8.11.16-30.BETA
-_tar="1password-${_tarver}.x64.tar.gz"
pkgver=${_tarver//-/_}
pkgrel=30
conflicts=('1password' '1password-beta-bin')
pkgdesc="Password manager and secure wallet"
-arch=('x86_64')
+arch=('x86_64' 'aarch64')
url='https://1password.com'
license=('LicenseRef-1Password-Proprietary')
options=(!strip)
install="1password.install"
-source=(https://downloads.1password.com/linux/tar/beta/${CARCH}/${_tar}{,.sig})
-sha256sums=('21f127aa3b879ec353df20e0b0eec1572f17d44e529ac19870a21586670bc0d1'
- 'c04d8bf6b7059eec4279436199324547689a7cc4453e6c57a5637384d6210ba6'
-)
+
+# Architecture-specific variables
+if [ "$CARCH" = "x86_64" ]; then
+ _archdir="x64"
+elif [ "$CARCH" = "aarch64" ]; then
+ _archdir="arm64"
+fi
+
+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=('21f127aa3b879ec353df20e0b0eec1572f17d44e529ac19870a21586670bc0d1'
+ 'c04d8bf6b7059eec4279436199324547689a7cc4453e6c57a5637384d6210ba6')
+sha256sums_aarch64=('661a45bb57f8b6e184d7b7603221cf938774aec674a357672d6cc1d4387fab40'
+ '5cec37c65607760df4cc1734a51154b70ff660b5147160323905178aee23b7e2')
validpgpkeys=('3FEF9748469ADBE15DA7CA80AC2D62742012EA22')
package() {
depends=('hicolor-icon-theme' 'libgtk-3.so=0' 'nss' 'xdg-utils')
# Go to source directory
- cd "1password-${_tarver}.x64"
+ cd "1password-${_tarver}.${_archdir}"
# Install icons
resolutions=(32x32 64x64 256x256 512x512)
@@ -49,7 +59,7 @@
# Move package contents to /opt/1Password
cd "${srcdir}"
install -dm0755 "${pkgdir}"/opt
- mv "1password-${_tarver}.x64" "${pkgdir}/opt/1Password"
+ 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