summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
AgeCommit message (Collapse)AuthorFilesLines
2018-05-28mk/bsd.pkg.mk: include PKGVERSION in show-all targetrillig1-1/+4
2018-01-13Introduce TEST_DEPENDS.joerg1-1/+2
Place them in ALL_DEPENDS iff PKGSRC_RUN_TESTS is set, so that bulk builds will pick them up.
2018-01-02Remove traces of crypto restrictions.maya1-11/+1
ok for idea riastradh
2017-11-12Add initial support for building packages reproduciblykhorben1-1/+5
It currently tackles two problems: - gcc(1) hard-coding full paths in debugging information (with one caveat at the moment) - ar(1) hard-coding user IDs in archive headers This allows packages built from the same tree and options to produce identical results bit by bit. This option should be combined with ASLR and PKGSRC_MKPIE to avoid predictable address offsets for attackers attempting to exploit security vulnerabilities. This is still disabled by default, and only supports NetBSD so far. As discussed on tech-pkg@
2017-09-16mk: remove import targetwiz1-4/+1
While it would be useful, the current implementation has not been updated even to use 'cvs add' instead of 'cvs import' (policy change in 2012). Use the import-package.sh script currently residing in wip/ instead.
2017-06-01Toggle using pkgsrc/mk/smf.mk based on ${_USE_NEW_PKGINSTALL}.jlam1-1/+3
Missing change from initial commit to provide the toggle for using the new frameworks to replace pkgsrc/mk/pkginstall.
2017-06-01Provide switch to activate new frameworks to replace "pkginstall".jlam1-1/+9
If ${_USE_NEW_PKGINSTALL} is "yes", then use the new "pkgtasks", "init", and "pkgformat/pkg"-scripts frameworks instead of the existing "pkginstall" framework.
2017-05-31Document PRE_CMD.su-<target> and simplify its use in "su-target".jlam1-6/+8
This avoids needing to use a shell command to test whether ${PRE_CMD.su-<target>} is empty before executing it.
2017-05-31Move detection of shared library type into the platform file.jlam1-6/+1
Only four platforms, all BSDs, need to resolve "ELF/a.out" into either ELF or a.out. Calculate it directly in the platform file and return the value in ${_OPSYS_SHLIB_TYPE} and export that value in bsd.prefs.mk as ${SHLIB_TYPE}. Instead of requiring the file(1) tool, we can expect the base system of those BSDs to have /usr/bin/file, so make use of it directly.
2017-05-04Simplify PATH handling. Use full pkgsrc path for cwrappers, but skip thejoerg1-11/+3
cwrapper directory itself.
2016-08-26Explicitly unset CONFIG_SITE. Some Linux distributions like SuSE set itjoerg1-1/+2
in the default environment and provide a config.site overriding the default libdir settings. This breaks havoc with our PLISTs and expected library paths, so kill it.
2016-06-11Improved documentation of show-var and show-vars.rillig1-6/+13
2016-05-26Import mini-framework for paxctl(8) on NetBSD/{amd64,i386}khorben1-1/+5
This allows setting flags for PaX on select binaries. Two new variables are introduced for packages: NOT_PAX_ASLR_SAFE and NOT_PAX_MPROTECT_SAFE. They both expect a list of binaries are known to not support PaX ASLR and/or PaX MPROTECT, respectively. "Please commit" wiz@
2016-03-23Move handling for PKG_SUPPORTED_OPTIONS and PKG_SUGGESTED_OPTIONS asjperkin1-2/+1
OPSYSVARS to bsd.options.mk as they affect tests against PKG_OPTIONS before bsd.pkg.mk is parsed. Approved for commit during the freeze by agc@.
2016-02-26Add MAKE_FLAGS to the default list of OPSYSVARS, it's used enough times.jperkin1-2/+2
2016-02-25Expand the default list of OPSYSVARS to include those commonly usedjperkin1-1/+5
already, plus those that are most used in OPSYS-specific sections.
2015-12-13Make sure FAKEHOMEDIR is created when WRKDIR is.richard1-3/+3
Add fgrep to default USE_TOOLS for good measure.
2015-11-25Remove mk/find-prefix.mk and its usage from the mk infrastructure.jperkin1-7/+1
The find-prefix infrastructure was required in a pkgviews world where packages installed from pkgsrc could have different installation prefixes, and this was a way for a dependency prefix to be determined. Now that pkgviews has been removed there is no longer any need for the overhead of this infrastructure. Instead we use BUILDLINK_PREFIX.pkg for dependencies pulled in via buildlink, or LOCALBASE/PREFIX where the dependency is coming from pkgsrc. Provides a reasonable performance win due to the reduction of `pkg_info -qp` calls, some of which were redundant anyway as they were duplicating the same information provided by BUILDLINK_PREFIX.pkg.
2015-04-29Introduce _USE_CWRAPPERS logic to ensure consistency, USE_CWRAPPERS couldjperkin1-2/+2
differ between a package and user setting, resulting in incorrect WRAPPER_* values being set from wrapper-defs.mk.
2015-04-27Split cwrappers from legacy wrappers. We no longer generate the legacyjperkin1-3/+4
wrappers when USE_CWRAPPERS is enabled, saving a reasonable amount of I/O during builds, mostly due to avoiding the transform/untransform sed file generations. WRAPPER_DIR and WRAPPER_BINDIR are used by various packages to override or point to specific wrappers, and these now point to the cwrappers directory when enabled, removing the need for CWRAPPERS_BIN_DIR duplication and fixing packages which previously were using legacy wrappers by accident. A number of targets are now duplicated between bsd.wrapper.mk and cwrappers.mk, the intention being that the legacy wrappers will be deprecated once cwrappers is verified on all supported platforms. If that turns out to take longer than expected, we will probably want to introduce a wrapper.mk to abstract them away before loading the appropriate back-end.
2015-03-07Address issues raised by agc@ to make the github master site handlingtnn1-7/+3
more pkgsrcesque. 1) turn _USE_GITHUB into an internal infrastructure variable 2) put back MASTER_SITES in packages' Makefiles. 3) encode the account in the master site URL, remove GH_ACCOUNT 4) rename GH_PROJECT to GITHUB_PROJECT 5) rename GH_TAGNAME to GITHUB_TAG and allow it to accept commit hash as well as tag. GH_COMMIT is gone. 6) turn on this functionality when MASTER_SITES matches a predefined github pattern instead of via explicit USE_GITHUB setting.
2015-03-07Adopt USE_GITHUB from FreeBSD ports to make github MASTER_SITEtnn1-1/+9
handling less painful. See: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#makefile-master_sites-github To use, set in Makefile: DISTNAME= exampleproject-1.2 USE_GITHUB= YES The following variables alter USE_GITHUB behavior: GH_ACCOUNT defaults to PKGBASE GH_PROJECT defaults to PKGBASE GH_TAGNAME defaults to PKGVERSION_NOREV (sometimes you want to override with v${PKGVERSION_NOREV}) GH_COMMIT explicit commit hash if no tag is available GH_RELEASE default empty, may be set to ${DISTNAME} for example GH_TYPE overrides the autodetected MASTER_SITE URL scheme
2015-01-01Use PKG_SKIP_REASON instead of PKG_FAIL_REASON for some cases wheredholland1-5/+5
the problem is either situational (e.g. the various RESTRICTED-like cases) or unfixable in pkgsrc (no pthreads, ipv6, etc. on platform). Conversely, if the wrong version of mysql is installed, that's a PKG_FAIL_REASON.
2015-01-01Add support for BROKEN_ON_PLATFORM and BROKEN_EXCEPT_ON_PLATFORM, as perdholland1-4/+36
discussion on tech-pkg. BROKEN_ON_PLATFORM and NOT_FOR_PLATFORM are the same, except that (now) BROKEN_ON_PLATFORM sets PKG_FAIL_REASON and NOT_FOR_PLATFORM sets PKG_SKIP_REASON. BROKEN_EXCEPT_FOR_PLATFORM and ONLY_FOR_PLATFORM correspond in the same way. The idea is that going forward we will distinguish unbuildable packages that theoretically ought to be fixed (these are BROKEN) from packages where it doesn't make sense to build (these are NOT_FOR)... examples of the former include most non-64-bit-clean packges; examples of the latter include OS-specific language bindings. A general review of the uses of NOT_FOR_PLATFORM and ONLY_FOR_PLATFORM (converting many of them to BROKEN...) is coming up. Similarly, a general review of the uses of PKG_FAIL_REASON and PKG_SKIP_REASON is coming up. For this to become useful, pbulk needs to be taught to report failing and skipped packages differently - the idea is that failing packages should be reported up front and skipped packages don't need to be. This has not been done yet, but one set of things at a time...
2014-12-30Remove pkg_views support, second part: infrastructure.wiz1-32/+1
2014-11-25mk/buildlink3/* (via mk/wrapper/bsd.wrapper.mk") must be included beforejoerg1-3/+3
mk/cwrappers.mk, so fix include order.
2014-11-24Add cwrappers glue as developed during Google's Summer of Code 2007.joerg1-1/+5
2014-10-12Simplify PKG_DEVELOPER checks.joerg1-2/+2
2014-10-09Remove SVR4_PKGNAME, per discussion on tech-pkg.wiz1-2/+1
2014-08-28Make package cross-compiling work through su-target asriz1-1/+2
well as it does for unprivileged builds. From riastradh.
2014-08-14Split SMF handling across bsd.pkg.mk and bsd.prefs.mk. Should fix issuesjperkin1-1/+7
with packages which include bsd.prefs.mk before setting SMF variables.
2014-06-02Remove old bulk build code. Use pbulk.wiz1-14/+1
2014-05-06Move INIT_SYSTEM to bsd.prefs.mk, allowing it to be tested injperkin1-9/+1
package Makefiles when packages perform custom rc.d handling.
2014-04-15Remove DEBUG_FLAGS variable that occurs exactly once in pkgsrc -- here.wiz1-2/+2
Set INSTALL_UNSTRIPPED if you want the behaviour it affected.
2014-03-11Introduce infrastructure support for SMF.jperkin1-1/+4
SMF is the Service Management Facility, the default init system in Solaris and derivatives since version 10. This adds "smf" to the list of supported INIT_SYSTEM types, and makes it the default init system on platforms where it is available. Packages can introduce SMF support by providing a manifest file, by default located in ${FILESDIR}/smf/manifest.xml but manifests under ${WRKSRC} can be used too if the package source includes one. SMF method scripts are supported too if required, using SMF_METHODS in a similar manner to RCD_SCRIPTS. Many parts of the SMF infrastructure are configurable, see mk/smf.mk for the full details.
2014-03-11Add initial support for alternative init systems.jperkin1-1/+6
This commit introduces an INIT_SYSTEM variable which will determine the type of init system to be used on the target system, supporting "rc.d" at this time. The pkginstall infrastructure is changed to only install RCD_SCRIPTS if INIT_SYSTEM is set to "rc.d", and PLIST entries for rc.d scripts are now handled automatically based on RCD_SCRIPTS.
2014-03-03Use PKGNAME_NOREV as a part of default WRKSRC if DISTNAME is not defined.obache1-2/+2
2014-03-02loose mandantory DISTNAME.obache1-3/+7
2013-07-15Reset MAKELEVEL=0 to fix bad gmake/bsdmake interactions.christos1-1/+2
Our make(1) now sets $MAKELEVEL. While this should cause no harm, gmake detects a non-zero $MAKELEVEL and automatically sets "w" in $MAKEFLAGS for subordinate makes, in order to print the entry and exit directories. Our make, does not understand -w, so it prints an error message and exits. In order to catch this everywhere (since cmake for example can invoke either our make or gmake depending on how it feels), we reset the variable for any top level command. This effectively reverts to the behavior of our make not setting $MAKELEVEL.
2013-06-05Revert change to "PKG_SETENV":tron1-2/+6
1.) It breaks the build of "www/firefox" which gets upset if "SHELL" is not defined in the environment. There are probably more packages which similar problems. 2.) It breaks established use case like this one: export ALLOW_VULNERABLE_PACKAGES=yes cd pkgsrc/multimedia/ffmpeg2theora bmake install In this case the value of "ALLOW_VULNERABLE_PACKAGES" will not be passed to the build of "pkgsrc/multimedia/ffmpeg". And the build of this package will fail due to known vulnerabilities.
2013-06-03Make PKGSRC_SETENV sanitize the environment.riastradh1-3/+2
2013-05-12drop `file' command from default USE_TOOLS list.obache1-2/+7
It is used in limited case, and does not exist by default on some platforms. proposed at over 30 months ago, and no negative feedback (only one request).
2013-05-09Split BUILD_DEPENDS into TOOL_DEPENDS and BUILD_DEPENDS in mk/.riastradh1-1/+2
Build depends are target packages that are needed at build-time for, e.g., static libraries to link against, header files to include, &c. Tool depends are native packages that are needed at build-time for, e.g., compilers/linkers/&c. to run. ok agc
2013-04-25also reset LC_ALL as C.obache1-1/+2
2013-02-22Allow to overwrite commnand of privilege check as _IS_ROOT_CMD.obache1-2/+3
2013-02-21if `id -u' failed, assume that numeric ID is specified (especially for Cygwin).obache1-2/+2
2013-02-15check requirement of uac manifest, it is required for Windows Vistaobache1-3/+5
(aka NT-6.0) and later.
2013-02-10Experimental support of manifest files for Windows UAC.obache1-1/+5
For Windows Vista or later, executable files including special keywords (install, update, patch, and so on) in its name are expected as requireing privileged permissions by default (UAC). If not, it must be specified with manifest file, or it will be failed to execute as "Permission denied".
2012-12-06Introduce PKGGNUDIR as a way to control gnu prefix.jperkin1-1/+2
By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install native versions of GNU tools, which are them symbolically linked back to the 'g' versions of the files in LOCALBASE, and users can then add LOCALBASE/gnu/bin to PATH to pick up those tools. On systems where the GNU environment is desired, PKGGNUDIR now allows users to install the non-'g' files directly into LOCALBASE, making them the default without having to alter PATH, whilst retaining the 'g' files in order to ensure dependencies and tool paths remain the same.
2012-07-18Pass down ${_PATH_ORIG} to privileged stage sub make instead of modified ${PATH}obache1-4/+2
for pkgsrc internally, It may cause some problems (ex. unwanted pick up commands of tools/wrapper). No objection in teck-pkg@ for a week.