1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00
Commit Graph

99 Commits

Author SHA1 Message Date
Mathieu Arnold
b19fe1e937 SC1004: This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
You have a single quoted string containing a backslash followed by a
linefeed (newline). Unlike double quotes or unquoted strings, this has
no special meaning. The string will contain a literal backslash and a
linefeed.

If you wanted to break the line but not add a linefeed to the string,
stop the single quote, break the line, and reopen it.

PR:             227109
Submitted by:   mat
Sponsored by:   Absolight
2018-06-08 09:26:41 +00:00
Mathieu Arnold
b234bfd716 SC2162: read without -r will mangle backslashes.
By default, read will interpret backslashes before spaces and line
feeds, and otherwise strip them. This is rarely expected or desired.

Normally you just want to read data, which is what read -r does. You
should always use -r unless you have a good reason not to.

PR:             227109
Submitted by:   mat
Sponsored by:   Absolight
2018-06-08 09:26:34 +00:00
Mathieu Arnold
ac5e64ba02 SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
It's common to use A && B to run B when A is true, and A || C to run C
when A is false.

However, combining them into A && B || C is not the same as if A then B
else C.

In this case, if A is true but B is false, C will run.

If an if clause is used instead, this problem is avoided.

PR:             227109
Submitted by:   mat
Sponsored by:   Absolight
2018-06-08 09:26:31 +00:00
Mathieu Arnold
bf064c8390 SC2006: Use $(..) instead of legacy ...
Backtick command substitution `STATEMENT` is legacy syntax with several
issues.

 - It has a series of undefined behaviors related to quoting in POSIX.
 - It imposes a custom escaping mode with surprising results.
 - It's exceptionally hard to nest.

$(STATEMENT) command substitution has none of these problems, and is
therefore strongly encouraged.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:54 +00:00
Mathieu Arnold
ccbfedd88c SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
cd can fail for a variety of reasons: misspelled paths, missing
directories, missing permissions, broken symlinks and more.

If/when it does, the script will keep going and do all its operations in
the wrong directory. This can be messy, especially if the operations
involve creating or deleting a lot of files.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:48 +00:00
Mathieu Arnold
2364943f9d SC2153: Possible misspelling: PORTNAME may not be assigned, but portname is.
ShellCheck has noticed that you reference a variable that is not
assigned in the script, which has a name remarkably similar to one that
is explicitly assigned. You should verify that the variable name is
spelled correctly.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:45 +00:00
Mathieu Arnold
644b6c731d SC2091: Remove surrounding $() to avoid executing output.
ShellCheck has detected that you have a command that just consists of a
command substitution.

This is typically done in order to try to get the shell to execute a
command, because $(..) does indeed execute commands. However, it's also
replaced by the output of that command.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:42 +00:00
Mathieu Arnold
d605296d6e SC2145: Argument mixes string and array. Use * or separate argument.
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
2018-06-01 16:20:22 +00:00
Bryan Drewery
9c31cc2ac7 stage-qa: Change stripped check to only look for .debug_info.
'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
2018-05-10 23:00:15 +00:00
Mathieu Arnold
3754818b76 Handle flavors in the proxydeps qa check.
Reviewed by:	bdrewery
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D14595
2018-03-07 09:17:33 +00:00
Mathieu Arnold
eb10fef04c Add a hint about devel/boost-python-libs.
Sponsored by:	Absolight
2018-03-06 16:25:16 +00:00
Torsten Zuehlsdorff
2816b55780 add new stage-qa target: gemfiledeps
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
2018-01-22 16:35:23 +00:00
Dmitry Marakasov
273db182a9 Report (in q/a) and fix (in shebangfix) python[23] shebangs
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
2017-12-21 13:27:51 +00:00
Mathieu Arnold
e5587103cd Fix qa lib dependency checks when using libmap.conf.
This happens, for instance, if x11/nvidia-driver is installed.

