Commit Graph

875 Commits

Author SHA1 Message Date
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
Pierre Schmitz eebfd9a30f Prepare release 2013-04-06 20:06:23 +02:00
Pierre Schmitz 5085cfcdf9 Bump the chroot version as we changed the default package set 2013-04-06 19:55:58 +02:00
Pierre Schmitz 6caad191c1 Only try to use btrfs snapshots if chroots are on a btrfs partition 2013-04-06 19:50:17 +02:00
Pierre Schmitz 092fe2ffde Sync pacman.conf and makepkg.conf with pacman 4.1 2013-04-06 18:59:16 +02:00
Pierre Schmitz 71b15aafb6 Simplify update call as pacman does no longer support SyncFirst 2013-04-06 18:43:01 +02:00
Pierre Schmitz 4bcafd9768 mkarchroot: code cleanup 2013-04-06 18:38:10 +02:00
Pierre Schmitz 1f0374d8a6 mkarchroot: Create working directory if needed 2013-04-06 18:32:10 +02:00
Dave Reisner f03086a0e1 use nspawn to bind mount needed directories
systemd-nspawn is capable of doing this as of systemd-198. Doing this
means we can remove all of our home grown chroot mount/umount logic, as
it's all performed by pacstrap or systemd-nspawn.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-04-06 18:15:14 +02:00
Sébastien Luttringer 35dc7485fb makechrootpkg: Stat chrootdir type after existancy
Move detection of chrootdir type after have check if the directory exists.

This avoid the following messages when -r is not given
stat: cannot read file system information for '': No such file or directory

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-17 11:24:04 +01:00
Sébastien Luttringer 89bda9217d archbuild: only use base-devel to new chroot
Since TODO [1] which state:
It would be good for base-devel to install everything needed for a build chroot
we can remove base and sudo

[1] https://www.archlinux.org/todo/add-more-to-base-devel/

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-17 11:23:24 +01:00
Sébastien Luttringer 0dc2550af3 makechrootpkg: use var instead of file in $copydir
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-10 10:33:58 +01:00
Sébastien Luttringer 0c62649b64 makechrootpkg: Properly detect filesystem type
Enable btrfs features only if the underlying filesystem is btrfs and not rely
on the presence of the btrfs tools.

Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-10 10:33:58 +01:00