summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* pacman-db-upgrade: fix --config option typoAndrew Gregory2014-11-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: always look for sources in source=()Dave Reisner2014-10-19
| | | | | | | | This regression snuck in during some reviewing of 963f7fe02fcb14 (arch-specific sources). We must always check the source=() array for sources. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reorder args to pkgbuild_get_attribute for consistencyDave Reisner2014-10-13
| | | | | | | In all other cases, this code gets the outvalue from the final parameter. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: simplify attr matching in extract_function_varDave Reisner2014-10-13
| | | | | | | Interesting attributes created with 'local' or 'declare' won't be surfaced in .PKGINFO, so we shouldn't try to look for them. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: show full fingerprint on pgp failureDave Reisner2014-10-13
| | | | | | | | | Rather than implementing suffix matching, which might clash, let's just print the full fingerprint of the err'ing key so that the user can copy/paste it into validpgpkeys. Also, make it clear in the manpage that validpgpkeys needs full fingerprints, and nothing else. Signed-off-by: Allan McRae <allan@archlinux.org>
* Revert "makepkg: allow less than the full fingerprint in validpgpkeys"Dave Reisner2014-10-13
| | | | | | This reverts commit 50296576d006d433fbfd4a6c57d5f95a942f7833. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-db-upgrade: do not mangle file listsAndrew Gregory2014-10-06
| | | | | | | | | | grep'ing out blank lines and sorting output thoroughly breaks any file lists with %BACKUP% entries which must be separated from the file list by a blank line. Adds a custom function to ensure that all paths printed are non-empty and unique. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow less than the full fingerprint in validpgpkeysDave Reisner2014-09-30
| | | | | | | | | | | | | | | I found this feature confusing, and the documentation wasn't any help. It was pointed out to me on IRC that validpgpkeys expects full fingerprints, and won't accept shorter forms. This makes the documentation insufficient, and the variable name itself misleading. This patch bolsters the documentation to explain more about what the contents should be, and implements suffix matching to allow matching on shorters fingerprint suffices. Now, when makepkg tells you that a key ID isn't valid, it's sufficient to manually check the key ID against the known good ID, and add it as is to validpgpkeys. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: move negation in inequality comparisonsDave Reisner2014-09-30
| | | | | | | | | | | | This commit changes the few remaining instances of: [[ ! $foo = "$bar" ]] to the more common: [[ $foo != "$bar" ]] Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: abort if we can't add install/changelog to packageDave Reisner2014-09-30
|
* PKGBUILD: add support for arch-specific sourcesDave Reisner2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements support for declarations such as: arch=('i686' 'x86_64') ... source=("somescript.sh") source_i686=("http://evilmonster.com/i686/ponies-9001-1.i686.bin") source_x86_64=("http://evilmonster.com/i686/ponies-9001-1.x86_64.bin") md5sums=('d41d8cd98f00b204e9800998ecf8427e') md5sums_i686=('e4ca381035a34b7a852184cc0dd89baa') md5sums_x86_64=('4019740e6998f30a3c534bac6a83f582') Just the same as the "untagged" sources, multiple integrity algorithms are supported. The manpage is updated to reflect support for these suffices. This commit also refactors download_sources slightly: 1) to use the otherwise preferred convention of lowercase local variable names, and to make the handling of $1 more clear. 2) rename the "fast" parameter to "novcs", to make it more clear what this token does. 3) add a new possible token "allarch" to ensure that download_sources will fetch all sources, for all architectures.
* makepkg: break out checksum generation to its own functionDave Reisner2014-09-30
| | | | | | This also fixes a "bug" in which a PKGBUILD without any source array would generate "md5sums=()". While not technically wrong, we can easily do better and emit nothing at all.
* makepkg: break out check_checksums to reasonably sized functionsDave Reisner2014-09-30
|
* makepkg: disallow values of 'arch' which might be problematicDave Reisner2014-09-23
| | | | | | | | | We rely on values in the arch array to be valid as part of variable names, so extend the arch lint check to catch this. This also cleans up lint_arch to restrict the use of "lint" only to the package-specific architecture checks. It previously had an odd declaration with a conditional expansion that would never be true.
* makepkg: let --source imply --ignorearchDave Reisner2014-09-23
| | | | | | | | Since source package creation is architecture independent, we should ignore architecture-dependent behaviors such as the lint check which will halt execution when the host machine is not a supported arch. https://github.com/falconindy/pkgbuild-introspection/issues/15
* makepkg: use correct terminologyDave Reisner2014-09-23
| | | | unix has no "folders".
* replace --reference on chmod/chown commandsWolfgang Bumiller2014-09-23
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Extend database upgrade script to handle alpm db version 9Andrew Gregory2014-09-23
| | | | | | Original-work-by: Allan McRae <allan@archlinux.org> Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-db-upgrade: use pacman-style optionsAndrew Gregory2014-09-16
| | | | | | | | | | * convert dbpath from argument to option * add --config and --root options * read dbpath and root from config file * if root is set but not dbpath, dbpath is set relative to root Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not eval dlcmdlolilolicon2014-09-15
| | | | | | | | | | | | | | | | | | | | This eval enables the following in a PKGBUILD to "just work": source=('$pkgname-$pkgver.tar.gz'::'https://host/$pkgver.tar.gz') This has at least two problems: - It violated the principle of least surprise. - It could be a security issue since URLs are arbitrary input. Instead, expand the dlagent command line into an array, replace the %o, %u place holders, and run the resultant command line as is. Embedded spaces in the DLAGENTS entry can be escaped with a backslash. Fixes FS#41682 Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Allow using sources with :: in themWilliam Giokas2014-09-15
| | | | | | | | | | | | | | | | | | | | Git has the ability to use helper applications for interfacing with hg, and from what we had before, the following url:: foo::git+hg::http://foo.bar/foobar would get converted to something along the lines of: filename: foo URL: http://foo.bar/foobar and the 'git+hg' part would essentially be ignored when it's getting set up in the 'get_protocol' and 'get_downloadclient' functions. With this patch it is possible to have a source link with '::' in it, however it is not possible to have a filename with '::', which is the current behavior. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-key: stricter parsing for -verifyAllan McRae2014-08-09
| | | | | | | | | Prevents trust being spoofed by using TRUST_FULLY in the signatory's name or in an added notation. Fixes FS#41147. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: replace bare eval with var extraction functionsDave Reisner2014-08-08
|
* PKGBUILD: handle arch specific attributesDave Reisner2014-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces support for architecture-specific conflicts, depends, optdepends, makedepends, replaces, and conflicts by appending "_$CARCH" to the array name. For example, in the global section: arch=('i686' 'x86_64') depends=('foo') depends_x86_64=('bar') This will generate depends of 'foo' and 'bar' on x86_64, but only 'foo' on i686. Moreover, this is supported in the package functions with the same heuristics as the generic names, e.g. ... arch=('i686' 'x86_64') depends=('foo') ... package_somepkg() { depends_x86_64=('bar') ... } Again, will cause x86_64 to have depends of 'foo' and 'bar', but only 'foo' for i686.
* makepkg: refactor check_sanity, give it some sanity of its ownDave Reisner2014-08-08
| | | | | | | | | | | | | | | | | | | | Break apart each of the blocks into their own separate functions. And, instead of the hand crafted eval statements, reuse the logic from pkgbuild-introspection[0] to abstract away the complexities of parsing bash. This commit fixes at least 3 bugs in check_sanity: 1) The wrong variable is shown for the error which would be thrown when, e.g. pkgname=('foopkg' 'bar^pkg') 2) The "arch" variable is not sanity checked when the PKGBUILD has an arch override, but only one output package. 3) https://bugs.archlinux.org/task/40361 Lastly, there's some string changes here which should help to clarify a few errors emitted in the linting process. [0] https://github.com/falconindy/pkgbuild-introspection
* makepkg: disallow pkgver/pkgrel/epoch overrides in packagesDave Reisner2014-08-08
| | | | This is a confusing feature, and no one uses it.
* makepkg: skip dependency checking with --verifysourceAllan McRae2014-08-04
| | | | | | | | | | Dependencies are now handled with --nobuild unless specificially skipped. Using --verifysource will skip dependency checks unless --syncdeps is specified. Fixes FS#35057 and FS#36999. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: ensure vcs download tool are installed when requiredAllan McRae2014-08-04
| | | | | | | Add an array VCSCLIENTS to makepkg.conf that matches vcs source protocols to the package containing the software needed for handling the source. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: improve check and error message for buildfile locationDave Reisner2014-08-03
| | | | | | | | | | The documentation very clearly states that the buildfile has to be in $PWD, but the error thrown by makepkg reference some mysterious "build directory". Simplify this check so that we more directly check that the file being referred to is in fact in our $PWD. Revise the error message when the check fails to more plainly point out the problem. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Respect XDG_CONFIG_HOMEJohannes Löthberg2014-08-03
| | | | | | | | | | | | | | Add support for following the XDG Base Directory Specification when reading the user-specific configuration file. If no $XDG_CONFIG_HOME/pacman/makepkg.conf file exists we fall back to sourcing $HOME/.makepkg.conf Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> [Allan] Note XDG_CONFIG_HOME takes priority. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: handle "epoch=" in PKGBUILD with pkgver functionAllan McRae2014-06-29
| | | | | | | | | | After resourcing the PKGBUILD in update_pkgver(), set the epoch to 0 if it is empty. Also adjust the get_full_version function to be more robust if epoch somehow still is empty. Fixes FS#41022. Signed-off-by: Allan McRae <allan@archlinux.org>
* Use C locale for bsdtar calls during package creationAllan McRae2014-06-12
| | | | | | | This ensures packages build on a UTF-8 locale system with non-ASCII character names can be installed on non-UTF-8 systems. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Remove redundant sig generation commentJohannes Löthberg2014-06-10
| | | | | | | Remove the comment above the signature generation command as the command is self explanatory and no longer does what the comment says. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: pass "--nocolor" to pacmanAndrew DeMaria2014-05-25
| | | | | | FS#39982. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Force buildscripts to be in startdirAllan McRae2014-05-25
| | | | | | | | | | | | We expect all source file to lie in $startdir. However, using "makepkg -p <buildscript>" can currently allows people to specify buildscripts in other directories. This results in confusion about where other sources should lie (in startdir or in the directory that the buildscript is in). Explicitly disable using -p for files in other directories to avoid this issue. Fixes FS#40293. Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not check makepkg-wrapper for standard optionsAllan McRae2014-05-23
| | | | | | Fixes "make distcheck". Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Introduce validpgpkeys arrayThomas Bächler2014-05-23
| | | | | | | | | | If validpgpkeys is set in the PKGBUILD, signature checking fails if the fingerprint of the key used to create the signature is not listed in the array. The key's trust value is ignored. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Treat a signature from an untrusted key as an errorThomas Bächler2014-05-23
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Use read to parse status file during signature verification.Thomas Bächler2014-05-23
| | | | | | | | | | Instead of invoking grep multiple times, parse the status file once. This refactoring also changes the behvaiour when signature verification fails due to a missing public key: It is now an error instead of a warning. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: use dash instead of underscore in /usr/lib/debug/.build-idSteven Noonan2014-04-21
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: declare pkgbase as localAllan McRae2014-03-27
|
* Always supply base name and version info in .PKGFILE if neededAllan McRae2014-03-27
| | | | | | | | Provide pkgbase information for non-split packages with pkgbase set. Also record the version of the "base" package. This is useful for matching package files to source packages. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: sign source packages with --signAllan McRae2014-03-27
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Reorder some entries in usage() and getoptsPierre Neidhardt2014-03-13
| | | | | Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: enforce fakeroot usageAllan McRae2014-03-12
| | | | | | | | | | Packaging outside of fakeroot can result in incorrect permissions for package files. It has been years since fakeroot issues during packaging were common, so it is safe to enforce fakeroot usage. If using fakeroot is impossible for some reason, a two line wrapper script will suffice to fool makepkg. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Remove --asroot optionAllan McRae2014-03-12
| | | | | | | The days of fakeroot being error ridden are long gone, so there is no valid reason to run makepkg as root. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Add a --noarchive option to inhibit archive creationPierre Neidhardt2014-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Packagers who want to test the package() function, i.e. to check the content of the pkg/ folder. 2. Developers who want to check how the packaged version of a program looks, in other words how the pkg/ folder looks. 3. For users of systems with no port tree, makepkg can ease package creation. However the resulting archive of the whole makepkg process is often useless. For all situations, makepkg will usually be called several times. But no archive (the final package) is needed in any cases. The archive creation ends up being a waste of time and resource, especially for big applications and slow machines. Since this option aborts the process prematurely, it behaves like the -o,--nobuild option, i.e. any other option acting on later stages in the process will be automatically discarded. For --noarchive, it means that in $ makepkg --noarchive --install the '--install' option does not do anything. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Comment on install_package() return codePierre Neidhardt2014-03-12
| | | | | | | | | Previously, install_package() return code was either used as exit code or ignored. This was rather confusing. The return code is now always ignored and a comment on install_package() has been added. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix install order in scripts MakefileAllan McRae2014-03-03
| | | | | We need to use install-exec-hook instead of install-data-hook to make sure the hook is run after the installation of the scripts into $BINDIR.
* makepkg: Support kernel.org's PGP signature schemeThomas Bächler2014-03-03
| | | | | | | | Files hosted on kernel.org only provide signatures for the uncompressed tarball. Support this scheme by transparently uncompressing the archives and piping the data into gpg. Signed-off-by: Allan McRae <allan@archlinux.org>