Commit graph

375 commits

Author SHA1 Message Date
Juan RP d22024261d xbps-src: make internal var UPPERCASE. 2011-07-03 02:57:32 +02:00
Juan RP 0c26524c28 xbps-src: improve even more install_pkg_from_repos(). 2011-07-03 01:27:55 +02:00
Juan RP 8bc23145c8 xbps-src: added -S flag to disable XBPS_PREFER_BINPKG_DEPS. 2011-07-02 22:56:26 +02:00
Juan RP c124ec1bef xbps-src: handle another ENOENT case from xbps-bin. 2011-07-02 22:53:03 +02:00
Juan RP 290703f4fb xbps-src: don't overwrite xbps-conf.plist in chroot if exists. 2011-07-02 21:59:06 +02:00
Juan RP f5f89bc6ff xbps-src: check that doesn't exist before mkdir. 2011-07-02 18:05:20 +02:00
Juan RP 3bb5c279df xbps-src: source install_files.sh for v funcs in templates. 2011-07-02 17:48:48 +02:00
Juan RP 7984b39928 xbps-src: fix fetch phase with depends, performance improvements.
- The fetch phase *must* run after installing pkg dependencies,
  otherwise it could fail if we need them for fetching.

- Performance improvements for xbps-src. Only source shutils files
  at the start, not every time we use a function.
2011-07-02 17:04:08 +02:00
Juan RP 6513a02ee0 xbps-src: improve vmove(). 2011-07-02 13:33:06 +02:00
Juan RP a26dd06538 xbps-src: make targetdir in vmove() optional. 2011-07-02 12:11:01 +02:00
Juan RP 6cb6110f4e xbps-src: improve vinstall(), add vmove() for subpkgs. 2011-07-02 11:33:59 +02:00
Juan RP 75d55258a5 xbps-src: added new funcs to install files into DESTDIR.
vcopy <files> <targetdir>
	Executes cp -a <files> ${DESTDIR}/<targetdir>

vinstall <file> <mode> <targetdir> <targetfile>
	4th argument is optional.
	Executed install -Dm<mode> <file> ${DESTDIR}/<targetdir>/<file>

vmkdir <dir> <mode>
	Executed install -dm<mode> ${DESTDIR}/<dir>
2011-07-02 10:49:22 +02:00
Juan RP 5d7873a5b2 xbps-src: massive rewrite of builddeps resolving code.
This speeds up the process of resolving builddeps with
XBPS_PREFER_BINPKG_DEPS enabled and disabled by ~15% aproximately.

This fixes also some bugs I've found while building a massive rebuild
of all packages with XBPS_PREFER_BINPKG_DEPS enabled.
2011-07-01 17:48:29 +02:00
Juan RP 6227b9f1f7 xbps-src: append /usr/local/{s,}bin to PATH in INSTALL/REMOVE scripts. 2011-07-01 16:15:59 +02:00
Juan RP ca8369eada xbps-src [chroot]: ignore busybox tar, xz, gzip and bunzip2 applets. 2011-07-01 01:43:19 +02:00
Juan RP 92740bd661 xbps-src [extract]: use decompress utils and pipe to tar(1). 2011-07-01 01:00:18 +02:00
Juan RP a48dc4c512 xbps-src [chroot]: try different shells for /bin/sh symlinks. 2011-07-01 00:29:11 +02:00
Juan RP 09370643f1 xbps-src: [install_pkg_from_repos] handle 2nd ENOENT. 2011-06-30 13:45:11 +02:00
Juan RP 9f2990bd31 xbps-src [chroot]: make sure that we sync with rootdir == /. 2011-06-30 12:33:53 +02:00
Juan RP 55ada9c447 xbps-src [install_pkg_from_repos]: if unset, create it. 2011-06-30 12:33:04 +02:00
Juan RP 87f2599c17 xbps-src: improve PREFER_BINPKG_DEPS, take 2.
When installing pkgdeps from repositories more errno values are handled
from xbps-bin, this help us to find why a package failed to install.

Also stdout/stderr output from xbps-bin is redirected to
$wrksrc/.xbps_install_dependency_$pkgdepname.log to see how it was
installed or why it failed to install.

Do autoremove packages in more places to be sure that if something went
wrong those packages are always removed.
2011-06-30 10:26:31 +02:00
Juan RP 5535e59afc xbps-src: only use /cachedir in chroot, if it was set in conffile. 2011-06-29 09:35:36 +02:00
Juan RP 8b6343a59a xbps-src: fix remove_pkg(), it's msg_warn(). 2011-06-29 08:24:32 +02:00
Juan RP a0ea610634 Revert "xbps-src: allow to use install-destdir for pkgs already installed."
This reverts commit 4478b5ead3.
2011-06-28 23:57:31 +02:00
Juan RP f9b1494648 xbps-src: ignore PREFER_BINPKG_DEPS for bootstrap pkgs. 2011-06-28 23:27:41 +02:00
Juan RP 5ecc88fcf8 xbps-src: make a warning if pkg is installed when removing. 2011-06-28 19:57:41 +02:00
Juan RP 4478b5ead3 xbps-src: allow to use install-destdir for pkgs already installed. 2011-06-28 19:37:41 +02:00
Juan RP a3ec116aeb xbps-src: [checkvers] improve output, show outdated pkgs in masterdir. 2011-06-28 19:34:18 +02:00
Juan RP b0cf505357 xbps-src: XBPS_CACHEDIR *must be* /cachedir in chroot, omg. 2011-06-28 17:27:01 +02:00
Juan RP daf986ed33 xbps-src: set XBPS_CACHEDIR in conf file for chroot ops. 2011-06-28 17:18:48 +02:00
str1ngs 5280ebf018 xbps-src: wrap filesum output 2011-06-26 13:38:17 -07: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 6166c5ebc6 xbps-src: revert 8271950e94.
This broke info files dir handling because empty dirs are removed
*after* metadata code is executed. So back to previous and known way.
2011-06-25 18:36:10 +02:00
Juan RP 09c08fe732 xbps-src: simplify a bit resolving deps with binpkgs code. 2011-06-25 17:41:52 +02:00
Juan RP 5d2006f290 xbps-src: really sync remote repo's index for xbps>=0.9.0 in chroot. 2011-06-25 17:25:27 +02:00
Juan RP 5efd8cdd4d xbps-src: if checksum fails, print out its hash too. 2011-06-24 23:22:59 +02:00
Juan RP 517f1cfd06 xbps-src: added support for PREFER_BINPKG_DEPS with xbps >= 0.9.0. 2011-06-24 22:00:47 +02:00
Juan RP 8271950e94 xbps-src: when compressing info files, check if /usr/share/info exists. 2011-06-24 21:39:12 +02:00
Juan RP aea5cc99ed xbps-base-chroot: renamed to base-chroot. 2011-06-23 03:21:50 +02:00
Juan RP 8419094808 xbps-src: really fix previous. 2011-06-22 21:06:14 +02:00
Juan RP 46fee555ec xbps-src: fix bad quoting when installing from binpkgs. 2011-06-22 20:55:06 +02:00
Juan RP b41a474199 xbps-src: install_pkg_with_binpkg(): fix bad quoting. 2011-06-22 13:32:45 +02:00
Juan RP 9163a2e18f xbps-src: xbps-bin autoremove must be executed via fakeroot. 2011-06-22 13:22:46 +02:00
Juan RP a461919eea xbps-src: improve XBPS_PREFER_BINPKG_DEPS code. 2011-06-22 12:33:18 +02:00
Juan RP bcbfb0c63c xbps-src: install_dependencies_pkg(): use install_pkg_with_binpkg(). 2011-06-22 12:32:16 +02:00
Juan RP 47e5390ea6 xbps-src: install_pkg_with_binpkg(): minor cosmetics. 2011-06-22 12:29:56 +02:00
Juan RP 8a49fffda2 xbps-src: redirect msg_{error,warn}* output to stderr. 2011-06-21 15:40:28 +02:00
Juan RP 505ed23e8e xbps-src: don't fully error out if pkgdestdir not found while removing.
We do the 'xbps-bin remove' way as last resort, and return early in that
case.
2011-06-21 15:19:34 +02:00
Juan RP 279bda852a xbps-src: only autoremove pkgs if not installing builddeps. 2011-06-21 15:19:01 +02:00
Juan RP 6f5d00003c xbps-src: fail when a binpkg builddep cannot be installed. 2011-06-20 19:08:47 +02:00
Juan RP 66c3ae82d3 xbps-src: autoremove pkgdeps if XBPS_PREFER_BINPKG_DEPS is set. 2011-06-20 18:45:29 +02:00
Juan RP cd099f626e xbps-src: copy pkg metadata files into XBPS_PKGMETADIR. 2011-06-20 18:33:30 +02:00
Juan RP 24617c38ee xbps-src: do some checks in the chroot for /run related stuff. 2011-06-20 18:32:43 +02:00
Juan RP d2ad1c2b12 xbps-src: if XBPS_PREFER_BINPKG_DEPS is set install deps as automatic. 2011-06-20 18:31:50 +02:00
Juan RP 831abd5514 xbps-src: fully remove check for xbps version check. 2011-06-20 10:58:33 +02:00
strings 3895a1405b new synergy package
remove xbps-bin ABI check
2011-06-19 15:33:05 +00:00
Juan RP c912ce0eef xbps-src: remove a pkg thru the chroot handler to fix some bugs in pre/post_remove funcs. 2011-06-16 12:21:12 +02:00
Juan RP 205d066e7c xbps-src: another way to get the target of symlinks. 2011-06-14 15:26:15 +02:00
Juan RP 670dc453e2 xbps-src: (metadata.sh): if readlink -f returns nothing try without -f. 2011-06-04 20:37:55 +02:00
Juan RP f190895d30 xbps-src::info_tmpl(): also print $homepage and $license. 2011-06-02 09:01:11 +02:00
Juan RP 1bcd94905c xbps-src: update pkg metadata files.plist "links" array with a new object "target".
The "target" object should point to the target file for the symlink. Will be
used by an upcoming xbps utils version.
2011-05-31 16:39:02 +02:00
Juan RP 6ed4e562cc xbps-src: add three new metadata objects in binary pkgs.
homepage (string): package upstream URL.
license (string): package licenses.
build_date (string): package build date in UTC.
2011-05-26 10:40:31 +02:00
Juan RP 80f784e0eb shutils/chroot.sh: update ld.so(8) before entering the chroot. 2011-05-26 10:14:39 +02:00
Juan RP 5567ff7066 shutils/chroot.sh: only cleanup /tmp files if /xbps hasn't been mounted. 2011-05-02 21:35:41 +02:00
Juan RP e0611f10ab shutils/chroot.sh: create /tmp dir if doesn't exist in masterdir. 2011-04-29 22:40:32 +02:00
Juan RP 15bc8e1eee xbps-src: remove pre/post and install status file when removing a pkg. 2011-04-12 10:03:24 +02:00
Juan RP f84a10dfae shutils/chroot.sh: fix a msg when the chroot has not been prepared yet. 2011-02-26 17:56:23 +01:00
Juan RP 0dd337ee91 xbps-src:chroot.sh: update for busybox rename. 2011-02-11 16:29:02 +01:00
Juan RP 85543cd319 xbps-src: only umount bind mounts in the chroot shell fragment. 2011-02-11 14:19:34 +01:00
Juan RP 5e9f331526 xbps-src: added "provides" var for use in templates.
This will add support for virtual packages in XBPS; will be implemented
in the following days.
2011-01-26 13:37:37 +01:00
Juan RP 2a31f296ac xbps-src: improve the 'info' target. 2011-01-11 17:01:23 +01:00
Juan RP 0474b11e7b xbps-src: respect CFLAGS if $build_style == custom-install. 2011-01-11 16:21:08 +01:00
Juan RP e6abf71b04 xbps-src: disable -Wl,--as-needed if $broken_as_needed is set. 2011-01-10 12:02:08 +01:00
Juan RP f832dd42a8 xbps-src: be more conservative with signal handlers. 2010-12-28 22:55:17 +01:00
Juan RP 2168077d11 xbps-src: added new var 'system_groups' for pkgs requiring new system groups. 2010-12-28 11:23:33 +01:00
Juan RP 81cad50a1e xbps-src: do not return error if $wrksrc doesn't exist in the 'clean' target. 2010-12-23 20:39:54 +01:00
Juan RP c7aac27ded xbps-src: do a fake extraction if $distfiles not set too, as before. 2010-12-23 17:59:19 +01:00
Juan RP ae3c15cb59 xbps-src: added a new var for templates "dkms_modules".
It will be used by packages that will install DKMS modules.
2010-12-23 14:29:38 +01:00
Juan RP 6183d49629 xbps-src: remove_pkg(): remove subpkg stat files in $wrksrc if found. 2010-12-23 13:14:18 +01:00
Juan RP f9135c92c8 xbps-src: if $noextract is set, also try to run the "do_extract" function if available. 2010-12-23 02:13:40 +01:00
Juan RP 543fe35787 xbps-src: improve some messages in fetch phase. 2010-12-20 07:06:48 +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 82d298b6ca xbps-src: clean up /tmp when entering to the chroot. 2010-12-18 14:33:30 +01:00
Juan RP 4f2edb4c45 xbps-src: verify_rundeps: if package has missing deps, return error. 2010-12-16 22:42:54 +01:00
Juan RP 1c8e866f9d xbps-src: quote properly some vars in the strip/verifyrdeps code. 2010-12-14 18:16:53 +01:00
Juan RP f2bd4e603b xbps-src: handle files with spaces and other characters. 2010-12-14 16:34:05 +01:00
Juan RP ef9cfa20bf strip_files: skip this pass completely if $noarch is set. 2010-12-11 01:53:14 +01:00
Juan RP eaf3247352 builddep_funcs: if there are no build deps, do not print a wrong message. 2010-12-11 01:46:55 +01:00
Juan RP 38a0a4eb53 xbps-src: add openrc_services trigger before system_users.
Packages that use both will try to remove the system user when the openrc services
are launched, so they report "user still logged in" errors.

