Commit Graph

77 Commits

Author SHA1 Message Date
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
Pierre Schmitz 5dbb964d66 Use $PKGEXT defined in makepkg.conf
Also replace some uses of tar with bsdtar

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-05-13 09:41:44 -07:00
Aaron Griffin 2269e5c9c8 Replace unionfs with aufs
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-05-06 12:36:08 -07:00
Aaron Griffin fef3f4af90 Cleanup some of the DB addition code
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-05-06 12:36:08 -07:00
Aaron Griffin 70794e8dec makechrootpkg: remove 'local' keyword
Whoops. Not valid outside a function

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-03-09 12:27:55 -07:00
Aaron Griffin f7c44611fe makechrootpkg: remove (pkg|src)dest mount check
This is no longer needed as we don't mount-bind PKGDEST or SRCDEST

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-03-09 12:27:09 -07:00
Aaron Griffin b3b1cfba42 makechrootpkg: Don't fail if no chroot namcap
The call to namcap was causing the script to fail
if namcap didn't exist or returned 1. Fix that by
always returning 0...

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-03-09 12:24:43 -07:00
Aaron Griffin 486375ba0a makechrootpkg: Don't mount-bind srcdest/pkgdest
Do actual copying to and from PKGDEST and SRCDEST rather than
mounting via --bind, as the chown and other operations can cause
issues here

Original-work-by: Phil Dillon-Thiselton <dibblethewrecker@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-03-09 12:22:50 -07:00
Aaron Griffin bf48e3ad8f makechrootpkg: Check for files before copying
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-26 15:33:02 -08:00
Aaron Griffin 9ec1e72e65 makechrootpkg: Allow setting rw layer dir name
Make the name of the rw layer (default <chrootdir>/rw) configurable
with a command line switch.

Useful for maintaining multipl chroots on top of a clean base.

i.e.
<chrootdir>/root  #clean chroot
<chrootdir>/rw    #default RW layer
<chrootdir>/gnome #a RW layer with all of gnome installed
<chrootdir>/kde   #a RW layer with all of KDE installed

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-26 10:51:35 -08:00
Aaron Griffin 97f7e2f2c3 Check mkarchroot's return code
We weren't doing this before, and after build steps were
being run even if the build failed or if the user cancelled
the build

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-25 10:11:39 -08:00
Aaron Griffin f6f7a52f4b makechrootpkg: Use --noconfirm when updating
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-24 11:41:41 -08:00
Aaron Griffin ca99683972 makechrootpkg: Add -d to add to local repo
When a package build is complete, it is automatically
added to a local db in <chrootdir>/rw/repo/

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-24 11:41:21 -08:00
Aaron Griffin 1d1eef1959 makechrootpkg: Remove $CHROOT_SHELL env var
This was kinda useless and complicated. We'll just force
-r usage

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-24 10:01:20 -08:00
Aaron Griffin 623acfaa9e Change makechrootpkg -i arg to -I
This way we don't conflict with makepkg's -i, which
could be useful to us

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-23 15:04:24 -08:00
Aaron Griffin dd45bbcaf3 Add 'update first' flag and fix help
Add -u to update the chroot before building. This should update the
unionfs rw layer only, leaving the chroot clean. Useful for rebuilds
and a local repo.

Also fix the docs and document the -i flag

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-02-23 14:30:28 -08:00
Allan McRae c67729af98 makechrootpkg - understand makepkg source syntax
The source line in a PKGBUILD can have a structure like
source=(´filename::url´).

Signed-off-by: Allan McRae <allan@archlinux.org>
2009-01-31 20:28:32 +10:00
Aaron Griffin 4c56be5601 Allow makechrootpkg to install package files in the chroot
This is a very very hackish way to deal with rebuilds for
right now.

The intent is the following:
    First build foobar-1.2
    makechrootpkg -i foobar-1.2-1-i686.pkg.tar.gz
    Now build packages that depend on foobar-1.2

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-21 23:13:47 -05:00
Aaron Griffin 17ecb862f2 makechrootpkg: Always attempt to move pkg/src
Sometimes makepkg fails, but a package is built - for
instance, when makepkg cannot remove deps. In this case we
will attempt to move the pkg/src files regardless.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-21 22:56:58 -05:00
Travis Willard f71a0fabb7 Copy ChangeLog into chroot too.
Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-14 11:19:33 -05:00
Aaron Griffin 718a6d802d Temporary workaround for unionfs issues
The latest incarnations of unionfs have issues appending
text via shell redirection, so to work around it, we can
touch the file before-hand to move it to the RW portion
of the union.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-14 11:18:09 -05:00
Aaron Griffin e76a1b2def Set $HOME before dropping permissions
Because we need a root user to chroot, when we drop
permissions to 'nobody', we're still using HOME=/root

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-03-17 12:55:24 -05:00
Simo Leone e8490b3f14 Correcting an error in e0f139ad0e
If only you could have seen the facepalming going on...

Signed-off-by: Simo Leone <simo@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-07 23:42:32 -06:00