pkgr 1.5.1 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +2 -2
  3. data/README.md +29 -19
  4. data/data/build_dependencies/debian.yml +16 -2
  5. data/data/build_dependencies/ubuntu.yml +6 -0
  6. data/data/buildpacks/amazon-2014 +2 -2
  7. data/data/buildpacks/amazon-2015 +2 -2
  8. data/data/buildpacks/centos-6 +2 -2
  9. data/data/buildpacks/centos-7 +2 -2
  10. data/data/buildpacks/centos-8 +4 -0
  11. data/data/buildpacks/debian-10 +4 -0
  12. data/data/buildpacks/debian-6 +1 -1
  13. data/data/buildpacks/debian-7 +2 -2
  14. data/data/buildpacks/debian-8 +2 -2
  15. data/data/buildpacks/debian-9 +4 -0
  16. data/data/buildpacks/fedora-20 +2 -2
  17. data/data/buildpacks/sles-11 +2 -2
  18. data/data/buildpacks/sles-12 +2 -2
  19. data/data/buildpacks/ubuntu-10.04 +1 -1
  20. data/data/buildpacks/ubuntu-12.04 +2 -2
  21. data/data/buildpacks/ubuntu-14.04 +2 -2
  22. data/data/buildpacks/ubuntu-16.04 +2 -2
  23. data/data/buildpacks/ubuntu-18.04 +4 -0
  24. data/data/buildpacks/ubuntu-20.04 +4 -0
  25. data/data/cli/cli.sh.erb +201 -59
  26. data/data/dependencies/centos.yml +6 -1
  27. data/data/dependencies/debian.yml +15 -4
  28. data/data/dependencies/sles.yml +1 -1
  29. data/data/dependencies/ubuntu.yml +23 -2
  30. data/data/hooks/postinstall.sh +2 -1
  31. data/data/hooks/postuninstall.sh +1 -1
  32. data/data/hooks/preinstall.sh +1 -1
  33. data/data/hooks/preuninstall.sh +1 -1
  34. data/data/init/systemd/default/process.service.erb +1 -1
  35. data/data/init/sysv/lsb-3.1/process.erb +3 -4
  36. data/data/init/upstart/1.5/process.conf.erb +1 -1
  37. data/data/logrotate/logrotate.erb +2 -2
  38. data/lib/pkgr/builder.rb +31 -22
  39. data/lib/pkgr/buildpack.rb +30 -8
  40. data/lib/pkgr/cli.rb +16 -3
  41. data/lib/pkgr/config.rb +20 -0
  42. data/lib/pkgr/dispatcher.rb +1 -1
  43. data/lib/pkgr/distributions/amazon.rb +38 -1
  44. data/lib/pkgr/distributions/base.rb +11 -10
  45. data/lib/pkgr/distributions/debian.rb +1 -1
  46. data/lib/pkgr/distributions/redhat.rb +0 -2
  47. data/lib/pkgr/distributions/ubuntu.rb +3 -3
  48. data/lib/pkgr/env.rb +10 -4
  49. data/lib/pkgr/env_value.rb +55 -0
  50. data/lib/pkgr/version.rb +1 -1
  51. metadata +14 -9
@@ -4,6 +4,11 @@ default:
4
4
  - libxml2
5
5
  - libxslt
6
6
  - libevent
7
- - postgresql-libs
8
7
  - mysql-libs
9
8
  - sqlite
9
+ centos-6:
10
+ - postgresql-libs
11
+ centos-7:
12
+ - postgresql-libs
13
+ centos-8:
14
+ - libpq
@@ -5,23 +5,34 @@ default:
5
5
  - openssl
6
6
  - libxml2
7
7
  - libxslt1.1
8
- - libreadline5
9
- - libreadline6
10
8
  debian-6:
11
9
  - libssl0.9.8
12
10
  - libmysqlclient16
13
11
  - libevent-1.4-2
14
12
  - libevent-core-1.4-2
15
13
  - libevent-extra-1.4-2
14
+ - libreadline5
15
+ - libreadline6
16
16
  debian-7:
17
17
  - libssl1.0.0
18
18
  - libmysqlclient18
19
19
  - libevent-2.0-5
20
20
  - libevent-core-2.0-5
21
21
  - libevent-extra-2.0-5