While being here remove unnecessary empty lines in the generated scripts.
2010-12-07 17:51:17 +01:00
Juan RP af284b261b xbps-src: do not hardcode unzip/xz path for extracting, assume it's in PATH. 2010-11-17 02:46:08 +01:00
Juan RP 7f522a8cf4 xbps-src: remove the triggers, they will be handled by the xbps-triggers pkg. 2010-11-04 13:52:10 +01:00
Juan RP 722db61ea2 xbps-src: improve how patches can be applied.
1) $patch_args can be used if all patches need special args other than "-Np0"
   (set by default).
2) If the $PATCHESDIR/series file exist, it will specify how the patches
   will be applied, in that order.
2010-11-03 15:56:37 +01:00
Juan RP f85dba88f3 xbps-src::tmpl_funcs: add two comments for BUILD_32BIT. 2010-10-31 01:40:23 +02:00
Juan RP 71e5c38598 xbps-src: added XBPS_LDFLAGS into the configuration file.
This is to specify common LDFLAGS settings for all packages, by default
it's set to '-Wl,--as-needed' to avoid linking extra libraries into
the binaries. This helped to find such cases.
2010-10-29 10:23:25 +02:00
Juan RP e92e7e69fe xbps-src: don't ignore pkgs that use $nostrip for verify rundeps code. 2010-10-28 04:22:00 +02:00
Juan RP 0432cc3785 xbps-src: remove dup strip_files() in pkgtarget_funcs.sh. 2010-05-26 15:47:59 +02: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 f6b57540bd xbps-src: fucking (un)set_build_vars() crap! 2010-05-21 01:06:22 +02:00
Juan RP 9408af3761 xbps-src: make BUILD_32BIT work for packages using C++. 2010-05-21 00:30:27 +02:00
Juan RP 127a8e42f7 xbps-src: make it possible to build bootstrap packages on x86_64 for 32bit,
by setting the envvar BUILD_32BIT.

