summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-04librerelease: Check that DBSCRIPTS_CONFIG is setv20181004Luke Shumaker
2018-10-04test: librerelease: Verify that it requires DBSCRIPTS_CONFIG to be set [ci-skip]Luke Shumaker
2018-10-04test: librerelease: Use AuthorizedKeysCommand to bypass perm checks on $TMPDIRLuke Shumaker
If $TMPDIR is permissively owned (as /tmp is), then sshd will refuse to look at the AuthorizedKeysFile. So bypass that permission check by configuring AuthrorizedKeysCommand to just `cat` that file.
2018-10-04test: common.bash: Shorten tmpdirLuke Shumaker
If /run/user/$UID/ doesn't exist, then the gpg-agent socket will be in $GNUPGHOME, which is inside of $tmpdir. Because the $BATS_TEST_NAME is embedded in $tmpdir, the path might be quite long, and hit the 108-byte limit on socket paths, which GnuPG does nothing to check for or handle. So, don't embed $BATS_TEST_NAME in $tmpdir, in order to keep the path shorter.
2018-10-04test: common.bash: common_teardown: Don't assume that common_setup went OKLuke Shumaker
common_setup might have errored before setting tmpdir or chrootdir; handle those cases.
2018-10-03test: common.bash: Clean up chroots as we goLuke Shumaker
2018-10-03librerelease: Change how the HOOKs are displayedLuke Shumaker
This will display the evaluated command line, rather than the cryptic ssh -fN ${REPODEST_port:+-p "$REPODEST_port"} "${REPODEST_userhost}"
2018-10-03librerelease: Set DBSCRIPTS_CONFIG for db-updateLuke Shumaker
Its value is configurable in libretools.conf. I discussed this eventual change in my dbscripts plans on the mailing list.
2018-10-02test: librerelease: Add tests for the actual runLuke Shumaker
https://labs.parabola.nu/issues/1411 https://labs.parabola.nu/issues/1412 I have verified that the test fails with commit 0b8606e0cd0e1aedfe222d4d6603c4986aacb7b5 ("librerelease: Fix rmdir failing") reverted.
2018-10-02Revert "test: librerelease: Begone with setup()"Luke Shumaker
This reverts commit 70b9f3cdcabc217609be96cfdd1fd47133aa273b.
2018-10-02test: runserver: Explicitly listen on IPv4Luke Shumaker
The implementation is not dual-stack. It supports *either* IPv4 or IPv6. I'm not entirely sure how it chooses. Clients that support happy-eyeballs will do thing right thing, but clients that don't (*cough* openssh) won't. So explicitly choose the IPv4 localhost instead of using an ambiguous "localhost".
2018-10-02test: librerelease: TidyLuke Shumaker
Use local variables.
2018-10-02libremakepkg: Fix launching `distcc-tool idaemon`Luke Shumaker
- Drop `distcc-tool-idaemon.pid`; we can just check `jobs -p` - _distcc_start_idaemon() and _distcc_stop_idaemon() are thereby simplified to the point where they can just be inlined. - Why did I keep doing `foo & wait`!? - Don't forget to write DISTCC_HOSTS to makepkg.conf - There was a typo in makepkg.conf; it said "_discc_start_idaemon"
2018-10-02test: libremakepkg: Verify that it correctly forwards ports through ↵Luke Shumaker
distcc-tool [ci-skip]
2018-10-02test: Add runserver from the dbscripts test suiteLuke Shumaker
It was written by me, in May 2018.
2018-10-02libremakepkg: Tidy funny syntaxLuke Shumaker
I don't know what I was thinking when I wrote it that way. For one, the "<&0" bit is a no-op. It redirects stdin to be stdin. Maybe I had meant to write "<&-" and close it? For two, just write it normally. It's simple enough, don't make it look like magic.
2018-10-02distcc-tool: SimplifyLuke Shumaker
- I'm pretty sure the "& trap 'jobs -p | xargs kill' EXIT; wait" bit is 100% superstition. - Sprinkle `exec` in there to use fewer PIDs - Don't bother with variables for short constant values, just hard-code them - Use `sleep infinity` instead of a dumb socat if we need to sleep forever without doing anything.
2018-10-01(BATS) test: Manual Roundup→BATS conversionLuke Shumaker
2018-10-01(BATS) test/cases: Automated Roundup→BATS conversionLuke Shumaker
for file in test/cases/*.bats; do name=$(sed -n 's/^describe //p' -- "$file") sed -ri ' # Remove the roundup shebang /^#!\/usr\/bin\/env roundup$/d # Use $BATS_TEST_NAME instead of $roundup_test_name s,roundup_test_name,BATS_TEST_NAME,g # Use BATS built-in "skip" instead of just succeeding /^\trequire /s/\|\| return 0$/|| skip/ # Remove the chroot message, does not play well with BATS output /Creating a chroot, may take a few minutes/d # Update file locations s,^\. \./test-common\.sh$,load ../lib/common, s,\b(libre(chroot|dbdiff|fetch|makepkg|stage|xgettext)|pkgbuild-check-nonfree|toru)\.d\b,fixtures/\1,g # In BATS, the hook is setup(), not before() s,^before\(\),setup(), s,^\tcommon_before$,\tcommon_setup, # Convert test definitions from # describe FOO # it_does_a_thing() { … } # to # @test "FOO does a thing" { … } /^describe /d /^it_/ { s/_/ /g s,^it (.*)\(\),@test "'"$name"' \1\", } ' \ -- "$file" # Remove leading newline that might have been left behind by the above sed -i '1{/^$/d}' -- "$file" git add "$file" done sed -i \ -e 's,librexgettext\.d,fixtures/librexgettext,g' \ -e 's,/it_,/test_librexgettext_,g' \ -- test/fixtures/librexgettext/* git add test/fixtures/librexgettext/*
2018-10-01(BATS) test: Move files aroundLuke Shumaker
But don't edit them yet. This directory structure is based on that of dbscripts.
2018-10-01distcc-tool: Note which Bash version is requiredLuke Shumaker
2018-10-01libremakepkg: Add a commentLuke Shumaker
This really messed me up while debugging, I don't want to fall for that again!
2018-10-01libremakepkg: distcc-tool: Avoid using overly-long socket namesLuke Shumaker
The maximum socket name length is surprising short. So `cd` and use a short relative path.
2018-10-01test: libremakepkg: Check that distcc works with long paths [ci-skip]Luke Shumaker
2018-10-01test/cases: Ditch trying to revert config customizationsLuke Shumaker
With $HOME now being owned by test-common.sh instead of testenv, it's sufficiently short-lived that we don't need to worry about reverting changes we make to it.
2018-10-01test: librerelease: Begone with setup()Luke Shumaker
- move REPODEST to common.bash - don't bother setting PKGEXT
2018-10-01test: Centalize setup in common_setup where it makes senseLuke Shumaker
2018-10-01test: librerelease: Better loggingLuke Shumaker
2018-10-01test: Fix file permissionsLuke Shumaker
Some files were marked executable that shouldn't have been.
2018-10-01test: Add globfile() to make it easy to check if a file matching a glob existsLuke Shumaker
2018-10-01test: Clean up (config) file writingLuke Shumaker
Instead of using in inconsistent mish-mash of `mkdir` and `echo >` and `printf >>`, use more readable and identifiable indented-heredocs: install -Dm644 /dev/stdin "FILENAME" <<-eot CONTENTS eot
2018-10-01test: pkgbuild-check-nonfree: Remove superfluous setting of BLACKLIST=Luke Shumaker
It's already set that way in setup() of that file.
2018-10-01test: librefetch: Use the common GPGKEY; don't create a new oneLuke Shumaker
2018-10-01test: testenv: Clean up the sudo hackLuke Shumaker
2018-10-01test: testenv: Group the list of variables in _sudo()Luke Shumaker
2018-10-01test: test-common.sh: Roll chroot_before in to common_beforeLuke Shumaker
The big reason for having it separate was that we needed to install an expensive after(). But, since that part of cleanup is now owned by testenv, that's not a concern.
2018-10-01test: test-common.bash: Remove hooks from before()Luke Shumaker
Instead, make the default before() an alias for common_before(), which test files can call if they override before().
2018-10-01test: pkgbuild-check-nonfree: Expand $pcn and $psnLuke Shumaker
2018-10-01test: librefetch: sed -i s,tmpdir/srcdest,tmpdir/workdir/srcdest,gLuke Shumaker
For consistency with other tests.
2018-10-01test: test-common.sh: Sync the unset list with restore_envvars in makepkgLuke Shumaker
The effective change is that CARCH is added to the list.
2018-10-01test: test-common.sh: Add some comments, tidyLuke Shumaker
2018-10-01test: testenv: Use the correct paths in makepkg.d/librefetch.confLuke Shumaker
Instead of having librefetch-test.sh do it.
2018-10-01test: Normalize on "status" instead of "stat" "ret" or "r" for storing exit ↵Luke Shumaker
codes The name "status" was chosen because BATS initializes status=0; if we switch from Roundup to BATS, our common setup won't need set it anymore. Accomplish this with: $ sed -ri -e 's/\$(stat|ret|r)\b/$status/g' -e 's/\b(stat|ret|r)=/status=/g' test/*.sh $ sed -ri '/^\s*(local\s+)?status=0$/d' test/*-test.sh
2018-09-30test: Have $HOME be owned by test-common.sh instead of testenvLuke Shumaker
2018-09-30test: Have $chrootdir be owned by testenv instead of test-common.shLuke Shumaker
2018-09-29test: Have GPG stop dropping private keys in my home directoryLuke Shumaker
2018-09-20libretools.conf:REPODEST: Don't use a shared SSH account by default.v20180920Luke Shumaker
DISRUPTION: This will make the default configuration unsuitable for packagers whose local username doesn't match their username in hackers.git. They will need to manually adjust their `libretools.conf:REPODEST` to have the correct username. For years, when releasing a package, librerelease has been SSH'ing to a shared repo@ account. In the last few months, we've made changes to the server to make it so that you can use your normal $USER@ account. It has been opt-in by adjusting your REPODEST appropriately. For the last month, several developers have opted-in. After a couple of hiccups resolved in the first few hours, the HOOKPRERELEASE issue (for users for which the DISRUPTION applies, which the last few commits fixed), there were no issues. This has the negative affect So, change this from opt-in to opt-out. If all goes smoothly, then SSH to the repo@ account will eventually be disabled. https://lists.parabola.nu/pipermail/dev/2018-August/006907.html
2018-09-20libretools.conf:HOOKPRERELEASE: Respect $XDG_CONFIG_HOME's REPODESTLuke Shumaker
~/.config/libretools/libretools.conf is loaded after /etc/libretools.conf If the file in ~/.config/ changes REPODEST, then the default value of HOOKPRERELEASE will do the wrong thing. So, change the double-quotes to single quotes; deferring evaluation of the REPODEST expression to call-time. This is made possible by the previous commit, which exposes the REPODEST variable to the hook. While we're at it, since we now have access to the parsed parts of REPODEST (like REPODEST_port and REPODEST_userhost), go ahead and use those, instead of using a gross `sed` expression to parse it in a sloppy way.
2018-09-20librerelease: Run the HOOKs with `eval` rather than `bash -c`Luke Shumaker
This should give the hooks read-only access to whatever variables are set. This includes both the configuration variables (like REPODEST), and local instance variables (like REPODEST_port).
2018-09-20dagpkg: Fix a commentLuke Shumaker