22
- ubuntu-16.04:
22
+ - libreadline5
23
+ - libreadline6
24
+ debian-8:
23
25
  - libssl1.0.0
24
- - libmysqlclient20
26
+ - libmysqlclient18
27
+ - libevent-2.0-5
28
+ - libevent-core-2.0-5
29
+ - libevent-extra-2.0-5
30
+ - libreadline5
31
+ - libreadline6
32
+ debian-9:
33
+ - libssl1.0.2
34
+ - libmariadbclient18
25
35
  - libevent-2.0-5
26
36
  - libevent-core-2.0-5
27
37
  - libevent-extra-2.0-5
38
+ - libreadline7
@@ -12,4 +12,4 @@ sles-11:
12
12
  - postgresql
13
13
  sles-12:
14
14
  - libmysqlclient18
15
- - postgresql93
15
+ - postgresql
@@ -5,23 +5,44 @@ default:
5
5
  - openssl
6
6
  - libxml2
7
7
  - libxslt1.1
8
- - libreadline5
9
- - libreadline6
10
8
  ubuntu-10.04:
9
+ - libreadline5
11
10
  - libssl0.9.8
12
11
  - libmysqlclient16
13
12
  - libevent-1.4-2
14
13
  - libevent-core-1.4-2
15
14
  - libevent-extra-1.4-2
16
15
  ubuntu-12.04:
16
+ - libreadline6
17
+ - libssl1.0.0
18
+ - libmysqlclient18
19
+ - libevent-2.0-5
20
+ - libevent-core-2.0-5
21
+ - libevent-extra-2.0-5
22
+ ubuntu-14.04:
23
+ - libreadline6
17
24
  - libssl1.0.0
18
25
  - libmysqlclient18
19
26
  - libevent-2.0-5
20
27
  - libevent-core-2.0-5
21
28
  - libevent-extra-2.0-5
22
29
  ubuntu-16.04:
30
+ - libreadline6
23
31
  - libssl1.0.0
24
32
  - libmysqlclient20
25
33
  - libevent-2.0-5
26
34
  - libevent-core-2.0-5
27
35
  - libevent-extra-2.0-5
36
+ ubuntu-18.04:
37
+ - libreadline7
38
+ - libssl1.0.0
39
+ - libmysqlclient20
40
+ - libevent-2.1-6
41
+ - libevent-core-2.1-6
42
+ - libevent-extra-2.1-6
43
+ ubuntu-20.04:
44
+ - libreadline8
45
+ - libssl1.1
46
+ - libevent-2.1-7
47
+ - libevent-core-2.1-7
48
+ - libevent-extra-2.1-7
@@ -13,6 +13,7 @@ LOGS="/var/log/${APP_NAME}"
13
13
  chown -R ${APP_USER}.${APP_GROUP} ${APP_HOME}
14
14
 
15
15
  # link app log directory to /var/log/NAME
16
+ mkdir -p ${LOGS}
16
17
  rm -rf ${HOME_LOGS}
17
18
  ln -fs ${LOGS} ${HOME_LOGS}
18
19
  chown -R ${APP_USER}.${APP_GROUP} ${LOGS}
@@ -43,7 +44,7 @@ echo "=============="
43
44
  # Call custom postinstall script.
44
45
  CUSTOM_POSTINSTALL_SCRIPT="<%= Base64.encode64 File.read(after_install) %>"
45
46
 
46
- tmpfile=$(mktemp)
47
+ <%= "tmpfile=$(#{"TMPDIR=\"#{tmpdir}\" " if tmpdir}mktemp)" %>
47
48
  chmod a+x "${tmpfile}"
48
49
  echo "${CUSTOM_POSTINSTALL_SCRIPT}" | base64 -d - > ${tmpfile}
49
50
 
@@ -18,7 +18,7 @@ fi
18
18
  # Call custom postuninstall script.
19
19
  CUSTOM_POSTUNINSTALL_SCRIPT="<%= Base64.encode64 File.read(after_remove) %>"
20
20
 
21
- tmpfile=$(mktemp)
21
+ <%= "tmpfile=$(#{"TMPDIR=\"#{tmpdir}\" " if tmpdir}mktemp)" %>
22
22
  chmod a+x "${tmpfile}"
23
23
  echo "${CUSTOM_POSTUNINSTALL_SCRIPT}" | base64 -d - > ${tmpfile}
24
24
 
