hashicorp / hashicorp/consul

Debian package marks systemd unit as configuration

Open
#21,542 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Overview of the Issue

The Debian package for Consul incorrectly marks `/usr/lib/systemd/system/consul.service` as a configuration file. System administrators can override the unit by creating `/etc/systemd/system/consul.service`, or modify it by adding drop-ins in `/etc/systemd/system/consul.service.d`.

By marking `/usr/lib/systemd/system/consul.service` as a configuration file, it's also possible that package upgrades will not change the unit file and create a `.dpkg-dist` instead. We stumbled into this because we packaged Consul since at the time HashiCorp didn't, and now that we're moving to the official packages we noticed this issue.

---

### Operating system and Environment details

```console
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
```

Contributor guide

Open the contributing guide

Research direction

Start with the Debian packaging metadata that installs /usr/lib/systemd/system/consul.service and check why the unit is marked as a configuration file. Verify the package behavior on upgrade, including whether the unit is replaced rather than producing a .dpkg-dist file; the issue is resolved when administrators can still use /etc/systemd/system/consul.service and drop-ins.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems, release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.