System always reads uncommented lines in makepkg.conf and throws errors

Every time i try to build something from AUR, console throws an error from reading uncommented lines by #

/etc/makepkg.conf: linia 135: nieoczekiwany EOF podczas poszukiwania pasującego `"'

How can i fix it? Even tried changing from bash to fish did not fix it

garuda-inxi 
System:
  Kernel: 6.5.12-x64v2-xanmod1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: hpet available: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-xanmod
    root=UUID=9f21d0a9-4786-4727-8ee0-3d5746dd7ec7 rw rootflags=subvol=@
    quiet resume=UUID=e9e680f3-7847-474a-b8ab-604acca5c853 loglevel=3 ibt=off
  Desktop: LXQt v: 1.4.0 tk: Qt v: 5.15.11 info: cairo-dock, lxqt-panel
    wm: kwin_x11 vt: 2 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: Hewlett-Packard product: HP ProBook 4710s v: F.20
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Hewlett-Packard model: 3074 v: KBC Version 24.0F
    serial: <superuser required> BIOS: Hewlett-Packard v: 68PZI Ver. F.20
    date: 12/09/2011
Battery:
  ID-1: BAT0 charge: 0% condition: 55.3/63.4 Wh (87.3%) volts: 11.6 min: 14.4
    model: Hewlett-Packard Primary type: Li-ion serial: <filter>
    status: not charging
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M185
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: Intel Core2 Duo T5870 bits: 64 type: MCP arch: Core2 Merom
    level: v1 built: 2006-09 process: Intel 65nm family: 6 model-id: 0xF (15)
    stepping: 0xD (13) microcode: 0xA4
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB
    desc: d-2x32 KiB; i-2x32 KiB L2: 2 MiB desc: 1x2 MiB
  Speed (MHz): avg: 1788 high: 2001 min/max: 800/2001 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 1575 2: 2001
    bogomips: 7979
  Flags: ht lm nx pae sse sse2 sse3 ssse3
  Vulnerabilities: <filter>
Graphics:
  Device-1: AMD RV710/M92 [Mobility Radeon HD 4330/4350/4550]
    vendor: Hewlett-Packard driver: radeon v: kernel alternate: amdgpu
    arch: TeraScale code: R6xx/RV6xx/RV7xx process: TSMC 55-65nm
    built: 2005-13 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 ports:
    active: LVDS-1 empty: HDMI-A-1,VGA-1 bus-ID: 01:00.0 chip-ID: 1002:9552
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_x11 driver: X: loaded: radeon unloaded: modesetting
    alternate: fbdev,vesa dri: r600 gpu: radeon display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 423x238mm (16.65x9.37")
    s-diag: 485mm (19.11")
  Monitor-1: LVDS-1 mapped: LVDS model: AU Optronics 0x119e built: 2008
    res: 1600x900 hz: 60 dpi: 106 gamma: 1.2 size: 382x214mm (15.04x8.43")
    diag: 438mm (17.2") ratio: 16:9 modes: max: 1600x900 min: 640x480
  API: Vulkan v: 1.3.269 layers: 3 device: 0 type: cpu name: llvmpipe (LLVM
    16.0.6 128 bits) driver: mesa llvmpipe v: 23.2.1-arch1.2 (LLVM 16.0.6)
    device-ID: 10005:0000 surfaces: xcb,xlib
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Audio:
  Device-1: Intel 82801I HD Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:293e
    class-ID: 0403
  Device-2: AMD RV710/730 HDMI Audio [Radeon HD 4000 series]
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 1002:aa38 class-ID: 0403
  API: ALSA v: k6.5.12-x64v2-xanmod1-1 status: kernel-api tools: N/A
  Server-1: PipeWire v: 0.3.85 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Broadcom BCM4312 802.11b/g LP-PHY vendor: Hewlett-Packard
    driver: wl v: kernel modules: ssb pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 14e4:4315 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  Device-2: Marvell 88E8072 PCI-E Gigabit Ethernet vendor: Hewlett-Packard
    driver: sky2 v: 1.30 pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 2000
    bus-ID: 86:00.0 chip-ID: 11ab:436c class-ID: 0200
  IF: ens5 state: down mac: <filter>
Bluetooth:
  Device-1: HP Bluetooth 2.0 Interface [Broadcom BCM2045] driver: btusb v: 0.8
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1:2
    chip-ID: 03f0:171d class-ID: fe01
  Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 2.0
    lmp-v: 3 status: discoverable: no pairing: no class-ID: 6c010c
Drives:
  Local Storage: total: 465.76 GiB used: 8.41 GiB (1.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Crucial model: CT500MX500SSD1
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 045 scheme: MBR
Partition:
  ID-1: / raw-size: 457.42 GiB size: 457.42 GiB (100.00%)
    used: 8.41 GiB (1.8%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
  ID-2: /home raw-size: 457.42 GiB size: 457.42 GiB (100.00%)
    used: 8.41 GiB (1.8%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
  ID-3: /var/log raw-size: 457.42 GiB size: 457.42 GiB (100.00%)
    used: 8.41 GiB (1.8%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
  ID-4: /var/tmp raw-size: 457.42 GiB size: 457.42 GiB (100.00%)
    used: 8.41 GiB (1.8%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 50 (default 100)
    zswap: no
  ID-1: swap-1 type: zram size: 3.79 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 2 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 8.34 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda2 maj-min: 8:2
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 196 Uptime: 1h 18m wakeups: 0 Memory: total: 4 GiB
  available: 3.79 GiB used: 1.58 GiB (41.6%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages:
  pm: pacman pkgs: 1228 libs: 360 tools: octopi,paru Shell: fish v: 3.6.1
  running-in: qterminal inxi: 3.3.31
Garuda (2.6.19-2):
  System install date:     2023-11-23
  Last full system update: 2023-12-03 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       <superuser required>
  Failed units:            

Not only it throws error while try to build. Earlier i tried to execute command to give Profile-Sync-Daemon permission for overlayfs and it throwed error about “(” symbol in username ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper command

Welcome to the community @Whoopee4954. :slightly_smiling_face:

Paste the error (the full terminal outout) into the thread.

Paste the contents of this file into the thread.

Paste the input and output into the thread. Also paste the file which triggers the error.

3 Likes

Trying to build ff2mpv-rust pckage from AUR

[jeik@jeik ~]$ /bin/bash -c "paru -S ff2mpv-rust;echo 'PAKtC'"
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1)          Old Version  New Version  Make Only
aur/ff2mpv-rust               1.1.1-2      No

:: Proceed to review? [Y/n]: y

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
/etc/makepkg.conf: line 135: unexpected EOF while looking for matching `"'
==> ERROR: Failed to source /etc/makepkg.conf
error: failed to download sources for 'ff2mpv-rust-1.1.1-2': 
error: packages failed to build: ff2mpv-rust-1.1.1-2
PAKtC
[jeik@jeik ~]$ 