@@ -27,7 +27,7 @@ fi
27
27
  # https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
28
28
  CUSTOM_PREINSTALL_SCRIPT="<%= Base64.encode64 File.read(before_install) %>"
29
29
 
30
- tmpfile=$(mktemp)
30
+ <%= "tmpfile=$(#{"TMPDIR=\"#{tmpdir}\" " if tmpdir}mktemp)" %>
31
31
  chmod a+x "${tmpfile}"
32
32
  echo "${CUSTOM_PREINSTALL_SCRIPT}" | base64 -d - > ${tmpfile}
33
33
 
@@ -10,7 +10,7 @@ export APP_HOME="<%= home %>"
10
10
  <% if before_remove && File.readable?(before_remove) %>
11
11
  CUSTOM_PREUNINSTALL_SCRIPT="<%= Base64.encode64 File.read(before_remove) %>"
12
12
 
13
- tmpfile=$(mktemp)
13
+ <%= "tmpfile=$(#{"TMPDIR=\"#{tmpdir}\" " if tmpdir}mktemp)" %>
14
14
  chmod a+x "${tmpfile}"
15
15
  echo "${CUSTOM_PREUNINSTALL_SCRIPT}" | base64 -d - > ${tmpfile}
16
16
 
@@ -4,7 +4,7 @@ Requires=<%= name %>-<%= process_name %>.service
4
4
  After=<%= name %>-<%= process_name %>.service
5
5
 
6
6
  [Service]
7
- Environment=PORT=PORT_NUM
7
+ Environment=APP_PROCESS_INDEX=__PROCESS_INDEX__
8
8
  ExecStart=/usr/bin/<%= name %> run <%= process_name %>
9
9
  Restart=always
10
10
  StandardOutput=syslog
@@ -14,19 +14,18 @@
14
14
  ### END INIT INFO
15
15
 
16
16
  export PATH=/sbin:/usr/sbin:/bin:/usr/bin
17
- export PORT=PORT_NUM
17
+ export APP_PROCESS_INDEX=__PROCESS_INDEX__
18
18
 
19
19
  name="<%= name %>"
20
20
  process_name="<%= process_name %>"
21
21
  user="<%= user %>"
22
22
  group="<%= group %>"
23
- full_process_name="${name}-${process_name}-PROCESS_NUM"
23
+ full_process_name="${name}-${process_name}-${APP_PROCESS_INDEX}"
24
24
  pidfile="/var/run/${full_process_name}.pid"
25
25
 
