Giter VIP home page Giter VIP logo

Comments (6)

mattock avatar mattock commented on August 26, 2024

Good catch. We should definitely document this and maybe even verify that TMPDIR is not set to /tmp. Care to provide a PR?

from openvpn-build.

chipitsine avatar chipitsine commented on August 26, 2024

I recall erasing my home directory when pointing TMPDIR to it

from openvpn-build.

chipitsine avatar chipitsine commented on August 26, 2024

I guess the best approach would be

  1. create tmp dir from scratch
  2. stop build if TMPDIR already exists

from openvpn-build.

mattock avatar mattock commented on August 26, 2024

@chipitsine wouldn't that mean that user would have to wipe TMPDIR manually before every build?

Perhaps, instead of wiping the TMPDIR entirely in build-complete, we could only wipe the build directories inside it. So, even if TMPDIR was /home/ or /tmp there would be no/minimal damage.

from openvpn-build.

chipitsine avatar chipitsine commented on August 26, 2024

I did have a backup of home dir, so I did not worry much :)

from openvpn-build.

qdii avatar qdii commented on August 26, 2024

@mattock: checking that TMPDIR isn't set to /tmp is the wrong way to do it, in my opinion because the default value for TMPDIR in many systems is /tmp (according to wikipedia).

What I would suggest is:

  1. do not remove the temporary build directory at all
  2. create a randomly-named temporary directory at each invocation.

My reasoning is:

  • It's counter-intuitive to have a script called build which actually deletes things.
  • The user may actually want to keep previous build artifacts.
  • It's the OS responsibility to make sure /tmp has enough space, and the OS has a right to delete anything in /tmp anyway.
  • Even if it was this script's responsibility to clean after itself, the way it does it now is not working: it only cleans up when invoked once again.

What do you think?

from openvpn-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.