Commit graph

204 commits

Author SHA1 Message Date
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
Bryan Drewery
7568613077 ports_env: Fix OPSYS not being exported.
This was causing excessive 'uname -s' executions during Poudriere dependency
calculations.  The reasoning is due to HAVE_COMPAT_IA32_KERN having a newline
quoted at the end of it as '\ ' by bmake:

  # make -f Mk/bsd.port.mk -V 'HAVE_COMPAT_IA32_KERN=${HAVE_COMPAT_IA32_KERN:Q}' | cat -v
  HAVE_COMPAT_IA32_KERN=YES\

This resulted in the following being executed:

  export HAVE_COMPAT_IA32_KERN="YES OPSYS=FreeBSD"

With hat:	portmgr
2017-02-17 22:22:27 +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
ce82850852 Remove some code added in r858[1], still don't know what it was supposed to
be doing at the time.

When fetching, the code was looking for a distfile in either its
DIST_SUBDIR or the main DISTDIR, which was ok.  Until a port
(devel/cargo) moves one of its distfile
(cargo-nightly-x86_64-unknown-freebsd.tar.gz) into a subdirectory.
do-fetch would see the distfile in DISTDIR and say, ok, it's there, and
checksum would not see it in its subdirectory and fail.

1: phabricator's blame mode is really, really, great to unroll history.

PR:		216442
Submitted by:	mat
Reported by:	Bob Willcox, dhw (on ports)
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D9318
2017-01-28 10:52:20 +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
Tijl Coosemans
02f27a83b4 The output of tools like awk, date, sort, tr,... depends on the current
locale set by the user.  Add LANG=C and LC_ALL=C at the beginning of
bsd.port.mk and export them so all commands are executed with the C locale.
LC_ALL=C overrides all other LC_* variables.  LANG is used by setlocale(3)
as default value for LC_* variables, so normally it isn't used when LC_ALL
is set, but there's code out there that looks at LANG directly so it's safer
to set it as well.  The only commands not captured by this are !=
assignments before any inclusion of bsd.port.*mk.

Introduce USE_LOCALE=<locale> that adds LANG=<locale> and LC_ALL=<locale> to
CONFIGURE_ENV and MAKE_ENV so upstream build systems can be executed with a
different locale (e.g. USE_LOCALE=en_US.UTF-8).

