[SOLVED] Failed to clone build files from AUR

Hi guys, first time poster here…

I’m having a persisting issue for quite some time now when it comes to AUR. It happens during update and install.

The issue is about a month long now, and I can’t update any AUR packages nor install any new.

The message is simply ‘Failed to clone ___ build files.’

Here is an example from yay:

    yay -Syyu
    :: Synchronizing package databases...
     core                                                           169.3 KiB  2.76 MiB/s 00:00 [#####################################################] 100%
     extra                                                         2019.8 KiB  22.9 MiB/s 00:00 [#####################################################] 100%
     community                                                        6.3 MiB  29.9 MiB/s 00:00 [#####################################################] 100%
     multilib                                                       191.3 KiB  26.7 MiB/s 00:00 [#####################################################] 100%
    :: Starting full system upgrade...
     there is nothing to do
    :: Searching databases for updates...
    :: Searching AUR for updates...
     -> Missing AUR Packages:  xorg-font-utils  xorg-fonts-alias
     -> Flagged Out Of Date AUR Packages:  jdk11-graalvm-ee-bin  nodejs-nativefier
    :: 3 Packages to upgrade.
    3  aur/google-chrome      86.0.4240.75-1 -> 86.0.4240.193-1
    2  aur/nodejs-nativefier  10.1.0-1       -> 10.1.0-2
    1  aur/slack-desktop      4.10.3-1       -> 4.11.0-1
    ==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
    ==> 
    :: Checking for conflicts...
    :: Checking for inner conflicts...
    [Aur:3]  google-chrome-86.0.4240.193-1  nodejs-nativefier-10.1.0-2  slack-desktop-4.11.0-1

    error cloning slack-desktop: 
    error cloning nodejs-nativefier: 
    error cloning google-chrome: 

When I looked into the Add/Remove Software (pamac) it displays the above mentioned failed to clone build files.

I checked permissions for /tmp/pamac (read/write allowed on every group), tried refreshing mirrors, public keys, refreshing databases, everything (I could think of and find as a possible solution on the forums here), but nothing helps.

Does anyone have any idea what it could be?

I’m using xfce with linux57 kernel.

Let me know please if you need any further info and/or outputs.

Install another kernel. Linux57 is EOL for a while now. Either use Linux54 which is the latest LTS kernel or use Linux59

Thanks, I feared it might be kernel related…

Will be downgrading to linux54 for LTS tomorrow and posting if that fixes it for future references.

Cheers!

Just booted into linux54 to check, that’s not it unfortunately.

I checked the kernel, its Linux 5.4.74-1, and I’m still getting the ‘Failed to clone build files’ error.

Is there any way to debug into that error further somewhere and get more info about why it can’t clone the build files exactly?

If the error occurs with both Yay and Pamac, then the cause may be something that’s in common: like /etc/makepkg.conf or ~/.gitconfig.

Please post the output of the following in a codeblock using the Preformatted text </> button or between three backticks `.

cat /etc/makepkg.conf
cat ~/.gitconfig

Have you tried building AUR packages the proper way? See Arch User Repository - ArchWiki

First, the prerequisites:

sudo pacman -Syu --needed git base-devel

Example for google-chrome:

git clone https://aur.archlinux.org/google-chrome.git
cd google chrome
makepkg -srcif
1 Like

Hi, thanks for the formatting tip.

The makepkg.conf output is

cat /etc/makepkg.conf

#!/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 -gqC - -o %o %u'
          'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -gqb "" -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::bzr'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

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

#-- Compiler and Linker Flags
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(($(nproc)+1))"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# 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
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- 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
#########################################################################
#
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
#  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
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(md5)
#-- 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)
#-- 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
#-- 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 <john@doe.com>"
#-- 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)

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

and for the gitconfig its

cat ~/.gitconfig

[user]
	email = placeholder@mail.com
	name = Gavrilo
[init]
	defaultBranch = ""
[core]
	askpass = /usr/lib/git-core/git-gui--askpass

sudo pacman -Syu --needed git base-devel didn’t do anything,

Starting full system upgrade…
there is nothing to do

However, when I tried to manually git clone the chrome repo with git clone https://aur.archlinux.org/google-chrome.git I got

fatal: invalid branch name: init.defaultBranch = 

So I guess it is the git. I’ll look into it and try to patch it up, will post back as soon as I get something.

Thanks!

Yup, total git error, was playing with some git handlers lately and I broke it I guess…

Fixed with the help of good old StackOverflow and @Yochanan

Simply used git config --global init.defaultBranch master.

Cheers and thanks!

Might want to redact that from the post. There are spiders crawling all over the web. :spider: :spider_web:

You’re welcome! :+1:

Yup, replaced it with a placeholder@mail.com , thanks again.

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