summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* 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>
* | 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>
* | scripts: add -q/--quiet option to repo-add and repo-removeDan McGee2008-05-10
| | | | | | | | | | | | | | | | 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>
* | 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>
* | Merge branch 'maint'Dan McGee2008-03-01
|\|
| * Remove small remnant of old force=y optionDan McGee2008-02-27
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-02-20
|\| | | | | | | | | Remove gettext() function addition from gensync and updatesync in master as gettext is no longer used in them anyway.
| * 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>
* | Merge branch 'maint'Dan McGee2008-02-15
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/be_files.c lib/libalpm/package.c
| * 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>
* | Merge branch 'maint'Dan McGee2008-02-07
|\|
| * 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>
* | remove --force option from repo-add.Chantry Xavier2008-02-05
| | | | | | | | | | | | | | | | | | | | The force option should only be specified in the PKGBUILD with options=(force). This information should be handled like any other meta info, and there is no need to have a special repo-add option for it. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: fix up a few more references in contrib/ scripts, etc] Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2008-02-05
|\| | | | | | | | | | | | | Conflicts: contrib/gensync contrib/updatesync
| * 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>
| * repo-remove: print an error in case of an empty dbChantry Xavier2008-02-02
| | | | | | | | | | | | | | | | When removing the last packages from a database, repo-remove silently failed. Now an error is printed. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add deprecation warnings to gensync and updatesyncDan McGee2008-02-02
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove gensync and updatesync from normal distributionDan McGee2008-02-02
|/ | | | | | | | Move these two scripts into contrib/, and start the process of de-automaking them by removing the @sysconfdir@ references and the gettext initialization. The removal of all gettext will soon follow. Signed-off-by: Dan McGee <dan@archlinux.org>
* updatesync: incorrect package deletion logicAlex Merry2008-02-02
| | | | | | Fixes FS#9279. 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>
* Fix typos in code commentsDan McGee2008-01-13
| | | | 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>