Commit Graph

99 Commits

Author SHA1 Message Date
Jan Steffens 174ff59dba Add flock-based locking to chroots
This prevents accidents when chroots are shared between multiple users.
2011-03-22 19:47:32 +01:00
Jan Steffens 36dc5d8792 Stop the PACKAGER= and MAKEFLAGS= from piling on
Repeatedly reusing the same chroot kept adding lines to makepkg.conf.
2011-03-18 12:04:26 +01:00
Lukas Fleischer 2ff5c45d14 makechrootpkg: Copy package logs with split packages (fixes FS#23239).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-18 11:28:45 +01:00
Jan Steffens f72297a639 Use readlink -e to canonicalize chrootdir 2011-03-14 02:31:26 +01:00
Pierre Schmitz 397f4cb04b makechrootpkg: The user nobody is only needed to run pacman 2010-12-09 12:51:47 +01:00
Allan McRae f98eaebd1b Do not clean build directory on successful build
It is often useful to go back through build logs after building a
package and it is removed at the start of the next run anyway.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-12-09 10:35:13 +01:00
Andrea Scarpino 32b55d1587 install option (-I) does not require a directory containing a PKGBUILD
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-10-17 12:57:57 +02:00
Pierre Schmitz ae5083fc11 source PKGBUILD before evaluating install and changelog files
This makes it possible to use e.g. install=$pkgname.install
2010-08-20 11:55:33 +02:00
Pierre Schmitz 6f4e865ff9 makechrootpkg: read packager and makeflags from makepkg.conf
also set some sane default options
2010-08-18 21:43:27 +02:00
Pierre Schmitz e656ec7052 Check if ~/.makepkg.conf exists
Fixes FS#20041
2010-07-01 16:51:43 +02:00
Pierre Schmitz 88764c0298 local can only be used within functions 2010-06-28 10:26:38 +02:00
Pierre Schmitz 0564514df4 remove useless sourcing of PKGBUILD 2010-06-28 09:50:08 +02:00
Pierre Schmitz edb24eb1a0 Simplify detection of changelog and install files
Thise code was copied from makepkg
2010-06-28 09:48:21 +02:00
Andrea Scarpino a2132bc899 read {SRC, PKG}DEST from user makepkg.conf
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-06-28 09:35:20 +02:00
Eric Bélanger 964c0d1640 Fixed changelog support to work with makepkg 3.4
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-06-28 08:07:41 +02:00
Pierre Schmitz 85251a1d7b removed mode lines; was not a good idea after all 2010-06-24 10:01:20 +02:00
Pierre Schmitz d4f00819ac copy namcap.log to working dir 2010-05-02 15:42:29 +02:00
Pierre Schmitz 4a4455c086 Set target CARCH before sourcing the PKGBUILD
CARCH might be used within the PKGBUILD to select correct sources
2010-05-02 15:23:54 +02:00
Pierre Schmitz 52e140f2fe exit 1 on build failure 2010-05-02 15:16:53 +02:00
Pierre Schmitz 17e875f6b3 makechrootpkg: Keep source files even if build fails
implementes FS#18437
2010-03-03 21:49:22 +01:00
Pierre Schmitz f72775feac PKGEXT was not defined in the context 2010-03-03 21:38:59 +01:00
Pierre Schmitz 362a99b995 apply common coding style 2010-02-13 19:47:16 +01:00
Pierre Schmitz 70d7baee68 set umask to 0022
this fixes commit 7ce9cd6965
2010-02-13 07:22:54 +01:00
Pierre Schmitz 59b7a739e8 inform the user of activities that might take a longer time 2010-02-13 04:03:10 +01:00
Pierre Schmitz f76261f073 don't cross filesystems. usefull if you bind a local mirror into your working copy 2010-02-11 23:27:30 +01:00
Pierre Schmitz 3e3b32641d Reduce verbosity to a sane minimum 2010-02-11 12:49:28 +01:00
Pierre Schmitz f8ab1fb7a7 Create a working copy instead of using an union layer
Use rsync to create a (clean) working copy of the root dir instead of using aufs.
2010-02-11 10:26:45 +01:00
Pierre Schmitz 4ea489ad85 Move build and package logs to WORKDIR, otherwise it is lost 2010-02-11 09:14:56 +01:00
Nezmer a1ede4dd4b devtools: make sure all files are owned by nobody before building
In makechrootpkg, build dirs are chowned to nobody before we move files
to "$uniondir/build". This could lead to failure If the files are
supposed to be dynamically upgraded when we run makepkg.

A common use-case is when we upgrade $pkgver in git,svn PKGBUILDS.

Signed-off-by: Nezmer <Nezmer@allurelinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2010-01-11 13:38:50 -08:00
Byron Clark 7ce9cd6965 Reset umask before touching the chroot.
This prevents problems when running with a umask that masks permissions
for others.

Signed-off-by: Byron Clark <byron@theclarkfamily.name>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2010-01-11 10:25:43 -08:00
Aaron Griffin a7d88845a8 Remove sourcing of makepkg.conf files
This is replaced by commit marked "Use the host's SRCDEST and PKGDEST if
defined"

Noticed-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-12-18 09:01:44 -08:00
Eric Bélanger ea4b0d0a67 makechrootpkg: Replaced DB_COMPRESSION with 'gz'
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
2009-12-16 12:49:25 -08:00
Aaron Griffin 0c17e0d9fc Use the host's SRCDEST and PKGDEST if defined
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Original-by: Eric Bélanger <snowmaniscool@gmail.com>
2009-12-16 10:54:59 -08:00
Ronald van Haren 6922cc39f0 Move the determination of unique .install files
Move this inside the split packages loop

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-10-28 11:59:48 -07:00
Andrea Scarpino fd82cb3eb7 makechrootpkg: Ensure SRC/PKGDEST are directories
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-10-06 09:22:49 -07:00
Eric Bélanger eebe3a49b7 makechrootpkg: Fixed add_to_db option check
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-18 15:02:41 -07:00
Aaron Griffin 06b02906b8 makechrootpkg: fixed copying of split packages
This patch fixed copying of packages with splitting (FS#16181)
It also adds missing quotes around chrootdir variable.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-18 14:54:50 -07:00
Aaron Griffin 71a6d2c895 Attempted fix for SRCDEST/PKGDEST parsing
- Do *not* overwrite the makepkg.conf in the chroot
- Source global makepkg configs for SRCDEST and PKGDEST

Original commit 4bc819a20e
by Evangelos Foutras <foutrelis@gmail.com>

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-18 14:04:02 -07:00
Aaron Griffin 3b383b50fc Remove some extra cleanup umounts
Leftovers from when we used to bind-mount PKGDEST and SRCDEST

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-18 13:30:36 -07:00
Aaron Griffin 92a83232e3 Revert "Don't copy makepkg.conf into the chroot"
This reverts commit 4bc819a20e.

Temporary revert until we get this sorted out

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-18 11:56:48 -07:00
Francois Charette 40251235a8 Fix indentation
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-09-18 11:55:34 -07:00
Allan McRae f9aa28f895 makechrootpkg: fixed copying of .install files to chroot for split packages
Patch-by: Eric Bélanger <eric@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2009-09-01 22:27:19 +10:00
Evangelos Foutras 4bc819a20e Don't copy makepkg.conf into the chroot
Replacing the chroot's makepkg.conf with our own prevents us
from building i686 packages in a i686 chroot on a x86_64 host.

[Aaron: Plus additional whitespace edits]

Signed-off-by: Evangelos Foutras <foutrelis@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-18 16:25:00 -07:00
Eric Bélanger b7c19c56b8 makechrootpkg: Remove some extra packages
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-18 15:48:51 -07:00
Aaron Griffin 7fa8af659c Replace '>/dev/null 2>&1' with '&>/dev/null'
Original-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-12 13:51:12 -07:00
Eric Bélanger 032febfac4 Fix namcap errors and add PKGBUILD
[Aaron: swapped 2>&1 >/dev/null to >/dev/null 2>&1 to fix this better]
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-12 13:48:34 -07:00
Eric Bélanger b5955a0d59 makechrootpkg: Support for split packages
Move all built packages in the PKGDEST or WORKDIR (pkgname is now
an array).

Additional fixes for * inside quotes

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-12 13:45:58 -07:00
Biru Ionut 7c97db47cb fix copy the install files on split packages.
Signed-off-by: Biru Ionut <ionut@archlinux.ro>
[Aaron: Changed backtick syntax and added some quoting]
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-06 14:56:44 -07:00
Biru Ionut 04e79e71fd makechrootpkg: namcap path fix
Run namcap on the full path including /pkgdest/

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-30 11:38:38 -07:00
Aaron Griffin e03dfc4665 Cause chroot buildscript to exit with error
If a build fails, exit the script with an error.
This also prevents namcap from being called if there
is no build package

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-12 07:53:32 -07:00