Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#29847 closed defect (fixed)

nawk: checksum mismatch

Reported by: rens@… Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt), danielluke (Daniel J. Luke)
Port: nawk

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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 (2)

nawk.diff (1.9 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
proposed patch
nawk-20110810.diff (1.9 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
proposed patch

Download all attachments as: .zip

Change History (23)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)
Keywords: haspatch added; checksum failed removed
Owner: changed from macports-tickets@… to toby@…
Summary: Can't install dnsmasq because of checksum mismatch for nawknawk: 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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: nawk.diff added

proposed patch

comment:2 Changed 13 years ago by tobypeterson

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

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

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

comment:4 Changed 13 years ago by tobypeterson

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

comment:5 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by tobypeterson

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

comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by tobypeterson

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by danielluke (Daniel J. Luke)

Could something like this work instead?

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

comment:11 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by danielluke (Daniel J. Luke)

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 13 years ago by danielluke (Daniel J. Luke)

Cc: dluke@… added

Cc Me!

comment:14 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by danielluke (Daniel J. Luke)

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 13 years ago by tobypeterson

Resolution: fixed
Status: newclosed

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 13 years ago by jameschurchman@…

Resolution: fixed
Status: closedreopened

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: nawk-20110810.diff added

proposed patch

comment:19 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

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 13 years ago by jmroot (Joshua Root)

And I put back the cflags in r82483.

comment:21 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

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

Note: See TracTickets for help on using tickets.