Commit graph

49 commits

Author SHA1 Message Date
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
Juan RP
e3dc3e3066 Added native utilities to mount/umount/chroot via capabilities(7).
Three new helpers will now be installed into ${libexecdir}:
 - xbps-src-capchroot needs to have set CAP_SYS_CHROOT ep.
 - xbps-src-chroot-cap{,u}mount: needs to have set CAP_SYS_ADMIN ep.

That means that libcap and setcap(8) are now required to install
xbps-src and use it as normal user.

--HG--
extra : convert_revision : 586d6526079e085f86bf3e393459d429f6f0ef99
2010-04-26 14:15:49 +02:00
Juan RP
6673252679 Infrastructure changes to simplify the conf file.
* Removed the following vars from the conf file: XBPS_BUILDDIR,
  XBPS_PACKAGESDIR and XBPS_SRCDISTDIR. They are always relative
  to XBPS_MASTERDIR and cannot be changed.
* Removed XBPS_INSTALLDIR, it was unused in the code.
* Prepend /tools/bin in PATH for the chroot.
* Don't register a repo in the chroot if the XBPS_PREFER_BINPKG_DEPS
  is not set.

--HG--
extra : convert_revision : 4df03ffa64f0bbf81cd1dd0baf38f1b7e4f47549
2010-04-26 02:51:48 +02:00
Juan RP
33770e8bbc When using run_func() we don't care about stderr output.
--HG--
extra : convert_revision : 618d1c2eda49e1c55abec28d36f3430f37b9b867
2010-04-22 06:50:11 +02:00
Juan RP
ec927329dc xbps-src-doinst-helper: find -empty not impl in busybox, use other way.
--HG--
extra : convert_revision : c9057a59ba09fbc62c44310a8e71ef59525df7cb
2010-04-15 01:23:25 +02:00
Juan RP
e57940985e Added support to build pkgs in the chroot as normal user via capchroot.
Please read the comment in xbps-src.conf to use it. Fully tested
and working nicely, probably some pkgs will need minimal changes.

--HG--
extra : convert_revision : 820ad6d48aa74cf5b6db1871adea750acccaa82f
2010-01-16 02:11:44 +01:00