Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/portupgrade
Path: blob/master/etc/pkgtools.conf
102 views
1
# -*- ruby -*-
2
#
3
# pkgtools.conf - the configuration file for the pkgtools suite
4
#
5
6
# Syntax:
7
# string: '...' or "..."; use the `+' operator to concatenate
8
# boolean: true or false
9
# array: [ value, ... ]; use the `+' operator to concatenate
10
# hash: { key => value, ... }
11
# procedure: proc { |arglist| statements; return_value }
12
13
# Useful predefined constants:
14
#
15
# Name: Example values:
16
# OS_RELEASE: "7.0-CURRENT" "6.1-RELEASE-p8"
17
# OS_REVISION: "7.0" "6.1"
18
# OS_MAJOR: "7" "6"
19
# OS_BRANCH: "CURRENT" "RELEASE"
20
# OS_PATCHLEVEL: "" "-p8"
21
# OS_PLATFORM: "i386" "amd64"
22
# OS_PKGBRANCH: "7-current" "6.1-release"
23
24
# Useful predefined functions:
25
#
26
# localbase()
27
# Returns LOCALBASE.
28
#
29
# x11base()
30
# Returns X11BASE.
31
#
32
# pkg_site_builder(true|false)
33
# Returns an URI of the packages directory on the package builder site;
34
# if an argument is true, a 'latest' directory is used for path,
35
# 'full' is used otherwise.
36
# Equivalent to:
37
# on i386:
38
# sprintf('http://pointyhat.FreeBSD.org/errorlogs/%s-%s-packages-%s/',
39
# OS_PLATFORM, OS_MAJOR, latest ? 'latest' : 'full')
40
#
41
# pkg_site_mirror(root)
42
# Returns an URI of the packages directory on the preferred mirror site;
43
# where <root> is any quoted string.
44
# Equivalent to:
45
# sprintf('%s/pub/FreeBSD/ports/%s/packages-%s/',
46
# root || ENV['PACKAGEROOT'] || 'ftp://ftp.FreeBSD.org',
47
# OS_PLATFORM, OS_PKGBRANCH)
48
#
49
# pkg_site_primary()
50
# Returns an URI of the packages directory on the primary FTP site;
51
# Equivalent to:
52
# pkg_site_mirror('ftp://ftp.FreeBSD.org')
53
#
54
# deorigin(origin)
55
# Returns an installed package name which was installed from the
56
# given origin port.
57
# e.g.
58
# deorigin('sysutils/portupgrade') => 'portupgrade-YYYYMMDD'
59
#
60
# enabled_rc_scripts(origin_or_pkgname)
61
# Returns an array of "enabled" rc scripts ($PREFIX/etc/rc.d/*.sh)
62
# for the given package. "Enabled" here means that files such as
63
# *.sh.sample are ignored, however, if a package installs
64
# foo.sh.sample and there is foo.sh, it is considered as an enabled
65
# rc file for the package and thus returned.
66
#
67
# disabled_rc_scripts(origin_or_pkgname)
68
# Returns an array of disabled rc scripts ($PREFIX/etc/rc.d/*.sh.*)
69
# that the given package installed. If a package installs
70
# foo.sh.sample and there is foo.sh, it is considered as enabled
71
# and thus ignored.
72
#
73
# cmd_start_rc(origin_or_pkgname)
74
# Returns a command line string that starts the services of the
75
# given package, if any. (Yields "start" for each enabled rc
76
# script)
77
#
78
# cmd_stop_rc(origin_or_pkgname)
79
# Returns a command line string that stops the services of the
80
# given package, if any. (Yields "stop" for each enabled rc script)
81
#
82
# cmd_restart_rc(origin_or_pkgname)
83
# Returns a command line string that restarts the services of the
84
# given package, if any. (Yields "stop", sleeps for 3 seconds, then
85
# yields "start" for each enabled rc script)
86
#
87
# cmd_enable_rc(origin_or_pkgname)
88
# Returns a command line string that enables the disabled rc
89
# scripts of given package, if any.
90
#
91
# cmd_disable_rc(origin_or_pkgname)
92
# Returns a command line string that disables the enabled rc
93
# scripts of given package, if any.
94
#
95
# include_env(file)
96
# Include and evaluate the file. The file is looked inside PREFIX.
97
#
98
# include_hash(glob)
99
# Read file(s) and convert them to hash. Files should contain lines
100
# in a format: 'key' => 'value'
101
# (Glob path is inside PREFIX).
102
# E.g. ALT_PKGDEP = include_hash('etc/pkgtools/alt_pkgdep/*')
103
#
104
105
module PkgConfig
106
107
# Environment Variables: string
108
#
109
# Uncomment and edit as necessary. The `||=' operator means `set only
110
# if it is not set', i.e. it gives a variable its default value.
111
#
112
# It is particularly recommended that you set PORTS_INDEX to
113
# something other than the default value to avoid conflicts with CVS,
114
# CVSup, and CTM.
115
#
116
# cf. portupgrade(1), pkg_which(1)
117
#
118
# defaults:
119
# ENV['PORTSDIR'] ||= '/usr/ports'
120
# ENV['PORTS_INDEX'] ||= ENV['PORTSDIR'] + '/INDEX'
121
# ENV['PORTS_DBDIR'] ||= ENV['PORTSDIR']
122
# ENV['PKG_DBDIR'] ||= '/var/db/pkg'
123
#
124
# ENV['PKG_TMPDIR'] ||= '/var/tmp'
125
#
126
# ENV['PACKAGES'] ||= ENV['PORTSDIR'] + '/packages'
127
#
128
# ENV['PKG_DBDRIVER'] ||= 'bdb_btree' and if it's failed to load
129
# the driver it will fall to bdb1_btree driver. If the driver
130
# failed too, it will fall to 'dbm_hash' that require no external
131
# modules.
132
# Possible values for ENV['PKG_DBDRIVER'] are bdb_btree, bdb_hash,
133
# bdb1_btree, bdb1_hash and dbm_hash.
134
#
135
# e.g.:
136
# ENV['PORTSDIR'] ||= '/export/freebsd/ports'
137
# ENV['PORTS_INDEX'] ||= ENV['PORTSDIR'] + '/INDEX.local'
138
# ENV['PORTS_DBDIR'] ||= ENV['PKG_DBDIR']
139
#
140
# ENV['PACKAGES'] ||= sprintf('/export/freebsd/packages-%s',
141
# OS_PKGBRANCH)
142
# ENV['PKG_PATH'] ||= ENV['PACKAGES'] + '/All'
143
# ENV['PKG_BACKUP_DIR'] || ENV['PKG_PATH']
144
#
145
# ENV['PKG_SUFX'] ||= '.tbz'
146
# This variable defines extension used by pkg_create(1) while
147
# creating backup copy of old package before de-installing it.
148
# Defaults to '.tbz' (bzip2 compression).
149
# Possible values are '.tbz', '.tgz' (use gzip) and
150
# '.tar' (don't compress at all).
151
# See pkg_create(1) manual page for details.
152
#
153
# ENV['PKG_FETCH'] = "wget -O '%2$s' '%1$s'"
154
# ENV['PKG_FETCH'] = "curl '%s' -o '%s'"
155
# ENV['PKG_FETCH'] = 'false' # never fetch packages from a remote site
156
# ENV['PACKAGEROOT'] = 'ftp://ftpN.XX.FreeBSD.org'
157
#
158
# overwrite some defaults:
159
#
160
# include_env('etc/pkgtools.local')
161
#
162
163
ENV['PORTSDIR'] ||= '/usr/ports'
164
ENV['PACKAGES'] ||= ENV['PORTSDIR'] + '/packages'
165
ENV['PKG_PATH'] ||= ENV['PACKAGES'] + '/All'
166
ENV['PKG_BACKUP_DIR'] ||= ENV['PKG_PATH']
167
168
# SANITY_CHECK: boolean (default: true)
169
#
170
# If true, perform sanity checks on stale dependencies. This makes
171
# it up to 50% slower to parse package globs but offers unfailing
172
# upgrades. If you are sure you won't forget to run `pkgdb -F'
173
# regularly, turn this off to improve performance. (default: true)
174
#
175
# cf. -O/--omit-check of pkg_deinstall(1), pkg_glob(1),
176
# portupgrade(1) and portversion(1)
177
178
SANITY_CHECK = true
179
180
# IGNORE_CATEGORIES: array
181
#
182
# This is a list of port categories you want the pkgtools to ignore.
183
# Typically you want to list language specific categories of the
184
# languages you don't use.
185
#
186
# After configuring this list, you need to rebuild the ports
187
# database to reflect the changes. (run 'portsdb -Ufu')
188
#
189
# e.g.:
190
# IGNORE_CATEGORIES = [
191
# 'chinese',
192
# 'french',
193
# 'german',
194
# 'hebrew',
195
# 'japanese',
196
# 'korean',
197
# 'russian',
198
# 'ukrainian',
199
# 'vietnamese',
200
# ]
201
202
IGNORE_CATEGORIES = [
203
]
204
205
# EXTRA_CATEGORIES: array
206
#
207
# This is a list of extra port categories you put your locally
208
# maintained ports into. You must prepare a Makefile in each directory
209
# that defines a variable SUBDIR which lists all the ports in the
210
# category.
211
#
212
# After configuring this list, you need to rebuild the ports
213
# database to reflect the change. (run 'portsdb -Ufu')
214
#
215
# e.g.:
216
# EXTRA_CATEGORIES = [
217
# 'local',
218
# ]
219
220
EXTRA_CATEGORIES = [
221
]
222
223
# ALT_INDEX: array
224
#
225
# An additional local INDEX file(s).
226
#
227
# e.g.
228
# ALT_INDEX = [
229
# ENV['PORTSDIR'] + '/INDEX.local',
230
# ]
231
232
ALT_INDEX = [
233
]
234
235
# ALT_MOVED: array
236
#
237
# This is a list of local MOVED files. They'll be applied after
238
# the main MOVED file. The feature may be useful for ports moved
239
# inside EXTRA_CATEGORIES.
240
#
241
# e.g.
242
# ALT_MOVED = [
243
# ENV['PORTSDIR'] + '/MOVED.local',
244
# ]
245
246
ALT_MOVED = [
247
]
248
249
# HOLD_PKGS: array
250
#
251
# This is a list of ports you don't want portupgrade(1) to upgrade,
252
# portversion(1) to suggest upgrading, or pkgdb(1) to fix.
253
# You can use wildcards ("ports glob" and "pkgname glob").
254
# -f/--force with each command will override the held status.
255
#
256
# To completely hide the existence of a package, put a dummy file
257
# named "+IGNOREME" in the package directory.
258
#
259
# cf. pkg_glob(1), ports_glob(1)
260
#
261
# e.g.:
262
# HOLD_PKGS = [
263
# 'bsdpan-*',
264
# 'x11*/XFree86*',
265
# ]
266
267
HOLD_PKGS = [
268
'bsdpan-*',
269
]
270
271
# IGNORE_MOVED: array
272
#
273
# This is a list of ports you do not want to trace "MOVED".
274
# You can use wildcards ("ports glob" and "pkgname glob").
275
#
276
# e.g.:
277
# IGNORE_MOVED = [
278
# 'php4-*',
279
# 'devel/bison',
280
# ]
281
282
IGNORE_MOVED = [
283
'devel/bison',
284
]
285
286
# USE_PKGS: array
287
# USE_PKGS_ONLY: array
288
#
289
# These are lists of ports that you prefer to use packages to
290
# upgrade or install. They apply -P/--use-packages and
291
# -PP/--use-packages-only to specific ports, respectively.
292
#
293
# cf. -P/--use-packages and -PP/--use-packages-only of
294
# portupgrade(1) and portinstall(1)
295
#
296
# e.g.:
297
# USE_PKGS = [
298
# 'perl',
299
# 'ruby',
300
# 'python',
301
# ]
302
#
303
# USE_PKGS_ONLY = [
304
# 'x11*/XFree86*',
305
# '*openoffice*',
306
# ]
307
308
USE_PKGS = [
309
]
310
311
USE_PKGS_ONLY = [
312
]
313
314
# USE_PORTS_ONLY: array
315
#
316
# This is a list of ports that you always want to build from source.
317
# This will casue the pacakge to be installed from the local port even
318
# if there is a package available and the -P option is passed. It is
319
# primarily used when you have a custom configuration for a package but
320
# still want to be able to to an automated update from packages of the
321
# rest of the system.
322
#
323
# e.g.:
324
# USE_PORTS_ONLY = [
325
# 'php5',
326
# 'php5-mysql',
327
# ]
328
329
330
USE_PORTS_ONLY = [
331
]
332
333
# ALT_PKGDEP: hash
334
#
335
# This is a hash to define alternative package dependencies. For
336
# each pair A => B, when a package X claims that it depends on a
337
# package that matches the "pkgname glob" pattern A which is not
338
# installed, the dependency is replaced with one installed
339
# package that matches the "pkgname glob" pattern B. If glob B
340
# matches more than one installed package, replacement is not done
341
# automatically. <:delete> and <:skip> are special symbols that can
342
# be used as B values, instead of pkgname glob patterns. <:delete>
343
# means to delete the dependency and <:skip> to skip it.
344
#
345
# This replacement is done when "pkgdb -F" is executed.
346
#
347
# cf. pkg_glob(1), pkgdb(1)
348
#
349
# e.g.:
350
# ALT_PKGDEP = {
351
# # If you use apache13-modssl instead of apache13
352
# 'apache-1.3.*' => 'apache+mod_ssl-1.3.*',
353
#
354
# # The same as above; you can use origins also
355
# 'www/apache13' => 'www/apache13-modssl',
356
#
357
# # If you install Apache from source (not from ports/packages)
358
# 'apache' => :delete,
359
#
360
# # You can specify pkgname w/o version; see pkg_glob(1)
361
# 'w3m' => 'w3m-m17n',
362
# }
363
364
ALT_PKGDEP = {
365
}
366
367
# MAKE_ARGS: hash
368
# MAKE_ENV: hash
369
#
370
# These are hashes of ports glob or package glob => arguments mapping.
371
# pkgtools looks it up to pick command line arguments and environment
372
# variables to pass them to make(1).
373
# You can use wildcards ("ports glob" or "package glob").
374
# If a port/package matches multiple entries, all the arguments are
375
# joined using the space as separator.
376
#
377
# cf. -m/--make-args and -M/--make-env of portupgrade(1), ports_glob(1)
378
#
379
# You can alternatively specify a procedure instead of a string if
380
# you want to specify arguments which can vary depending on the port.
381
# The procedure is called with a port origin as an argument.
382
#
383
# e.g.:
384
# MAKE_ARGS = {
385
# 'databases/mysql323-*' => 'WITH_CHARSET=ujis',
386
# 'ruby18-*' => 'RUBY_VER=1.8',
387
# 'ruby16-*' => 'RUBY_VER=1.6',
388
# }
389
#
390
# To specify multiple arguments for each port, use one of the
391
# following:
392
#
393
# MAKE_ARGS = {
394
# # a) Separate them with the space
395
# 'databases/mysql41-*' => 'WITH_LINUXTHREADS=1 SKIP_DNS_CHECK=1',
396
#
397
# # b) Specify them using an array
398
# 'databases/mysql41-*' => [
399
# 'WITH_LINUXTHREADS=1',
400
# 'SKIP_DNS_CHECK=1',
401
# ],
402
# }
403
404
MAKE_ARGS = {
405
}
406
407
MAKE_ENV = {
408
}
409
410
# BEFOREBUILD: hash
411
#
412
# This is a hash of ports glob => command mapping. portupgrade(1)
413
# and portinstall(1) look it up to pick commands to run before
414
# building a port. You can use wildcards ("ports glob"). If a
415
# port/package matches multiple entries, all the commands are joined
416
# using the semicolon as separator and run.
417
#
418
# cf. -B/--beforebuild of portupgrade(1), ports_glob(1)
419
#
420
# You can alternatively specify a procedure instead of a string if
421
# you want to run a command which can vary depending on the port.
422
# The procedure is called with a port origin as an argument. See
423
# the examples in the AFTERINSTALL paragraph.
424
#
425
# e.g.:
426
# BEFOREBUILD = {
427
# # Always do cvs update before building a port
428
# '*' => 'cvs update',
429
# }
430
431
BEFOREBUILD = {
432
}
433
434
# BEFOREDEINSTALL: hash
435
#
436
# This is a hash of ports glob => command mapping. pkg_deinstall(1)
437
# looks it up to pick commands to run after installing a port. You
438
# can use wildcards ("ports glob"). If a port/package matches
439
# multiple entries, all the commands are joined using the semicolon
440
# as separator and run.
441
#
442
# You can alternatively specify a procedure instead of a string if
443
# you want to run a command which can vary depending on the port.
444
# The procedure is called with a port origin as an argument. See
445
# the following examples.
446
#
447
# e.g.:
448
# BEFOREDEINSTALL = {
449
# # Automatically stop the service for each package that has a
450
# # rc script enabled
451
# '*' => proc { |origin|
452
# cmd_stop_rc(origin)
453
# },
454
#
455
# # Stop postfix
456
# 'mail/postfix*' => localbase() + '/sbin/postfix stop',
457
# }
458
459
BEFOREDEINSTALL = {
460
}
461
462
# AFTERINSTALL: hash
463
#
464
# This is a hash of ports glob => command mapping. portupgrade(1)
465
# and portinstall(1) look it up to pick commands to run after
466
# installing a port. You can use wildcards ("ports glob"). If a
467
# port/package matches multiple entries, all the commands are joined
468
# using the semicolon as separator and run.
469
#
470
# cf. -B/--afterinstall of portupgrade(1), ports_glob(1)
471
#
472
# You can alternatively specify a procedure instead of a string if
473
# you want to run a command which can vary depending on the port.
474
# The procedure is called with an argument of a port origin. See
475
# the following examples.
476
#
477
# e.g.:
478
# AFTERINSTALL = {
479
# # Re-enable the X wrapper
480
# 'x11-servers/XFree86-4-Server' => sprintf('cd %s/bin && if [ -x Xwrapper-4 ]; then ln -sf Xwrapper-4 X; fi', x11base()),
481
#
482
# # Automatically start the server for each package that
483
# # installs a rc file enabled
484
# # This is replaced by HANDLE_RC_SCRIPTS: true in /usr/local/etc/pkg.conf
485
# '*' => proc { |origin|
486
# cmd_start_rc(origin)
487
# },
488
#
489
# # Automatically start MySQL server
490
# 'databases/mysql323-server' => proc { |origin|
491
# cmd_enable_rc(origin) + ';' + cmd_start_rc(origin)
492
# },
493
#
494
# # Start postfix
495
# 'mail/postfix*' => localbase() + '/sbin/postfix start',
496
# }
497
498
AFTERINSTALL = {
499
# Re-enable the X wrapper
500
'x11-servers/XFree86-4-Server' => sprintf(
501
'cd %s/bin && if [ -x Xwrapper-4 ]; then ln -sf Xwrapper-4 X; fi',
502
x11base()),
503
}
504
505
# PKG_SITES: array
506
#
507
# This is a list of URI's to get packages from. Each site directory
508
# must contain directories named 'All' and 'Latest'. The value of
509
# the environment variable `PKG_SITES' is automatically prepended to
510
# the list. (default: [pkg_site_mirror()])
511
#
512
# e.g.:
513
# PKG_SITES = [
514
# sprintf('ftp://ftp.localdomain/pub/freebsd/packages-%s/', OS_MAJOR),
515
# pkg_site_builder(true),
516
# pkg_site_builder(),
517
# pkg_site_mirror(),
518
# pkg_site_primary(),
519
# ]
520
521
PKG_SITES = [
522
pkg_site_mirror(),
523
]
524
525
# PORTUPGRADE_ARGS: string
526
#
527
# This sets the default options passed to portupgrade(1).
528
#
529
# e.g.:
530
# PORTUPGRADE_ARGS = ENV['PORTUPGRADE'] || \
531
# '-v -D -l /var/tmp/portupgrade.results ' + \
532
# '-L /var/tmp/portupgrade-%s::%s.log'
533
534
PORTUPGRADE_ARGS = ENV['PORTUPGRADE']
535
536
end
537
538