Request for a copy of unedited /etc/makepkg.conf due to a silly mistake

I did a rookie mistake with my system. I was editing the file makepkg.conf and without first taking a backup of the original /etc/makepkg.conf file, I overwrote the original file. I realized with horror what had happened after I had closed KWrite. This happened because it was late in night and I had not configured KWrite to show me the path of the file in the title bar as well as navigation bar. I lost a chunk of the file. Everything above the section ARCHITECTURE, COMPILE FLAGS was lost. The following sections are intact and have not been modified.
BUILD ENVIRONMENT
GLOBAL PACKAGE OPTIONS
PACKAGE OUTPUT
COMPRESSION DEFAULTS
EXTENSION DEFAULTS
OTHER

I tried to find the original file in the iso that was used to install Endeavour OS but could not locate it. I am running Endevaour OS on Intel CPU with Intel Graphics chips.

Can some one please provide me with their unedited or original /etc/makepkg.conf file? It would be much appreciated. Otherwise the only option left would be for me to reinstall OS. I want to avoid that as far as possible.

Have a look here:

That’s from the official pacman package source.

You could also follow these steps to download and replace it:

wget -O ~/makepkg.conf https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/raw/main/makepkg.conf
sudo mv ~/makepkg.conf /etc/makepkg.conf
3 Likes

This was the solution I was looking for. Thanks @Bink. You are a life saver. I was dreading the task of reinstalling EOS all over again. I found out that the section SOURCE ACQUISITION was missing.

One quick question, does the value of key-values pairs in SOURCE ACQUISITION section change based on the CPU/GPU/Motherboard or some other factor? Or there are some additional keys that can be put in the section SOURCE ACQUISITION?

The version I linked you matches what’s in my file. Where you might like to tweak for your systems specific architecture, is in the “Compiler and Linker Flags” section.

See here for some details about how to do that. I do this on all my systems, but compilation optimization will only impact packages built from source (eg: non-bin open source packages installed from the AUR):

3 Likes

For such situations reinstalling the corresponding package should help.
To find which package:

pacman -Qo /etc/pacman.conf

which tells the package is pacman.
To fix the file:

sudo mv /etc/pacman.conf /tmp/pacman.conf.broken
sudo pacman -Syu pacman
1 Like

The option pacman -Syu will update the entire system. Can pacman -Sy pacman achieve the same without updating the entire system?

Do not use:

  • pacman -Sy package
  • pacman -Sy followed by pacman -S package (Note the absence of -Su in the installation of the package.)
  • pacman -Syuw (Note that pacman -Syuw does imply the same risks like pacman -Sy, as it will update the pacman sync database without installing the newer packages.)

Read here: https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported

1 Like

^ If I had a nickel… :slight_smile:

Nailbiter thread of the week for me, you heavy hitters in the forum amaze me with your ready knowledge.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.