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

cargo --list/version triggers /boot automount #6737

Closed
cjmayo opened this issue Mar 12, 2019 · 3 comments
Closed

cargo --list/version triggers /boot automount #6737

cjmayo opened this issue Mar 12, 2019 · 3 comments
Labels
C-bug Category: bug

Comments

@cjmayo
Copy link

cjmayo commented Mar 12, 2019

Problem
With a separate /boot partition that is not mounted by default and systemd creating an automount unit for it, running cargo --list causes /boot to be mounted.
I wouldn't expect cargo to need to mount /boot.

Because Bash autocompletion file runs cargo --list:

__cargo_commands=$(cargo --list 2>/dev/null | awk 'NR>1 {print $1}')

Every time i create a new Bash session e.g. a new GNOME terminal or terminal tab /boot is automounted.

Steps

  1. /boot is not mounted
  2. cargo --list
  3. /boot is mounted (boot.automount: Got automount request for /boot in systemd journal)

Notes

Output of cargo version: cargo 1.32.0

Gentoo Linux:
dev-lang/rust-1.32.0
sys-apps/systemd-241-r1

@cjmayo cjmayo added the C-bug Category: bug label Mar 12, 2019
@cjmayo cjmayo changed the title cargo --list triggers /boot automount cargo --list/version triggers /boot automount Mar 13, 2019
@cjmayo
Copy link
Author

cjmayo commented Mar 13, 2019

cargo version also triggers this.

strace and grep points to the included vendor/openssl-probe crate:

"/boot/system/data/ssl",

https://github.com/alexcrichton/openssl-probe/blob/a014ef5d4dba06a497df0969823ace290b9dfcdd/src/lib.rs#L35

@ehuss
Copy link
Contributor

ehuss commented Apr 6, 2020

I believe this is now fixed. The code which initializes git2 (init_git_transports) is now done after --list or version commands are executed (part of #7649 I think in release 1.42).

@ehuss ehuss closed this as completed Apr 6, 2020
@cjmayo
Copy link
Author

cjmayo commented Apr 6, 2020

Looks good. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants