Commit graph

1160 commits

Author SHA1 Message Date
Michael Aldridge
f5e766c248 xbps-src: Add remove-obsoletes command 2021-04-14 22:45:13 -07:00
Paper
425aaa15cb xbps-src: respect $XBPS_CHECK_PKGS 2021-03-21 17:56:22 -03:00
Duncaen
1f6ab168de xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
  dependencies, knowing the subpackage they are coming from does
  not matter to a build scheduler as long as xbps-src requires
  those to exist in the same way to main depends= have to exist.
* Resolve virtual? packages through existing means in xbps-src to
  avoid duplicating and possibly diverting from xbps-src's
  behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
  this matches the xbps-src behaviour and there is no need to
  have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
  and nocross=, there shouldn't be the need to discover archs=
  restrictions when attempting to build the package.
2021-03-12 18:33:11 -05:00
Piotr Wójcik
4ac333c3b1 xbps-src: allow to run without git
This makes possible to binary-bootstrap and build packages
with only base-system using tarball of void-packages.
2021-02-23 18:34:37 +01:00
Piotr Wójcik
863bfa67d1 xbps-src: fix XBPS_USE_BUILD_MTIME option 2021-02-22 21:24:01 +01:00
Érico Rolim
42d7596981 xbps-src: add -K option to getopt string.
Was forgotten when the actual option was added.
2021-02-11 02:40:09 -03:00
Toyam Cox
01e896422a xbps-src: dbulk-dump: remember to print bootstrap 2021-02-03 00:54:16 -05:00
Toyam Cox
7f861962bc xbps-src: Improve the showing of variables 2021-01-27 15:47:22 -05:00
Duncaen
3eed75216c xbps-src: remove proot chroot-style
proot is broken and result in random hard to debug issues,
this is the best way to not have new users use it.
2020-12-29 23:02:16 -08:00
Érico Rolim
ec223373c6 xbps-src: source cross profiles in show-var when using -a switch.
This allows the user to query for variables such as XBPS_CROSS_TRIPLET,
which are only available in a cross-build context.
2020-12-23 16:14:53 -03:00
Érico Rolim
83cc290601 xbps-src: add -K option for running the full testsuite.
Some packages have rather long test suites, with an option for a shorter
one. With this option, one can choose between shorter tests (-Q) or the
complete longer ones (-K).

This also allows CI to run only the shorter testsuites.

Make the appropriate changes to etc/default.conf and Manual.md as well.
2020-12-14 00:18:04 -03:00
Piraty
e75193bd38 xbps-src: don't remove autodeps on clean <pkg>
previously, xbps-src clean foo didn't clean autodeps but
only foo's builddir and destdir.  This is useful for clean
rebuilds without re-installing all dependencies.

Fixes: 795429f1a4
2020-11-28 14:45:49 +01:00
gt7-void
795429f1a4 xbps-src: fix do_clean
It has to be run before remove_pkg_statedir.

Also, run remove_pkg_autodeps as well.
2020-11-25 23:14:29 +01:00
Érico Rolim
d6c8f1b99e Disable Travis CI.
- Remove .travis.yml, common/travis/docker.sh.
- Change references to travis to be more generic.
- Manual.md: Orient against using CI logs in broken= or nocross=.
2020-11-21 00:11:30 +01:00
Piotr Wójcik
15e7a92951 xbps-src: make build options from config ang flags work together
Flag options was appended to XBPS_PKG_OPTIONS, but was later
overwritten by sourcing config. Instead, pass only flags
options in separate variable and join at very end.
2020-09-07 22:18:29 +02:00
Piotr Wójcik
6efc7dd98d xbps-src: quote wrksrc to allow whitespace 2020-09-03 21:03:32 +02:00
Érico Rolim
5f3dd33688 xbps-src: expand note about -t flag. 2020-09-03 19:26:32 +02:00
Đoàn Trần Công Danh
339e7c6b4d xbps-src: use internal config in foreign environment
When xbps-install is called without "-C", xbps-install will pick
configuration from the location configured at build time.
Should the default location not have a valid repository configuration,
we couldn't run binary-bootstrap.

On bootstrapping from scratch, without this change, xbps looks into
system configuration, which isn't what we want.

