Commit Graph

787 Commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig) 0b2ae245f1 Update mtime of chroot when building
Makes the chroot mtime a useful indicator of last usage.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2014-05-10 08:01:41 +02:00
Joel Teichroeb fdd079f3d5 Remove broken unknown arguments check and fix usage
If getopts comes across an unknown argument, $arg it set to '?' and
$OPTARG is unset. Therefore the getopts line detecting unknown arguments
doesn't work. Arguments to pass to makepkg are already handled by
passing all the aguments after the end-of-options marker (--), but this
wasn't documented in the usage text.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2014-05-10 08:00:56 +02:00
Allan McRae 9f7ba3d407 Use -fstack-protector-strong
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2014-05-04 07:39:54 +02:00
Pierre Schmitz 40ea1b3ca5 Prepare release 2013-11-07 14:57:03 +01:00
Markus M. May fd1be1b27a FS#37656 - [devtools] add SRCPKGDEST to makechrootpkg
Signed-off-by: Markus M. May <mmay@javafreedom.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-07 14:56:11 +01:00
Jan Alexander Steffens (heftig) 8ce6e29add makechrootpkg: Don't copy the logpipe
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-07 14:54:53 +01:00
Dave Reisner 1e043445d2 find_cached_package: avoid adding duplicates
If PKGDEST is set when makepkg was run, the package will be present in
find_cached_package's search path by default, causing an error.

This also fixes a display bug which causes no output to be shown when
multiple packages are found.

Fixes FS#37626.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-04 10:02:20 +01:00
Pierre Schmitz 3029c8e4bc checkpkg: Fix usage of local mirrors 2013-11-01 21:13:43 +01:00
Pierre Schmitz b8dd44083a Prepare release 2013-11-01 20:35:52 +01:00
Maxime Gauduin 4b3a6c7803 Add support for building bzr packages
Fixes FS#36654: https://bugs.archlinux.org/task/36654.

Signed-off-by: Maxime Gauduin <alucryd@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01 20:30:52 +01:00
WorMzy Tykashi 59e348fc3c Add mountpoint check to btrfs subvol logic
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01 20:28:17 +01:00
Dave Reisner 27441f201c common: implement find_cached_package
This function (currently) searches through $PWD and $PKGDEST looking
for a tarball matching the requested package name, architecture, and
pkgver. If found, it writes the full path to the located package to
stdout and returns 0, else 1. If more than 1 match is found, it's
treated as an error and the user will need to figure out what to do.

Use this in checkpkg and commitpkg, which previously implemented their
own less complete logic, to locate the build artifacts they rely on.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01 18:52:03 +01:00
Dave Reisner c4f72f781b commitpkg: check all files at once for version control
Instead of dying at the first sight of an unversioned file, this lets
commitpkg dump all known unversioned files at once.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01 18:40:15 +01:00
Dave Reisner 9974309cee makechrootpkg: Look harder for -R argument
We shouldn't be in the business of reparsing makepkg's arguments, but
since we have to treat the case of repackaging separately, do a better
job of trying to find signs of it happening. This change lets you pass
the longopt, --repackage, or multiple shortopts such as -RA, and still
get the intended effect.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01 18:38:07 +01:00
Eric Bélanger e3cf64ad2f checkpkg: Only match .so at end of filenames for soname check
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01 18:35:54 +01:00
Eric Bélanger 7524bec6d9 checkpkg: Fix soname check
The bsdtar options were in the incorrect order and objdump couldn't find the files.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-10-27 15:57:16 +01:00
Eric Bélanger 70309118ab checkpkg: Create symlinks to old packages in $TEMPDIR instead of $PWD
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-10-27 15:54:41 +01:00
Pierre Schmitz 164f5b758d prepare release 2013-10-20 13:32:16 +02:00
Pierre Schmitz 1ae58aed5b Remove libtool files by default 2013-10-20 13:31:02 +02:00
Allan McRae 0d16a91350 Make !staticlibs the default in makepkg.conf
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-10-19 16:26:54 +02:00
Dave Reisner e77242c539 makechrootpkg: add generic support for additional bind mounts
Piggyback on systemd-nspawn's --bind and --bind-ro flags to allow
arbitrary mount points to be added to the build container.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-19 22:11:27 +02:00
Dave Reisner 9c85d116f0 checkpkg: avoid using PKGEXT to guess tarball name
We can't rely on PKGEXT since it's not sourced from a controlled
location. Case in point, if a user sets PKGEXT=.pkg.tar.gz, checkpkg
fails and offers no easy workaround.

Instead, use glob expansion to resolve the name of the tarball, bailing
if it can't be found definitively. This involves some refactoring to
avoid modifying PWD (which is advisable regardless).

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-18 18:19:12 +02:00
Dave Reisner 914ebe3a74 ensure that PKGBUILDs aren't sourced via PATH
Fixes FS#36378.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-18 18:17:31 +02:00
Dave Reisner 7267664ed8 arch-nspawn: allow oddly named directories
This fixes various errors one might encounter when trying to use a
build root or cachedir with whitespace in it.

Note that the cachedir fix is not a complete one, as pacman's output is
unreliable (and not meant for parsing here).

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-18 18:17:05 +02:00
Dave Reisner e0f7c21a68 arch-nspawn: avoid escaping mount_args
eval is no longer involved in the execution of systemd-nspawn, so we no
longer need a layer of escaping on the arguments.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-18 18:16:59 +02:00
Pierre Schmitz 8dbb02de4f Prepare release 2013-08-08 22:51:14 +02:00
Pierre Schmitz b12d5eaf85 Update makepkg.conf from pacman 4.1.2 2013-08-08 22:50:19 +02:00
Dave Reisner 0fa2536957 Makefile: validate generated files as part of build
For example...

