From e3d6871deb5c448b5856ffc25e2c4e55c77f719e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 17 Jun 2014 21:28:35 -0400 Subject: rm get-repos (obsolete) and git-pbs (never used/testing) --- get-repos | 58 ---------------------------------------------------------- git-pbs | 44 -------------------------------------------- 2 files changed, 102 deletions(-) delete mode 100755 get-repos delete mode 100755 git-pbs diff --git a/get-repos b/get-repos deleted file mode 100755 index b98d601..0000000 --- a/get-repos +++ /dev/null @@ -1,58 +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 - -TMPDIR="$(mktemp -dt "${0##*/}.XXXX")" -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=${TMPDIR} \ - --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 "${TMPDIR}" -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 - -rm -r ${TMPDIR} - -exit $? diff --git a/git-pbs b/git-pbs deleted file mode 100755 index b815863..0000000 --- a/git-pbs +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -_pkg=$1 - -mkdir -p $_pkg -pushd $_pkg - - -if [ ! -d .git ]; then -# Start a git repo for the package -# Add the remote origin -# Pull the package branch onto an unmodified branch - git init - git remote add arch git://projects.archlinux.org/svntogit/packages.git - -# Export the repository - touch .git/git-daemon-export-ok - -# Pass the -b flag to checkout to create the branches - extra="-b" -fi - -git checkout ${extra} upstream -git pull arch packages/$_pkg - -# Move PKGBUILD and files to the basedir -# Remove everything else from the repo -git checkout ${extra} master - -# This produces a lot of merging conflicts -git merge upstream - -# This apparently solves them -git mv trunk/* . -git rm -rf repos - -# Remove the actual files -rm -rf trunk repos - -# Commit everything -git commit -a -m "Converted to PBS" - -# Return to the repo -popd >/dev/null -- cgit v1.2.3-2-g168b From 22f7ae3e5c791694edf4c4b6e5f8623f9a9dddf4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 17 Jun 2014 21:37:44 -0400 Subject: mkrepo: cleanup - Use config:FTP_BASE instead of local_config:repodir - Don't mention get_repos script anymore - Remove redundant lines of code. - Better quoting. --- local_config | 3 --- mkrepo | 17 ++++------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/local_config b/local_config index 9b4415e..57725fe 100644 --- a/local_config +++ b/local_config @@ -10,9 +10,6 @@ mirror="mirrors.kernel.org" #mirror="mirror.de.leaseweb.net" mirrorpath="archlinux" -# mkrepo -repodir=${_paraboladir} - # yf-update blacklist=${_paraboladir}/docs/blacklist.txt whitelist=${_paraboladir}/docs/whitelist.txt diff --git a/mkrepo b/mkrepo index 10d014b..f30ad00 100755 --- a/mkrepo +++ b/mkrepo @@ -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." -- cgit v1.2.3-2-g168b From ea871cfb29b7e9d438cb50c5a75642deee86f652 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 17 Jun 2014 21:43:02 -0400 Subject: rm -r yf/ yf-update # they aren't used anymore --- local_config | 10 ---------- yf-update | 18 ------------------ yf/PKGBUILD | 28 ---------------------------- yf/your-freedom.install | 32 -------------------------------- 4 files changed, 88 deletions(-) delete mode 100755 yf-update delete mode 100644 yf/PKGBUILD delete mode 100644 yf/your-freedom.install diff --git a/local_config b/local_config index 57725fe..3d6c709 100644 --- a/local_config +++ b/local_config @@ -1,7 +1,3 @@ -#/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" @@ -9,9 +5,3 @@ mirror="mirrors.kernel.org" #mirror="mirror.us.leaseweb.net" #mirror="mirror.de.leaseweb.net" mirrorpath="archlinux" - -# yf-update -blacklist=${_paraboladir}/docs/blacklist.txt -whitelist=${_paraboladir}/docs/whitelist.txt - -unset _paraboladir diff --git a/yf-update b/yf-update deleted file mode 100755 index b6dff14..0000000 --- a/yf-update +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -source "$(dirname "$(readlink -e "$0")")/config" -source "$(dirname "$(readlink -e "$0")")/local_config" -source "$(dirname "$(readlink -e "$0")")/libremessages" - -blacklist_mtime=$(printf "%.0f" $(find ${blacklist} -printf "%T@")) -last_bl_mtime=$(cat "$(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 -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 < Date: Tue, 17 Jun 2014 21:44:14 -0400 Subject: mv local_config db-sync.conf # now that its other uses are gone --- db-sync | 2 +- db-sync.conf | 7 +++++++ local_config | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 db-sync.conf delete mode 100644 local_config diff --git a/db-sync b/db-sync index 4e692e9..138328b 100755 --- a/db-sync +++ b/db-sync @@ -186,7 +186,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/local_config b/local_config deleted file mode 100644 index 3d6c709..0000000 --- a/local_config +++ /dev/null @@ -1,7 +0,0 @@ -#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" -- cgit v1.2.3-2-g168b