Commit graph

32 commits

Author SHA1 Message Date
Piotr Wójcik
81e0103b38 xbps-src: make update-sys operate on host
partially reverts 75eca1b03e
2021-03-10 17:19:02 +01:00
Andrew Benson
61a501a104 shutils/bulk.sh: remove newlines from package list 2020-06-04 13:21:42 -05: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
3c8ad720a3 shutils/bulk.sh: use XBPS_DISTDIR when running xbps-src 2019-12-01 12:14:39 +01:00
q66
021b7cc11e xbps-src: revert to previous bulk_sortdeps code
This should restore sort-dependencies behavior back to its former
behavior of not including all of the build dependencies not in
the input list in its listing.
2019-11-19 02:04:25 +01: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
7da591e1e4 Revert "xbps-src: improve bulk_sortdeps()."
This reverts commit 3b73edbaa5.
2019-07-05 12:08:42 +02:00
Jürgen Buchmüller
0eb55debee Revert "xbps-src: improve bulk code a bit more."
This reverts commit 4262450928.
2019-07-05 12:08:41 +02:00
Jürgen Buchmüller
f5b502d3c5 Revert "xbps-src: bulk_build() use existing shell funcs."
This reverts commit 642cfa74c4.
2019-07-05 12:08:35 +02:00
Juan RP
642cfa74c4 xbps-src: bulk_build() use existing shell funcs.
... rather than forking xbps-src again.

Closes: #12797 [via git-merge-pr]
2019-07-05 08:53:52 +02:00
Juan RP
4262450928 xbps-src: improve bulk code a bit more.
- use `show-avail` to discard broken pkgs.
- the parallel logic was incomplete.
- avoid unnecessary sorting.
2019-07-05 08:53:52 +02:00
Juan RP
3b73edbaa5 xbps-src: improve bulk_sortdeps().
./xbps-src sort-dependencies $(./xbps-src show-build-deps xbps)

0.202s vs 0.514s
2019-07-05 08:53:52 +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
7b7d7c13a1
xbps-src: exit properly if mktemp(1) fails, not from its subshell.
Thanks @huglovefan
2019-06-17 17:38:07 +02:00
Juan RP
f59b295903 xbps-src: cleaned up usage of mktemp(1).
This one was on my TODO for a long while... fixes unportable
arguments (checked with the NetBSD's manual page).
2019-06-17 15:23:20 +02:00
Juan RP
b722ed3c8b cross-profiles: simplify and rename some of them to match XBPS_TARGET_MACHINE.
- XBPS_TARGET_ARCH var renamed to XBPS_TARGET_MACHINE (gets rid of an extra var).
- Renamed cross profiles to match XBPS_TARGET_MACHINE.
- Added symlinks to keep compatibility with old profiles.
2016-04-27 16:47:05 +02:00
Juan RP
b479b9a7ba xbps-src: bulk: only abort if rval is 1, ignore broken/skipped pkgs.
Issue #2804
2015-10-22 18:20:09 +02:00
Juan RP
bcdacb66a0 xbps-src: replace basename(1) with ${var##*/}.
Reduce number of fork+exec due to using a subshell to execute basename(1).
2015-09-11 07:55:40 +02:00
Juan RP
cef388f07b xbps-src: introduce a new target: "sort-dependencies".
This expects a variable argument list with package names that will be
returned to stdout topologically sorted.

$ ./xbps-src sort-dependencies libarchive-devel liblzma-devel libxbps zlib-devel bzip2-devel
bzip2
xz
zlib
libarchive
xbps
2015-08-16 10:47:35 +02:00
Juan RP
ad71cffe79 xbps-src/bulk: silence output if there are no pkgs to build. 2015-04-11 08:40:46 +02:00
Juan RP
6d465e0a43 xbps-src/bulk: simplify and make the toposort work again. 2015-04-07 12:34:23 +02:00
Juan RP
efbb1f4a8a xbps-src: make -a target work with show-repo-updates/update-bulk. 2015-04-07 12:18:26 +02:00
Juan RP
55ce6f836f xbps-src/bulk: do not use tac(1) in the tsort result, it's inverted otherwise. 2015-03-20 14:45:06 +01:00
Juan RP
aab0fe7ed3 xbps-src/bulk: declare some more local vars. 2015-03-17 11:04:09 +01:00
Juan RP
d8f69bde78 xbps-src: repair 'update-bulk' target (close #1121). 2015-03-14 09:47:56 +01:00
Juan RP
849d22e46d xbps-src: refactor build logic into its own script (build.sh).
The build.sh script is now responsible to handle all the logic to build
a source package and its subpackages, as well as all its required
build dependencies. Thanks to this and subshells, dependencies are now
built into its own child process, creating a process tree that can go
nested as long as your system allows forking and has enough memory :-)

This fixes some issues that have been while building pkgs that have lots
of nested dependencies.
2015-03-14 07:52:29 +01:00
Juan RP
8d9f0ed815 xbps-src: bulk: setup srcpkg vars before reading target template. 2014-11-11 10:41:20 +01:00
Juan RP
8aa48b07ff xbps-src/shutils/bulk: pass --distdir option to xbps-checkvers(8) instead. 2014-04-17 10:36:45 +02:00
Juan RP
3c79f11a6f xbps-src/shutils/bulk: also add pkgs with no deps. 2014-04-10 11:26:02 +02:00
Juan RP
922d37f590 xbps-src/shutils/bulk: perform topological sort of build-deps. 2014-04-10 11:10:39 +02:00
Juan RP
d4e4d826e6 xbps-src: new targets: update-bulk and update-sys.
* 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.
2014-04-09 16:42:07 +02:00