oshazard / apacman

ArchLinux User Repository (AUR) helper and pacman wrapper
https://aur.archlinux.org/packages/apacman/
GNU General Public License v3.0
70 stars 11 forks source link

Install instructions don't work #78

Open cookiengineer opened 7 years ago

cookiengineer commented 7 years ago

I followed the installation instructions correctly as in the README file.

When searching for apacman, the package is available:

# download via curl and chmod +x etc. pp.

[apacman] (master *)$ ./apacman -Ss apacman
aur/apacman 3.1-1 (32)
    AUR package manager helper and pacman wrapper, forked from packer adding many new
    features
aur/aurtab 1-2 (17)
    AUR tab completion for yaourt and apacman using zsh.
aur/apacman-deps 0.9-1 (10)
    Meta package that installs build depends for apacman AUR wrapper
aur/apacman-utils 0.2-1 (4)
    AUR utilities: apac-migrate and aurpush

BUT when trying to install it, it's not available:

./apacman -S "apacman"
error: package 'apacman' was not found

What should I do to install apacman on my system?

oshazard commented 7 years ago

Don't use quotes

cookiengineer commented 7 years ago

I used quotes to make sure that was not a mistake. So it's also not working with quotes and was the reason I put quotes there in the first place.

oshazard commented 7 years ago

Ah, I see. Can you help with debugging? bash -x ./apacman

Not sure if it fails on line 672, 1866, 1905, 1919, or 1935.

What shell are you using? Up-to-date Archlinux? How minimal is the install, is base group installed?

cookiengineer commented 7 years ago

Jep, everything up-to-date regarding upstream pacman packages. I started to debug, it seems that the result of the curl request to AUR fails on my system...

Debug log:

