Commit Graph

21 Commits

Author SHA1 Message Date
Travis Willard d853dee3ed Fix getopts bug and be more specific when moving package file.
My recent commit adding the -c option and renaming the old -c to -r accidentally left out the new '-r' option from the getopts call.  Additionally, add ${pkgrel} to the mv line after building to be more specific about that file to move.

Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-01-23 16:11:37 -06:00
Travis Willard 9e627e219e Copy makepkg.conf and ~/.makepkg.conf into chroot.
This change allows all packager-defined settings (such as PACKAGER or OPTIONS) to propogate into the chroot when building packages.

Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-01-23 16:11:37 -06:00
Travis Willard fc7f570aad Added support for makepkg's PKGDEST and SRCDEST params.
This ensures that sources and packages built inside makechrootpkg go where
the user expects them to, as defined in their /etc/makepkg.conf and
~/.makepkg.conf files.

Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-01-23 16:11:37 -06:00
Travis Willard 5eb176f471 Renamed -c option to -r (for "root") and added -c option (for clean).
The old -c option, which specified a 'chroot', has been renamed to -r, since
most other scripts use -r for a different root.  A new -c option is
introduced, which cleans all files from ${chrootdir}/rw before beginning,
thus ensuring a clean chroot.

Signed-off-by: Travis Willard <travis@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-01-23 16:11:37 -06:00
Dan McGee f05495dfc8 Whitespace fixes/cleanup to all of the scripts
Add the same vim modeline to all the files, as well as cleanup the newly
added scripts a bit. If you look at this diff with the -w option, you'll see
it really isn't all that significant.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-28 21:20:24 -06:00
Dan McGee 0986936143 Allow user to see invalid chrootpath in error message
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-28 13:06:51 -06:00
Dan McGee e23b176f3e Fix some bashisms (but change #! to /bin/bash)
We need to use bash due to the usage of arrays, but we might as well fix
some bashisms that were used in the scripts anyways.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-28 09:10:41 -06:00
Armin Luntzer f92e01ed28 makechrootpkg: clarify usage message
Signed-off-by: Jason Chu <jchu@xentac.net>
2007-11-27 16:45:28 -08:00
Armin Luntzer ceb84394f9 makechrootpkg: Check if build was successful. Copy package to cwd and cleanup $chrootdir/rw/build on success, keep directory contents on failure.
Signed-off-by: Jason Chu <jchu@xentac.net>
2007-11-27 16:45:28 -08:00
Dan McGee 84f29cd824 Clarify message when PKGBUILD does not exist and always have help available
makechrootpkg should check for a PKGBUILD and user credentials after the
option to print usage is granted.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-27 18:14:42 -06:00
Jason Chu e32a2bb70c Make sure that build is owned by nobody, so that it can write to the directory 2007-11-04 15:44:53 -08:00
Jason Chu 974d8d11a6 Pass $MAKEPKG_ARGS as separate parameters to makepkg instead of one big string 2007-11-04 15:05:07 -08:00
Jason Chu 64ff97a171 Call mkarchroot not ./mkarchroot so that we can use makechrootpkg from any directory 2007-11-04 15:04:36 -08:00
Jason Chu 39aad4fe59 Escape the uniondir directory reference when creating $uniondir/etc/sudoers and set it to the proper permissions (440) 2007-11-04 15:02:55 -08:00
Jason Chu 411c07f2fb Copy the install file into the build directory because we need that too 2007-11-04 15:02:03 -08:00
Jason Chu 1e1e1e481e Accept options to makepkg after a -- so that we can accept longopts for makepkg and even options that are used by makechrootpkg 2007-11-04 15:01:22 -08:00
Jason Chu bced48cecd Allow optional params to makechrootpkg (to actually accept extra makepkg args) 2007-11-04 14:56:43 -08:00
Jason Chu a104988329 Trap normal exit for makechrootpkg
Make sure we umount everything on a clean exit too

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-29 21:09:06 -05:00
Aaron Griffin 0b7d43615b Added GPL headers
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-21 21:08:55 -05:00
Aaron Griffin 34ee028d04 Allow us to properly drop permissions in the chroot via sudo
Use sudo to drop permissions and build as "nobody" in the chroot

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-07 12:31:22 -05:00
Aaron Griffin 656a54014b Initial checking of makechrootpkg
Mostly functional, missing true su capability....

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-03 23:24:29 -05:00