Commit Graph

339 Commits

Author SHA1 Message Date
Christian Neukirchen c36f464f4d update_check.sh: extract sourceforge project name from URL instead of guessing it. 2014-11-01 19:04:21 +01:00
Juan RP 07dd4ad339 xbps-src: update-check: avoid bashism, requested by @chneukirchen. 2014-11-01 15:23:51 +01:00
Juan RP 1e445fe096 xbps-src: update-check: return if curl not available; simplify output for match. 2014-10-31 21:24:07 +01:00
Christian Neukirchen 60ac25fd1f xbps-src: add update-check. 2014-10-31 20:43:35 +01:00
Juan RP cc45da3f6d xbps-src: indent enabled build options correctly too. 2014-10-30 07:09:33 +01:00
Juan RP 3f31573ed5 xbps-src: align show options correctly. 2014-10-28 10:15:58 +01:00
Juan RP 58bbb98712 xbps-src: move ccache/distcc to hostdir, to make them shared by multiple masterdirs.
This way a single ccache or distcc directory can be shared by multiple
independent masterdirs.
2014-10-26 10:22:30 +01:00
Juan RP 4545aca5e3 xbps-src: repair bootstrap installation. 2014-10-18 16:45:16 +02:00
Juan RP 033c4ed0f5 xbps-src: remove WIP repo delta support.
- it never worked correctly
- it's WIP and looks like it will be stalled forever
- won't be necessary anymore with xbps-0.42
2014-10-14 19:19:07 +02:00
Juan RP 6928b52a4e xbps-src: full switch to void-packages. 2014-10-11 11:15:02 +02:00
Juan RP 4b6129eeb7 xbps-src: chroot: use /void-packages. 2014-10-11 11:11:09 +02:00
Juan RP 77d1837155 xbps-src: misc tweaks for zap and use void-packages too in chroot ops. 2014-10-11 11:02:57 +02:00
Juan RP 774685aaa2 xbps-src: create the void-packages symlink unconditionally. 2014-09-28 08:19:32 +02:00
Juan RP 62e0fb53be xbps-src: export XBPS_WRAPPERDIR for cross builds (could be used for native too). 2014-09-28 08:02:12 +02:00
Juan RP 3efa28ecbf xbps-src: create a void-packages symlink for xbps>=0.41. 2014-09-28 07:25:09 +02:00
Juan RP 5202f22f48 xbps-src: define some xxx_FOR_BUILD vars for cross builds. 2014-09-25 16:37:14 +02:00
Juan RP 952848ebc3 xbps-src: make sure a target is always passed in to xbps-uhelper. 2014-09-25 12:44:36 +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 8063adde71 xbps-src: for runtime deps (depends) do not resolve vpkgs.
...otherwise the following would happen:

	- foo depends on musl
	- musl is provided by cross-vpkg-dummy
	- musl is then detected as resolved and it's not built.
2014-09-21 11:44:45 +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 75b6468fa0 Introduce a way to override dependencies for all pkgs thru a file.
The `etc/defaults.virtual` file contains the default replacement
for our use cases; at this moment we only use it to use `eudev`
rather than `systemd` for udev.

If `etc/virtual` exists it overrides the settings of `etc/defaults.virtual`.
2014-09-06 12:43:24 +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 6d20b9a05a xbps-src: move vopt_* helpers to environment/setup/options.sh. 2014-08-30 09:10:11 +02:00
Juan RP 790202ddbd xbps-src: move helpers to environment; there's no need to have them.
Those helpers were just setting up some extra functions that can be used
on templates, and this can be done already via environment, so let's remove
the helpers completely.
2014-08-30 09:01:29 +02:00
Dominik Honnef cdd2ce0da4 add helpers for working with options
Add the helpers vopt_if, vopt_with and vopt_enable that simplify common
option-based operations.

Instead of a bunch of

if [ "$build_option_foo" ]; then
	configure_args+=" --with-foo"
	makedepends+=" foo-devel"
else
	configure_args+=" --without-foo"
fi

one can use

configure_args="... $(vopt_with foo)
makedepends="... $(vopt_if foo foo-devel)"

instead.

We're adding these functions to common/xbps-src/shutils/common.sh but
that might not be the ideal place. I would've preferred
common/helpers/options.sh, but helpers are only available in the
individual phases, not when the template itself gets parsed.
2014-08-30 00:39:46 +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 1651a5fe6e xbps-src/doinstall: there's no need to remove pkg metafiles on destdir. 2014-08-26 09:55:40 +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 5290c2a839 xbps-src: change order of how subpackages are processed.
10 Non development packages are processed first lexically.
20 Development packages are processed after 10.

