summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06Update copyright years for 2014Allan McRae7-13/+13
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-21makepkg: fix check for distccMaxime Arthaud1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15makepkg: fix consistency of downloaded sources permissionsSébastien Luttringer1-3/+3
Running 'makepkg -g' or 'makepkg' to download source files results in different permissions on the files if the user has a non-default umask. Put the umask definition at the "beginning" of the makepkg script to ensure all files generated by makepkg have a 0022 umask. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Improve --help switch output for pacman contrib and pacman scriptsJason St. John3-6/+14
Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v<pacman version> one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15Fix typo in pacman-optimizeJason St. John1-1/+1
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Fix whitespace and other formatting issuesJason St. John2-5/+5
This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15makepkg: move update_pkgver out of extract_sourcesAllan McRae1-5/+4
The extract_sources function should be just extracting sources. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Return zero from extract_file with local source fileAllan McRae1-1/+1
The call to bsdtar to check if a file needs extracted returns 1 if it does not. We then propegate this return value accidentally which can cause makepkg to report an error later on. Explicitly return 0 in this case. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-08makepkg: only remove static libraries if they have a shared versionAllan McRae1-1/+6
It is fairly common that packages contain static libraries with no shared counterpart. These should not be removed with !staticlibs. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-01makepkg: Allow "static library" to be translatedAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31makepkg: do not allow badly formatted arch linesAllan McRae1-2/+2
It appears there are a lot of packages with arch=('i686 x86_64') floating around. Quote the arch array when passing as a parameter to detect such things. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-31makepkg: allow empty source arraysAndrew Gregory1-1/+1
Necessary for metapackages. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15makepkg: validate updated pkgver before replacementDave Reisner1-7/+18
Validate the new pkgver efore blindly ramming it into the PKGBUILD. This gives us good feedback and prevents corrupting the PKGBUILD, e.g. ==> Starting pkgver()... ==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace. ==> ERROR: pkgver() generated an invalid version: a horse is not a pkgver As an additional failsafe, exchange a valid for invalid character as command separator in @SEDINPLACE@ expressions. For even more paranoia, exit if sed fails for any reason. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-15makepkg: use source_safe when resourcing BUILDFILEAllan McRae1-1/+1
After updating the pkgver, we still need to safely source the BUILDFILE. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14makepkg: add LIBRARY variableAllan McRae2-0/+5
This points makepkg to where is library is located. Can be overridden by value in the environment. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: Rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
2013-10-14makepkg: run locally with libtool style wrapperAllan McRae3-0/+49
Build makepkg to scripts/.lib/makepkg and add a wrapper script to call it. This is not useful at the moment, but is the first step to allowing makepkg to be split into smaller pieces. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
2013-10-14makepkg: alphabetically order option variablesAllan McRae1-16/+16
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14makepkg: do not refer to src/ or pkg/Allan McRae1-4/+4
Use $srcdir and $pkgdir instead. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Add a -C, --cleanbuild option to clear the source directory before building ↵Lukáš Jirkovský1-2/+11
a package. Implements FS#17175. [Allan: Minor changes to output strings, fix removing of source directory] Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Link non-vcs sources into $srcdir during extractionAllan McRae1-11/+9
The separation between downloading and extracting for non-vsc sources was incomplete due to symlinks being made in $srcdir during the download stage. Have download_{local,file} just ensure the presence of the files in $startdir or $SRCDEST (downloading if needed) and then have extract_file symlink these files into $srcdir. Also replace "continue" with "return" in extract_file to make it clearer what is happening. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Remove makepkg license checkAllan McRae1-13/+0
There is little reason for this field to be checked over all other fields. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Use $srcdir/ rather than src/ in makepkg helpAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: redirect downloader output to STDERRXyne1-1/+1
This allows scripts to safely capture the output of "makepkg -g". Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: include all hash types in integlistXyne1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: use c-style for loops for integrity checksDave Reisner1-27/+24
These loops already maintain an independent loop counter, so cut out the middle man. While this change doesn't necessarily require that we drop support for sparse arrays, we do via this patch. A new lint check is added in check_sanity to abort when a sparse array is encountered. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: always use read's -r flag with filenamesDave Reisner1-5/+5
These are all cases where we're reading filenames -- any backslashes are intentional and should not be interpreted. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: inline creation of checksum indentingDave Reisner1-12/+7
With some simple math and printf formatting tokens, we can create the whitespace necessary for this without the need for a loop and string concatentation. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18makepkg: cleanup a few format string injectionsDave Reisner1-5/+5
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04makepkg: add support for sha224 checksumsDave Reisner1-1/+1
Implements FS#36776. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-04makepkg: unify list of known hash algorithmsDave Reisner1-15/+16
Unifying this list makes adding new algorithms easier. There's also some menial cleanup in this patch to avoid use of eval and properly treat lists of data as array instead of simple strings. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21makepkg: allow make-style environment var overridesDave Reisner1-0/+15
This allows for VAR=value and VAR+=value variable declarations. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21Do not refer to FlySpray numbersAllan McRae1-1/+1
These references to bug numbers assume we will forever be using that bug tracker. It is better to properly comment the code instead (which was done in almost all cases anyway). Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-30Fix whitespace in makepkg.sh.in and makepkg-template.pl.inJason St. John2-5/+5
Replace spaces with tabs in one instance. Remove extra spaces. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-22Install makedepends and checkdepends togetherAshley Whetter1-3/+3
Fixes FS#31557 Signed-off-by: Ashley Whetter <awhetter.2011@my.bristol.ac.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-22Update gitignore files for use with autoreconfAllan McRae1-1/+9
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-22Remove autotools filesAllan McRae1-444/+0
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26Merge branch 'maint'Allan McRae1-1/+1
2013-06-23Respect paths with spaces on --installAndrea Scarpino1-1/+1
makepkg --install doesn't quote the absolute path, so if the path contains spaces pacman -U fails. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18Merge branch 'maint'Allan McRae38-306/+367
2013-06-18Pull translation updatesAllan McRae37-305/+366
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-16makepkg: fix typo for distcc testAllan McRae1-1/+1
Introduced in commit 9dd42dc0. Fixes FS#35741. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06repo-add; add option to remove existing package files from diskPhillip Smith1-0/+12
When maintaining a custom repo, often it is undesirable to retain older versions of packages. This patch adds the --remove option to remove the current package file and it's signature from disk before adding the new one to the database. Documentation is also updated. This is an optional flag and default behaviour (leaving ondisk files alone) is not changed. Signed-off-by: Phillip Smith <fukawi2@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06Merge branch 'maint'Allan McRae40-214/+356
2013-06-06Pull translation updates and regenerateAllan McRae38-203/+348
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-04pacman-key: Do not reinterpret keys from revoked keyringsDave Reisner1-11/+4
Given a revoked keyring containing only: BC1FBE4D2826A0B51E47ED62E2539214C6C11350 We should only disable this specific keyid. This change enforces that the contents of the -revoked keyring file are full fingerprints which can uniquely identify a key. Before: # pacman-key --populate archlinux ==> Appending keys from archlinux.gpg... ==> Locally signing trusted keys in keyring... -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2... -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8... -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887... -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0... -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7... ==> Importing owner trust values... ==> Disabling revoked keys in keyring... -> Disabling key 1390420191... -> Disabling key E2539214C6C11350... -> Disabling key 8544EA82113502DE... ==> Updating trust database... gpg: next trustdb check due at 2014-01-22 After: # pacman-key --populate archlinux ==> Appending keys from archlinux.gpg... ==> Locally signing trusted keys in keyring... -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2... -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8... -> Locally signing key 44D4A033AC140143927397D47EFD567D4C7EA887... -> Locally signing key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0... -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7... ==> Importing owner trust values... ==> Disabling revoked keys in keyring... -> Disabling key BC1FBE4D2826A0B51E47ED62E2539214C6C11350... ==> Updating trust database... gpg: next trustdb check due at 2014-01-22 Partially addresses FS#35478. This does nothing to confirm whether or not the key was successfully disabled -- a ridiculously simple request which appears to be far too difficult for gpg to manage. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-04Restrict pkgname from starting with a dot.Allan McRae1-0/+4
Adding this restriction means we can filter any FILENAME entry from starting with a "/" or a ".". Use the term "dot" as it is more computing relevant compared to "full stop" or "period" which vary depending on English locale. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-30makepkg-template: add --version and some license infoFlorian Pritz1-2/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29makepkg-template: Stop using given/whenFlorian Pritz1-14/+8
given/when has been marked experimental in perl 5.18 because it will change it 5.20. if/else is ugly, but hiding the generated warning is no good solution either, so we us if/else for now. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29makepkg-template: Add gettext supportFlorian Pritz2-27/+48
This also slighty changes the word order in the description for --newest. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29Add makepkg-templateFlorian Pritz3-0/+180
This allows for somewhat easy templating for PKGBUILDs. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>