summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* makepkg: actually fix passing PKGBUILD from pipeAllan McRae2008-10-31
| | | | | | | | If PKGBUILD (BUILDSCRIPT) is not found, test for information from a pipe and use that. Fixes FS#9187. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: enable passing PKGBUILD from pipeAllan McRae2008-10-28
| | | | | | | | Do not attemp to update pkgver/pkgrel when reading a SCM based PKGBUILD from a pipe. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2008-10-28
|\
| * Give pacman-optimize a refresherDan McGee2008-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses quite a few lingering issues in the pacman-optimize script. FS#11767 provoked this look-over and the following issues were noticed and fixed: * If an alternate dbroot was specified, then the lockfile location was never updated to reflect it. The lockfile location is now set after all dbpath initialization. * The inclusion of a trailing slash on dbroot was problematic and led to the following command being executed: bsdtar -xpf /tmp/pacman-optimize.p12Q4vAUWY/pacman-db.tar.gz \ -C /var/lib/pacman/.new/ It is doubtful we meant to create a hidden directory like this below our database root, only to go and delete it a second later and then re-extract. Fix the whole thing by ensuring our dbpath has its trailing slash stripped and then appending it when necessary. * The DB extraction was performed twice for no real apparent reason. This opens the door for extraction problems the second time around, leaving you with no original database to fall back to. Change the behavior so we only extract once, and then perform a directory shuffle once we verify the checksums are correct. * Perform an explicit sync after we drop the new database on the disk. It should work better this way. * Tighten up our check for a pacman lockfile and the time we create one. There is still a possible race condition but the window is shorter. Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: fix updating PKGBUILD when building SCM packagesAllan McRae2008-10-28
| | | | | | | | | | | | | | Fixes a bug and resets pkgrel to 1 when bumping pkgver Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * repo-add: Use openssl instead of md5sumDan McGee2008-10-18
| | | | | | | | | | | | | | This is similar to the change we made in makepkg so it is cross-platform compatible and doesn't require coreutils. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: allow compression type to be autodetectedDan McGee2008-10-12
| | | | | | | | | | | | | | | | | | Inspired by commit 7e8f1469c4168875b54956d63884b8583ce99e38, use our given PKGEXT or SRCEXT to determine what method of compression to use on the package we create. If the extension is invalid, this should fall back to creating a non-compressed tar file. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Quiet up the make process a bitDan McGee2008-10-12
| | | | | | | | | | | | | | When we do our sed edits, we really don't need every command printed out to the terminal. Now with "make -s", the output is quite palatable. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-08-26
|\|
| * makepkg : allow to specify a download filenameXavier Chantry2008-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A source entry can now have the following form, to specify a different filename : "filename::http://path/to/file" Of course, the old syntax is still supported : "http://path/to/file" And as before, in the second case, the filename used is simply "file". This fixes FS#11292, because handling multiple source files with the same name is now possible (just choose a different filename). But it will also allow to deal much more nicely with funny url like this by using a sane filename (and unfortunately, there are quite a few) : http://www.vim.org/scripts/download_script.php?src_id=6992 Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg : add --config option for an alternate config file.Xavier Chantry2008-08-23
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove DB_COMPRESSION and DB_CHECKSUMS from makepkg.confXavier Chantry2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DB_COMPRESSION was only used in repo-add and DB_CHECKSUMS was not used anywhere. This also removes the dependency on makepkg.conf in repo-add, so repo-add no longer needs to source makepkg.conf And instead of DB_COMPRESSION, it seems better to just check the extension of the repository file. It does not make sense to have a tar.gz file with a tar.bz2 extension or whatever. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: check all integrity sums found in the PKGBUILDDan McGee2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use the INTEGRITY_CHECK array from makepkg.conf to limit both the integrity sums generated and checked. It doesn't make a whole lot of sense to ignore integrity sums that are present in a PKGBUILD, so this patch will enable checking any that are available, but will only print a warning about missing sums for those types found in INTEGRITY_CHECK. It also adds a slight optimization of checking for openssl- we only need to check once now because we use the same program for all checks. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Treat info pages like man pagesAllan McRae2008-08-23
|/ | | | | | | | | | As far a package building is concerned, info pages need to be treated in the same fashion as man pages in that they both can be compressed. This separates them from other forms of documentation and so it makes sense to make that distinction within makepkg. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg : localize the Y/n part of the question.Xavier Chantry2008-08-23
| | | | | | | | pacman already localizes the yesno stuff, so doing the same in makepkg is more consistent. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: do insensitive comparisons of checksums.Xavier Chantry2008-08-23
| | | | | | | | | | | | | | | | | | | This fixes FS#11283 , which was originally reported on the forums : http://bbs.archlinux.org/viewtopic.php?id=53794 Insensitive comparisons were implicitly made before since md5sum --status was used for checking. Now that we use openssl and compare checksums manually in bash, we lost that feature. This can be easily reintroduced using tr '[A-F]' '[a-f]' What convinced me to fix it is that the md5 command line tool generates md5sums in upper case by default : http://www.fourmilab.ch/md5/ And finally, A-F and a-f are the same in hex and both are used. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Factor shell script size command into configure scriptDan McGee2008-08-19
| | | | | | | | | | | Commit 149839c5391e9a93 introduced a small behavior regression as a drawback for a better portability. repo-add now includes the approximate size (to the nearest KB) rather than an exact size due to the switching of the du command to a more portable form. Instead of sacrificing the exact size, use configure to help us determine a valid command to acquire our filesize and place it in the sync database. Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: add optdepends to the sync database.Xavier Chantry2008-08-19
| | | | | | | See FS#10630. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: Fix whitespaces handling in variables.Nagy Gabor2008-08-19
| | | | | | | | | | repo-add didn't handle whitespaces nicely in fields value, and this has hurt us several times, first with provision version (FS#9171) and then with optdepends (FS#10630), so it is time to fix it. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix error when sourcing profile scriptAllan McRae2008-08-13
| | | | | | | | | 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>
* Fix creation of source package with local source filesAllan McRae2008-08-09
| | | | | | Fixes FS#11149. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix download functions with weird urls.Xavier Chantry2008-08-04
| | | | | | | | | | | | | | | | 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>
* makepkg: Clarify usage instructions for --allsource/--sourceDan McGee2008-08-04
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Fix STRIP_DIRS test.Xavier Chantry2008-07-29
| | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg : use /etc/profileXavier Chantry2008-07-29
| | | | | | | | | 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>
* 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>
* | repo-add cleanup.Xavier Chantry2008-06-29
| | | | | | | | | | | | | | | | | | | | | | * 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>
* | 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>
* | Combine repo-add and repo-remove into one scriptDan McGee2008-06-14
| | | | | | | | | | | | | | | | 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>
* | repo-*: allow use of readlink or realpathDan McGee2008-06-14
| | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Allow GIT version to be used in pacman buildsDan McGee2008-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>