Project

General

Profile

Feature #8426

Have check-mirrors download to TMPDIR instead of PWD

Added by sajolida over 4 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Target version:
Start date:
12/12/2014
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Yes
Affected tool:
check-mirrors

Description

Currenly check-mirror always use $PWD for downloads. It should instead download TMPDIR (using standard mktmp facilities) by default.

Source code: git clone https://git.tails.boum.org/check-mirrors
Mentoring:


Related issues

Duplicated by Tails - Feature #8431: Get check-mirrors able to download in tmpfs Duplicate 12/13/2014

History

#1 Updated by intrigeri over 4 years ago

  • Duplicated by Feature #8431: Get check-mirrors able to download in tmpfs added

#2 Updated by BitingBird over 4 years ago

  • Category changed from 214 to Infrastructure
  • Affected tool set to check-mirrors

#3 Updated by u about 2 years ago

  • Status changed from Confirmed to Resolved

To me it looks like the script does use TMPDIR:
it creates a temporary directory in PWD:

cat check-mirrors.rb  | grep TMP
TMPDIR = ENV['PWD']
  Dir::mktmpdir('tmp-', TMPDIR) do |dir|

Closing.

#4 Updated by intrigeri about 2 years ago

  • Status changed from Resolved to Confirmed

To me it looks like the script does use TMPDIR:
it creates a temporary directory in PWD:

That's precisely the problem this ticket is about: it overrides TMPDIR before using it, and doesn't use mktemp.

#5 Updated by u over 1 year ago

So it would IMO be sufficient to change

Dir::mktmpdir('tmp-', TMPDIR) do |dir|

into

Dir::mktmpdir('tmp-') do |dir|

according to https://ruby-doc.org/stdlib-2.0.0/libdoc/tmpdir/rdoc/Dir.html#method-c-mktmpdir
But I don't code Ruby, so I'm not fully sure.

#6 Updated by sajolida about 1 year ago

  • Description updated (diff)
  • Starter set to Yes

#7 Updated by sajolida about 1 year ago

  • Description updated (diff)

#8 Updated by intrigeri 3 months ago

  • Subject changed from Have check-mirror download to TMPDIR instead of PWD to Have check-mirrors download to TMPDIR instead of PWD

#9 Updated by intrigeri 3 months ago

  • Status changed from Confirmed to In Progress
  • Assignee set to sajolida
  • QA Check set to Ready for QA

Done in 62a35a5441d0674d0563e6dc22148c2720fcbe2d except I've left the default behavior unchanged, in order to avoid breaking deployments and use cases I have no visibility nor control over. Please review :)

#10 Updated by sajolida 3 months ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (sajolida)
  • Target version set to Tails_3.14
  • QA Check deleted (Ready for QA)

Great!

#11 Updated by intrigeri 3 months ago

  • Target version changed from Tails_3.14 to Tails_3.13.2

#12 Updated by anonym 3 months ago

  • Target version changed from Tails_3.13.2 to Tails_3.14

#13 Updated by intrigeri 3 months ago

  • Target version changed from Tails_3.14 to Tails_3.13.2

Also available in: Atom PDF