Commit graph

1225 commits

Author SHA1 Message Date
Baptiste Daroussin
7f5f7018b9 Make build-depends-list and run-depends-list accept dependency lines without
${PORTSDIR}

Sponsored by:	Gandi.net
2015-08-25 12:08:43 +00:00
Mathieu Arnold
741e1ac058 Add an optional error message for opt_PREVENTS, opt_PREVENTS_MSG.
Reviewed by:	bapt
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3469
2015-08-24 13:07:31 +00:00
Mathieu Arnold
bfbc1e51b7 Introduce <opt>_IMPLIES and <opt>_PREVENTS to register dependencies, or
conflicts, between options.

PR:		191144
Submitted by:	adamw
Sponsored by:	Absolight
2015-08-18 11:00:57 +00:00
Mathieu Arnold
21a283f3be Remove UNIQUENAME and LATEST_LINK.
UNIQUENAME was never unique, it was only used by USE_LDCONFIG and now,
we won't have conflicts there.

Use PKGBASE instead of LATEST_LINK in PKGLATESTFILE, the *only* consumer
is pkg-devel, and it works just fine without LATEST_LINK as pkg-devel
has the correct PKGNAME anyway.

Now that UNIQUENAME is gone, OPTIONSFILE is too. (it's been called
OPTIONS_FILE now.)

Reviewed by:	antoine, bapt
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3336
2015-08-17 14:20:40 +00:00
Mathieu Arnold
e8796ef612 Rewrite the target ordering code.
The targets now have priority assigned to them, and, when the dependency
ordering magic is done at the end of bsd.port.mk, they are sorted
according to their priority.

This allows USES to add targets easily and have them run whenever they
want without touching bsd.port.mk.

To add a target that runs just before post-configure run, do:

_USES_configure+=  695:my-post-configure
my-post-configure:
	do something

To fine tune when the target is ran, look at the values in the *_SEQ
variables at the end of bsd.port.mk, and the other USES.

Allow ports Makefiles to override the priority of targets with the
TARGET_ORDER_OVERRIDE variable.  For example, to get post-install
running earlier, (its default is 700) do:

TARGET_ORDER_OVERRIDE=	  650:post-install

While there, add options target helpers for the do-* targets when they
exist.

Reviewed by:	antoine, bapt
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3099
2015-08-17 13:31:25 +00:00
Alexander Leidinger
435ea2a95a Re-commit of
64 bit linuxulator support (not activated by default):
 - most of the work was done by Alan Jude
 - all errors are mine
 - 64bit (may) have rough edges
 - I validated
    * that the 32bit part doesn't has deinstall regressions (incl. EXP runs by
      antoine)
    * 29 of 72 64bit ports ports don't have deinstall leftovers (more validation
      later, when I dare to activate the 64bit linuxulator in the kernel)
 - the infrastructure part looks mature enough to let more test-bunnies get
   some experience with the new 64 bit parts
 - to use it you shall have no linux ports installed and have to specify
   (on your own risk) the following in make.conf before installing the ports:
   OVERRIDE_LINUX_BASE_PORT=c6_64
   OVERRIDE_LINUX_NONBASE_PORTS=c6_64

This is on top of the exiting c6 linux ports. Given that CentOS 7 is 64bits
only, we decided to have it as an "overlay" instead of new ports.
The 64bit part only installs 64bit executables, the 32bit ports can not be
installed at the same time (if needed we can think of letting the 64bit
overlay install the 32bit parts too, but given the CentOS 7 comment
above...).

