For the Parabola users among us – https://jeweet.net/repo/parabola
If you want to use the mirror, open /etc/pacman.d/mirrorlist and add the following line on top of the file to give it the highest priority:
Server = https://jeweet.net/repo/parabola/$repo/os/$arch
Currently the bandwidth is limited to 50mbit/s.
For a fresh Parabola installation you can pick one of the images from https://jeweet.net/repo/parabola/iso/. If you want to run your computer in complete freedom, take a look at https://libreboot.org for more info.
Creating a mirror – to Parabalo-wiki page >>
If you want to contribute by running your own mirror, you can use this bash script. Starting the script manually in a terminal will cause it to sync. When it detects no TTY, which means it’s probably running as a cron-job, it will only sync if the lastupdate file is changed.
#!/bin/bash # Directory where the repo is stored locally. Example: /srv/repo target="/srv/repo" # Directory where files are downloaded to before being moved in place. # This should be on the same filesystem as $target, but not a subdirectory of $target. # Example: /srv/tmp tmp="/srv/tmp" # Lockfile path lock="/var/lock/syncrepo.lck" # If you want to limit the bandwidth used by rsync set this. # Use 0 to disable the limit. # The default unit is KiB (see man rsync /--bwlimit for more) bwlimit=0 # The source URL of the mirror you want to sync from. source_url='rsync://repo.parabola.nu:875/repos/' # An HTTP(S) URL pointing to the 'lastupdate' file on your chosen mirror. lastupdate_url='https://repo.parabola.nu/lastupdate' #### END CONFIG [ ! -d "${target}" ] && mkdir -p "${target}" [ ! -d "${tmp}" ] && mkdir -p "${tmp}" exec 9>"${lock}" /usr/bin/flock -n 9 || exit rsync_cmd() { local -a cmd=(/usr/bin/rsync -rtlH --safe-links --delete-after ${VERBOSE} "--timeout=600" "--contimeout=60" -p \ --delay-updates --no-motd "--temp-dir=${tmp}") if /bin/stty &>/dev/null; then cmd+=(-h -v --progress) else cmd+=(--quiet) fi if ((bwlimit>0)); then cmd+=("--bwlimit=$bwlimit") fi "${cmd[@]}" "$@" } # if we are called without a tty (cronjob) only run when there are changes if ! /usr/bin/tty -s && [[ -f "$target/lastupdate" ]] && /usr/bin/diff -b <(/usr/bin/curl -Ls "$lastupdate_url") "$target/lastupdate" >/dev/null; then # keep lastsync file in sync for statistics rsync_cmd "$source_url/lastsync" "$target/lastsync" exit 0 fi rsync_cmd \ --exclude='*.links.tar.gz*' \ --exclude='/theme' \ --exclude='/.htaccess' \ --exclude='/update-mirror.sh' \ "${source_url}" \ "${target}"
You should run this script regularly to keep your mirror up to date by configuring a cron job to syncronise as a user with write permissions on $target and $temp. To run the above script every hour, create the file /etc/cron.d/parabola. Edit the file so the first number is a random number between 0-59, otherwise all mirrors will sync at the same time.
38 * * * * www-data [PATH_TO_YOUR_SCRIPT]/update-mirror.sh
Finally, you can set up a webserver such as Apache or nginx to serve files from $target to the public.
If you like to style your directory-listing, here is a small example: https://jeweet.net/repo/source/parabola-repo-style/.
Rename both htaccess-example files to .htaccess and theme-example folder to theme. Place all files in your $target dictory and make sure Apache doesn’t ignore the .htaccess file. Edit the files so they match your set-up.