redis: package takes over /etc/redis/redis.conf without Conflicts/Replaces — a single file clash fails the whole apt transaction
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- redis
- 領域
- devops, infrastructure
調査の方向性
Start by locating the redis package definition or packaging metadata that generates its Debian control fields, then inspect the result with apt-cache show and apt-cache madison. Done means the package declares the required relationships and a Debian/Ubuntu apt-get upgrade can replace the conflicting redis-server package without leaving the transaction unpacked or unconfigured.
索引モデルが issue の本文から書いたものです。
説明
Summary
The Pigsty redis package installs /etc/redis/redis.conf, a file owned by redis-server, but declares neither Conflicts: nor Replaces: for it. When both are present on a node, dpkg refuses the unpack:
trying to overwrite '/etc/redis/redis.conf', which is also in package redis-server 6:7.2.7-1rl1~noble1
Because dpkg aborts the whole run, this is not limited to redis. On one upgrade, a single clashing package left 24 packages unpacked-but-not-configured — including a kernel. A machine in that state that reboots comes up on a half-installed system, which is a far worse outcome than the package conflict itself.
Root cause
Debian Policy §7.6 ("Overwriting files in other packages") requires a package that takes over files from another to declare Replaces:, and Conflicts: when the two cannot be co-installed.
The Pigsty package is monolithic (server + CLI in one deb) while the distribution splits them, so the two packaging layouts cannot coexist — which is fine, but it has to be declared:
$ apt-cache show redis | grep -E '^(Package|Version|Depends|Conflicts|Replaces|Provides):'
Package: redis
Version: 6:7.2.15-4PIGSTY~noble
Depends: adduser, libc6 (>= 2.38), libssl3t64 (>= 3.0.0), libsystemd0
No Conflicts:, no Replaces:, no Provides:. For comparison, the distribution package is a metapackage:
Package: redis
Version: 5:7.0.15-1ubuntu0.24.04.4
Depends: redis-server (<< …), redis-server (>= …)
Note this is not specific to one repo snapshot: apt-cache madison redis shows the Pigsty repo currently serves only 6:7.2.15-4PIGSTY~noble, so a v4.5.0 install gets the same package.
Reproduction
On a Debian/Ubuntu node:
- install
redis-serverfrom the distribution or from the redis.io repo (this also happens when it was pulled in earlier by an unrelated role or by an operator); - run any
apt-get upgradethat brings in the Pigstyredispackage.
The transaction fails at the unpack stage, and every other package in the same run is left unconfigured.
Environment
| Pigsty | v4.4.0, and the same package is served for v4.5.0 |
| OS | Ubuntu 24.04 LTS |
| Pigsty package | redis 6:7.2.15-4PIGSTY~noble |
| Clashing package | redis-server 6:7.2.7-1rl1~noble1 (redis.io) — the distribution redis-server owns the same path |
Suggested fix
Declare the relationships in the redis package metadata:
Conflicts: redis-server, redis-tools
Replaces: redis-server, redis-tools
Provides: redis-server, redis-tools
Provides: also lets packages that depend on redis-server remain satisfiable, which the current monolithic package breaks.
With those fields, dpkg replaces the distribution packages cleanly instead of aborting, and an unrelated package upgrade can no longer be taken down by a redis file clash.
Wider note (not part of this report)
Other Pigsty-built packages that shadow distribution ones (haproxy, etcd, grafana, vector) also declare no Conflicts/Replaces. I have not verified whether their file sets actually overlap with the distribution equivalents, so I am not claiming they are affected — only that it may be worth a look while touching the packaging pipeline.
- 主要言語
- Shell
- スター
- 5.9k
- フォーク
- 396
- 平均マージ
- 4日 15時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pgsty/pigsty のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
grafana: anonymous access is enabled by default with no variable to disable it, and the template overwrites any manual change対応中かも @Vonng が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
似ている issue
-
Misleading 'Update → Config → Hyprland' menu item silently resets user configs without confirmationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
lobaro/restic-backup-docker#114 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信