Differential Revision:	https://reviews.freebsd.org/D174
Submitted by:		alanjude
Sponsored by:		Essen FreeBSD Hackathon 2015
Reviewed by:		xmj, eadler (earlier versions)
Approved by:		portmgr (antoine after some EXP-runs)
2015-08-09 19:14:13 +00:00
Mathieu Arnold
033b3198e1 Add a note about not changing MASTER_SITE_BACKUP.
Sponsored by:	Absolight
2015-07-28 07:34:38 +00:00
Antoine Brodin
011dfa81be Unbreak INDEX, reverting r392921
With hat:	portmgr
2015-07-26 13:35:29 +00:00
Alexander Leidinger
3aeeb3f1bd 64 bit linuxulator support (not activated by default):
- most of the work was done by Alan Jude
 - all errors are mine
 - 64bit (may) have rough edges
 - I validated
    * that the 32bit part doesn't has deinstall regressions
    * 29 of 72 64bit ports ports don't have deinstall leftovers (more validation
      later, when I dare to activate the 64bit linuxulator in the kernel)
 - the infrastructure part looks mature enough to let more test-bunnies get
   some experience with it
 - to use it you shall have no linux ports installed and have to specify
   (on your own risk) the following in make.conf before installing the ports:
   OVERRIDE_LINUX_BASE_PORT=c6_64
   OVERRIDE_LINUX_NONBASE_PORTS=c6_64

This is on top of the exiting c6 linux ports. Given that CentOS 7 is 64bits
only, we decided to have it as an "overlay" instead of new ports.
The 64bit part only installs 64bit executables, the 32bit ports can not be
installed at the same time (if needed we can think of letting the 64bit
overlay install the 32bit parts too, but given the CentOS 7 comment
above...).

Differential Revision:	https://reviews.freebsd.org/D174
Submitted by:		alanjude
Sponsored by:		Essen FreeBSD Hackathon 2015
Reviewed by:		xmj, eadler (earlier versions)
Approved by:		portmgr (implicit, I remember blanked approval for
			linux parts loooong ago, punish me if you don't
			agree anymore)
2015-07-26 13:06:24 +00:00
Baptiste Daroussin
888089220d Pass PKGBASE to qa.sh 2015-07-19 15:32:35 +00:00
Koop Mast
68f883edfc Convert code in bsd.port.mk for USE_GHOSTSCRIPT* to USES=ghostscript.
Add GHOSTSCRIPT_DEFAULT to bsd.default-versions.mk for easy version selection.
Arguments supported: <empty>, build, run, nox11 and agpl

PR:		201201 (exp-run)
Approved by:	portmgr (mat@)
Exp run by:	antione@ (previous patch)
Differential Revision:	https://reviews.freebsd.org/D2938
2015-07-16 20:53:28 +00:00
Baptiste Daroussin
0c54521b1a Rewite CLEAN-DEPENDS*
Move inlined shell code into a proper script taking 2 args in arguments: full or
limited. The code I more simpler and understandable. The argument allows to
factorize the code between CLEAN-DEPENDS-FULL and CLEAN-DEPENDS-LIST

While here, make the code accept dependencies without ${PORTSDIR}
2015-07-04 08:56:54 +00:00
Baptiste Daroussin
b822a87609 Remove support for distfiles in cdrom
No cdrom distfiles has been shipped for a while, and it causes issues
for users having /cdrom configured in autofs

Reported by:	glebius
Tested by:	glebius
Approved by:	swills
Reviewed by:	swills
Differential Revision:	https://reviews.freebsd.org/D2888
2015-07-02 23:17:27 +00:00
Baptiste Daroussin
9a5437126e Remove useless @ in ALL-DEPENDS-LIST 2015-07-01 22:17:28 +00:00
Baptiste Daroussin
c389e6d809 Move all-depends-list to a regular script
The benefice beside being more readable is to allow support for dependency line
without ${PORTSDIR}

This is also necessary to be able to easily hack on it for FLAVORS/SUBPACKAGE
support
2015-07-01 20:27:19 +00:00
Mathieu Arnold
fc9ea03981 Introduce target option helpers.
With hat:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D2944
2015-07-01 12:11:16 +00:00
Baptiste Daroussin
a974ccd864 Refactor dependency checks and installation
This is an important step to prepare the ports tree for VARIANTS(aka flavours)
and subpackage by making the dependency code easier to deal with.

Change:
- Externalize in a proper shell script the code that was an inlined shell script
- Add better validation on the syntaxe used
- test after the dependency has been installed that it actually really fulfill
  the pattern searched (improving QA)
