You have specified multiple patterns in a case statement, where one will
always override the other. The pattern being overridden is indicated
with a SC2222 warning.
PR: 227109
Submitted by: mat
Sponsored by: Absolight
Double quotes around $@ prevents globbing and word splitting of
individual elements, while still expanding to multiple separate
arguments.
Add exceptions when splitting is the intended behavior.
PR: 227109
Submitted by: mat
Sponsored by: Absolight
The behavior when concatenating a string and array is rarely intended.
The preceeding string is prefixed to the first array element, while the
succeeding string is appended to the last one. The middle array elements
are unaffected.
For example, with the parameters foo,bar,baz, "--flag=$@" is equivalent
to the three arguments "--flag=foo" "bar" "baz".
PR: 227109
Submitted by: mat
Sponsored by: Absolight
'strip -x', and splitting out debug symbols with objcopy, will leave
a .symtab section but will still remove the .debug_info section. file(1)
shows this distinction as well after the use of 'strip -x':
work/tcl8.7a1/unix/libtcl8.7.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, with debug_info, not stripped
work/stage/usr/local/lib/libtcl8.7.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped
This fixes false-positives when using install-strip and symbol splitting.
With hat: portmgr
This only handles the default CC=cc but is enough to significantly improve
INDEX/Poudriere ports var gathering due to reducing around a dozen cc
fork+exec for every port that all have the same result. These values
are reused during the port build as well which reduces more fork+exec
contention there.
Approved by: portmgr (implicit)
This will avoid renamed/removed variables being orphaned, and allows for
exporting variables in ports_env that are not wanted to be exported in
sub-makes via _EXPORTED_VARS.
Approved by: portmgr (implicit)
Rather than replacing patches that are effectively the same but with
different timestamps, drop the new version and let the old version remain in
place. This yields a `make makepatch` that doesn't try and produce unwanted
churn.
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D13960
This checks whether rubygem based ports have all of their dependencies
in Gemfile(s) satisfied by what's currently installed. Sample output:
====> Running Q/A tests (stage-qa)
Warning: Dependencies defined in /usr/ports/www/gitlab/work/stage/usr/local/www/gitlab/Gemfile are not satisfied
These ports could (!) be broken at runtime. Be aware: some projects
defines multiple Gemfiles and not all are used at runtime. For example
www/gitlab has two Gemfiles, but only one is used for testing and warnings
about it can be ignored.
Approved by: portmgr (mat), lifanov
Differential Revision: https://reviews.freebsd.org/D11865
Currently, only python shebangs (e.g. /bin/python, /usr/local/bin/python,
/usr/bin/env python etc.) are reported by stage Q/A and fixed by
USES=shebangfix. We need to do the same for python[23] as well.
Before the problem was not noticeable since many ports had e.g.
USES=python:2, which added a dependency on python2 metaport, however
that's going to switch to USES=python:2.7, and neither it, nor more
widely used USES=python adds a dependency on metaports, so there's
very high probability that python[23] links are not available.
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D13571
This would have given an error when:
- The port uses DIST_SUBDIR
- That sub-directory does not exist
- The current user does not have permission to write in DISTDIR.
Something like:
$ sudo rmdir /usr/ports/distfiles/gallery2
$ make fetch-urlall-list
mkdir: /usr/ports/distfiles/gallery2: Permission denied
*** Error code 1
PR: 222819
Reported by: sunpoet
Sponsored by: Absolight
- Pass MAKEFLAGS down into do-depends properly.
- Remove redundant dependencies, run-depends and lib-depends, from
targets that already depend on earlier targets that depend on
the needed targets.
Reported by: emaste
With hat: portmgr
- Enable FLAVORS.
- Make make describe flavors aware.
- Add a qa check for unique package names amongst flavors.
- Make MOVEDlint understand flavors.
- Add a bit of sanity check to make sure FLAVORS stay lowercase.
- Various fixes.
Reviewed by: portmgr
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D12577
part of USE_QT5, since all of those suggestions are wrong.
Approved by: rakuco (mentor), tcberner (mentor), portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D12526
**Do not start migrating any ports, a hook will prevent it**
This has been a long awaiting feature, most of the work has been done by
bapt, bdrewery and antoine, I am just the one actually doing the commit.
All this informations, and more to come are in the first link to our wiki
in the bottom block. A roadmap is in the second link.
To define a different flavors in a port, before any include, set:
FLAVORS= flavor1 flavor2 [...]
The first flavor in the list will be the default.
You can then check for flavors after includ'ing bsd.port.options.mk with:
.if ${FLAVOR} == flavor2
[some stuff]
.endif
To build flavor2, simply run:
make FLAVOR=flavor2
To depend on a specific flavor, write @<flavor> at the end of the depend
string, like:
RUN_DEPENDS= something:origin@foo
Submitted by: bapt, bdrewery, antoine
Reviewed by: portmgr
More infos: https://wiki.freebsd.org/Ports/FlavorsMigration
Todo List: https://wiki.freebsd.org/Ports/FlavorsAndSubPackages
With hat: portmgr
Differential Revision: https://reviews.freebsd.org/D10327
* Once upon a time, we checked all of STAGEDIR/PREFIX's executable
files.
* We then decided too many false positives were found, so we switched to
only checking executable files in bin/sbin/libexec/www, and also
symlinks that were in there.
* And then, we decided to go back to check all of STAGEDIR/PREFIX's
executable files, but forgot to remove the checks for symlinks (which
are now useless because we already check all the executable files.)
Reported by: lifanov
Sponsored by: Absolight
This checks whether rubygem ports have all of their dependencies
in gemspec satisfied by what's currently installed. Sample output:
====> Running Q/A tests (stage-qa)
Error: RubyGem dependency archive-tar-minitar = 0.5.2 is not satisfied.
*** Error code 1
Stop.
make: stopped in /usr/home/lifanov/src/svn/freebsd/ports/head/archivers/rubygem-fpm
These ports would be broken at runtime.
Big thanks to:
swills - discussion
mat - reviews
antoine - exp runs
sunpoet - fixing several dozens of ports :)
PR: 220605
Reviewed by: mat, sunpoet
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D11841
Repeat after me: If you change IFS, it will break something unexpected.
The problem is that we use IFS to change read's field separator. This
has the side effect of changing how sh(1) splits all string, including
in command parsing functions.
In this case, unless quoted, the strings are always splitted using IFS.
So changing IFS will change how these strings are splitted, and you end
up having a headache. For example:
$ GID_FILES="foo bar"
$ set -x
$ echo $GID_FILES
+ echo foo bar
foo bar
$ IFS=:
$ GID_FILES="foo bar"
$ set -x
$ echo $GID_FILES
+ echo 'foo bar'
foo bar
In the first case, it runs echo with two arguments, first is foo, second is bar.
In the second case, it runs echo with one argument, 'foo bar'.
To fix this, restrict the time during which IFS changes to only one
command, set, and use positional parameters to extract values.
Reported by: feld
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D11632
If NO_ARCH is set then check that no FreeBSD elf(5) files are in $STAGEDIR.
If an elf(5) file is bundles as part of the package, but is not meant to be
run directly (i.e. the elf(5) file is a payload, and not compiled) then
those files can be added to NO_ARCH_IGNORE to avoid the check from failing,
Changes to ports:
- Ports that have NO_ARCH set, but actually compile files have had NO_ARCH
removed.
- Ports that have elf(5) payloads have had those files added to
NO_ARCH_IGNORE.
- R-cran ports that do not set USES=cran:compiles have NO_ARCH set,
PR: 218976
Reviewed by: antoine, mat
Approved by: portmgr
* libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
* mesa-libs has a new WAYLAND option that enables platform support in libEGL
* mesa-dri now depends on graphics/s2tc for compressed texture support [1]
* re-remove obsolete dependency on makedepends [2]
* correct sed fix backported from 17.1 [3]
PR: 218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
Submitted by: dbn [1], jbeich [2,3]
Reported by: afiskon@devzen.ru [1]
Reviewed by: kwm, johalun0@gmail.com
Approved by: portmgr, swills (mentor)
Differential Revision: https://reviews.freebsd.org/D10448
and `/usr/bin/env python') as invalid, because ports always depend on specific
version of python (e.g. python2 or python3), and generic `python'
which is link to either of them may point to incorrect version or
be not available at all (since it's installed by separate optional
python metaport)
Approved by: portmgr (mat), python (sunpoet)
Differential Revision: D9332
and www. Scripts (with possibly incorrect shebangs) may be located
anywhere in ${PREFIX}, including, for instance, lib/ (multimedia/lives):
Error: '/usr/bin/perl' is an invalid shebang you need USES=shebangfix for 'lib/lives/plugins/effects/rendered/colour_replace'
and ${DATADIR}/ (databases/cego):
Error: '/bin/bash' is an invalid shebang you need USES=shebangfix for 'share/cego/cgbackup'
There may be some more false positives, but broken scripts are much
more severe problem. There's also whitelist mechanism which lets
you ignore shebangs for certain kinds of files (like .pm) which may
be extended to fix FPs
Approved by: portmgr (swills)
Differential Revision: D8923