PR:		221406
Submitted by:	tobik
Approved by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D11977
2017-12-15 15:56:09 +00:00
Mathieu Arnold
30c4ca5784 Generic FLAVORS work.
- 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
2017-11-30 15:33:29 +00:00
Adriaan de Groot
0607e8e163 Take out the check that suggests that all <foo>-qt5 ports should be
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
2017-10-04 21:01:09 +00:00
Mathieu Arnold
2454b666be Remove a useless block in the shebang checks.
* 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
2017-09-25 22:45:08 +00:00
Mathieu Arnold
3fcd0e41de Remove USES=execinfo.
PR:		220271
Submitted by:	mat (review), Yasuhiro KIMURA (PR)
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D11488
2017-09-22 10:48:28 +00:00
Nikolai Lifanov
327751a539 add new stage-qa target: gemdeps
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
2017-08-07 19:09:41 +00:00
Koop Mast
3d842c21b9 Add gstreamer 0.10 and 1.0 hints to the qa script.
Approved by:	portmgr (bapt@)
Differential Revision:	https://reviews.freebsd.org/D11610
2017-08-05 22:07:45 +00:00
David Naylor
9920d3ae65 qa: add check for NO_ARCH
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
2017-06-18 18:09:16 +00:00
Matthew Rezny
e6acde078c Consolidate the Mesa ports, update to 17.0.4, and add Wayland option
* 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
2017-05-12 18:46:53 +00:00
Mathieu Arnold
15da6f6fbc Sometime, USES=iconv does not bring in the required dependency.
Reported by:	kwm
Sponsored by:	Absolight
2017-05-10 13:03:31 +00:00
Dmitry Marakasov
60f77099e1 - Add /bin/rc to blacklist for qa.sh, since it's not available on FreeBSD
Approved by:	portmgr (mat)
Differential Revision:	https://reviews.freebsd.org/D10426
2017-04-21 08:56:32 +00:00
Dmitry Marakasov
c927ccddc4 Treat python shebangs without version specified (e.g. `/usr/local/bin/python'
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
2017-04-10 15:21:25 +00:00
Dmitry Marakasov
e558d8633d Don't limit Q/A check for bad shebangs with just bin, sbin, libexec
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
2017-04-10 14:19:25 +00:00
Mathieu Arnold
8b27ee4a62 The lang/perl5* ports are allowed to have their shebangs pointing to the
versionned binaries.

Sponsored by:	Absolight
2017-04-04 14:06:41 +00:00
Baptiste Daroussin
067df085eb Finish removal of gal2 2017-04-01 22:21:32 +00:00
Baptiste Daroussin
cdd9171c1c Remove more obsolete gnome2 components 2017-04-01 22:05:39 +00:00
Baptiste Daroussin
ba0c69cb4e Catchup with recent removals 2017-04-01 20:15:36 +00:00
Koop Mast
50a34a0774 Now that all supported FreeBSD versions support libmap.conf files installed
from ports, remove the symlink dance with libGL/libEGL/libgles and the
nvidia-driver ports.

* Revert libGL/libEGL/libglesv2 ports to normal.
* Rename the conflicting libraries from the nvidia-driver ports with a
  -NVIDIA prefix and install a libmap.conf file to map to these versions.
* Remove the special case from Mk/Scripts/qa.sh for libGL and libEGL.
* Sadly the symlink dance between nvidia-driver and xorg-server for glx.so
  need to stay, due to xorg-server opening that file with dlopen(3).

Approved by:	portmgr@ (mat@ (prio version))
Differential Revision:	https://reviews.freebsd.org/D7848
2017-02-11 16:43:11 +00:00
Mathieu Arnold
a345c5cf11 Tell Module::Build to use LOCALBASE/bin/perl and not
LOCALBASE/bin/perl5.xx.y.

Add a QA check to test for it.

Sponsored by:	Absolight
2017-01-31 16:21:22 +00:00
Mathieu Arnold
adcd75b823 Provide a port/perl module mapping utility.
Sometime, Perl ports names do not map to the modules they provide
easily, and it makes it impossible to check for the existence of those
modules in Perl core.

Sponsored by:	Absolight
2017-01-19 15:06:38 +00:00
Mathieu Arnold
6e9240dfb1 Report the binary with bad linking.
Sponsored by:	Absolight
2016-12-09 14:24:07 +00:00
Sunpoet Po-Chuan Hsieh
ae0db8070b - Skip soname check if ${STAGEDIR}${PREFIX}/lib directory does not exist
Differential Revision:	https://reviews.FreeBSD.org/D8697
Approved by:	mat (portmgr)
2016-12-03 21:30:08 +00:00
Tobias C. Berner
30a183cdd9 Importing KDE Frameworks into the ports tree (required for newer KDE Desktop and Applications)
KDE Frameworks is a collection of libraries and software frameworks by KDE
that serve as technological foundation for KDE Plasma 5 and KDE Applications
distributed under the GNU Lesser General Public License (LGPL) [1].

The work is based on what we have in the KDE testing repo [2].

This is the next big step in updating the KDE Desktop and its Applications
to anything less dusty.

With this change, `USES=kde:5` is now a valid option. Ports that need to depend
on KDE Framework can now set:
	USES=kde:5
	USE_KDE=<framework1> <framework2> ... <frameworkX>

For example: www/qupzilla-qt5 can depend on sysutils/kf5-kwallet via:
	KWALLET_USE=            KDE=wallet

I would like to thank Raphael and Adriaan for reviewing the ports in the testing
repo :)

[1] https://en.wikipedia.org/wiki/KDE_Frameworks
[2] http://src.mouf.net/area51/log/branches/plasma5

Reviewed by:	rakuco, mat, groot_kde.org
Approved by:	rakuco (maintainer)
Differential Revision:	https://reviews.freebsd.org/D8329
2016-11-14 16:12:56 +00:00
Mathieu Arnold
7c8e7b69a8 Add a Perl CORE QA check.
This will use Module::CoreList to tell you if a dependency you added can
be removed, or only conditionally added.

Approved by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7832
2016-10-29 10:10:33 +00:00
Mathieu Arnold
73a69a6388 Do not force a lookup in LOCALBASE/lib for shared libraries.
ldd should work correctly if rpath is set, and this adds false
positives.

PR:		213547
Submitted by:	John Hein
Sponsored by:	Absolight
2016-10-25 11:44:19 +00:00
Mathieu Arnold
e7064f0d41 Replace non breaking space \xa0 with a normal space.
Sponsored by:	Absolight
2016-10-20 13:19:39 +00:00
Koop Mast
c8776db59d Add ncurses suggestion to qa.sh.
Approved by:	portmgr (mat@)
Differential Revision:	https://reviews.freebsd.org/D7885
2016-09-13 20:35:34 +00:00
Mathieu Arnold
f999dd783a Provide a standard way to look up for executables and shared libraries.
PR:		211146
Submitted by:	yuri rawbw com
Sponsored by:	Absolight
2016-09-08 14:12:58 +00:00
Mathieu Arnold
63598e1919 Disable some checks for linux ports.
- shebang check: skip scripts in LINUXBASE.  Things like /bin/bash are
  valid in a Linux context.  Also, these scripts usually only work with
  a Linux shell so it doesn't make sense to try to make them work from a
  FreeBSD shell.
- prefixvar check: allow LINUXBASE/var.
- proxydeps check: only test FreeBSD ELF files because ldd(1) doesn't
  work with other ELF files.

PR:		212419
Submitted by:	tijl
Sponsored by:	Absolight
2016-09-08 14:12:41 +00:00
Mathieu Arnold
ac80808e02 Add a stage-qa check to check for the existence of SONAME in .so's.
If a port provides .so.X files, they have to have a SONAME for them to
work correctly.

While there, incorporate a reverse soname checks in proxydeps.
A port that needs a .so.X from another port which does not have a
SONAME.

Reviewed by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7454
2016-08-29 15:23:52 +00:00
Mathieu Arnold
64a3179722 Use LIB_DEPENDS when appropriate in KDE components.
Lots of KDE components are providing libraries, and they were,
strangely, written as BUILD_ or RUN_DEPENDS, with a full path to the
library.  Change this so that if a component is needed at both build,
and, run-time, then it gets a LIB_DEPENDS.

Reviewed by:	rakuco, tcberner
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7625
2016-08-26 12:43:57 +00:00
Mathieu Arnold
a09e3f68ab Tell people to add USES=gettext-runtime, not USES=gettext.
This is done after the port has been built, so it is already building,
so it does not need to be added a BUILD_DEPENDS on gettext-tools.

Discussed with:	dumbbell
Sponsored by:	Absolight
2016-08-05 18:29:10 +00:00
Mathieu Arnold
816ca34d92 Only warn about symlinks that exist in the stage directory, or that
exist nowhere.

Sponsored by:	Absolight
2016-06-30 09:59:27 +00:00
Dmitry Marakasov
062a97e125 - Fix typo: "you need USES=nssl" -> "you need USES=ssl"
Approved by:	mat
Differential Revision:	D6997
2016-06-28 07:58:43 +00:00
Mathieu Arnold
639a283517 Catch up two instances of USE_OPENSSL.
Sponsored by:	Absolight
2016-06-27 13:26:17 +00:00
Mathieu Arnold
06b4ea3876 Replace bsd.openssl.mk with USES=ssl
Add a qa hint about needing, or not, USES=ssl.

Fix ports doing silly things, like including bsd.openssl.mk directly.

PR:		210322
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6866
2016-06-27 11:31:10 +00:00
Mathieu Arnold
267e746730 Extend the symlink checks to warn on absolute targets.
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6930
2016-06-23 11:31:15 +00:00