Opened 8 months ago

Closed 8 months ago

#68562 closed defect (fixed)

ocaml-astring: extract is broken

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: tiger leopard snowleopard lion mountainlion Cc:
Port: ocaml-astring

Description

How did it even pass CI?

--->  Extracting astring-0.8.5.tbz
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_ocaml_ocaml-astring/ocaml-astring/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/ocaml-astring/astring-0.8.5.tbz' | /usr/bin/gnutar --no-same-owner -xf - 

gzip: /opt/local/var/macports/distfiles/ocaml-astring/astring-0.8.5.tbz: not in gzip format

What works is this:

distfiles           astring-${version}.tbz
use_bzip2           yes
extract.rename      yes

Change History (7)

comment:1 Changed 8 months ago by pguyot (Paul Guyot)

Which version of macOS did it fail on?

It passed CI because gzip can process bz2 files on macOS 11+ See:

https://github.com/macports/macports-ports/actions/runs/6604961928/job/17939653275?pr=20786#step:8:230

So I didn't notice that extract.suffix .tbz doesn't imply using bzip2.

comment:2 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: tiger leopard snowleopard lion mountainlion added
Owner: changed from pguyot to ryandesign
Status: assignedaccepted

Only affects Mountain Lion and earlier. gzip on Mavericks and later auto-detects the compression type.

Only use_bzip2 yes needs to be added, before setting extract.suffix .tbz. I'll take care of it with my next batch of commits.

extract.rename yes should not be used when it is simple to specify the correct worksrcdir as the port already does by setting distname.

comment:3 Changed 8 months ago by pguyot (Paul Guyot)

@ryandesign I did submit https://github.com/macports/macports-ports/pull/21102 with the proposed change from @barracuda156 which I tested locally (but on macOS 14, not Mountain Lion or earlier). I tried with only use_bzip2 but failed to get it right. Please feel free to take over, though.

comment:4 in reply to:  2 Changed 8 months ago by barracuda156

Replying to ryandesign:

Indeed, when use_bzip2 yes is added before setting extract.suffix .tbz, nothing else is needed. (I added after, which led to additional change being needed.)

comment:5 Changed 8 months ago by pguyot (Paul Guyot)

I did update https://github.com/macports/macports-ports/pull/21102 to reflect the minimal change (which is just adding missing use_bzip2 in the proper position).

comment:6 in reply to:  5 Changed 8 months ago by barracuda156

Replying to pguyot:

I did update https://github.com/macports/macports-ports/pull/21102 to reflect the minimal change (which is just adding missing use_bzip2 in the proper position).

Thank you!

comment:7 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 77ee90523d436c46748dffa038ad62e7019175f5/macports-ports (master):

ocaml-astring: Fix extract on OS X <= 10.8

Closes: #68562

Note: See TracTickets for help on using tickets.