Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The deb package does not conform to Debian specs #129

Open
NickJH opened this issue May 24, 2024 · 1 comment
Open

The deb package does not conform to Debian specs #129

NickJH opened this issue May 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@NickJH
Copy link

NickJH commented May 24, 2024

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.

@NickJH NickJH added the bug Something isn't working label May 24, 2024
@NickJH
Copy link
Author

NickJH commented Jul 12, 2024

Some things have moved on a bit. Debian 12 (Bookwork) has deprecated rsyslog and is, by default, doing everything through journalctl. Ubuntu 24.04 LTS retains rsyslog by default. However, the folders /etc/rsyslog.d and /etc/logrotate.d both exist on the default Debian 12 installation, so you can still package rsyslog and logrotate configlets in a common Ubuntu/Debian package and they just won't do anything in Debian 12. The yaml file stays common between them

Obviously in the future, Debian may remove rsyslog completely, but that will be for the future and a new issue should be raised at that point.

@ChrisSchinnerl ChrisSchinnerl transferred this issue from SiaFoundation/hostd Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant