FS#52823 - [openssh] Current PKGBUILD requires openssh to be already installed and tests wrong scp
Attached to Project:
Arch Linux
Opened by Marc Mettke (RemoteAdmin) - Thursday, 02 February 2017, 13:10 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 04 February 2017, 23:59 GMT
Opened by Marc Mettke (RemoteAdmin) - Thursday, 02 February 2017, 13:10 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 04 February 2017, 23:59 GMT
|
Details
Description:
Building openssh without it being already installed results to the following error: "scp: failed copy /tmp/3bcb7602/0/aur-archlinux/openssh-selinux/src/openssh-7.4p1/regress/data" The Error is documented in the "openssh-7.4p1/regress/README.regress": [README.regress] "Similarly, if you do not have "scp" in your system's $PATH then the multiplex scp tests will fail (since the system's shell startup scripts will determine where the shell started by sshd will look for scp)." Therefore the problem is that scp is not on the $PATH 'cause it isn't installed. On the other hand having openssh installed means that in the current configuration the scp of the installed package and not the compiled one will be tested. To fix that Problem the PKGBUILDs check function must be altered to the following: check() { cd "${srcdir}/${pkgname}-${pkgver}" PATH=$PWD:$PATH make tests } Steps to reproduce: * uninstall openssh * try to build package (fails at multiplex tests) |
This task depends upon
Closed by Gaetan Bisson (vesath)
Saturday, 04 February 2017, 23:59 GMT
Reason for closing: Implemented
Additional comments about closing: in SVN
Saturday, 04 February 2017, 23:59 GMT
Reason for closing: Implemented
Additional comments about closing: in SVN
I'd argue this isn't much of an issue: you can simply build openssh without running test() to bootstrap, and then (if you really care about testing) rebuild it again. There's also the problem of test() failing in makechrootpkg's restrictive environment. But it works for me since I build my packages in virtual machines. Being the maintainer, I am the one that builds openssh 99% of the time, and I like to have test() running, so I think it makes sense to leave it enabled in our PKGBUILD. Even if that means building openssh in certain configurations (under makechrootpkg, or without openssh already installed) fails.
Doug and Marc: Please ask to reopen this report if my commit to SVN does not properly address your issues. Cheers.
[[ -e /.arch-chroot ]] && return
or
[[ -e /usr/bin/scp ]] || return
Returns a non 0 value and therefore the build fails. I was able to get it to work with:
if [[ ! -e /.arch-chroot ]] && [[ -e /usr/bin/scp ]]; then
make tests
fi