Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miniserve: Update to 0.19.1 #13909

Merged
merged 1 commit into from Feb 16, 2022
Merged

Conversation

judaew
Copy link
Member

@judaew judaew commented Feb 6, 2022

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS x.y
Xcode x.y

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint --nitpick?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@macportsbot macportsbot added by: member Created by a member with commit rights maintainer maintainer: open Affects an openmaintainer port type: update labels Feb 6, 2022
@judaew
Copy link
Member Author

judaew commented Feb 6, 2022

Hi @herbygillot, I get the following error:

:info:extract Adding mime_guess-ac76840e14bc6f2f7cbbb347052ec7e4de7e3043.tar.gz from github to cargo home
:debug:extract system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_judaew_macports-ports_net_miniserve/miniserve/work/.home/.cargo/macports: /usr/bin/tar -xf /opt/local/var/macports/distfiles/cargo-crates/mime_guess-ac76840e14bc6f2f7cbbb347052ec7e4de7e3043.tar.gz
:error:extract Failed to extract miniserve: can't read "cversion": no such variable
:debug:extract Error code: NONE
:debug:extract Backtrace: can't read "cversion": no such variable

I think the problem is somewhere in the cargo_fetch PG. The mime_guess package uses the cargo.crates_github option.

@herbygillot
Copy link
Member

Hi @herbygillot, I get the following error:

:info:extract Adding mime_guess-ac76840e14bc6f2f7cbbb347052ec7e4de7e3043.tar.gz from github to cargo home
:debug:extract system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_judaew_macports-ports_net_miniserve/miniserve/work/.home/.cargo/macports: /usr/bin/tar -xf /opt/local/var/macports/distfiles/cargo-crates/mime_guess-ac76840e14bc6f2f7cbbb347052ec7e4de7e3043.tar.gz
:error:extract Failed to extract miniserve: can't read "cversion": no such variable
:debug:extract Error code: NONE
:debug:extract Backtrace: can't read "cversion": no such variable

I think the problem is somewhere in the cargo_fetch PG. The mime_guess package uses the cargo.crates_github option.

I notice the same issue is happening in the previous version of miniserve as well. Why this is happening wasn't clear to me at first glance, will revisit. BTW doesn't mime_guess also need to be updated as part of this change? The change that this Portfile was waiting on in mime_guess has been merged.

@judaew
Copy link
Member Author

judaew commented Feb 7, 2022

I notice the same issue is happening in the previous version of miniserve as well. Why this is happening wasn't clear to me at first glance, will revisit.

There was no problem in the previous version here you can see that we have a pre-built package for 0.18.0: http://packages.macports.org/miniserve/. But now it's broken.

The change that this Portfile was waiting on in mime_guess has been merged.

The PR has been merged, but the author of mime_guess still hasn't released a new version. See abonander/mime_guess#68. Therefore, in any case for port need to get mime_guess from GitHub.

@svenstaro
Copy link

FYI I just released miniserve 0.19.1 which builds the released version of mime_guess.

@judaew judaew changed the title [WIP] miniserve: Update to 0.19.0 miniserve: Update to 0.19.1 Feb 16, 2022
@judaew judaew marked this pull request as ready for review February 16, 2022 22:56
@judaew
Copy link
Member Author

judaew commented Feb 16, 2022

@svenstaro This is great news, thanks!

@judaew judaew merged commit 177e719 into macports:master Feb 16, 2022
@judaew judaew deleted the update/miniserve-0.19.0 branch February 16, 2022 23:09
@harens
Copy link
Member

harens commented Mar 5, 2022

Hi @herbygillot, I get the following error:

:info:extract Adding mime_guess-ac76840e14bc6f2f7cbbb347052ec7e4de7e3043.tar.gz from github to cargo home
:debug:extract system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_judaew_macports-ports_net_miniserve/miniserve/work/.home/.cargo/macports: /usr/bin/tar -xf /opt/local/var/macports/distfiles/cargo-crates/mime_guess-ac76840e14bc6f2f7cbbb347052ec7e4de7e3043.tar.gz
:error:extract Failed to extract miniserve: can't read "cversion": no such variable
:debug:extract Error code: NONE
:debug:extract Backtrace: can't read "cversion": no such variable

I think the problem is somewhere in the cargo_fetch PG. The mime_guess package uses the cargo.crates_github option.

Just ran into this now on a port I'm working on. The error comes from this procedure:

proc cargo._import_crate_github {cname cgithub crevision chksum cratefile} {
global cargo.home
set crepo [lindex [split ${cgithub} "/"] 1]
set cdirname "${crepo}-${crevision}"
ui_info "Adding ${cratefile} from github to cargo home"
cargo._extract_crate ${cratefile}
cargo._write_cargo_checksum ${cdirname} "null"
cargo._old_macos_compatibility ${cname} ${cversion}
}

More specifically, the last line references cversion which doesn't exist for github crates. It was added in 8f43fdc with the purpose of modifying the crypto-hash and curl-sys dependencies if they exist.

I think the easiest fix would be to remove this line and assume that if these dependencies are being fetched, it would be from cargo and not github. There might be a better solution however that I'm missing. Thoughts? CC @catap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by: member Created by a member with commit rights maintainer: open Affects an openmaintainer port maintainer type: update
5 participants