$ make
GEN checkpkg
GEN commitpkg
GEN archco
archco: line 179: unexpected EOF while looking for matching `"'
archco: line 181: syntax error: unexpected end of file
make: *** [archco] Error 2

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-08 21:28:19 +02:00
Dave Reisner be3c71fa81 avoid injecting code into the format string
Now that die() properly forwards arguments to error(), we can expect
that the first arg is a format string and not the entirety of the
output.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-08 21:28:10 +02:00
Dave Reisner fb30cabe61 common: Properly forward arguments from die to error
Also allow this function to be called without arguments, in which case,
don't call error at all. Some uses of this function wrongly assumed
that this was already allowed.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-08 21:28:00 +02:00
Florian Pritz 29e62278a7 arch-nspawn: remove leading - from the machine name/hostname
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-08-08 21:24:55 +02:00
Pierre Schmitz 8c4553f68c prepare new release 2013-05-25 22:39:46 +02:00
Pierre Schmitz 6006783cbc Move all scripts from sbin to bin directories 2013-05-25 22:39:11 +02:00
Jan Alexander Steffens (heftig) e26fddb608 Update .gitignore 2013-05-25 22:17:30 +02:00
Jan Alexander Steffens (heftig) c3bb10046b crossrepomove: copy packages locally
Nymeria's HTTP mirror is now password-protected and crossrepomove broke.
2013-05-25 16:55:53 +02:00
Jan Alexander Steffens (heftig) 7a3f524201 makechrootpkg: Add hack for svn sources and makepkg 4.1.1 2013-05-25 16:55:53 +02:00
Jan Alexander Steffens (heftig) fc71be3479 makechrootpkg: Update comments to point out the bad hacks 2013-05-11 12:26:21 +02:00
Jan Alexander Steffens (heftig) 38692e8d74 archbuild: Correct makechrootpkg argument order
The user-passed makechrootpkg_args may contain a "--" to pass
arguments to makepkg. In this case, the order is wrong.
2013-05-11 12:26:21 +02:00
Jan Alexander Steffens (heftig) a5bc6acf32 arch-nspawn: Quiet systemd-nspawn again
systemd-nspawn always outputs some debug messages over stderr.
Both stdout and stderr from inside the chroot are sent through
a pty to stdout.
2013-05-11 12:26:20 +02:00
Jan Alexander Steffens (heftig) 4937422fcf makechrootpkg: Split out chrootbuild into a function
Now syntax highlighting works properly! :D
2013-05-11 12:26:16 +02:00
Jan Alexander Steffens (heftig) 4dcdbcaf1e makechrootpkg: Ensure we have a writable PKGBUILD
For pkgver updates.
2013-05-06 01:51:06 +02:00
Jan Alexander Steffens (heftig) 1489f75419 arch-nspawn: setarch to CARCH
Allows calling makechrootpkg without worrying about the architecture
2013-05-06 01:50:05 +02:00
Jan Alexander Steffens (heftig) 7ca4eb82dd makechrootpkg: Avoid parsing PKGBUILD and support VCS sources
- Ensure sources are available before entering chroot
 - Bind STARTDIR and SRCDEST into the chroot read-only
 - Refactor makechrootpkg and introduce meaningful functions

Avoids copying stuff from/to the chroot as much as possible. With
VCS sources these copies can get quite expensive.
2013-05-03 08:48:14 +02:00
Jan Alexander Steffens (heftig) abba9f07a6 makechrootpkg: Remove add_to_db feature
I don't think this is much use in our common workflow. Our pacman
configs don't even make a reference to /repo.
2013-05-03 04:34:29 +02:00
Jan Alexander Steffens (heftig) a7a05deb37 lib/common.sh: Introduce locking helper functions
Reduces code duplication.

With makechrootpkg not calling mkarchroot anymore,
the lock handover protocol is unneeded.

arch-nspawn does not do any locking, so add protection to archbuild.
2013-05-03 04:34:29 +02:00
Jan Alexander Steffens (heftig) 0e98bd8c48 arch-nspawn: Set machine name
Recent changes to systemd-nspawn have it take the machine name from
the chroot dir name, which isn't unique enough for our setup.
2013-05-03 04:34:29 +02:00
Jan Alexander Steffens (heftig) 453558c4bb mkarchroot: Refactor chroot running into a new script
Separates the two features of mkarchroot. Provides users of the new
arch-nspawn with the full feature set of systemd-nspawn.

For example, this can be used to bind custom directories into the chroot.
2013-05-02 10:33:24 +02:00
Pierre Schmitz 6e086f0e70 Prepare release 2013-04-08 18:09:19 +02:00
Sébastien Luttringer 93d735981b makechrootpkg: Add option to build in temp chroot
Add option -T to build in a temporary chroot. This apply to any kind of
filesytem and allow to easily parrallelize builds.

This patch also simplify how $default_copy and $copy are defined.

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-04-08 14:30:45 +02:00
Pierre Schmitz 97a2d2414a mkarchroot: Fix creation of btrfs snapshot and remove force option 2013-04-07 16:05:21 +02:00