Commit Graph

331 Commits

Author SHA1 Message Date
Jordan Bancino 7544a97c7d Format source code, add .exrc 2022-11-23 14:56:31 +00:00
Jordan Bancino 84f311ae09 Don't make assumptions about where the config file is. 2022-11-23 14:31:05 +00:00
Jordan Bancino be3b73f2af Fix cache size warning 2022-11-23 00:53:06 +00:00
Jordan Bancino 520b062dbb Should probably make sure this succeeds. 2022-11-23 00:44:29 +00:00
Jordan Bancino fb56c3fca6 Clean up output a little 2022-11-22 23:57:58 +00:00
Jordan Bancino dce9788adf Fix a bug when overriding CFLAGS with .env 2022-11-22 22:31:53 +00:00
Jordan Bancino b155d0dbe4 ftruncate() technically lives in unistd.h
It should be included to prevent warnings on some compilers.
2022-11-22 22:31:36 +00:00
Jordan Bancino 21d97656e8 Update TODO items; refactor some milestones. 2022-11-21 21:18:00 +00:00
Jordan Bancino 7f883fc92e Remove debugging statements... whoops!
I'm usually pretty good about this.
2022-11-21 21:09:05 +00:00
Jordan Bancino 973e826e57 Fix bug in floating objects to mostRecent 2022-11-21 21:07:40 +00:00
Jordan Bancino 40e5c1ef2a Fix some bugs in DbCreate() regarding UtilMkdir() 2022-11-21 20:59:22 +00:00
Jordan Bancino 789baf33a1 Make Db interfaces take varargs.
This makes it much more flexible, at the expense of making it a little
more fragile. I can think of a number of scenarios where we'll have
paths that have variables in multiple spots, and I don't want to do
sprintf() magic every time I need to access an object at one of those
paths.
2022-11-21 20:31:37 +00:00
Jordan Bancino a0304f4062 Move where we open the database 2022-11-21 16:39:38 +00:00
Jordan Bancino 0c6c1e5b19 Notify the user about the minimum max-cache instead of silently setting it. 2022-11-21 16:22:50 +00:00
Jordan Bancino cd584c1e93 Lock objects on disk if they're locked in memory.
This requires hanging onto an open file handle, and doesn't require
explicit unlocking, because POSIX says files are unlocked when their
descriptors are closed.
2022-11-21 16:13:11 +00:00
Jordan Bancino f56a067456 Make Makefile more portable 2022-11-20 19:31:04 +00:00
Jordan Bancino d7f5a6798d Add some more porting instructions 2022-11-20 15:23:16 +00:00
Jordan Bancino 70fd925c98 Make production configuration file more platform-agnostic 2022-11-20 13:25:07 +00:00
Jordan Bancino 0fa2da8177 Don't chroot() on OpenBSD (pledge() causes it to trap here) 2022-11-20 13:19:56 +00:00
Jordan Bancino c23f817a55 Rename Makefile.OpenBSD to just Makefile (other ports may want it) 2022-11-20 13:01:50 +00:00
Jordan Bancino 46dbc7dad5 Change build to all. Apparently OpenBSD ports requires this. 2022-11-20 02:05:02 +00:00
Jordan Bancino 247aeabf66 Begin preliminary work on an OpenBSD port. 2022-11-20 01:53:15 +00:00
Jordan Bancino 845658e0ac Obscure bug when using OpenBSD make 2022-11-20 01:40:55 +00:00
Jordan Bancino 2293b57b88 Fix main title size 2022-11-20 00:19:00 +00:00
Jordan Bancino 71a6842302 Remove install/uninstall recipes, and replace telodendria-setup with package
man page.
2022-11-20 00:12:53 +00:00
Jordan Bancino 8db83fe1fc Don't have the synopsis table be styled like real tables. 2022-11-19 23:22:21 +00:00
Jordan Bancino d61770c772 Make mandoc link to man pages
Now web users can just click on the references and be taken to that page.
Unfortunately this generates a lot of broken links as well, for example
all the times I like to a system manual page that I don't copy to the
web server.
2022-11-19 23:15:08 +00:00
Jordan Bancino 8d203f6cb8 Pull OpenBSD 7.2 mandoc.css
Somewhere between OpenBSD 7.1 and 7.2, mandoc changed the way it does a
lot of things. This commit pulls the base mandoc.css, and then includes it
in the Telodendria sylesheet. It is no longer feasable to customize the
mandoc stylesheet much, so luckily the default style is good enough.
2022-11-19 00:34:41 +00:00
Jordan Bancino e8b80e4c69 Clarify development notice. 2022-11-18 23:53:29 +00:00
Jordan Bancino 9b7acbf586 New color scheme 2022-11-18 23:51:03 +00:00
Jordan Bancino fb7363d97e Don't uninstall the configuration file. 2022-11-18 22:49:06 +00:00
Jordan Bancino fe29b9f848 Remove unit testing code.
Until I can do it properly, I don't want to do it at all.
2022-11-18 22:27:23 +00:00
Jordan Bancino 07f4ecd2d7 Make a number of improvements to cache handling.
- Items that are too big for the cache are now no longer immediately
  evicted; everything else is. This is probably not desirable, but it is
  not unexpected.
