Commit Graph

696 Commits

Author SHA1 Message Date
Pierre Schmitz 37bb1d33a7 archbuild: abort if update or creation of the chroot fails 2012-10-03 12:32:03 +02:00
Florian Pritz dbef0b91bf Fix ownership when copying files from chroot to system
Previously files were always owned by nobody which means trying to write
to them directly would fail because only the owner has +w.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-09-14 16:01:01 +02:00
Pierre Schmitz 499f20071a prepare release 2012-07-20 23:29:43 +02:00
Eric Bélanger 0d3d63e3aa Fix bash completions
With bash-completion 2.0, the completion must have the same name as the binary.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-25 00:01:32 +02:00
Pierre Schmitz d2ec5ab67d prepare release 2012-06-16 17:06:15 +02:00
Pierre Schmitz a23d93ce7f commitpkg: check if there are any packages to process before doing so 2012-06-16 16:56:42 +02:00
Pierre Schmitz 246b8ead60 mkarchroot: reset trap so it wont be called twice 2012-06-16 16:21:55 +02:00
Pierre Schmitz b14a1b1bcc archbuild: do not cross filesystems when removing the chroot copies 2012-06-16 15:28:52 +02:00
Pierre Schmitz 0cd9e1ae7e archbuild: use flock -n as we do elsewhere 2012-06-16 15:24:16 +02:00
Allan McRae 3734c80bf7 Fix /run permissions in chroot
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-15 09:27:27 +02:00
Pierre Schmitz 7b696f6f8d prepare release 2012-06-12 18:22:37 +02:00
Pierre Schmitz ed9d5a16e3 Support multiple package cache directories
* We use the host package cache configuration
* As only the first cache will be written to, we mount the others readonly
2012-06-12 08:17:58 +02:00
Pierre Schmitz e44c49aebb archbuild: Store chroots in /var/lib instead of /var/tmp
/var/tmp is cleaned up by tmpfiels by default which we cannot handle gracefully.
2012-06-12 06:53:11 +02:00
Pierre Schmitz c5cd72c085 Remove no longer used option 2012-06-11 23:44:30 +02:00
Pierre Schmitz 8bedb89fd6 Add a version number to each chroot so we can tell the user when a rebuild is needed 2012-06-11 17:04:17 +02:00
Pierre Schmitz c7cda47342 Enable signature checking within build environment
* bind /sys and /dev/pts from host
* drop support for devtmpfs as it is no longer needed
* add /run and /dev/rtc0
* clone own ipc, uts and mount namespaces for chroot
* set localtime, timezone and locale within chroot environment
* copy /etc/pacman.d/gnupg from host
2012-06-11 16:44:23 +02:00
Pierre Schmitz 41b39c3e78 prepare release 2012-06-11 11:39:42 +02:00
Pierre Schmitz 6743c97383 update makepkg.conf and pacman.conf 2012-06-11 11:32:05 +02:00
Gerardo Exequiel Pozzi 231496c82a mkarchroot: use bind mount instead of symlink for /dev/ptmx
We need /dev/ptmx -> /dev/pts/ptmx (for devpts -o newinstance)
Other way to do this thing is via bind mount (as said kernel doc[devpts.txt]).

This should be done in this way at least for /dev as devtmpfs in the chroot.
Since we can not touch /dev (devtmpfs), because devtmpfs is "singleton",
just use bind method and avoid interference.

Do it the same for both modes of /dev (tmpfs) and (devtmpfs) to keep it simple.

Currently devpts in chroot is not working without this when using /dev as devtmpfs,
this fixes this issue (opening /dev/ptmx, creates devices nodes on outside /dev/pts)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-10 12:57:14 +02:00
Lukas Fleischer fda394f1a0 Gracefully handle files containing an "@"
The "@" sign in file names in SVN marks the beginning of a pegged
version number -- from the Subversion book:

    Peg revisions are specified to the Subversion command-line client
    using at syntax, so called because the syntax involves appending an
    “at sign” (@) and the peg revision to the end of the path with which
    the revision is associated.

The trivial workaround is to always append an at sign to the end of the
path in the version control checks.

Before:

    $ community-stagingpkg 'Add systemd units.'
    ==> ERROR: exim-submission@.service is not under version control
    $ svn status -v | grep 'exim-submission@.service'
    A                -       ?   ?           exim-submission@.service

After:

    $ community-stagingpkg 'Add systemd units.'
    ==> Committing changes to trunk...done
    ==> Signing package exim-4.80-2-x86_64.pkg.tar.xz...
    [...]

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-10 12:47:40 +02:00
Allan McRae addea828fe Prevent packages being uploaded with "Unknown Packager"
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-10 12:46:32 +02:00
Pierre Schmitz acbbe8cb90 Move bash_completion to /usr/share/bash-completion/completions/ 2012-03-21 07:32:44 +01:00
Pierre Schmitz 9840730880 Prepare release 2012-03-05 18:02:22 +01:00
Pierre Schmitz 502813a107 commitpkg: Pass through the -f parameter to archrelease so unofficial repos can be used 2012-03-05 16:48:19 +01:00
Pierre Schmitz 181646d03b makechrootpkg: Install the built packages before running namcap to reduce false positives and check inter split package dependencies. 2012-03-05 16:28:09 +01:00
Gerardo Exequiel Pozzi 2d9a99ee15 Add -d param to optionally support devtmpfs
The main intention of this patch is to take advantage of
/dev/loop-control and loop devices.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-03-05 14:30:26 +01:00
Pierre Schmitz cecd257786 Add script to move packages between [extra] and [community] 2012-03-05 01:48:27 +01:00
Pierre Schmitz 82dcc19ff9 commitpkg: Add ability to override the server
This might be useful for unofficial repos
2012-03-04 22:38:07 +01:00
Florian Pritz c5893672a6 find-libdeps: fix extraction of soname
libperl.so results in soname="libperl.so.so" which is wrong.

This returns the correct string: "libperl.so"

Fix-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-03-04 22:25:22 +01:00
Pierre Schmitz 73d61f43c7 prepare release 2012-02-15 11:33:12 +01:00
Allan McRae afc93f3430 Always sign unsigned packages
We do not allow packages to be uploaded without signatures so force
all unsigned packages to be signed.  This has the bonus of not
breaking makepkg signing support by requiring you use an internal
makepkg variable.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-02-15 11:25:49 +01:00
Lukas Fleischer 9ab0d94578 archrelease: Validate tags before releasing
Compare every single tag with a list of valid tags. This prevents broken
releases which occurred whenever someone made a typo on the command
line:

    $ ./archrelease community i686
    ==> ERROR: archrelease: Invalid tag: "community" (use -f to force release)

Since the list is used in the ZSH completion as well, break it out to a
separate file and move it to "lib/". Also, add a command line parameter
to allow for releasing to an unknown repository when necessary.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-02-12 12:35:14 +01:00
Lukas Fleischer 5e8cb67603 zsh_completion: Remove multilib*-{i686, any}
These tags make no sense. Remove them from our valid tag array that is
used for tab completion.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-02-08 12:53:13 +01:00
Pierre Schmitz 65365f1853 prepare release 2012-02-06 21:17:44 +01:00
Florian Pritz 06a681ca3d commitpkg: use absolute paths when uploading files
This fixes a problem where rsync won't work if the pkgver contains a
colon (epoch). In this case rsync assumes that the colon is a
remote:path separator and having src and dest both being remote
arguments is not supported.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-02-06 21:15:57 +01:00
Pierre Schmitz b763788b16 Fix typo: It's PKGDEST and not DESTDIR 2012-01-19 18:45:01 +01:00
Pierre Schmitz c2d9a0e7b1 Set correct pacman.conf
Commit ee4edefa2f reverted too much and left pacman.conf unset
2012-01-18 16:56:41 +01:00
Pierre Schmitz ee4edefa2f Remove any pacman 4 related workarounds 2012-01-18 11:24:07 +01:00
Allan McRae a8b64995ee makechrootpkg: fix error message
Passing a directory that does not exist to makechrootpkg results in
an error message:

