1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-11 11:55:12 -05:00
Commit Graph

1392 Commits

Author SHA1 Message Date
Dominik Fischer
f63854fa96 only include .SRCINFO comments in source tarball
This avoids introducing unnecessary changes to the time stamp into
package repositories that regularly use --printsrcinfo to update the
.SRCINFO file.

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-21 17:10:11 +10:00
Allan McRae
169287e494 makepkg: remove pkg from OPT_LONG array
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20 14:01:53 +10:00
Allan McRae
7624101e18 Revert "makepkg: Empty/create only $pkgdir's relevant to current PKGBUILD"
This reverts commit f9423cfa5d.

This created issue when building packages with debug info multiple times.
It could be fixed, but it confirmed my initial opinion that keeping other
directories in $pkgdirbase was wrong. Use different BUILDDIRs if you want
to build different things from a single PKGBUILD.
2016-02-20 14:01:53 +10:00
Alastair Hughes
c72ca3d539 Make "makepkg -g" ignore the current architecture.
Commit 663c74150a
(makepkg: merge arch dependent variables after PKGBUILD linting) broke
"makepkg -g" on a PKGBUILD which did not include the current architecture, by
moving the lint_pkgbuild call before GENINTEG was processed.
Fix that by setting IGNOREARCH for the "-g" option.

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20 14:01:53 +10:00
Allan McRae
3cb1669e07 libmakepkg: increase robustness of the detection of array variables
Extract array detection into its own utility function that ensures
extglob is enabled.

Suggested-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20 14:01:53 +10:00
Allan McRae
0fa695d0e3 repo-remove: fix checking for non-existent .db database
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-02-20 14:01:53 +10:00
Allan McRae
e910d45ac0 Update translations
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-30 10:13:55 +10:00
Allan McRae
47ea63ff3b makepkg: do not run prepare() and pkgver() with --repackage
Bug introduced with commit 8454daa7.

Reported-by: Zuyi Hu <hzy068808@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-25 15:23:16 +10:00
Zuyi Hu
765e29b67c Fix testing of arrays status for arch specific variables
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-25 12:36:50 +10:00
Allan McRae
ad65462a05 Pull translations updates from Transifex
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-17 13:39:02 +10:00
Allan McRae
4742f5929d Update copyright years for 2016
make update-copyright OLD=2015 NEW=2016

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04 13:27:08 +10:00
Florian Pritz
a671fa497c makepkg: Output full URL in case of download failure
Most entries in $sources contain variables so finding out why a URL
fails to download is hard because one has to manually replace the
variables when looking at the PKGBUILD. Simply output the full URL here
so that it can be easily seen what is wrong.

Old:
==> ERROR: Failure while downloading example-1.2.4.tar.gz

New:
==> ERROR: Failure while downloading http://example.org/releases/1.1/example-1.2.4.tar.gz

With the new format it is much more obvious that the directory name is
the culprint (1.1 vs 1.2) while the old one would not display that
information.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-15 20:34:30 +10:00
Allan McRae
8454daa7fe makepkg: run pkgver() and prepare() with --noextract
Modifications made to the source before running with --noextract may alter
the version string returned by pkgver(). Always run this function if present
and check build status before proceeding.  Fixes FS#46800.

Also run prepare() when --noextract is used (unless --noprepare is specified).

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-15 20:28:48 +10:00
Allan McRae
f98541400b Pull translations from Transifex and prepare for next release
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-09 16:11:58 +10:00
Allan McRae
137ea39fa1 makepkg: record build information in .BUILDINFO
This information can be used to reproduce build conditions, which can then be
used to determine if a package builds reproducibly.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-06 10:20:53 +10:00
Luke
9cdfd18739 makepkg: add whirlpool to the list of hashing algorithms
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-06 10:11:33 +10:00
Allan McRae
23f128ad5e lint_pkgbuild/variable: increase robustness
Approach the detection of variables of the wrong type using an approach
similar to that used for construction of .SRCINFO files. While doing silly
things in bash could still result in false negatives, this approach should
be very robust to generatinf false positives results.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-23 16:03:33 +10:00
Allan McRae
663c74150a makepkg: merge arch dependent variables after PKGBUILD linting
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-23 16:02:32 +10:00
Allan McRae
ef1fb0ef81 makepkg: remove obsolete comment
Behaviour changed in commit dce82f9d.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-23 11:13:39 +10:00
Allan McRae
c26e5b81e5 lint_pkgbuild: explicitly return value
Set the return value to be local and always explictly returns it.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-23 11:13:39 +10:00
Aaron Campbell
bf0e8e6b43 Refactor lint_source to work with earlier versions of Bash
Negative subscripts to indexed arrays are not supported before 4.2.  However,
since substring expansion works on arrays, we can specify an offset of -1 to
be taken relative to one greater than the maximum index of the specified
array (see Parameter Expansion section of the bash man page).  This works with
both Bash 4.1 and 4.2, and 4.1 is already the oldest supported by pacman.

Signed-off-by: Aaron Campbell <aaron@monkey.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-05 11:55:17 +10:00
Allan McRae
d8621b981e scripts/po: fix translated file name
This file was renamed during review and its entry in POTFILES.in was not
updated.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-28 17:04:08 +10:00
Benjamin Yates
1142a32c7f makepkg: fix $pkgname element duplication
run_split_packaging did not preserve the $pkgname array correctly, and
would create duplicate entries in the list during restore.

