Commit graph

1574 commits

Author SHA1 Message Date
Baptiste Daroussin
5c7b1f13e5 Mk/bsd.port.mk: Add FLAVOR_SUB
If defined, for each flavors it will create for the non active one:
PLIST_SUB=	FLAVORNAME="@comment " NO_FLAVOUNAME=""
and for the active one:
PLIST_SUB=	FLAVORNAME="" NO_FLAVOUNAME="@comment "

Same for SUB_LIST

Reviewed by:	manu, bdrewery, mat
Differential Revision:	https://reviews.freebsd.org/D32495
2021-10-18 13:31:56 +02:00
Yuri Victorovich
79ac62f35b
Mk/bsd.port.mk: Export XDG_CACHE_HOME
This adds XDG_CACHE_HOME to the set of XDG_* variables exported in
CONFIGURE_ENV and MAKE_ENV.

Without XDG_CACHE_HOME in the environment some software (for ex.
https://github.com/coursier/coursier) falls back to using
/home/{user}/.cache during the build and writes outside the working
directory.

XDG_CACHE_HOME is described in the XDG Base Directory Specification:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

PR:		255600
Exp-run by:	antoine
2021-10-06 14:01:52 +02:00
Rene Ladan
620968a43a cleanup: drop support for EOL FreeBSD 11.X
Search criteria used:
- 11.4
- OSREL*
- OSVER*
- *_FreeBSD_11

Input from:
- adridg: devel/qca-legacy
- jbeich: _WITH_DPRINTF, _WITH_GETLINE, GNU bfd workarounds
- sunpoet: security/p5-*OpenSSL*

Reviewed by:	doceng, kde, multimedia, perl, python, ruby, rust
Differential Revision: https://reviews.freebsd.org/D32008
Test Plan: make index
2021-09-30 23:23:30 +02:00
Piotr Kubaj
fb5f03a87c Mk/bsd.lto.mk: add global LTO support for ports
It's well known that LTO provides both performance and size benefits for
binaries.

Add preliminary, opt-in support for global LTO enforcement to ports. Ports that
provide LTO option on their own and the ones that don't work with LTO will need
to set LTO_UNSAFE in the future.

PR:	258536
2021-09-30 18:27:50 +00:00
Baptiste Daroussin
aedc18359a Mk/bsd.port.mk: fix NO_PKG_REGISTER
Since we switched to pkg, NO_PKG_REGISTER was not working anymore.
Since pkg 1.17.2 the pkg register command do support -N option which
allows to bring back NO_PKG_REGISTER.

PR:	191461
2021-09-21 10:40:03 +02:00
Baptiste Daroussin
ea36ef6f67 Mk/bsd.port.mk: Add PKG_COMPRESSION_LEVEL user variable
it allows users to set their desired compression level when packaging
in make.conf

PR:		257427
Suggested by:	Trond Endrestol <Trond.Endrestol@ximalas.info>
2021-08-23 16:12:20 +02:00
Baptiste Daroussin
03d5e2defa Mk/bsd.port.mk: clean up some documentation formatting 2021-08-23 16:12:20 +02:00
Baptiste Daroussin
6b9c8ced32 Mk/bsd.port.mk: document PKG_COMPRESSION_FORMAT 2021-08-23 16:12:19 +02:00
Piotr Kubaj
84291da55d Mk/bsd.port.mk: remove elfv2 workaround
Binutils is not present anymore on elfv2 systems.

Fixes build of audio/invada-studio-plugins-lv2:
/usr/local/bin/ld: unrecognized option '-B/usr/local/bin'
/usr/local/bin/ld: use the --help option for usage information
2021-08-18 09:54:12 +00:00
Bryan Drewery
259478fc3a Mk/bsd.port.mk: Revert the UNAME_r error text change for now.
Keep the new flag though.

This error can occur in some other cases such as building on a
mismatched host kernel+userland.  Some further study is needed
and it may be possible to automatically set UNAME_r.
2021-08-13 21:52:22 -07:00
Bryan Drewery
8ec588d8f0 Mk/bsd.port.mk: Fix another typo
Reported by:	grembo
Fixes:	        154492dd1f ("Clarify UNAME_r failure.")
2021-08-13 17:26:16 -07:00
Bryan Drewery
bed9a4de0e Mk/bsd.port.mk: Fix typo
Fixes:	154492dd1f ("Clarify UNAME_r failure.")
2021-08-13 13:36:12 -07:00
Bryan Drewery
154492dd1f Mk/bsd.port.mk: Clarify UNAME_r failure.
An example of this happening is with recent Poudriere changes:
- Poudriere <= 3.3 used to set UNAME_r in /etc/login.conf's environment
  during *jail creation*.
- Poudriere >= 3.4 only sets it in the environment during *jail
  runtime*.

Creating a jail with Poudriere 3.4 and then using Poudriere 3.3 on it
would fail to have UNAME_r properly set.  It would read OSVERSION from
/usr/include/sys/param.h to find the installed files release.  The ports
framework, and builds, need `uname` to be correct for the *jail/chroot*
and not be of the running kernel.

Add a footshoot enabler while here which should not be used for any
reason as it can create packages targetting the release of the running
kernel rather than the chroot/jail's expected version.
2021-08-13 13:22:57 -07:00
Xin LI
974e13b501 net/openldap24-server: Make SASL permanent for OpenLDAP port.
PR:		ports/257374
Reviewed by:	obrien
Approved by:	portmgr (exp-run by antoine)
Differential Revision: https://reviews.freebsd.org/D31301
2021-08-01 01:32:35 -07:00
Adam Weinberger
5ff464b194 bsd.port.mk: Fix typo 2021-07-23 05:35:28 -06:00
Baptiste Daroussin
c580a81e15 Mk/bsd.port.mk: use the WARNING framework to reduce the spam 2021-07-22 14:33:36 +02:00
Alexey Dokuchaev
35c4572d6a Mk/bsd.port.mk: fix couple of minor annoyances
- Improve the text (fix typos) in another .warning message
- And an extra newline after "backward compatibility for users"
  .if/.endif block for better readability, kill EOL whitespace
- Replace UTF-8 non-breaking space (C2 A0) with normal ASCII one
2021-07-22 10:22:39 +00:00
Matthias Andree
4f62d3170c Mk/bsd.port.mk: fix typo in .warning
recommanded -> recommended.

Reported by: danfe
2021-07-22 11:36:00 +02:00
Matthias Andree
17db9a3291 Mk/bsd.port.mk: fix typo in .warning
vertion -> version.

Approved by: portmgr@ (implicit)
2021-07-22 10:43:34 +02:00
Baptiste Daroussin
e497a16a28 ports-mgmt/pkg*: Release 1.17.0
TL;DR: new uniq package file extension: '.pkg'

Full changelog for pkg:
- add a new "snap" prefix, to deal with pkg base snapshots
- pkg repo now accepts packages with different compression formats
- pkg now have a single extension: ".pkg" and a backward compatible
  symlink is created when the package is created to help transitioning
- Default compression level for zstd is now set to 19
- the default compression level is now a configuration option
- plenty of portability fixes
- fix plenty of typos
- expose the name of the package to lua and shell scripts
- plist:
  remove internal support for @*exec (this is now in the ports tree)
  remove support for @ignore
  remove support for @dirrm/@dirrmtry
  remove support for @pkgdep
  remove stub support for @stopdaemon
  remove stub support for @display
  remove stub support for @mtree
  remove stub support for @conflict
- VUXML: fetch .xz compressed version of the file by default
- triggers are deferred to later command (firstboot is planned) if run
  with pkg -r
- pkg triggers commands has been added and can execute the deferred
  triggers for example at firstboot

Changes in the framework:
- Add a backward compatibility layer, so people are not forced to move
  to pkg 1.17 yet (new quarter we will enforce the switch for triggers
  anyway, but it gives time to people to switch)
- Introduce a new PKG_COMPRESSION_FORMAT for users to specify the
  compression format they are willing to use when creating packages:
  txz, tar, tgz, tbz, tzst are the valid ones (note that tzst is only
  usable on FreeBSD 13 and 14)
- Add a backward compatibility for people who specified the compression
  format already via PKG_SUFX and issue a warning to tell them about the
  deprecation of PKG_SUFX
2021-07-22 10:05:59 +02:00
Baptiste Daroussin
ec2764d5ec Mk/bsd.port.mk: prepare the land for pkg 1.17
in next version of pkg, we now use a uniq extension: '.pkg' whatever the
compression is, the problem is some bootstrap pkg(7) does not handle
that yet, notably on freebsd 11.4 and 12.2.

We already have a compatibility layer by creating a symlink on the old
extension, which works but the signature itself will not exist with the
old extension. Add a workaround in the ports tree to symlink the new
signature to the old expected signature.

Given at the moment we are doing that things are not yet signed by
default we do create a dead symlink, but at the moment the repo are
published the right signature will be there.
2021-07-21 14:23:04 +02:00
Guangyuan Yang
de745e3b9f Mk/*: Update the link about adopting ports
Approved by:	rene (portmgr), lwhsu (mentor)
Differential Revision:	https://reviews.freebsd.org/D30744
2021-06-20 19:29:13 -04:00
Mathieu Arnold
e70bedf4f7
Mk/bsd.port.mk: Don't pass up an empty flavor.
The classic way to handle flavors is to set:

  FLAVORS= foo bar
  FLAVOR?= ${FLAVORS:[0]}

And in that case, FLAVOR is only set if the variable is not defined. If
you pass an empty flavor using `FLAVOR=` then it remains empty after
that line.  It can leads to some ports with complicated logic to assume
the wrong flavor is set.

PR:		256301
Reported by:	avg
Differential Revision:	https://reviews.freebsd.org/D30579
2021-06-01 09:16:35 +02:00
Andriy Gapon
bad84b3403
Mk/bsd.port.mk: Ignore @ in path in _FLAVOR_RECURSIVE_SH.
While no port will ever have an @ in their path name, it might be
possible that PORTSDIR has an @ somewhere in its path.

PR:		256301
Differential Revision:	https://reviews.freebsd.org/D30579
2021-06-01 09:15:49 +02:00
Baptiste Daroussin
61daf777c5 Revert "overlay: allow to load -overlay.mk files for each USES"
This changes was not supposed to be pushed yet

This reverts commit 073b0aa8a4.
2021-05-10 19:31:36 +02:00
Baptiste Daroussin
073b0aa8a4 overlay: allow to load -overlay.mk files for each USES
This will be done before the loading of the actual USES, it allows one
to keep using the USES from the ports tree, and still provide additional
features in the overlay
2021-05-10 18:47:04 +02:00
Baptiste Daroussin
e72d016d0f Mk/*: don't change yet compression format with pkg-devel
While it is planned to switch the compression format to zstandard in a
near futur it requires first pkg 1.17 to settle, don't change yet head
compression format.
2021-05-07 09:51:34 +02:00
Mathieu Arnold
c4ee3f24d2
Mk: Don't generate an empty apply-slist target. 2021-04-14 17:41:07 +02:00
Mathieu Arnold
02ccefbf58
Mk: Run apply-slist earlier.
This allows SUB_FILES generated files to be available earlier than
staging, and use them during the build.
2021-04-14 17:40:56 +02:00
Matthias Fechner
12ae9706d9 Fix downloading of packages hosted on gitlab.
Gitlab changed the address beginning of April you can download packages
from:
curl 7efd19e371/archive.tar.gz/gitlab-org-gitlab-foss-7efd19e3716ab6f9146052da76d1bd59ec815f2d_GL0.tar.gz
to:
curl 7efd19e371.tar.gz?dummy=/gitlab-org-gitlab-foss-7efd19e3716ab6f9146052da76d1bd59ec815f2d_GL0.tar.gz

The new extracted archive will have a different folder name.
Before it was:
gitlab-foss-7efd19e3716ab6f9146052da76d1bd59ec815f2d-7efd19e3716ab6f9146052da76d1bd59ec815f2d
now it is:
gitlab-foss-7efd19e3716ab6f9146052da76d1bd59ec815f2d

So all ports using gitlab must regen their distinfo.

PR:		254866
MFH:		2021Q2
Differential Revision:	https://reviews.freebsd.org/D29628
2021-04-09 20:43:03 +02:00
Mathieu Arnold
0b1ee55426
Cleanup executable bits, prompted by 9e1d7c39a1. 2021-04-08 11:36:35 +02:00
Mathieu Arnold
5d33e04596
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
2021-04-06 16:27:10 +02:00
Baptiste Daroussin
6b1ccfbb27 Remove upgrade script
It never actually really have been a thing, and can be done
directly in install/deinstall scripts

Reviewed by:	mat (portmgr)
Differential Revision:	https://reviews.freebsd.org/D29427
2021-03-29 07:42:20 +00:00
Mathieu Arnold
2ba6eb3af7 Fix an obscure sed message while going through check-plist.
The obscure message being:
sed: 4: /tmp/sed_plist_sub.1i0ZNBB8: RE error: trailing backslash (\)

Thanks to:	kevans
2021-03-22 15:13:55 +00:00
Mathieu Arnold
a19ab6e0a8 Don't use an escape sequence when you can use a character class.
Using an escape sequence is more likely to get munged at some point
while going through from make to sh to sed.
2021-03-22 15:13:49 +00:00
Mathieu Arnold
b088b5dd0e Add the same WRKSRC warning for USE_GITLAB than for USE_GITHUB. 2021-03-19 14:32:13 +00:00
Mathieu Arnold
4f9b0453a8 Fix usage of USE_GITHUB, multiple downloads, and WRKSRC_SUBDIR.
PR:		246196
Submitted by:	Sergei Vyshenski
2021-03-19 14:32:10 +00:00
Baptiste Daroussin
098b598e03 update to 1.16.99.3:
The main big change is the switch of the package extension to .pkg
This is done so we can change compression format without having to
modify the tools each time to adapt to the new extension

While here adapt the ports tree to the new .pkg extension and prepare
the pkg-devel ports to swicth the package compression format to zstd
in FreeBSD 14 in a month to give time to upgrade to a version which
have the bootstrap knowing about .pkg.

Changes from 1.16.99.2 to 1.16.99.3
- lua update to 5.4.2
- pkg repo accept now all supported formats mixed without config
- pkg now default on creating .pkg files with backward compatible symlinks
- backward compatible symlinks are now an option
- make the default comprpession format a config option
- set the default compression level for zstd to 19
- make the default compression level a config option
- Update libucl to latest version
2021-03-17 14:16:11 +00:00
Baptiste Daroussin
92861de85a Pass all env variable supported by dialog4ports to
the customer script that will run dialog4ports

PR:		253465
Submitted by:	Olivier Certner <olivier.freebsd@free.fr>
2021-02-26 19:06:01 +00:00
Baptiste Daroussin
f667e41092 Remove expired gstreamer 0.x
gstreamer 1.x has been introduced long ago and gstreamer 0.x was kept
to let time for applications to catchup on gstreamer 1.x
2021-02-04 06:04:50 +00:00
Rene Ladan
2d9527944f Mk/bsd.port.mk: Remove support for FreeBSD 12.1 which reached end-of-life today.
MFH:		2021Q1
2021-02-01 12:37:14 +00:00
Mateusz Piotrowski
873509308e Revert parts of r555738 which were probably not meant to be committed
PR:		248402
Reported by:	Franco Fichtner <franco@opnsense.org>
Approved by:	portmgr blanket
2020-11-20 11:05:58 +00:00
Adam Weinberger
db15051ca5 Add education virtual category
PR:		248402
Submitted by:	PauAmma
2020-11-20 07:16:06 +00:00
Mateusz Piotrowski
6632bb2838 Fix a typo
Reported by:	cy
Approved by:	portmgr blanket
2020-11-03 14:36:15 +00:00
Mateusz Piotrowski
eb05e38ccc Discourage users from using DO_NADA
It should not be used to make targets do nothing. In such cases,
it's most likely the ports infrastructure which requires fixing.

Suggested by:	bapt
Approved by:	portmgr (bapt)
Differential Revision:	https://reviews.freebsd.org/D27072
2020-11-03 10:05:37 +00:00
Rene Ladan
a4ca124230 Bump minimally supported FreeBSD version to 11.4
Phabricator:	D26646
2020-10-17 14:28:19 +00:00
Koichiro Iwao
11d501f03a Mk/bsd.port.mk: Remove no-op USE_LIBRUBY variable
PR:		238170
Submitted by:	ak
Approved by:	portmgr (adamw)
2020-10-11 11:53:57 +00:00
Emmanuel Vadot
460a3d9b25 Bump MINIMAL_PKG_VERSION to 1.15.9 after the @sample symlink fix.
Approved by:	portmgr (bapt@ implicit pkg breakage)
2020-10-04 14:15:44 +00:00
Baptiste Daroussin
8f3e23ea6d Bump the minimal revision required for pkg, due to the fixes in pkg 1.15.8 2020-10-02 14:06:31 +00:00
Emmanuel Vadot
0d39a0a490 Bump the minimal pkg version to 1.15.6
1.15 introduced more lua scripts and keywords handling and we want
to push that, so bump the minimal pkg version needed to 1.15.6 which
is the latest release available.

Approved by:	portmgr (bapt@)
2020-10-01 18:31:10 +00:00