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

Remove buggy 10-nouveau.ini creation #184

Merged
merged 1 commit into from
Mar 31, 2025
Merged

Remove buggy 10-nouveau.ini creation #184

merged 1 commit into from
Mar 31, 2025

Conversation

rnewson
Copy link
Member

@rnewson rnewson commented Mar 28, 2025

Overview

In an effort to make nouveau easier to use the couchdb-nouveau package would attempt to reconfigure couchdb. However this fails if you install couchdb and couchdb-nouveau at the same time (and doing so is quite normal).

Remove this code. The sysadm can make the single enable = true configuration change themselves.

#154

Testing recommendations

GitHub issue number

Related Pull Requests

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@martiell
Copy link
Contributor

martiell commented Mar 28, 2025

An alternative, if you wanted to keep this automated configuration, might be to have nouveau declarePre-Depends: couchdb

This would ensure that the couchdb package had been configured (and the user created) at some point before nouveau is installed:

When a package declaring a pre-dependency is about to be unpacked the pre-dependency can be satisfied if the depended-on package is either fully configured, or even if the depended-on package(s) are only in the “Unpacked” or the “Half-Configured” state, provided that they have been configured correctly at some point in the past (and not removed or partially removed since).
https://www.debian.org/doc/debian-policy/ch-relationships.html

Either way is good for me though.

@big-r81
Copy link
Contributor

big-r81 commented Mar 29, 2025

An alternative, if you wanted to keep this automated configuration, might be to have nouveau declarePre-Depends: couchdb

This would ensure that the couchdb package had been configured (and the user created) at some point before nouveau is installed:

When a package declaring a pre-dependency is about to be unpacked the pre-dependency can be satisfied if the depended-on package is either fully configured, or even if the depended-on package(s) are only in the “Unpacked” or the “Half-Configured” state, provided that they have been configured correctly at some point in the past (and not removed or partially removed since).
https://www.debian.org/doc/debian-policy/ch-relationships.html

Either way is good for me though.

Oh nice, I think that’s the solution then when “auto-configure” is the goal like before…

@nickva
Copy link
Contributor

nickva commented Mar 29, 2025

This would ensure that the couchdb package had been configured (and the user created) at some point before nouveau is installed

Would that declare it as a dependency? Which we may not want, since we'd like to be able to install couchdb-nouveau on a separate machine.

@martiell
Copy link
Contributor

Yes, it would. And there's another problem I hadn't thought of: the nouveau postinst would write the configuration file, but couchdb would have already been started from its own postinst script, which Pre-Depends would force to run first. So couchdb would be running with it disabled, until it was manually restarted.

The solution I suggested in #154 was to only try to change the owner of the file if the couchdb user already existed, because the couchdb postinst would then fix up the permissions if it gets installed.

The only other option I could think of (aside from just removing the automated configuration altogether) was to create the couchdb user if it didn't already exist from the nouveau postinst, so the owner could be set correctly. But then the code for creating the couchdb user would then be duplicated across both postinst scripts.

On the other hand, all these feel a bit fragile, so I do see the argument for just removing the automated configuration.

@rnewson
Copy link
Member Author

rnewson commented Mar 31, 2025

Unfortunately Pre-Depends is not the solution. We explicitly want to allow couchdb-nouveau to be installed where couchdb is not installed.

I think the only option is to remove the creation of 10-nouveau.ini. Possibly we could create a third package that depends on couchdb and couchdb-nouveau that adds this file, but given the triviality of changing couchdb yourself this seems overkill.

In an effort to make nouveau easier to use the couchdb-nouveau package would
attempt to reconfigure couchdb. However this fails if you install couchdb and
couchdb-nouveau at the same time (and doing so is quite normal).

Remove this code and print a note instead. The sysadm can make the single
`enable = true` configuration change themselves.

closes #154
@rnewson rnewson force-pushed the remove-10-nouveauini branch from 300c29e to 3283fba Compare March 31, 2025 08:13
@rnewson
Copy link
Member Author

rnewson commented Mar 31, 2025

I updated the PR to print a note instead.

@janl janl merged commit a64b4fa into main Mar 31, 2025
@janl janl deleted the remove-10-nouveauini branch March 31, 2025 10:18
rnewson added a commit that referenced this pull request Mar 31, 2025
missed from #184 when tidying.
rnewson added a commit that referenced this pull request Mar 31, 2025
missed from #184 when tidying.
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.

5 participants