[arch-projects] [dbscripts] [GIT] Official repo DB scripts branch master updated. 20131102-69-ge53cad6
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Official repo DB scripts". The branch, master has been updated via e53cad6e4a8284165c6d0b2c7c86f6c077be693b (commit) via c82f4372440b42f879344f105e12fb358c4c0ccf (commit) via 3e01ba9a82234c1d78a14be095c18a626591ad71 (commit) via 8757c459089c0db12e57db66561f640f657e34ac (commit) via 07e6a91da1331ae61b667d878092c5b03aa49ced (commit) via b45650c3e3870b975620dd89bb6aa77585c8ff02 (commit) from 134aff74d16331231ed94f34d8417d1325d4600f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e53cad6e4a8284165c6d0b2c7c86f6c077be693b Author: Eli Schwartz <eschwartz@archlinux.org> Date: Thu Feb 15 22:34:36 2018 -0500 Globally set $PKGEXT to a bash extended glob representing valid choices. The current glob `*.pkg.tar.?z` is both less restrictive and more restrictive than makepkg, as it accepts any valid unicode character. To be more exact, it's almost completely orthogonal to the one in makepkg. makepkg only accepts .tar.gz, .tar.bz2, .tar.xz, .tar.lzo, .tar.lrz, and .tar.Z and most of those fail to match against a two-char compression type. dbscripts accepts .pkg.tar.💩z which incidentally is what I think of cherry-picking xz and gz as supported methods. Since this can be anything makepkg.conf accepts, it needs to be able to match all that, unless we decide to perform additional restrictions in which case we should still explicitly list each allowed extension. Using bash extended globbing allows us to do this relatively painlessly. Document the fact that this has *always* been some sort of glob, and update the two cases where this was (not!) being evaluated by bash [[ ... ]], to use a not-elegant-at-all proxy function is_globfile() to evaluate globs *before* testing if they exist. commit c82f4372440b42f879344f105e12fb358c4c0ccf Author: Eli Schwartz <eschwartz@archlinux.org> Date: Thu Feb 15 22:32:04 2018 -0500 ftpdir-cleanup,sourceballs: replace external find command with bash globbing This fully removes the use of find from the codebase, leads to a micro-optimization in a couple cases, and ensures that $PKGEXT is consistently treated as a shell globbing character (which is important because it is used as one). Of the eight instances in these files: - One was unnecessary as `cat` can natively consume all files passed to it and no directory traversal was in use. - Two were unnecessary as they were hardcoded to read a single file.... - Another four were only being used to strip leading directory paths, and can be replaced by globstar and ${filepath##*/} - The final two were checking the modification time of the files, and can be replaced with touch(1) and [[ -nt ]]. Although this introduces an additional temporary file, this is not such a big deal. commit 3e01ba9a82234c1d78a14be095c18a626591ad71 Author: Eli Schwartz <eschwartz@archlinux.org> Date: Thu Feb 15 22:26:24 2018 -0500 db-update: replace external find command with bash globbing Don't bother emitting errors. bash doesn't show globbing errors if it cannot read a directory to try globbing there. And the former code never aborted on errors anyway, as without `set -o pipefail` the sort command swallowed the return code. commit 8757c459089c0db12e57db66561f640f657e34ac Author: Luke Shumaker <lukeshu@parabola.nu> Date: Fri Feb 16 12:10:25 2018 -0500 test: db-update: verify that PKGEXT(S) is treated as a glob Commit b61a714 introduced a regression that in a db-functions function called by db-update, config:PKGEXT is treated like a fixed string, instead of as a glob. Because of inadequacy of the test-suite, this did not cause a test failure. https://lists.archlinux.org/pipermail/arch-projects/2018-February/004742.htm... The broken function checks if the repo already contains a package that matches the one being released. This did not trigger a test-suite failure because right after the broken check there is another check that checks for the exact filename of the new package file. In the test-suite, all package files have the same extension, so the latter check always "saved" us. So, modify a relevant test case (a test case that verifies that we can't release the same package twice) such that the second time we release the package, we set PKGEXT to something different (.gz, instead of the normal .xz). This way, we can be sure that when db-update rejects the operation, it's because of the glob check, not the exact-filename check. This is made slightly tricky because the __buildPackage() test helper routine tries to cache builds, to speed up the tests. Without modification, this means that it will just ignore the new PKGEXT. So, modify it to only use the cache if it can successfully copy build artifacts out, in a way that respects PKGEXT. commit 07e6a91da1331ae61b667d878092c5b03aa49ced Author: Eli Schwartz <eschwartz@archlinux.org> Date: Mon Feb 19 11:12:02 2018 -0500 Fix overloading PKGEXT to mean two things. PKGEXT is a makepkg variable referring to a fixed filename suffix, but we were also using it to mean a bash glob referring to candidate filenames. This is wrong, so rename it to PKGEXTS which is more descriptive of its purpose. Exclude the testsuite from this change, as the testsuite actually uses PKGEXT for its intended purpose. Fix the testsuite to consistently use PKGEXT, as it hardcoded the file extension in several cases, and pin its value to .pkg.tar.xz commit b45650c3e3870b975620dd89bb6aa77585c8ff02 Author: Eli Schwartz <eschwartz@archlinux.org> Date: Mon Feb 19 11:42:22 2018 -0500 Use even more bashisms. Catch some cases that were missed in the previous run. ----------------------------------------------------------------------- Summary of changes: config | 4 +++- cron-jobs/devlist-mailer | 6 +++--- cron-jobs/ftpdir-cleanup | 36 ++++++++++++++++++++++++------------ cron-jobs/integrity-check | 2 +- cron-jobs/sourceballs | 31 +++++++++++++++++++++---------- cron-jobs/update-web-db | 6 +++--- db-functions | 16 ++++++++++++++-- db-move | 4 ++-- db-update | 14 ++++++++------ test/cases/db-repo-add.bats | 6 +++--- test/cases/db-update.bats | 5 ++--- test/cases/ftpdir-cleanup.bats | 6 +++--- test/lib/common.bash | 8 ++++---- 13 files changed, 91 insertions(+), 53 deletions(-) hooks/post-receive -- Official repo DB scripts
participants (1)
-
eschwartz@archlinux.org