Commit Graph

47 Commits

Author SHA1 Message Date
Jürgen Buchmüller
5a11957d14 Merge branch 'master' into check 2017-05-02 09:18:52 +02:00
Juan RP
36480319fe xbps-src: fix previous (prepare_cross_sysroot needs to be run early). 2017-04-03 21:16:51 +02:00
Juan RP
d7aaa3e3e9 xbps-src: speed up cross compilation by installing cross pkgs a bit later. 2017-04-03 21:12:34 +02:00
Jürgen Buchmüller
c31dd888f6 xbps-src: implement a 'check' stage
Add another stage 'check' between 'build' and 'install'. It is be enabled using the
variable XBPS_CHECK_PKGS=yes and disabled if unset, set to "0" or "no" in your
local etc/conf.

A new xbps-src option `-q` for `quick` will disable XBPS_CHECK_PKGS by overriding it to 0.
If enabled, `common/xbps-src/shutils/xbps-src-docheck.sh` checks for an existing
`do_check()` function in the package's template and, if it exists, calls it.

A new template variable `checkdepends` may be present and list packages required
to run the `do_check()` function. Example: `checkdepends="bc unittest-cpp"`.
2017-03-08 11:33:48 +01:00
Juan RP
5d631d1415 libexec/build.sh: force base-files installation to not fail on EEXIST. 2016-04-30 17:57:10 +02:00
Juan RP
9a2487e19e libexec/build.sh: set XBPS_ARCH while installing base-files to the masterdir.
Fixes './xbps-src bootstrap' in musl hosts.
2016-04-30 17:52:33 +02:00
Christian Neukirchen
7a19e62e37 libexec/build.sh: add trailing newline to error. 2016-04-29 18:26:41 +02:00
Juan RP
e4fdd38304 xbps-src/doinstall: touch install state file after running post-install too. 2015-09-27 18:51:58 +02:00
Juan RP
68701cf6ca xbps-src: repair -f <phase> again; close #2617
Also simplified configure/build/install phases to only touch a single
file once the phase has been run, rather than multiple of them
(pre/post, etc).
2015-09-27 18:49:38 +02:00
Juan RP
1f2147f240 xbps-src/doinstall.sh: update args check. 2015-09-27 11:28:11 +02:00
Juan RP
21b2f6c3e8 xbps-src: fix regressions introduced with -f <phase>. 2015-09-27 10:30:10 +02:00
Juan RP
1f4a588861 xbps-src: fix -f pkg when destdir is empty. 2015-09-27 10:09:08 +02:00
Juan RP
4449fbd0be xbps-src: make -f <phase> respect previous successful phases. 2015-09-24 16:12:10 +02:00
Juan RP
08efa2cca1 xbps-src: -f <phase> now works for configure/build/install/pkg phases. 2015-09-24 15:45:47 +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
beefcurtains
3c424a73f6 xbps-src: quote $wrksrc
Allows spaces in the directory name
2015-07-29 11:11:04 +00:00
Juan RP
5a40351feb xbps-src: only remove deps before building on travis builds.
This assumes -C is set without -t and XBPS_CHROOT_CMD set to proot.

A stupid workaround for now...
2015-07-29 10:52:10 +02:00
Juan RP
2284708d43 xbps-src: remove autodeps for target pkg if -t is not set.
When building with -C and without -t (xbps-uchroot(1) with overlayfs),
make sure to remove autodeps prior to start resolving dependencies.

This is necessary for cases where a previous built pkg contains the
same build dependency required for another pkg with -C, resulting
in dependencies being detected as installed and later removed.

Thanks to @dominikh and @Gottox for info and comments.
2015-07-16 09:38:02 +02:00
Juan RP
b1d2d425b4 xbps-src: remove stupid workaround to sleep for a second.
This was added to make sure pkg file metadata contains a different mtime
(in seconds precision), but building multiple pkgs in less than a second
will be really strange.
2015-05-23 09:52:19 +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
ba814ab5c7 xbps-src/build.sh: error out if installing cross pkgs fails for some reason. 2015-04-15 11:38:23 +02:00
Juan RP
48548f1983 xbps-src/build.sh: sleep 1 second while running do-pkg.sh.
This will ensure that binpkg files do not have recorded the same mtime,
which is required in xbps to detect obsolete files properly.
2015-04-02 09:09:12 +02:00
Juan RP
7a59746763 xbps-src/build.sh: pass $sourcepkg not subpkgname to the helpers.
Close #1243
2015-03-30 20:24:11 +02:00
Juan RP
a86b30ba05 xbps-src: fix remaining issues with -N and -a. 2015-03-23 16:05:43 +01: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
0337b86f43 xbps-src: return 0 on success, 1 on error and 2 on nocross/broken (ignore). 2015-03-19 10:08:02 +01:00
Juan RP
a8962ace18 xbps-src/build.sh: only skip building/installing deps for target pkg with -N. 2015-03-14 09:24:35 +01:00
Juan RP
f2883afc1b xbps-src/build.sh: fix xbps-src-doinstall() when pkg is a subpkg.
Close #1120
2015-03-14 09:06:44 +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
31b544020f xbps-src/libexec: remove double slash from shebang. 2015-03-11 08:28:13 +01:00
Juan RP
df4c861f97 xbps-src: common/{,environment}/build_style -> common/${,environment}/build-style. 2015-02-21 12:13:07 +01:00
Juan RP
3adb1c5c6b xbps-src: add environment/build_style to set env vars for build_styles. 2015-02-21 12:03:48 +01:00
Juan RP
aed0f3ee0e xbps-src: fix hooks that are expected to be used in subpkgs. 2015-01-14 14:23:10 +01:00
Juan RP
5f63a3cf4f xbps-src: run pre-install hooks for subpkgs too.
The pre-install hooks are run before pkg_install().
2015-01-14 11:31:52 +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
782f331b10 xbps-src: repair running post-install hooks. 2014-12-06 18:10:08 +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
f7543fb5b6 xbps-src: libexec: simplify chdir to wrksrc/build_wrksrc. 2014-11-06 17:23:58 +01:00
Juan RP
13c2ca3bd2 xbps-src: reorganize code in more sections. 2014-09-05 11:10:07 +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
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
9067c2e4f7 xbps-src: xbps-src-doextract: change cwd to wrksrc for post_extract(). 2014-07-17 15:54:37 +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
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
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