summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config7
-rw-r--r--db-functions6
-rwxr-xr-xdb-update7
-rwxr-xr-xget_license.sh54
-rwxr-xr-xrepo-update17
5 files changed, 21 insertions, 70 deletions
diff --git a/config b/config
index 7180f9e..6936a9b 100644
--- a/config
+++ b/config
@@ -1,6 +1,8 @@
-FTP_BASE="/home/parabolavnx/parabolagnulinux.org/free"
+#!/bin/bash
+FTP_BASE="/home/parabolavnx/parabolagnulinux.org/repo"
ARCH_BASE="/home/parabolavnx/parabolagnulinux.org/repo"
SVNREPO="/home/parabolavnx/parabolagnulinux.org/abslibre"
+
ARCHREPOS=('core' 'extra' 'community' 'testing' 'multilib')
PKGREPOS=(${ARCHREPOS[@]} 'libre' 'libre-testing' 'social' 'sugar')
PKGPOOL='pool/packages'
@@ -23,7 +25,8 @@ LOCK_TIMEOUT=300
STAGING="$FTP_BASE/staging"
TMPDIR="$HOME/tmp"
-ARCHES=(i686 x86_64 mips64el)
+ARCHARCHES=(i686 x86_64)
+ARCHES=(${ARCHARCHES[@]} mips64el)
DBEXT=".db.tar.gz"
FILESEXT=".files.tar.gz"
PKGEXT=".pkg.tar.?z"
diff --git a/db-functions b/db-functions
index 20bfa0e..4dddcb5 100644
--- a/db-functions
+++ b/db-functions
@@ -211,7 +211,7 @@ repo_unlock () { #repo_unlock <repo-name> <arch>
_grep_pkginfo() {
local _ret
- _ret="$(bsdtar -xOqf "$1" .PKGINFO | /bin/grep -m 1 "^${2} = ")"
+ _ret="$(bsdtar -xOqf "$1" .PKGINFO | grep -m 1 "^${2} = ")"
echo "${_ret#${2} = }"
}
@@ -499,7 +499,7 @@ arch_repo_add() {
pushd "${FTP_BASE}/${repo}/os/${arch}" >/dev/null
repo-add -q "${repo}${DBEXT}" ${pkgs[@]} >/dev/null \
|| error "repo-add ${repo}${DBEXT} ${pkgs[@]}"
- /usr/bin/repo-add -f -q "${repo}${FILESEXT}" ${pkgs[@]} \
+ repo-add -f -q "${repo}${FILESEXT}" ${pkgs[@]} \
|| error "repo-add -f ${repo}${FILESEXT} ${pkgs[@]}"
popd >/dev/null
set_repo_permission "${repo}" "${arch}"
@@ -518,7 +518,7 @@ arch_repo_remove() {
fi
repo-remove -q "${dbfile}" ${pkgs[@]} >/dev/null \
|| error "repo-remove ${dbfile} ${pkgs[@]}"
- /usr/bin/repo-remove -q "${filesfile}" ${pkgs[@]} \
+ repo-remove -q "${filesfile}" ${pkgs[@]} \
|| error "repo-remove ${filesfile} ${pkgs[@]}"
set_repo_permission "${repo}" "${arch}"
}
diff --git a/db-update b/db-update
index 6bd0209..7604547 100755
--- a/db-update
+++ b/db-update
@@ -39,9 +39,10 @@ for repo in ${repos[@]}; do
# die "Package ${repo}/$(basename ${pkg}) already exists in another repository"
#fi
done
- if ! check_splitpkgs ${repo} ${pkgs[@]}; then
- die "Missing split packages for ${repo}"
- fi
+ # This is fucking obnoxious
+# if ! check_splitpkgs ${repo} ${pkgs[@]}; then
+# die "Missing split packages for ${repo}"
+# fi
else
die "Could not read ${STAGING}"
fi
diff --git a/get_license.sh b/get_license.sh
deleted file mode 100755
index 1b755c6..0000000
--- a/get_license.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-# -*- coding: utf-8 -*-
-
- # get_license.sh
- # Copyright 2010 Joshua Ismael Haase Hernández
-
- # ---------- GNU General Public License 3 ----------
-
- # This file is part of Parabola.
-
- # Parabola is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
-
- # Parabola is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
-
- # You should have received a copy of the GNU General Public License
- # along with Parabola. If not, see <http://www.gnu.org/licenses/>.
-
-source ./config
-source ./local_config
-source ./libremessages
-
-msg "Creating pending licenses list"
-pushd ${licenses_dir} >/dev/null
-rm -rf ${licenses_dir}/*
-popd >/dev/null
-
-dir=$(mktemp -d ${tempdir}/licenses.XXXX)
-pushd $dir > /dev/null
-
-for repo in ${ARCHREPOS[@]}; do
- msg2 "Extracting licenses in ${repo}"
- pending=($(cut -d: -f1 ${docs_dir}/pending-${repo}.txt))
- for name in ${pending[@]}; do
- plain "${pkg}"
- for pkg in $(find ${repodir}/staging/${repo} -name "${name}-*${PKGEXT}" -printf '%f '); do
- chmod +r ${pkg}
- bsdtar -xf ${pkg} usr/share/licenses || {
- error "${pkg} has no licenses"
- }
- chmod -r ${pkg}
- done
- done
-done
-
-mv ${dir}/* ${licenses_dir}/
-rm -rf ${dir}
-
-exit 0
diff --git a/repo-update b/repo-update
index 697e188..88ddda3 100755
--- a/repo-update
+++ b/repo-update
@@ -1,12 +1,12 @@
#!/bin/bash
# -*- coding: utf-8 -*-
-source config
-source local_config
-source libremessages
+source $(dirname $0)/config
+source $(dirname $0)/local_config
+source $(dirname $0)/libremessages
for repo in ${ARCHREPOS[@]}; do
- for arch in 'i686' 'x86_64' 'any'; do
+ for arch in ${ARCHARCHES[@]} 'any'; do
msg "Syncing ${repo} ${arch}"
# makes a file containing rsync output for filter.py
${rsync_list_command} \
@@ -27,7 +27,7 @@ for repo in ${ARCHREPOS[@]}; do
rsync://${mirror}/${mirrorpath}/${repo}/os/${arch}/ \
${repodir}/staging/${repo}/
done
- for arch in 'i686' 'x86_64'; do
+ for arch in ${ARCHARCHES[@]}; do
msg "Cleaning $repo $arch"
# if there is a db in repo (db is created on rsync)
if [ -r ${repodir}/staging/${repo}/os/${arch}/${repo}${DBEXT} ]; then
@@ -43,7 +43,8 @@ for repo in ${ARCHREPOS[@]}; do
python clean_repo.py -k ${blacklist} -d ${repodir}/staging/${repo}
done
-db-update
-~/repm/cron-jobs/ftpdir-cleanup
+msg "Removing leftover files..."
+find ${repodir}/staging/ \! -name "*${PKGEXT}*" -delete
-get_license.sh
+db-update
+$(dirname $0)/cron-jobs/ftpdir-cleanup