Commit Graph

24 Commits

Author SHA1 Message Date
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 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
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
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
Ionut Biru a628c1a006 makechrootpkg: fix repack
repack is defined as a boolean. set it true when -R is passed

/usr/sbin/makechrootpkg: line 295: 1: command not found

Signed-off-by: Ionut Biru <ibiru@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-09 20:32:29 +01:00
Pierre Schmitz bf96c9f949 makechrootpkg: Create separate namcap log for every single file 2011-11-06 10:31:37 +01:00
Eric Bélanger 42d821ef7b Capitalize output messages
Some of the output/error messages were capitalized, some were
not. This patch capitalize everything for consistency sake. Other
minor changes were done to the messages like removing the superfluous
"error:" from die messages and adding a final period to messages that
were complete sentences as appropriate.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-04 19:33:29 +01:00
Pierre Schmitz aaa68e49e8 Move common functions to a shared file
* common.sh is included on build time
* most functions are copied from makepkg
2011-11-01 15:33:08 +01:00
Pierre Schmitz a06ac2451a makechrootpkg: Handle install and changelog file the same way as in commitpkg 2011-10-31 12:43:16 +01:00
Pierre Schmitz fbdcf6e309 makechrootpkg: Do not export LANG
This is done by /etc/profile.d/locale.sh. By this we also ensure compatibility with systemd.
2011-10-31 12:02:46 +01:00
Pierre Schmitz 86045b965e makechrootpkg: Make host pubring.gpg available to check signed sources 2011-10-29 20:37:28 +02:00
Pierre Schmitz 521c4ceec3 makechrootpkg: Set the C locale system wide
makepkg sources /etc/profile before calling build(). This will change the
locale from C to en_US.UTF8.
2011-10-29 13:05:09 +02:00
Pierre Schmitz 5c6c2d532e makechrootpkg: Avoid running namcap on non-package file like signatures
We only use .xz or .gz compression for pacakges so we can be more specific and avoid a match of e.g. *.pkg.tar.xz.sig etc.
2011-10-14 09:35:39 +02:00
Allan McRae a991c9a71f Always log builds in makechrootpkg
It is very helpful to always log the build output in makechrootpkg
so pass "-L" as a standard option to makepkg.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:04 +02:00
Jan Alexander Steffens (heftig) a790c39c7d makechrootpkg: If chroot is missing, exit instead of usage
I'm not sure why this was handled differently than the other
error conditions.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:04 +02:00
Jan Alexander Steffens (heftig) e66a1f3cd8 makechrootpkg: Add option to explicitly run namcap
Installs namcap if needed, *after* building the package,
contrary to the former way of having to have namcap installed,
e.g. via makedepends.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Jan Alexander Steffens (heftig) 7a9f808a0f makechrootpkg: Source PKGBUILD only once
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Jan Alexander Steffens (heftig) b9070bf0b8 makechrootpkg: Use nullglob
Use nullglob instead of checking for existence. If the glob doesn't
match any files, it will be removed instead of staying unexpanded.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Jan Alexander Steffens (heftig) 1df6799747 makechrootpkg: Always set PKGDEST and SRCDEST
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Jan Alexander Steffens (heftig) e41deee5e5 makechrootpkg: Replace $workdir with . ($PWD)
$workdir is never used when we change directory, so it's superfluous.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Jan Alexander Steffens (heftig) 004ced2a33 makechrootpkg: Eliminate appname, only used once
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Jan Alexander Steffens (heftig) 733668f4cc makechrootpkg: Bashify syntax
No functional change. Eliminates unused variables RUN and FORCE.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:03 +02:00
Lukas Fleischer 46c4def073 Support non-standard install locations
This build system overhaul allows for adding (define-style) macros to
our scripts. All source files are now suffixed with ".in" to clarify
that they might contain unprocessed defines. The Makefile provides a new
rule to preprocess source files and generate proper output scripts.

Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it
instead of hardcoded paths to "/usr/share/devtools" everywhere. We
missed this when adding PREFIX support to the build system in commit
35fc83ce7d.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:02 +02:00