Historically, PKGDESTDIR was only set during pkg_install, and
XBPS_PKGDESTDIR was set to indicate that we're in subpkg's
pkg_install.
However, from 0b95cb8f5d, (Merge xbps-src code to make it usable in
a standalone mode., 2014-03-22), PKGDESTDIR is always set,
regardless of states.
Let's drop all usages of XBPS_PKGDESTDIR.
While we're at it, error out of vmove is used outside of subpkg.
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}'
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 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"
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]