-
Notifications
You must be signed in to change notification settings - Fork 201
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
Refactor part of server settings code #351
base: master
Are you sure you want to change the base?
Conversation
We need to do a lot of regression testing here - the proposed changes look like they might cause problems when updating a customized cupsd.conf file, and we absolutely want to minimize how much of the cupsd.conf file is changed. The most common support advice is "enable debug logging with cupsctl --debug-logging", but if doing so wrecks an otherwise working configuration then we'll have angry users... |
The intention here is only change the order of options in cupsd.conf. If this is not desired, we need write options in two place as before.
But we don‘t need to record if the option was changed (don't need test the condition |
@reddevillg Thanks for the feedback! I'm not specifically opposed to your changes, I just want to make sure they don't introduce any regressions... I'd be doing the same if I was making the changes, if only because I've broken things a time or two in the past... :) |
Any update on this? |
Hi @AtariDreams , I'm planning refactor the cupsctl code to prevent removal of comments, so |
Hi @reddevillg , thank you for the PR! We are trying to implement comment preserving functionality in #640 , so it would be great if the PR didn't add comments and didn't change the position of directives, because if it does, it can move the directive from the comment which is relevant to the directive. Would you mind adjusting the PR based on this premise or you don't mind if I do it? Either way we should add cupsctl tests into test suite as well before merging this PR. |
@zdohnal I'm not sure if "comment preserving" is a good idea. Thinking about someone adding a comment to explain the following directives, cupsctl changes server settings later, but preserving the comment which explain the directives changed before. |
We've updated the default comments to be as generic as they can be, so they could make sense with more configuration combinations. So unless the user doesn't add the exact comment like "This allows remote access", we're ok. But in such cases IMO it is a user error - if user adds comments on his own, he is responsible for its contents.
IMO the combined use of manual edit and of a tool is ok - tool should manipulate with directives and its values, limit or policy scopes and shouldn't touch comments at all, and manual edit is here for more precise changes. |
@zdohnal OK, I can live with that :) |
We guarantee that the following conditions are met: share_printers remote_any remote_admin Listen Browsering Location-/ Location-/admin off off off localhost:631 off deny deny off off on 631 off Allow @Local Allow @Local off on off 631 off Allow all deny off on on 631 off Allow all Allow all on off off 631 on Allow @Local deny on off on 631 on Allow @Local Allow @Local on on off 631 on Allow all deny on on on 631 on Allow all Allow all
f0231e0
to
9616cd1
Compare
Definitely not for 2.4.x, maybe for 2.5. @zdohnal Can I get you to look at this since it affects the cupsd.conf code? |
It's difficult to fix some corner case, such as
remote_admin is still take effect.
found a similar problem #158