Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libfetch update #373

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Libfetch update #373

wants to merge 10 commits into from

Conversation

Duncaen
Copy link
Member

@Duncaen Duncaen commented Feb 7, 2021

Syncing most of the code with the FreeBSD version
and fixing some things about the keep-alive handling.
This should fix some problems and make it easier to resolve #152.

I've been testing this with a bash script:

#!/bin/bash
#

export LD_LIBRARY_PATH=$PWD/lib
cmd=$PWD/bin/xbps-fetch/xbps-fetch

XBPS_UHELPER_CMD=xbps-uhelper
XBPS_TARGET_WORDSIZE=64
XBPS_WORDSIZE=64
XBPS_TARGET_MACHINE=x86_64

vopt_if() {
        :
}
vopt_conflict() {
        :
}
vopt_bool() {
        :
}
vopt_enable() {
        :
}
vopt_with() {
        :
}

for dir in ~/void-packages/srcpkgs/*; do
        [[ -h "$dir" ]] && continue
        unset arr
        unset distfiles
        . "$dir/template"
        args=(${distfiles})
        [[ ${#args} -eq 0 ]] && continue
        mkdir -p "/tmp/xbps-fetch/${pkgname}-${version}"
        cd "/tmp/xbps-fetch/${pkgname}-${version}"
        valgrind "$cmd" -dv "${args[@]}" 2>&1 | tee "/tmp/xbps-fetch/$pkgname.log"
        rv=$?
        if [[ $rv -ne 0 ]]; then
                echo "ERROR: $rv"
                mv "/tmp/xbps-fetch/$pkgname.log" "/tmp/xbps-fetch/$pkgname.error.log"
        else
                mv "/tmp/xbps-fetch/$pkgname.log" "/tmp/xbps-fetch/$pkgname.good.log"
        fi
done

@lgtm-com
Copy link

lgtm-com bot commented Feb 7, 2021

This pull request introduces 2 alerts when merging 490cca2 into 01180f9 - view on LGTM.com

new alerts:

  • 1 for Use of potentially dangerous function
  • 1 for Array argument size mismatch

@lgtm-com
Copy link

lgtm-com bot commented Feb 7, 2021

This pull request introduces 1 alert when merging ada5a80 into 01180f9 - view on LGTM.com

new alerts:

  • 1 for Array argument size mismatch

@Duncaen Duncaen force-pushed the libfetch-update branch 2 times, most recently from a717693 to 1dac923 Compare February 7, 2021 00:49
Copy link
Member

@ericonr ericonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had wanted to do this, thanks for getting to it :)

The part where they try to propagate errors from close(fd) seems weird, but they must have a reason for it.

From what I understood last I looked at FreeBSD libfetch, they implemented their own SOCKS5 handling. Is it compatible with the interface in ours?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxy settings are ignored by xbps-install
2 participants