Commit graph

38 commits

Author SHA1 Message Date
q66
0a38409da6 xbps-src: work around autodeps removal needing multiple passes 2019-10-25 23:53:38 +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
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
maxice8
c8129e7d38 shutils/pkgtarget.sh: fix check for noarch 2019-02-15 12:14:53 -02:00
Enno Boland
6eb37e35b2 common: merge only_for_archs and noarch=yes into one.
* 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 "*"
2019-02-15 13:19:44 +01:00
Michael Aldridge
a4dd50388a xbps-src: Always enable the gocache
[ci_skip]
2018-09-01 22:05:07 -07:00
Juan RP
4cf05ab32b xbps-src: remove_pkg_autodeps: avoid interactivity. 2018-01-25 09:30:47 +01:00
Juan RP
e3542fac95 xbps-src: remove_pkg_autodeps: print errval and debug output on error. 2015-07-09 11:40:52 +02:00
Juan RP
4f67c26652 xbps-src: force autodeps cleanup while building dependencies.
Before that change, "./xbps-src -C pkg foo" would not remove dependencies
installed by previous builds required by foo.
2015-05-02 03:40:52 +02:00
Juan RP
e2e7b10b0d xbps-src: repair bootstrap-update in the !chroot case. 2015-04-09 19:45:59 +02:00
Juan RP
03ef5b6804 xbps-src: make -N -a <target> work.
If required cross pkgs are not available in xbps repos, those are now built
automagically.
2015-03-23 12:44:37 +01:00
Juan RP
95ca05e6e6 xbps-src: check_pkg_arch now exits with errcode 2. 2015-03-19 10:26:19 +01:00
Juan RP
43258cc391 xbps-src: remove autodeps before running the phase unless -C is set.
This should avoid unexpected issues due to building pkgs with dependencies
installed by previous builds.
2015-03-15 10:34:13 +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
2f524cf66a xbps-src: cleanups for -E and -t.
-E also detect noarch binpkgs.
-t make sure to cleanup the temporary masterdirs.
2015-03-01 19:29:16 +01:00
Juan RP
cda175e0d6 xbps-src: make show-build-deps return err when arch is not supported. 2015-02-28 02:38:00 +01:00
Juan RP
29b171a284 xbps-src: return early in the bootstrap target when all deps are built.
This fixes the last issue for the 'bootstrap' target... this requires
xbps>=0.43.1 to work properly.
2015-01-05 17:11:23 +01:00
Juan RP
5929c2458a xbps-src: remove pkg statedir unless -C is set. 2014-12-13 09:42:11 +01:00
Juan RP
6e13dcbaff xbps-src: introduce XBPS_STATEDIR to store state files, logs and others.
XBPS_STATEDIR is created in XBPS_BUILDDIR/.xbps-${sourcepkg}-${version}
and contains logs and state files for all phases, as well as wrappers.

We can now inspect the output from all hooks.
2014-12-11 11:02:22 +01:00
Juan RP
2a7a3209b8 xbps-src: make the 'pkg' target work after 'install'.
- Create state files in $wrksrc for $sourcepkg and $subpackages
to see if the phase needs to be re-run.
2014-12-06 13:45:49 +01:00
Juan RP
efc17d8c22 xbps-src: accept subpkgname as target pkg for the install target.
Close #686
2014-12-06 12:33:30 +01:00
Juan RP
4545aca5e3 xbps-src: repair bootstrap installation. 2014-10-18 16:45:16 +02:00
Juan RP
1ce278f035 xbps-src: drop fakeroot; xbps-create(8) is our friend.
- This should work for almost 90% current packages, as reported by OpenBSD/ports.
- Packages that use install -o <user> -g <group>  will get fixed progressively.
- xbps-create(8) by default sets pkg files as 0:0, if any pkg needs special
  permissions those can be set via INSTALL scripts (for now).
2014-09-24 19:51:17 +02:00
Juan RP
dbde6e849e Revert "Revert "xbps-src: when all deps have been processed exit directly.""
This reverts commit ad79b8e7e2.
2014-09-21 11:25:38 +02:00
Juan RP
ad79b8e7e2 Revert "xbps-src: when all deps have been processed exit directly."
This reverts commit 9bf1ba5f88.

I still think the behaviour I observed was related to something else.
2014-09-05 12:57:15 +02:00
Juan RP
13c2ca3bd2 xbps-src: reorganize code in more sections. 2014-09-05 11:10:07 +02:00
Juan RP
9bf1ba5f88 xbps-src: when all deps have been processed exit directly. 2014-08-30 20:45:57 +02:00
Juan RP
e582f328b3 xbps-src: repair and improve the bootstrap target (from scratch).
- There's no need to install rdeps into the masterdir, just base-files.
- There's no need to exit if XBPS_TARGET_PKG == sourcepkg, just return.
- After building base-chroot, install bootstrap binary packages.
2014-08-26 10:33:15 +02:00
Juan RP
3fdd0e180e xbps-src: run pre-pkg hooks in the install to destdir target.
The prepare-32bit hook has been moved to the pre-pkg stage and now
those hooks are executed as part of the install phase. That means that
pre-pkg hooks are now independently run for the subpkgs and the sourcepkg
after the install-destdir phase and pre/do/install hooks.

As bonus, finally correct rdeps can now be collected for the 32bit pkgs
and works for all them, without the need to sort the order of subpkgs!
2014-08-25 22:34:13 +02:00
Juan RP
7e9f329643 xbps-src: remove_pkg: exit early if destdir does not exist. 2014-08-21 12:16:53 +02:00
Juan RP
9d34c36e0a Implemented support for permanent pkg build options (globally or per-pkg).
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.
2014-06-30 11:32:07 +02:00
Juan RP
51882b7ec4 xbps-src: apply sane indentation to all shell code (2/2). 2014-04-09 16:55:58 +02:00
Juan RP
1af40eb476 xbps-src: apply sane indentation to all shell code. 2014-04-09 16:40:27 +02:00
Juan RP
c343fbf42a xbps-src: make install/remove targets defaults now, but keep previous for compat. 2014-03-22 20:59:39 +01:00
Juan RP
0b95cb8f5d Merge xbps-src code to make it usable in a standalone mode.
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 ...
2014-03-22 12:31:42 +01:00