So now you can build bootstrap pkgs for i686 on x86_64 like this:

1) install gcc-multilib and ncurses32.
2) env BUILD_32BIT=yes linux32 xbps-src bootstrap
2010-05-20 22:20:52 +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 f00c51a6a3 xbps-src: support -m with 'checkvers' target. 2010-05-19 03:04:42 +02:00
Juan RP b9d0db9470 xbps-src: added new 'checkvers' target to check for new versions from srcpkgs
against current installed packages.
2010-05-19 03:00:52 +02:00
Juan RP 66321f05e6 xbps-src: fix an error in the unstow case. 2010-05-17 22:21:19 +02:00
Juan RP 9e285b9608 xbps-src: improve multiple mount/umount chroot handling. 2010-05-17 12:09:44 +02:00
Juan RP a0432bffa5 xbps-src: do not set CFLAGS/CXXFLAGS multiple times via build_vars. 2010-05-15 18:20:56 +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 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 561783f002 fetch_funcs: print a message if using $nofetch. 2010-05-14 02:27:38 +02:00
Juan RP 816b0945a8 chroot.sh: mention that xbps-src.conf in the chroot is autogenerated. 2010-05-14 01:12:53 +02:00
Juan RP 148f1d5db5 xbps-src: reinstall xbps-src any time we are entering into the chroot. 2010-05-14 00:16:37 +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 85f018289f builddep_funcs: add extra space to the deps message. 2010-05-13 22:22:05 +02:00
Juan RP d1791dad60 make-binpkg: pass correct vars as arguments to the signal handler. 2010-05-13 21:21:36 +02:00
Juan RP a4468b1fe8 pkgtarget_funcs: print a msg while installing the origin pkg. 2010-05-13 17:42:39 +02:00
Juan RP fdd96d947b buildvars: also (un)set CPPFLAGS and LDFLAGS in the chroot. 2010-05-13 17:42:07 +02:00
Juan RP 65619596d0 stow_funcs: check for file and links before dirs while stowning in the chroot. 2010-05-13 15:28:17 +02:00
Juan RP 8f5898fa63 build_funcs: unset_build_vars before returning. 2010-05-13 15:27:41 +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 c57efc958f install_pkg(): remove another return value test. 2010-05-12 02:16:31 +02:00
Juan RP a785022b62 reset_tmpl_vars: add do_{build,install}. 2010-05-12 01:51:53 +02:00
Juan RP 8d383c1c83 builddep_funcs: skip some return values from install_pkg(). 2010-05-11 23:39:37 +02:00
Juan RP 622c398a66 build_vars: (un)set PKG_CONFIG also in the chroot. 2010-05-11 22:15:33 +02:00
Juan RP d3047787ba configure_funcs: unset build vars before return. 2010-05-11 22:10:51 +02:00
Juan RP f964d9b8fb install_dependencies_pkg(): install_pkg_deps() might return non 0, don't treat this as fatal. 2010-05-11 21:30:01 +02:00
Juan RP 84a4e9e377 {un,-}set_build_vars(): set PKG_CONFIG_LIBDIR. 2010-05-11 15:46:34 +02:00
Juan RP caf9d4ac62 install_pkg_deps() may return 1 sometimes, do not treat it as fatal error. 2010-05-10 12:18:41 +02:00
Juan RP 2ee55de018 Finally fix fakeroot on Arch linux, return on errors while processing deps. 2010-05-10 12:09:06 +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 d4441c94d3 set_build_vars(): use different var for LD_LIBRARY_PATH. 2010-05-10 10:41:36 +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 f6a0806229 xbps-src: piping with tee(1) and groupping command is not possible sometimes... 2010-05-08 09:46:23 +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 9615930eb4 init_funcs.sh::set_defvars() bailout if required dirs cannot be found. 2010-05-06 22:01:36 +02:00
Juan RP 71aa49c397 buildvars_func.sh::set_build_vars() append to LD_LIBRARY_PATH no overwrite. 2010-05-06 22:00:43 +02:00
Juan RP 481e74178e xbps-src: do not append $PATH to $PATH on every prepare_tmpl() call!
--HG--
rename : xbps-src/shutils/tmpl_funcs.sh => xbps-src/shutils/tmpl_funcs.sh.in
2010-05-06 01:21:27 +02:00
Juan RP b382fb9c94 shutils/tmpl_funcs: do not overwrite $PATH. 2010-05-04 23:49:09 +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 6d01070826 The 'essential' object metadata was removed long ago, fully remove it.
--HG--
extra : convert_revision : d110ecf59b07e84c6930d1212702b67cc4a4112b
2010-04-29 05:20:36 +02:00
Juan RP ff412882de Improve messages while entering into the chroot.
--HG--
extra : convert_revision : 13354e2dc1a3c13071a9b662f74609ca79a4dd78
2010-04-27 23:22:48 +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 7d9172b9ea Set $XBPS_FETCH_DONE after extracting not fetching.
--HG--
extra : convert_revision : fd65f2da02fd6da2c8a9f169f777d7511888704c
2010-04-24 12:52:29 +02:00
Juan RP 4240afc516 Only check distfiles once, not every time.
--HG--
extra : convert_revision : 6e3a5e715aea21956395018360cae66b8f211d67
2010-04-23 18:45:47 +02:00
Juan RP 0d68a49660 Multiple changes in the infrastructure for improving the (un)stow stuff.
- Added pre_remove/post_remove/post_stow support for templates.

