Skip to content

Fix cups tmpfiles, and move the snippet under desktop profile#173

Open
cvlc12 wants to merge 1 commit into
systemd:mainfrom
cvlc12:fix_cups
Open

Fix cups tmpfiles, and move the snippet under desktop profile#173
cvlc12 wants to merge 1 commit into
systemd:mainfrom
cvlc12:fix_cups

Conversation

@cvlc12

@cvlc12 cvlc12 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Cups needs to write in /etc/cups/, but it also needs default files over there or it fails.

Also move the tmpfile snippet under desktop where it makes more sense.

Fixes #170

@cvlc12

cvlc12 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

It's debatable whether it's better to copy over the files or keep them in sync, since this is where all configuration takes place. But I guess it's better to remove the symlink and edit the file if modifications are needed

L? /etc/cups/cupsd.conf
L? /etc/cups/cups-files.conf
L? /etc/cups/snmp.conf
L? /etc/cups/cups-pdf.conf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This means every time a new config file is added, this gets out of date. Better to just keep the directory symlink, until they support hermetic-usr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do you do about #170 then ? You can't add printers right now. Might as well get rid of cups.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use C as the comment there indicated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't that mean that the default files stop tracking upstream changes ? Doesn't C only "run once" since it will skip copying over existing files ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes but it's getting out of date anyway, and with C blasting the directory and rebooting is enough to get an up to date copy, while linking individual files means a new os version is needed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure why you would need a new OS version ?

If a new file gets added, the tmpfiles needs to change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why you would need a new OS version ?

If a new file gets added, the tmpfiles needs to change

Is this likely though ? It didn't think so but I'll trust you on this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given this identical tmpfiles.d is used across many different distributions and versions, it seems plausible it could happen

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So basically in one case it's up to particleOS to keep the tmpfiles updated, and in another it's up to users to clear their /etc/cups once in a while (and lose installed printers) to keep track of changes I guess ?

I guess I still think that this PR's solution is better but 🤷

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To be fair this very rarely happens, the main config files for cups have been the same for as long as I can remember, though the above list could probably also include client.conf and cups-browsed.conf. But all in all, this is a finite list one can get right.

Maybe a tmpfiles could do with a directive that creates a symlink for every member of a directory.

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.

Cups needs to write in /etc/cups

3 participants