Skip to content

Commit 44c696d

Browse files
committed
documentation update
1 parent 279504a commit 44c696d

11 files changed

Lines changed: 76 additions & 138 deletions

File tree

cmd/config_generator/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This program generates env config scripts from config.Config struct tags for
22
// unix and windows platforms.
33
// Usage: go run ./cmd/config_generator [platform] [filename]
4-
// Example: go run ./cmd/config_generator windows settings.bat
4+
// Example: go run ./cmd/config_generator unix settings.env
55
package main
66

77
import (

cmd/server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func init() {
4747

4848
// Optionally populate environment variables with config file
4949
if err := godotenv.Load(*cfgFile); err != nil {
50-
fmt.Printf("Config file not found (%s). Moving on...\n", *cfgFile)
50+
fmt.Printf("Config file (%s) not found, defaulting to env vars for app config...\n", *cfgFile)
5151
} else {
5252
fmt.Printf("Successfully loaded config file (%s)\n", *cfgFile)
5353
}

config/ras.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Environment="DISABLE_AUTH=true"
1717
Environment="FAIL_FAST=false"
1818
Environment="LOG_LEVEL=info"
1919
Environment="OSCAR_HOST=127.0.0.1"
20-
ExecStart=/opt/ras/bin/retro_aim_server
20+
ExecStart=/opt/ras/retro_aim_server
2121
Restart=on-failure
2222

2323
[Install]

docs/BUILD.md

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,8 @@ Before you can run Retro AIM Server, set up the following software dependencies.
1111

1212
Since Retro AIM Server is written in go, install the latest version of [golang](https://go.dev/).
1313

14-
If you're new to go, try [Visual Studio Code](https://code.visualstudio.com) wth the
15-
[go plugin](https://code.visualstudio.com/docs/languages/go) as your first IDE.
16-
17-
### C Compiler
18-
19-
A C compiler is required in order to build the sqlite dependency.
20-
21-
#### macOS
22-
23-
> If you have git, this is likely already set up on your machine.
24-
25-
```shell
26-
xcode-select --install
27-
```
28-
29-
#### Linux (Ubuntu)
30-
31-
```shell
32-
sudo apt install build-essential
33-
```
34-
35-
#### Windows
36-
37-
Install the [tdm-gcc compiler](https://jmeubank.github.io/tdm-gcc/).
14+
If you're new to go, try [Visual Studio Code](https://code.visualstudio.com) wth the [go plugin](https://code.visualstudio.com/docs/languages/go)
15+
as your first IDE.
3816

3917
### Mockery (optional)
4018

@@ -71,8 +49,7 @@ go build -o retro_aim_server ./cmd/server
7149
To run the binary with the settings file:
7250

7351
```shell
74-
source config/settings.env
75-
./retro_aim_server
52+
./retro_aim_server -config config/settings.env
7653
```
7754

7855
## Testing
@@ -86,7 +63,6 @@ go test -race ./...
8663

8764
## Config File Generation
8865

89-
The config files `config/settings.bat` and `config/settings.env` are generated programmatically from the
90-
[Config](../config/config.go) struct using `go generate`. If you want to add or remove application configuration
91-
options, first edit the Config struct and then generate the configuration files by running `make config` from the
92-
project root. Do not edit the config files by hand.
66+
The config file `config/settings.env` is generated programmatically from the [Config](../config/config.go) struct using
67+
`go generate`. If you want to add or remove application configuration options, first edit the Config struct and then
68+
generate the configuration files by running `make config` from the project root. Do not edit the config files by hand.

docs/CLIENT.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ Windows AIM versions 5.0-5.1.3036 run perfectly well on [Wine](https://www.wineh
2020

2121
Windows AIM can run on modern macOS without a VM, including the Apple Silicon platform!
2222

23-
Get started with the
24-
[AIM for macOS project](https://github.com/mk6i/aim-for-macos).
23+
Get started with the [AIM for macOS project](https://github.com/mk6i/aim-for-macos).
2524

2625
### Windows 10/11
2726

@@ -44,7 +43,7 @@ Once installed, configure AIM to connect to Retro AIM Server.
4443
<img width="662" alt="screenshot of AIM preferences window" src="https://github.com/mk6i/mkdb/assets/2894330/c7cfcaa4-8132-4b57-b5c9-7643c99cbda2">
4544
</p>
4645
3. In the `Host` field, enter the value of `OSCAR_HOST` found in `config/settings`. In the `Port` field, enter the
47-
value of `AUTH_PORT` found in `config/settings`.
46+
value of `AUTH_PORT` found in `config/settings.env`.
4847
<p>
4948
<img width="618" alt="Screen Shot 2024-03-29 at 11 22 19 PM" src="https://github.com/mk6i/mkdb/assets/2894330/da17c457-a773-4b82-b4ba-cb81f9a2e085">
5049
</p>

docs/CLIENT_ICQ.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ using [WineskinServer](https://github.com/Gcenx/WineskinServer), a wrapper for W
117117
## Post-install Configuration
118118

119119
In this step, we'll replace ICQ's default server hostname with your Retro AIM
120-
Server's hostname in the Windows Registry.
120+
Server's hostname in the Windows Registry.
121121

122122
> Do not attempt to set the ICQ hostname via the registration Window. If you do
123123
> this, a bug will surface that prevents the client from "remembering" settings
@@ -149,7 +149,7 @@ Server's hostname in the Windows Registry.
149149

150150
- Double-click the `Default Server Host` registry entry.
151151
- Set `Value data` to the value of `OSCAR_HOST` found in Retro AIM Server
152-
configuration `config/settings.env` (Linux/macOS) or `config/settings.bat` (Windows).
152+
configuration `config/settings.env`.
153153
- Click OK.
154154

155155
<p align="center">
@@ -163,9 +163,7 @@ Server's hostname in the Windows Registry.
163163

164164
- Double-click the `Default Server Port` registry entry.
165165
- Tick the `Decimal` radio button.
166-
- Set `Value data` to the value of `AUTH_PORT` found in Retro AIM Server
167-
configuration `config/settings.env` (Linux/macOS) or `config/settings.bat`
168-
(Windows).
166+
- Set `Value data` to the value of `AUTH_PORT` found in Retro AIM Server configuration `config/settings.env`.
169167
- Click OK.
170168

171169
<p align="center">

docs/LINUX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This guide explains how to download, configure and run Retro AIM Server on Linux
2020
Run the following command to launch Retro AIM Server:
2121

2222
```shell
23-
./run.sh
23+
./retro_aim_server
2424
```
2525

2626
Retro AIM Server will run in the terminal, ready to accept AIM client connections.

docs/MACOS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This guide explains how to download, configure and run Retro AIM Server on macOS
77
Grab the latest macOS release from the [Releases page](https://github.com/mk6i/retro-aim-server/releases) for your
88
platform (Intel or Apple Silicon).
99

10-
Because the Retro AIM Server `.app` has not been blessed by Apple, browsers such as Chrome may think it's a
10+
Because the Retro AIM Server binary has not been blessed by Apple, browsers such as Chrome may think it's a
1111
"suspicious" file and block the download, in which case you need to explicitly opt in to downloading the untrusted
1212
file.
1313

@@ -25,16 +25,16 @@ This guide explains how to download, configure and run Retro AIM Server on macOS
2525
Open a terminal and navigate to the extracted directory. This terminal will be used for the remaining steps.
2626

2727
```shell
28-
cd ~/Downloads/retro_aim_server.0.1.0.macos.intel_x86_64/
28+
cd ~/Downloads/retro_aim_server.0.11.0.macos.intel_x86_64/
2929
```
3030

3131
3. **Remove Quarantine**
3232

33-
Because the Retro AIM Server `.app` has not been blessed by Apple, macOS will quarantine the application. To proceed,
34-
remove the quarantine flag from the `.app`. In the same terminal, run following command:
33+
macOS will quarantine the Retro AIM Server binary because it has not been blessed by Apple. To remove the quarantine
34+
flag from the binary, run following command in the same terminal,
3535

3636
```shell
37-
sudo xattr -d com.apple.quarantine ./bin/retro_aim_server
37+
sudo xattr -d com.apple.quarantine ./retro_aim_server
3838
```
3939

4040
> While the binaries are 100% safe, you can avoid the security concern by [building the application yourself](./BUILD.md).
@@ -57,7 +57,7 @@ This guide explains how to download, configure and run Retro AIM Server on macOS
5757
Run the following command to launch Retro AIM Server:
5858

5959
```shell
60-
./run.sh
60+
./retro_aim_server
6161
```
6262

6363
Retro AIM Server will run in the terminal, ready to accept AIM client connections.

docs/RELEASE.md

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,39 @@ This document explains how the Retro AIM Server release process works.
55
## Overview
66

77
Retro AIM Server is built and released to Github using [GoReleaser](https://goreleaser.com/). The release process, which
8-
runs from a local computer (and not a CI/CD process) creates pre-built binaries for several platforms (Windows, MacOS,
8+
runs from a local computer (and not a CI/CD process) creates pre-built binaries for several platforms (Windows, macOS,
99
Linux).
1010

11-
GoReleaser runs in a Docker container for two important reasons:
12-
13-
- Docker provides a hermetic environment that prevents build contamination from the host environment.
14-
- The Docker image [goreleaser-cross](https://github.com/goreleaser/goreleaser-cross) consolidates all the libraries
15-
needed for cross-compilation in one place.
16-
- Given that the application uses cgo, it's much easier to use a pre-built container to build the sqlite library
17-
than to manually set up a C compiler on Mac/Windows/Linux etc.
11+
GoReleaser runs in a Docker container, which provides a hermetic environment that prevents build contamination from the
12+
host environment.
1813

1914
### Code Signing Policy
2015

21-
Given the cost and complexity of code signing, this project only distributes unsigned binaries. This means that
22-
MacOS distrusts Retro AIM Server by default and quarantines the application when you open it.
16+
This project offers signed Windows binaries and does not currently offer signed macOS binaries. This means that macOS
17+
distrusts Retro AIM Server by default and quarantines the application when you open it.
2318
> If you don't want to bypass this security mechanism, you can [build the project yourself](./building) instead.
2419
25-
### Windows Build Obfuscation
26-
27-
Due to cost and complexity, none of the release artifacts are signed. One consequence of this is that Windows Defender
28-
falsely detects [the `.exe` as a virus](https://go.dev/doc/faq#virus) and auto-quarantines the file upon execution.
29-
30-
We get around this by obfuscating the go binary at built time using [garble](https://github.com/burrowers/garble). In
31-
order to accomplish this, the project wraps GoReleaser and garble in a custom Dockerfile `Dockerfile.goreleaser`.
32-
33-
The GoRelease-garble image must be built locally before running the release process.
34-
3520
## Release Procedure
3621

3722
The following is the procedure that builds Retro AIM Server and uploads the build artifacts to a Github release.
3823

39-
1. **Build Custom Docker Image**
40-
41-
Build the custom GoReleaser Docker image. Ensure that the latest version is set under `GO_RELEASER_CROSS_VERSION` in
42-
the project Makefile.
43-
44-
```sh
45-
make goreleaser-docker
46-
```
47-
48-
2. **Export Github Personal Access Token (PAT)**
24+
1. **Export Github Personal Access Token (PAT)**
4925

5026
Export a Github Personal Access Token that has `write:packages` permissions for the Retro AIM Server repo.
5127

5228
```sh
5329
export GITHUB_TOKEN=...
5430
```
5531

56-
3. **Tag The Build**
32+
2. **Tag The Build**
5733

5834
Tag the build using [semantic versioning](https://semver.org/).
5935
```shell
6036
git tag v0.1.0
6137
git push --tags
6238
```
6339

64-
4. **Dry-Run Release**
40+
3. **Dry-Run Release**
6541

6642
Execute a dry-run build to make sure all the moving parts work together. Fix any problems that crop up before
6743
continuing.
@@ -70,11 +46,19 @@ The following is the procedure that builds Retro AIM Server and uploads the buil
7046
make release-dry-run
7147
```
7248

73-
5. **Release It!**
49+
4. **Release It!**
7450

75-
Now run the release process. Once its complete, a new [release](https://github.com/mk6i/retro-aim-server/releases)
76-
should appear in Github with download artifacts attached.
51+
Now run the release process. Once its complete, a private draft [release](https://github.com/mk6i/retro-aim-server/releases)
52+
should appear with attached build artifacts.
7753

7854
```shell
7955
make release
80-
```
56+
```
57+
58+
5. **Sign It!**
59+
60+
Download the Windows release, sign it, and re-upload the `.zip` to the draft release created in the previous step.
61+
62+
6. **Publish It**
63+
64+
Publish the draft release.

docs/SYSTEMD.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Configuring Retro AIM Server With systemd
22

3-
This document details the configuration of Retro AIM Server to run as an unprivileged user with `systemd` managing it as a production service.
3+
This document details the configuration of Retro AIM Server to run as an unprivileged user with `systemd` managing it as
4+
a production service.
45

5-
1. ** Download Retro AIM Server**
6+
1. **Download Retro AIM Server**
67

78
Grab the latest Linux release from the [releases page](https://github.com/mk6i/retro-aim-server/releases)
89

9-
2. ** Create the ras user and group **
10+
2. **Create the ras user and group**
1011

1112
Run the following commands:
1213

@@ -16,38 +17,39 @@ This document details the configuration of Retro AIM Server to run as an unprivi
1617
$ sudo mkdir -p /var/ras
1718
```
1819

19-
3. ** Extract the archive **
20+
3. **Extract the archive**
2021

2122
Extract the archive using the usual `tar` invocation, and move the extracted contents into `/opt/ras`
2223

23-
4. ** Set Ownership and Permissions **
24+
4. **Set Ownership and Permissions**
2425

2526
```shell
2627
$ sudo chown -R ras:ras /opt/ras
2728
$ sudo chmod -R o-rx /opt/ras
2829
```
2930

30-
5. ** Copy the systemd service **
31+
5. **Copy the systemd service**
3132

3233
Place the `ras.service` file in `/etc/systemd/system`
3334

34-
6. ** Reload systemd **
35+
6. **Reload systemd**
3536

3637
```shell
3738
$ sudo systemctl daemon-reload
3839
```
3940

40-
7. ** Enable and start the service **
41+
7. **Enable and start the service**
4142

42-
```shell
43-
$ sudo systemctl enable --now ras.service
44-
```
43+
```shell
44+
$ sudo systemctl enable --now ras.service
45+
```
4546

46-
8. ** Make sure the service is running **
47+
8. **Make sure the service is running**
4748

4849
```shell
4950
$ sudo systemctl status ras.service
5051
$ sudo journalctl -xeu ras.service
5152
```
5253

53-
Note that the `systemd` service defines the configuration for Retro AIM Server directly, bypassing the usual `run.sh` script and `settings.env`. Customizations may be performed in `/etc/systemd/system/ras.service`.
54+
Note that the `systemd` service defines the configuration for Retro AIM Server directly, bypassing the `settings.env`
55+
config. Customizations may be performed in `/etc/systemd/system/ras.service`.

0 commit comments

Comments
 (0)