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

fix: Override dh_installdeb to overwrite auto-generated conffiles #165

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

jacobgkau
Copy link
Member

@jacobgkau jacobgkau commented Feb 9, 2023

Fixes pop-os/upgrade#319.

The standard dh_installdeb takes our pop-default-settings.conffiles list and adds its auto-detected conffiles (anything under /etc) to that list. We need to override that by copying our list back over the generated one in order to prevent important files like /etc/os-release and /etc/lsb-release (which we package as /etc/pop-os/os-release and /etc/pop-os/lsb-release) from being declared as conffiles (which means they don't get updated by automated utilities like pop-upgrade).

For QA, note that if you're testing this on a system affected by the bug (running Jammy but showing a different release name in /etc/os-release), you'll need to correct the suite for the staging repository after adding it, because apt-manage will add it based on what's in /etc/os-release//etc/lsb-release.

@jacobgkau jacobgkau marked this pull request as ready for review February 9, 2023 04:48
@jacobgkau jacobgkau requested review from a team February 9, 2023 04:48
Copy link
Member

@mmstick mmstick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems odd that installdeb isn't automatically doing this, but if it works it works.

@jacobgkau
Copy link
Member Author

jacobgkau commented Feb 9, 2023

Seems odd that installdeb isn't automatically doing this,

I think installdeb is behaving as described by the documentation: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles

dh_installdeb(1) automatically flags any files under the /etc directory as conffiles,

That's why we have to overwrite the list that it's creating, to effectively remove those /etc/pop-os/... entries that aren't actually conffiles.

@leviport leviport self-assigned this Feb 9, 2023
@jacobgkau jacobgkau merged commit fc0efe0 into master_jammy Feb 10, 2023
@jacobgkau jacobgkau deleted the conffiles_jammy branch February 10, 2023 00:40
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

Successfully merging this pull request may close these issues.

Fresh 20.04 to 22.04 upgrade fails
3 participants