New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #29847 (closed defect: fixed)

Opened 2 years ago

Last modified 22 months ago

nawk: checksum mismatch

Reported by: rens@… Owned by: toby@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: haspatch Cc: ryandesign@…, dluke@…
Port: nawk

Description (last modified by ryandesign@…) (diff)

I try to install dnsmasq which failes with:

Error: Failed to install nawk
Log for nawk is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_sea.us.rsync.macports.org_release_ports_lang_nawk/main.log
Error: The following dependencies were not installed: nawk
Error: Status 1 encountered during processing.

The logfile tells me:

:info:checksum The correct checksum line may be:
:info:checksum checksums           md5     4d2b1002db5979a2f3a578e11b7d2fb3 \
                    sha1    567eb99d30337cb323bee39284527cecd3d45b02 \
                    rmd160  b9286a65f6f1887ede837e2b6328c13bfc327fa3
:error:checksum Target org.macports.checksum returned: Unable to verify file checksums
:debug:checksum Backtrace: Unable to verify file checksums
    while executing

Just installing the nawk package of course also ends up in a checksum mismatch error.

I tried to do a 'sudo port selfupdate' and a 'sudo port sync' multiple times (I've had the problem about 3 weeks ago, and tried a few times since then). But still the error.

Attachments

nawk.diff (1.9 KB) - added by ryandesign@… 2 years ago.
proposed patch
nawk-20110810.diff (1.9 KB) - added by ryandesign@… 22 months ago.
proposed patch

Change History

comment:1 Changed 2 years ago by ryandesign@…

  • Cc ryandesign@… added
  • Keywords haspatch added; checksum failed removed
  • Description modified (diff)
  • Owner changed from macports-tickets@… to toby@…
  • Summary changed from Can't install dnsmasq because of checksum mismatch for nawk to nawk: checksum mismatch

Confirmed, the port version is 20100523 but the distfile on the main server was last updated 20110506.

The attached patch updates the port to this version, and also makes it respect build_arch, and adds a universal variant.

Changed 2 years ago by ryandesign@…

proposed patch

comment:2 Changed 2 years ago by toby@…

I'll take a look at this a bit later today.

comment:3 Changed 2 years ago by ryandesign@…

Did you get a chance to look at the diff? It worked for me.

comment:4 Changed 2 years ago by toby@…

All that variant universal stuff wasn't necessary before, something changed in base?

comment:5 Changed 2 years ago by ryandesign@…

Nothing changed in base; the port was always broken. The standard universal variant only works with ports using normal configure scripts, and the nawk port overrides the configure phase entirely, so it must manually handle universal and build_arch, as in the patch.

comment:6 Changed 2 years ago by toby@…

configure.cflags used to contain the -arch flags directly, so no conditional logic was required in the Portfile itself.

comment:7 Changed 2 years ago by ryandesign@…

MacPorts does put the -arch flags into CFLAGS, CXXFLAGS, LDFLAGS, etc, but AFAIK they were never part of the variables configure.cflags, configure.cxxflags, configure.ldflags, etc. At least, they are not now.

comment:8 Changed 2 years ago by toby@…

Indeed, breaking a number of my ports. Fun. I'll try to find some time to go through and make the necessary adjustments. Hopefully without adding conditional logic to everything.

comment:9 Changed 2 years ago by ryandesign@…

I'm not sure if there's a good reason why the -arch flags aren't included in those variables, so I'll ask on the mailing list. It is inconvenient to have that conditional logic in every port that doesn't use a standard configure phase, yet that is the status quo.

comment:10 Changed 2 years ago by dluke@…

Could something like this work instead?

set archflags ${configure.cc_archflags}
variant universal {
     uplevel {set archflags ${configure.universal_cflags}}
}

comment:11 follow-up: ↓ 12 Changed 2 years ago by ryandesign@…

I'm sure there are many Tcl constructs that would accomplish the same thing. But the construct submitted in my patch is the one already being used in dozens of ports in MacPorts and thus has the advantage of already being familiar to some portfile readers.

comment:12 in reply to: ↑ 11 Changed 2 years ago by dluke@…

Replying to ryandesign@…:

I'm sure there are many Tcl constructs that would accomplish the same thing. But the construct submitted in my patch is the one already being used in dozens of ports in MacPorts and thus has the advantage of already being familiar to some portfile readers.

and has the disadvantage of using variant_isset, which is generally a sign of working against the MacPorts infrastructure instead of working with it...

comment:13 Changed 2 years ago by dluke@…

  • Cc dluke@… added

Cc Me!

comment:14 Changed 2 years ago by ryandesign@…

variant_isset is a perfectly fine and documented function portfiles are free to use. I count about 650 ports currently doing so. uplevel on the other hand is not mentioned anywhere in the guide and is not used by any ports.

Actually maybe the use of uplevel isn't necessary in your code sample.

If minimizing use of variant_isset or introducing the use of uplevel in portfiles are discussions you want to have, let's have them on the macports-dev mailing list. This ticket is merely for updating nawk to the latest version, and incidentally to fix it so it builds for the correct architectures, using a proven method already employed by dozens of ports.

comment:15 Changed 2 years ago by dluke@…

We've had the discussion on list before.

I only commented here because of the expressed preference to avoid having to use a similar conditional in many ports. Being able to keep everything necessary for +universal inside of the universal variant definition is a win, I think.

comment:16 Changed 23 months ago by toby@…

  • Status changed from new to closed
  • Resolution set to fixed

Being able to keep everything necessary for +universal inside base was even better. Anyway, that regression is a discussion for another bug. Updated in r80297, no real benefit to having universal nawk anyway.

comment:17 Changed 22 months ago by jameschurchman@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

I also get :

Port command started with PID 3720
Fetching archive for nawk
Attempting to fetch nawk-20110506_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/nawk
Fetching nawk
Attempting to fetch awk.tar.gz from http://www.cs.princeton.edu/~bwk/btl.mirror/
Verifying checksum(s) for nawk
Error: Checksum (md5) mismatch for awk.tar.gz
Error: Checksum (sha1) mismatch for awk.tar.gz
Error: Checksum (rmd160) mismatch for awk.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: Unable to execute port: could not set effective gid to 0
To report a bug, see <http://guide.macports.org/#project.tickets>
Executing: /opt/local/bin/port install nawk

also done the usual "sudo port selfupdate" & "sudo port clean nawk" and it still fails

James

comment:18 Changed 22 months ago by ryandesign@…

Yes, the developer of nawk has updated it again, so we need to update the portfile again. Attached is a patch to do this and address the other remaining concern of this ticket. In the future when a new update is needed, file a new ticket please rather than re-opening an old resolved one.

Changed 22 months ago by ryandesign@…

proposed patch

comment:19 Changed 22 months ago by ryandesign@…

  • Status changed from reopened to closed
  • Resolution set to fixed

Toby committed the update to 20110810 in r82426 and the fix to the livecheck in r82427, and I fixed the universal variant in r82456.

comment:20 Changed 22 months ago by jmr@…

And I put back the cflags in r82483.

comment:21 Changed 22 months ago by ryandesign@…

Whoops! Those weren't supposed to get deleted. Sorry about that.

Note: See TracTickets for help on using tickets.