Commit graph

55 commits

Author SHA1 Message Date
Juan RP 99578ee070 xbps-src: no need to subst shell helpers anymore. 2011-11-18 14:20:00 +01:00
Juan RP c011a2749b xbps-src: use XBPS_LIBEXECDIR and XBPS_SHAREDIR in all scripts that need substs. 2011-11-18 14:05:51 +01:00
Juan RP d7c2cc5513 xbps-src: doinst-helper: we know exact PATH for chroot case, use it. 2011-11-18 12:02:39 +01:00
Juan RP 005be53337 xbps-src: remove getdeps-helper, unused; don't install chroot-helper in chroot. 2011-11-18 11:58:21 +01:00
Juan RP f5dd7aa666 xbps-src: deprecate keep_empty_dirs, warn when an empty dir is removed. 2011-11-09 16:25:11 +01:00
Juan RP 5dc6d62e3e xbps-src: read specified config file in doinst-helper, if set. 2011-10-30 08:57:36 +01:00
Juan RP a8bd4ed7ad xbps-src: doinst-helper: remove redundant msgs. 2011-10-28 11:22:43 +02:00
Juan RP 90204b7b28 xbps-src: revamped build_style.
By default now it's assumed that if $build_style is not set, the template
uses 'custom-install' build, .e.g do_{build,configure,install}.

If it's set, a helper with the same name with .sh extension will be sourced
to set do_{build,configure,install} phases.

The exception is "meta-template" which currently it must be set via
build_style, probably will change in the future.
2011-10-24 14:12:09 +02:00
Juan RP aafb971991 xbps-src: code to handle new pycompile trigger. 2011-10-05 14:26:54 +02:00
Juan RP f3e5df1558 xbps-src: only touch status phase files on success, misc changes. 2011-07-22 10:13:23 +02:00
Juan RP 6bbfdac7c2 xbps-src: make run_func() print a msg on success. 2011-07-19 22:36:17 +02:00
Juan RP 288425875e xbps-src: minor cosmetic changes to doinst-helper. 2011-07-18 16:41:56 +02:00
Juan RP 07db31cb54 xbps-src: cleanup version/revision mess. 2011-07-18 16:25:18 +02:00
Juan RP 110aede193 xbps-src: multiple improvements for -B and run_func.
* run_func now errors out by itself if the function returned any error.
* if -B flag is enabled and binpkg already exists, skip updating local
  repo pkg-index.
2011-07-18 13:43:22 +02:00
Juan RP e22c565811 xbps-src: make -B flag build binpkgs for required pkg deps. 2011-07-18 11:36:48 +02:00
str1ngs e5acd8eb52 xbps-src: xbps-go checks for subpkg 2011-07-15 00:09:46 -07:00
Juan RP 00a7774f1a xbps-src: getdeps-helper: print "subpkg" if it's a subpkg. 2011-07-14 15:01:14 +02:00
Juan RP e78e0028ca xbps-src: rename libexec helpers, they were too long. 2011-07-14 13:24:00 +02:00
Juan RP 8e9b2bcf42 xbps-src: added new helper script to return dependency list. 2011-07-14 12:53:52 +02:00
Juan RP b6c21b960b xbps-src: new layout in masterdir to use a common directory from host.
XBPS_CACHEDIR has been replaced by XBPS_HOSTDIR in configuration file,
and this expects the following structure:

/host
  |_ /build (previously /pkg-builddir)
  |_ /binpkgs (previously /pkg-binpkgs)
  |_ /repocache (previously /cachedir)
  |_ /sources (previously /pkg-srcdistdir)

Thanks to str1ngs for the great idea!
2011-07-08 02:07:38 +02:00
Juan RP 1004b0cc61 xbps-src: added license to xbps-src-capchroot helper. 2011-07-06 17:07:31 +02:00
Juan RP b29e482767 xbps-src: improved xbps-src-chroot-capumount helper.
New security enhancements have been made and now you can only umount
a filesystem when the status file ".<mntpnt>_mount_bind_done" is
available in the specified masterdir.

The arguments have been changed and now it accepts two for
<masterdir> and <dir>.
2011-07-06 17:02:19 +02:00
Juan RP 88cd3ff7eb xbps-src: improved xbps-src-chroot-capmount helper.
The new code now has some security enhancements that only allows
to bind mount a filesystem when the user executing the process
owns the target directory and has read/write permissions on it.
2011-07-06 17:00:59 +02:00
Juan RP ef21557313 xbps-src: multiple improvements related to chroot code. 2011-07-06 14:20:27 +02:00
Juan RP fa1c9ab96f xbps-src: make -D install work with bootstrap subpkgs. 2011-07-06 08:42:02 +02:00
Juan RP 6b240bbf46 xbps-src: remove dirs for bind mounts on chroot exit. 2011-07-05 14:23:43 +02:00
Juan RP 4d086d2b1d xbps-src: do not fail if XBPS_CACHEDIR is unset. 2011-06-26 01:51:58 +02:00
Juan RP 8b40d5cd68 xbps-src: added suport for XBPS_CACHEDIR in configuration file.
XBPS_CACHEDIR will be bind mounted as read/write in target masterdir
into /cachedir. This directory must have read/write perms for the user
running xbps-src.
2011-06-26 01:45:12 +02:00
Juan RP 369cb372c0 xbps-src-chroot-helper.sh: remove leftover code. 2011-02-11 14:20:47 +01:00
Juan RP 3da3783333 xbps-src: improve msg_* funcs and update all callers. 2010-12-20 00:22:12 +01:00
Juan RP 08d47bc8b1 xbps-src: improve run_func and always make a log in $wrksrc.
Also when or after the pkg is installed to destdir/stowned, and there was
any error, always remove the files that were installed into destdir.

