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

make uninstall can execute rm -rf / #18

Closed
thierry-martinez opened this issue Feb 17, 2018 · 5 comments
Closed

make uninstall can execute rm -rf / #18

thierry-martinez opened this issue Feb 17, 2018 · 5 comments

Comments

@thierry-martinez
Copy link

make uninstall executes rm -rf / if it is executed just after ./configure fails.

This happens for instance when I try to install the camlp5 opam package in a 4.06.1 switch: this version of OCaml is not ruled out by the opam file, so opam tries to install it, runs ./configure and fails with the message:

Sorry: the compatibility with ocaml version "4.06.1"
is not yet implemented. Please report.

Then opam executes make uninstall which executes rm -rf /.

@roglo
Copy link
Contributor

roglo commented Feb 19, 2018

The real problem is the compatibility with ocaml. The "rm -rf /" is an opam issue after. Ok, I just updated camlp5 for compatibility with ocaml 4.06.1 and 4.06.2. Release of Camlp5 soon.

@roglo roglo closed this as completed Feb 19, 2018
@thierry-martinez
Copy link
Author

Now fixed ( d561693 ). Thanks! (See also ocaml/opam-repository#11440 )

@varkor
Copy link

varkor commented Feb 22, 2018

A significant portion of my hard drive was just wiped when I didn't notice this behaviour was occurring into several minutes after make uninstall was called transitively (ocaml/opam#3231). You absolutely need to have more safeguards in place for this.

@nerpderp83
Copy link

This just wiped out my home directory. See ocaml/opam#3316

@roglo
Copy link
Contributor

roglo commented Apr 27, 2018

I am very confused, very sorry. But I can't do anything. I made a new release of Camlp5 (7.05) when I was notified of the problem. This error is also due to the way opam works, which should not do anything if configuration failed. Opam should urgently be fixed too.

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

No branches or pull requests

4 participants