==> ERROR: No chroot dir defined, or invalid path ''

The path is not being printed as the readlink command blanks it if
the directory does not exist. Fix this.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-01-18 11:06:52 +01:00
Jan Alexander Steffens (heftig) 2c9855fe6b Fix up usage help, the Default line belongs to -l
Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-01-18 11:06:52 +01:00
Florian Pritz 4d4ffb5d8f find-libdeps: fix syntax error
The problem has been introduced in commit
56d4dec19f

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-01-18 11:06:52 +01:00
Dave Reisner 2d79191c97 commitpkg: behavior more sanely in searching for built pkgs
In the case of a .pkg.tar.xz and a .pkg.tar.gz existing in the same
directory, all commitpkg would say is:

  ==> WARNING: Could not find . Skipping x86_64

Upon digging into the logic, we did a few things poorly, mostly in
getpkgfile:

- getpkgfile tried to die in a subshell (within the command substituion
  assignment to 'pkgfile'). This will never work.
- We assumed that proper glob expansion happened when we received
  exactly 1 arg. This isn't necessarily true without nullglob in effect.
- We dumped the real error (spewed by getpkgfile) to /dev/null.
- We checked for the package twice in both $PWD and $DESTDIR/.
- We checked for file existance multiple times.

Address this by:

- not hiding errors. revamp the wording a little bit to make it more
  obvious why we failed, particularly in the case of a glob expanding to
  more than 1 file. Logic here is simplified to pointing out the failure
  cases of 0 and >1.
- setting nullglob so the number of arguments passed into getpkgfile is
  meaningful from a 'did it decisively resolve' point of view.
- not trying to exit the entire script from a subshell. Just return a
  value (and use it).
- avoiding the package file existance check afterwards. this is a
  freebie from getpkgfile when the glob passed fails to expand.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-01-18 11:06:51 +01:00
Pierre Schmitz 5b3ca82ae5 prepare release 2012-01-14 20:25:43 +01:00
Pierre Schmitz 90a5e441cd Add support for multilib-staging 2012-01-14 20:22:26 +01:00
Pierre Schmitz 3c7dbe0ea2 prepare release 2011-12-20 23:12:49 +01:00
Tom Gundersen 130227546a mkarchroot: do not create /etc/mtab
As of filesystem-2011.12 this is not needed anylonger, and indeed blocks the
chroot from being upgraded. As a workaround, recreating the chroot fixes the
problem.

Fixes FS#27640.

Reported-by: Andrea Scarpino <andrea@archlinux.org>
Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-20 23:05:44 +01:00
Timothy Redaelli 594f972666 Use #!/bin/bash instead of #!/bin/sh
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-20 23:05:38 +01:00
Dave Reisner 0e32334cca archbuild: exec makechrootpkg to preserve exit value
This fixes a compound command such as the one below from continuing even
if the first fails.

  extra-x86_64-build && extra-i686-build

The problem is that 'cleanup 0' is triggered in archbuild even after an
unsucessful call to makechrootpkg. Since both archbuild and
makechrootpkg share the exact same cleanup function (from lib/common),
we simply force the shell to exit with the true return value by exec'ing
the call to makechrootpkg.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-04 18:13:13 +01:00
Allan McRae 58d0ccc4f8 makearchroot: source /etc/profile before building
This ensures the PATH used when building is the default path and
not the value set by the user calling makechrootpkg.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-04 18:04:47 +01:00
Lukas Fleischer bfd2862bc4 Makefile: Remove output files before replacing them
This one fixes all the "Permission denied" errors we got when invoking
make(1) after modifying a source file and removes the need to delete the
generated scripts manually.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-04 18:01:51 +01:00