diff options
-rwxr-xr-x | db-sync | 2 | ||||
-rw-r--r-- | db-sync.conf | 7 | ||||
-rwxr-xr-x | get-repos | 56 | ||||
-rw-r--r-- | local_config | 20 | ||||
-rwxr-xr-x | mkrepo | 17 | ||||
-rwxr-xr-x | yf-update | 18 | ||||
-rw-r--r-- | yf/PKGBUILD | 28 | ||||
-rw-r--r-- | yf/your-freedom.install | 32 |
8 files changed, 12 insertions, 168 deletions
@@ -192,7 +192,7 @@ trap_exit() { } source "$(dirname "$(readlink -e "$0")")/config" -source "$(dirname "$(readlink -e "$0")")/local_config" +source "$(dirname "$(readlink -e "$0")")/db-sync.conf" source "$(dirname "$(readlink -e "$0")")/libremessages" # Check variables presence diff --git a/db-sync.conf b/db-sync.conf new file mode 100644 index 0000000..3d6c709 --- /dev/null +++ b/db-sync.conf @@ -0,0 +1,7 @@ +#mirror="mirrors.uk2.net" +mirror="mirrors.kernel.org" +#mirror="mirror.umd.edu" +#mirror="archlinux.c3sl.ufpr.br" +#mirror="mirror.us.leaseweb.net" +#mirror="mirror.de.leaseweb.net" +mirrorpath="archlinux" diff --git a/get-repos b/get-repos deleted file mode 100755 index b8d2ccb..0000000 --- a/get-repos +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# Gets repo databases and updates parabolaweb -# Note: It works remotely because our parabolaweb server and repo server are -# two different hosts - -trap_exit() { - echo - error "$@" - exit 1 -} - -source "$(dirname "$(readlink -e "$0")")/config" -source "$(dirname "$(readlink -e "$0")")/libremessages" - -# From makepkg -set -E - -trap 'trap_exit "$(gettext "TERM signal caught. Exiting...")"' TERM HUP QUIT -trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT -trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR - -WORKDIR=$(mktemp -dt "${0##*/}.XXXXXXXXXX") -trap "rm -rf -- $(printf '%q' "${WORKDIR}")" EXIT - -DBLIST=() - -# Repos -for _repo in "${PKGREPOS[@]}"; do - for _arch in "${ARCHES[@]}"; do - DBLIST+=("http://repo.parabolagnulinux.org/${_repo}/os/${_arch}/${_repo}${FILESEXT}") - done -done - -# Get them all -msg "Retrieving ${#DBLIST[@]} databases" -wget --directory-prefix=${WORKDIR} \ - --no-verbose \ - --force-directories \ - --no-host-directories \ - "${DBLIST[@]}" || true -# Always return true, some databases are expect to be missing - -# Create the arches regexp arch1|arch2 -arch_re="$(echo "(${ARCHES[@]} i586)" | tr ' ' '|')" - -msg "Adding to parabolaweb" -find "${WORKDIR}" -iname "*${FILESEXT}" | while read _db; do - _arch=$(echo "${_db}" | egrep -o "${arch_re}") - - if [ -z "${_arch}" ]; then - error "Can't find database architecture: ${_db}" - continue - fi - - "${WEB_DIR}"/manage.py reporead "${_arch}" "${_db}" || true -done diff --git a/local_config b/local_config deleted file mode 100644 index 9b4415e..0000000 --- a/local_config +++ /dev/null @@ -1,20 +0,0 @@ -#/bin/bash # as a hint to text editors -_paraboladir=/srv/http/repo/public - -# db-sync -#mirror="mirrors.uk2.net" -mirror="mirrors.kernel.org" -#mirror="mirror.umd.edu" -#mirror="archlinux.c3sl.ufpr.br" -#mirror="mirror.us.leaseweb.net" -#mirror="mirror.de.leaseweb.net" -mirrorpath="archlinux" - -# mkrepo -repodir=${_paraboladir} - -# yf-update -blacklist=${_paraboladir}/docs/blacklist.txt -whitelist=${_paraboladir}/docs/whitelist.txt - -unset _paraboladir @@ -4,21 +4,12 @@ # Description: A script to quickly create new [repos] source "$(dirname "$(readlink -e "$0")")/config" -source "$(dirname "$(readlink -e "$0")")/local_config" - -# TODO it would be simpler to expand arrays to {element1,element2,etc} -for repo in $@; do +for repo in "$@"; do echo ":: Creating [$repo]" - mkdir -pv ${repodir}/{staging/,}${repo} - - for arch in ${ARCHES[@]}; do - mkdir -pv ${repodir}/${repo}/os/${arch} + for arch in "${ARCHES[@]}"; do + mkdir -pv "${FTP_BASE}/${repo}/os/${arch}" done - done -echo ":: All done. Add the repo to the parabolaweb admin page" -echo " and the get_repos script on the same server." - -exit $? +echo ":: All done. Add the repo to the ParabolaWeb admin page." diff --git a/yf-update b/yf-update deleted file mode 100755 index ee5d3eb..0000000 --- a/yf-update +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -source "$(dirname "$(readlink -e "$0")")/local_config" -source "$(dirname "$(readlink -e "$0")")/config" -source "$(dirname "$(readlink -e "$0")")/libremessages" - -blacklist_mtime=$(printf "%.0f" $(find ${blacklist} -printf "%T@")) -last_bl_mtime=$(< "$(dirname "$(readlink -e "$0")")/yftime") - -if [ $blacklist_mtime -gt $last_bl_mtime ]; then - pushd "$(dirname "$(readlink -e "$0")")/yf" - makepkg -f - find . -name "*${PKGEXT}" -exec mv {} ${STAGING}/libre \; - popd - echo ${blacklist_mtime} > "$(dirname "$(readlink -e "$0")")/yftime" - msg2 "built and staged" -else - msg2 "nothing to do" -fi diff --git a/yf/PKGBUILD b/yf/PKGBUILD deleted file mode 100644 index e737482..0000000 --- a/yf/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: Parabola Project <dev@list.parabolagnulinux.org> -pkgname=your-freedom -pkgver=$(LC_ALL=C date -u +%Y%m%d) -pkgrel=1 -pkgdesc="This package conflicts with every nonfree package known to date." -arch=('any') -url="https://parabolagnulinux.org" -license=('GPL') -groups=('base') -install=${pkgname}.install -source=() -md5sums=() -noextract=() - -build() { - cd ${srcdir} - source ~/repm/local_config - install -d ${pkgdir}/usr/share/doc/${pkgname} - install -m644 $blacklist $whitelist ${pkgdir}/usr/share/doc/${pkgname}/ -} - -package() { - conflicts=($(cut -d: -f1,2 ${pkgdir}/usr/share/doc/${pkgname}/blacklist.txt | \ - sed "s/:$//" | \ - grep -v ":" | \ - sort -u - )) -} diff --git a/yf/your-freedom.install b/yf/your-freedom.install deleted file mode 100644 index 731a575..0000000 --- a/yf/your-freedom.install +++ /dev/null @@ -1,32 +0,0 @@ - -pre_install() { - cat <<EOM - == IMPORTANT NOTICE == - - This package will help you identify nonfree packages that are installed - on your system at the time of it's installation, as well as protecting - you from (accidentally) installing them. - - Also, if any other nonfree package is identified, later updates will ask - you for it's removal. - - Have in mind that, if you want to retain certain nonfree packages - installed on your system, you'll have to remove your-freedom :) - - If you find out any of the following: - * Cascade package removal due to nonfree dependencies, - * Your-freedom conflicting with a *-libre package, - * Etc. - - Please report back to the Parabola Project on the usual channels: - * http://bugs.parabolagnulinux.org - * irc://freenode.net/#parabola - * mailto:dev@list.parabolagnulinux.org -EOM -} - -pre_upgrade() { - pre_install -} - -# vim:set ts=2 sw=2 et: |