Opened 6 days ago

Last modified 5 days ago

#71216 assigned defect

LyX: checksums mismatch

Reported by: barracuda156 Owned by: kurthindenburg (Kurt Hindenburg)
Priority: Normal Milestone:
Component: ports Version: 2.10.3
Keywords: Cc:
Port: LyX

Description

36-14% sudo port clean --all LyX
Warning: configured user/group macports does not exist, will build as root
--->  Cleaning LyX
36-14% sudo port -v -n upgrade LyX
Warning: configured user/group macports does not exist, will build as root
--->  Computing dependencies for LyX.
--->  Fetching distfiles for LyX
--->  lyx-2.4.2.tar.xz does not exist in /opt/local/var/macports/distfiles/LyX
--->  Attempting to fetch lyx-2.4.2.tar.xz from http://lyx.cybermirror.org/stable/2.4.x/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Attempting to fetch lyx-2.4.2.tar.xz from http://sunsite.icm.edu.pl/pub/unix/editors/lyx/stable/2.4.x/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17.0M  100 17.0M    0     0   614k      0  0:00:28  0:00:28 --:--:--  639k
--->  Verifying checksums for LyX
--->  Checksumming lyx-2.4.2.tar.xz
Error: Checksum (rmd160) mismatch for lyx-2.4.2.tar.xz
Portfile checksum: lyx-2.4.2.tar.xz rmd160 80b2c53d12b04dd64a6326b4b1ea505dcb352120
Distfile checksum: lyx-2.4.2.tar.xz rmd160 686630c5fe6d98bb29625e0818d9ad027bdb3814
Error: Checksum (sha256) mismatch for lyx-2.4.2.tar.xz
Portfile checksum: lyx-2.4.2.tar.xz sha256 7e8f56d148cb459eb00abbe9c6371744e4ff077b842c0024153a3f094b10d4ad
Distfile checksum: lyx-2.4.2.tar.xz sha256 0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68
Error: Checksum (size) mismatch for lyx-2.4.2.tar.xz
Portfile checksum: lyx-2.4.2.tar.xz size 16412700
Distfile checksum: lyx-2.4.2.tar.xz size 17871168
The correct checksum line may be:
checksums           rmd160  686630c5fe6d98bb29625e0818d9ad027bdb3814 \
                    sha256  0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68 \
                    size    17871168
Error: Failed to checksum LyX: Unable to verify file checksums

Change History (7)

comment:1 Changed 6 days ago by jmroot (Joshua Root)

Can't reproduce.

% sudo port -v fetch --no-mirror LyX
--->  Fetching distfiles for LyX
--->  lyx-2.4.2.tar.xz does not exist in /opt/local/var/macports/distfiles/LyX
--->  Attempting to fetch lyx-2.4.2.tar.xz from http://lyx.cybermirror.org/stable/2.4.x/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   196    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Attempting to fetch lyx-2.4.2.tar.xz from http://sunsite.icm.edu.pl/pub/unix/editors/lyx/stable/2.4.x/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17.0M  100 17.0M    0     0  3121k      0  0:00:05  0:00:05 --:--:-- 4370k
% sudo port -v checksum LyX         
--->  Verifying checksums for LyX
--->  Checksumming lyx-2.4.2.tar.xz

comment:2 Changed 6 days ago by jmroot (Joshua Root)

The checksums shown as "Portfile checksum" in your output are not the values set in the current Portfile.

checksums           rmd160  686630c5fe6d98bb29625e0818d9ad027bdb3814 \
                    sha256  0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68 \
                    size    17871168

comment:3 Changed 6 days ago by barracuda156

Hmm, I will check when I am back to that machine what went wrong.

comment:4 in reply to:  2 ; Changed 5 days ago by barracuda156

Replying to jmroot:

The checksums shown as "Portfile checksum" in your output are not the values set in the current Portfile.

checksums           rmd160  686630c5fe6d98bb29625e0818d9ad027bdb3814 \
                    sha256  0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68 \
                    size    17871168

Ok, you are right, yet the issue persists. I have verified that I do not have a custom portfile of LyX now and MacPorts uses the default portfile. But somehow it remembers wrong checksum (possibly from an earlier custom portfile, since then removed).

36-150% port file LyX
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/aqua/LyX/Portfile
36-150% sudo port clean --all LyX
Warning: configured user/group macports does not exist, will build as root
--->  Cleaning LyX
36-150% sudo port -v patch LyX
Warning: configured user/group macports does not exist, will build as root
--->  Computing dependencies for LyX.
--->  Fetching distfiles for LyX
--->  lyx-2.4.2.tar.xz does not exist in /opt/local/var/macports/distfiles/LyX
--->  Attempting to fetch lyx-2.4.2.tar.xz from http://lyx.cybermirror.org/stable/2.4.x/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Attempting to fetch lyx-2.4.2.tar.xz from http://sunsite.icm.edu.pl/pub/unix/editors/lyx/stable/2.4.x/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17.0M  100 17.0M    0     0  97495      0  0:03:03  0:03:03 --:--:--  319k
--->  Verifying checksums for LyX
--->  Checksumming lyx-2.4.2.tar.xz
Error: Checksum (rmd160) mismatch for lyx-2.4.2.tar.xz
Portfile checksum: lyx-2.4.2.tar.xz rmd160 80b2c53d12b04dd64a6326b4b1ea505dcb352120
Distfile checksum: lyx-2.4.2.tar.xz rmd160 686630c5fe6d98bb29625e0818d9ad027bdb3814
Error: Checksum (sha256) mismatch for lyx-2.4.2.tar.xz
Portfile checksum: lyx-2.4.2.tar.xz sha256 7e8f56d148cb459eb00abbe9c6371744e4ff077b842c0024153a3f094b10d4ad
Distfile checksum: lyx-2.4.2.tar.xz sha256 0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68
Error: Checksum (size) mismatch for lyx-2.4.2.tar.xz
Portfile checksum: lyx-2.4.2.tar.xz size 16412700
Distfile checksum: lyx-2.4.2.tar.xz size 17871168
The correct checksum line may be:
checksums           rmd160  686630c5fe6d98bb29625e0818d9ad027bdb3814 \
                    sha256  0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68 \
                    size    17871168
Error: Failed to checksum LyX: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_LyX/LyX/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.

Ports are synced, and the portfile has the correct checksum. So what can it be? A broken index? But this is the only port I see this problem with. I build a lot during past few days due to a month gap. Everything else is fine.

comment:5 in reply to:  4 Changed 5 days ago by ryandesign (Ryan Carsten Schmidt)

The Portfile switches the version number and checksums when the +qt4 variant is selected. Ports aren't allowed to change the version in a variant because that doesn't work properly.

Last edited 5 days ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 5 days ago by ryandesign (Ryan Carsten Schmidt)

This specific problem, the checksum mismatch, is solvable:

  • aqua/LyX/Portfile

    diff --git a/aqua/LyX/Portfile b/aqua/LyX/Portfile
    index 5d45fe0c357..2deaff87802 100644
    a b name LyX 
    88conflicts           LyX1
    99version             2.4.2
    1010revision            0
    11 set branch          [join [lrange [split ${version} .] 0 1] .]
     11options branch
     12default branch      {[join [lrange [split ${version} .] 0 1] .]}
    1213categories          aqua
    1314license             GPL-2+
    1415maintainers         {khindenburg @kurthindenburg} openmaintainer
    depends_lib-append port:enchant \ 
    2930                        port:aspell
    3031
    3132use_xz              yes
    32 distname            lyx-${version}
    33 worksrcdir          lyx-${version}
     33default distname    {lyx-${version}}
     34default worksrcdir  {lyx-${version}}
    3435
    35 master_sites        http://lyx.cybermirror.org/stable/${branch}.x/ \
     36default master_sites {http://lyx.cybermirror.org/stable/${branch}.x/ \
    3637                    http://sunsite.icm.edu.pl/pub/unix/editors/lyx/stable/${branch}.x/ \
    3738                    ftp://ftp.ntua.gr/pub/X11/LyX/stable/${branch}.x/ \
    38                     ftp://ftp.lyx.org/pub/lyx/stable/${branch}.x/
     39                    ftp://ftp.lyx.org/pub/lyx/stable/${branch}.x/}
    3940
    4041checksums           rmd160  686630c5fe6d98bb29625e0818d9ad027bdb3814 \
    4142                    sha256  0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68 \

However the general problem with switching versions in a variant is not solvable by a port because MacPorts wasn't designed to accommodate it. There is only one entry for a port in the portindex. One set of information, including the port's version. Let's say that the portindex records the port's information with no variants selected, so the version of this port in the index is 2.4.2. But the user installs the port with the +qt4 variant, so the version that's actually installed is 2.3.8. Every time the user runs port outdated, MacPorts will tell the user that version 2.4.2 is available, even though it isn't. The user will try to run sudo port upgrade LyX which will do nothing.

comment:7 in reply to:  6 Changed 5 days ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

However the general problem with switching versions in a variant is not solvable by a port because MacPorts wasn't designed to accommodate it. There is only one entry for a port in the portindex. One set of information, including the port's version. Let's say that the portindex records the port's information with no variants selected, so the version of this port in the index is 2.4.2. But the user installs the port with the +qt4 variant, so the version that's actually installed is 2.3.8. Every time the user runs port outdated, MacPorts will tell the user that version 2.4.2 is available, even though it isn't. The user will try to run sudo port upgrade LyX which will do nothing.

For this port, the general problem is not quite so bad because the port enables the +qt4 variant by default on some systems. There are separate portindexes for each major OS version on each architecture, so on those systems where the +qt4 variant is selected by default, the 2.3.8 version will be recorded in the index and port outdated won't show misleading information. There will only be a problem if the user tries to select the +qt4 or +qt5 variant if that was not the default. You could avoid the problem entirely by removing the qt4 and qt5 variants and just force the port into qt4 or qt5 mode as required by the OS version. Or you could make separate qt4 and qt5 versions of the port, using subports if you desire.

Note: See TracTickets for help on using tickets.