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

conf-files generates a conffiles file with a trailing empty line #110

Closed
jszwedko opened this issue Sep 1, 2023 · 1 comment
Closed

Comments

@jszwedko
Copy link

jszwedko commented Sep 1, 2023

First reported here: vectordotdev/vector#18439 . Apparently the extra newline causes issues with Uyuni/SUSE Manager.

To make sure it wasn't something we are doing, I reproduced the behavior with a stand-alone project:

  1. cargo init
  2. Edited Cargo.toml to include:
[package]
name = "example"
version = "0.1.0"
edition = "2021"
authors = ["Jesse Szwedko"]

[package.metadata.deb]
name = "example"
conf-files = ["/usr/local/Cargo.toml"]
assets = [
  ["Cargo.toml", "/usr/local/Cargo.toml", "644"]
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
  1. Ran cargo-deb
  2. cd target/debian
  3. ar x example_0.1.0_amd64.deb
  4. tar xvf control.tar.xz
  5. cat conffiles gives
/usr/local/Cargo.toml

Let me know if you need any more details! Thanks for this project! We rely on it heavily to build Vector Debian packages.

jszwedko added a commit to vectordotdev/vector that referenced this issue Sep 1, 2023
Apparently `cargo-deb` is including an extra newline in the generated `conffiles` file which causes a bug when used with Uyuni/SUSE Manager (#18439). I opened an issue upstream, kornelski/cargo-deb#110, but observed that we only have conffiles in `/etc` and so don't actually need to include a `conffiles` control file. Per the Debian docs:

> dh_installdeb(1) automatically flags any files under the /etc directory as conffiles, so if your program only has conffiles there you do not need to specify them in this file. For most package types, the only place conffiles should ever be is under /etc, and so this file doesn't need to exist.

Closes: #18439

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
github-merge-queue bot pushed a commit to vectordotdev/vector that referenced this issue Sep 1, 2023
…18455)

Apparently `cargo-deb` is including an extra newline in the generated `conffiles` file which causes a bug when used with Uyuni/SUSE Manager (#18439). I opened an issue upstream, kornelski/cargo-deb#110, but observed that we only have conffiles in `/etc` and so don't actually need to include a `conffiles` control file. Per the Debian docs:

> dh_installdeb(1) automatically flags any files under the /etc directory as conffiles, so if your program only has conffiles there you do not need to specify them in this file. For most package types, the only place conffiles should ever be is under /etc, and so this file doesn't need to exist.

Closes: #18439

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
@jszwedko
Copy link
Author

Thanks @kornelski !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant