From 7e93af9ef087cd048dd42cef71328ec7f75e885c Mon Sep 17 00:00:00 2001 From: Parabola Date: Sun, 5 Jan 2014 04:21:24 +0000 Subject: fix use of $0 in db-cleanup --- db-cleanup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db-cleanup b/db-cleanup index 904c06e..841800b 100755 --- a/db-cleanup +++ b/db-cleanup @@ -43,7 +43,7 @@ for _repo in ${PKGREPOS[@]}; do bsdtar tf "${dbfile}" | \ cut -d'/' -f1 | \ sort -u | \ - sed "s|$|*|" >> /tmp/$0.$$.filter + sed "s|$|*|" >> /tmp/${0##*/}.$$.filter done done @@ -54,7 +54,7 @@ for POOL in ${PKGPOOLS[@]} ${SRCPOOLS[@]}; do msg2 "${POOL}" rsync ${EXTRAFLAGS} -va --delete-excluded \ - --include-from="/tmp/$0.$$.filter" \ + --include-from="/tmp/${0##*/}.$$.filter" \ --exclude="*" \ ${FTP_BASE}/${POOL}/ \ ${FTP_BASE}/${POOL}/ -- cgit v1.1-4-g5e80 From ba21dd9e342bd640b1bbaa82ebf015932390b18e Mon Sep 17 00:00:00 2001 From: Parabola Date: Sun, 5 Jan 2014 04:21:52 +0000 Subject: db-update: add hook for publishing generated sources --- db-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db-update b/db-update index 0359697..2fa23af 100755 --- a/db-update +++ b/db-update @@ -83,4 +83,4 @@ for repo in ${repos[@]}; do done done - +cp -rviT "${STAGING}/other/" "${FTP_BASE}/other/" -- cgit v1.1-4-g5e80 From d4f3035779dae2efc5c5baa527ebd82404207290 Mon Sep 17 00:00:00 2001 From: Parabola Date: Sun, 5 Jan 2014 04:22:51 +0000 Subject: go ahead and track local_config --- .gitignore | 3 +-- local_config | 31 +++++++++++++++++++++++++++++++ local_config.example | 26 -------------------------- 3 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 local_config delete mode 100644 local_config.example diff --git a/.gitignore b/.gitignore index dd17455..98a5228 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,9 @@ *~ *.pyc -local_config /config.local test/packages/*/*.pkg.tar.?z \#*# .#* yftime src* -pkg* \ No newline at end of file +pkg* diff --git a/local_config b/local_config new file mode 100644 index 0000000..8f3946a --- /dev/null +++ b/local_config @@ -0,0 +1,31 @@ +# Mirror options +#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" + +# Directories: they should end without / +paraboladir=/srv/http/repo/public +tempdir=/tmp +archdb=${tempdir}/db +docs_dir=${paraboladir}/docs +repodir=${paraboladir} +licenses_dir=${docs_dir}/pending_licenses +# End Directories + +# Files +logname=${paraboladir}/log/$(date -u +%Y%m%d-%H:%M)-repo-maintainer.log +rsout_file=${tempdir}/rsout +rsync_not_needed=${tempdir}/rsync_not_needed + +rsync_blacklist=${docs_dir}/rsyncBlacklist + +blacklist=${docs_dir}/blacklist.txt +whitelist=${docs_dir}/whitelist.txt + +# Rsync commands +rsync_list_command="rsync -rptgoL --exclude='*.abs.tar.*' --list-only --no-motd " +rsync_update_command="rsync -vrptgoL --exclude='*.abs.tar.*' --no-motd " diff --git a/local_config.example b/local_config.example deleted file mode 100644 index 2280cc2..0000000 --- a/local_config.example +++ /dev/null @@ -1,26 +0,0 @@ -# Mirror options -mirror="mirrors.eu.kernel.org" -mirrorpath="mirrors/archlinux" - -# Directories: they should end without / -paraboladir=~/parabolagnulinux.org -tempdir=~/tmp -archdb=${tempdir}/db -docs_dir=${paraboladir}/docs -repodir=${paraboladir}/repo -licenses_dir=${docs_dir}/pending_licenses -# End Directories - -# Files -logname=${paraboladir}/log/$(date -u +%Y%m%d-%H:%M)-repo-maintainer.log -rsout_file=${tempdir}/rsout -rsync_not_needed=${tempdir}/rsync_not_needed - -rsync_blacklist=${docs_dir}/rsyncBlacklist - -blacklist=${docs_dir}/blacklist.txt -whitelist=${docs_dir}/whitelist.txt - -# Rsync commands -rsync_list_command="rsync -rptgoL --exclude='*.abs.tar.*' --list-only --no-motd " -rsync_update_command="rsync -rptgoL --exclude='*.abs.tar.*' --no-motd " -- cgit v1.1-4-g5e80 From 91f6039acb4ba915a3ca3fc366a7159656ec0dc1 Mon Sep 17 00:00:00 2001 From: Parabola Date: Mon, 6 Jan 2014 04:30:22 +0000 Subject: fix things --- db-remove | 2 +- db-update | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/db-remove b/db-remove index a71bbab..f0785e5 100755 --- a/db-remove +++ b/db-remove @@ -33,7 +33,7 @@ for pkgbase in ${pkgbases[@]}; do if [ -d "${SVNREPO}/$repo/$pkgbase" ]; then remove_pkgs=($(. "${SVNREPO}/$repo/$pkgbase/PKGBUILD"; echo ${pkgname[@]})) else - warning "$pkgbase not found in $svnrepo" + warning "$pkgbase not found in ABS(libre)" warning "Removing only $pkgbase from the repo" warning "If it was a split package you have to remove the others yourself!" remove_pkgs[${#remove_pkgs[*]}]=$pkgbase diff --git a/db-update b/db-update index 2fa23af..2d4f28a 100755 --- a/db-update +++ b/db-update @@ -9,7 +9,7 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty -printf '%f ' 2>/dev/null)) +repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty ! -name other -printf '%f ' 2>/dev/null)) if [ $? -ge 1 ]; then die "Could not read ${STAGING}" fi @@ -39,10 +39,10 @@ for repo in ${repos[@]}; do die "Package ${repo}/$(basename ${pkg}) already exists in another repository" fi done - # This is fucking obnoxious -# 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 @@ -83,4 +83,13 @@ for repo in ${repos[@]}; do done done -cp -rviT "${STAGING}/other/" "${FTP_BASE}/other/" +cd "${STAGING}" +while read -r file; do + pub="${FTP_BASE}/${file}" + if [[ -f $pub ]]; then + warning "file already exists: %s" "${file}" + else + mkdir -p -- "${pub%/*}" + mv -vn "$file" "$pub" + fi +done < <(find other -type f) -- cgit v1.1-4-g5e80 From 6682aefeafb8d30899e464122864f56318ad7640 Mon Sep 17 00:00:00 2001 From: Parabola Date: Wed, 8 Jan 2014 05:20:12 +0000 Subject: Don't error about permissions on empty staging repos (feature #460) --- db-update | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db-update b/db-update index 2d4f28a..b9b8015 100755 --- a/db-update +++ b/db-update @@ -23,11 +23,11 @@ done # check if packages are valid for repo in ${repos[@]}; do - if ! check_repo_permission "${repo}"; then - die "You don't have permission to update packages in ${repo}" - fi pkgs=($(getpkgfiles "${STAGING}/${repo}/"*${PKGEXT})) if [ $? -eq 0 ]; then + if [ ${#pkgs[@]} -gt 0 ] && ! check_repo_permission "${repo}"; then + die "You don't have permission to update packages in ${repo}" + fi for pkg in ${pkgs[@]}; do if [ -h "${pkg}" ]; then die "Package ${repo}/$(basename ${pkg}) is a symbolic link" @@ -92,4 +92,4 @@ while read -r file; do mkdir -p -- "${pub%/*}" mv -vn "$file" "$pub" fi -done < <(find other -type f) +done < <(find other sources -type f) -- cgit v1.1-4-g5e80 From 725ab5d12375dd593c375b1a494021bb96135d4f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 8 Jan 2014 00:30:36 -0500 Subject: db-update: remove 'other' from repo blacklist now that issue #460 is added --- db-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db-update b/db-update index b9b8015..1fddb8a 100755 --- a/db-update +++ b/db-update @@ -9,7 +9,7 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty ! -name other -printf '%f ' 2>/dev/null)) +repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty -printf '%f ' 2>/dev/null)) if [ $? -ge 1 ]; then die "Could not read ${STAGING}" fi -- cgit v1.1-4-g5e80