This resolves the issue of 32bit pkg creation with development pkgs
that depend on other non-development subpkgs, and result in wrong
dependencies being propagated to the 32bit development pkgs.
2014-08-25 17:43:08 +02:00
Juan RP 22e0c33b39 xbps-src: chroot: do not copy /etc/services; we use iana-etc now. 2014-08-25 15:30:57 +02:00
Juan RP 12a3b16e42 Introduce "broken" var to skip building broken packages; make "nocross" not error out.
- broken var simply exits (without error) and skips building a pkg.
- nocross var now simply exits without an error, to make buildbot continue building pkgs.
2014-08-22 16:49:23 +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 108a6d3fac xbps-src: introduce "nocross" to not allow cross compilation. 2014-08-21 12:07:44 +02:00
Juan RP 954e1aff05 xbps-src/chroot: disable xbps/repo.d/00-main.conf with a symlink; rather than removing the file. 2014-08-21 11:42:51 +02:00
Juan RP 9d50c2fb05 xbps-src: use "virtual?" keyword to declare virtual runtime dependencies.
The syntax "pkg?vpkg" can be used in hostmakedepends, makedepends and depends;
but the "virtual" keyword can be declared specifically for runtime dependencies
(depends).
2014-08-17 19:21:25 +02:00
Juan RP b0aedbb03a xbps-src: added -D to generate repository binary deltas; disabled for now. 2014-08-14 12:28:27 +02:00
Juan RP 0ac14b23ad xbps-src: remove a local var introduced in previous. 2014-08-05 11:52:12 +02:00
Juan RP 1e1136cfac xbps-src: do not skip build deps that are also runtime deps. 2014-08-05 11:51:25 +02:00
Juan RP 933513adaa Improve how run-time deps (aka "depends") are handled in packages.
Run-time dependencies declared via "${depends}" are now also part of the
build process, but those are not installed to the master directory; rather
those dependencies are only checked if a binary package exists in a
local repository to satisfy the required version.

Thanks to @dominikh for idea and suggestions.
2014-07-30 17:58:17 +02:00
Juan RP 8cefd7e1cc xbps-src: make sure to re-read template for build options.
The issue was that when building dependencies of target pkg, the
template wasn't re-read with defined build options and those were
completely ignored.
2014-07-24 18:40:52 +02:00
Juan RP c49e01fc15 xbps-src: make it possible to override the subpackages list via ${subpackages}.
This overrides the automatic list generated by xbps-src and it's overridable
to change the processing order of subpackages.
2014-07-23 15:44:36 +02:00
Juan RP e372fcc6e0 xbps-src: fix pkg options parsing in package names containing dashes.
When using per-pkg options via etc/conf, all dashes should be replaced by
underscores, i.e:

	XBPS_PKG_OPTIONS_xorg_server=opt,~opt2
