SiaFoundation / SiaFoundation/linux
The deb package does not conform to Debian specs
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3
- Forks
- 1
- Avg merge
- 58m
- Merged PRs (30d)
- 11
Description
Current Behavior
At the moment all it seems to do is install hostd into /usr/bin, add a systemd unit file and create a /var/lib/hostd folder.
Expected Behavior
If the guidelines are followed:
- config files should go under /etc, so that includes hostd.yml
- logging should only be under /var/log, so that means either sending log.file to somewhere under /var/log, but then you get no date/timestamp, or suppressing log.file and using log.stdout and then either letting it go to syslog or using an rsyslog configlet to redirect it to its own file (which is my preference)
- if logging to its own file, the log should rotate, so a logrotate configlet would be needed
- something is going to be needed to customise the hostd.yml because of the logging options are not default, or a specific hostd.yml could be packaged with the correct logging options set. This is probably the better option and placeholders could be set for the password and seed to a postinstall script can detect whether to change them or nor.
- I believe ANSI coding should be removed from the logs because it makes the log files look rubbish. At the moment this is my own feeling, but I have not studied the packaging guidelines in detail. To an extent it can be achieved with an rsyslog configlet, but really in needs a coding change which Nate has turned down.
- Some sort of postinstall script could be needed to try to set up a password and wallet in the hostd.yml
- Again for consideration, should a firewall rule be added? The default firewall in Ubuntu is UFW, so you could allow tcp:9981-9984, but you don't enable the firewall in case the user doesn't want it. On Debian, I don't know if it defaults to UFW or iptables. This is perhaps best left alone.
- The service needs to be started after the post-install script.
Oh, and in the service file, After=network.target doesn't really mean anything although it is commonly used. Better would be After=network-online.target.
Steps to Reproduce
No response
Version
any hostd.deb package
What operating system did the problem occur on (e.g. Ubuntu 22.04, macOS 12.0, Windows 11)?
Ubuntu/Debian
Anything else?
Note that the Ubuntu guidelines seem to be under a rewrite. The Debian Policy Manual can be found at https://www.debian.org/doc/debian-policy/. More info at https://wiki.debian.org/Packaging.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the hostd.deb package contents, its systemd service file, hostd.yml handling, and any existing packaging scripts against the Debian Policy Manual. The issue spans configuration, logging, rotation, post-install setup, service startup, and possibly firewall behavior; done criteria and scope need maintainer agreement before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- devops, operating-systems, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100