- Unify lib-depends with other dependency checks
- Make ${PORTSDIR} not mandatory anymore in _DEPENDS lines:
  aka pattern:${PORTSDIR}/category/port can now be written pattern:category/port
  /!\ Please to not use this syntax yet! poudriere have received a fix to be
  able to handle this new syntax (but no new release of poudriere has it yet)
  portmaster/portupgrade hasn't been checked. if one cares about those last 2 it
  would be really nice to provide patches to them!
- Remove _DEPENDS_ALWAYS it has half broken for a while and did not really make
  sense.
- Keep STRICT_DEPENDS for now it might not be necessary anymore given all the
  new checks added, but until someone confirms it is worth keeping it.

Note that all the env passed are prefixed by 'dp_' to avoid polluting children
make

Differential Revision:	https://reviews.freebsd.org/D2897
Reviewed by:	antoine
Exp-run by:	antoine
2015-06-28 18:50:37 +00:00
Dmitry Marakasov
1b0586341c - Add support for BROKEN_${OPSYS}_${OSREL:R}_${ARCH} pattern
Approved by:	portmgr (bapt)
2015-06-27 14:19:49 +00:00
Baptiste Daroussin
80bc42faa4 Fix documentation: all the ports are installed in LOCALBASE include x11 one 2015-06-22 23:02:00 +00:00
Baptiste Daroussin
76611508f8 Remove AUTOMATIC_PLIST documentation from bsd.port.mk it belong to bsd.linux*.mk
where it is already documented
2015-06-22 22:54:05 +00:00
Baptiste Daroussin
302b9c5847 Simplify test on zipped PATCHFILES 2015-06-22 22:22:59 +00:00
Baptiste Daroussin
2469d40c46 Factorize the fake for convenience targets 2015-06-22 21:44:39 +00:00
Baptiste Daroussin
5905b0b5f2 Remove add-plist-buildinfo it has been unhooked for a while and prevent us from
getting any close to reproducible builds
2015-06-22 21:39:10 +00:00
Baptiste Daroussin
2bd1e982bb factorize add-plist-docs and add-plist-examples 2015-06-22 21:34:53 +00:00
Baptiste Daroussin
2c43cad756 Make fetch-url-list an empty target depending on fetch-url-list-int 2015-06-22 21:19:05 +00:00
Baptiste Daroussin
2cda1c5c74 Make package-noinstall an alias of make package
(which is now noinstall by design)
2015-06-22 21:13:36 +00:00
Baptiste Daroussin
3bb2a897b9 Garbage collect unused command definition 2015-06-22 20:27:02 +00:00
Baptiste Daroussin
8d4196a8f2 Make USE_RC_SUBR install rc.d scripts in /etc/rc.d if PREFIX is /usr
Remove now useless USE_RC_ORDER
2015-06-22 19:55:44 +00:00
Mathieu Arnold
23171c40d3 Have make showconfig fail if the config is incorrect.
PR:		188693
Sponsored by:	Absolight
2015-06-13 03:03:51 +00:00
Mathieu Arnold
27d2d3fec9 Support .zip files in PATCHFILES and EXTRA_PATCHES.
PR:		167794 (based on)
Submitted by:	jbeich
Sponsored by:	Absolight
2015-06-13 02:01:43 +00:00
Erwin Lansing
b7e180fee3 Document check-plist and check-sanity targets.
PR:		135569
Submitted by:	alexbestms@math.uni-muenster.de
2015-06-12 20:14:56 +00:00
Baptiste Daroussin
0013e695a9 Remove NEED_ROOT, the last customer has been modified to be able to properly
package as a regular user

USES=fakeroot and USES=uidfix does a better job and is less intrusive and allows
to simplify the way we handle the different targets in the framework
2015-06-04 19:32:29 +00:00
John Marino
12a19c24bf bsd.port.mk: Implement BROKEN_${OPSYS} and BROKEN_${OPSYS}_${OSREL:R}
Examples of use:
  * BROKEN_FreeBSD=	does not link
  * BROKEN_DragonFly=	requires later jail
  * BROKEN_FreeBSD_8=	long type-name is invalid

The latter example could replace something like:

  .include <bsd.port.pre.mk>
  .if ${OPSYS} == FreeBSD && ${OSVERSION} <= 900000
  BROKEN=	long type-name is invalid
  .endif

Differential Revision:	https://reviews.freebsd.org/D2207
Reviewed by:		portmgr
Approved by:		portmgr (mat)
2015-06-02 21:17:00 +00:00
Mathieu Arnold
ace79eb6b7 This was not supposed to escape my ports tree.
With hat:	portmgr
Pointy hat to:	mat
Sponsored by:	Absolight
2015-05-29 13:12:49 +00:00
Mathieu Arnold
70444a23e6 Introduce USE_GITHUB=nodefault to allow fetching additional distfiles
from github, but not the default one.

With hat:	portmgr
Sponsored by:	Absolight
2015-05-29 13:07:33 +00:00
Mathieu Arnold
676e4ffcf4 USE_GITHUB can now fetch multiple distfiles. It uses a grouping feature
similar to MASTER_SITES/PATCH_SITES.

Some helpful variables are provided: WRKSRC_<group> for putting things in the
right place in post-extract, and DISTNAME_<group>/DISTFILE_<group> for use with
EXTRACT_ONLY.

PR:		200483
Differential Revision:	https://reviews.freebsd.org/D2608
Submitted by:	mat
With hat:	portmgr
Exp run by:	antoine
Sponsored by:	Absolight
2015-05-28 16:37:01 +00:00
Mathieu Arnold
cb28a089d6 Remove GH_COMMIT support.
Differential Revision:	https://reviews.freebsd.org/D2606
With hat:	portmgr
Sponsored by:	Absolight
2015-05-21 15:25:40 +00:00
Mathieu Arnold
18cec56a95 Use the same, working, logic for DIST/PATCH group parsing everywhere.
With hat:	portmgr
Sponsored by:	Absolight
2015-05-14 10:10:16 +00:00
Bryan Drewery
007bf7a3d4 USE_GITHUB: Fix WRKSRC to contain the full DISTVERSION prefix/suffx when GH_TAGNAME not set.
The GH_TAGNAME-based GH_TAGNAME_EXTRACT is now always used for the new style
USE_GITHUB WRKSRC default.

This was not spotted before since all but 1 github ports were using 'v' as a
prefix, where github already stripped it. So the default GH_PROJECT-DISTVERSION
was fine. The other case was x11-fonts/sourcesanspro-ttf where
GH_TAGNAME was defined to have the full DISTVERSION prefix/suffx.

Tested against all current USE_GITHUB !GH_COMMIT ports.

PR:		199913
With hat:	portmgr
Reported by:	jbeich
2015-05-04 17:42:29 +00:00
Antoine Brodin
f7f5de9089 Remove _*OWNGRP, with staging it's not useful anymore
With hat:	portmgr
Original submission:	bapt
Exp-run:	self
2015-05-04 13:21:17 +00:00
Baptiste Daroussin
0f5d587ef2 Remove unintended change from r385384 those will come later 2015-05-04 08:55:04 +00:00
Baptiste Daroussin
dd86eab2d5 Mark NEED_ROOT as deprecated, It was a wrong idea as people are abusing it.
There is now USES=fakeroot for complicated cases if needed.
2015-05-04 08:53:20 +00:00
Bryan Drewery
aa6ad6e726 USE_GITHUB: For the new support, fix DISTNAME to be more consistent.
When using GH_TAGNAME the DISTNAME would have GH_PROJECT and GH_ACCOUNT in
it. When not using GH_TAGNAME it would not have this. Now both cases
will add in the GH_PROJECT and GH_ACCOUNT.

Add special care to ensure that the DISTVERSION is not added in twice. If
a port does GH_TAGNAME=v${PORTVERSION} it will be added in twice though. For
that case DISTVERSIONPREFIX=v should be set and no GH_TAGNAME should be used.

empty() is used rather than (!defined || !${}) to support fmake.

