1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00
Commit Graph

279 Commits

Author SHA1 Message Date
Mathieu Arnold
a29c880f74 Add a blacklist of ports that other ports must not depend upon.
Those ports are meta ports, and are only there to improve the user's
experience, in which, if they want, say, python or gcc, they do not have
to figure out what version they should be installing, they simply
install python or gcc.

Reviewed by:	antoine
Approved by:	adamw
Differential Revision:	https://reviews.freebsd.org/D19562
2019-03-18 15:59:13 +00:00
Bryan Drewery
f4320c83f5 Respect UID_FILES.
Reported by:	dvl
Tested by:	dvl
Approved by:	portmgr (implicit)
2019-03-09 18:38:18 +00:00
Antoine Brodin
ab1485c33a Fix leftover detection when ccache is not used
With hat:	portmgr
2019-03-01 20:26:11 +00:00
Tobias Kortkamp
69fbf6bed7 Mk/Scripts/qa.sh: Remove glib12 and gtk12
Approved by:	portmgr (bapt)
Differential Revision:	https://reviews.freebsd.org/D19055
2019-02-01 16:43:37 +00:00
Mathieu Arnold
3642a3436f Fix proxydeps QA check when multiple flavor of a package are installed.
Previously it would do this:

$ pkg which -q -o /usr/local/lib/libphonon4qt5.so
multimedia/phonon
$ pkg pkg annotate -q -S multimedia/phonon flavor
qt4
qt5

And that would break things in an interesting way.

This changes makes it use the package name of the required file, which
is unique.

Note that this problem would probably only ever happen on a live system.
I was not able to find a single port that would trigger this it in a
clean environment (poudriere testport).

