diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-05-10 12:42:46 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-05-10 12:42:46 -0400 |
commit | 5189a00cd7e3cc415f13fb8aa867fd7c8c6711fa (patch) | |
tree | 64d4777c1fee63b11b6a2f2b3490ea69a6c9ee2f | |
parent | 98c2c92392d2acb9cf004b135d00087d35dca721 (diff) |
db-import-pkg: Don't bother with hardlinking prior to sync_repo
When implementing 8393137cd49de14f0f74caee8e93fa43ca881e2b, I had thought
that being able to create a hardlink-shadow of the repo was necessary to
avoid huge amounts of extra network traffic. Creating hardlinks required
TMPDIR to be on the same filesystem as FTP_BASE.
However, I now realize that sync_repo *only* syncs symlinks, which are
cheap, network-wise.
So, partially revert "db-import-pkg: Don't do any work directly in $FTP_BASE/$repo or $WORKDIR/rsync"
Revert the bit that created hardlinks, and revert the changes to TMPDIR.
-rw-r--r-- | config | 4 | ||||
-rwxr-xr-x | db-import-pkg | 3 | ||||
-rw-r--r-- | systemd/db-import@.service | 2 |
3 files changed, 3 insertions, 6 deletions
@@ -22,9 +22,7 @@ SOURCE_CLEANUP_KEEP=30 LOCK_DELAY=10 [ -n "${STAGING:-}" ] || STAGING="$HOME/staging/unknown/staging" -#export TMPDIR="/tmp" -export TMPDIR=/srv/repo/tmp -mkdir -p "$TMPDIR" +export TMPDIR="/tmp" ARCHES=(x86_64 i686 armv7h) DBEXT=".db.tar.gz" FILESEXT=".files.tar.gz" diff --git a/db-import-pkg b/db-import-pkg index 2cdb3f3..f56c671 100755 --- a/db-import-pkg +++ b/db-import-pkg @@ -356,9 +356,6 @@ main() { # later sync_pool() all packages whitelists+=("${WORKDIR}/${_tag}.whitelist") # Get repo packages (symlinks) - mkdir -p "${WORKDIR}/staging-rsync/${_repo}/os/${_arch}" - ln -t "${WORKDIR}/staging-rsync/${_repo}/os/${_arch}" \ - "${FTP_BASE}/${_repo}/os/${_arch}"/* sync_repo \ "${ARCHMIRROR_fullmodule}/$(get_repo_dir "${_repo}" "${_arch}")/" \ "${WORKDIR}/${_tag}.whitelist" \ diff --git a/systemd/db-import@.service b/systemd/db-import@.service index f8d0679..884d4af 100644 --- a/systemd/db-import@.service +++ b/systemd/db-import@.service @@ -8,3 +8,5 @@ Type=oneshot User=repo Environment=DBSCRIPTS_CONFIG=/etc/dbscripts/config.local.%I ExecStart=/usr/bin/db-import-pkg %I + +PrivateTmp=true |