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

How to handle broken sources #36895

Closed
Anachron opened this issue Apr 28, 2022 · 4 comments
Closed

How to handle broken sources #36895

Anachron opened this issue Apr 28, 2022 · 4 comments
Labels

Comments

@Anachron
Copy link
Contributor

Anachron commented Apr 28, 2022

I was asking myself if we should run a script periodically (like check-updates) that checks if the source is still available?

@leahneukirchen
Copy link
Member

Loads fine here, and virtual hosting is nothing new either.

We have copies of old tarballs on https://sources.voidlinux.org/openbox-3.6.1/ and else use Debian as a fallback.

Ideally they'd add the tarballs to the releases of course.

@Anachron
Copy link
Contributor Author

Anachron commented Apr 28, 2022

Yeah I figured it's on my end, read my third reply. I'm still debugging.

Nonetheless, I think a script to watch for broken links cannot hurt in the future.

Edit: Edited the issue to reflect that this topic is now about a script to check for missing sources.

@Anachron Anachron changed the title Openbox website is gone How to handle broken sources Apr 28, 2022
@r-ricci
Copy link
Contributor

r-ricci commented Apr 28, 2022

Nonetheless, I think a script to watch for broken links cannot hurt in the future.

It shouldn't be too hard. Something like this will verify the hashes too (but also download a lot of stuff):

rm -rf hostdir/sources
for i in $(find srcpkgs -name template | cut -d / -f 2); do
        ./xbps-src -I fetch "$i" >/dev/null 2>&1 || echo "$i: broken distfiles"
done

This one will just check if the the server returns a successful status code:

source common/environment/setup/misc.sh
for pkg in $(find srcpkgs -name template | cut -d / -f 2); do
        unset homepage changelog distfiles
        source srcpkgs/"$pkg"/template 2>/dev/null
        for i in $homepage $changelog $distfiles; do
                i="${i%>*}"
                if ! curl --silent --location --head --fail -o /dev/null "$i"; then
                        echo "$pkg: url $i is broken"
                fi
        done
done

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

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

No branches or pull requests

3 participants