{"push_id":2884859371,"size":42,"distinct_size":42,"ref":"refs/heads/master","head":"0b630e25a3181d5228cbd99c9041a04b6514fc81","before":"1cad51c5af4b0aa1e1196d737edaa00938af937f","commits":[{"sha":"eec8e35eba84658bdd03230c83f449d2bb437b10","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Use return codes properly when checking for failed commands.\n\nRather than doing a test(1) on the numerical value of the return code,\nuse the `if !` and `||` operators during control flow.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/eec8e35eba84658bdd03230c83f449d2bb437b10"},{"sha":"5afac1ed83479c5ff7aab134b54245ec4f5b59fe","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Update messages to make full use of printf formatters\n\nlibmakepkg messaging functions provide automatic access to gettext\n(which we do not currently make use of) in addition to cleanly\nseparating data from message strings.\n\nIn order for this to work properly, pass argv correctly from die() to\nlibmakepkg's error()","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/5afac1ed83479c5ff7aab134b54245ec4f5b59fe"},{"sha":"a7b497e8347fc964f8738d4dfc3c3ef23806fdc7","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"ARCHES is an array, do not attempt to call it as a string\n\nThis meant only the first array element was checked in\ncheck_repo_permission(). Although arguably this should never cause real\nissues as something else would have to be broken if multiple\narchitectures have different permissions, we should catch this now\nanyway.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/a7b497e8347fc964f8738d4dfc3c3ef23806fdc7"},{"sha":"f4f9d1a0099c1f784c4a964e2b5651b56f629b82","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Use modern bash to append to strings/arrays.\n\nRather than using ugly hacks like arr[${#arr[*]}]=\"foo\", bash 3.1 has\nthe += operator.\n\nUpdate strings to use the same operator while we are at it.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/f4f9d1a0099c1f784c4a964e2b5651b56f629b82"},{"sha":"b61a7148eaf546a31597b74d9dd8948e4a39dea1","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Use more bashisms\n\nFix numerous instances of POSIX `[ ... ]`, including reliance on ugly\ndeprecated constructs like POSIX `-a`. Since we require bash regardless,\nit makes sense to take full advantage of it.\n\nbash `[[ ... ]]` does not require quoting variables as the shell\nnatively recognizes them as variables rather than expanded strings.\n\nUse shell arithmetic rather than test, when checking numerical values.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/b61a7148eaf546a31597b74d9dd8948e4a39dea1"},{"sha":"36b71d3231aca071ad635b995342b786676ef8fe","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"db-functions: deduplicate some repeated logic\n\nreuse getpkgfile() in getpkgfiles()","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/36b71d3231aca071ad635b995342b786676ef8fe"},{"sha":"883005f5450ed6a278b5cef46be1245783840b29","author":{"name":"Florian Pritz","email":"753f544d2d01592750fb4bd29251b78abcfc8ecd@xinu.at"},"message":"Remove i686 from config\n\nWe dropped it long ago and this should be reflected here rather than\nbeing changed on our servers only.\n\nSigned-off-by: Florian Pritz <bluewind@xinu.at>","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/883005f5450ed6a278b5cef46be1245783840b29"},{"sha":"24671e6cb2fa343fd6f15fe54b16840aed091ad4","author":{"name":"Pierre Schmitz","email":"ff019a5748a52b5641624af88a54a2f0e46a9fb5@archlinux.de"},"message":"PR-2: Allow i686 for tests","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/24671e6cb2fa343fd6f15fe54b16840aed091ad4"},{"sha":"c7f1d85c0e11aaf3c9acd944388f664aea40037b","author":{"name":"Pierre Schmitz","email":"ff019a5748a52b5641624af88a54a2f0e46a9fb5@archlinux.de"},"message":"PR-2: Default to x86_64 for check_packages","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/c7f1d85c0e11aaf3c9acd944388f664aea40037b"},{"sha":"134aff74d16331231ed94f34d8417d1325d4600f","author":{"name":"Pierre Schmitz","email":"ff019a5748a52b5641624af88a54a2f0e46a9fb5@archlinux.de"},"message":"Add usage tests","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/134aff74d16331231ed94f34d8417d1325d4600f"},{"sha":"b45650c3e3870b975620dd89bb6aa77585c8ff02","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Use even more bashisms.\n\nCatch some cases that were missed in the previous run.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/b45650c3e3870b975620dd89bb6aa77585c8ff02"},{"sha":"07e6a91da1331ae61b667d878092c5b03aa49ced","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Fix overloading PKGEXT to mean two things.\n\nPKGEXT is a makepkg variable referring to a fixed filename suffix, but\nwe were also using it to mean a bash glob referring to candidate\nfilenames. This is wrong, so rename it to PKGEXTS which is more\ndescriptive of its purpose.\n\nExclude the testsuite from this change, as the testsuite actually uses\nPKGEXT for its intended purpose. Fix the testsuite to consistently use\nPKGEXT, as it hardcoded the file extension in several cases, and pin\nits value to .pkg.tar.xz","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/07e6a91da1331ae61b667d878092c5b03aa49ced"},{"sha":"8757c459089c0db12e57db66561f640f657e34ac","author":{"name":"Luke Shumaker","email":"1abe3165bcc8c29e8b31e5c88636540fb9350004@parabola.nu"},"message":"test: db-update: verify that PKGEXT(S) is treated as a glob\n\nCommit b61a714 introduced a regression that in a db-functions function\ncalled by db-update, config:PKGEXT is treated like a fixed string, instead\nof as a glob.  Because of inadequacy of the test-suite, this did not cause\na test failure.\n\nhttps://lists.archlinux.org/pipermail/arch-projects/2018-February/004742.html\n\nThe broken function checks if the repo already contains a package that\nmatches the one being released.  This did not trigger a test-suite failure\nbecause right after the broken check there is another check that checks for\nthe exact filename of the new package file.  In the test-suite, all\npackage files have the same extension, so the latter check always \"saved\"\nus.\n\nSo, modify a relevant test case (a test case that verifies that we can't\nrelease the same package twice) such that the second time we release the\npackage, we set PKGEXT to something different (.gz, instead of the normal\n.xz).  This way, we can be sure that when db-update rejects the operation,\nit's because of the glob check, not the exact-filename check.\n\nThis is made slightly tricky because the __buildPackage() test helper\nroutine tries to cache builds, to speed up the tests.  Without\nmodification, this means that it will just ignore the new PKGEXT.  So,\nmodify it to only use the cache if it can successfully copy build artifacts\nout, in a way that respects PKGEXT.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/8757c459089c0db12e57db66561f640f657e34ac"},{"sha":"3e01ba9a82234c1d78a14be095c18a626591ad71","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"db-update: replace external find command with bash globbing\n\nDon't bother emitting errors. bash doesn't show globbing errors if it\ncannot read a directory to try globbing there. And the former code never\naborted on errors anyway, as without `set -o pipefail` the sort command\nswallowed the return code.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/3e01ba9a82234c1d78a14be095c18a626591ad71"},{"sha":"c82f4372440b42f879344f105e12fb358c4c0ccf","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"ftpdir-cleanup,sourceballs: replace external find command with bash globbing\n\nThis fully removes the use of find from the codebase, leads to a\nmicro-optimization in a couple cases, and ensures that $PKGEXT is\nconsistently treated as a shell globbing character (which is important\nbecause it is used as one).\n\nOf the eight instances in these files:\n\n- One was unnecessary as `cat` can natively consume all files passed to\n  it and no directory traversal was in use.\n\n- Two were unnecessary as they were hardcoded to read a single file....\n\n- Another four were only being used to strip leading directory paths,\n  and can be replaced by globstar and ${filepath##*/}\n\n- The final two were checking the modification time of the files, and\n  can be replaced with touch(1) and [[ -nt ]]. Although this introduces\n  an additional temporary file, this is not such a big deal.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/c82f4372440b42f879344f105e12fb358c4c0ccf"},{"sha":"e53cad6e4a8284165c6d0b2c7c86f6c077be693b","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"Globally set $PKGEXT to a bash extended glob representing valid choices.\n\nThe current glob `*.pkg.tar.?z` is both less restrictive and more\nrestrictive than makepkg, as it accepts any valid unicode character.\n\nTo be more exact, it's almost completely orthogonal to the one in makepkg.\n\nmakepkg only accepts .tar.gz, .tar.bz2, .tar.xz, .tar.lzo, .tar.lrz, and\n.tar.Z and most of those fail to match against a two-char compression type.\n\ndbscripts accepts .pkg.tar.💩z which incidentally is what I think of\ncherry-picking xz and gz as supported methods.\n\nSince this can be anything makepkg.conf accepts, it needs to be able to\nmatch all that, unless we decide to perform additional restrictions in\nwhich case we should still explicitly list each allowed extension. Using\nbash extended globbing allows us to do this relatively painlessly.\n\nDocument the fact that this has *always* been some sort of glob, and\nupdate the two cases where this was (not!) being evaluated by bash\n[[ ... ]], to use a not-elegant-at-all proxy function is_globfile() to\nevaluate globs *before* testing if they exist.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/e53cad6e4a8284165c6d0b2c7c86f6c077be693b"},{"sha":"f22f1554720da245955337782ce554d5c3f93c8c","author":{"name":"Eli Schwartz","email":"031f9ae1d5e7e375155d1b4e987de41a1b3dacf3@archlinux.org"},"message":"db-functions: unify the repo-add/repo-remove caller\n\nUse less duplicated logic, opening the way to more elegantly change\nthe interface for the repo-add/repo-remove scripts which are themselves\nsymlinked together and mostly have the same interface.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/f22f1554720da245955337782ce554d5c3f93c8c"},{"sha":"33aae318542016f66d2f0e09654606649d404ff2","author":{"name":"Luke Shumaker","email":"1abe3165bcc8c29e8b31e5c88636540fb9350004@parabola.nu"},"message":"Update messages to make fuller use of printf formatters\n\nThese are things that were (IMO) missed in 5afac1e.  I found them using:\n\n    git grep -E '(plain|msg|msg2|warning|error|die) \"[^\"]*\\$'\n\nI went a little above-and-beyond for escaping strings for the error\nmessages in db-functions' arch_repo_add and arch_repo_remove.  The\ncode should explain itself, but I wanted to point it out, as it's more than\nthe usual \"slap %s in there, and move the ${...} to the right\".","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/33aae318542016f66d2f0e09654606649d404ff2"},{"sha":"4ae3ea2f71344045fa4990c0524b4c662ab83cfc","author":{"name":"Luke Shumaker","email":"1abe3165bcc8c29e8b31e5c88636540fb9350004@parabola.nu"},"message":"test: common.bash:__getCheckSum: Don't rely on IFS\n\nI managed to stumble across a bug in BATS where the run() function\nscrewed with the global IFS.  The bug has been fixed in git, but isn't\nin a release yet.\n\nhttps://github.com/sstephenson/bats/issues/89\n\nAnyway, this bug breaks __getCheckSum().  Fortunately, we have avoided\ntripping it so far because luck has it that we never call\n__getCheckSum() after run() in the same test.\n\nSo, there's nothing actually broken here, but it makes me nervous.  So\ngo ahead and modify __getCheckSum to not rely on IFS.\n\nAnd, while we're at it: declare the result variable and set it as\nseparate commands.  Doing both in the same command masks the exit code\nof the subshell expansion.  We don't explicitly check the exit code,\nbut BATS runs the test suite with `set -e`, so splitting it does mean\nthat BATS will now detect errors from sha1sum.  We don't really expect\nthat to happen, but if BATS will give us error checking on it for\nfree, why not?","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/4ae3ea2f71344045fa4990c0524b4c662ab83cfc"},{"sha":"da49ea616e162d3cfcb4b6a4242f497e94c36564","author":{"name":"Luke Shumaker","email":"1abe3165bcc8c29e8b31e5c88636540fb9350004@parabola.nu"},"message":"test: Fixup glob matching\n\n - ftpdir-cleanup.bats: Glob expansion does not occur in [[ -f ]] tests.\n   The [[ ! -f .../${pkgname}-*${PKGEXT} ]] checks were checking that there\n   were no files containing a literal '*' for that part of their name.\n   Obviously, this isn't what was intended.\n\n - sourceballs.bats: [ -r ] checks explode if the glob returns >1 file.\n   Avoid using them if the path being checked contains a glob.","distinct":true,"url":"https://api.github.com/repos/eli-schwartz/dbscripts/commits/da49ea616e162d3cfcb4b6a4242f497e94c36564"}]}
{"actor":{"display_login":"eli-schwartz"}}