- When stowning pkgs, symlink all files into the chroot. This only works
  for packages that need to be built on it, also templates that set
  stow_copy will copy its files, or selectively via stow_copy_files.

--HG--
extra : convert_revision : 51f47120a5478ceb1319bde01c3ab999f637b359
2010-04-23 15:25:03 +02:00
Juan RP 3fa8a3a284 install_pkg(): exit immediately on errors.
--HG--
extra : convert_revision : ac0332748a5390d3324329a2aa5630ef35e0bf7d
2010-04-22 13:40:53 +02:00
Juan RP 1874cbadda shutils/metadata: return if required stuff fails.
--HG--
extra : convert_revision : c8225a2a9ace45bbc7eed5b309e26336ce94f9ae
2010-04-22 12:06:16 +02:00
Juan RP 70f7b0aaf4 shutils/stow_funcs: use rm -f.
--HG--
extra : convert_revision : d669d311bd19ba41fd6244a62e3430a2c4f71947
2010-04-22 09:02:49 +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 8536af44ef run_func: use simply 'type foo', -t is a bash extension.
--HG--
extra : convert_revision : 8a94c0a961f4819bfada61823158c81965d31908
2010-04-21 16:48:58 +02:00
Juan RP b0c64c181b shutils/metadata.sh: use find(1) -follow.
--HG--
extra : convert_revision : 1815c225aab07ca970d14f1340439d67fee2d88a
2010-04-21 15:29:23 +02:00
Juan RP 5d9675e435 shutils/metadata.sh: use find and readlink rather than find -L.
--HG--
extra : convert_revision : 489747f192448a175f24cee7762a51e2568a1b54
2010-04-21 11:54:14 +02:00
Juan RP c95a77a60c shutils/extract_func.sh: check that distfiles are there.
--HG--
extra : convert_revision : 210dd5e1204adcd5c1eee91af76000c1e08d5039
2010-04-18 18:50:43 +02:00
Juan RP 94c0200541 Reset some vars in subpkgs.
--HG--
extra : convert_revision : cfe73e71aa363f5d297660925cd7b29e731f4951
2010-04-12 19:07:24 +02:00
Juan RP ec0f955d70 Added gconf-schemas new trigger.
Two new vars can be used in templates to handle GConf schemas files,
gconf_entries and gconf_schemas.