After restoring the backup (a b c) would become (a b c b c).

This probably went unnoticed because during --install, pacman would
reconcile the duplicates.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-28 13:26:25 +10:00
Allan McRae
960b64553d libmakepkg: fix pkgver checking
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27 20:44:57 +10:00
Mohammad Alsaleh
9809102237 makepkg: Fix hard-coded debug suffix
Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-22 09:40:37 +10:00
Jan Alexander Steffens (heftig)
2c72c8b822 makepkg: Set CCACHE_BASEDIR to make paths in $srcdir relative
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19 14:33:30 +10:00
Jan Alexander Steffens (heftig)
2627b423ff makepkg: Correctly layer distcc and ccache
ccache expects further compiler wrappers to be specified via
CCACHE_PREFIX. Otherwise, ccache will hash the wrapper executable
instead of the real one.

Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19 14:33:17 +10:00
Jan Alexander Steffens (heftig)
70e6875ad9 libmakepkg: Add check_buildoption for distcc and ccache
makepkg used to check OPTIONS too, which could override
BUILDENV. Implement a new function that handles these
options more like OPTIONS.

This also reduces code duplication a bit.

Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19 14:32:59 +10:00
Allan McRae
5d4a3f101c makepkg: separate "sourcefile" into two words
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19 14:25:35 +10:00
Allan McRae
5301d3fe8f Remove space before ellipses
Makes all use of ellipses consistent...

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19 13:48:56 +10:00
Allan McRae
e8deba3b87 makepkg: remove ability to build individual packages
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-23 01:02:23 +10:00
Allan McRae
0adb74b293 libmakepkg: remove declaration of unused local variables
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22 16:11:32 +10:00
Allan McRae
dd3fe853b3 libmakepkg: return 1 on error in arch array
The return value was being assigned when an error was found in a PKGBUILD's
arch array but it never was returned.

Also remove error message explaining about adding the arch array to a PKGBUILD.
That was added a long time ago when the arch array first became compulsory.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22 16:06:29 +10:00
Allan McRae
19e61a9e07 libmakepkg: update .gitignore
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22 15:11:52 +10:00
Allan McRae
be503c6eac makepkg: remove FORCE_VER variable
This variable is no longer in VCS building.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-22 14:54:03 +10:00
Allan McRae
486643083c libmakepkg: check if PKGBUILD variables are arrays or not as appropriate
When extracting variables from PKGBUILD (e.g. for .SRCINFO creation) we make
assumptions about whether variables are arrays or not.  This adds a check to
the PKGBUILD linter to ensure variables are arrays or not as appropriate.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-07 11:22:00 +10:00
Allan McRae
1586b23080 libmakepkg: util/pkgbuild.sh needs processing on build
pkgbuild.sh contained @DEBUGSUFFIX@ and so needs to be run through the sed
command on build.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-07 11:21:59 +10:00
Allan McRae
b8c9385b8b Remove ko_KR translation
The "ko_KR" locale is the same as the "ko" locale.  Remove the "ko_KR" variant
as it is incomplete and has been superseded by "ko" on transifex.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-08-08 10:36:03 +10:00
Allan McRae
877578762c libmakepkg: move color settings to function
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20 14:56:12 +10:00
Dave Reisner
445aa3b52c dont remove x bit when marking pkgdir RO
f170a94c13 potentially causes $pkgdirbase/$pkg to be undeleteable
with -R or -C if a previous build was interrupted. We simply can't
traverse to this directory, and rm blows up.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20 12:50:25 +10:00
Allan McRae
bbab90836b libmakepkg: lint_package requires cd_safe
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20 11:43:27 +10:00
Johannes Löthberg
4b0bc2cf97 repo-add: Reject armored signatures
Pacman cannot handle armored signatures, so make repo-add error out if
one is detected.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-06-20 17:32:57 +10:00
Johannes Löthberg
aa9aa343cb makepkg: Add flag for printing SRCINFO to stdout
This commit adds a makepkg option to generate and print the SRCINFO file
for a PKGBUILD, required by the new AUR, to stdout.

AUR 4.0 will use Git instead of source tarballs for uploading packages,
so making makepkg capable of printing the SRCINFO would simplify package
management, instead of having to extract it from a source tarball.

It is also useful for scripting other things, so that instead of having
to parse PKGBUILDs, one can make makepkg generate the SRCINFO and then
you can parse that instead, which is much simpler and less error-prone.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-06-20 17:32:57 +10:00
Johannes Löthberg
2bed2090fb repo-add: Generate unarmored DB signature
Pacman cannot handle armored signatures, so use gpg's --no-armor flag to
force an unarmored signature.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-06-20 17:32:57 +10:00
Allan McRae
3d4529335c libmakepkg: extract functions for source download and extraction
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19 23:43:00 +10:00
Allan McRae
1a17249159 libmakepkg: extract functions for handling source URLs
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19 23:43:00 +10:00
Allan McRae
366adc3bb0 libmakepkg: fix test style
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19 23:43:00 +10:00
Allan McRae
23e3c48526 libmakepkg: move more functions for extracting information from PKGBIULDs
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19 23:43:00 +10:00
Allan McRae
15b6cecdd5 libmakepkg: extract more utility functions
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-19 23:43:00 +10:00
Allan McRae
8ab106eb9b libmakepkg: extract get_full_version and get_pkg_arch
These functions group in with other functions that extract PKGBUILD
information.

Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-16 14:10:42 +10:00