about summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-28 02:58:57 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-28 02:58:57 -0400
commitbb327d381e5626d96942a805e6a5f4d4a5a771d5 (patch)
treec7e86c2a6ea8dc67be2221e8517806f365aac088 /README.md
parente4af0011c04e2861e4f890bcb7383f9c87e35126 (diff)
downloadclinte-bb327d381e5626d96942a805e6a5f4d4a5a771d5.tar.gz
extensive rewrite to use json for storage:
sqlite3 requires the directory where the database resides to be
writeable by the user. This presents a problem on multiuser UNIX systems
where they may want to limit areas where users have write access.

This rewrite totally scraps the sqlite3 database in favor of a pretty
simple json file consisting of an array of posts. flock(2) locking is
used to synchronize access to the file and make sure two clients aren't
trying to write to it at once. The locking is fairly granular right now,
but later I may change it to using a single lock for the duration of
execution since race conditions are *possible*, if unlikely for the
purposes of clinte's intended use.
Diffstat (limited to 'README.md')
-rw-r--r--README.md43
1 files changed, 31 insertions, 12 deletions
diff --git a/README.md b/README.md
index c6755af..6814110 100644
--- a/README.md
+++ b/README.md
@@ -1,35 +1,29 @@
 # clinte &nbsp; [![Build Status](https://travis-ci.com/gbmor/clinte.svg?branch=master)](https://travis-ci.com/gbmor/clinte) [![codecov](https://codecov.io/gh/gbmor/clinte/branch/master/graph/badge.svg)](https://codecov.io/gh/gbmor/clinte)
 
-Command-line community notice board. Post text-only notes for other users to see.
+Command-line community notice board for public-access UNIX systems. Post text-only notes for other users to see.
 
 ## Features
 
 - Username is tagged based on the executing user
 - Shows the 15 most recent posts in descending order
-- Able to go back and edit your own posts
+- Able to edit or delete your own posts
 - Title <= 30 chars
 - Body <= 500 chars
 - Calls `$EDITOR` when creating or modifying the body of a post
 - If `$EDITOR` is unset, calls `nano`
+- Stores posts in JSON
+- Uses advisory locking via `flock(2)` to synchronize access to the posts file
 
 [![Screenshot](https://github.com/gbmor/clinte/blob/master/assets/clinte.png)](https://github.com/gbmor/clinte/blob/master/assets/clinte.png)
 
 ## Installation
 
-Current build dependencies are as follows:
-
-- `rust >= 1.36`
-- `libsqlite3-dev`
-
-The installation for the build deps will vary based on your OS (`Linux, BSD`)
-
 Clone the repository and jump into the directory:
 
 ```
 $ git clone git://github.com/gbmor/clinte.git
 ...
 $ cd clinte
-$ git checkout $(git describe --tags --abbrev=0)
 ```
 
 Run the makefile and install:
@@ -42,6 +36,32 @@ $ make
 $ sudo make install
 ```
 
+`make` will automatically checkout the latest tag and build from there.
+
+## Upgrading
+
+**Note:** v1.0.0 used sqlite3, which presented some issues. v2.0.0 uses a json structure for posts,
+as this will be safer on a multi-user system. When upgrading from v1.0.0 to v2.0.0, you won't be
+able to save your posts without using a third-party tool to dump the `posts` table to json, and
+manually adjusting it to fit the expected format (which can be seen in the included `clinte.json`).
+
+*If upgrading from v1.0.0 -> v2.0.0, do a fresh install. The following applies to upgrading when
+already running at least v2.0.0*
+
+```
+$ make update
+$ make
+$ make upgrade
+```
+
+This will:
+
+* checkout `master`
+* pull / rebase changes from upstream
+* checkout the latest tag
+* rebuild
+* replace the `clinte` binary, but leave the posts file untouched.
+
 ## Usage
 
 Issuing the program name itself will list
@@ -91,5 +111,4 @@ Use this flag if something's going wrong. Additional information will be written
 
 ## Notes
 
-`sqlite` expects the directory where the database lies to be writeable by the user. So, until I move this
-to using another storage medium (maybe plain text?), keep that in mind.
+The file where the posts are stored must be writeable by all users on the system. Keep this in mind.
\ No newline at end of file