summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* makepkg: make strip options configurableCedric Staniewski2010-03-14
| | | | | | | | | | | | | 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>
* makepkg: Remove setgid bit on srcdir/pkgdir creationDan McGee2010-03-14
| | | | | | | | | | 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>
* makepkg: abort on missing or non-writable PKGDESTAllan McRae2010-03-14
| | | | | | | | | | | | 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>
* makepkg: only strip files that are writableAllan McRae2010-03-14
| | | | | | | 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>
* makepkg: Add documentation for the new SRCPKGDEST variableNezmer2010-02-28
| | | | | | | Add SRCPKGDEST documentation to the makepkg.conf man page Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: document environment variables PKGDEST and SRCDESTCedric Staniewski2010-02-28
| | | | | | Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: update required programsAllan McRae2010-02-28
| | | | | | | Remove getopt, add xz. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* bash_completion: remove absolute utility paths againCedric Staniewski2010-02-28
| | | | | | | | | | | The location of the used utilities may and does differ between various distributions and therefore absolute paths do not work well. Since the main purpose of its introduction was to avoid side-effects caused by aliases, it is sufficient to disable possible aliases temporarily by preceding the commands with a backslash. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/*_completion: match *.pkg.tar.*Pierre Schmitz2010-02-28
| | | | | Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* Do not print installed size when only downloadingAllan McRae2010-01-19
| | | | | | | | When using --downloadonly the "Total Installed Size" message is not needed and perhaps misleading. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Print "there is nothing to do" with NOOP transactionsNagy Gabor2010-01-19
| | | | | | | | | | | The "local database is up to date" message has been replaced with "there is nothing to do" message. This used with "empty" -S, -R, -U operations too. (Examples: pacman -S ignored_pkg, pacman -Ru needed_pkg.) See FS#17859. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2010-01-19
|\ | | | | | | | | | | | | | | Just a slight touchup in makepkg due to the [ -> [[ conversion, so nothing to see here. Conflicts: scripts/makepkg.sh.in
| * bash_completion: use absolute paths to utilitiesDan McGee2010-01-19
| | | | | | | | | | | | | | | | | | Fixes issues noted in FS#16630. Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 03f35b1432675f5b10ec53945e48c2bbd7c628e9) Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: fix abortion after sourcing /etc/profileCedric Staniewski2010-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 77e84bea71e3dfe87a8009e7e7a913d1a12b7585) Signed-off-by: Dan McGee <dan@archlinux.org>
| * contrib/bacman: fix checking if file has been addedAllan McRae2010-01-19
| | | | | | | | | | | | | | | | | | | | Fixes FS#17140. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 0199a7ee717f0848e336fda8dc1f5b9364ce3478) Signed-off-by: Dan McGee <dan@archlinux.org>
| * NULL out handle after releaseDan McGee2010-01-19
| | | | | | | | | | | | | | | | We free'd the handle but didn't NULL out the global variable, leading to problems if you try to reinitialize the library. Make sure we clean up after ourselves. Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: check for non-empty pkgbase instead of pkgnameCedric Staniewski2009-12-14
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: Introduce $SRCPKGDESTNezmer2010-01-19
| | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: remove srclinks directory on error exitCedric Staniewski2009-12-13
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: skip devel_check() when repackagingNezmer2009-12-13
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: limit sudo usage to allowed pacman commandsCedric Staniewski2009-12-13
| | | | | | | | | | | | | | | | | | 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>
* | makepkg: allow to specify an alternative pacman commandCedric Staniewski2009-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: check for references to build root in packageAllan McRae2009-12-13
| | | | | | | | | | | | | | | | | | | | 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>
* | improve download_internal error messagesXavier Chantry2009-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | download_internal is supposed to always set pm_errno but did not in many cases. The most important (and tested) change is the one concerning fetchStat. This is typically where the code will fail when the network is down for example. Before commit d2dbb04a9af7a18da, this fetchStat call did not exist and the same kind of errors would be encountered in the fetchXGet call that follows. I just copied the error printing to restore the old behavior. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | add some more sanity check for optargXavier Chantry2009-12-13
| | | | | | | | | | | | | | | | | | | | | | getopt should already ensure that optarg is not NULL when an argument is required, but just be extra safe and double check it before using optarg. To be honest, I only did that to make clang shut up and eliminate the last warnings it reported. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | refactor _parseoptionsXavier Chantry2009-12-13
| | | | | | | | | | | | | | | | This function was quite huge (~230 lines) and difficult to parse, now it is slightly better. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Print error on duplicated database entriesNagy Gabor2009-12-13
| | | | | | | | | | | | | | | | | | | | | | | | Some users reported duplicated database entries in /var/lib/pacman/local/, for example, both foo-1.0-1 and foo-2.0-1 subdirectories existed. (Bogus 3rd-party scripts, backup?) In this case pacman reported no error and its behaviour was mysterious. From now on, pacman detects this situation and prints an error message. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove trailing whitespace on all lines in list_displayDan McGee2009-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we never have trailing whitespace. Take the following text, with line numbers added for clarity: 1. Title : item1 item2 item3 item4 2. item5 item6 item7 item8 3. item9 itemA itemB itemC Laszlo Papp helpfully pointed out we would have two trailing spaces on line three after the last item. However, we also had these trailing spaces on lines one and two, which the initial patch didn't take care of. This can be seen on something like `pacman -Qi glibc`. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fix requiredby outputDan McGee2009-12-07
| | | | | | | | | | | | | | | | | | | | | | | | This is a bit embarrassing. For example: $ pacman -Qi mesa ... Required By : mesa mesa mesa mesa mesa mesa Something is clearly not right, and the problem was introduced in commit 0bc961. Fix the issue by getting the package name off the correct variable. Signed-off-by: Dan McGee <dan@archlinux.org>
* | bash_completion: use absolute paths to utilitiesDan McGee2009-11-30
| | | | | | | | | | | | Fixes issues noted in FS#16630. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: allow specifying subsets of packages to buildAllan McRae2009-11-30
| | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: move pacman calls to a functionCedric Staniewski2009-11-30
| | | | | | | | | | Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Place packages symlinks in build dir when PKGDEST is usedEric Bélanger2009-11-30
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Replace an ugly while [ with a for (( loopIsaac Good2009-11-30
| | | | | | | | | | | | 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>
* | Fix syntax error in new translationDan McGee2009-11-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | HACKING: add some notes about valgrind/gdb usageDan McGee2009-11-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | download: major refactor to address lingering issuesDan McGee2009-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorry for this being such a huge patch, but I believe it is necessary for quite a few reasons which I will attempt to explain herein. I've been mulling this over for a while, but wasn't super happy with making the download interface more complex. Instead, if we carefully order things in the internal download code, we can actually make the interface simpler. 1. FS#15657 - This involves `name.db.tar.gz.part` files being left around the filesystem, and then causing all sorts of issues when someone attempts to rerun the operation they canceled. We need to ensure that if we resume a download, we are resuming it on exactly the same file; if we cannot be almost postive of that then we need to start over. 2. http://www.mail-archive.com/pacman-dev@archlinux.org/msg03536.html - Here we have a lighttpd bug to ruin the day. If we send both a Range: header and If-Modified-Since: header across the wire in a GET request, lighttpd doesn't do what we want in several cases. If the file hadn't been modified, it returns a '304 Not Modified' instead of a '206 Partial Content'. We need to do a stat (e.g. HEAD in HTTP terms) operation here, and the proceed accordingly based off the values we get back from it. 3. The mtime stuff was rather ugly, and relied on the called function to write back to a passed in reference, which isn't the greatest. Instead, use the power of the filesystem to contain this info. Every file downloaded internally is now carefully timestamped with the remote file time. This should allow the resume logic to work. In order to guarantee this, we need to implement a signal handler that catches interrupts, notifies the running code, and causes it to set the mtimes on the file. It then rethrows the signal so the pacman signal handler (or any frontend) works as expected. 4. We did a lot of funky stuff in trying to track the DB last modified time. It is a lot easier to just keep the downloaded DB file around and track the time on that rather than in a funky dot file. It also kills a lot of code. 5. For GPG verification of the databases down the road, we are going to need the DB file around for at least a short bit of time anyway, so this gets us closer to that. Signed-off-by: Dan McGee <dan@archlinux.org> [Xav: fixed printf with off_t] Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* | Refactor do/while cycle and multiple while cyclesLaszlo Papp2009-11-15
| | | | | | | | | | | | | | | | * It makes the code clearer to read/understand * Cppcheck tool doesn't show this anymore: [./util.c:215]: (error) Resource leak: fd [Dan: don't change the coding style] Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Fixed logging for split packagesEric Bélanger2009-11-15
| | | | | | | | | | | | 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>
* | makepkg: allow the use of only a package() functionCedric Staniewski2009-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: extend test for hyphen prefixes to pkgbase and all pkgnamesCedric Staniewski2009-11-15
| | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: Add fallback to package functionAllan McRae2009-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | makepkg: use bash test operators, part twoIsaac Good2009-11-15
| | | | | | | | | | | | | | | | | | * 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>
* | makepkg: use bash test operators, part oneIsaac Good2009-11-15
| | | | | | | | | | | | | | | | | | | | * 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>
* | scripts: replace test builtin [ with shell keywords [[ and ((Cedric Staniewski2009-11-15
| | | | | | | | | | | | | | | | 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>
* | pacman.conf : enable resuming for curlXavier Chantry2009-11-15
| | | | | | | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Clarified error message when a sourceball exist alreadyEric Bélanger2009-11-15
| | | | | | | | | | | | 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>
* | makepkg: fix abortion after sourcing /etc/profileCedric Staniewski2009-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | contrib/bacman: fix checking if file has been addedAllan McRae2009-11-15
| | | | | | | | | | | | | | Fixes FS#17140. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add Catalan translationManuel Tortosa2009-11-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>