Polkit merger with last update

In the last Stable update (2024-02-21) /etc/pam.d/polkit-1.pacsave was created. I have experience with merging .pacnew files but what about .pacsave files? Plus they’re in different directories so I’m a bit confused what to do here.

What should I do exactly?

https://wiki.archlinux.org/title/pacman/Pacnew_and_Pacsave

It’s also in announcements:

With polkit 124-1 there were changes made to etc/pam.d/polkit-1. So check if you made local changes to the file. See also: ropid comments on Today’s update moved polkit-1 to polkit-1.pacsave without providing a new config

1 Like

I checked both announcements before making this post. Neither explain what should be done or at least I don’t understand.

If you never made any changes to that file, and your system works, then it can be removed.

This is also parcel to understanding what the things are.
A pacsave is the same as a pacnew but in reverse.
It is a file that would otherwise be removed or overwritten, but is saved as ‘*.pacsave’.
Also, as it now has the pacsave extension, the file itself is no longer functional in its original purpose.
You can review and remove or even reinstate as necessary.
In this case, I find it unlikely you should do anything but allow its removal, as would be facilitated by regular management of such files through pacdiff -s.

This and more is covered in the guides

1 Like

I would have reviewed any changes but I can’t find the original polkit-1 file as I don’t know which directory it’s in. I don’t usually use pacdiff I manually check between files and merge the differences.

Also, not sure if it’s relevant, but the history of /etc/pam.d/polkit-1.pacsave says it was modified, accessed and created at different dates (few days difference), but it was in the same month and year when I first installed Manjaro. Is this expected behaviour?

The “original” polkit-1 file is the one with the .pacsave extension in /etc/pam.d/.

The package now provides this file in /usr/lib/pam.d/ as /usr/lib/pam.d/polkit-1.

There will be no .pacsave if the file was not modified.
He didn’t modify, so he does not need to do anything.
Similar “problem” as in their other thread …

It will be.

o.k. - I have no such file :man_shrugging:
I don’t know whether there ever was one …

Installation is roughly a year old.

A VM.
Two, actually: one KDE Plasma and one Xfce4

I thought that’s what they meant by writing

Maybe I didn’t understand the initial reference.

No - it was me who didn’t pay attention.
Sorry!

1 Like

I honestly don’t know, since I’m not using Manjaro. I would guess that the file was provided by previous version of polkit and not afterwards and it was in a backup array in PKGBUILD.

1 Like

No need to be sorry!

Truth is, only the OP knows what is going on in their system. We all here are trying to understand what’s going on in someone else’s system.

I’m not in front of my PC right now, but I also think that I didn’t have a .pacsave file after that update. Have to check it again.

I’ll break things down in order of events:

  1. Ran sudo pacman -Syu
  2. Installed the latest update (2024-02-21) from stable channel
  3. Rebooted
  4. Found /etc/pam.d/polkit-1.pacsave
  5. Tried to find /etc/pam.d/polkit-1 assuming it would be similar to .pacnew files
  6. Asked on the forum what I should do (i.e. where would polkit-1 be before a .pacsave? - can’t find it)
  7. Seeking clarification as I’m getting different answers!

I am using Manjaro since December 2021 and have been merging .pacnew files just fine. Never encountered .pacsave files as far as I can remember.

You just need to remove the pacsave.

There could be some edge case where there is something important in there…
But thats extremely unlikely, and even more so if you never touched it.

Well - what is the content of the .pacsave?
As I said: I do not have it - likely because my system never had a file there - it is not as “old” as yours.

Compare with /usr/lib/pam.d/polkit-1

I’m sure no action is needed - the system works as it is right now, doesn’t it?
The .pacsave is what was there before - with that suffix it will do nothing
so you can just as well delete it.

Here is the output for /usr/lib/pam.d/polkit-1:

#%PAM-1.0

auth       include      system-auth
account    include      system-auth
password   include      system-auth
session    include      system-auth

And here is the output for /etc/pam.d/polkit-1.pacsave:

#%PAM-1.0

auth required pam_env.so
auth sufficient pam_fprintd.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth required pam_deny.so
auth       include      system-auth
account    include      system-auth
password   include      system-auth
session    include      system-auth

We can see the .pacsave file has 4 more lines than /usr/lib/pam.d/polkit-1. This brings it back to my question on how am I supposed to merge them, if at all? I would have deleted the .pacsave after seeing replies from people but I’m not quite sure what I’m supposed to do with the differences in the files. Is it really still OK to delete it? Should I merge them? Much appreciate your responses!

You are not supposed to merge them.
You can leave it like it is now if you can’t bring yourself to delete the .pacsave file.
The file - with that ending (xxx.pacsave) - has no effect anyway (AFAIK).
It’s as good as if it wasn’t even there.

Or move it to some other place in case you want to preserve it and be able to see the effect of it’s removal.

How is .pacsave different from .pacnew?

Is /etc/pam.d/polkit-1.pacsave inactive or /usr/lib/pam.d/polkit-1? Also, has /etc/pam.d/polkit-1 always existed and it turned into /etc/pam.d/polkit-1.pacsave after the update?

Does it make a difference if I leave it vs saving the file somewhere else and deleting it from /etc/pam.d/?

And do I delete the actual /etc/pam.d/polkit-1.pacsave file or just remove .pacsave from the name so it’s renamed to /etc/pam.d/polkit-1?

Sorry for asking so many questions! I’m just being nervous as I have never experienced something like this :slightly_smiling_face:

To quote above, again.

Yes, because it has the pacsave extension, rendering it inoperable.**
** actually. this is normally the case with files that end in a certain extension like .conf
As these pam files have no extension … maybe the pacsave version is still valid for pam? :thinking:

Yes.

Not really, though it would make a difference in some eventuality that you tried to edit/reinstate it using pacdiff -s, as it would just parse the found pacsave file … not move it back to its original location.
But as you wont be needing this, and will be removing it, and would know where to put it later, and are intent on keeping the backup to look at and ostensibly eventually remove … then sure … do the copy to home keeping the backup if you like.