diff options
-rw-r--r-- | HACKING | 38 | ||||
-rw-r--r-- | README.org | 60 |
2 files changed, 80 insertions, 18 deletions
@@ -4,44 +4,52 @@ * Contributing -By far the easiest way to hack on pinentry-rofi is to develop using Guix: +By far the easiest way to hack on pinentry-rofi is to develop using +Guix: #+BEGIN_SRC bash # Obtain the source code cd /path/to/source-code - guix environment -l guix.scm - # In the new shell, run: - hall dist --execute && autoreconf -vif && ./configure && make check + guix build -f guix.scm #+END_SRC You can now hack this project's files to your heart's content, whilst -testing them from your `guix environment' shell. +testing them from Guix. -To try out any scripts in the project you can now use +To try out any scripts in the project, the easiest is just to install it to a guix profile. +Here is an example to install it to the default profile: #+BEGIN_SRC bash - ./pre-inst-env scripts/${script-name} + guix package -f guix.scm #+END_SRC -If you'd like to tidy the project again, but retain the ability to test the -project from the commandline, simply run: - -#+BEGIN_SRC bash - ./hall clean --skip "scripts/${script-name},pre-inst-env" --execute -#+END_SRC +Then when you're done simply roll back. This can also be used when +testing it against gpg-agent by following what is described in the +[[file:README.org][README]]. ** Manual Installation If you do not yet use Guix, you will have to install this project's dependencies manually: - autoconf + - autoconf-archive - automake - pkg-config - texinfo - - guile-hall Once those dependencies are installed you can run: #+BEGIN_SRC bash - hall dist -x && autoreconf -vif && ./configure && make check + autoreconf -vif && ./configure && make check #+END_SRC + +** Guile Hall + + The core of the gnu build system is generated by guile-hall. There + are some modifications done after that so avoid running + =hall clean -x= and =hall dist -x= as that will override those + changes. + + Right now I haven't figured out a good way of dealing with keeping + the version in sync between the different files, which what I + mainly used =hall= for. @@ -38,17 +38,71 @@ Install it with guix is recommended as that will work on most linux distributions. + Then add it to your =~/.gnupg/gpg-agent.conf= + +*** Guix on a foreign distro + + If you are running guix on a foreign distro, you need to make sure + the =GUIX_LOCPATH= environment variable is passed to the gpg-agent + otherwise rofi will fail to set the locale and therefore cannot + launch. Which result in the pinentry aborting. + + On a distribution that is using systemd (here I'm using Arch Linux + as an example) simply run: + + #+begin_src shell + echo "GUIX_LOCPATH=$GUIX_LOCPATH" + #+end_src + + Copy that, then run: + #+begin_src shell + systend --user edit gpg-agent.service + #+end_src + + And add it in the =override.conf=: + #+begin_src conf + [Service] + Environment=GUIX_LOCPATH=%h/.guix-profile/lib/locale + #+end_src + + On my system, =GUIX_LOCPATH= points to the default profile i.e. + =$HOME/.guix-profile/lib/locale=. =%h= in systemd gives you the + path to the home directory. This should be the case for most + people, but if your =GUIX_LOCPATH= points to something different + change the =override.conf= to reflect that. + ** Arch Linux - Clone my aur repo and the build the package using the PKGBUILD: + The =PKGBUILD= file for arch is in the =build-aux=, so just run: #+begin_src shell - git clone https://github.com/plattfot/pinentry-rofi-aur.git - cd pinentry-rofi-aur + cd build-aux makepkg -ic #+end_src The binary location is then `/usr/bin/pinentry-rofi`. + ** From Source See [[file:HACKING][HACKING]] on how to build this from source +* Gpg-agent + + To use =pinentry-rofi= with =gpg-agent=, you can set it as the + =pinentry-program= in the =~/.gnupg/gpg-agent.conf=. Note that you + need to use the full path to the binary. + + For example for Arch Linux this would be: + #+begin_src conf + pinentry-program /usr/bin/pinentry-rofi + #+end_src + + And for guix: + #+begin_src conf + pinentry-program <HOME>/.guix-profile/bin/pinentry-rofi + #+end_src + Where =<HOME>= is the full path to home for your user. + + Don't forget to restart =gpg-agent= for the changes to take affect: + #+begin_src shell + gpg-connect-agent reloadagent /bye + #+end_src |