PR:		215882
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2017-01-18 13:20:31 +00:00
Mathieu Arnold
49152b839d Implement EXTRA_PATCH_TREE.
PR:		215726
Reported by:	julian
2017-01-16 16:47:05 +00:00
Mathieu Arnold
1cc9fcd1c7 Extract do-patch into a separate script.
PR:		215761
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D9029
2017-01-16 16:47:00 +00:00
Rene Ladan
6f019c90b3 Remove support for FreeBSD < 10.3 from Mk/*
This does not yet convert the files to bmake.

Reviewed by:	mat
Differential Revision:	https://reviews.freebsd.org/D9016
2017-01-03 07:24:49 +00:00
Baptiste Daroussin
ddf28d222b Use dp_DISTINFO_FILE instead of DISTINFO_FILE 2016-12-18 21:43:24 +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
Antoine Brodin
428645d185 Fix directory creation when primary group is different from user name 2016-11-01 00:33:36 +00:00
Bryan Drewery
e73c0c591a Fix package upgrade setting wrong ownership on a package's $HOME.
This happens when the UID/GID doesn't match the expected number from
UIDs/GIDs.

https://github.com/freebsd/pkg/issues/1485 has more details.

With hat:	portmgr
Discussed with:	bapt, mat
2016-10-31 22:37:21 +00:00
Bryan Drewery
5851a354c5 Don't truncate DEPENDS_ARGS here.
This code seems unused though since bsd.port.mk has its own handling
for clean-depends.

PR:		212273
With hat:	portmgr
2016-10-31 20:54:50 +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
Mathieu Arnold
1ce1ab6ba3 Make make clean be recursive again.
PR:		213188
Submitted by:	tijl
Exp-run by:	antoine
Sponsored by:	Absolight
2016-10-18 15:27:25 +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
Tijl Coosemans
82a87de90c - Replace Mk/bsd.linux-apps.mk and Mk/bsd.linux-rpm.mk with
Mk/Uses/linux.mk.
- Replace USE_LINUX=yes with USES+=linux and USE_LINUX=(.*) with
  USES+=linux:\1 in all ports.
- Replace USE_LINUX_APPS with USE_LINUX in all ports.
- Use INSTALL_SCRIPT instead of INSTALL_PROGRAM to install scripts in some
  ports.
- When USE_LINUX_RPM is defined, simplify the way DISTFILES and EXTRACT_ONLY
  are defined.
- Remove BRANDELF_DIRS and BRANDELF_FILES handling.  In the very rare cases
  that it is still necessary ports can run ${BRANDELF} from post-patch.
- Remove AUTOMATIC_PLIST handling.  Only one port used it.
- Fix Linux MASTER_SITES.
- Replace OVERRIDE_LINUX_BASE_PORT and OVERRIDE_LINUX_NONBASE_PORTS with
  default versions framework.
- bsd.port.mk:
  - Move Linux related bits to Uses/linux.mk, except USE_LINUX_PREFIX.
  - Put USE_LINUX_PREFIX handling after USES processing.
  - Define DOCSDIR, DATADIR, etc. after handling USE_LINUX_PREFIX so it can
    give these variables a different default value.
  - When a package needs to run Linux ldconfig check before installation if
    Linux support is enabled.
- emulators/linux_base-*:
  - Use USES=linux and remove duplication.
  - Remove files/lp.  FreeBSD or CUPS lp(1) should work.
  - Remove files/yp.conf.  No longer seems to be used.
  - Remove pkg-deinstall and move pkg-install into pkg-plist.
  - Update pkg-descr and pkg-message.
  - Fix handling of ldconfig cache in pkg-plist.
- devel/fb-adb: Use a Linux shell to run a Linux script but patch the script
  to use FreeBSD mkdir so mkdir -p $path creates $path and not
  /compat/linux/$path.

PR:		211645
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2016-09-05 19:23:42 +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
d131b524b1 typo.
Submitted by:	wblock
Sponsored by:	Absolight
2016-08-17 08:55:35 +00:00
Mathieu Arnold
38efae9d84 Unbreak make missing.
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D7504
2016-08-17 08:54:43 +00:00
Mathieu Arnold
74109de537 Only try to create DISTDIR if it does not exist already.
It turns out, some people, instead of setting DISTDIR, replace it with a
symlink pointing to where DISTDIR should be pointing.

And mkdir -p <symlink> fails.

PR:		211623
Reported by:	Harald Schmalzbauer
Sponsored by:	Absolight
2016-08-08 12:57:34 +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
b79eed7e66 Add a PKGMESSAGES variable that allows the framework to have more than
one PKGMESSAGE file.

This allows the framework to add messages to ports, without touching
their PKGMESSAGE file.

Sponsored by:	Absolight
2016-08-03 12:45:30 +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
Bryan Drewery
c203addf6d Fix package depends install not respecting DEPENDS_ARGS for the PKGFILE lookup.
This also optimizes the PKGBASE/PKGFILE lookup with the new port_var_fetch(),
which passes in the known DEPENDS_ARGS.
2016-06-24 05:04:33 +00:00
Bryan Drewery
5061f450c8 Add a function port_var_fetch() for fetching multiple variables from a port.
This is taken from Poudriere (uncommitted)
2016-06-24 05:03:34 +00:00
Bryan Drewery
97587b1a48 Show proper variable in error.
With hat:	portmgr
2016-06-24 04:53:45 +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
Mathieu Arnold
5f1b1ae084 Extract create-manifest.
PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:39 +00:00
Mathieu Arnold
5ba3aba7ff Reverse tests to decrease complexity.
PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:35 +00:00
Mathieu Arnold
a2262e9313 Remove unnecessary evals that do-fetch was using.
Turns out that env(1) knows how to parse a properly quoted string
using -S "string", it makes the double eval used for the fetch
command to be unnecessary.

This is because running:
eval "foo $(escape $bar)"
is silly when this works:
foo $bar

So remove escaping and quoting, and sillyness.

PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:29 +00:00
Mathieu Arnold
86cad8dff1 Simplify do-fetch, and remove now unused code.
Turns out that the DEFAULT, and other groups sites were handled in
a different way, ending up having the same code twice, but in
slightly different places.

PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:24:39 +00:00
Mathieu Arnold
4d1c2e3e50 Add USE_OPENSSL to the proxy libs thing.
Sponsored by:	Absolight
2016-06-16 14:32:18 +00:00