summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2010-03-15makepkg: always update symlinks to compressed man pagesAllan McRae1-11/+12
When a man page has both symbolic and hard links, any symlink pointing to other than the alphabetically first hardlink was not "compressed" and left dangling towards the uncompressed man page. Fixes FS#18569. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-15makepkg: make strip options configurableCedric Staniewski1-4/+4
The newly added variables STRIP_BINARIES, STRIP_SHARED and STRIP_STATIC, that are set in makepkg.conf, specify the strip options used on binaries and shared and static libraries. In addition, files are now stripped more aggressively by default. Implements FS#13592 the way it was suggested by Allan in the comments. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-15makepkg: Remove setgid bit on srcdir/pkgdir creationDan McGee1-0/+6
It was noted in FS#17533 that setgid bits are carried down into any created subdirectories, and thus could end up being in a built package if the original package directory was marked g+s. When we create src/ and pkg/, explicitly chmod them to remove any sticky bits. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-03-15makepkg: abort on missing or non-writable PKGDESTAllan McRae1-6/+12
When PKGDEST pointed to a non-writable location, makepkg would fail after completing the build process. This patch makes it abort as soon as PKGDEST is parsed. Also, move the SRCDEST check to the same point rather than right before downloading sources (which was after dependency checks). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-15makepkg: only strip files that are writableAllan McRae1-1/+1
TODO: http://mailman.archlinux.org/pipermail/pacman-dev/2010-January/010390.html Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-01makepkg: update required programsAllan McRae1-1/+1
Remove getopt, add xz. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-20makepkg: Introduce $SRCPKGDESTNezmer1-2/+5
Introduce $SRCPKGDEST to define a destination dir for source packages instead of saving them in $PKGDEST with binary packages. The simple patch doesn't break old behavior. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-14makepkg: remove srclinks directory on error exitCedric Staniewski1-0/+1
When makepkg exits in create_srcpackage(), the (temporary) srclinks directory is left behind. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-14makepkg: skip devel_check() when repackagingNezmer1-3/+3
Currently, "makepkg -R" creates a package with a wrong updated $pkgver. Signed-off-by: Nezmer <Nezmer@allurelinux.org> [Allan: adjusted comment] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-14makepkg: limit sudo usage to allowed pacman commandsCedric Staniewski1-1/+1
This is particularly useful when using pacman wrappers which call sudo by themselves and therefore should not be run as root. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-14makepkg: allow to specify an alternative pacman commandCedric Staniewski1-8/+11
If PACMAN environment variable is set, makepkg will try to use this command to check for installed dependencies and to install or remove packages. Otherwise, makepkg will fall back to pacman. Implements FS#13028. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> [Dan: move envvar section in manpage] Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-14makepkg: check for references to build root in packageAllan McRae1-0/+5
Add a check that the package does not contain references to the folder it was built in. Fixes FS#14751 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-01makepkg: allow specifying subsets of packages to buildAllan McRae1-1/+18
This allows makepkg to only build a specified subset of packages from a split PKGBUILD. This is very useful in combination with the -R flag or when bumping the pkgrel of a single package. Fixes FS#15956. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-01makepkg: move pacman calls to a functionCedric Staniewski1-25/+16
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-01makepkg: Place packages symlinks in build dir when PKGDEST is usedEric Bélanger1-5/+24
When PKGDEST is used, symlinks to the packages will be put in the build directory. This combines the convenience of a global package cache with the ease of having a package (i.e. a symlink) in the build directory for testing and installation purpose. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> [Allan: add comment documenting clean-up addition] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-12-01Replace an ugly while [ with a for (( loopIsaac Good1-3/+2
Signed-off-by: Isaac Good <pacman@isaac.otherinbox.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: Fixed logging for split packagesEric Bélanger1-2/+2
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: allow the use of only a package() functionCedric Staniewski1-4/+13
For some packages, generally the 'any' arch ones, a build step is not required and therefore can be skipped. In these cases, a package() function without a build() one is sufficient. As a side effect, this commit makes meta packages without any function at all in the PKGBUILD possible. Fixes FS#15147. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: extend test for hyphen prefixes to pkgbase and all pkgnamesCedric Staniewski1-2/+11
Since commit fb97d32, which brought in this test, support for split PKGBUILDs was added, and therefore, all values of pkgname and also pkgbase have to be checked now. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: Add fallback to package functionAllan McRae1-4/+6
makepkg looks for a package() function when building a single package but package_$pkgname() style package functions when building a split package. This patch allows the use of a package_$pkgname() function when building a single package for consistency. This is achieved by having makepkg consider a non-split package with a package_$pkgname() function as a split package (creating just the one package). Fixes FS#16622. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: use bash test operators, part twoIsaac Good1-109/+107
* FS#16623, second half of makepkg * Includes stuff like -o to ||, -a to &&, etc. * if [ $(type ... preserved due to a bash bug with [[ and set -e and ERR traps Signed-off-by: Isaac Good <pacman@isaac.otherinbox.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: use bash test operators, part oneIsaac Good1-100/+100
* FS#16623, first half of makepkg * Includes stuff like -o to ||, -a to &&, etc. * if [ $(type ... preserved due to a bash bug with [[ and set -e and ERR traps Signed-off-by: Isaac Good <pacman@isaac.otherinbox.com> [Dan: made commit message useful] Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16scripts: replace test builtin [ with shell keywords [[ and ((Cedric Staniewski4-65/+65
FS#16623 suggested this change for makepkg; this patch applies it to the remaining files in the scripts directory. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: Clarified error message when a sourceball exist alreadyEric Bélanger1-1/+1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-16makepkg: fix abortion after sourcing /etc/profileCedric Staniewski1-3/+4
The source command triggers / might trigger the ERR trap which makes makepkg abort right after a successful installation of missing dependencies. Thanks to Xavier Chantry <shiningxc@gmail.com> for finding this solution. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-11Merge branch 'maint'Dan McGee1-7/+2
2009-11-10makepkg: quote arrays in order to preserve spaces in array itemsCedric Staniewski1-7/+2
Fixes FS#16871 and makes the pkgdesc workaround obsolete. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-27Merge branch 'maint'Dan McGee1-3/+3
2009-10-24makepkg: allow passing arguments with spacesAllan McRae1-3/+3
Currently makepkg takes the commandline arguments, assigns them to a variable and passes that variable to the next makepkg call (within fakeroot). Use a comination of quotes and arrays in this process to ensure any arguments passed within quotes and containing spaces stay as a single argument during the second makepkg call. Thanks to Dan for figuring out how to get this working. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24Merge branch 'maint'Dan McGee1-1/+1
2009-10-24makepkg: change preselected option for cleaning the cache from Y to NCedric Staniewski1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: use tput for terminal-safe colored and bold textCedric Staniewski1-7/+7
Suggested-by: Dan McGee <dan@archlinux.org> Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: define escape sequences globallyCedric Staniewski1-27/+13
In doing so, it is possible to get rid of all the tests for colored messages except for one global one. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: check for non-empty pkgbase instead of pkgnameCedric Staniewski1-1/+1
pkgbase is used in the following rm calls, and since pkgname can be present when pkgbase is not, it is safer to check for pkgbase. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: remove empty .part files after a failed downloadCedric Staniewski1-1/+6
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-21makepkg: fix testing for built package presenceAllan McRae1-2/+2
Commit c7e4d10d introduced a small error in the testing of whether a package is already built. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-21makepkg: allow overriding arch in split packagesAllan McRae1-20/+29
This allows building a mixture of binary and arch=any packages. Fixes FS#15955. The value of CARCH is no longer overridden to "any" in when arch=any is used and the assigning of the "any" arch is delayed to during the packaging stage. Adjustments were required to fix installing and checking for pre-built packages of varing arches. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-21makepkg: allow overriding pkgver and pkgrel in split packagesAllan McRae1-2/+3
Fixing a single package within a split package requires the overriding or pkgrel. In very rare (but existing) cases, it is useful to override pkgver. Partial fix for FS#15955. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-21makepkg, repo-add: replace external commands with bash substitutions where ↵Cedric Staniewski2-20/+25
possible This also removes the awk dependency from makepkg and repo-add. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-12Introduce new PKGBUILD variable `changelog`Cedric Staniewski1-8/+17
Currently, a changelog is added to a package if a specific file with a hardcoded name exists in the PKGBUILD's directory. This approach is not pretty and also inconsistent with the handling of install files, but it works. With the introduction of split PKGBUILDs, however, a drawback in this old behavior has arisen: you only have the possibility to include one specific changelog file in either every package defined in the PKGBUILD or in none. The use of an additional variable, `changelog`, works around this issue and makes it possible to include a changelog in only some of the packages, and besides, each package of the PKGBUILD can have its own changelog file. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11Fix stderr redirectionCedric Staniewski1-1/+1
When redirecting both stderr and stdout and using the 2>&1 construct, you have to redirect stdout first. Otherwise stderr will be redirected to the 'old' stdout and not to the new resource. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11replace rankmirrors by bash cloneXavier Chantry3-193/+204
This removes python optdepends in pacman package This bash clone is a courtesy of Matthew Bruenig <matthewbruenig@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-09-30Merge branch 'maint'Dan McGee1-5/+11
Conflicts: lib/libalpm/dload.c
2009-09-24repo-add: clean up options parsingDan McGee1-12/+1
-f/--force has been dead for a while, so kill it off. In addition, the check for > 2 args is pretty useless when you do something like: repo-add -q -q or a more legit: repo-add -q /path/to/mine.db.tar.gz So instead make repo-add just return 1 when it doesn't do anything with the database which seems to make more sense. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-24repo-remove: create empty DB when all packages are removedDan McGee1-5/+11
Rather than creating no database at all, create an empty zipped tar archive in its place. This keeps the download side of repositories a bit more sane as a DB will always exist, and pacman handles this empty case just fine. For this to be fully transparent, we also need to make sure repo-add and repo-remove accept an empty "DB" as an argument, which in reality is a completely void of files .tar.{gz,bz2,xz} archive. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-23makepkg: tidy usage outputAllan McRae1-10/+9
Various tidying to the usage output - change "--config <config>" to "--config <file>" to prevent wrapping in a 80 character wide terminal - re-alphabetise options, including moving all long only opts to the end - use same indentation for additional pacman options - remove useless comment Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-20Merge branch 'maint'Dan McGee1-1/+1
Message updates made this one a bit messy, but nothing too bad. Conflicts: lib/libalpm/add.c lib/libalpm/remove.c
2009-09-17String improvementsXavier Chantry1-1/+1
Add more untranslated strings, improve consistency, etc. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06sanity check for optdepends syntaxXavier Chantry1-0/+8
only allow optdepends like: pkgname: description some (real) examples of invalid optdepends: 'tcl, python and/or ruby: to use corresponding binding' 'xorg-fonts-75dpi : X bitmap fonts needed for the interface' 'ruby-htmlentities (AUR): for one provider named Deastore' 'xpdf - for pdf' Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Allan: rebase off de39a1f6 and adjust man page] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06makepkg : check for invalid backup entryXavier Chantry1-0/+22
This implements FS#13551 Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>