summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2012-08-04makepkg: only update pkgver when all sources are availableAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: add --holdver to control VCS source updatingAllan McRae1-3/+6
Do not update VCS sources if --holdver is used. If the VCS checkout is not present, it will still be downloaded. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: do not download VCS sources unless neededAllan McRae1-6/+12
VCS sources are not needed for --geninteg or --source operations. This also prevents VCS downloads outputting to stdout, which prevented piping -g output to the PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: rename myverAllan McRae1-4/+4
myver is a bit generic for an internal variable name. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: add support for SVN urlsAllan McRae1-3/+70
Allow SVN repo sources in the form: source=("<folder>::<repo>#<fragment>") where <repo> must start with svn (e.g svn+http://) and a <fragment> can specify a revision (e.g. revision=22). Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: provide mechanism for auto-updating pkgverAllan McRae1-0/+21
Now that VCS repos are provided in the source array, it becomes too complicated to have automatic updating pkgver as was the case with the old VCS PKGBUILDs (there can be multiple repos of different types in the source array, the VCS repo may not be the package primary source, etc). Instead provide an optional way for a PKGBUILD to update the pkgver value through the specifing of a pkgver() function that returns the new version string. This is run after all source files are downloaded so can access the VCS repo if needed. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: modify get_filepath to handle VCS sourcesAllan McRae1-17/+23
With VCS sources, get_filepath should return the directory of the checkout. This allows backing up of the VCS checkout when using --allsource. Fixes FS#21098. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: modify get_filename to handle VCS sourcesAllan McRae1-8/+23
Modify get_filename to return the name of the folder with VCS sources. This fixes output issues in checksum checking. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: fix checksum generation with VCS sourcesAllan McRae1-4/+15
VCS sources should have "SKIP" for their checksum value Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: allow using GIT source URLsAllan McRae1-0/+85
Allow specifing GIT sources using the following syntax source=('<folder>::<repo>#<fragment>') This will download the git repo <repo> into <folder> (into $SRCDIR if set, otherwise $startdir). <repo> must start with "git", but non-git protocols are handled using (e.g.) "git+http://...". The <fragment> can be used to specify a branch, tag, or commit to build from. e.g. branch=maint. Checksum entries for git sources should be "SKIP". Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: skip integrity checking earlyAllan McRae1-11/+13
If "SKIP" is provided for an integrity check, abort checking as soon as possible. Also swap fork to tr for bash4 conversion. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: generalize download_sourcesAllan McRae1-45/+67
In order to treat all VCS sources as URLs, we need to be able to deal with more protocols. Rewrite download_sources to use a case statement so additional protocols are easily added. Also fix the use of scp to not pass the protocol in the URL (noticed by William J. Bowman <wjb@williamjbowman.com>) Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: add function to return download protocolAllan McRae1-0/+11
Extract the download protocol from a source entry. Returns "local" for local source files. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: reorder source handling functionsAllan McRae1-120/+120
There is no actual code change here, but these related functions were all over the place which makes this code difficult to adjust. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-04makepkg: remove VCS package supportAllan McRae1-139/+6
The current VCS packaging support is really, really, really bad. It is best to strip it out completely before rewriting it. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-02pacman-key: Use lsign_keys function in --populatePierre Schmitz1-1/+2
This reduces code duplication and also makes --populate a non-interactive function. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-08-01Merge branch 'maint'Dan McGee1-1/+0
2012-08-01Add a function prepare() to PKGBUILDEnjolras1-0/+11
prepare is run after the source extraction, and is not run with --noextract option. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-01makepkg: remove unnecessary formattingAllan McRae1-1/+0
This extra newline leaves a gap that looks strange in of itself, but is highlighted when piping -g output to a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-01asdeps flag passed from makepkg to pacmanDaniel Wallace1-1/+6
add the asdeps flag for makepkg so that it does pacman -U --asdeps [Allan: clean-up whitespace] Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-25paccache: adopt size_to_humanDave Reisner1-0/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-25scripts/library: add size_to_humanDave Reisner3-1/+26
This function is the reverse of human_to_size, and converts integer byte sizes to human readable SI prefixed values. A logical extension of this might be to mimic the formatter that pacman uses and allow a second argument to be passed in which can coerce the size, rather than reducing until the unit count is below 1024. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-25pkgdelta: use human_to_size to parse --min-pkg-sizeDave Reisner1-6/+7
Update the documentation accordingly to mention that users can expect huamn readable sizes to be acceptable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-25scripts/library: add human_to_sizeDave Reisner3-1/+61
This is a bash wrapper around an awk function that parses human readable sizes and returns their representative values in bytes, as a string. A small test harness is added to validate the functionality. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-25repo-add: add checkdepends informationAllan McRae2-10/+13
Similar to the case for makedepends, it is useful to be able to access this information without parsing a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-25makepkg: install deps with --repackageAllan McRae1-3/+3
I have noticed that quite a number of packages fail with "makepkg -R" when their (make)dependencies are not installed. Adjust makepkg to check for dependencies when used with -R. This can still be avoided by using --nodeps/-d. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-25Allow wildcards in PURGE_TARGETS to match any type of file except for ↵Jeremy Huntwork1-1/+1
directories. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
2012-06-25makepkg: allow url to be overridden in split packagesAllan McRae1-1/+1
This is already being used (despite not working...) in packages in the Arch Linux repos. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-25Portability fixes for makepkgJeremy Huntwork2-29/+23
Allow makepkg to work correctly when used with find from busybox. Fix handling of cross directory symlinks. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-25pkgdelta: add missing --version longoptDave Reisner1-1/+1
This was missed in the switch to parseopts, and was caught by distcheck. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-25Create repo-remove symlink in scripts dirAllan McRae1-5/+7
Fix the creation of the repo-remove symlink in the scripts/ dir on building. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20makepkg: rework libdependsAllan McRae1-39/+61
Rewrite the handling of libdepends. The primary advantage are: - Moves functionality from write_pkginfo() to find_libdepends(). - The order of the depends array in the PKGBUILD is kept in the package. - An unneeded libdepends is only a warning and not an error. This allows putting a libdepend on a library that is dlopened. - It is now modular so can be extended to library types other than ELF *.so. - Finding the list of libraries a package depends only occurs when a libdepend is specified in the depends array. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-05-20repo-add: add makedepends informationAllan McRae1-10/+13
This is useful for tools that automatically rebuild packages and thus require to generate a build order. These entries are skipped by pacman. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20makepkg: write makedepends into .PKGINFOAllan McRae1-0/+2
Currently there is no way to access the makedepends for a package apart from parsing its PKGBUILD. Put these into the .PKGINFO file with the idea of making them available in the repo dbs so that automated build tools can readily determine build order. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20makepkg: Add CPPFLAGS supportAllan McRae1-2/+2
Add CPPFLAGS support in addition to the current CFLAGS and CXXFLAGS. This keeps compiler flags split up in the same logical way done everywhere else. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20Merge branch 'maint'Dan McGee4-187/+202
Conflicts: scripts/pacman-key.sh.in
2012-05-20pacman-key: use mapfile over readDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-20makepkg: use mapfile where plausibleDave Reisner1-6/+5
With bash4 as a requirement, we can use mapfile when reading command output into an array. mapfile has the advantage of using block buffered I/O rather than line buffered I/O, making it slightly faster for most jobs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-20pkgdelta: adopt parseopts for option parsingDave Reisner2-15/+26
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20pacman-key: test for content in keyring filesDave Reisner1-3/+3
Test for file content (-s) rather than just existance (-f). This fixes a bug that manifests itself in the case of an empty -revoked file. A zero element 'keys' array would be passed to gpg, forcing it to list and, subsequently, revoke all known keys. Bug introduced in d1240f67eab6. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20Fix gettext usage in pkgdelta help instructionsDan McGee3-21/+21
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20Update pacman-scripts message catalogDan McGee2-170/+185
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-04pacman-key: clarify messages, s/keychain/keyring/Dan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-30makepkg: fix package arch detectionAllan McRae1-0/+1
get_pkg_arch checked for the arch variable being overridden in the package_$1() function when used with a package as a parameter. However, when there was no override, it did not fall back to the global value. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-04-29pkgdelta/repo-add: quoting fixesFlorian Pritz1-1/+1
Finish the job on master; most of these were applied to maint already. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2012-04-29Merge remote-tracking branch 'dave/buildsys'Dan McGee3-217/+1
2012-04-29makepkg: remove subshelling from check_option and friendsDave Reisner1-58/+79
Instead of creating a subshell for each of these checks (of which there are many), pass in an expected value and make the check_* function do the comparison for us, returning 0 (match), 1, (mismatch), or 127 (not found). For a measureable benefit, I tested this on a fairly simple package, perl-term-readkey, and counted the number of clone(2) syscalls to try and isolate those generated by makepkg itself, rather than the user defined functions. Results as shown below: 336 before 180 after So, roughly a 50% reduction, which makes sense given that a single check_option() call could be up to 3 subprocesses in total. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-29makepkg: null terminate filenames to stripDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-24rankmirrors: move to contrib/Dave Reisner3-217/+0
This script is of questionable value, as it ranks mirrors by an uninteresting attribute: ping. While the script itself is interesting, people should be encouraged to rank mirrors by more useful measures, such as actual speed, locality, or up to date-ness. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-24makepkg: Be more consistent with missing program messageAllan McRae1-1/+1
Also prevent "sudo" and "su" from being translated. Signed-off-by: Allan McRae <allan@archlinux.org>