Trying to give psd daemon permission for overlayfs

[jeik@jeik ~]$ visudo jeik ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper command
bash: syntax error near unexpected token `('

/etc/makepkg.conf file

#!/hint/bash
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
          'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::breezy'
            'fossil::fossil'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
#CPPFLAGS=""
#CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
CFLAGS="-march=native -O3 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -pthread -Wno-error -w" #
#CFLAGS="-march=native -Og -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt" #
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
#CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
CXXFLAGS="$CFLAGS"
#LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now,-lgomp,-lpthread"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now,-lgomp,-lpthread"
LTOFLAGS="-flto=auto"
RUSTFLAGS="-C opt-level=2 -C target-cpu=native"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#-- pgo:               Generate or utilize profile guided optimization (requires two build and install cycles)
#-- {graphite,polly}:  Use polyhedral model optimization (use "polly" for clang/llvm)
#-- rice{,-clang}:     Use extreme and unsafe optimization (use "rice-clang" for clang/llvm)
#-- mold:              Use the fast mold linker
#-- lld:			   Use lld as linker
#-- aocc:			   Use amd's optimized compiler
#-- buildcache:        Use a alternative compile cache then ccache5
#-- bolt:			   Use a extern llvm toolchain located at ~/Documents/llvm to use it as PATH
#-- relocs:			   Enable --emit-relocs for linking with relocations, it is needed for llvm-bolt when bolting a binary (use "relocs-gcc" for gcc
#
BUILDENV=(!distcc color !ccache check !sign polly mold)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:       Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#-- upx:        Compress binary executable files using UPX
#-- optipng:    Optimize PNG images with optipng
#-- svgo:       Optimize SVG images with nodejs-svgo
#-- lto:        Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto upx optipng svgo lto)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See man strip for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Compression parameters for UPX
UPXFLAGS="--ultra-brute"
#-- Compression parameters for optiPNG
OPTIPNGFLAGS=" -o7 -zm1-9"
#-- Compression parameters for SVGO
SVGOFLAGS="--multipass"
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Profile cache: specify a fixed directory where profiles will be stored
#PROFDEST=/mnt/pgo
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER=John Doe <[email protected]>
#-- Specify a key to use for package signing
#GPGKEY=

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
#COMPRESSGZ=(gzip -c -f -n)
#COMPRESSBZ2=(bzip2 -c -f)
#COMPRESSXZ=(xz -c -z -)
#COMPRESSZST=(zstd -c -z -q -)
#COMPRESSLRZ=(lrzip -q)
#COMPRESSLZO=(lzop -q)
#COMPRESSZ=(compress -c -f)
#COMPRESSLZ4=(lz4 -q)
#COMPRESSLZ=(lzip -c -f)
COMPRESSGZ=(gzip -c -f -n --best)
COMPRESSBZ2=(bzip2 -c -f --best)
COMPRESSXZ=(xz -T0 -c -z --best -)
COMPRESSZST=(zstd -c -z -q -T0 -)
COMPRESSLRZ=(lrzip -9 -q)
COMPRESSLZO=(lzop -q --best)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q --best)
COMPRESSLZ=(lzip -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=()

Looks like the file has been edited?
Mine is slightly different, and is the unmodified one from pacman package.

I think the problem is with lines like

#CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \

Comments (#) with line continuations (trailing \) work in non intuitive way, just avoid mixing them.
That is, if you comment out a line ending in \, remove the \, and do not intersperse continued lines with comments.

CFLAGS="-march=native -O3 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -pthread -Wno-error -w" #
#CFLAGS="-march=native -Og -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt" #
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"

This is never going to work, the first line sets CFLAGS then there’s a comment, then the -Wp,... line is taken as a command on its own, and it ends with a quote that was never open, so it’s interpreted as an opening quote.
You likely want to move the commented line out of the way, and replace the trailing # on the first line with \ so it becomes one logical line with the following ones.

edit: also remove the closing quote if it is to be continued below.

5 Likes

Yes, it has been edited using makepkg-optimize. Reinstalled pacman to do a fresh makepkg.config
Now the packages are building. Never knew that \ had that effect.

Problem with bash still exist.

This shouldn’t be typed out as a command, rather you should open /etc/sudoers with visudo, add the needed line to the file, then save and exit.

Open /etc/sudoers with visudo:

sudo visudo

Then add the needed line to the file toward the bottom.

jeik ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper command

Even better would be to add that line in a drop-in file in /etc/sudoers.d/.

2 Likes

Oh damn, did not look up that visudo is an terminal text editor, thought that it’s a command.

Well, i guess that even following Arch wiki is not that newbie friendly :slight_smile:

Thank you for helping me @BluishHumility and @meanruse

I never used makepkg-optimize, but according to makepkg-optimize - ArchWiki it should generate an /etc/makepkg-optimize.conf file.

makepkg-optimizeAUR generates a redundant configuration file, /etc/makepkg-optimize.conf, from your current makepkg.conf(5) configuration.

If it actually generated a broken config file from a functioning one, that would be a bug.
I suspect the original from pacman was hand edited before though.

In general, avoid modifying files that belong to a package.
Keep in mind that it will likely be overwritten at the next package update, so if you really need to, keep a backup and remember about it.

In this case (see makepkg.conf(5)) note that the default configuration can be overridden without touching the original from pacman:

The system-wide configuration file is found in /etc/makepkg.conf. Individual options can be overridden (or added to) on a per-user basis in $XDG_CONFIG_HOME/pacman/makepkg.conf or ~/.makepkg.conf, with the former taking priority.

This also applies to sudoers which is owned by package sudo, much better to use a so-called drop-in at /etc/sudoers.d/ as already pointed out above (note that the directory, for obvious security reasons, is only accessible with root privileges, you can’t even list the files therein as a normal user).

You can check if and what package owns a file with pacman -Qo FILENAME:

fish❯ pacman -Qo /etc/sudoers
/etc/sudoers is owned by sudo 1.9.15.p2-1
2 Likes

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