Run xbps-install with our internal configuration instead.
2020-08-22 13:33:45 +07:00
Piotr Wójcik
dabbbffabf xbps-src: -p argument for showing more variables 2020-07-13 19:52:53 +02:00
Đoàn Trần Công Danh
20f9bedefb xbps-src: use $XBPS_GIT_CMD for git 2020-05-23 06:59:24 +00:00
Piotr Wójcik
b2d5724420 xbps-src: document all options 2020-05-20 19:26:11 +02:00
John
582046b927 xbps-src: allow loading xbp-src.conf from XDG compliant dirs 2020-05-08 15:16:50 -07:00
Toyam Cox
4e815ac29e xbps-src: restore show-pkg-var, new under new name
This reverts commit a23934ed94.
2020-05-07 19:11:11 -04:00
Toyam Cox
a23934ed94 xbps-src: rework show-pkg-var to reduce effort 2020-05-07 11:38:17 -04:00
q66
84231f88f8 xbps-src: potentially allow ppcle masterdirs on ppc64le hosts 2020-04-30 00:40:45 +02:00
Juan RP
958c4a0e11
xbps-src: reduce host dependencies in bootstrap.
bison, flex, libtool, gettext, texinfo are not necessary
unless a bootstrap pkg uses gnu-configure and we run autoreconf.

I performed a full bootstrap build on my system that does not
contain any of those pkgs and it succeeded.

Please do not rely on autoconf/automake for any "bootstrap" pkg.
2020-04-06 13:15:37 +02:00
Piraty
d4a585920c xbps-src: document -q 2020-03-27 08:51:04 +00:00
Piraty
c84e307c68 xbps-src: correctly cleanup masterdir/tmp (really)
previous commit led to
```
rm: refusing to remove '.' or '..' directory: skipping 'void-packages/masterdir/tmp/.'
rm: refusing to remove '.' or '..' directory: skipping 'void-packages/masterdir/tmp/..'
```
2020-02-26 19:04:36 +01:00
Piraty
6f328a3532 xbps-src: correctly cleanup masterdir/tmp in the 'clean' target
465e481b70 forgot `rm -r` when cleaning /tmp.  As a result,
`xbps-src clean` returned 1 when directories are present in /tmp
because the last `rm` returned with an (suppressed) error.

Also use the global variables for builddir and destdir, to be more
consistent.
2020-02-26 16:44:14 +01:00
q66
e689e701c4 xbps-src: add support for specifying custom configurations
This is useful for example with multiple hostdirs/masterdirs when
you want to have configuration files for each, specifying different
flags without passing it on command line every time.

[ci skip]
2020-02-12 14:40:01 +01:00
q66
bf038d9c70 xbps-src: have cmdline arguments take precedence over config files
This way we can e.g. have XBPS_MAKEJOBS set in config file while
overriding it with -j.

This also notably changes some other semantics. Particularly,
links in hostdir/masterdir are now always resolved regardless of
how they are provided (via arg or via config), and the -o option
for xbps-src specifying build options merges with whatever was
previously specified in config file, instead of overriding. This
makes more sense overall as options specified on command line
actually apply to every package built during that run.

[ci skip]
2020-02-12 14:12:01 +01:00
Juan RP
b1ecdb8bd0 xbps-src: forbid use with root.
There's no reason to use xbps-src as root, and looks like
there's a lot of reports of this abuse.

Unless XBPS_ALLOW_CHROOT_BREAKOUT is set (travis),
using xbps-src as root now returns an error.
2020-02-06 09:06:59 +01:00
q66
f0e852c511 xbps-src: implement per-architecture repocache
That means instead of having a single hostdir/repocache, there
is now hostdir/repocache-$XBPS_TARGET_MACHINE.

This solves multiple problems:

1) When cross-compiling for different architectures and the repos
   for host and target differ, you will not get signature/checksum
   conflicts for noarch packages.
2) The clean-repocache command will not delete noarch packages that
   don't belong to that architecture.
3) Clean mixing of glibc and musl masterdirs with the same hostdir
   is now possible; even when building natively, the musl masterdir
   will use its repocache-foo-musl, while the glibc masterdir will
   use repocache-foo.

[ci skip]
2020-01-28 18:25:39 +01:00
q66
4098c62ebc xbps-src: prevent builddir/destdir from always being removed
The problem here is that newly introduced behavior in commit
b2b0409be4 resulted in builddir and
destdir *always* being removed when starting a build, as a part of
masterdir auto-update. We don't want this as we may want to resume
a previous build (e.g. by running stages individually or by resuming
a failed build from where it stopped).

