From fc6a6ab07bde03c7f20d5a4ed971f8e699ee9b20 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 26 Mar 2011 14:13:57 +0100 Subject: Use repo-add to create the files database for each repo --- cron-jobs/create-filelists | 101 --------------------------------------------- 1 file changed, 101 deletions(-) delete mode 100755 cron-jobs/create-filelists (limited to 'cron-jobs') diff --git a/cron-jobs/create-filelists b/cron-jobs/create-filelists deleted file mode 100755 index 8bcfc0b..0000000 --- a/cron-jobs/create-filelists +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -. "$(dirname $0)/../db-functions" -. "$(dirname $0)/../config" - -script_lock - -for repo in ${PKGREPOS[@]}; do - for arch in ${ARCHES[@]}; do - repo_lock ${repo} ${arch} || exit 1 - done -done - -#adjust the nice level to run at a lower priority -renice +10 -p $$ > /dev/null - -for repo in ${PKGREPOS[@]}; do - for arch in ${ARCHES[@]}; do - repodb="${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT}" - filedb="${FTP_BASE}/${repo}/os/${arch}/${repo}${FILESEXT}" - - if [ ! -f "${repodb}" ]; then - continue - fi - # get a list of package files defined in the repo db - mkdir -p "${WORKDIR}/db-dir-${repo}-${arch}" - bsdtar -xf "${repodb}" -C "${WORKDIR}/db-dir-${repo}-${arch}" - # This should actualy be faster than reading all the just extracted files - bsdtar -xOf "${repodb}" | awk '/^%FILENAME%/{getline;print}' | sort > "${WORKDIR}/db-${repo}-${arch}" - - # get a list of package files defined in the files db - mkdir -p "${WORKDIR}/files-current-dir-${repo}-${arch}" - if [ ! -f "${filedb}" ]; then - touch "${WORKDIR}/files-${repo}-${arch}" - else - bsdtar -xf "${filedb}" -C "${WORKDIR}/files-current-dir-${repo}-${arch}" - bsdtar -xOf "${filedb}" | awk '/^%FILENAME%/{getline;print}' | sort > "${WORKDIR}/files-${repo}-${arch}" - fi - done -done - -case "${FILESEXT}" in - *.gz) TAR_OPT="z" ;; - *.bz2) TAR_OPT="j" ;; - *.xz) TAR_OPT="J" ;; - *) die "Unknown compression type for FILESEXT=${FILESEXT}" ;; -esac - -for repo in ${PKGREPOS[@]}; do - for arch in ${ARCHES[@]}; do - filedb="${FTP_BASE}/${repo}/os/${arch}/${repo}${FILESEXT}" - - if [ ! -f "${WORKDIR}/db-${repo}-${arch}" ]; then - # remove any files db that might be in this empty repo - if [ -f "${filedb}" ]; then - rm -f "${filedb}" - fi - continue - fi - - # Check if updating the files db is needed - if ! diff -q "${WORKDIR}/db-${repo}-${arch}" "${WORKDIR}/files-${repo}-${arch}" >/dev/null; then - mkdir -p "${WORKDIR}/files-new-dir-${repo}-${arch}" - - # Include all unchanged file lists - # Note: deleted packages are implicitly excluded - for f in $(comm -12 "${WORKDIR}/db-${repo}-${arch}" "${WORKDIR}/files-${repo}-${arch}"); do - mv "${WORKDIR}/files-current-dir-${repo}-${arch}/${f%*-*${PKGEXT}}" \ - "${WORKDIR}/files-new-dir-${repo}-${arch}" - done - - # Create file lists for new packages - for f in $(comm -23 "${WORKDIR}/db-${repo}-${arch}" "${WORKDIR}/files-${repo}-${arch}"); do - tdir="${WORKDIR}/files-new-dir-${repo}-${arch}/${f%*-*${PKGEXT}}" - mkdir "${tdir}" - echo '%FILES%' > "${tdir}/files" - bsdtar --exclude=.* -tf "${FTP_BASE}/${repo}/os/${arch}/${f}" >> "${tdir}/files" - - # add desc and depends file from db - dbdir="${WORKDIR}/db-dir-${repo}-${arch}/${f%*-*${PKGEXT}}" - mv "${dbdir}/desc" "${tdir}/desc" - mv "${dbdir}/depends" "${tdir}/depends" - done - - # Create the actual file db - pushd "${WORKDIR}/files-new-dir-${repo}-${arch}" >/dev/null - bsdtar -c${TAR_OPT}f "${WORKDIR}/${arch}-${repo}${FILESEXT}" * - popd >/dev/null - mv -f "${WORKDIR}/${arch}-${repo}${FILESEXT}" "${filedb}" - ln -sf "${repo}${FILESEXT}" "${filedb%.tar.*}" - fi - done -done - -for repo in ${PKGREPOS[@]}; do - for arch in ${ARCHES[@]}; do - repo_unlock ${repo} ${arch} - done -done - -script_unlock -- cgit v1.2.3-54-g00ecf From 9abfc4fe1d3e31bc7bd03287029aacd8287ce6ee Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 1 Apr 2011 22:14:52 +0200 Subject: Recompiled alpm python module against pacman 3.5 --- cron-jobs/check_archlinux/alpm.so | Bin 7166 -> 7190 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/check_archlinux/alpm.so b/cron-jobs/check_archlinux/alpm.so index 50f0f97..72f737e 100755 Binary files a/cron-jobs/check_archlinux/alpm.so and b/cron-jobs/check_archlinux/alpm.so differ -- cgit v1.2.3-54-g00ecf From a7b293ad4d819fa77592818af27f7c2a3b9b2ca4 Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Fri, 1 Apr 2011 00:54:57 +0200 Subject: Add signature files to update/move/remove targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signature files are optional and the previous behaviour is unchanged when signatures files do not exist. Signed-off-by: Rémy Oudompheng Signed-off-by: Pierre Schmitz --- cron-jobs/ftpdir-cleanup | 10 ++++++++-- db-move | 3 +++ db-update | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index 09e8a49..bb1661a 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -10,9 +10,12 @@ clean_pkg() { if ! ${CLEANUP_DRYRUN}; then for pkg in "$@"; do if [ -h "$pkg" ]; then - rm -f "$pkg" + rm -f "$pkg" "$pkg.sig" else mv -f "$pkg" "$CLEANUP_DESTDIR" + if [ -e "$pkg.sig" ]; then + mv -f "$pkg.sig" "$CLEANUP_DESTDIR" + fi touch "${CLEANUP_DESTDIR}/$(basename ${pkg})" fi done @@ -100,7 +103,10 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then msg "Removing old packages from the cleanup directory..." for old_pkg in ${old_pkgs[@]}; do msg2 "${old_pkg}" - ${CLEANUP_DRYRUN} || rm -f "${CLEANUP_DESTDIR}/${old_pkg}" + if ! ${CLEANUP_DRYRUN}; then + rm -f "${CLEANUP_DESTDIR}/${old_pkg}" + rm -f "${CLEANUP_DESTDIR}/${old_pkg}.sig" + fi done fi diff --git a/db-move b/db-move index ced90a3..ff1b0e2 100755 --- a/db-move +++ b/db-move @@ -96,6 +96,9 @@ for pkgbase in ${args[@]:2}; do cp ${pkgpath} ${FTP_BASE}/${PKGPOOL} fi ln -s "../../../${PKGPOOL}/${pkgfile}" ${ftppath_to}/${tarch}/ + if [ -f ${FTP_BASE}/${PKGPOOL}/${pkgfile}.sig ]; then + ln -s "../../../${PKGPOOL}/${pkgfile}.sig" ${ftppath_to}/${tarch}/ + fi add_pkgs[${tarch}]+="${FTP_BASE}/${PKGPOOL}/${pkgfile} " remove_pkgs[${tarch}]+="${pkgname} " done diff --git a/db-update b/db-update index 5bdce5e..4b9c78f 100755 --- a/db-update +++ b/db-update @@ -64,6 +64,13 @@ for repo in ${repos[@]}; do mv "${pkg}" "$FTP_BASE/${PKGPOOL}" fi ln -s "../../../${PKGPOOL}/${pkgfile}" "$FTP_BASE/$repo/os/${pkgarch}" + # also move signatures + if [ -f "${pkg}.sig" ]; then + mv "${pkg}.sig" "$FTP_BASE/${PKGPOOL}" + fi + if [ -f "$FTP_BASE/${PKGPOOL}/${pkgfile}.sig" ]; then + ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}" + fi add_pkgs[${#add_pkgs[*]}]=${pkgfile} done if [ ${#add_pkgs[@]} -ge 1 ]; then -- cgit v1.2.3-54-g00ecf