26
-
27
26
  start() {
28
27
  # Run the program!
29
- ${name} run ${process_name} >> /var/log/${name}/${process_name}-PROCESS_NUM.log 2>&1 &
28
+ ${name} run ${process_name} >> /var/log/${name}/${process_name}-${APP_PROCESS_INDEX}.log 2>&1 &
30
29
 
31
30
  # Generate the pidfile from here. If we instead made the forked process
32
31
  # generate it there will be a race condition between the pidfile writing
@@ -2,6 +2,6 @@ start on starting <%= name %>-<%= process_name %>
2
2
  stop on stopping <%= name %>-<%= process_name %>
3
3
  respawn
4
4
 
5
- env PORT=PORT_NUM
5
+ env APP_PROCESS_INDEX=__PROCESS_INDEX__
6
6
 
7
7
  exec <%= name %> run <%= process_name %> >> /var/log/<%= name %>/<%= process_name %>-PROCESS_NUM.log 2>&1
@@ -1,8 +1,8 @@
1
1
  # <%= name %> logs:
2
2
  /var/log/<%= name %>/*.log {
3
- daily
3
+ <%= logrotate_frequency %>
4
4
  missingok
5
- rotate 14
5
+ rotate <%= logrotate_backlog %>
6
6
  compress
7
7
  delaycompress
8
8
  notifempty
@@ -107,20 +107,23 @@ module Pkgr
107
107
 
108
108
  # Pass the app through the buildpack
109
109
  def compile
110
- if buildpack_for_app
111
- puts "-----> #{buildpack_for_app.banner} app"
110
+ begin
111
+ FileUtils.mkdir_p(app_home_dir)
112
+ rescue Errno::EACCES => e
113
+ Pkgr.logger.warn "Can't create #{app_home_dir.inspect}, which may be needed by some buildpacks."
114
+ end
115
+ FileUtils.mkdir_p(compile_cache_dir)
116
+ FileUtils.mkdir_p(compile_env_dir)
112
117
 
113
- begin
114
- FileUtils.mkdir_p(app_home_dir)
115
- rescue Errno::EACCES => e
116
- Pkgr.logger.warn "Can't create #{app_home_dir.inspect}, which may be needed by some buildpacks."
118
+ if buildpacks_for_app.size > 0
119
+ run_hook config.before_hook
120
+
121
+ buildpacks_for_app.each do |buildpack|
122
+ puts "-----> #{buildpack.banner} app"
123
+ buildpack.compile(source_dir, compile_cache_dir, compile_env_dir)
124
+ buildpack.release(source_dir)
117
125
  end
118
- FileUtils.mkdir_p(compile_cache_dir)
119
- FileUtils.mkdir_p(compile_env_dir)
120
126
 
121
- run_hook config.before_hook
122
- buildpack_for_app.compile(source_dir, compile_cache_dir, compile_env_dir)
123
- buildpack_for_app.release(source_dir)
124
127
  run_hook config.after_hook
125
128
  else
126
129
  raise Errors::UnknownAppType, "Can't find a buildpack for your app"
@@ -285,17 +288,23 @@ module Pkgr
285
288
  @distribution ||= Distributions.current(config)
286
289
  end
287
290
 
288
- # List of available buildpacks for the current distribution.
289
- def buildpacks
290
- distribution.buildpacks
291
- end
292
-
293
- # Buildpack detected for the app, if any.
294
- def buildpack_for_app
291
+ # Buildpacks detected for the app, if any. If multiple buildpacks are explicitly specified, all are used
292
+ def buildpacks_for_app
295
293
  raise "#{source_dir} does not exist" unless File.directory?(source_dir)
296
- @buildpack_for_app ||= buildpacks.find do |buildpack|
297
- buildpack.setup(config.edge, config.home)
298
- buildpack.detect(source_dir)
294
+ @buildpacks_for_app ||= begin
295
+ mode, buildpacks = distribution.buildpacks
296
+ case mode
297
+ when :custom
298
+ buildpacks.find_all do |buildpack|
299
+ buildpack.setup(config.edge, config.home)
300
+ buildpack.detect(source_dir)
301
+ end
302
+ else
303
+ [buildpacks.find do |buildpack|
304
+ buildpack.setup(config.edge, config.home)
305
+ buildpack.detect(source_dir)
306
+ end].compact
307
+ end
299
308
  end
300
309
  end
301
310
 
@@ -307,7 +316,7 @@ module Pkgr
307
316
  def run_hook(file)
308
317
  return true if file.nil?
309
318
 
310
- cmd = %{env -i APP_NAME="#{config.name}" PATH="$PATH"#{config.env} bash '#{file}' 2>&1}
319
+ cmd = %{env -i APP_NAME="#{config.name}" PATH="$PATH" #{config.env} bash '#{file}' 2>&1}
311
320
 
312
321
  Pkgr.logger.debug "Running hook in #{source_dir}: #{file.inspect}"
313
322
  puts "-----> Running hook: #{file.inspect}"
@@ -7,8 +7,14 @@ module Pkgr
7
7
  attr_writer :buildpacks_cache_dir
8
8
 
9
9
  def buildpacks_cache_dir
10
- @buildpacks_cache_dir ||= File.expand_path("~/.pkgr/buildpacks").tap do |dir|
11
- FileUtils.mkdir_p(dir)
10
+ default_buildpacks_cache_dir = File.expand_path("~/.pkgr/buildpacks")
11
+ @buildpacks_cache_dir ||= begin
12
+ default_buildpacks_cache_dir.tap do |dir|
13
+ FileUtils.mkdir_p(dir)
14
+ end
15
+ rescue
16
+ Pkgr.warn "Unable to create directory at #{default_buildpacks_cache_dir.inspect}. Using temporary directory."
17
+ Dir.mktmpdir
12
18
  end
13
19
  end
14
20
  end
@@ -20,7 +26,7 @@ module Pkgr
20
26
  @url, @branch = url.split("#")
21
27
  @branch ||= "master"
22
28
  @type = type
23
- @env = env
29
+ @env = env || Env.new
24
30
  end
25
31
 
26
32
  def buildpack_cache_dir
@@ -28,7 +34,7 @@ module Pkgr
28
34
  end
29
35
 
30
36
  def detect(path)
31
- buildpack_detect = Mixlib::ShellOut.new("#{dir}/bin/detect \"#{path}\"")
37
+ buildpack_detect = Mixlib::ShellOut.new("env -i #{compound_environment(path)} #{dir}/bin/detect \"#{path}\"")
32
38
  buildpack_detect.logger = Pkgr.logger
33
39
  buildpack_detect.run_command
34
40
  @banner = buildpack_detect.stdout.chomp
@@ -36,7 +42,10 @@ module Pkgr
36
42
  end
37
43
 
38
44
  def compile(path, compile_cache_dir, compile_env_dir)
39
- cmd = %{env -i PATH="$PATH"#{env} #{dir}/bin/compile "#{path}" "#{compile_cache_dir}" "#{compile_env_dir}" }
45
+ compile_home_dir = Dir.mktmpdir
46
+ # Required to work around bundler forcing a writable home dir
47
+ local_env = Env.new(["HOME=#{compile_home_dir}"])
48
+ cmd = %{env -i #{compound_environment(path, local_env)} #{dir}/bin/compile "#{path}" "#{compile_cache_dir}" "#{compile_env_dir}" }
40
49
  Pkgr.debug "Running #{cmd.inspect}"
41
50
 
42
51
  Dir.chdir(path) do
@@ -48,12 +57,13 @@ module Pkgr
48
57
  end
49
58
  raise "compile failed" unless $?.exitstatus.zero?
50
59
  end
51
-
60
+ ensure
61
+ FileUtils.remove_entry_secure compile_home_dir
52
62
  true
53
63
  end
54
64
 
55
65
  def release(path)
56
- buildpack_release = Mixlib::ShellOut.new("#{dir}/bin/release \"#{path}\" > #{path}/.release")
66
+ buildpack_release = Mixlib::ShellOut.new("env -i #{compound_environment(path)} #{dir}/bin/release \"#{path}\" > #{path}/.release")
57
67
  buildpack_release.logger = Pkgr.logger
58
68
  buildpack_release.run_command
59
69
  buildpack_release.exitstatus == 0
@@ -75,7 +85,7 @@ module Pkgr
75
85
  def refresh(edge = true)
76
86
  return if !edge
77
87
  Dir.chdir(dir) do
78
- buildpack_refresh = Mixlib::ShellOut.new("git fetch origin && ( git reset --hard #{branch} || git reset --hard origin/#{branch} )")
88
+ buildpack_refresh = Mixlib::ShellOut.new("git fetch origin && ( git reset --hard #{branch} || git reset --hard origin/#{branch} ) && chmod -f +x bin/detect && chmod -f +x bin/compile && chmod -f +x bin/release")
79
89
  buildpack_refresh.logger = Pkgr.logger
80
90
  buildpack_refresh.run_command
81
91
  buildpack_refresh.error!
@@ -104,5 +114,17 @@ module Pkgr
104
114
  buildpack_replace.error!
105
115
  end
106
116
  end
117
+
118
+ private
119
+
120
+ def compound_environment(path, local_env = Env.new)
121
+ Env.new(['PATH=$PATH']).merge(local_env).merge(env).merge(exported_environment(File.join(path, "export")))
122
+ end
123
+
124
+ def exported_environment(path)
125
+ Env.from_export(path)
126
+ rescue Errno::ENOENT
127
+ Env.new
128
+ end
107
129
  end
108
130
  end
@@ -31,7 +31,7 @@ module Pkgr
31
31
 
32
32
  method_option :buildpack,
33
33
  :type => :string,
34
- :desc => "Custom buildpack to use"
34
+ :desc => "Custom buildpack to use. May be a single string or a list."
35
35
  method_option :buildpack_list,
36
36
  :type => :string,
37
37
  :desc => "Specify a file containing a list of buildpacks to use (--buildpack takes precedence if given)"
@@ -51,9 +51,21 @@ module Pkgr
51
51
  method_option :runner,
52
52
  :type => :string,
53
53
  :desc => "Force a specific runner (e.g. upstart-1.5, sysv-lsb-1.3)"
54
+ method_option :logrotate_frequency,
55
+ :type => :string,
56
+ :desc => "Set logrotate backlog",
57
+ :enum => %w(daily weekly monthly yearly),
58
+ :default => "daily"
59
+ method_option :logrotate_backlog,
60
+ :type => :numeric,
61
+ :desc => "Set logrotate backlog",
62
+ :default => 14
54
63
  method_option :homepage,
55
64
  :type => :string,
56
65
  :desc => "Project homepage"
66
+ method_option :home,
67
+ :type => :string,
68
+ :desc => "Project home"
57
69
  method_option :description,
58
70
  :type => :string,
59
71
  :desc => "Project description"
@@ -111,7 +123,6 @@ module Pkgr
111
123
  :desc => "Specific system dependencies that must be present before building"
112
124
  method_option :disable_default_dependencies,
113
125
  :type => :boolean,
114
- :default => false,
115
126
  :desc => "Disable default dependencies"
116
127
  method_option :host,
117
128
  :type => :string,
@@ -152,8 +163,10 @@ module Pkgr
152
163
  :desc => "Recursively mark a directory as being owned by the package"
153
164
  method_option :disable_cli,
154
165
  :type => :boolean,
155
- :default => false,
156
166
  :desc => "Disable installing CLI"
167
+ method_option :tmpdir,
168
+ :type => :string,
169
+ :desc => 'Set a custom tmpdir for hook scripts to get created in'
157
170
 
158
171
  def package(tarball)
159
172
  Pkgr.level = Logger::INFO if options[:verbose]
@@ -92,6 +92,14 @@ module Pkgr
92
92
  @table[:home] || "/opt/#{name}"
93
93
  end
94
94
 
95
+ def logrotate_frequency
96
+ @table[:logrotate_frequency] || "daily"
97
+ end
98
+
99
+ def logrotate_backlog
100
+ @table[:logrotate_backlog] || 14
101
+ end
102
+
95
103
  def user
96
104
  @table[:user] || name
97
105
  end
@@ -100,6 +108,10 @@ module Pkgr
100
108
  @table[:group] || user
101
109
  end
102
110
 
111
+ def tmpdir
112
+ @table[:tmpdir]
113
+ end
114
+
103
115
  def architecture
104
116
  @table[:architecture] || "x86_64"
105
117
  end
@@ -124,6 +136,10 @@ module Pkgr
124
136
  @table[:env].is_a?(Pkgr::Env) ? @table[:env] : Pkgr::Env.new(@table[:env])
125
137
  end
126
138
 
139
+ def buildpacks
140
+ @table[:buildpack].is_a?(String) ? @table[:buildpack].split(",") : @table[:buildpack]
141
+ end
142
+
127
143
  def valid?
128
144
  @errors = []
129
145
  @errors.push("name can't be blank") if name.nil? || name.empty?
@@ -223,6 +239,7 @@ module Pkgr
223
239
  "--group \"#{group}\"",
224
240
  "--iteration \"#{iteration}\"",
225
241
  "--homepage \"#{homepage}\"",
242
+ "--home \"#{home}\"",
226
243
  "--architecture \"#{architecture}\"",
227
244
  "--description \"#{description}\"",
228
245
  "--maintainer \"#{maintainer}\"",
@@ -243,6 +260,8 @@ module Pkgr
243
260
  args.push "--buildpack_list \"#{buildpack_list}\"" unless buildpack_list.nil? || buildpack_list.empty?
244
261
  args.push "--force-os \"#{force_os}\"" unless force_os.nil? || force_os.empty?
245
262
  args.push "--runner \"#{runner}\"" unless runner.nil? || runner.empty?
263
+ args.push "--logrotate-frequency \"#{logrotate_frequency}\"" unless logrotate_frequency.nil? || logrotate_frequency.empty?
264
+ args.push "--logrotate-backlog \"#{logrotate_backlog}\"" unless logrotate_backlog.nil?
246
265
  args.push "--env #{env.variables.map{|v| "\"#{v}\""}.join(" ")}" if env.present?
247
266
  args.push "--auto" if auto
248
267
  args.push "--verbose" if verbose
@@ -251,6 +270,7 @@ module Pkgr
251
270
  args.push "--verify" if verify
252
271
  args.push "--no-clean" if !clean
253
272
  args.push "--no-edge" if !edge
273
+ args.push "--tmpdir" if !tmpdir
254
274
  args
255
275
  end
256
276
  end