Therefore, explicitly override the removal to restore previous behavior.
2020-01-28 01:09:04 +01:00
Juan RP
50c641ddcf xbps-src: updated list of required host utils. 2020-01-05 10:44:56 +01:00
Juan RP
75eca1b03e xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.

- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
  xbps-src now simply populates `rootdir/etc/xbps.d` with correct
  settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
  entering to the chroot (if CHROOT_READY is set), xbps-src will
  clean up the masterdir and then perform a system update to always
  use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
  - base-chroot-musl is gone, now unified for glibc/musl.
  - deps removed: gettext, mpfr, readline, texinfo, which, xz.
  - deps changed: tar -> bsdtar.

Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.

I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-05 10:44:56 +01:00
Stefano Ragni
da3b4d552a xbps-src: fix spelling 2019-11-08 19:18:30 +01:00
Juan RP
b94cc0ba26
xbps-src/zap: missing \n 2019-10-21 18:56:24 +02:00
Piraty
80e4a39926 xbps-src: (zap) correctly empty the masterdir
Instead of relying on a potentially outdated list of files and dirs to
remove, just remove+recreate the whole masterdir.

This previously led to leftover .xbps* files, which broke subsequent
operations

Fixes #14476
2019-10-21 18:55:19 +02:00
q66
ad34a8553c xbps-src: generalize 32-bit masterdirs on 64-bit hosts
Previously the check was hardcoded for i686 on x86_64. This can
however also work for ppc64 (BE) running a ppc masterdir as well
as aarch64 running armv* masterdirs.
2019-08-11 14:05:13 +02:00
Doan Tran Cong Danh
06cbdef6eb xbps-src: redirect various error msg to stderr
We couldn't use msg_red or msg_error,
since they won't be available until line #680
2019-07-24 15:13:54 +02:00
Juan RP
818d2d59cd
xbps-src: relax check for writable hostdir.
buildbot does not like it.
2019-07-10 20:30:18 +02:00
Juan RP
e4984d01ea xbps-src: multiple performance improvements
- use xbps-checkvers(1) to resolve dependencies.
- all dependencies are installed at once for the host and target.
- the show-build-deps target is now much faster.
- the update-bulk/show-repo-updates targets are now much faster.
- the update-sys/show-sys-updates targets are now much faster.
- the bootstrap target now works on musl hosts.
- simplified some loops.
- use cut(1) rather than awk(1) where applicable.
- multiple random changes to improve performance.

Based on work started by @Duncaen on #12433

Close #12433
Close #11282
2019-07-10 20:28:46 +02:00
Jürgen Buchmüller
17ba00b095 Revert "xbps-src: multiple performance improvements."
This reverts commit 2a4e178e35.
2019-07-05 12:08:45 +02:00
Jürgen Buchmüller
7c4b177043 Revert "xbps-src: fix reconfiguration of bootstrap pkgs."
This reverts commit ba4c05aa00.
2019-07-05 12:08:42 +02:00
Jürgen Buchmüller
a5968491c7 Revert "xbps-src: silence show-avail"
This reverts commit 5c4d340c5f.
2019-07-05 12:08:40 +02:00
Juan RP
5c4d340c5f xbps-src: silence show-avail 2019-07-05 08:53:52 +02:00
Juan RP
ba4c05aa00 xbps-src: fix reconfiguration of bootstrap pkgs. 2019-07-05 08:53:51 +02:00
Juan RP
2a4e178e35 xbps-src: multiple performance improvements.
- use xbps-checkvers(1) to resolve dependencies.
- all dependencies are installed at once for the host and target.
- the `show-build-deps` target is now much faster.
- the `update-bulk/show-repo-updates` targets are now much faster.
- the `update-sys/show-sys-updates` targets are now much faster.
- the `bootstrap` target now works on musl hosts.
- simplified some loops.
- use cut(1) rather than awk(1) where applicable.
- multiple random changes to improve performance.

Based on work started by @Duncaen on https://github.com/void-linux/void-packages/pull/12433

Close https://github.com/void-linux/void-packages/pull/12433
Close https://github.com/void-linux/void-packages/pull/11282
2019-07-05 08:53:51 +02:00
Juan RP
67cd850ebf
xbps-src: introduce XBPS_REPO_COMPTYPE for etc/conf.
This sets the repository data compression format, as explained
in xbps-rindex(1). By default set to `gzip'.
2019-06-25 10:52:37 +02:00