summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Munkres2023-10-09 12:23:52 -0700
committerAndrew Munkres2023-10-09 12:52:03 -0700
commitbfc938c02edf60b87aba93077921a0a3ed880065 (patch)
treee2119c45368d09425f66605ea8aec597b442bd72
downloadaur-bfc938c02edf60b87aba93077921a0a3ed880065.tar.gz
Initial import
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD20
-rw-r--r--ssh-agent.install3
-rwxr-xr-xssh-auth-sock.sh3
4 files changed, 40 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..77cc0f6b95ce
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = ssh-agent-env-var
+ pkgdesc = An /etc/profile.d script to set the environment variable for ssh-agent
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://wiki.archlinux.org/index.php/SSH_keys#Start_ssh-agent_with_systemd_user
+ install = ssh-agent.install
+ arch = any
+ license = GPL
+ optdepends = openssh: ssh-agent and its systemd user unit
+ conflicts = systemd-ssh-agent>1.0.0-1
+ source = ssh-auth-sock.sh
+ sha256sums = c04f183ce1b97cb225aea1db2ae908dc70669066935717ea3d5b171bc10455a0
+
+pkgname = ssh-agent-env-var
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f534fa00026b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+# Maintainer: Andrew Munkres <amunkres@nyx.net>
+# Contributor: Dmitry Ivanov <ivadmi5 at gmail dot com>
+# Contributor: Zacharias Knudsen <zachasme@gmail.com>
+
+pkgname=ssh-agent-env-var
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="An /etc/profile.d script to set the environment variable for ssh-agent"
+url="https://wiki.archlinux.org/index.php/SSH_keys#Start_ssh-agent_with_systemd_user"
+license=('GPL')
+arch=('any')
+optdepends=('openssh: ssh-agent and its systemd user unit')
+conflicts=('systemd-ssh-agent>1.0.0-1')
+install=ssh-agent.install
+source=('ssh-auth-sock.sh')
+sha256sums=('c04f183ce1b97cb225aea1db2ae908dc70669066935717ea3d5b171bc10455a0')
+
+package() {
+ install -Dm644 "$srcdir"/ssh-auth-sock.sh "$pkgdir"/etc/profile.d/ssh_auth_sock.sh
+}
diff --git a/ssh-agent.install b/ssh-agent.install
new file mode 100644
index 000000000000..fc8f5050f8df
--- /dev/null
+++ b/ssh-agent.install
@@ -0,0 +1,3 @@
+post_install() {
+ printf "To enable the systemd user unit for ssh-agent, use systemctl --user enable ssh-agent.service.\n"
+}
diff --git a/ssh-auth-sock.sh b/ssh-auth-sock.sh
new file mode 100755
index 000000000000..5e4bbcdafded
--- /dev/null
+++ b/ssh-auth-sock.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" \ No newline at end of file