summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
Commit message (Collapse)AuthorAge
* makepkg: add packages to pkgdeps list only after successful installAllan McRae2008-07-24
| | | | | | | | | | | | | | This fixed FS#9403. With this you can use "makepkg -sr", install the dependencies, Ctrl+c during the makedepends installation and have makepkg remove the installed packages on the exit. Previously makepkg tried to also remove the makedepends which were not installed. The deplist="" line in remove_deps is due to an obscure bug where local varaibles from the handle_deps function seem stay in scope because we never formally exited it. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Make strip paths configurableAllan McRae2008-07-20
| | | | | | | | | This patch introduces a new STRIP_DIRS makepkg.conf option to change makepkg's search path when stripping binaries. Original work by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Strip *.a libraries in makepkgAllan McRae2008-07-19
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Use LC_ALL=C everywhereAllan McRae2008-07-19
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Use "pacman -S $dep" in makepkg's dependency resolvingNagy Gabor2008-07-15
| | | | | | | | This method is equivalent with pacman's resolvedeps. $dep can be any (versioned) dependency. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: speed up svn revision check for large repositoriesDan McGee2008-07-15
| | | | | | | | Using the suggestion from FS#10905, use 'svn info' rather than 'svn log' to get the current revision number, which is much quicker for large Subversion repositories. Eventually git will rule the world. :) Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2008-07-07
|\
| * Remove symlinks to libtool filesAllan McRae2008-06-27
| | | | | | | | | | | | | | | | This prevents dangling symlinks to removed libtool files when the !libtool option is used. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Additional path quoting and srcdir/pkgdir usageAllan McRae2008-06-22
| | | | | | | | | | | | | | | | Removes the remaining $startdir/{src,pkg} usage and adds quoting around (hopefully) all remaining path variables Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add several quotes needed after nullglob.Xavier Chantry2008-06-15
| | | | | | | | | | | | | | | | | | | | After the "shopt -s nullglob" change, all regular expressions should be properly quoted. This commit only fixes the ones I found, there are probably others left, so this should be kept in mind for easier future fixing. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Add missing quotes for the source array.Xavier Chantry2008-06-15
| | | | | | | | | | | | | | Now makepkg can handle filenames with whitespaces in the source array. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use openssl for checksum verification instead of *sum utilitiesSebastian Nowicki2008-06-15
| | | | | | | | | | | | | | | | | | | | | | md5sum, sha1sum, etc, do not exist on BSD systems by default. Openssl is a good portable alternative. This also brings in a dependency for openssl. Closes FS#10530. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move geninteg block in makepkg before error checkingAllan McRae2008-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the generating of integrity checks to before any error checking takes place in the PKGBUILD file. This allows integrity generation to complete when unrelated errors exist in a PKGBUILD file and allows the removal of multiple checks of the GENINTEG variable that would otherwise be needed. In addition a minor fix is made to a comment. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-06-12
|\|
| * Don't require --force when using the --nobuild optionAnton Fiuman2008-06-01
| | | | | | | | | | | | | | | | makepkg should not abort with error when a user uses the --nobuild option to extract sources if a package has already been built. Signed-off-by: Anton Fiuman <llexiw@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use shell builtin to list files for package inclusionDan McGee2008-06-12
| | | | | | | | | | | | | | | | | | | | | | On BSD systems, as super user, the 'ls' command displays all dot files by default, causing these to get included when not intended. If we use the bash glob operator, we can avoid issues with ls on different platforms; however, we need to turn the nullglob shell option on first to ensure we don't have problems in empty directories. Originally-noticed-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove deprecated --usesudo codeDan McGee2008-06-08
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: add --allsource optionAllan McRae2008-06-08
| | | | | | | | | | | | | | | | | | | | This supplements the --source option and does nearly the same thing, except downloaded source files are included in the archive as well. The sources are now packages with a pkgname/ prefix. Original-work-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove some dead TODO codeDan McGee2008-05-31
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg - add check for valid options in PKGBUILDAllan McRae2008-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the code block in makepkg that checked for depreciated options in a PKGBUILD and provided a workaround. Unknown and depreciated options are upgraded to error conditions. Also, removed TODO regarding including install script if exists and $install is unset. That should never happen. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | No error in makepkg when removing deps failsAllan McRae2008-05-29
| | | | | | | | | | | | | | | | Catches error from when pacman is unable to remove dependencies after successfully building package and prints warning. Fixes FS#10039. Signed-off-by: Allan McRae <mcrae_allan at hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use chown 0:0 instead of root.rootSebastian Nowicki2008-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | On BSD systems using a dot as a separator is not allowed. On Mac OSX it is deprecated. A colon should be used instead. BSD systems also use the "wheel" group instead of "root" to indicate the "super user" group. Both groups use the id of 0. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Acked-by: Aaron Griffin <aaronmgriffin@gmail.com> Acked-by: Dan McGee <dan@archlinux.org> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use "legacy mode" on Mac OSX (for file command)Sebastian Nowicki2008-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | For some reason `file` on Mac OSX has different arguments than BSD and Linux; -i no longer prints out the mime strings. With the environment variable COMMAND_MODE set to "legacy", `file` behaves more like it does on Linux and BSD, i.e., `file -i` prints the mime type. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Acked-by: Dan McGee <dan@archlinux.org> Acked-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Allow an unprivileged user to create packages without fakerootSebastian Nowicki2008-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fakeroot was not in BUILDENV and the user was not root, makepkg still tried to use fakeroot for building packages. BUILDENV is now checked to see if fakeroot is enabled. If it is not enabled the package can still be built, but root will not have ownership of files. This is useful when users want to make packages for personal use and don't care about ownership. Closes FS#10450. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | du -b is not available on BSD, use du -k instead.Xavier Chantry2008-05-29
| | | | | | | | | | | | | | | | | | | | | | This fixes FS#10459. There is apparently no portable ways to get the apparent size of a file, like du -b does. So the best compromise seems to get the block size in kB, and then convert that to byte so that we keep compatibility. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Replace usage of "cp -s" with the more portable "ln -s"Sebastian Nowicki2008-05-29
| | | | | | | | | | | | | | | | | | | | | | The "-s" argument does not exist on BSD, and neither does "--remove-destination". This patch replaces the calls to "cp -s --remove-destination" with the equivalent "rm -f" and "ln -s" calls, in order to increase portability. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove --builddeps from makepkgDan McGee2008-05-13
| | | | | | | | | | | | | | This really should be in an external script, as it is not makepkg's job to rebuild your system. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Unify start and end messagesDan McGee2008-05-10
| | | | | | | | | | | | | | | | I've always found it odd why the package version is shown at the start but not the end of the package build. Fix it, and while we are at it, add the $CARCH variable to the display too. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-04-29
|\|
| * makepkg: fix strip section to allow spaces in pathsDaenyth Blank2008-04-27
| | | | | | | | | | | | | | | | | | | | | | Inside tidy_install, change the section which strips libraries to use find | while read rather than for foo in `find`. This should allow whitespaces in filenames to still be processed correctly. This fixes FS#10294. Signed-off-by: Daenyth Blank <Daenyth+git@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add zipman makepkg option.Chantry Xavier2008-03-16
| | | | | | | | | | | | | | | | | | | | | | | | All other steps in tidy_install function were already controlled by an option in makepkg.conf, so this patch adds an option for the man page compression step too. This will allow to keep man pages uncompressed, which is required for some special meta man page, like the zshall one (see FS#4580). Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011472.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* | makepkg: Support for resuming source downloadsRoman Kyrylych2008-03-10
|/ | | | | | | | | | | | | | | | | Download to *.part and remove the suffix if successful, thus md5sums will be checked only for complete files, and next time makepkg will resume downloading of partial file instead of complaining about invalid md5sums. Old DLAGENTS format is still supported. Late fix: Do not try to download %u first The output of grep was not suppressed, thus the output of get_downloadcmd was wrong because of extra line at the beginning that contained an unsubstituted (with %o and %u) entry from DLAGENTS. Signed-off-by: Roman Kyrylych <roman@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove small remnant of old force=y optionDan McGee2008-02-27
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix two missing BUILDSCRIPT variables in makepkg.Mark Constable2008-02-20
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* scripts: allow usage when gettext is not installedDan McGee2008-02-17
| | | | | | | | | | | Address the issue of our scripts not working so great when gettext is not available. This has come up in multiple bug reports, and is relatively easy to address by adding a simple check and a stub function if gettext was not found that simply echos the original message. Addresses concerns from FS#9214 and FS#9607. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg : set sane umask before source extraction.Chantry Xavier2008-02-11
| | | | | | | | | | | This fixes FS#9242 and FS#9362. Set umask before the sources are extracted, and after the /etc/profile.d/* files are sourced in handledeps. This sourcing of profile.d files is why umask was moved to the build function in the first place, as can be seen in commit ac965ed401. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* makepkg: do a quick check for the VCS binariesDan McGee2008-02-07
| | | | | | | Fixes FS#9230. Ensure we have the VCS binaries available when doing the development version number checking. Signed-off-by: Dan McGee <dan@archlinux.org>
* add 'force' to PKGINFO, have repo-add respect it.Chantry Xavier2008-02-02
| | | | | | | | Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-January/011023.html Also see FS#9347 and FS#9349. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: ensure binaries in /opt/* are strippedDan McGee2008-01-27
| | | | | | | The path selection for stripping binaries was slightly off, so any binaries in subdirectories of opt/ were missed. Fixes FS#9342. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg : improve determination of svn revision.Chantry Xavier2008-01-27
| | | | | | | | | | | | | | | | | | | | | The previous sed command matched every line starting with r. For example, with mpd-svn package in aur, the svn log output was rather big, and there were several lines starting with r (the actual revision : r7155, but also other lines starting with reverting and run), so this broke makepkg: > makepkg ==> Determining latest svn revision... -> Version found: 7155 everting un sed: -e expression #1, char 27: unterminated `s' command To make the sed command more bullet proof, I added the -q option of svn log, which produces a quieter output, without the log. And I changed the sed command to only match numbers for the revision. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* workaround for a gettext string starting with --.Chantry Xavier2008-01-20
| | | | | | | Workaround found in Advanced Bash-Scripting Guide, localization section. "added a \0 (NULL) at the beginning of the sentence." Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* makepkg: add check to ensure we have non-URL files in build dirDan McGee2008-01-20
| | | | | | | | | | | | | | Pacman 3.0 printed the following message if a file could not be found: ERROR: xxx was not found in the build directory and is not a proper URL. We lost this logic in 3.1 when moving to the DLAGENT type stuff, so a not-found file got passed all the way to the download logic where it failed with a odd error message. Bring back some logic to ensure only files with URLs get past a certain point, and fail if the file is not available. Fixes FS#9208. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Oops! Lost the colon after forcever in opts parsingDan McGee2008-01-13
| | | | | | | I screwed this up here: 916e226b7839e38d9245ecbef396eb5ba5b6a224 Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Introduce --holdver option to prevent bumped pkgrelScott Horowitz2008-01-13
| | | | | | | | This allows us to keep the --forcever option internal to makepkg. Fixes FS#9194. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Ensure we include all manpage directories in compression lineDan McGee2008-01-09
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: add package name to output when installing packageKarolina Lindqvist2008-01-09
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Fix issues with --asroot and building dependenciesDan McGee2008-01-08
| | | | | | | | | | The --asroot option was not passed to recursive calls of makepkg. In addition, a 'cd' call was done only on the fakeroot branch instead of both fakeroot and root branches. Move it outside the conditional. Noticed-by: Karolina Lindqvist <karolina.lindqvist@kramnet.se> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: add application/zip to the recognized typesDan McGee2008-01-05
| | | | | | | | | The recent upgrade of magic.mime in the file program changed the mime type output to application/zip instead of application/x-zip as it is a registered type. Unfortunately we then just skipped zip file extraction becuase of this change. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove mentions of ABS from makepkgDan McGee2008-01-05
| | | | | | Kill off some of the $ABSROOT stuff that was still hanging around in there. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove .FILELIST generation from makepkg (and elsewhere)Dan McGee2007-12-29
| | | | | | | | | | | | | | This is something pacman can do on its own straight from the archive, and we will reduce the chance of problems occurring becuase of inproper FILELIST generation as we have had in the past with special characters in filenames. Once we remove it from makepkg. we can remove any usage of it from all of our other tools, including pacman, pactest, and contrib/ utilities. Note that removing it from pacman uncovered a few other bugs anyway, so this was probably a good move. Signed-off-by: Dan McGee <dan@archlinux.org>