Skip to content

parse-netrc build: remove '-Z config-profile' from 'cargo build' flags (no longer needed) #69

@salewski

Description

@salewski

The 'cargo-build' make target used to build the parse-netrc program specifies the '-Z config-profile' option. Prior to Rust 1.43.0 (released 2020-04-23), that flag was needed to cause profiles to be read from .cargo/config files; the config-profile feature was stabilized as of 1.43.0.

Now that Rust (and Cargo) versions newer than 1.42.x are widely deployed, the 'config-profile' feature is enabled by default. There is no longer a need to explicitly enable it, and in fact our doing so causes the build to break when using current versions of Cargo:

    $ make
    ...
    Making all in parse-netrc
    make[5]: Entering directory '/path/to/ads-github-tools-0.3.2-BUILD/src/main/rust/bin/parse-netrc'
    set -ex ;\
    rm -f "src/main.rs" "src/main.rs.tmp" ;\
    _t_base="src/main.rs"        ;\
    /usr/bin/mkdir -p "$("/usr/bin/dirname" "src/main.rs.tmp")" ;\
    sed -e 's,[@]PACKAGE[@],ads-github-tools,g' -e 's,[@]PACKAGE_NAME[@],ADS GitHub Tools,g' -e 's,[@]PACKAGE_TARNAME[@],ads-github-tools,g' -e 's,[@]PACKAGE_VERSION[@],0.3.2,g' -e 's,[@]PACKAGE_STRING[@],ADS GitHub Tools 0.3.2,g' -e 's,[@]PACKAGE_BUGREPORT[@],Alan D. Salewski <ads@salewski.email>,g' -e 's,[@]PACKAGE_URL[@],https://github.com/salewski/ads-github-tools,g' -e 's,[@]VERSION[@],0.3.2,g' -e 's,[@]PATH_SEPARATOR[@],:,g' -e 's,[@]configure_input[@],Generated from src/main.rs.in; do not edit by hand.,g' -e "s,[@]BUILD_DATE[@],$(date '+%Y-%m-%d %H:%M:%S'),g" -e 's,[@]bindir[@],/path/to/ads-github-tools-0.3.2/bin,g' -e 's,[@]datadir[@],/path/to/ads-github-tools-0.3.2/share,g' -e 's,[@]exec_prefix[@],/path/to/ads-github-tools-0.3.2,g' -e 's,[@]includedir[@],/path/to/ads-github-tools-0.3.2/include,g' -e 's,[@]infodir[@],/path/to/ads-github-tools-0.3.2/share/info,g' -e 's,[@]libdir[@],/path/to/ads-github-tools-0.3.2/lib,g' -e 's,[@]libexecdir[@],/path/to/ads-github-tools-0.3.2/libexec,g' -e 's,[@]localstatedir[@],/path/to/ads-github-tools-0.3.2/var,g' -e 's,[@]mandir[@],/path/to/ads-github-tools-0.3.2/share/man,g' -e 's,[@]oldincludedir[@],/usr/include,g' -e 's,[@]prefix[@],/path/to/ads-github-tools-0.3.2,g' -e 's,[@]sbindir[@],/path/to/ads-github-tools-0.3.2/sbin,g' -e 's,[@]sharedstatedir[@],/path/to/ads-github-tools-0.3.2/com,g' -e 's,[@]sysconfdir[@],/path/to/ads-github-tools-0.3.2/etc,g' -e 's,[@]abs_builddir[@],/path/to/ads-github-tools-0.3.2-BUILD/src/main/rust/bin/parse-netrc,g' -e 's,[@]abs_srcdir[@],/path/to/ads-github-tools-0.3.2-BUILD/../ads-github-tools-0.3.2/src/main/rust/bin/parse-netrc,g' -e 's,[@]abs_top_builddir[@],/path/to/ads-github-tools-0.3.2-BUILD,g' -e 's,[@]srcdir[@],../../../../../../ads-github-tools-0.3.2/src/main/rust/bin/parse-netrc,g' -e 's,[@]top_builddir[@],../../../../..,g' -e 's,[@]top_srcdir[@],../../../../../../ads-github-tools-0.3.2,g' -e 's,[@]PERL[@],/usr/bin/perl,g' -e 's,[@]POD2MAN[@],/usr/bin/pod2man,g' -e 's,[@]ads_perl5_extra_includes[@],,g' -e 's,[@]perl5_pkgvdatadir[@],/path/to/ads-github-tools-0.3.2/share/ads-github-tools-0.3.2/perl5,g' -e 's,[@]cargo_vendored_root[@],../../../../../../ads-github-tools-0.3.2/src/third-party/cargo-vendored,g' -e 's,[@]AWK_PROG[@],/usr/bin/awk,g' -e 's,[@]BASENAME_PROG[@],/usr/bin/basename,g' -e 's,[@]BASH_SH[@],/usr/bin/bash,g' -e 's,[@]BC_PROG[@],/usr/bin/bc,g' -e 's,[@]CARGO_PROG[@],/usr/bin/cargo,g' -e 's,[@]CARGO_PROG_VERSION[@],1.46.0,g' -e 's,[@]CAT[@],/usr/bin/cat,g' -e 's,[@]CHGRP[@],/usr/bin/chgrp,g' -e 's,[@]CHMOD_PROG[@],/usr/bin/chmod,g' -e 's,[@]CHOWN[@],/usr/bin/chown,g' -e 's,[@]CP_PROG[@],/usr/bin/cp,g' -e 's,[@]DIRNAME_PROG[@],/usr/bin/dirname,g' -e 's,[@]CURL_PROG[@],/usr/bin/curl,g' -e 's,[@]DATE_PROG[@],/usr/bin/date,g' -e 's,[@]ECHO_PROG[@],/usr/bin/echo,g' -e 's,[@]EXPR_PROG[@],/usr/bin/expr,g' -e 's,[@]FIND[@],/usr/bin/find,g' -e 's,[@]GIT_PROG[@],/usr/bin/git,g' -e 's,[@]GIT_HUB_PROG[@],/usr/bin/git-hub,g' -e 's,[@]GREP[@],/usr/bin/grep,g' -e 's,[@]GROUPADD[@],/usr/sbin/groupadd,g' -e 's,[@]HEAD_PROG[@],/usr/bin/head,g' -e 's,[@]ID_PROG[@],/usr/bin/id,g' -e 's,[@]JQ_PROG[@],/usr/bin/jq,g' -e 's,[@]MKDIR_PROG[@],/usr/bin/mkdir,g' -e 's,[@]MKTEMP_PROG[@],/usr/bin/mktemp,g' -e 's,[@]MV_PROG[@],/usr/bin/mv,g' -e 's,[@]SED[@],/usr/bin/sed,g' -e 's,[@]READLINK_PROG[@],/usr/bin/readlink,g' -e 's,[@]RM[@],/usr/bin/rm,g' -e 's,[@]RMDIR[@],/usr/bin/rmdir,g' -e 's,[@]RUSTC_PROG[@],/usr/bin/rustc,g' -e 's,[@]SHA256SUM_PROG[@],/usr/bin/sha256sum,g' -e 's,[@]SHA3SUM_PROG[@],/usr/bin/sha3sum,g' -e 's,[@]TAIL_PROG[@],/usr/bin/tail,g' -e 's,[@]TR_PROG[@],/usr/bin/tr,g' -e 's,[@]USERADD[@],/usr/sbin/useradd,g' -e 's,[@]USERMOD[@],/usr/sbin/usermod,g' -e 's,[@]WC_PROG[@],/usr/bin/wc,g' -e 's,[@]XARGS_PROG[@],/usr/bin/xargs,g' -e 's,[@]ZSTD_PROG[@],/usr/bin/zstd,g'  "../../../../../../ads-github-tools-0.3.2/src/main/rust/bin/parse-netrc/${_t_base}.in" > "src/main.rs.tmp" ;\
    mv "src/main.rs.tmp" "src/main.rs"    ;\
    chmod a-w "src/main.rs"      ;\
    chmod a+r "src/main.rs"
    + rm -f src/main.rs src/main.rs.tmp
    + _t_base=src/main.rs
    ++ /usr/bin/dirname src/main.rs.tmp
    + /usr/bin/mkdir -p src
    ++ date '+%Y-%m-%d %H:%M:%S'
    + sed -e 's,[@]PACKAGE[@],ads-github-tools,g' -e 's,[@]PACKAGE_NAME[@],ADS GitHub Tools,g' -e 's,[@]PACKAGE_TARNAME[@],ads-github-tools,g' -e 's,[@]PACKAGE_VERSION[@],0.3.2,g' -e 's,[@]PACKAGE_STRING[@],ADS GitHub Tools 0.3.2,g' -e 's,[@]PACKAGE_BUGREPORT[@],Alan D. Salewski <ads@salewski.email>,g' -e 's,[@]PACKAGE_URL[@],https://github.com/salewski/ads-github-tools,g' -e 's,[@]VERSION[@],0.3.2,g' -e 's,[@]PATH_SEPARATOR[@],:,g' -e 's,[@]configure_input[@],Generated from src/main.rs.in; do not edit by hand.,g' -e 's,[@]BUILD_DATE[@],2021-03-26 07:55:06,g' -e 's,[@]bindir[@],/path/to/ads-github-tools-0.3.2/bin,g' -e 's,[@]datadir[@],/path/to/ads-github-tools-0.3.2/share,g' -e 's,[@]exec_prefix[@],/path/to/ads-github-tools-0.3.2,g' -e 's,[@]includedir[@],/path/to/ads-github-tools-0.3.2/include,g' -e 's,[@]infodir[@],/path/to/ads-github-tools-0.3.2/share/info,g' -e 's,[@]libdir[@],/path/to/ads-github-tools-0.3.2/lib,g' -e 's,[@]libexecdir[@],/path/to/ads-github-tools-0.3.2/libexec,g' -e 's,[@]localstatedir[@],/path/to/ads-github-tools-0.3.2/var,g' -e 's,[@]mandir[@],/path/to/ads-github-tools-0.3.2/share/man,g' -e 's,[@]oldincludedir[@],/usr/include,g' -e 's,[@]prefix[@],/path/to/ads-github-tools-0.3.2,g' -e 's,[@]sbindir[@],/path/to/ads-github-tools-0.3.2/sbin,g' -e 's,[@]sharedstatedir[@],/path/to/ads-github-tools-0.3.2/com,g' -e 's,[@]sysconfdir[@],/path/to/ads-github-tools-0.3.2/etc,g' -e 's,[@]abs_builddir[@],/path/to/ads-github-tools-0.3.2-BUILD/src/main/rust/bin/parse-netrc,g' -e 's,[@]abs_srcdir[@],/path/to/ads-github-tools-0.3.2-BUILD/../ads-github-tools-0.3.2/src/main/rust/bin/parse-netrc,g' -e 's,[@]abs_top_builddir[@],/path/to/ads-github-tools-0.3.2-BUILD,g' -e 's,[@]srcdir[@],../../../../../../ads-github-tools-0.3.2/src/main/rust/bin/parse-netrc,g' -e 's,[@]top_builddir[@],../../../../..,g' -e 's,[@]top_srcdir[@],../../../../../../ads-github-tools-0.3.2,g' -e 's,[@]PERL[@],/usr/bin/perl,g' -e 's,[@]POD2MAN[@],/usr/bin/pod2man,g' -e 's,[@]ads_perl5_extra_includes[@],,g' -e 's,[@]perl5_pkgvdatadir[@],/path/to/ads-github-tools-0.3.2/share/ads-github-tools-0.3.2/perl5,g' -e 's,[@]cargo_vendored_root[@],../../../../../../ads-github-tools-0.3.2/src/third-party/cargo-vendored,g' -e 's,[@]AWK_PROG[@],/usr/bin/awk,g' -e 's,[@]BASENAME_PROG[@],/usr/bin/basename,g' -e 's,[@]BASH_SH[@],/usr/bin/bash,g' -e 's,[@]BC_PROG[@],/usr/bin/bc,g' -e 's,[@]CARGO_PROG[@],/usr/bin/cargo,g' -e 's,[@]CARGO_PROG_VERSION[@],1.46.0,g' -e 's,[@]CAT[@],/usr/bin/cat,g' -e 's,[@]CHGRP[@],/usr/bin/chgrp,g' -e 's,[@]CHMOD_PROG[@],/usr/bin/chmod,g' -e 's,[@]CHOWN[@],/usr/bin/chown,g' -e 's,[@]CP_PROG[@],/usr/bin/cp,g' -e 's,[@]DIRNAME_PROG[@],/usr/bin/dirname,g' -e 's,[@]CURL_PROG[@],/usr/bin/curl,g' -e 's,[@]DATE_PROG[@],/usr/bin/date,g' -e 's,[@]ECHO_PROG[@],/usr/bin/echo,g' -e 's,[@]EXPR_PROG[@],/usr/bin/expr,g' -e 's,[@]FIND[@],/usr/bin/find,g' -e 's,[@]GIT_PROG[@],/usr/bin/git,g' -e 's,[@]GIT_HUB_PROG[@],/usr/bin/git-hub,g' -e 's,[@]GREP[@],/usr/bin/grep,g' -e 's,[@]GROUPADD[@],/usr/sbin/groupadd,g' -e 's,[@]HEAD_PROG[@],/usr/bin/head,g' -e 's,[@]ID_PROG[@],/usr/bin/id,g' -e 's,[@]JQ_PROG[@],/usr/bin/jq,g' -e 's,[@]MKDIR_PROG[@],/usr/bin/mkdir,g' -e 's,[@]MKTEMP_PROG[@],/usr/bin/mktemp,g' -e 's,[@]MV_PROG[@],/usr/bin/mv,g' -e 's,[@]SED[@],/usr/bin/sed,g' -e 's,[@]READLINK_PROG[@],/usr/bin/readlink,g' -e 's,[@]RM[@],/usr/bin/rm,g' -e 's,[@]RMDIR[@],/usr/bin/rmdir,g' -e 's,[@]RUSTC_PROG[@],/usr/bin/rustc,g' -e 's,[@]SHA256SUM_PROG[@],/usr/bin/sha256sum,g' -e 's,[@]SHA3SUM_PROG[@],/usr/bin/sha3sum,g' -e 's,[@]TAIL_PROG[@],/usr/bin/tail,g' -e 's,[@]TR_PROG[@],/usr/bin/tr,g' -e 's,[@]USERADD[@],/usr/sbin/useradd,g' -e 's,[@]USERMOD[@],/usr/sbin/usermod,g' -e 's,[@]WC_PROG[@],/usr/bin/wc,g' -e 's,[@]XARGS_PROG[@],/usr/bin/xargs,g' -e 's,[@]ZSTD_PROG[@],/usr/bin/zstd,g' ../../../../../../ads-github-tools-0.3.2/src/main/rust/bin/parse-netrc/src/main.rs.in
    + mv src/main.rs.tmp src/main.rs
    + chmod a-w src/main.rs
    + chmod a+r src/main.rs
    "/usr/bin/cargo" build --manifest-path "./Cargo.toml" --verbose --offline --locked --frozen \
        -Z config-profile \
        --release
    error: unknown `-Z` flag specified: config-profile
    make[5]: *** [Makefile:791: cargo-build] Error 101
    make[5]: Leaving directory '/path/to/ads-github-tools-0.3.2-BUILD/src/main/rust/bin/parse-netrc'
    make[4]: *** [Makefile:442: all-recursive] Error 1
    make[4]: Leaving directory '/path/to/ads-github-tools-0.3.2-BUILD/src/main/rust/bin'
    make[3]: *** [Makefile:438: all-recursive] Error 1
    make[3]: Leaving directory '/path/to/ads-github-tools-0.3.2-BUILD/src/main/rust'
    make[2]: *** [Makefile:441: all-recursive] Error 1
    make[2]: Leaving directory '/path/to/ads-github-tools-0.3.2-BUILD/src/main'
    make[1]: *** [Makefile:442: all-recursive] Error 1
    make[1]: Leaving directory '/path/to/ads-github-tools-0.3.2-BUILD/src'
    make: *** [Makefile:498: all-recursive] Error 1

The comment above the 'cargo-build' target in the Makefile.am reads:

#        This is required for cargo 1.42.1, but revisit this at some point to
#        see if we can get rid of the '-Z' opt.

The time to get rid of the '-Z' option for that target is now.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions