Feature #8426

Have check-mirrors download to TMPDIR instead of PWD

Added by sajolida 2014-12-12 20:40:39 . Updated 2019-05-06 18:15:35 .

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

0%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
1
Affected tool:
check-mirrors
Deliverable for:

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: tails-mirrors@boum.org


Subtasks


Related issues

Has duplicate Tails - Feature #8431: Get check-mirrors able to download in tmpfs Duplicate 2014-12-13

History

#1 Updated by intrigeri 2014-12-13 16:51:45

  • has duplicate Feature #8431: Get check-mirrors able to download in tmpfs added

#2 Updated by BitingBird 2015-01-04 18:52:01

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

#3 Updated by Anonymous 2017-06-29 14:50:23

  • 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 2017-06-29 15:14:23

  • 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 Anonymous 2018-01-19 16:53:45

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 2018-04-21 15:49:31

  • Description updated
  • Starter set to Yes

#7 Updated by sajolida 2018-04-21 15:51:34

  • Description updated

#8 Updated by intrigeri 2019-04-07 07:09:33

  • 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 2019-04-07 07:22:44

  • 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 2019-04-09 15:59:19

  • 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 2019-05-05 08:23:51

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

#12 Updated by anonym 2019-05-06 15:03:11

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

#13 Updated by intrigeri 2019-05-06 18:15:35

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