With these changes there's no need to return any value in the do_foo()
functions because they are caught automatically. Also any function is now
logged into its own file to always log what happens.
2010-12-18 22:38:21 +01:00
Juan RP 4b71f4195b xbps-src-doinst-helper: if 'make install' fails print the log file and inform the user. 2010-12-11 00:48:32 +01:00
Juan RP 43ecc9f661 xbps-src-chroot-capumount: fix error message. 2010-12-11 00:47:39 +01:00
Juan RP c34e13336b xbps-src: multiple changes to improve infrastructure.
- Remove buildvars_funcs.sh, its code has been moved into set_tmpl_common_vars().
- Move stripping code into its own file, and don't run it via fakeroot.
- Remove unnecesary reset_tmpl_vars() call in install_pkg().
- Misc changes.
2010-05-26 15:41:26 +02:00
Juan RP c785787fdd xbps-src: added 'clean' target to remove pkg build directory. 2010-05-20 04:05:35 +02:00
Juan RP ab3193c208 xbps-src: do not umount if <masterdir>/.xbps_chroot_working is there. 2010-05-15 17:28:18 +02:00
Juan RP fecc9617dd Pass XBPS_MASTERDIR to the xbps-src signal handler. 2010-05-14 15:25:07 +02:00
Juan RP fe36d782ca xbps_chroot_handler: do not umount, leave this to the signal handler of xbps-src. 2010-05-14 15:17:58 +02:00
Juan RP a599311f15 xbps-src: always try to unmount via xbps-src-chroot-helper before exiting. 2010-05-14 14:48:55 +02:00
Juan RP ceefb18bff xbps-src: multiple improvements to messages and phases.
- Prefix all messages with 'Package 'pkgname (version)': ..." to really
  understand what's going on. Add more messages in some stages...
- Do not run pre/post_{configure,build,install} or do_{build,install} stages
  if they were executed successfully in the past.
2010-05-14 00:07:47 +02:00
Juan RP e675201990 Improve how build deps are processed, return on errors immediately. 2010-05-12 17:23:35 +02:00
Juan RP 2850e6ed79 xbps-src-doinst-helper is run via fakeroot so set build vars before and after! 2010-05-10 11:17:58 +02:00
Juan RP 823f820827 xbps-src-doinst-helper: unset build vars later. 2010-05-10 11:08:34 +02:00
Juan RP 81d6978f02 xbps-src: propagate error returned by xbps-src in the chroot.
Rather than pointing the user to cat the .log file, just cat it before exiting.
2010-05-09 19:46:28 +02:00
Juan RP 97811e8af0 Workaround Arch Linux path for libfakeroot, tested and reported by pancake. 2010-05-07 13:45:26 +02:00
Juan RP 22774084ab xbps-src: always create logs for configure/build/install stages in $wrksrc.
Fixed -C and install-destdir in the chroot, $# wasn't consistent :-)
2010-05-07 12:25:24 +02:00
Juan RP 6baa28a6e3 Redirect stderr to a file in ${wrksrc} for run_func().
So that you can use 'set -x' in a template and see the output.

--HG--
extra : convert_revision : 7b3225b2ed3f1fab410c43af12f5d5f66f8504d7
2010-04-29 16:04:09 +02:00
Juan RP 522437b90f Multiple improvements for XBPS_PREFER_BINPKG_DEPS.
- Added a new var XBPS_REPO_LIST for the conf file, to specify
  a list of remote repositories to be used in a masterdir.
- Install all required binpkgs in one pass, if that fails install
  one of them at every pass.
- Fixed xbps-src-chroot-helper to properly catch SIG{INT,QUIT}
  when -m is specified.
- Misc cosmetics improvements.

--HG--
extra : convert_revision : 0ad7d559477ccc1fc04ab09deb791343ee453de6
2010-04-27 23:09:08 +02:00
Juan RP da63915397 Fix 'xbps-src -m' to mount stuff in the correct place.
--HG--
extra : convert_revision : 930efb41ec285f2b65310629fe758397c178d681
2010-04-27 21:52:36 +02:00
Juan RP cb582f7373 xbps-src: add -m flag and make-repoidx target.
* -m flag to specify a custom XBPS_MASTERDIR, overwritting the value
  from xbps-src.conf.
* make-repoidx target to create a package index plist file for
  the local repository associated with a masterdir, or one specified
  by the -p flag.

--HG--
extra : convert_revision : dbd502b532fd49cd17a79a187488a1e92f361ee0
2010-04-27 01:34:19 +02:00