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

Question regarding apacman-->curl-->ca-certs #26

Closed suedi closed 9 years ago

suedi commented 9 years ago

no packages were returned when searching aur

After some hunting it came down to curl problem and missing ca-certificates.crt

I solved it by symlinking /etc/ssl/certs/ca-certificates.crt to point at /etc/ca-certificates/extracted/ca-bundle.trust.crt

and that works

How is it done in arch? should I recompile curl with new cacert file path?

I cannot get curl to work with extracted certs?

Also is it possible to check curl exit status to give a little more info when it fails?

oshazard commented 9 years ago

So it turns out this was caused by the ca-certificates package in the official ArchLinux repos being broken. It contains no files!

I've filed a bug report: https://bugs.archlinux.org/task/46221?project=1&opened=10229

As far as apacman is concerned, I suppose I could add an additional sanity check, however it is a reasonable assumption that the CA certs are properly installed and that the package is not broken.

oshazard commented 9 years ago

IDK, I'll have to try on a new install to be sure if there is an issue with the packages in the core repo. Feel free to contribute to that bug report if you can reproduce.

Added sanity checks for curl in apacman in v2.2, if it fails will spit out the exit code. Moreover, if man is installed it'll print the meaning of the exit code as well.

example (unplugged from network):

$ apacman -W gtkdialog-svn
notice: curl exited with code 6
manpage: Couldn't resolve host. The given remote host was not resolved.
error: package 'gtkdialog-svn' was not found
suedi commented 9 years ago

I checked the bug report and have all the ca-cert packages installed. They are in a different place with a different name though so I can solve it either by symlinking or setting CURL_CA_BUNDLE environment variable.

the --capath doesn't work for me

I thought it strange that arch version of curl didn't do this automatically.

I am not using systemd so feel like every bug I have is answered "install systemd"