[Buildroot] [PATCH 1/1] package/{gnupg, gnupg2}: use gnupg2 by default
Arnout Vandecappelle
arnout at mind.be
Tue Mar 15 21:19:14 UTC 2022
On 02/03/2022 22:01, Julien Olivain wrote:
> This patch reverses the logic to select gnupg2 by default, while still
> allowing to select gnupg (v1).
>
> Quoting: https://gnupg.org/download/index.html
> """
> GnuPG 1.4 is the old, single binary version which still support the
> unsafe PGP-2 keys. This branch has no dependencies on the above listed
> libraries or the Pinentry. However, it lacks many modern features and
> will receive only important updates.
> """
>
> gnupg 1.4 is kept in Buildroot for now, as the package is still
> maintained upstream. It might still be useful is some specific cases:
> - it has a smaller footprint (compared to v2),
> - it has less dependencies (only zlib),
> - it has less build dependencies (can build static, no need for
> MMU/threads, ...)
>
> Most Linux distributions are now shipping gnupg2 by default. gnupg v1
> is now more for legacy/compatibility/specific cases.
>
> There is currently only two packages selecting gnupg in Buildroot:
> gpgme and python-gnupg
> This commit also reverses the logic for those packages.
>
> Signed-off-by: Julien Olivain <ju.o at free.fr>
> ---
> Tested with:
>
> support/testing/run-tests \
> -d dl -o output_folder \
> -k tests.package.test_python_gnupg.TestPythonPy3GnuPG
You should also test such changes in Config.in dependency handling with:
while true; do make randconfig; done
There are still a few errors that come out of that, but you can check that you
don't introduce new ones. Which you did :-)
>
> Note: this change was quickly discussed in:
> https://lists.buildroot.org/pipermail/buildroot/2022-January/634021.html
> ---
> package/gnupg/Config.in | 1 -
> package/gnupg2/Config.in | 1 +
> package/libgpgme/Config.in | 2 +-
> package/python-gnupg/Config.in | 2 +-
> 4 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/gnupg/Config.in b/package/gnupg/Config.in
> index 2db46318f1..e92fca709d 100644
> --- a/package/gnupg/Config.in
> +++ b/package/gnupg/Config.in
> @@ -1,6 +1,5 @@
> config BR2_PACKAGE_GNUPG
> bool "gnupg"
> - depends on !BR2_PACKAGE_GNUPG2
> select BR2_PACKAGE_ZLIB
> help
> GnuPG is the GNU project's complete and free implementation
> diff --git a/package/gnupg2/Config.in b/package/gnupg2/Config.in
> index ef1817ef02..9438cf69f6 100644
> --- a/package/gnupg2/Config.in
> +++ b/package/gnupg2/Config.in
> @@ -8,6 +8,7 @@ config BR2_PACKAGE_GNUPG2
> depends on BR2_TOOLCHAIN_HAS_THREADS # libnpth
> depends on BR2_USE_MMU # libassuan, libnpth
> depends on !BR2_STATIC_LIBS
I could fix those by moving all the dependencies to a new blind symbol
BR2_PACKAGE_GNUPG2_DEPENDS...
> + depends on !BR2_PACKAGE_GNUPG
> select BR2_PACKAGE_ZLIB
> select BR2_PACKAGE_LIBGPG_ERROR
> select BR2_PACKAGE_LIBGCRYPT
> diff --git a/package/libgpgme/Config.in b/package/libgpgme/Config.in
> index 4aabd06367..20f491b664 100644
> --- a/package/libgpgme/Config.in
> +++ b/package/libgpgme/Config.in
> @@ -3,7 +3,7 @@ config BR2_PACKAGE_LIBGPGME
> depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgpg-error
> depends on BR2_USE_MMU # libassuan
> #gnupg is not needed to build, but at runtime.
> - select BR2_PACKAGE_GNUPG if !BR2_PACKAGE_GNUPG2
> + select BR2_PACKAGE_GNUPG2 if !BR2_PACKAGE_GNUPG
And changing this into
select BR2_PACKAGE_GNUPG2 if BR2_PACKAGE_GNUPG2_DEPENDS && !BR2_PACKAGE_GNUPG
# runtime
select BR2_PACKAGE_GNUPG if !BR2_PACKAGE_GNUPG2_DEPENDS # runtime
See what got committed for the full context.
Also, there's package/gcr that had some missing dependencies, so I fixed that
in a separate commit as well.
Applied to master, thanks.
Regards,
Arnout
> select BR2_PACKAGE_LIBGPG_ERROR
> select BR2_PACKAGE_LIBASSUAN
> help
> diff --git a/package/python-gnupg/Config.in b/package/python-gnupg/Config.in
> index 038a940778..54f8fb6a29 100644
> --- a/package/python-gnupg/Config.in
> +++ b/package/python-gnupg/Config.in
> @@ -1,6 +1,6 @@
> config BR2_PACKAGE_PYTHON_GNUPG
> bool "python-gnupg"
> - select BR2_PACKAGE_GNUPG if !BR2_PACKAGE_GNUPG2 # runtime
> + select BR2_PACKAGE_GNUPG2 if !BR2_PACKAGE_GNUPG # runtime
> help
> A wrapper for the Gnu Privacy Guard (GPG or GnuPG).
>
More information about the buildroot
mailing list