aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-11-20 16:29:45 +0800
committerXi Ruoyao <xry111@xry111.site>2024-11-20 16:37:09 +0800
commitd504c8fdd25803580dd9ae70f3b4e18172d0b267 (patch)
tree3d0f1572d19c70aa22062997c1bd9dbea2a44c85
parenta0476df2711824ccc76594b6760d12b95906bb67 (diff)
profile: Set GPG_TTY for GnuPG in /etc/bashrc
I intended to do this in 7c9e274a7ac1 but I made the change at a wrong location. As we already have "source ~/.bashrc" in ~/.bash_profile and "source /etc/bashrc" in ~/.bashrc, simply adding the line into /etc/bashrc is enough for both login and non-login interactive shells. P.S. the log of the last commit (reverting 7c9e274a7ac1) is also wrong. I didn't realize we already source bashrc in bash_profile.
-rw-r--r--postlfs/config/profile.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/postlfs/config/profile.xml b/postlfs/config/profile.xml
index 935d9308f9..2fc502860c 100644
--- a/postlfs/config/profile.xml
+++ b/postlfs/config/profile.xml
@@ -550,6 +550,10 @@ fi
unset RED GREEN NORMAL
+# GnuPG wants this or it'll fail with pinentry-curses under some
+# circumstances (for example signing a Git commit)
+tty -s &amp;&amp; export GPG_TTY=$(tty)
+
# End /etc/bashrc</literal>
EOF</userinput></screen>