--HG--
extra : convert_revision : 315756b79166538ef0efae5a70c7ec8d9f7f61d9
2010-04-11 12:50:35 +02:00
Juan RP 2f5d1187a3 shutils: prepare for upcoming "$conflicts" support.
--HG--
extra : convert_revision : 021b9ea71ef7dbd8bcdef844a9e1379613db88d3
2010-03-08 10:52:55 +01:00
Juan RP 73dab0587b verify_rundeps: handle same shlib provided by multiple pkgs.
--HG--
extra : convert_revision : 5d021d453acd0fdf440cbafbec89613340e9e349
2010-03-08 10:47:25 +01:00
Juan RP a4070a27a9 Add "$noverifyrdeps" to disable verifyrundeps code.
--HG--
extra : convert_revision : 07510b345b3831360d0ef7697be98103dc465181
2010-01-29 05:41:10 +01:00
Juan RP 9cd358be11 shutils: remove mktoolchain.sh, outdated and useless.
--HG--
extra : convert_revision : bc4cf29c4e8d76f80fba322e545eaa81b10a7062
2010-01-29 04:19:13 +01:00
Juan RP 259d7f0ce7 shutils/metadata.sh: if xbps-uhelper sanitize-plist fails, return error.
--HG--
extra : convert_revision : 949a19e83aff79731b2d315669114568fe4f81aa
2010-01-28 19:05:03 +01:00
Juan RP bc01681ea7 shutils/metadata.sh: replace '><' in maintainer obj with &[gl]t;
--HG--
extra : convert_revision : 6de3978f0cc7442bec1fc08523387884ae8809c9
2010-01-27 03:21:53 +01:00
Juan RP 0da86577ab Changed $replaces to accept pkg patterns, like Add_dependency().
Changed all packages using $replaces to the new format and bump
the revision. Require XBPS utils >= 20100121 for this to work.

