summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2008-08-14Fix error when sourcing profile scriptAllan McRae1-0/+3
With the "set -e" property set, a failure when sourcing /etc/profile can cause makepkg to exit without error message. The bash-completion package activates this bug. Fixes FS#11179. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-09Fix creation of source package with local source filesAllan McRae1-1/+1
Fixes FS#11149. Signed-off-by: Allan McRae <allan@archlinux.org>
2008-08-04makepkg: fix download functions with weird urls.Xavier Chantry1-12/+14
This fixes FS#11076. 1) quote the url in get_downloadclient 2) only enable nullglob where it is needed You can see in 7fc306cd41 that nullglob was only enabled for one part, and that it already caused other problems, which were fixed in 7ff5a917fd0. Thanks to Henning Garus for pointing out that nullglob was problematic with urls containing expansion char like '?'. 3) change get_downloadcmd which displayed the download command line to download_file which actually executes the download. It seems nicer that way. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-08-04makepkg: Clarify usage instructions for --allsource/--sourceDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-30makepkg: Fix STRIP_DIRS test.Xavier Chantry1-2/+3
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-30makepkg : use /etc/profileXavier Chantry1-7/+2
This fixes FS#9486. source /etc/profile instead of all individual files in /etc/profile.d/* (which is done by /etc/profile anyway). Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-25makepkg: add packages to pkgdeps list only after successful installAllan McRae1-2/+2
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>
2008-07-21Make strip paths configurableAllan McRae1-3/+6
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>
2008-07-19Strip *.a libraries in makepkgAllan McRae1-1/+3
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-19Use LC_ALL=C everywhereAllan McRae1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-07-16Use "pacman -S $dep" in makepkg's dependency resolvingNagy Gabor1-7/+2
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>
2008-07-16makepkg: speed up svn revision check for large repositoriesDan McGee1-1/+1
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>
2008-07-08Merge branch 'maint'Dan McGee1-1/+1
2008-06-30repo-add cleanup.Xavier Chantry2-15/+15
* change ln -s to ln -sf in the Makefile to prevent a failure when the link already exists. * make test_repo_db_file simpler and more natural, move the complexity out of it. * remove one $cmd = repo-remove check that wasn't needed Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-27Remove symlinks to libtool filesAllan McRae1-1/+1
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>
2008-06-23Additional path quoting and srcdir/pkgdir usageAllan McRae1-9/+8
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>
2008-06-15makepkg: add several quotes needed after nullglob.Xavier Chantry1-6/+6
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>
2008-06-15makepkg: Add missing quotes for the source array.Xavier Chantry1-4/+4
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>
2008-06-15Use openssl for checksum verification instead of *sum utilitiesSebastian Nowicki1-7/+7
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>
2008-06-14Combine repo-add and repo-remove into one scriptDan McGee3-244/+76
They shared about 75% of their code, so there is no real reason we should maintain them separately. Merge the differences accordingly and add a check based on the basename of the command used to decide what behavior to follow. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14repo-*: allow use of readlink or realpathDan McGee2-10/+33
Linux coreutils provides readlink, and BSD systems tend to have realpath available. Both commands provide similar functionality but of course have different names. Add a check for either and use what is available. While doing this, also unify some of the differences that have cropped up between repo-add and repo-remove. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-14Move geninteg block in makepkg before error checkingAllan McRae1-11/+12
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>
2008-06-13Merge branch 'maint'Dan McGee1-1/+1
2008-06-13Use shell builtin to list files for package inclusionDan McGee1-1/+5
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>
2008-06-09makepkg: remove deprecated --usesudo codeDan McGee1-7/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-09makepkg: add --allsource optionAllan McRae1-12/+34
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>
2008-06-02Don't require --force when using the --nobuild optionAnton Fiuman1-1/+1
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>
2008-05-31makepkg: remove some dead TODO codeDan McGee1-7/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-31Allow GIT version to be used in pacman buildsDan McGee1-1/+8
Add a new configure flag, --enable-git-version, that allows the output of 'git describe' to be used in the version string associated with this package. This could aid in debugging for users that are using a development version of pacman and we should be able to figure out which cut of code they are using. Sample output: $ pacman --version Pacman v3.1.4-190-g4cfa-dirty - libalpm v2.3.1 $ makepkg --version makepkg (pacman) 3.1.4-190-g5861-dirty Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-29makepkg - add check for valid options in PKGBUILDAllan McRae1-20/+21
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>
2008-05-29No error in makepkg when removing deps failsAllan McRae1-2/+9
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>
2008-05-29Use chown 0:0 instead of root.rootSebastian Nowicki1-2/+2
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>
2008-05-29Use "legacy mode" on Mac OSX (for file command)Sebastian Nowicki1-0/+3
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>
2008-05-29Allow an unprivileged user to create packages without fakerootSebastian Nowicki1-2/+2
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>
2008-05-29du -b is not available on BSD, use du -k instead.Xavier Chantry2-3/+3
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>
2008-05-29Replace usage of "cp -s" with the more portable "ln -s"Sebastian Nowicki1-3/+6
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>
2008-05-13Remove --builddeps from makepkgDan McGee1-40/+3
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>
2008-05-10scripts: add -q/--quiet option to repo-add and repo-removeDan McGee2-8/+24
They are pretty noisy scripts in their normal course of operations, so allow all messages to be squashed except for warning and error messages with this new flag. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-10makepkg: Unify start and end messagesDan McGee1-2/+2
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>
2008-04-30Merge branch 'maint'Dan McGee1-4/+6
2008-04-27makepkg: fix strip section to allow spaces in pathsDaenyth Blank1-4/+6
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>
2008-03-16Add zipman makepkg option.Chantry Xavier1-30/+34
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>
2008-03-11makepkg: Support for resuming source downloadsRoman Kyrylych1-2/+19
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>
2008-03-01Merge branch 'maint'Dan McGee1-1/+1
2008-02-27Remove small remnant of old force=y optionDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-21Merge branch 'maint'Dan McGee4-2/+34
Remove gettext() function addition from gensync and updatesync in master as gettext is no longer used in them anyway.
2008-02-21Fix two missing BUILDSCRIPT variables in makepkg.Mark Constable1-2/+2
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-18scripts: allow usage when gettext is not installedDan McGee6-0/+46
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>
2008-02-16Merge branch 'maint'Dan McGee1-3/+3
Conflicts: lib/libalpm/be_files.c lib/libalpm/package.c
2008-02-12makepkg : set sane umask before source extraction.Chantry Xavier1-3/+3
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>