Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2015-02-20Update translations from TransifexAllan McRae
2015-02-14Update translations from TransifexAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-14Fix Bazaar cloning in makepkg.Renato Silva
There was some manual check to know if the local repository was really a clone of the one specified in PKGBUILD. This check has been removed because it is buggy and not necessary. It is buggy because this check needs to be semantic, not a simple string comparison. For example, I was blocked from building a PKGBUILD because Bazaar was returning two different strings for the same location (for HTTP one was url-encoded while the other was not, and for local paths one was absolute while the other was relative). While this may be a bug in Bazaar, the check is unreliable since the comparison is not semantic (http://foo.com/%2Bplus and http://foo.com/+plus obviously refer to the same location for example). Specially, it is useless because the intention is updating the existing local clone. However, if the local clone is not a real clone of the repository specified in PKGBUILD (which was what this buggy check tried to tell), next step which is a pull operation will fail anyway. This is because bzr pull does not perform merges, it just makes one branch into a mirror of another. There was a reason provided when this manual check was added for Git, but no reason provided for copying such check when Bazaar support was added, see commits below. In fact, Mercurial lacks such manual check. * c926c39b0481ec3db931fff1f86db0c49d78976b * 3b02f80dcb3159a7ab0c673d5eae971ad7504e7f Fixes FS#43448. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01makepkg: refix removing static libraries when shared uses absolute symlinksAllan McRae
Commit 9e5e86aa was supposed to fix this. Instead I picked another [[ -f ]] statement in the same region and added the hardlink test to it instead, thus not fixing the bug. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01makepkg: Set the working copy destination explicitly when cloning in extract_gitLukáš Jirkovský
This fixes the issue where if the user explicitly set the name of the cloned source to eg. foo.git, the directory name in $SRCDEST would be foo.git as expected, but the clone in $srcdir would be stripped of the .git suffix. Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-12makepkg: clear destination array in array_buildAllan McRae
If an already used array is passed array_build, some entries from the old array could be carried over if the old array was longer than the new one. Clear the destination array before adding elements to it to prevent this issue. Fixes: https://bugs.archlinux.org/task/43387 Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11makepkg: restore attr merging for write_pkginfoDave Reisner
acc639adf20d removed this, but shouldn't have. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11makepkg: avoid nested quoting in string replacementDave Reisner
I suspect this is just wrong -- you never need to quote the replacement side of a PE. In bash 4.3, this is essentially a no-op, but because of a bug in bash 4.2, we get embedded quotes as a result of this replacement. The relevant changelog item in bash is: Fixed a bug that caused single quotes that resulted from $'...' quoting in the replacement portion of a double-quoted ${word/pat/rep} expansion to be treated as quote characters. But this doesn't apply to us. Let's just drop the excessive quoting... Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11makepkg: fix removing static libraries when shared use absolute symlinksAllan McRae
When a shared library uses an absolute symlink for its its .so file, the check if the shared version of a static library exists fails. Test for the presence of a broken symlink too. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02makepkg: avoid expansion of var in arithmetic contextDave Reisner
This bombs out when "$trusted" expands to the empty string. We're better off passing the var by name and letting bash default to "0" when the var is empty Fixes: https://bugs.archlinux.org/task/43269 Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28Fix .SRCINFO output with architecture specific fieldsAllan McRae
Do not merge the architecture specific fields when creating a .SRCINFO file. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-27makepkg: fix typo in dep array nameDave Reisner
We fixed this up to check architecture specific sources in ec679e09b2, but fudged the array name in the in_array call. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24makepkg: properly correlate checksums for multiple sourcesDave Reisner
Previously, we used a single boolean value to determine correlation of sources to checksums. Since the introduction of arch-specific sources, this is no longer sufficient, as we must ensure that we have checksums for (potentially) multiple source arrays. This change inlines the logic of have_sources to build an associative array of source array names, unsetting them as we discover their checksums. The error condition then becomes a non-empty correlation array. Fixes: https://bugs.archlinux.org/task/43192 Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24pacman-db-upgrade: set umask 022Peter Wu
This prevents the database from becoming inaccessible for non-root users when the script was executed with a umask of 027. Signed-off-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24makepkg: download sources for all architectures when making source packageAllan McRae
We validated all sources when making a source package, whether or not they are included in the tarball. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24pacman-db-upgrade: be more verboseAllan McRae
People have mentioned that the silent upgrade to DB version 9 when no adjustments are needed for directory symlinks is confusion. Always print the upgrading message. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22makepkg-template: Remove unused printf format stringFlorian Pritz
I'm pretty sure this is some kind of left over stuff that was supposed to print the filename, linenumber and line content. This is already done so just remove it. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-22Check architecture specific fields for VCS supportAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-21Fix double spaces in "Running %s as root is not allowed" messageTimothy Redaelli
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19Update translations from transifexAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18makepkg: correctly add changelog filesDave Reisner
Before this, we'd see bizzare behavior of: -> Adding changelog file (systemd.install)... And, changelog files in the global section would not be added at all. The code is clearly wrong here, as it references 'install' within a loop of 'changelog' and 'install'. Let's use parameter indirection to ensure that the proper file is identified and added. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-26pacman-db-upgrade: fix issue with find argument list length overflowAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-21pacman-key: compatibility with gnupg-2.1Tobias Powalowski
GnuPG 2.1 no longer allow empty passphrases by default. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19Fix translation error and remove empty po filesAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Update po files to send to TransifexAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Pull translation updates from TransifexAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18makepkg: symlink files in noextract into $srcdirAllan McRae
File in noextract should still be symlinked into $srcdir so that they can be accessed without using $SRCDEST. Using noextract on VCS files makes no sense as these are not being extracted, so now this does nothing. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17makepkg: svn: update existing sources in srcdir without removing them first.Lukáš Jirkovský
This matches the behaviour with non-VCS sources. It also allows incremental builds when subversion is used to obtain sources. Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17makepkg: only strip vcs prefixes from front of urlAndrew Gregory
Referenced by FS#41811 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17makepkg: do not strip bzr+ from bzr+ssh urlsAndrew Gregory
bzr does not recognize bare ssh:// urls. Fixes FS#41811 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17makepkg: bzr: update existing sources in srcdir without removing them first.Allan McRae
The local changes are discarded when updating. This matches the behaviour when non-VCS sources are used. It also allows incremental builds. This also changes the checkout during bzr source "extraction" to a heavyweight checkout so that pulling a specific revision does not alter the original download. Original-work-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: hg: update existing sources in srcdir without removing them first.Lukáš Jirkovský
The local changes are discarded when updating. This matches the behaviour when non-VCS sources are used. It also allows incremental builds. Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: checkout a revision specified in SVN fragment in download_svn.Lukáš Jirkovský
Previously the sources were dowloaded in HEAD revision in the download_svn(). If a specific revision was requested in fragment, the code was updated to that revision in extract_svn(). However, because SVN is a centralized system, this means that the changed sources has to be downloaded again. By moving the fragment handling to download_svn(), we get the correct revision without having to download it later in extract_svn(). Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: git: update existing sources in srcdir without removing them first.Lukáš Jirkovský
The local changes are discarded when updating. This matches the behaviour when non-VCS sources are used. It also allows incremental builds. Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: improve stripping pkgdesc of whitespace for .PKGINFOAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: introduce .SRCINFO files for source packagesDave Reisner
Similar to .PKGINFO, .SRCINFO provides structured metadata from the PKGBUILD to be included with source packages. The format is structured such that it contains a "pkgbase" and one to many "pkgname" sections. Each "pkgname" section represents an "output package", and inherits all of the attributes of the "pkgbase" section, and then can define their own additive fields. For example, a simple PKGBUILD: pkgbase=ponies pkgname=('applejack' 'pinkiepie') pkgver=1.2.3 pkgrel=1 arch=('x86_64' 'i686') depends=('friendship' 'magic') build() { ...; } package_applejack() { provides=('courage') ...; } package_pinkiepie() { provides=('laughter') ...; } Would yield the following .SRCINFO file: pkgbase = ponies pkgdesc = friendship is magic pkgver = 1.2.3 pkgrel = 1 arch = x86_64 arch = i686 depends = friendship depends = magic pkgname = applejack provides = courage pkgname = pinkiepie provides = laughter The code to generate this new file is taken a project which I've been incubating[0] under the guise of 'mkaurball', which creates .AURINFO files for the AUR. AURINFO is the exactly same file as .SRCINFO, but named as such to make it clear that this is specific to the AUR. Because we're parsing shell in the packaging functions rather than executing it, there *are* some limitations, but these only really crop up in more "exotic" PKGBUILDs. Smoketesting[1] for accuracy in the Arch repos yields 100% accuracy for [core] and [extra]. [community] clocks in at ~98% accuracy (.3% difference per PKGBUILD), largely due to silly haskell packages calling pacman from inside the PKGBUILD to determine dependencies. [multilib] currently shows about 92% accuracy -- a statistic which can be largely improved by utilizing the recently merged arch-specific attribute work. This is also a smaller repo so the numbers are somewhat inflated. In reality, this is only a .8% variance per PKGBUILD. Together, we can make PKGBUILD better. [0] https://github.com/falconindy/pkgbuild-introspection [1] https://github.com/falconindy/pkgbuild-introspection/blob/master/test/smoketest Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: simplify epoch handlingDave Reisner
We can avoid setting a default value for epoch since we intend to mean unset and "0" as the same thing. This is also a more consistent default as the display of epoch=0 is no epoch at all in the full package version. The extra paranoia in get_full_version can be removed due to lint_epoch guarding against non-integer values of epoch. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-09makepkg: ignore empty global attributes in extractionDave Reisner
This bug isn't currently exposed by any of the existing codepaths, but an upcoming patch to introduce SRCINFO files to makepkg will expose this. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04pacman-db-upgrade: fix --config option typoAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-19makepkg: always look for sources in source=()Dave Reisner
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>
2014-10-13makepkg: reorder args to pkgbuild_get_attribute for consistencyDave Reisner
In all other cases, this code gets the outvalue from the final parameter. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-13makepkg: simplify attr matching in extract_function_varDave Reisner
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>
2014-10-13makepkg: show full fingerprint on pgp failureDave Reisner
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>
2014-10-13Revert "makepkg: allow less than the full fingerprint in validpgpkeys"Dave Reisner
This reverts commit 50296576d006d433fbfd4a6c57d5f95a942f7833. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-06pacman-db-upgrade: do not mangle file listsAndrew Gregory
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>
2014-09-30makepkg: allow less than the full fingerprint in validpgpkeysDave Reisner
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>
2014-09-30makepkg: move negation in inequality comparisonsDave Reisner
This commit changes the few remaining instances of: [[ ! $foo = "$bar" ]] to the more common: [[ $foo != "$bar" ]] Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-30makepkg: abort if we can't add install/changelog to packageDave Reisner
2014-09-30PKGBUILD: add support for arch-specific sourcesDave Reisner
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.
2014-09-30makepkg: break out checksum generation to its own functionDave Reisner
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.