--HG--
extra : convert_revision : 7593b3cb7465f7613f48aba0f2e86cdcd5430ac0
2010-01-21 03:33:26 +01:00
Juan RP 740ed4e896 shutils/metadata: fix incorrect syntax in subst $replaces values.
--HG--
extra : convert_revision : f57eaffc05e99b021aeb77c213b8ca13121b978e
2010-01-20 15:10:23 +01:00
Juan RP 9b4d6d474e shutils/metadata: fix creation of scripts due to false positive.
--HG--
extra : convert_revision : 6fecbcf1ae9f6addd319cece6bf8731e23efc196
2010-01-17 22:22:12 +01:00
Juan RP 8077fd7472 shutils: bump copyright year for touched files in 2010.
--HG--
extra : convert_revision : 967ce0c8f98299db161ccb746a9e633ca0457640
2010-01-17 08:50:36 +01:00
Juan RP 5f94abb06a shutils/buildvars_funcs: don't set useless vars in the chroot.
--HG--
extra : convert_revision : b75790e760fe12b2ac1d1f8dbc9c01aa3683e416
2010-01-17 08:47:14 +01:00
Juan RP eeeebb5915 shutils/metadata_scripts: do not create empty INSTALL/REMOVE scripts.
--HG--
extra : convert_revision : 149185cfd371a88802cc4e05c06fbe006b7cc006
2010-01-16 06:13:12 +01: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
Juan RP dec6b4651e shutils/build_funcs: "custom-install" pkgs can use do_build() func.
That means that you can now build "custom-install" build_style
packages in two stages, one for building and one for installation.

--HG--
extra : convert_revision : 4fd76075a1a0bd173854272437c6ca3b263a6f62
2010-01-16 00:04:40 +01:00
Juan RP ae9fe929a4 shutils/pkgtarget_funcs: don't exit if pkg is already installed.
--HG--
extra : convert_revision : 3f7a084f70f9cfb65e4db28f478b0a44b2083d2d
2010-01-15 00:15:39 +01:00
Juan RP 6f5aa28a94 shutils/builddep_funcs: install from source if binpkg failed.
--HG--
extra : convert_revision : 2d902d3ccaf92fdc42d3be0b789c16412da516f1
2010-01-15 00:14:29 +01:00
Juan RP 0cab41b261 shutils/chroot: sync groups list with shadow pkg.
--HG--
extra : convert_revision : 0fb123e3e4400ff278c26a98b657ff349cb0f93a
2010-01-14 18:52:14 +01:00
Juan RP 3cdafeb9ca Added initial support to install binpkgs to resolve builddeps.
if XBPS_PREFER_BINPKG_DEPS is set in xbps-src.conf, the local binpkg
repo in XBPS_PACKAGESDIR will be used to install binpkgs.

To use this feature you'll need xbps utils >= 20100114 from head.

--HG--
extra : convert_revision : 7317e0e2741997007e81ed478f819c36e4858e5d
2010-01-14 17:45:41 +01:00
Juan RP f29a2b53d4 shutils/metadata.sh: reset {sgml,xml}_{entries,catalogs} for subpkgs.
--HG--
extra : convert_revision : 491a636c86b6c5baa720f616e76a21e3a45f28a3
2010-01-14 16:24:40 +01:00
Juan RP 9d087a2119 configure_funcs.sh: skip python-module pkgs.
--HG--
extra : convert_revision : 7da164a93545c7f5dc8cc160a69e461cd70aae2f
2010-01-11 17:58:52 +01:00
Juan RP 0e5c0a0bbe xbps-src: added code to verify required pkg rundeps.
Every pkg containing shared libs must register them in
common/mapping_shlib_binpkg.txt, this is where the code looks
for transforming required libs to required binpkgs.

The code will also report if a required rundep is missing from
pkg run_depends array and will suggest to add some lines to
the package template.

--HG--
extra : convert_revision : 2d26d45b8e8f62218473abdbed7cc7aab7074e28
2010-01-10 17:09:23 +01:00
Juan RP cf604ea6ca common_funcs.sh: add msg_*_nochroot funcs.
--HG--
extra : convert_revision : cd4750816d89848c7496b564536a56a86f2ab978
2010-01-10 14:34:07 +01:00
Juan RP 667095b4ae xbps-src: remove XBPS_DESTDIR from conf file.
Rather than make it configurable, put this always under
XBPS_MASTERDIR/pkg-destdir, so you don't have to care about it anymore.

--HG--
extra : convert_revision : 34cc3102272bfcf95b2fc3a8961cb9cb2429ab91
2010-01-09 23:35:11 +01:00
Juan RP 3e8bd5917c xbps-src: remove non-working -u flag, make -C work in chroot.
--HG--
extra : convert_revision : a9fb1c09b4d29f35888abf9615c40d3cccbeb239
2010-01-09 15:49:36 +01:00
Juan RP c18153b92c Add $create_wrksrc for use in templates.
If set the specified wrksrc will be created and its distfiles will be
extracted into it.

