Age | Commit message (Collapse) | Author |
|
As Turtl's codebase continues to be left unmaintained, more and more build
issues appear with it due to changes in Rust. Like with rusqlite, recently the
url library started experiencing build issues with the current Rust compiler.
So I added another patch to update the url version from v1.6.0 to v1.7.2, which
appears to work around the issue. There's still an ever increasing amount of
build warnings, though all of the unit and integration tests still pass, so for
now, its probably okay.
I didn't update it to the latest version because, like with rusqlite, I was
worried about the possibility of API-breaking changes that would require
patching the source code to fix.
The long-term fix for this would of course be for me to actually learn Rust and
its packaging system, and then update all of the dependencies to the latest
versions (dealing with and fixing compiler errors/warnings as I go) and then
sending it as a pull request to the core-rs repository on GitHub.
But for now, this is really all I can do. :(
The pkgrel has been bumped to 5 for this change, as it results in a different
binary then previously.
|
|
|
|
* The integration tests (which actually communicate with the Turtl server) are
now run during the check() step in addition to the regular unit tests.
* Some of the integration tests do not work (authentication error resulting in
the test repeatedly trying and failing to sync with the server) and I have no
idea why, so for now those tests have just been disabled.
* Change the provided server configuration to allow unconfirmed invites, to
allow the respective integration test to work
* I now export the OpenSSL paths directly rather than using vars.mk
* The 'make' calls have been replaced with direct calls to 'cargo'
|
|
* For the core-rs tests, this is simply copying a pre-made file instead of
using sed to patch the template configuration.
* For the server, this is a little bit harder. The server does not support
loading a custom configuration from anywhere on the system, so I copy all of
the server's JavaScript files into a directory within $srcdir, copy the
custom configuration and then launch the server from within $srcdir.
* This has the benefit of ensuring that the servers are running with a fully
custom configuration, rather than using exported variables and sed patches
against a user-controlled config.
|
|
* The check() step has been divided into "modules" which can be run
independently of each other.
* This then allows the individual steps (create directories -> initialise
database cluster and start SQL server -> configure database and start Turtl
server -> generate configuration and run tests -> shut down Turtl server ->
shut down SQL server -> remove directories) to be run individually, with
traps set up to perform the necessary de-initialization should one step fail.
* This is important as makepkg's default behaviour is to stop as soon as a
command returns with a non-zero exit code. Trapping errors in this manner
allows us to perform the proper database and server cleanup regardless of
whether or not the tests succeeded.
* The output of commands is also no longer redirected to /dev/null, and the
log messages are bolded and coloured to look like makepkg messages.
|
|
* The check() function will now do the following: create a PostgreSQL database
cluster, start a PostgreSQL server, create a role and database in the cluster
for Turtl to use, initialize the database and upload directory for the Turtl
server, start the Turtl server as a background job, run the core-rs tests,
shut down the Turtl and SQL servers and clean up after itself.
* For most commands, the standard output is either silenced with command line
flags or is redirected to /dev/null, to show only errors that occur during
the process.
* This of course requires you to have turtl-server installed.
* Please note that this package creates a release build during the build()
step, whereas in order to run the tests, a debug build has to be made. This
will result in the program being built twice - if this is unacceptable you
can run makepkg with --nocheck to skip running the test suites. This will
also remove the dependency on turtl-server.
|
|
|