this will rewrite total paths to be relative to CCACHE_BASEDIR before caching,
helps prevent cache misses due to changed wrksrc with build systems like cmake
that use total paths in their Makefiles
git-worktree(1), and Git shared repository can use a plain text file
named `.git` at the root of working tree, containing `gitdir: <path>` to
point to the real directory that has repository.
See: gitrepository-layout(5).
But, that directory is usually inaccessible inside chroot.
In order to support git-worktree(1) and Git shared repository, compute
SOURCE_DATE_EPOCH from outside of chroot, and the chroot will carry it
over to inside chroot.
I've only tested again xbps-uunshare(1).
git-ls-files(1) is plumbing command, its output will never change
regardless of configuration, version.
git-status(1) output will be changed depends on configuration.
At least, 986d4dbc7d (common/environment/setup/git.sh: ensure untracked
files are checked., 2017-11-24) was added to address a different output
on `status.showUntrackedFiles`.
By doing this, also reduce a pipe, and a fork-exec.
Technically, git-log(1) is also a porcelain, but I _think_ `%ct` is
stable enough to stay there. If the day has come, that `git-log(1)` can
be replaced with:
git cat-file commit HEAD |
sed -ne '/^committer/{s/.* \([0-9]*\) [-+][0-9][0-9][0-9][0-9]$/\1/p;q}'
This checks if gcc-go-tools have been specified in host deps
and if so, use gccgo to build (gcc-go-tools conflicts with go).
Also, since gccgo is not a multi-compiler, we need to override GCCGO
to get cross-builds. The gccgo for target is always installed, as
it's a part of our cross-toolchains.
[ci skip]
This is necessary so that crossbuilds to unsupported architectures
are not actually attempted. There is a default archs set which
covers all architectures supported by the official compiler,
and setting it in the template can be used to restrict it more.
Also, add missing GOARCHs. These are irrelevant to whether we
can currently build for that arch or not. Just keep it around
as a list of potential archs to support. These are taken from
gccgo, and in case support for anything is added in the official
compiler, they should match.
Accidentally, this change also fixs a potential bug
if `XBPS_DIGEST_CMD` is changed to something other than
its current value: `xbps-uhelper digest'.
Because the old code compares:
- non-stripped old digest; and
- stripped new digest
We don't specify any specific digest function in this function,
and the old variables' name doesn't reflect the fact that they're
a pair of old and new digest built by the same hash function.
* noarch=yes is replaced with archs=noarch
* only_for_archs= is renamed to archs=
* archs= allows the use of wildcards and negations; first matching rule applies:
* archs="*-musl" will build the pkg only for musl-libcs
* archs="~*-musl" will build the pkg only on non-musl-libc
* archs="x86_64-musl ~*-musl" will build for x86_64-musl and any non-musl
arch.
* archs= defaults to "*"
This adds the build profiles for ppc64 targets as well as
modifications in other parts of the infra.
These targets are supported:
- ppc64le (glibc little endian elfv2)
- ppc64le-musl (musl little endian)
- ppc64-musl (musl big endian)
ELFv1 targets are explicitly not supported at this point.
Big endian musl supports ppc 970 or newer, while little endian
targets are set to a generic powerpc64le which effectively means
POWER8 and newer. Tuning is always set for POWER9, which is the
most likely target hardware. We also make sure AltiVec is always
on, because it is supported on all hardware we target.
[ci skip]
This commits allows ./xbps-src show to show the changelog field and for
changelog to be included with the -c/--changelog option via xbps-create.
Closes: #14102 [via git-merge-pr]
CMake helper function used to set bool argument values
Usage example:
configure_args+=" $(vopt_onoff logging WITH_LOGGING)"
configure_args+=" -DWITH_LOGGING=OFF"
Yet another variable to permit skipping of runtime dependency checks
for a list of files, specifying their absolute path in the $DESTDIR,
allows us to handle known bad detections due to e.g. binaries or
shared libraries not meant to be run or loaded in the host.
This will be used to fix the android-studio template to skip
a number of files which would create a bogus dependency on libc.so.
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
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]
This still isn't perfect. When the common/xbps-src/shutils/chroot.sh
function chroot_init() is called, the value for $XBPS_FFLAGS, which is
defined in common/build-profiles/bootstrap.sh, is empty.
Put the immediate value into the generated /etc/xbps/xbps-src.conf
file until someone finds out where passing the value of $XBPS_FFLAGS
throughout the scripts is missing.
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"`.
- python_module build style now builds modules for python2/3 by default
- new python2_module and python3_module build styles for building
python2-only and python3-only packages respectively
- no more python_versions
- no need to define pycompile_version for Python modules anymore
(still needed for non-Python modules though)
- Python version and paths are now guessed automatically and a set of
useful variables can now be used in templates
- #!/usr/bin/python2 and #!/usr/bin/python3 are now the default shebangs
- /usr/bin/foo2 and /usr/bin/foo3 are now the default names for bin
scripts (for use with alternatives)
Thanks to @chneukirchen for finding the correct solution:
gcc sets -mno-shared by default when compiling non-PIC, and because
we are overriding the builtin specs, this internal rule set for gnu/mips
does not trigger:
gcc/config/mips/gnu-user.h:/* Default to -mno-shared for non-PIC. */
gcc/config/mips/gnu-user.h: " %{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
So that we now use a specific specs file just for mips that sets -mshared for PIC.
This fixes building packages with hardening enabled for MIPS.
I just booted a full PIE base-system successfully on my CI20 Creator.
For now we set -fPIE again in C{,XX}FLAGS to fix the build in attr/acl/coreutils, etc.
glibc is a wonderful library. Tidy and clean. To keep it that clean
it does such useful things as sorting the CFLAGS alphabeticly.
Unfortunately this breaks command line arguments that contain parameters
such as `-include /foo/bar`. This commit works around this flaw by
removing the space and using -include/foo/bar instead.
This reverts commit c46b43df61.
lynx was complaining about missing " in the CFLAGS. apparently this is an error in the lynx
build system, not in the CFLAGS.
Note that -fPIE defines __PIC__ and __PIE__, so passing this on to
pure cpp(1)/gcc -E executions is relevant.
Found the hard way due to ccache breaking on i686 with precompiled
headers which used the non-PIC definitions in cpuid.h since header
precompilation doesn't read cc1_options.