summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2010-05-27repo-add: symlink to db file to reponame.dbAllan McRae
This is a small step towards allowing pacman to handle databases with variable compression types. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-27makepkg: remove code duplication in buildscript parsingAndres P
Merges code in two almost identical chunks in create_srcpackage and check_sanity. Also discards the space kept by regex in ae73d75660 and earlier, since the for loop discards it later on. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24makepkg: replace unnecessary uses of grepAndres P
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24makepkg: fix permissions on install and changelog filesAllan McRae
The .INSTALL and .CHANGELOG files in a package retained the permissions that they had in $startdir. Do a chmod after copying to ensure that the permissions are sane. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24makepkg: don't decompress when stripping binariesAndres P
f569c4a042 wrongly relied on file's output. The fix is to not decompress files in the first place. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18rankmirrors: Add a --repo option to target a specific repoDaenyth
Signed-off-by: Daenyth <Daenyth+Arch@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18makepkg: allow skipping integrity checks when making source packageAllan McRae
Extends the use of the --skipinteg option to creating a source package. Fixes FS#15984. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18Resolve dependencies whenever --syncdeps is passed and --nodeps is notNezmer
With this patch, dependencies will be resolved and not silently ignored when running: makepkg --nobuild --syncdeps makepkg --repackage --syncdeps Also, a warning is displayed when repackaging and dependencies are not being resolved. Thank you Allan for the feedback. Signed-off-by: Nezmer <git@nezmer.info> [Allan: Only warn when repackaging with a package function] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-18fix for incorrect checking of return code, which causes syntax errorsDieter Plaetinck
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05makepkg: rework --skipintegAllan McRae
The current --skipinteg is a bit weird. It does not skip integrity checks, but instead does them and prints a warning. Change this behaviour to actually skipping the checks. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05makepkg -g: use checksums defined in the pkgbuildXavier Chantry
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Allan: amend documentation] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05makepkg: handle multiple install and changelog filesAllan McRae
The presence of all install and changelog files (multiple files may be used with package splitting) is checked for in check_sanity(). All install and changelog files are copied to the source location when using --source. The check for install and changelog file presence is removed in create_srcpackage() as this is redundant to the checks performed in check_sanity(). Moved install and changelog handling in create_srcpackage() to after source array files, as this is more logical and readily allows for the following. A check is made when creating a source package that a symlink to an install file has not already been added. This can occur if the install file is used multiple times or if it is listed in the source array. Fixes FS#18831, FS#18394 and partially fixes FS#16004 Signed-off-by: Allan McRae <allan@archlinux.org>
2010-05-05makepkg: fall back to su if sudo is not availableRay Kohler
Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-05makepkg: improve removal of installed dependenciesAllan McRae
Compare a list of packages on the system before and after dependency resolution in order to get a complete list of packages to remove. This allows makepkg to remove packages installed due to provides. Bail in cases where packages that were on the system originally have been removed as there is a risk of breaking the system when removing the new packages. Fixes FS#15144. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-26makepkg: BSD find compatibility fixAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-26makepkg: deprecate repackaging without a package functionAllan McRae
File permissions are not guaranteed to stay the same on exit from fakeroot, so repackaging may result in files with different permissions. This is avoided when using a package() function (or split packages) as the packaging step is rerun. Signed-off-by: Allan McRae <allan@archlinux.org> [Dan: touched up message for translation purposes] Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-14Bump copyright dates to 2010Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-14makepkg: always update symlinks to compressed man pagesAllan McRae
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-14makepkg: make strip options configurableCedric Staniewski
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-14makepkg: Remove setgid bit on srcdir/pkgdir creationDan McGee
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-14makepkg: abort on missing or non-writable PKGDESTAllan McRae
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-14makepkg: only strip files that are writableAllan McRae
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-02-28makepkg: update required programsAllan McRae
Remove getopt, add xz. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-19makepkg: Introduce $SRCPKGDESTNezmer
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-13makepkg: remove srclinks directory on error exitCedric Staniewski
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-13makepkg: skip devel_check() when repackagingNezmer
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-13makepkg: limit sudo usage to allowed pacman commandsCedric Staniewski
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-13makepkg: allow to specify an alternative pacman commandCedric Staniewski
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-13makepkg: check for references to build root in packageAllan McRae
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-11-30makepkg: allow specifying subsets of packages to buildAllan McRae
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-11-30makepkg: move pacman calls to a functionCedric Staniewski
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-30makepkg: Place packages symlinks in build dir when PKGDEST is usedEric Bélanger
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-11-30Replace an ugly while [ with a for (( loopIsaac Good
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-15makepkg: Fixed logging for split packagesEric Bélanger
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-15makepkg: allow the use of only a package() functionCedric Staniewski
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-15makepkg: extend test for hyphen prefixes to pkgbase and all pkgnamesCedric Staniewski
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-15makepkg: Add fallback to package functionAllan McRae
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-15makepkg: use bash test operators, part twoIsaac Good
* 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-15makepkg: use bash test operators, part oneIsaac Good
* 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-15scripts: replace test builtin [ with shell keywords [[ and ((Cedric Staniewski
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-15makepkg: Clarified error message when a sourceball exist alreadyEric Bélanger
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-15makepkg: fix abortion after sourcing /etc/profileCedric Staniewski
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-10Merge branch 'maint'Dan McGee
2009-11-10makepkg: quote arrays in order to preserve spaces in array itemsCedric Staniewski
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-26Merge branch 'maint'Dan McGee
2009-10-24makepkg: allow passing arguments with spacesAllan McRae
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 McGee
2009-10-24makepkg: change preselected option for cleaning the cache from Y to NCedric Staniewski
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-24makepkg: use tput for terminal-safe colored and bold textCedric Staniewski
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 Staniewski
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>