- Multithreading now should work as expected; DbRefs are locked before
  they are updated from the disk, and they are not evicted from the cache
  if they are locked by another thread.
- The cache may be no smaller than 1024 bytes. Previously the caller of
  DbOpen() could choose to disable the cache, and provisions were made in
  the code to support this, but this is now no longer possible because
  without the cache, there would be no way to know what files were open,
  which could lead to a race condition if two threads open the same file.
2022-11-18 22:17:56 +00:00
Jordan Bancino 045c6d8644 Cache eviction 2022-11-18 20:42:08 +00:00
Jordan Bancino e7ad166877 Fix some memory leaks in Db 2022-11-18 19:36:15 +00:00
Jordan Bancino f6851de75f Fix a few bugs in JsonDecode(). It should now properly decode objects. 2022-11-18 14:51:44 +00:00
Jordan Bancino 2e6c129263 Fix a mutex bug in Db and some memory errors in Json 2022-11-17 23:51:45 +00:00
Jordan Bancino d26fad4619 Add UtilMkdir() to recursively make directories 2022-11-17 22:57:29 +00:00
Jordan Bancino 9597894356 Fix some warnings on GCC.
These aren't really anything to be concerned about, but making GCC feel good
about my code makes me feel better about my code.
2022-11-17 19:33:59 +00:00
Jordan Bancino 46cc1df385 Do some Db work 2022-11-15 18:20:05 +00:00
Jordan Bancino 9494016d2d Apply #34 2022-11-13 17:10:25 +00:00
Jordan Bancino a356403cfd Finish DbComputeSize() 2022-11-12 18:26:31 +00:00
Jordan Bancino 8c36efa1d0 Add item to TODO.txt 2022-11-11 01:10:16 +00:00
Jordan Bancino 6776db5ff9 Accept #33 2022-11-11 01:07:49 +00:00
Jordan Bancino c7a358150c Update documentation 2022-11-08 17:56:11 +00:00
Jordan Bancino 8e71cc833c Change behavior of "id" configuration directive. 2022-11-08 17:53:01 +00:00
Jordan Bancino efbbf42a6e Fix memory and connection closing errors. 2022-11-08 01:05:28 +00:00
Jordan Bancino 6c016b813c Add relayd.conf to contrib/ 2022-11-07 16:19:29 +00:00
Jordan Bancino 95c566d314 Add td changes to the documentation 2022-11-07 14:07:31 +00:00
Jordan Bancino 328303506b Add one-time donate link. 2022-11-07 13:47:33 +00:00