Opened 4 years ago

Last modified 14 months ago

#61245 assigned enhancement

gnupg1 @1.4.23_1: Please make it co-installable with gnupg2

Reported by: macportsraf Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gnupg1

Description

gnupg1 and gnupg2 cannot both be installed on the same system. I had to uninstall the julia port because it now depends on gnupg2 but I need gnupg1. I'd like gnupg2 anyway, but I need gnupg1 more.

Change History (7)

comment:1 Changed 4 years ago by Ionic (Mihai Moldovan)

Resolution: wontfix
Status: newclosed

Sorry, nope.

The conflicting design is intended.

gnupg1 is obsolete, legacy software that is not maintained upstream any longer and we provide as a courtesy for users who still need to read old encrypted data (and hopefully never modify any data with), but it is not intended to be used as the system-gpg version.

I could have removed it instead, but it has a very small useful niche, so I kept it. All dependencies were changed to use the newest, still supported version - 2.2.

comment:2 Changed 4 years ago by macportsraf

Just in case anyone else needs both gnupg1 and gnupg2 at the same time, here is a Portfile for a "gnupg14" port that can be hosted locally. It adds a "1" suffix to binary names so as not to clash with gnupg2, the system gpg.

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

set my_name         gnupg
name                ${my_name}14
version             1.4.23
#revision            1
categories          mail security
license             GPL-3+
installs_libs       no
maintainers         macports@raf.org
description         GNU Privacy Guard version 1.4
long_description    GnuPG is a complete and free replacement for PGP. Because \
                    it does not use the patented IDEA algorithm, it can be used \
                    without any restrictions. GnuPG is a RFC4880 (OpenPGP) \
                    compliant application.
homepage            https://www.gnupg.org
platforms           darwin freebsd sunos
distname            ${my_name}-${version}
master_sites        ${my_name}:${my_name}

use_bzip2           yes

checksums           rmd160  087c494ff78bd1e85873ac383e0c6e236b6a9869 \
                    sha256  c9462f17e651b6507848c08c430c791287cd75491f8b5a8b50c6ed46b12678ba \
                    size    3749353

configure.args      --infodir=${prefix}/share/info \
                    --disable-asm \
                    --with-libiconv-prefix=${prefix} \
                    --with-libintl-prefix=${prefix} \
                    --with-zlib=${prefix} \
                    --with-bzip2=${prefix} \
                    --with-libusb=${prefix} \
                    --with-ldap=${prefix} \
                    --with-libcurl=${prefix} \
                    --program-suffix=1 \
                    --docdir=${prefix}

depends_lib         port:libiconv \
                    port:gettext \
                    port:readline \
                    port:zlib \
                    port:bzip2 \
                    port:libusb-compat \
                    port:openldap \
                    port:curl

test.run            yes
test.dir            ${worksrcpath}/checks
test.target         check

# clang defaults to c99, and gnupg doesn't play nicely
if {[string match *clang* ${configure.compiler}]} {
    configure.cflags-append -std=gnu89
}

platform sunos {
    configure.args-delete --disable-asm
}

notes {
    This port is a legacy 1.4 release of GnuPG.

    While this release is still maintained, it is also deprecated\
    and less useful than it was before, since agent and dirmngr\
    support have been removed.

    Basic functionality like signature checking or encryption\
    and decryption might still work, if the algorithms employed\
    are supported, but users are highly recommended to switch to\
    the modern version of GnuPG, provided by the gnupg2 port.

    This port is co-installable with the modern version.\
    All binaries are postfixed with "1".
}

livecheck.type      regex
livecheck.url       https://www.gnupg.org/ftp/gcrypt/${my_name}/
livecheck.regex     ${my_name}-(1(?:\\.\\d+)+)

comment:3 in reply to:  1 ; Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to Ionic:

The conflicting design is intended.

That's not what port notes gnupg1 says:

  This port will be made co-installable with the modern version in mid-October 2018.
  All binaries will be postfixed with "1" and dependents switched over to pull in
  modern GnuPG, eventually forcing an upgrade. After this date, this port will still
  be provided for users that need to work on old data, which is not supported by the
  modern version any longer, but not used within MacPorts.

Maybe that paragraph of the notes should be removed or changed?

comment:4 in reply to:  3 Changed 4 years ago by Ionic (Mihai Moldovan)

Resolution: wontfix
Status: closedreopened

Replying to ryandesign:

Replying to Ionic:

The conflicting design is intended.

That's not what port notes gnupg1 says:

[...]

Maybe that paragraph of the notes should be removed or changed?

Oh, very good point.

I guess my original plan was to make it co-installable, but also hope that users won't use it as the system version.

Reopening, because the request is sane after all and I remembered wrongly.

comment:5 Changed 4 years ago by macportsraf

The intent is not to use gnupg1 as the system gpg. But that is the only possibility if I need gnupg1 and it installs /opt/local/bin/gpg. I want gnupg1 to install /opt/local/bin/gpg1 thus allowing me to install gnupg2 to provide /opt/local/bin/gpg as the system gpg. While the two ports conflict, whichever port I install is the system gpg by definition.

If possible, it would also be good if gnupg1 created /opt/local/share/gnupg1 instead of /opt/local/share/gnupg. I didn't know how to make that happen. There are no clashing files so it's not strictly necessary, but if gnupg2 ever adds an FAQ or options.skel file to /opt/local/share/gnupg, there would be a clash. But if that's unlikely, then it's not important.

comment:6 Changed 4 years ago by mf2k (Frank Schima)

Cc: ionic@… removed
Owner: set to Ionic
Status: reopenedassigned
Version: 2.6.3

comment:7 Changed 14 months ago by macportsraf

This has been FIXED and can be closed. It was resolved with this commit:

https://github.com/macports/macports-ports/commit/c29ac1128cafe82e15e1293b6c4af1c9579b3a79

The gnupg1 port now uses a program suffix "1" to distinguish it from gnupg2's binaries. Other ports with variants that depend on gnupg1 were also modified accordingly.

Note: See TracTickets for help on using tickets.