In order to make builds more reproducible SOURCE_DATE_EPOCH was set to
the time of the last commit that touched the template. Since trying to
reproduce a build from a different revision is futile (the most obvious
reason is that the source-revisions property includes the HEAD commit
hash) and looking up the commit in question can take several seconds,
stop wasting time an just use HEAD.
Closes: #12314 [via git-merge-pr]
Add another stage 'check' between 'build' and 'install'. It is be enabled using the
variable XBPS_CHECK_PKGS=yes and disabled if unset, set to "0" or "no" in your
local etc/conf.
A new xbps-src option `-q` for `quick` will disable XBPS_CHECK_PKGS by overriding it to 0.
If enabled, `common/xbps-src/shutils/xbps-src-docheck.sh` checks for an existing
`do_check()` function in the package's template and, if it exists, calls it.
A new template variable `checkdepends` may be present and list packages required
to run the `do_check()` function. Example: `checkdepends="bc unittest-cpp"`.
XBPS_PKG_COMPTYPE can be set via etc/conf to set your preferred compression
format; defaults to xz, like xbps-create(1).
The "none" setting is only available since 0.48 (unreleased).
Such packages should set the `restricted' var to allow building a binary package.
Note that such packages do not allow redistribution of sources and binaries,
so that it's up to the user if (s)he wants to pkg it locally.
Available implementations at common/chroot-style/*.sh. Each .sh
script there implements a chroot style to be able to chroot and bind
mount with multiple utilities. The current supported list:
- uunshare (uses xbps-uunshare(8))
- uchroot (uses xbps-uchroot(8))
- proot (uses proot, see http://proot.me)
The XBPS_CHROOT_CMD can be set in etc/conf to use a specific implementation,
and XBPS_CHROOT_CMD_ARGS to pass in additional arguments to the cmd.
Lots of pkgs seem to fail when _FORTIFY_SOURCE is defined in CPPFLAGS
due to a missing optimization level, and also some of them simply
ignore CPPFLAGS, therefore move it to CFLAGS to fix this once and for all.
Rather than setting them in the build profile, just set them in
etc/defaults.conf (overridable via etc/conf) to simplify the code.
- Also enable _FORTIFY_SOURCE=2 in CPPFLAGS.
- Also enable -z,relro in LDFLAGS.
As suggested by @chneukirchen.
common/build-profiles contains the compilation flags used in native
builds, and are defined per architecture:
- x86_64 (glibc)
- x86_64-musl (musl)
If XBPS_CFLAGS or XBPS_CXXFLAGS are set in `etc/conf`, the settings
from the build profile will be overrided.
Permanent global pkg build options can be defined via 'XBPS_PKG_OPTIONS' in etc/conf.
Permament per-pkg build options can be defined via 'XBPS_PKG_OPTIONS_<pkgname>' in etc/conf.
Close GH #452.
* update-bulk:
This rebuilds all pkgs in system repositories that are outdated.
with this xbps-bulk is now considered fully obsolete.
* update-sys:
This rebuilds all pkgs in system that are oudated and once built,
updates them via xbps-install(8).
This target defines a new configuration option "XBPS_SUCMD" that
is the command to execute to update the system. By default set to
"sudo sh -c".
CAVEATS
- need to check if binpkg is in local repo.
- need to add support to specify alternative rootdir.
- need to add support to specify system repos.
That means that the Makefile and xbps-src generated files are not required
anymore, and the xbps-src script can be used as is.
Bump xbps requirement to 0.35 and enable XBPS_INSTALL_ARGS by default.
The new xbps-src configuration file is `etc/conf` where you can
add your local overrides from defaults set via `etc/defaults.conf`.
To use this xbps-src, run these steps:
$ make
$ sudo make setup (to make chroot helper setgid)
$ ./xbps-src ...