[~]$ bash -x ./apacman -S apacman
+ version=3.1
+ [[ -n '' ]]
+ PACMAN=pacman
+ pacmanbin=/usr/bin/pacman
+ makepkgconf=/etc/makepkg.conf
+ usermakepkgconf=/home/cookiengineer/.makepkg.conf
+ pacmanconf=/etc/pacman.conf
+ apacmanconf=/etc/apacman.conf
+ gpgconf=/etc/pacman.d/gnupg/gpg.conf
+ downdir=/var/cache/pacman/pkg
+ savedir=/var/cache/apacman/pkg
+ database=/var/lib/apacman
+ pacmandb=/var/lib/pacman/sync/aur.db
+ pkgfiledb=/var/cache/pkgfile/aur.files
+ localrepo=aur
+ builddir=/tmp/pkgbuild-1000
+ tmpdir=/tmp/apacmantmp-1000
+ testdir=/tmp/apacman-testing
+ editor=vi
+ [[ -n /usr/bin/vim ]]
+ editor=/usr/bin/vim
+ pager='less -R'
+ [[ -n '' ]]
+ RPCURL='https://aur.archlinux.org/rpc/?v=5&type'
+ PKGURL=https://aur.archlinux.org
+ WEBURL=https://www.archlinux.org
+ ABSURL=rsync.archlinux.org
+ legacy=0
+ [[ -t 1 ]]
+ [[ ! '' = \N\O ]]
+ COLOR1='\e[1;39m'
+ COLOR2='\e[1;32m'
+ COLOR3='\e[1;35m'
+ COLOR4='\e[1;36m'
+ COLOR5='\e[1;34m'
+ COLOR6='\e[1;33m'
+ COLOR7='\e[1;31m'
+ ENDCOLOR='\e[0m'
+ S='\\'
++ stty size
++ cut -d ' ' -f 2
+ _WIDTH=94
+ trap ctrlc INT
+ export gpgconf
+ export -f checkpgpkeys
+ export -f askpgpkeys
+ export -f addpgpkeys
+ export -f removepgpkeys
+ export -f proceed
+ loadconfig -S apacman
+ for flag in $@
+ [[ '' = 1 ]]
+ [[ -S = \-\-\c\o\n\f\i\g ]]
+ [[ -S = --config* ]]
+ for flag in $@
+ [[ '' = 1 ]]
+ [[ apacman = \-\-\c\o\n\f\i\g ]]
+ [[ apacman = --config* ]]
+ sourceapacmanconf
+ [[ -r /etc/apacman.conf ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ export keepkeys noconfirm COLOR1 COLOR2 COLOR3 COLOR4 COLOR5 COLOR6 COLOR7 ENDCOLOR
+ [[ -n -S ]]
+ packageargs=()
+ [[ -n -S ]]
+ case "$1" in
+ option=install
+ shift
+ [[ -n apacman ]]
+ case "$1" in
+ packageargs+=("$1")
+ shift
+ [[ -n '' ]]
+ rm -rf /tmp/apacmantmp-1000
+ mkdir -p /tmp/apacmantmp-1000
+ olddir=/home/cookiengineer
+ cd
++ grep '^CARCH=' /etc/makepkg.conf
++ sed 's/^="//'
++ grep -o -e '=.*[0-9A-Za-z]'
+ makearch=x86_64
+ [[ '' == 1 ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ install = list ]]
+ [[ '' = 1 ]]
+ [[ -n '' ]]
+ [[ -n install ]]
+ [[ '' != 1 ]]
+ [[ -z apacman ]]
+ [[ -n '' ]]
+ [[ install = install ]]
+ for pkg in ${packageargs[@]}
++ echo apacman
++ tr -dc '0-9a-z-.\n'
+ regexmatch=apacman
+ [[ apacman =~ ^/ ]]
+ [[ '' = 1 ]]
+ [[ apacman != \a\p\a\c\m\a\n ]]
+ installhandling apacman
+ packageargs=("$@")
+ getignoredpackages
+ IFS=,
+ read -ra ignoredpackages
+ ignoredpackages+=($(grep '^ *IgnorePkg' "$pacmanconf" | cut -d '=' -f 2-))
++ cut -d = -f 2-
++ grep '^ *IgnorePkg' /etc/pacman.conf
+ sourcemakepkgconf
+ . /etc/makepkg.conf
++ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' 'https::/usr/bin/curl -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')
++ VCSCLIENTS=('bzr::bzr' 'git::git' 'hg::mercurial' 'svn::subversion')
++ CARCH=x86_64
++ CHOST=x86_64-pc-linux-gnu
++ CPPFLAGS=-D_FORTIFY_SOURCE=2
++ CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong'
++ CXXFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong'
++ LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro
++ DEBUG_CFLAGS='-g -fvar-tracking-assignments'
++ DEBUG_CXXFLAGS='-g -fvar-tracking-assignments'
++ BUILDENV=(!distcc color !ccache check !sign)
++ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
++ INTEGRITY_CHECK=(md5)
++ STRIP_BINARIES=--strip-all
++ STRIP_SHARED=--strip-unneeded
++ STRIP_STATIC=--strip-debug
++ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
++ DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
++ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
++ COMPRESSGZ=(gzip -c -f -n)
++ COMPRESSBZ2=(bzip2 -c -f)
++ COMPRESSXZ=(xz -c -z -)
++ COMPRESSLRZ=(lrzip -q)
++ COMPRESSLZO=(lzop -q)
++ COMPRESSZ=(compress -c -f)
++ PKGEXT=.pkg.tar
++ SRCEXT=.src.tar.gz
+ [[ -r /home/cookiengineer/.makepkg.conf ]]
+ for package in "${packageargs[@]}"
+ [[ -n '' ]]
+ existsinpacman apacman
+ chosenpkg=apacman
+ [[ '' = 1 ]]
+ /usr/bin/pacman -Si -- apacman
+ [[ -n '' ]]
+ existsinpacmangroup apacman
++ /usr/bin/pacman -Sgq apacman
+ [[ -n '' ]]
+ [[ -n '' ]]
+ providedinpacman apacman
+ unset providepkg
+ IFS='
'
+ read -rd '' -a providepkg
++ /usr/bin/pacman -Ssq -- '^apacman$'
+ selectprovider apacman
+ virtpkg=apacman
+ shift
+ virtual=($@)
+ virtnum=0
+ [[ 0 -eq 0 ]]
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ existsinaur apacman package
++ echo apacman
++ sed 's/\~$//'
++ awk -F == '{print $1}'
+ chosenpkg=apacman
+ val=apacman
++ echo apacman
++ tr -dc '0-9a-z-.\n'
+ regexmatch=apacman
+ [[ apacman != apacman ]]
+ rpcinfo apacman
+ [[ -f /tmp/apacmantmp-1000/apacman.info ]]
+ curl -LfGs --data-urlencode arg=apacman 'https://aur.archlinux.org/rpc/?v=5&type=info'
++ jshon -Qe resultcount -u
+ [[ '' != \0 ]]
+ finddeps apacman
+ pacmandeps=()
+ aurdeps=()
+ scrapeaurdeps apacman
+ pkginfo apacman ''
+ [[ -f /tmp/apacmantmp-1000/apacman.PKGBUILD ]]
++ pkglink apacman
++ rpcinfo apacman
++ [[ -f /tmp/apacmantmp-1000/apacman.info ]]
+++ jshon -Q -e results -a -e URLPath -u
++ aurpkgpath=
++ [[ -n '' ]]
+ pkgpath=
++ echo
++ sed 's/\.tar\.gz$//'
+ basepath=
+ [[ -n '' ]]
+ err '\e[1;31merror:\e[0m package '\''apacman'\'' was not found'
+ echo -e '\e[1;31merror:\e[0m package '\''apacman'\'' was not found'
error: package 'apacman' was not found
+ [[ '' == 1 ]]
+ exit 3

When I execute the curl command it stays empty on stdout and neither is a file being created in the folder ... is that wanted?

curl -LfGs --data-urlencode arg=apacman 'https://aur.archlinux.org/rpc/?v=5&type=info'

edit:// When I open the URL with GET "https://aur.archlinux.org/rpc/?v=5&type=info&arg=apacman" it has JSON content. I'm not sure if that makes a difference to the RPC API?

cookiengineer commented 7 years ago

When I try to simply curl the URL, I get a SOCKS4 error. I'm wondering if my carrier-grade NAT is the troublemaker here:

curl 'https://aur.archlinux.org/rpc/?v=5&type=info&arg=pacman'
curl: (6) SOCKS4 connection to 2a01:4f8:160:3033::2 not supported

Though requests to other IPv6 hosts work fine without issues. No Proxy configured. I also tried using curl -fsSL ... but identical error.

oshazard commented 7 years ago

Still can't reproduce. Do other AUR helpers such as yaourt work?

$ host 2a01:4f8:160:3033::2

2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.3.3.0.3.0.6.1.0.8.f.4.0.1.0.a.2.ip6.arpa domain name pointer luna.archlinux.org.