{"id":42879032,"url":"https://github.com/rnpgp/gpg-build-scripts","last_synced_at":"2026-01-30T14:26:50.541Z","repository":{"id":47582079,"uuid":"136937400","full_name":"rnpgp/gpg-build-scripts","owner":"rnpgp","description":"Build scripts to automatically install GnuPG (GNU Privacy Guard) on Linux","archived":false,"fork":false,"pushed_at":"2024-03-30T13:29:22.000Z","size":155,"stargazers_count":5,"open_issues_count":8,"forks_count":5,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-03-30T14:35:11.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnpgp.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-11T14:24:34.000Z","updated_at":"2023-05-20T23:00:09.000Z","dependencies_parsed_at":"2022-09-06T15:21:15.130Z","dependency_job_id":null,"html_url":"https://github.com/rnpgp/gpg-build-scripts","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rnpgp/gpg-build-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fgpg-build-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fgpg-build-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fgpg-build-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fgpg-build-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnpgp","download_url":"https://codeload.github.com/rnpgp/gpg-build-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fgpg-build-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-30T14:26:48.085Z","updated_at":"2026-01-30T14:26:50.532Z","avatar_url":"https://github.com/rnpgp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"= GPG Build Scripts\n\nA set of build scripts for GNU Privacy Guard.\n\n[options=\"header\"]\n|==========================\n|OS \\ GPG version |2.1, 2.2  |latest   |head\n\n|Fedora 33\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33.yml/badge.svg[\"Fedora 33\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33-latest.yml/badge.svg[\"Fedora 33 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33-head.yml/badge.svg[\"Fedora 33 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33-head.yml\"]\n\n|CentOS 8\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-8.yml/badge.svg[\"CentOS 8\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-8.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-8-latest.yml/badge.svg[\"CentOS 8 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-8-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-8-head.yml/badge.svg[\"CentOS 8 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-8-head.yml\"]\n\n|CentOS 7\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-7.yml/badge.svg[\"CentOS 7\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-7.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-7-latest.yml/badge.svg[\"CentOS 7 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-7-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-7-head.yml/badge.svg[\"CentOS 7 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/centos-7-head.yml\"]\n\n|Ubuntu 20.04\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-20.04.yml/badge.svg[\"Ubuntu 20.04\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-20.04.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-20.04-latest.yml/badge.svg[\"Ubuntu 20.04 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-20.04-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-20.04-head.yml/badge.svg[\"Ubuntu 20.04 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-20.04-head.yml\"]\n\n|Ubuntu 18.04\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-18.04.yml/badge.svg[\"Ubuntu 18.04\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-18.04.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-18.04-latest.yml/badge.svg[\"Ubuntu 18.04 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-18.04-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-18.04-head.yml/badge.svg[\"Ubuntu 18.04 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-18.04-head.yml\"]\n\n|Ubuntu 16.04\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-16.04.yml/badge.svg[\"Ubuntu 16.04\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-16.04.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-16.04-latest.yml/badge.svg[\"Ubuntu 16.04 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-16.04-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-16.04-head.yml/badge.svg[\"Ubuntu 16.04 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-16.04-head.yml\"]\n\n|Ubuntu 14.04\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04.yml/badge.svg[\"Ubuntu 14.04\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-latest.yml/badge.svg[\"Ubuntu 14.04 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-head.yml/badge.svg[\"Ubuntu 14.04 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-head.yml\"]\n\n|macOS 11.0\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0.yml/badge.svg[\"macOS 11.0\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-latest.yml/badge.svg[\"macOS 11.0 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-head.yml/badge.svg[\"macOS 11.0 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-head.yml\"]\n\n|macOS 10.15\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15.yml/badge.svg[\"macOS 10.15\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-latest.yml/badge.svg[\"macOS 10.15 (latest)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-latest.yml\"]\n|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-head.yml/badge.svg[\"macOS 10.15 (head)\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-head.yml\"]\n|==========================\n\nimage:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/docker.yml/badge.svg[\"Docker\", link=\"https://github.com/rnpgp/gpg-build-scripts/actions/workflows/docker.yml\"]\n\n== Prerequisites\n\nBuild should succeed on any Linux distribution, and similar systems.  Popular\nGNU build tools are required.  For Ubuntu, following packages should be enough:\n`libgnutls28-dev`, `bzip2`, `make`, `gettext`, `texinfo`, `gnutls-bin`,\n`build-essential`, `g++`.  (List taken from this comment:\nhttps://gist.github.com/mattrude/3883a3801613b048d45b#gistcomment-2378027).\n\nWhen building from Git, additional software is needed, in particular Git,\nAutomake, and a recent version of Gettext.  Note that Gettext available in\nUbuntu Trusty is too old for this purpose--this fact must be taken into account\nwhen building from Git in CI environment.\n\n== Scripts\n\nTIP: Most likely you'll want to run `install_gpg_all.sh`, however\n`install_gpg_component.sh` gives greater flexibility.  Oh, and check out\nthe `examples` subdirectory.\n\n=== `install_gpg_component.sh`\n\nBuilds and installs a specific component of GnuPG.  The source code is obtained\neither from released tarballs, or from Git repository.\n\nWhen building stable releases from tarballs, two options are mandatory:\n\n* `--component-name`, which specifies a component name\n* `--component-version`, which specifies component version (can be `latest`)\n\n.Example: building the most recent release of Pinentry.\n[source,bash]\n----\n./install_gpg_component.sh \\\n  --component-name pinentry \\\n  --component-version latest\n----\n\n.Example: building Pinentry version 1.1.0.\n[source,bash]\n----\n./install_gpg_component.sh \\\n  --component-name pinentry \\\n  --component-version 1.1.0\n----\n\nWhen building from Git repository, two options are mandatory:\n\n* `--component-name`, which specifies a component name\n* `--component-git-ref`, which specifies a Git branch or tag (commonly `master`)\n\n.Example: building Pinentry from Git as of current master.\n[source,bash]\n----\n./install_gpg_component.sh \\\n  --component-name pinentry \\\n  --component-git-ref master\n----\n\nFor a complete list available options, run the script with `--help` option:\n\n.Example: printing script help.\n[source,bash]\n----\n./install_gpg_component.sh --help\n----\n\n=== `install_gpg_all.sh`\n\nBuilds and installs all components of GnuPG (but not GPGME, which must be\ninstalled separately via `install_gpg_component.sh` if desired).\n\nThe `--suite-version` parameter describes the combination of component versions.\nSupported values are: `2.1`, `2.2`, `latest`, and `master`, which are defined as\nfollows:\n\n* `2.1` means GnuPG 2.1, and other component as in this Gist:\n  https://gist.github.com/mattrude/3883a3801613b048d45b\n* `2.2` means GnuPG 2.1, and other component as in this Gist:\n  https://gist.github.com/vt0r/a2f8c0bcb1400131ff51\n* Currently no all in one support for explicit versioning with \n  `2.3`, `2.4`, etc. arguments yet. Use `latest` instead.\n* `latest` means the latest version of GnuPG and all its components.  They are\n  obtained from https://versions.gnupg.org/swdb.lst, which is maintained by\n  GnuPG developers, and which is used by GnuPG's stock software updater.\n* `master` means whatever is currently on `master` branch in Git.\n\nTIP: Prefer `latest` over explicit versioning.\n\nAny other arguments are passed to `install_gpg_component.sh`, which is invoked\nfrom `install_gpg_all.sh` for every component once.  For example, following\nsnippet will install the freshest GnuPG without documentation\n(`--configure-opts \"--disable-doc\"` will be passed to component install\nscripts):\n\n[source,bash]\n----\n./install_gpg_all.sh \\\n  --suite-version latest \\\n  --configure-opts \"--disable-doc\"\n----\n\n== Tips \u0026 tricks\n\n=== Passing options to `./configure` script\n\nThe `--configure-opts` allows to pass options to `./configure` scripts.  For\nexample:\n\n[source,bash]\n----\n./install_gpg_component.sh \\\n  --component-name pinentry \\\n  --component-version latest \\\n  --configure-opts \"--enable-pinentry-qt --enable-pinentry-curses\"\n----\n\nSetting a custom installation prefix is not that straightforward.\nThe `./configure` script assumes that all the dependencies are installed in\n`/usr/lib`, hence you need to override them as in example:\n\n[source,bash]\n----\n./install_gpg_all.sh \\\n  --suite-version latest \\\n  --configure-opts \"\\\n    --prefix=/opt/gpg \\\n    --with-libgpg-error-prefix=/opt/gpg \\\n    --with-libassuan-prefix=/opt/gpg \\\n    --with-libgpg-error-prefix=/opt/gpg \\\n    --with-libgcrypt-prefix=/opt/gpg \\\n    --with-libassuan-prefix=/opt/gpg \\\n    --with-ksba-prefix=/opt/gpg \\\n    --with-npth-prefix=/opt/gpg\"\n----\n\nYou may see a bunch of warnings as some of these options are relevant only to\nfew components, but that won't break your build.\n\n=== Verifying authenticity of tarballs\n\nGnuPG team provides PGP signatures of released tarballs, which can be used\nto verify authenticity of these tarballs.  Note that using this feature requires\nthat another installation of GnuPG is available in advance.\n\nIn order to do so, firstly public keys of GnuPG team must be imported.\nThe easiest way is to fetch them from some keyserver, for example from\nkeyserver.ubuntu.com:\n\n[source,bash]\n----\ngpg \\\n  --keyserver hkp://keyserver.ubuntu.com:80 \\\n  --recv-keys AAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCCC\n----\n\nYou should obtain key IDs from https://www.gnupg.org/signature_key.html[GnuPG\nhome page] rather than trust me, therefore above snippet contains only\nplaceholders.  Key ID is the last sixteen hexadecimal digits of its fingerprint.\n\nAlternatively, you may write a whole ASCII-armored public key block, which is\nprinted near the bottom of the aforementioned page, into some file, and then\nimport it.  Given that you have saved key block to a file `GPG_KEYS.gpg`,\nfollowing imports it:\n\n[source,bash]\n----\ngpg --import GPG_KEYS.gpg\n----\n\nKeys are now imported but not trusted yet.  It is enough for signature\nverification, though warnings will be printed.  In order to enable verfication,\nuse `--verify` option, for example:\n\n[source,bash]\n----\n./install_gpg_all.sh \\\n  --suite-version latest \\\n  --verify\n----\n\nTIP: If you want to learn how to exchange and trust keys, head to\nhttps://www.gnupg.org/gph/en/manual/x56.html[GNU Privacy Handbook].\n\nTIP: For more information about checking integrity of GnuPG release tarballs,\nhead to https://www.gnupg.org/download/integrity_check.html[GnuPG home page].\n\n=== Using with CI\n\n==== GitHub Action\n\nThe scripts have been designed to work in GitHub Action.  Use following listing\nas example of `.github/workflows/my_workflow.yml`:\n\n[source,yaml]\n----\nname: My workflow\n\non:\n  pull_request:\n  push:\n    branches:\n      - master\n      - 'release/**'\n\nenv:\n  GPG_BUILD_DIR: \"$GITHUB_WORKSPACE/build_gpg\"\n  GPG_CONFIGURE_OPTS: \u003e\n      --disable-doc --enable-pinentry-curses\n      --disable-pinentry-emacs --disable-pinentry-gtk2 --disable-pinentry-gnome3\n      --disable-pinentry-qt --disable-pinentry-qt4 --disable-pinentry-qt5\n      --disable-pinentry-tqt --disable-pinentry-fltk\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    if: \"!contains(github.event.head_commit.message, 'skip ci')\"\n    container:\n      image: centos:8\n    strategy:\n      matrix:\n        env:\n          - GPG_VERSION: \"latest\"\n          - GPG_VERSION: \"2.1\"\n    env: ${{ matrix.env }}\n    steps:\n      - name: Set up build environment\n        run: |\n          dnf -y -q update\n          dnf -y -q install --skip-broken \\\n            git \\\n            clang gcc gcc-c++ make autoconf automake libtool byacc bison \\\n            bzip2 gzip ncurses-devel bzip2-devel zlib-devel gettext-devel \\\n            patch \\\n            texinfo \\\n            file \\\n            which\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - name: Build GPG\n        run: \u003e\n          ./install_gpg_all.sh\n          --suite-version \"$GPG_VERSION\"\n          --build-dir \"$GPG_BUILD_DIR\"\n          --configure-opts \"$GPG_CONFIGURE_OPTS\"\n----\n\n\n=== Installing GnuPG Made Easy (GPGME)\n\nGPGME is not installed by `install_gpg_all.sh` script, however it can be\ninstalled with `install_gpg_component.sh` like every other component.\n\nFor example:\n\n[source,bash]\n----\n./install_gpg_all.sh \\\n  --suite-version latest\n\n./install_gpg_component.sh \\\n  --component-name gpgme \\\n  --component-version latest\n----\n\nNOTE: GPGME requires `libgpg-error` and `libassuan` to compile.  Also, other\ncomponents of GnuPG suite are typically needed in order to actually use GPGME.\n\n== License\n\nThe MIT License (MIT)\n\nCopyright (c) 2018 - 2021 Ribose Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnpgp%2Fgpg-build-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnpgp%2Fgpg-build-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnpgp%2Fgpg-build-scripts/lists"}