Commit graph

135 commits

Author SHA1 Message Date
John
6ce531b231 common: unser PKG_CONFIG before sourcing templates, set PKG_CONFIG also for native 2020-05-29 14:30:06 +02:00
John
82734d940c
common/xbps-src: set PKG_CONFIG{,FOR_BUILD} env vars 2020-05-26 21:18:27 +02:00
q66
2357578d15 shutils/common.sh: plumbing for ppcle 2020-04-30 01:06:51 +02:00
Juan RP
b166cdd484
Revert "xbps-src: create XBPS_WRAPPERDIR via libexec/build.sh."
This reverts commit 4df0bcff74.

Reverted until I find the real issue.
2020-04-14 14:14:13 +02:00
Juan RP
4df0bcff74
xbps-src: create XBPS_WRAPPERDIR via libexec/build.sh.
This way there's no stale files in other unrelated targets,
like `show-build-deps`.
2020-04-07 12:39:41 +02:00
Piotr Wójcik
174f6b522b common.sh: allow individual build options for packages with dot in name 2020-03-09 21:59:16 +01:00
Juan RP
47175dc8bb
xbps-src: fix build-options via cmdline.
Fixes #19495
2020-03-06 18:18:36 +01:00
q66
9fb3ffe131 common: make XBPS{_TARGET}_NEED_ATOMIC less misleading 2020-02-07 21:41:39 +01:00
Jürgen Buchmüller
5bed028584 common.sh: introduce XBPS{,_TARGET}_NEED_ATOMIC 2020-02-07 21:29:22 +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
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
Juan RP
8c9aca6426
xbps-src: "build-options" obj is a string, no newlines accepted. 2019-12-29 20:19:54 +01:00
q66
3a363d2611 xbps-src: account for nonfree repo with -E
This makes sure nonfree packages don't get rebuilt when -E is
passed to xbps-src.

[ci skip]
2019-12-14 11:26:36 +01:00
Johannes
175b65f006 common: change wording in error message
build helper and build styles are now different concepts
2019-11-01 00:45:49 +01:00
Piotr Wójcik
18a8a3c690 xbps-src: Actually unset subpkg functions 2019-08-27 19:26:31 +02:00
Jürgen Buchmüller
f1a7dfbfef
common: fix XBPS_{,TARGET_}{ENDIAN,LIBC,WORDSIZE}
My first attempt was not working at all.

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-08-03 23:09:49 +02:00
Jürgen Buchmüller
6a1b977e0c Revert "profiles: introduce XBPS_{,TARGET_}{ENDIAN,LIBC}"
This reverts commit 9b3203401d.

It doesn't actually work. Use the method suggested by @q66 instead.
2019-08-03 23:09:36 +02:00
Jürgen Buchmüller
9b3203401d
profiles: introduce XBPS_{,TARGET_}{ENDIAN,LIBC}
Provide new environment variables for simplifaction of template checks:
...ENDIAN defines the (target) machine's endianness: "le" or "be".
...LIBC defines the (target) machine's C library: "glibc" or "musl".

Closes: #13356
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-08-02 17:34:05 +02:00
Jürgen Buchmüller
ed4cdadcfd common/profiles: introduce XBPS_{,TARGET_}WORDSIZE
The host and target word size can be used to determine whether
cross compiling certain packages is possible.
2019-07-26 15:18:11 +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
95beffd0f5 Revert "xbps-src: fix XBPS_CHECKVERS_XCMD."
This reverts commit 1fc6aea821.
2019-07-05 12:08:43 +02:00
Juan RP
1fc6aea821 xbps-src: fix XBPS_CHECKVERS_XCMD.
Needs to set -r $XBPS_CROSS_BASE to use correct dbdir.
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
Duncaen
0639ff03da
xbps-src: simplify set_build_options 2019-06-19 11:33:54 +02:00
Duncaen
dd9c7a967e
xbps-src: less forking in get_subpkgs and unset_package_funcs 2019-06-19 11:30:22 +02:00
Duncaen
723170541d
xbps-src: don't check if base-chroot is installed for every single sourced template 2019-06-19 11:08:39 +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
Doan Tran Cong Danh
37ed8cb67b common: add BUILD_{CXX,CPP,FC,LD} flags 2019-06-15 16:31:53 +02:00
q66
3c47efa808 common: expose build profile in cross env
[ci skip]
2019-04-09 19:26:59 -03:00
John
01d11a4938 build-style/cmake: set CMAKE_CROSSCOMPILING_EMULATOR 2019-04-05 23:04:14 +02:00
maxice8
b95a49b243
meta: remove last bits. 2019-03-14 19:25:00 -03:00
maxice8
a5bc81adf7 meta: remove supporting code for noarch 2019-03-14 19:22:06 -03:00
maxice8
166b70f35b meta: also run do-$step_name hooks when run_step is called. 2019-03-03 13:08:23 -03:00
maxice8
f683b0aa08
meta: fix build-class -> build-helper 2019-02-26 17:28:12 -03:00
Enno Boland
38c457e1aa add compatibility code for noarch/only_for_archs 2019-02-15 13:19:44 +01: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
Johannes
026ebc069e common: unset rust-cross specific variables for native builds 2019-02-08 19:16:39 +01:00
maxice8
24efa877cd
shutils/common.sh: Remove variables that are now in build-helper/rust.sh 2019-01-25 20:44:42 -02:00
maxice8
e30a9c8908
shutils/common.sh: add support for source build-helper files 2019-01-25 20:44:41 -02:00
maxice8
027cdb5bb8 shutils/common.sh: export CARGO_BUILD_TARGET 2019-01-20 19:41:18 -02:00
maxice8
54040e4b1b shutils/common.sh: define CARGO_BUILD_JOBS and
CARGO_TARGE_${RUST_TAGRGET}_LINKER.
2019-01-20 15:33:10 -02:00
maxice8
1fcdcdd959
shutils/common.sh: fix typo 2019-01-19 08:03:10 -02:00
maxice8
9964ac65d3 common.sh: don't export XBPS_GCC_* 2019-01-18 05:42:18 -02:00
Rasmus Thomsen
9141df9698 cross-profiles: set XBPS_CROSS_RUST_FLAGS&XBPS_CROSS_RUST_TARGET
only added to platforms which support rust
2018-10-15 08:20:10 +02:00
Enno Boland
08d510ab87
common/shutils: fix configuration loading during setup_pkgs 2018-06-29 11:26:37 +02:00
Alessio Sergi
d9f67bcb36 Revert "common/xbps: make unset_package_funcs and run_pkg_hooks nonfatal"
This reverts commit f3d4dc20d7.
2018-06-05 16:17:23 +02:00
Enno Boland
f3d4dc20d7 common/xbps: make unset_package_funcs and run_pkg_hooks nonfatal 2018-06-05 09:22:30 +02:00
maxice8
ac4a294ba4 common: show value of nocross when it is set.
Manual.md says:

"This should be set to a string describing why it fails, or a link to
 a travis buildlog demonstrating the failure."
2018-05-01 19:20:30 -04:00