diff options
author | Anton Palgunov | 2021-03-15 23:02:36 +0000 |
---|---|---|
committer | Anton Palgunov | 2021-03-15 23:02:36 +0000 |
commit | 5db2a81ecb5bbf83ceb82b744435b3c91e8dead5 (patch) | |
tree | 09ac00cda9910a5a045945ebecd3016b45cce46b | |
parent | 108f81a2d25185c3bc34dd857ffae3f1292274b2 (diff) | |
download | aur-5db2a81ecb5bbf83ceb82b744435b3c91e8dead5.tar.gz |
Upd PolKit is works
-rwxr-xr-x | 1password.install | 52 | ||||
-rw-r--r-- | PKGBUILD | 7 |
2 files changed, 56 insertions, 3 deletions
diff --git a/1password.install b/1password.install new file mode 100755 index 000000000000..4f90d35b7a3f --- /dev/null +++ b/1password.install @@ -0,0 +1,52 @@ +# 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 +} + +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 the Core App Integration helper binary with the correct permissions and group + HELPER_PATH="/opt/1Password/1Password-KeyringHelper" + + chgrp "${GROUP_NAME}" $HELPER_PATH + # The binary requires setuid so it may interact with the Kernel keyring facilities + chmod u+s $HELPER_PATH + chmod g+s $HELPER_PATH +} + +post_upgrade() { + # Setup the Core App Integration helper binary with the correct permissions and group + HELPER_PATH="/opt/1Password/1Password-KeyringHelper" + + chgrp "${GROUP_NAME}" $HELPER_PATH + # The binary requires setuid so it may interact with the Kernel keyring facilities + chmod u+s $HELPER_PATH + chmod g+s $HELPER_PATH +} + +post_remove() { + if app_group_exists; then + groupdel "${GROUP_NAME}" + fi +} @@ -9,6 +9,7 @@ pkgrel=1 pkgdesc="Password manager and secure wallet (development preview)" arch=('x86_64') depends=('libxss' 'gtk3' 'nss') +install='1password.install' license=('custom:LicenseRef-1Password-Proprietary') url='https://1password.com/' source=("https://downloads.1password.com/linux/debian/pool/main/1/1password/1password-$_pkgver.deb") @@ -18,9 +19,9 @@ validpgpkeys=('3FEF9748469ADBE15DA7CA80AC2D62742012EA22') package() { bsdtar -xv -C "${pkgdir}" -f "${srcdir}/data.tar.xz" - chmod 0644 "${pkgdir}/opt/1Password/com.1password.1Password.policy" + install -Dm0644 "${pkgdir}/opt/1Password/com.1password.1Password.policy" -t "${pkgdir}/usr/share/polkit-1/actions/" chmod 4755 "${pkgdir}/opt/1Password/chrome-sandbox" || true - mkdir -p "${pkgdir}/usr/bin/" - ln -s "/opt/${_pkgname}/${_binname}" "${pkgdir}/usr/bin" + install -dm0755 "${pkgdir}"/usr/bin + ln -s "/opt/${_pkgname}/${_binname}" "${pkgdir}/usr/bin/${_binname}" } |