summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* makepkg: fix check for previously built packages with package splittingAllan McRae2009-07-10
| | | | | | | Checks if some or all packages are built before overwriting/installing. Adds some new strings for translation. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: clean up moving PKGINFO creation to a functionAllan McRae2009-07-10
| | | | | | | Someone forgot to commit this when pulling in the original patch to his working branch... Signed-off-by: Allan McRae <allan@archlinux.org>
* Update copyright headers and messagesDan McGee2009-07-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge commit 'allan/working'Dan McGee2009-06-23
|\
| * makepkg: Move .PKGINFO creation into a function.Loui Chang2009-06-22
| | | | | | | | | | Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: Download sources and check checksums for any source package.Loui Chang2009-06-21
| | | | | | | | | | | | | | It wouldn't be very nice to ship a PKGBUILD with the wrong checksums. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | repo-add: use bsdtar optimization for better performanceDan McGee2009-06-23
|/ | | | | | | | | | | | | | | | | | | | | | | When unzipping packages and the database archives, we don't need to look through the entire archive to do what we need to do. For packages, .PKGINFO should only be found once and should be the first file in the package. For the database check, we only really need to look for one desc file. The bsdtar -q option is very similar to the GNU tar --occurrence=1 option. Example of speedup: $ time repo-add junkdb.db.tar.gz *.pkg.tar.gz >/dev/null real 0m16.159s user 0m14.836s sys 0m2.277s $ time ./scripts/repo-add junkdb.db.tar.gz *.pkg.tar.gz >/dev/null real 0m4.949s user 0m3.730s sys 0m2.093s Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix variable backup/restore for splitpkgAllan McRae2009-06-13
| | | | | | | | | The backup and restore of variables that can be overridden while making split packages only dealt with the first element, not the whole array (FS#15010). Adjust the bash voodoo to fix it... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix PKGBUILD sanity checkAllan McRae2009-06-13
| | | | | | | | If PKGBUILD was good, the "insane" variable was not defined and so the if statement failed. Simplify and fix this check. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: refactor sanity checking into a functionDan McGee2009-06-07
| | | | | | | | No new checks, just move it into a function and return 1 rather than exit directly. This also allows the use of local variables. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: fail early if repo can not be createdXavier Chantry2009-05-23
| | | | | | | | | Before this commit, the repo creation could fail after all packages have been added to the database. Now this will be detected before adding anything. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add support for the xz archive formatPierre Schmitz2009-05-18
| | | | | | | | | | This simple patch adds support for the xz archive format to makepkg and repo- add. Xz can be used as source, package and package db file type. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> [Dan: fixed a few alignment issues] Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: fix -n tests which are applicable only to stringsCedric Staniewski2009-05-18
| | | | | Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix sourcing BUILDSCRIPT and PATH issuesAllan McRae2009-05-16
| | | | | | | | | The bash source command looks in the users PATH for the file to source before the local directory. This causes issues when someone has a PKGBUILD somewhere in their path (for unknown some reason...). Fixes FS#14727. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: Document package splittingAllan McRae2009-05-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not update pkgver when building source packageAllan McRae2009-05-14
| | | | | | | When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: several small fixesAllan McRae2009-05-11
| | | | | | | | | | | | | | | 1) Do not attempt to strip compressed binaries Original-work-by: Marc - A. Dahlhaus <mad@wol.de> 2) Add "\" in "GPL\'ed" so quote mark does not break source code highlighting 3) Add local to docdir paths in makepkg.conf for consistency 4) Use full path to sed in MacOSX in case users have GNU sed earlier in path Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: make in-place sed portableAllan McRae2009-04-26
| | | | | | | | | | | | | Do a sed replacement in-place is not very portable. On Mac OSX and BSDs, the syntax is "sed -i ''" where as with GNU sed the command is "sed -i''" or just "sed -i". This patch detects which command should be used during configure. Credit to Kevin Barry who researched this issue and provided a patch to work around this using temporary backup files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'xav/repo-add'Dan McGee2009-04-11
|\
| * repo-add : rename gstmpdir to tmpdirXavier Chantry2009-03-15
| | | | | | | | | | | | What does gstmpdir mean? Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add : don't change the modification time on depends and descXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The modification time on depends and desc file were changed to match the modification time of the package file. I don't see why and we are actualling losing information here. If we want to know the date of the package file, we can just look inside the depends file. If we want to know when the entry was created, we should not alter the modification time of depends and desc. Besides, this had the non-obvious and undocumented side effect that the depends file was always created, even if it was empty. And pacman actually does require that. So I added a "touch depends" to always create the file. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add : new locking systemXavier Chantry2009-03-15
| | | | | | | | | | | | | | Weird things could happen if several repo-add were run concurrently on the same database. The introduced locking system will prevent this to happen. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add : fix package variables declarationXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - arch was missing - backup is not used by repo-add. However makepkg still needs to put it in PKGINFO because pacman uses it - startdir is no longer used after the new delta implementation - the declaration of group, depend, backup, etc is not needed because these variables are always declared before being used : declare $var="$val" case "$var" in group) _groups="$_groups$group\n" ;; - reorder the variables declaration to follow the same order than they are written to the depends and desc file, for making future checks easier Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add : rewrite delta supportXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the correct database format Use xdelta3 to get the source and destination files from the delta itself Allow delta files to be added with repo-add just like package files. delta files can also be removed with repo-remove. This is simply done by looking for a .delta extension in the arguments, and calling the appropriate db_write_delta or db_remove_delta functions. Example usage: repo-add repo/test.db.tar.gz repo/libx11-1.1.99.2-2-x86_64.pkg.tar.gz repo-add repo/test.db.tar.gz repo/libx11-1.1.5-2_to_1.1.99.2-2-x86_64.delta repo-remove repo/test.db.tar.gz libx11-1.1.5-2_to_1.1.99.2-2-x86_64.delta Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add : drop delta support to rewrite it from scratchXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation has several problems : Wrong database format All the info is taken from the filename, which is a bit ugly It looks for .delta files in the current directory when adding a package, which is not very flexible Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add.sh.in : repo-remove improvementsXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | * report when a package entry to be removed is not found * backup and restore eventual "deltas" files * slight optimization when looking for an entry : only look at the entries starting with $pkgname Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * repo-add cleanupXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | Refactor the main loop, which was difficult to read. Use case instead of if when appropriate. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * Add pkgdelta script to create deltas.Xavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | This should obsolete the delta support in makepkg. Having a separate script should be more flexible. Example usage: $ pkgdelta repo/tzdata-2009a-1-x86_64.pkg.tar.gz repo/tzdata-2009b-1-x86_64.pkg.tar.gz ==> Generating delta from version 2009a-1 to version 2009b-1 ==> Generated delta : 'repo/tzdata-2009a-1_to_2009b-1-x86_64.delta' Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
| * Fix several issues with xdeltaXavier Chantry2009-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 1) The changes to sync.c look big but there are mostly caused by the indentation. Fix a bug where download_size == 0 because the packages and deltas are already in the cache, but we still need to build the deltas list and apply the deltas to create the final package. 2) Fix the gzip / md5sum issue by switching to xdelta3, disabling external recompression and using gzip -n in pacman, and disable bsdtar compression and using gzip -n in makepkg. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* | makepkg: fix double check on same pathDan McGee2009-04-11
| | | | | | | | | | | | | | Commit 142225fd typo-ed this one, as it should look like the rest of the checks similar to it. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Fix integrity check when files are missing.Loui Chang2009-04-11
| | | | | | | | | | | | | | | | | | The index in the for loop wasn't being incremented, so if the first file wasn't found, the second file would be compared to the first checksum, rather than the second. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: run tidy_install with no package() functionAllan McRae2009-03-30
| | | | | | | | | | | | | | After the splitpkg implementation, the tidy_install function was not being called in PKGBUILDs with only the build() function. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: do not bail on failure to install built packageAllan McRae2009-03-29
| | | | | | | | | | | | | | Fixes FS#13417. Do no exit makepkg on a failure to install the built package(s). This allows clean-up to still occur. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: adjust log clean-up for new filenamesAllan McRae2009-03-26
| | | | | | | | | | | | | | | | | | The log files now have -build or -package at the end and there are separate log files for each *_package() function. Alter clean_up() to deal with this. Also, move glob outside quotes so this actually works. Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: adjust install_package for split packagesAllan McRae2009-03-25
| | | | | | | | | | | | | | Install all created packages when using the install option with package splitting. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Refactor testing for color message outputAllan McRae2009-03-16
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | makepkg: add pkgbase variableAllan McRae2009-03-16
|/ | | | | | | | | | | | The pkgbase variable is added to improve informational output and source package naming when using split packages. Defaults to ${pkgname[0]} if not set. Also: - move splitpkg detection to after pkgname presence is verified - add "cd" line to package_foo() functions in splitpkg proto Signed-off-by: Allan McRae <allan@archlinux.org>
* Only check checksums if there is a source fileAllan McRae2009-03-15
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg : remove xdelta supportXavier Chantry2009-02-28
| | | | | | | | The pkgdelta script can be used instead. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: print warning if same version already existsXavier Chantry2009-02-28
| | | | | | | Simple fix for FS#13414. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2009-02-23
|\
| * makepkg: fix updating pkgrel with pkgver in SCM packagesAllan McRae2009-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1e656c0a introduced the changing of pkgrel to 1 when the pkgver was updated in SCM PKGBUILDs. However, the output in the "Making package:" was wrong. Attempting to fix that created another bug (FS#13416). Interestingly, pkgver was only ever being updated in the fakeroot stage which caused this problem. Now both pkgver and pkgrel are updated after the first devel_check and devel_update. Enjoy the really long explaination for a two line fix... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add : remove realpath usageXavier Chantry2009-02-19
| | | | | | | | | | | | | | | | | | Rework slightly db_write_entry so that $pkgfile is no longer referenced from the temporary dir. This means $pkgfile can be a relative path and does not need to be converted with realpath anymore. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add : remove the need of realpath for REPO_DB_FILEXavier Chantry2009-02-19
| | | | | | | | | | | | | | | | REPO_DB_FILE does not need to be an absolute path anymore so no need to call realpath. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-02-18
|\|
| * repo-add: fix eval and quote issuesDan McGee2009-02-15
| | | | | | | | | | | | | | | | | | | | eval was ugly and dirty, and bit us here. Instead, use a safer form of variable declaration to ensure quotes don't foil us in pkgdesc or any other fields. This fixes FS#10837. Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add : remove useless test_repo_db_file functionXavier Chantry2009-02-18
| | | | | | | | | | | | | | | | This function was used only once, was basically just one line, and was also called with an unused argument. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2009-02-08
|\|
| * makepkg: Make stripping debug symbols cross-platformSebastian Nowicki2009-02-08
| | | | | | | | | | | | | | | | The Linux and BSD versions of strip have the --strip-debug option (as well as the -S option), however Mac OS X only has -S. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: test fixes, part 2Dan McGee2009-01-18
| | | | | | | | | | | | | | | | The goal of this fix was empty string comparisons: - if [ "$pkgname" != "" ]; then + if [ -n "$pkgname" ]; then Signed-off-by: Dan McGee <dan@archlinux.org>