[Bug 40346] Unable to install winehq-devel on debian jessie ( CDN out of sync)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Apr 1 12:05:33 CDT 2017


https://bugs.winehq.org/show_bug.cgi?id=40346

--- Comment #12 from Sebastian Lackner <sebastian at fds-team.de> ---
(In reply to Michael Müller from comment #11)
> We could collect a list of rsynced files and then
> invalidate the cache for all updated files.

The bug affects all files distributed using the CDN, so it would be better to
fix this on the WineHQ server. If any help is needed to setup the necessary
scripts, please let me know. Here is a template (based on inotify) which could
be used:

--- snip ---
#!/bin/bash
#
# Calls 'purge_url' for all file/directory changes within $WEB_ROOT.
# Depends on https://github.com/fastly/fastly-py/blob/master/bin/purge_url
# which must be present somewhere in $PATH.
#

AUTH_KEY="mypurgekey"
URL_HOST="herethehost"
WEB_ROOT="/var/www"

# Monitor $WEB_ROOT directory and listen for 'modify', 'move', 'create'
# and 'delete' events. We do not listen for 'attrib' events to avoid
# unnecessary purges of CDN content. As a side effect the last modification
# date might not always be correct.
inotifywait -m -r -q --format '%w%f' -e modify -e move -e create -e delete
"$WEB_ROOT" |
while read -r filename; do
    filename="/$(realpath --relative-to="$WEB_ROOT" "$filename")"
    echo "Requesting purge of $filename" >&2

    # Purge URL of the file/directory which changed
    purge_url "$AUTH_KEY" "$URL_HOST" "$filename"

    # Also purge URL of the parent directory to ensure
    # directory listings are up-to-date.
    filename="$(dirname "$filename")"
    purge_url "$AUTH_KEY" "$URL_HOST" "$filename"
done
--- snip ---

Setting up a systemd or init.d config to start the service automatically after
system boot should also be pretty straightforward. Other solutions (cronjob and
purge based on modification time) would also be fine of course.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list