Skip to content

The deb package does not conform to Debian specs #129

Description

@NickJH

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions