How to resolve /etc/makepkg.conf.pacnew


I have a /etc/makepkg.conf.pacnew and reading about this it seems to be that:

  • For some reason I had edited my /etc/makepkg.conf and modified it
  • An update to pacman created the .pacnew file in order not to overwrite my changes

The problem is, I don’t recall ever changing the file or why I might’ve done it.

Is it generally “safe” to just overwrite the file with newest version?

Here is the diff:

user@host /etc> diff makepkg.conf makepkg.conf.pacnew 
> # shellcheck disable=2034
< VCSCLIENTS=('bzr::bzr'
> VCSCLIENTS=('bzr::breezy'
<         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
<         -fstack-clash-protection -fcf-protection"
>         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
>         -fstack-clash-protection -fcf-protection \
>         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
< LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
> LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
>          -Wl,-z,pack-relative-relocs"
< #RUSTFLAGS="-C opt-level=2"
> RUSTFLAGS="-Cforce-frame-pointers=yes"
> #MAKEFLAGS="-j2"
< #DEBUG_RUSTFLAGS="-C debuginfo=2"
> DEBUG_RUSTFLAGS="-C debuginfo=2"
< # Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
> # Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
> #-- autodeps:   Automatically add depends/provides
< OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
> OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
> #-- Prefix and directories for library autodeps
> LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
< COMPRESSZST=(zstd -c -z -q -)
> COMPRESSZST=(zstd -c -T0 --ultra -20 -)
> # vim: set ft=sh ts=2 sw=2 et:

If you didn’t edit the file manually or don’t remember doing so, it is likely that you didn’t. This happens at times. You can view the differences between files using pacdiff.


➤ sudo pacdiff -f
[sudo] password for username:          
==> pacnew file found for /etc/default/grub
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q]

This will show you all the files with “conflicts”. Notice you have the option to do whatever you want here, but make sure to read through carefully before making any changes.

I imagine makepgk.conf is not a file to make mistakes with.

It is not so much about safety as about if it is desirable to do so.

There is a reason why a .pacnew is created and that is if the user has done any modifiaction to a config file.

If they want to keep that modification, so I would say that it is not desirable to overwrite the file.

But is it safe? Well, apart from loosing the modification and thereby some functionality, it won’t break the system.

1 Like

Looking at the diff I think the above may be what I edited. I don’t recall it, but it would make sense (the system is a 5950X).

I will just overwrite the file with the new one and adjust the number of jobs again.

1 Like

I would probably keep your existing in this case.

However, if you want to merge it, you should probably change debug to !debug in OPTIONS=