diff --git a/AGENTS.md b/AGENTS.md index 17fe95d..aae084b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,6 +30,7 @@ the specification of how things behave. | `.gitea/workflows/release.yaml` | On a `v*` tag: `make deb rpm` (on Ubuntu), publish the release and the apt and RPM repositories. | | `tools/windows/export-tmod-mods.ps1` | Helper for players to export their enabled tModLoader mods. | | `docs/guide.md`, `README.md`, `CHANGELOG.md`, `VERSION` | Docs and release metadata. | +| `LICENSE` | MIT. Installed as `/usr/share/doc/terraria-server-manager/copyright` (and `%license` in the RPM). | Placeholders `@VERSION@`, `@BINDIR@`, `@DOCDIR@` and `@PKGLIBDIR@` in `bin/terractl` and the unit files are filled in by `make install`/`make deb`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e0b595..81f2cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 0.0.13 - unreleased +- terraria-server-manager is now under the MIT license (`LICENSE`). Both packages include it: `/usr/share/doc/terraria-server-manager/copyright`, and on RPM systems also `/usr/share/licenses/terraria-server-manager/LICENSE`. - RPM package for Fedora, RHEL 9+ and compatible systems (AlmaLinux, Rocky Linux), built alongside the `.deb` and published to an RPM repository: add `https://gitea.adbraun.lol/api/packages/adam/rpm.repo` to `/etc/yum.repos.d/` and `sudo dnf install terraria-server-manager` (see the guide's "Installation"). It installs the same files and works the same way as the Debian package. `sudo dnf remove` stops all instances (saving their worlds) and turns off starting at boot, scheduled backups and the daemon; worlds, backups and settings are kept. Build it with `make rpm` (needs `rpmbuild`, also on Debian and Ubuntu). - `doctor` checks the firewall when firewalld is running (the default on Fedora and RHEL): it lists instance ports, and the daemon's, that firewalld doesn't allow, with the `firewall-cmd` command to open them. `new` shows that command too. Opening ports is never done automatically. - Messages that suggest installing something (`doctor`, `fetch`, and when `python3` or `openssl` is missing) now give the `dnf install` command on Fedora and RHEL instead of `apt install`, with the right package names (`libicu`, `polkit`). diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a2a8565 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Adam Brown + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index 2b829d7..99bf0a7 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ DEB := build/$(NAME)_$(VERSION)_all.deb RPMTOP := build/rpm RPM := build/$(NAME)-$(VERSION)-1.noarch.rpm # What goes in the source tarball the RPM is built from -RPM_SOURCES := Makefile VERSION README.md CHANGELOG.md bin lib completions config docs \ +RPM_SOURCES := Makefile VERSION LICENSE README.md CHANGELOG.md bin lib completions config docs \ packaging systemd tools .PHONY: all check install uninstall deb rpm clean @@ -86,6 +86,7 @@ install: install -m 644 config/tmpfiles.d/terractl.conf $(DESTDIR)$(TMPFILESDIR)/ install -m 644 config/polkit/terractl.rules $(DESTDIR)$(POLKITDIR)/50-terractl.rules install -m 644 docs/guide.md $(DESTDIR)$(DOCDIR)/README.md + install -m 644 LICENSE $(DESTDIR)$(DOCDIR)/copyright install -m 644 tools/windows/export-tmod-mods.ps1 $(DESTDIR)$(DATADIR)/ install -m 644 completions/bash/terractl $(DESTDIR)$(COMPLETIONDIR)/terractl @# Never overwrite local settings diff --git a/README.md b/README.md index 2524819..fbf617a 100644 --- a/README.md +++ b/README.md @@ -75,21 +75,24 @@ See [docs/guide.md](docs/guide.md). It covers installation, creating instances, ``` bin/terractl The command-line tool -systemd/ terraria@.service and terraria@.socket +lib/terractl-remote Managing other hosts (--host, remote, daemon, copy, move), in Python +systemd/ terraria@ service and socket, terractld, terraria-backup@ service and timer completions/bash/ Bash completion for terractl -config/ /etc/default settings, sysusers.d and tmpfiles.d entries +config/ /etc/default settings, sysusers.d, tmpfiles.d, polkit and journald files packaging/deb/ Debian package metadata and install/remove scripts +packaging/rpm/ RPM spec (Fedora, RHEL) docs/guide.md Full documentation tools/windows/ export-tmod-mods.ps1 for exporting mods from Windows VERSION Current version, used by the build -Makefile make check | deb | install | uninstall | clean +Makefile make check | deb | rpm | install | uninstall | clean ``` ## Building ```bash -make check # bash -n on all scripts, plus shellcheck if installed +make check # syntax checks, plus shellcheck, pyflakes and rpmspec if installed make deb # build/terraria-server-manager__all.deb +make rpm # build/terraria-server-manager--1.noarch.rpm (needs rpmbuild) ``` To release, update `VERSION` and `CHANGELOG.md`, commit, and push a matching tag: @@ -98,7 +101,11 @@ To release, update `VERSION` and `CHANGELOG.md`, commit, and push a matching tag git tag v$(cat VERSION) && git push origin v$(cat VERSION) ``` -The `release` workflow (`.gitea/workflows/release.yaml`, Gitea Actions) then builds the `.deb`, publishes it as a release with that version's changelog section as the notes, and adds it to the apt repository. It needs a runner with the `ubuntu-latest` label. To build a package by hand instead, run `make deb`. +The `release` workflow (`.gitea/workflows/release.yaml`, Gitea Actions) then builds the `.deb` and the `.rpm`, publishes them as a release with that version's changelog section as the notes, and adds them to the apt and RPM repositories. It needs a runner with the `ubuntu-latest` label. To build a package by hand instead, run `make deb` or `make rpm`. + +## License + +MIT; see [LICENSE](LICENSE). ## Disclaimer diff --git a/packaging/rpm/terraria-server-manager.spec.in b/packaging/rpm/terraria-server-manager.spec.in index c13f275..aa30e42 100644 --- a/packaging/rpm/terraria-server-manager.spec.in +++ b/packaging/rpm/terraria-server-manager.spec.in @@ -4,12 +4,14 @@ # package can be built anywhere rpmbuild runs (the release workflow builds it on # Ubuntu). They do what packaging/deb/ does for Debian; see the comments there. +# The license goes in /usr/share/licenses/, as on Fedora, wherever it's built +%global _docdir_fmt %{name} + Name: terraria-server-manager Version: @VERSION@ Release: 1 Summary: Run multiple Terraria and tModLoader dedicated servers with systemd -# TODO: no license has been chosen for this project yet -License: LicenseRef-Unspecified +License: MIT URL: https://gitea.adbraun.lol/adam/terraria-server-manager Packager: Adam Brown Source0: %{name}-%{version}.tar.gz @@ -106,6 +108,7 @@ if [ -d /run/systemd/system ]; then fi %files +%license LICENSE /usr/bin/terractl /usr/lib/terraria-server-manager/ /usr/lib/systemd/system/terraria@.service