The purpose of setting DISTNAME at all in these cases is to make it more clear
that the distfile is from *GITHUB* and to avoid collisions if a project were
to be renamed or moved. Without adding in GH_PROJECT and GH_ACCOUNT then there
are real risks that collisions on filenames would happen on renamed or moved
projects, which is fairly common. A GITHUB-generated file may not match
a custom-rolled or git-archive-rolled distfile.

PR:		199069
With hat:	portmgr
Testing done:	All USE_GITHUB ports without GH_COMMIT were checksum/fetch/extract/WRKSRC tested.
2015-04-28 18:44:04 +00:00
Antoine Brodin
a5673b92fb Do not error on dependency on ${NONEXISTENT}:dir:target when STRICT_DEPENDS
is set

Reviewed by:	bdrewery
With hat:	portmgr
2015-04-28 15:56:30 +00:00
Bryan Drewery
7925d59ca7 Add a STRICT_DEPENDS feature which validates dependencies are installed, does
not install missing ones, and considers any missing ones as fatal.

This will be used by Poudriere to validate dependency lines are correct.

An example case is:
  RUN_DEPENDS= foo:${PORTSDIR}/ports-mgmt/bar where the port does not provide
  anything named 'foo'. In every phase it will attempt to install the bar port
  to satisfy the depdendency and continue to fail to satisfy it. This can
  eventually lead to unexpected errors such as trying to install a port
  in the 'stage' phase when running as non-root and will encounter a pkg(8)
  permissions issue.

  This sort of issue occurred in http://lists.freebsd.org/pipermail/freebsd-ports/2015-April/098892.html

Discussed with:	bapt
With hat:	portmgr
2015-04-21 18:16:31 +00:00
Tijl Coosemans
f3d0196f85 Remove the destination of a copy before copying to it because it may be
a symlink and then cp follows the link.

Approved by:	portmgr (antoine)
2015-04-21 09:03:52 +00:00
Tijl Coosemans
68edbeeaae - Display a stage-qa warning when ports use PREFIX/var instead of /var
- Add --localstatedir=/var to _LATE_CONFIGURE_ARGS (like --mandir) but not
  when CONFIGURE_ARGS already sets it.  (GNU configure scripts set it to
  PREFIX/var when PREFIX != /usr.)
- Add --localstatedir="${PREFIX}/var" to CONFIGURE_ARGS in some ports so
  they aren't affected by this change (for now at least).  This commit is
  meant to ensure that new ports don't make the same mistake.

- games/acm: the configure script in this port is very old; instead of
  patching it more, just replace GNU_CONFIGURE with HAS_CONFIGURE.
- irc/charybdis: it already used /var but adding --localstatedir=/var
  changed the behaviour of the configure script; adjust the port to this.

PR:		199506
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2015-04-20 19:06:29 +00:00
Gerald Pfeifer
728fb3cb3d Abstract ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} which appears five times
and introduce and use WRKDIR_PKGFILE instead.

PR:		199526
Approved by:	portmgr (bdrewery)
2015-04-19 18:33:37 +00:00
Bryan Drewery
005a60b7c9 Improve the OSVERSION==UNAME_r validation from r369644 by skipping it
if OSVERSION is specified on the cmdline. This makes testing simpler.

This only works for bmake.

	# make -V CONFIGURE_LIBS
	-lnew_release
	# make -V CONFIGURE_LIBS OSVERSION=800000
	-lolder_release
	# env OSVERSION=800000 make -V CONFIGURE_LIBS
	make: "/root/svn/ports/Mk/bsd.port.mk" line 1182: UNAME_r (11.0-CURRENT) and OSVERSION (800000) do not agree on major version number.
	# echo OSVERSION=800000 >> /etc/make.conf
	# make -V CONFIGURE_LIBS
	make: "/root/svn/ports/Mk/bsd.port.mk" line 1182: UNAME_r (11.0-CURRENT) and OSVERSION (800000) do not agree on major version number.

Reported by:	danfe
With hat:	portmgr
2015-04-15 16:14:47 +00:00
Gerald Pfeifer
1540c897ae Simplify the description of BUNDLE_LIBS.
Approved by:	portmgr (bapt)
2015-04-12 23:01:32 +00:00