summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2010-06-23rankmirrors: pipe errors to stderrAndres P1-1/+1
If this is to be scripted with AIF or another tool, it needs to respect stderr. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23rankmirrors: fix bogus pacman configuration parsingAndres P1-2/+2
Valid pacman configuration files do not have to start with a hash for that line to be a comment, neither do directives need to be in column 0. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-23rankmirrors: fix bogus variable assignmentAndres P1-3/+3
$replacedurl was being built from an expansion of itself. But at the time it happened, it was empty. Fixes FS#19911 Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-21Merge branch 'maint'Dan McGee1-5/+5
2010-06-21makepkg: revert bash4-ismAllan McRae1-5/+5
Commit 3d67d9b1 introduced multiple bash4 string manipulations. Revert those in order retain compatibility with bash-3.2 which is still widely used. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20makepkg: remove unnecessary use of sortAndres P1-2/+2
pacman -Qq output is sorted according to the users LC_COLLATE setting as is needed for comm. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: adjust commit message] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: use parameter expansion instead of basenameAndres P1-1/+1
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: fix inconsistent output when checking dependenciesAndres P1-2/+2
Instead of writing: ==> Checking Runtime Dependencies... ==> Checking Buildtime Dependencies... ==> Installing missing dependencies... Just make it homogeneous: ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: merge in-line splitpkg handling logicAndres P1-22/+16
Ease maintainace; the two parts that have been combined into a function were identical. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: rename function] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: add to variables without expanding themAndres P1-8/+8
Use foo+=" bar" instead of foo="${foo} bar" Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: less code repetition for empty variable checkingAndres P1-12/+7
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: use "declare -f" to test for function presenceAndres P1-4/+4
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-20makepkg: fix variable checks when writing pkginfoAndres P1-8/+8
Regression caused by c71fe7db. Was checking for "optdepend" and "conflict" rather than "optdepends" and "conflicts" when populating .PKGINFO. Signed-off-by: Andres P <aepd87@gmail.com> [Allan: adjust commit message] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17makepkg: fallback to sane defaults for library strippingAllan McRae1-0/+3
If the library stripping variables are not defined in makepkg.conf, libraries will be fully stripped and become broken. Fallback to a sane default stripping level. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-17makepkg: Extract from any file bsdtar can recognizeNezmer1-3/+6
If "file -bizL" does not return a supported type, check if the file is recognized by bsdtar and if yes extract from it. Dan: use '-q' option to prevent needing to seek the entire archive. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17makepkg: use printf when writing pkginfoAndres P1-25/+9
Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17makepkg: use single redirection when writing PKGINFOAndres P1-25/+25
Instead of specifying the output file on every echo, leave it to the caller of write_pkginfo to specify the target. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17makepkg: use double bracketsAndres P1-6/+4
Change all instances of the (test) [ builtin to the [[ keyword. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17makepkg: use type -p's return value for PATH checksAndres P1-13/+13
Rely on type -p's return value instead of a string check. And gettext was previously being checked with type -t, which was inconsistent with the rest of the tests pertaining commands that aren't expected to be functions nor builtins. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-17makepkg: fallback to sane defaults for library strippingAllan McRae1-0/+3
If the library stripping variables are not defined in makepkg.conf, libraries will be fully stripped and become broken. Fallback to a sane default stripping level. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-09makepkg: use BUILDFILE rather than BUILDSCRIPTAllan McRae1-2/+2
In check_sanity, BUILDFILE needs to be checked rather than BUILDSCRIPT. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-09makepkg: fix errors with multiple install or changelog filesAllan McRae1-4/+4
Another issue caused by fe1e3471. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-09Fix creation of source packagesAllan McRae1-4/+4
Source packages were getting created with only links to local source files. Caused by commit 5cddcc90. Also, fix dangling symlinks to install and changelog files. Caused by commit fe1e3471. Thanks to Christopher Rogers <slaxemulator@gmail.com> for pointing out areas that were failing. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-04makepkg: refactor absolute filename detectionCedric Staniewski1-48/+45
Move the absolute filename detection to a new function to reduce code duplication. This patch also fixes the --allsource option that did not include remote source files if they reside in $startdir instead of $SRCDEST. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org>
2010-06-03makepkg: print only base filename of install/changelog filesCedric Staniewski1-1/+1
The complete file path of a temporary symlink is really useless information. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-27repo-add: symlink to db file to reponame.dbAllan McRae1-0/+1
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 P1-37/+14
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-25makepkg: replace unnecessary uses of grepAndres P1-7/+7
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-25makepkg: fix permissions on install and changelog filesAllan McRae1-0/+2
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-25makepkg: don't decompress when stripping binariesAndres P1-3/+1
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 repoDaenyth1-5/+14
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 McRae1-3/+9
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 notNezmer1-2/+2
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 Plaetinck1-2/+2
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-06makepkg: rework --skipintegAllan McRae1-7/+7
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-06makepkg -g: use checksums defined in the pkgbuildXavier Chantry1-1/+26
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-06makepkg: handle multiple install and changelog filesAllan McRae1-24/+47
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-06makepkg: fall back to su if sudo is not availableRay Kohler1-7/+8
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-06makepkg: improve removal of installed dependenciesAllan McRae1-16/+20
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-27makepkg: BSD find compatibility fixAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-27makepkg: deprecate repackaging without a package functionAllan McRae1-5/+15
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-15Bump copyright dates to 2010Dan McGee2-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
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>