2014-07-19 10:39:22 +02:00
Juan RP 9067c2e4f7 xbps-src: xbps-src-doextract: change cwd to wrksrc for post_extract(). 2014-07-17 15:54:37 +02:00
Juan RP 67358807ea xbps-src: chroot: remove xbps conf remote repos with -N. 2014-07-14 12:28:08 +02:00
Juan RP 407a882b1a xbps-src/xbps-src-doextract: if build_style declares do_extract(), use it rather than hooks. 2014-07-12 17:44:54 +02:00
Juan RP 758ea97981 xbps-src: fix -o in chroot (reported by al3hex). 2014-07-12 15:56:40 +02:00
Juan RP 719de35774 xbps-src: print some more details if installation of cross pkgs fails. 2014-07-08 15:09:21 +02:00
Juan RP 4d55b696c3 xbps-src: chroot_init: do not propagate XBPS_MASTERDIR to the generated xbps-src.conf.
Fixes Ypnose issue where he has XBPS_MASTERDIR set in `etc/conf`.
2014-07-05 16:12:14 +02:00
Juan RP aee9d60bec xbps-src: document xbps-install(8) ENXIO rval. 2014-07-02 11:09:41 +02:00
Juan RP 71f0a912ef xbps-src: chroot.sh: XBPS_CONFIG_FILE could be unset, handle it. 2014-07-01 18:47:39 +02:00
Juan RP ff00dc5448 xbps-src: destroy <masterdir>/tmp before entering the chroot. 2014-07-01 15:07:01 +02:00
Juan RP e64f3d8a95 xbps-src: make sure XBPS_CONFIG_FILE is set. 2014-07-01 13:15:52 +02:00
Juan RP c06d1e4d85 xbps-src: partial revert of 871d2fa87.
We can't pass XBPS_OPTIONS to xbps-uchroot(8) as is.
2014-07-01 11:04:34 +02:00
Juan RP 871d2fa873 xbps-src: added -G to enable XBPS_USE_GIT_REVS. 2014-07-01 10:33:54 +02:00
Juan RP 67947330cc xbps-src: set XBPS_HOSTDIR correctly for chroot ops. 2014-06-30 12:03:56 +02:00
Juan RP a5e726c4ec xbps-src: copy XBPS_* settings from etc/conf only if the file exists. 2014-06-30 11:52:52 +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 e3246539e7 xbps-src: do not copy x86_64 specific repos to the cross target root. 2014-06-10 09:36:58 +02:00
Juan RP b747269490 xbps-src: make local/remote multilib repos only available on x86_64. 2014-06-10 09:22:18 +02:00
Juan RP fedcbc4423 xbps-src: remove local copy of xbps.conf; it's unnecessary with xbps-0.37. 2014-06-07 06:07:04 +02:00
Juan RP bb2361c130 xbps-src: set correct xbps cachedir for chroot ops. 2014-06-07 05:52:42 +02:00
Juan RP b308d7cfac xbps-src: fix previous correctly for local mode too. 2014-06-06 16:29:50 +02:00
Juan RP f90fe6abb8 xbps-src: fixed repo handling with xbps-0.37 in cross builds. 2014-06-06 16:24:35 +02:00
Juan RP cf76c65be9 xbps-src: use xbps-0.37 config repo dir feature (etc/repo.d). 2014-06-06 16:10:42 +02:00
Juan RP 3ba23bbc4f xbps-src/common.sh: recursively remove all cross pkgs. 2014-05-19 16:45:34 +02:00
Juan RP 14a5ef4503 xbps-src/build_dependencies.sh: in !CHROOT_READY case don't install pkgs with fakeroot. 2014-05-19 12:40:44 +02:00
Juan RP ea719b3f59 Added multilib, multilib/nonfree and debug repositories by default.
- multilib: to store 32bit packages.
- multilib/nonfree: to store nonfree 32bit packages.
- debug: to store debug packages.
2014-05-05 10:59:33 +02:00
Juan RP 4d9ed5639f xbps-src/shutils/chroot.sh: unconditionally copy repo conf files into masterdir. 2014-05-05 10:56:00 +02: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 ff700d0a40 xbps-src/shutils/chroot: use existing PATH when entering xbps-src cmds.
... otherwise xbps-uchroot might not be found when it's in an uncommon path.
2014-04-14 19:58:32 +02:00
Juan RP 06ac73239f xbps-src/shutils/common: read build_dependencies.sh for check_installed_pkg(). 2014-04-10 14:54:30 +02:00
Juan RP e60eb854e6 xbps-src: move check_installed_pkg() to build_dependencies.sh. 2014-04-10 11:58:06 +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 51882b7ec4 xbps-src: apply sane indentation to all shell code (2/2). 2014-04-09 16:55:58 +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
Juan RP 1af40eb476 xbps-src: apply sane indentation to all shell code. 2014-04-09 16:40:27 +02:00
Juan RP 576b865cf4 Update for xbps>=0.35 which contains xbps-uchroot.
That means that the Makefile and xbps-src generated files are not required
anymore, and the xbps-src script can be used as is.

Bump xbps requirement to 0.35 and enable XBPS_INSTALL_ARGS by default.
2014-04-01 11:29:21 +02:00
Juan RP f6f59dec8b xbps-src: make sure that wrksrc is expanded after reading build-options. 2014-03-27 10:06:27 +01:00
Juan RP 67fd042d4b xbps-src: make alternative repos work again with git branches. 2014-03-25 09:55:40 +01:00
Juan RP 3b291a8b1d xbps-src: resolve XBPS_DISTDIR correctly with relative paths. 2014-03-24 11:43:16 +01:00
Juan RP 0d953db70b xbps-src: 'pkg' target replaces 'build-pkg' but the latter is kept for compat. 2014-03-23 11:27:09 +01:00
Juan RP bc256eed73 xbps-src: repair -V 2014-03-23 09:08:41 +01:00
Juan RP ae8458d875 xbps-src: re-add support for looking in templates in cwd. 2014-03-23 09:04:05 +01: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 85624c1a6a common/xbps-src/shutils/chroot.sh: prepend /xbps-packages to PATH for the chroot target. 2014-03-22 13:21:04 +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