summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
...
* makepkg: remove VCS package supportAllan McRae2012-08-04
| | | | | | | 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>
* Merge branch 'maint'Dan McGee2012-08-01
|\
| * makepkg: remove unnecessary formattingAllan McRae2012-08-01
| | | | | | | | | | | | | | | | 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>
* | Add a function prepare() to PKGBUILDEnjolras2012-08-01
| | | | | | | | | | | | | | prepare is run after the source extraction, and is not run with --noextract option. Signed-off-by: Dan McGee <dan@archlinux.org>
* | asdeps flag passed from makepkg to pacmanDaniel Wallace2012-08-01
| | | | | | | | | | | | | | | | | | 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>
* | repo-add: add checkdepends informationAllan McRae2012-06-25
| | | | | | | | | | | | | | 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>
* | makepkg: install deps with --repackageAllan McRae2012-06-25
| | | | | | | | | | | | | | | | | | 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>
* | Allow wildcards in PURGE_TARGETS to match any type of file except for ↵Jeremy Huntwork2012-06-25
| | | | | | | | | | | | directories. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
* | makepkg: allow url to be overridden in split packagesAllan McRae2012-06-25
| | | | | | | | | | | | | | | | 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>
* | Portability fixes for makepkgJeremy Huntwork2012-06-25
| | | | | | | | | | | | | | | | 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>
* | makepkg: rework libdependsAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: write makedepends into .PKGINFOAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: Add CPPFLAGS supportAllan McRae2012-05-20
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: use mapfile where plausibleDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: fix package arch detectionAllan McRae2012-04-30
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: remove subshelling from check_option and friendsDave Reisner2012-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: null terminate filenames to stripDave Reisner2012-04-29
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: Be more consistent with missing program messageAllan McRae2012-04-24
| | | | | | | | | | | | Also prevent "sudo" and "su" from being translated. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: treat list of packages to be installed as an arrayAllan McRae2012-04-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: deal with overriden package arch properlyAllan McRae2012-04-24
| | | | | | | | | | | | | | | | | | | | This fixes a lot of checks done by makepkg (e.g. to see if a package is already built and choosing which package to install). Previously, if a package had both "i686" and "any" versions, the "i686" one always took precidence regardless of the value of "arch" in the PKGBUILD for that package. Fixes FS#27204. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-24
|\| | | | | | | | | Conflicts: scripts/repo-add.sh.in
| * makepkg: restrict allowed characters in pkgnameDave Reisner2012-04-20
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | scripts: avoid dumping usage on parser failDave Reisner2012-04-24
| | | | | | | | | | Avoid letting the error message from parseopts get lost in the usage output from pacman-key and makepkg (which is already verbose).
* | makepkg: allow specifying --pkg multiple timesDave Reisner2012-04-24
| | | | | | | | | | | | | | | | Make this option additive, so that the following two operations are equivalent: makepkg --pkg foo --pkg bar makepkg --pkg foo,bar
* | makepkg: adopt parseopts for option parsingDave Reisner2012-04-24
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: save and restore shopts when sourcing /etc/profileAllan McRae2012-04-08
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: complain when the buildfile isn't writeableDave Reisner2012-04-08
| | | | | | | | | | | | | | | | If the PKGBUILD isn't writeable for devel_update, throw a warning instead of silently ignoring it. Some logical reordering is present in this patch to reduce the number of nested if's. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: catch errors sourcing filesDave Reisner2012-04-08
| | | | | | | | | | | | | | create source_safe() function which temporarily disables extglob and exits on error. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: restrict usage of errexit to user functionsDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | It's expected that this will lead to unwanted behavior, and needs widespread testing. It's desirable to commit this for a few reasons: - there's no reason we can't do our own error checking for code that we write. - it avoids the need for ||true hacks scattered about in the code. - it makes us immune to upstream changes in exit codes (FS#28248) Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: treat lib{provides,depends} returns as proper arraysDave Reisner2012-04-08
| | | | | | | | | | | | | | | | Make these functions more whitespace space by treating newlines as the element delimiter rather than every form of whitespace. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: use proper array addition in libdepsDave Reisner2012-04-08
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add missing newline from libprovides outputDave Reisner2012-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | This was a small oversight from 1917c845 which causes makepkg to write provides entries to the .PKGINFO file improperly, e.g. provides = systemdlibsystemdudev=999 Add a newline in the printf format to ensure that these are spaced appropriately. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: safely change directoriesAllan McRae2012-04-07
| | | | | | | | | | | | | | | | | | In preparation for the removal of the global error trap we need a way to ensure changing directories succeeds. Add a "cd_safe" wrapper that performs the necessary check. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: use printf rather than echo to output variableAllan McRae2012-04-07
| | | | | | | | | | | | | | Also make sure the strings passed to %s in printf are always quoted. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: the rhs in string comparisons should be quotedAllan McRae2012-04-07
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: devel_check(): cleanup for hg versionMatthew Monaco2012-04-07
| | | | | | | | Use pushd/popd, quote args, handle some more errors
* | makepkg: devel_check(): set newpkgver (cleanup)Matthew Monaco2012-04-07
| | | | | | | | | | The case structure allows the syntax to focus on what's actually being done here.
* | makepkg: devel_check(): consolidate common codeMatthew Monaco2012-04-07
| |
* | makepkg: devel_check(): determine vcsMatthew Monaco2012-04-07
| | | | | | | | | | Rather than prioritizing an arbitrary VCS, collect all development directives. If there is more than one, give a warning and abort.
* | makepkg: remove unused variableMatthew Monaco2012-04-07
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-07
|\| | | | | | | | | | | Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
| * Revert "parseopts: normalize options into an array"Dave Reisner2012-04-07
| | | | | | | | | | | | | | | | | | | | | | | | This was really only half a fix for FS#28445, as it still doesn't correctly handle the case of filenames with spaces. In the short term, there is no obvious fix for this. In the long term, I believe the correct decision is to rewrite the options parser to be more in line with GNU getopt_long. This reverts commits: ca4142714137b16feabac09c4cda86b0a75036f8. 969dcddbdf9d5dbd91aa414cdd193f3fb26b644b.
| * makepkg: avoid reporting bogus install size on btrfsDave Reisner2012-03-28
| | | | | | | | | | | | | | | | | | | | | | | | delayed allocation hoses us here and causes erroenous install sizes to be reported. Add a short sleep to allow the transaction to be committed to the filesystem and the stat buffers to be updated. This is apparently a "feature", as per to some of the denizens of #btrfs on freenode. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Revert "makepkg: calculate exact total file size"Dan McGee2012-04-07
| | | | | | | | | | | | This reverts commit b264fb9e9ddcc31dc8782390309421965e507383. With our "fix" of sleeping for BTRFS, we can go back to using `du` to calculate total installed size.
* | Merge branch 'maint'Dan McGee2012-03-16
|\| | | | | | | | | Conflicts: lib/libalpm/sync.c
| * makepkg: quote removed filename as it can have spacesAllan McRae2012-03-16
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: abort when failing to create BUILDDIRAllan McRae2012-03-16
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: prevent issues with files starting with a hyphenAllan McRae2012-03-16
| | | | | | | | | | | | | | | | | | Most places in makepkg deal with full file paths, but a few use the file name only. Protect from potential issues when a file name starts with a hyphen. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: append pkgbase to BUILDDIR if specifiedAllan McRae2012-03-16
| | | | | | | | | | | | | | | | | | This means multiple packages can be build using the same BUILDDIR without their source files all ending up extracted in the same directory. Fixes FS#28417. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-03-08
|\| | | | | | | | | Conflicts: lib/libalpm/be_package.c