PR:		231332
Submitted by:	dbn
2019-01-11 12:50:51 +00:00
Mathieu Arnold
dc820c0194 Remove obsolete qa check. 2018-12-17 14:29:41 +00:00
Gerald Pfeifer
c906745e9d Add share/info/*/dir to those files in STAGEDIR to ignore when checking
for orphans, i.e., files in STAGEDIR that are not covered by plist.

This is a follow-up to revision 484628 after which texinfo files are
now installed into ${PREFIX}/share/info. (A file "dir" is then created
and maintained by the tooling.)

Approved by:	portmgr (antoine)
2018-11-10 23:55:42 +00:00
Mathieu Arnold
35326f1a97 security/openssl-devel was removed, but there is a security/openssl111 now. 2018-11-10 10:09:48 +00:00
Antoine Brodin
32617460e5 Use full path to file(1) from base as sysutils/file is buggy
PR:		231554
2018-10-06 08:19:19 +00:00
Sunpoet Po-Chuan Hsieh
6dd23db065 Fix typo
Differential Revision:	https://reviews.freebsd.org/D17263
Approved by:	bapt (portmgr)
2018-09-22 16:45:47 +00:00
Mathieu Arnold
a48e2eda88 Extract PLIST_SUB substitutions into a sed script.
This fixes PLIST_SUB being too big and PLIST_SUB_SED getting bigger than
_POSIX2_LINE_MAX.

PR:		222355
Reported by:	asomers
Reviewed by:	asomers, mfechner
Sponsored by:	Absolight
Differential Revision:	 https://reviews.freebsd.org/D14014
2018-07-26 11:09:46 +00:00
Mathieu Arnold
7256d8f2f7 Tell people who disabled LICENSE processing that it then cannot be
checked.

Reported by:	mfechner
Approved by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D16450
2018-07-26 10:37:36 +00:00
Mathieu Arnold
1e5af0bf74 Have the license qa check actually work.
Pointy hat:	mat
Sponsored by:	Absolight
2018-07-18 11:33:24 +00:00
Mathieu Arnold
f305cacf3a Add a license qa check to tell porters when their ports will be mostly
useless.

Reviewed by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D16103
2018-07-18 11:13:06 +00:00
Mathieu Arnold
1ac9d4e91f Convert to readelf.
objdump is being removed from HEAD, make sure everything still works
when this happens.

PR:		229049
Reported by:	emaste
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D15904
2018-06-30 08:37:33 +00:00
Mathieu Arnold
c0e3ff3da9 Remove dead code.
Sponsored by:	Absolight
2018-06-30 08:36:50 +00:00
Tobias C. Berner
b1a1d38bf9 Replace bsd.qt.mk by Uses/qt.mk and Uses/qt-dist.mk
From now on, ports that depend on Qt4 will have to set
	USES=		qt:4
	USE_QT=		foo bar
ports depending on Qt5 will use
	USES=		qt:5
	USE_QT=		foo bar

PR:		229225
Exp-run by:	antoine
Reviewed by:	mat
Approved by:	portmgr (antoine)
Differential Revision:	→https://reviews.freebsd.org/D15540
2018-06-28 17:39:53 +00:00
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
49b7fa03ac SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.
Since files and arguments are strings passed the same way, programs
can't properly determine which is which, and rely on dashes to determine
what's what.

A file named -f (touch -- -f) will not be deleted by the problematic
code. It will instead be interpreted as a command line option, and rm
will even report success.

Using ./* will instead cause the glob to be expanded into ./-f, which no
program will treat as an option.

It is not possible to use `-f *` because -f only forces the next
argument to be a directory, a later directory named -delete would mess
things up.

PR:             227109
Submitted by:   mat
Sponsored by:   Absolight
2018-06-08 09:26:38 +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
e2bee271c6 Don't exec with a pipe afterwards, it is weird.
PR:             227109
Submitted by:   mat
Sponsored by:   Absolight
2018-06-08 09:26:28 +00:00
Mathieu Arnold
52abedae74 SC2185: Some finds don't have a default path. Specify '.' explicitly.
(false positive, split flags to avoid triggering it.)

PR:             227109
Submitted by:   mat
Sponsored by:   Absolight
2018-06-08 09:26:25 +00:00
Mathieu Arnold
258800dd7b SC2046: Quote this to prevent word splitting.
When command expansions are unquoted, word splitting and globbing will
occur. This often manifests itself by breaking when filenames contain
spaces.

Trying to fix it by adding quotes or escapes to the data will not work.
Instead, quote the command substitution itself.

If the command substitution outputs multiple pieces of data, use a loop
instead.

Add an exception when using set -- where splitting is intended.

PR:             227109
Submitted by:   mat
Exp-run by:	antoine
Sponsored by:   Absolight
2018-06-08 09:26:20 +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
473030b0ea SC2155: Declare and assign separately to avoid masking return values.
In the original code, the return value of mycmd is ignored, and export
will instead always return true. This may prevent conditionals, set -e
and traps from working correctly.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:51 +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
267d5b45d4 SC2163: Exporting an expansion rather than a variable.
export takes a variable name, but shellcheck has noticed that you give
it an expanded variable instead. The problematic code does not export
MYVAR but a variable called foo if any.

Add exception when using indirections where the variable to extract is
actually the value of the variable.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:39 +00:00
Mathieu Arnold
c9551e33bb SC2034: <some var> appears unused. Verify it or export it.
Variables not used for anything are often associated with bugs, so
ShellCheck warns about them.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:36 +00:00
Mathieu Arnold
6675b402ba SC2198: Arrays don't work as operands in [ ]. Use a loop (or concatenate with * instead of @).
Array expansions become a series of words in [ .. ]. Operators expect
single words only.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:33 +00:00
Mathieu Arnold
9035fb8956 SC2221 & SC2222: This pattern always overrides a later/previous one.
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
2018-06-01 16:20:29 +00:00
Mathieu Arnold
c71660dad5 SC2068: Double quote array expansions to avoid re-splitting elements.
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
2018-06-01 16:20:26 +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
Bryan Drewery
7b11b952b5 Add PORTS_ENV_VARS caching support to USES=objc.
Approved by:	portmgr (implicit)
2018-03-13 21:43:28 +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
Bryan Drewery
874f7991d2 Avoid double exporting PORTS_ENV.
Approved by:	portmgr (implicit)
2018-03-03 01:18:50 +00:00
Bryan Drewery
dc15d9f81f Add compiler.mk to PORTS_ENV.
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)
2018-02-28 19:34:05 +00:00
Bryan Drewery
ecec71a78a ports_env: Store list of variables to export in PORTS_ENV_VARS in mk files.
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)
2018-02-28 18:38:17 +00:00
Bryan Drewery
ef270f29a9 Chase r459584: Remove _PYTHON_DEFAULT_VERSION.
Approved by:	portmgr (implicit)
2018-02-28 18:34:31 +00:00
Bryan Drewery
5960d1f56f Remove leftover debugging 2018-02-21 21:26:46 +00:00
Bryan Drewery
e5a42a8c3c Fix RANDOMIZE_MASTER_SITES.
- /usr/games/random moved to /usr/bin/random in 11.0+
- Need to explicitly add in the pipe '|'

Approved by:	portmgr (implicit)
2018-02-20 22:58:19 +00:00
Mathieu Arnold
1aecf7b366 Extract desktop-categories, check-desktop-entries, and install-desktop-entries into scripts.
PR:		225301
Exp-run by:	antoine
Reviewed by:	jilles, kevans
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D11304
2018-01-28 08:25:06 +00:00
Mathieu Arnold
3bbc00468a Add support to passing directories to EXTRA_PATCHES.
Instead of:

  EXTRA_PATCHES=	${PATCHDIR}/feat-foo-patch-file.c \
			${PATCHDIR}/feat-foo-patch-file.h \
			${PATCHDIR}/feat-foo-patch-file2.c

Move those files to ${PATCHDIR}/feat-foo/, name them patch-*, and set:

  EXTRA_PATCHES=	${PATCHDIR}/feat-foo

Approved by:	bdrewery
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D10855
2018-01-25 09:12:21 +00:00
Bryan Drewery
6339d61d4f Allow passing -DDEPENDS_SHOW_FLAVOR to list flavors for dependency lists.
Submitted by:	se (based on D13535)
With hat:	portmgr
2018-01-24 18:54:57 +00:00
Kyle Evans
ad1a66c1f3 make makepatch: Don't replace patches with only metadata changes
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
2018-01-22 16:42:44 +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