Commit Graph

429 Commits

Author SHA1 Message Date
Florian Pritz 7c78599a61 add libdepends script
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-10-31 22:57:12 +01:00
Pierre Schmitz 89950ccd70 Create signature for devtools source package 2011-10-31 14:04:35 +01:00
Pierre Schmitz c238cfafa0 commitpkg: Require signatures for packages 2011-10-31 13:53:43 +01:00
Pierre Schmitz 0e58198f36 commitpkg: Check signature if available 2011-10-31 13:14:16 +01:00
Pierre Schmitz e07d318c54 commitpkg: Skip signing if signature already exists 2011-10-31 12:53:50 +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 01f5cdf33d prepare release 2011-10-29 21:53:36 +02:00
Pierre Schmitz e333a4da81 temporary workaround until pacman 4.0 moves to [core]
Pacman 3 refuses to work with the pacman 4 SigLevel config entry

Also related: https://bugs.archlinux.org/task/26555
2011-10-29 21:46:19 +02:00
Pierre Schmitz 86045b965e makechrootpkg: Make host pubring.gpg available to check signed sources 2011-10-29 20:37:28 +02:00
Lukas Fleischer bea69043fb commitpkg: Sync changelog/install check with makepkg(8)
makepkg(8) currently uses a smarter method to extract all changelog and
install files from a PKGBUILD. Sync commitpkg to use the same code (with
small modifications). This also adds support for changelog/install files
that contain a whitespace.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-10-29 13:19:10 +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 3a684f667b prepare release 2011-10-14 10:18:56 +02:00
Pierre Schmitz ae7b13646e Disable pacman's CheckSpace option as it fails within a chroot 2011-10-14 10:16:55 +02:00
Pierre Schmitz 6cf9332896 prepare release 2011-10-14 10:06:33 +02:00
Pierre Schmitz f10d88e029 Call locale-gen with full path in chroot environment
Thanks to Peter Schuller for this hint
2011-10-14 09:55:28 +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
Pierre Schmitz b06b9f6010 Merge remote-tracking branch 'cryptocrack/for-pierre' 2011-10-14 09:33:07 +02:00
Pierre Schmitz 9715ddbe9d Apply pacman 4.0 changes to our copies of makepkg.conf and pacman.conf
Note: Signature checks are disabled for now until we provide a keyring package.
2011-10-14 09:09:46 +02:00
Lukas Fleischer a0c6bf4556 Honor TMPDIR environment variable
Replace all mktemp(1) invocations that hardcode "/tmp" with `mktemp
--tmpdir` and change templates accordingly.

Note that "--tmpdir" is GNU-ish which is okay given that we currently
support Arch Linux only anyway.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 11:10:09 +02:00
Lukas Fleischer dcb80e7b5c finddeps: Unset optdepends
The optdepends array should be unset before sourcing the PKGBUILD to avoid
dangling optional depends.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:36 +02:00
Lukas Fleischer 84b789f760 finddeps: Use read builtin to iterate over packages
Using parameter substitution might result in unpredictable behaviour
when directories contain whitespaces here. The read shell builtin is the
proper way to read single lines.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:35 +02:00
Lukas Fleischer 8edb443c12 finddeps: Remove redundant cd(1)
Source the PKGBUILD using the correct path (relative to our base
directory) instead of using cd(1) to switch to the ABS base directory
first and to the package directory afterwards.

This is very useful when trying to track errors, also:

    $ ~/src/devtools/finddeps libdaq
    ./community/snort (depends)
    PKGBUILD: line 17: ruby: command not found
    PKGBUILD: line 19: [: =: unary operator expected

Versus:

    $ ~/src/devtools/finddeps libdaq
    ./community/snort (depends)
    ./community/ruby-pkgconfig/PKGBUILD: line 17: ruby: command not found
    ./community/lmms/PKGBUILD: line 19: [: =: unary operator expected

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:34 +02:00
Lukas Fleischer 4800be25c2 finddeps: Proper quoting, use double brackets
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:33 +02:00
Lukas Fleischer fe2040cd14 archrelease: Fix SVN error when repository is empty
If trash is empty, `svn rm -q "${trash[@]}"` fails with:

    svn: Try 'svn help' for more info and then
    svn: Not enough arguments provided

This doesn't result in any further malfunction but is kind of confusing
and unexpected. Skipping `svn rm` on an empty trash fixes this.

Reported-by: Alexander Rødseth <rodseth@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-12 16:53:08 +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
Dan McGee 022cd3d523 archrelease: call 'svn copy' once for all files
We don't need to invoke svn copy on each file; it accepts multiple
arguments. This cut Allan's time releasing one patch-friendly package
from 5 minutes to 2 minutes.

Signed-off-by: Dan McGee <dan@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 21daec135a Makefile: Add a cleanup target
Allows for using `make clean` to remove any output files generated by
make(1).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:02 +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
Lukas Fleischer 142b032212 zsh_completion: Fix package completion
Make use of _devtools_completions_all_packages() instead of using
_devtools_completions_installed_packages(). The latter was removed
during an earlier review of the patch adding ZSH completion (now
6350ec04 in master) but we forgot to change two references.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-29 13:59:55 +02:00
Lukas Fleischer 5f8458f197 commitpkg: Avoid unnecessary use of basename(1)
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-29 13:58:50 +02:00
Lukas Fleischer 50c311c261 archbuild: Avoid unnecessary use of basename(1)
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-29 13:58:49 +02:00
Lukas Fleischer ef10f6c799 archbuild: Proper quoting, use double brackets
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-29 13:58:49 +02:00
Lukas Fleischer d70918d18a archbuild: Use array for base packages
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-29 13:58:49 +02:00
Pierre Schmitz 6da47a8f6a prepare release 2011-08-25 21:39:49 +02:00
Lukas Fleischer 6350ec0461 Add ZSH completion
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 19:26:12 +02:00
Lukas Fleischer 3da3a5486f checkpkg: Use a pipe to sort package lists
No need to do this after we already wrote the package list to a file.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 11:22:13 +02:00
Lukas Fleischer 7020d2351b checkpkg: Use read builtin to get new ".so" files
The read shell builtin is the proper way to read single lines. Also,
simplify grep(1) and awk(1) invocations and use a single awk(1)
expression, that supports extracting file names with spaces, instead.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 11:21:24 +02:00
Lukas Fleischer 7952d6fbfc checkpkg: Avoid unnecessary use of grep(1)/basename(1)
Use parameter expansion instead of invoking external binaries here.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 11:20:41 +02:00
Lukas Fleischer 3c175e98bd checkpkg: Avoid unnecessary use of sed(1) and cut(1)
We already use `pacman -Sddp` here which should always only return a
single package URL for regular packages. No need to extract the first
field of the last line. Also, specify "--print-format '%l'" explicitly
to make this consistent even if pacman(8)'s default value changes some
day.

Use bash parameter expansion instead of sed(1) to extract the file name
from the URL.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 11:20:08 +02:00
Lukas Fleischer ddb08cb9a1 checkpkg: Proper quoting, use double brackets
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 11:18:36 +02:00
Lukas Fleischer 88a929cfc0 archrelease: Fix behaviour with non-standard trunk name
Do not hardcode the name of the package trunk directory and accept
varying directory names, such as "gnome-unstable". Regression introduced
in 8384ad849d.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-08-25 11:17:19 +02:00