--HG--
extra : convert_revision : c6b0ff2634a9f764d45fcdd97ecee5d32c8a7ace
2010-01-04 16:05:13 +01:00
Juan RP 1667c062b8 Fix conditionals for $build_wrksrc.
--HG--
extra : convert_revision : c85c8bed3cf76b909ae08b40bb73e9585e9656dc
2009-12-30 22:33:30 +01:00
Juan RP 9b74f9ebc8 Added new var "build_wrksrc" for use in templates.
This var sets a relative path to $wrksrc that is used to
configure/build/install a package.

--HG--
extra : convert_revision : 690f4d435f3d4e6a9228f7f5f09ecf8b490a273a
2009-12-30 22:16:33 +01:00
Juan RP 925e22e0f9 shutils/make-binpkg: reset noarch for subpkgs.
--HG--
extra : convert_revision : dec3deb9321b1689b79a6d9035f947cd15088ca5
2009-12-27 16:48:27 +01:00
Juan RP 1e8ba0a3ef shutils/chroot: copy host /etc/localtime if found.
--HG--
extra : convert_revision : d3961bbaa2b8fd51d59d5ccd4e2023b2cf31a60a
2009-12-24 01:10:08 +01:00
Juan RP 26c9441b87 extract_funcs: always extract all distfiles into builddir.
--HG--
extra : convert_revision : 0ba3269604f8d0059fda5a36c30eac2d7e17d6c3
2009-12-23 15:41:58 +01:00
Juan RP 465f9229c8 python-module: enable configure and build stages.
--HG--
extra : convert_revision : 0f12cbd184a51cae91f580be3e51c285e4de5c7a
2009-12-23 02:07:11 +01:00
Juan RP 5d95da2067 metadata.sh: fix scripts in subpkgs, add shadow rundep if $system_accounts set.
--HG--
extra : convert_revision : 80e31c482ea3fd6c3ed91a6758a09c54820efcd5
2009-12-19 04:58:25 +01:00
Juan RP a88cee9039 make-binpkg: also add symlinks to dirs!
--HG--
extra : convert_revision : 75d65479ff0f7c59b8dbfbe92ed158018458966b
2009-12-19 04:57:39 +01:00
Juan RP 780381e8ae extract_distfiles(): recognize .tar.xz distfiles, reorganize code.
--HG--
extra : convert_revision : 18cc1457f76ddbaadfec8557ab36bd2a67bcff03
2009-12-13 13:38:53 +01:00
Juan RP 4c2cc8b588 Add a trigger to (un)register system user/groups.
The following vars can be used for this:

- system_accounts="foo blah"
- foo_homedir, foo_shell, foo_descr, foo_groups.

--HG--
extra : convert_revision : bc7d002e00abc5c84f83a3716a8ecf97f9c9ff24
2009-12-11 12:03:21 +01:00
Juan RP 1a7a23a4cc extract_distfiles(): after extracting if $wrksrc doesn't exist, create
it.

--HG--
extra : convert_revision : b72bf0188c83e9a676448ba5da3ca1b25c4df493
2009-12-06 01:46:32 +01:00
Juan RP d27595922c Added a new "preserve" var for build templates.
When a package has this defined, its files won't be removed after
a removal or upgrade process. This should be used in a few cases,
mostly for the kernel pkg to always preserve a working kernel+modules.

--HG--
extra : convert_revision : 03b19d1df2b029b6671865072b4d9529b0b86aa4
2009-12-02 03:20:26 +01:00
Juan RP c077559a89 Improve build templates by not having to set ${triggers} in some cases.
There's no need to update triggers in the following cases:
 * Packages installing stuff into /usr/share/applications.
 * Packages setting $gtk_iconcache_dirs.
 * Packages setting $font_dirs.
 * Packages setting ${sgml,xml}_entries.

--HG--
extra : convert_revision : 11c74b41f8cf474e9bf4dbb961b1aa9c6f6540bf
2009-12-02 01:55:51 +01:00
Juan RP c6d8fa2eba reset_tmpl_vars: add missed font_dirs.
--HG--
extra : convert_revision : 25993a79cd7a0ed9d70bd094f707a193a3fbf0b8
2009-11-30 20:45:42 +01:00