summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rwxr-xr-xDocumentation/maintainers/metadata-mirror-update.sh51
-rwxr-xr-xDocumentation/maintainers/metadata-sync12
-rwxr-xr-xDocumentation/maintainers/sync-gentoo-overlay.sh67
-rwxr-xr-xDocumentation/maintainers/sync-metadata.sh12
4 files changed, 79 insertions, 63 deletions
diff --git a/Documentation/maintainers/metadata-mirror-update.sh b/Documentation/maintainers/metadata-mirror-update.sh
deleted file mode 100755
index fc2b7b76d5f..00000000000
--- a/Documentation/maintainers/metadata-mirror-update.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# Run this script via cronjob to update your metadata mirror
-
-METADATA_MIRROR_DIR=/path/to/your/mirror/dir
-
-# METADATA_MIRROR_DIR must contain:
-# * a folder $overlay/ for each overlay you intent to mirror.
-# * a folder cache/ to store the cache of all overlays.
-# (so it is not mixed with the cache of your system portage-trees)
-# METADATA_MIRROR_DIR/$overlay/ must contain:
-# * a file etc/make.conf with following contents:
-# PORTDIR=/your/portage/directory
-# PORTDIR_OVERLAY=/path/to/your/mirror/dir/$overlay/repo
-# FEATURES="${FEATURES} userpriv userfetch usersandbox usersync metadata-transfer"
-# * a directory repo/ containing the checked out repository you want to create metadata from.
-# For speed reasons it is advisable to have a file etc/portage/modules containing:
-# portdbapi.auxdbmodule = portage.cache.sqlite.database
-
-die() {
- echo "USAGE: $0 <overlay>" 1>&2
- echo "ERROR: $@" 1>&2
- exit 255
-}
-
-[[ "$1" ]] || die 'overlay'
-overlay="$1" ; shift
-
-if [ -e "$METADATA_MIRROR_DIR/$overlay/repo/.svn" ] ; then
- type=svn
-elif [ -e "$METADATA_MIRROR_DIR/$overlay/repo/.git" ] ; then
- type=git
-else
- die "Unable to determine overlay type for $overlay"
-fi
-
-cd $METADATA_MIRROR_DIR/$overlay/repo || cd "failed to cd to $METADATA_MIRROR_DIR/$overlay/repo"
-
-case "$type" in
- svn)
- svn cleanup && svn update --force --config-option=config:miscellany:use-commit-times=yes || die 'svn update failed'
- ;;
- git)
- git pull || die 'git update failed'
- /usr/local/bin/git-set-file-times || die 'setting file times failed'
- ;;
- *)
- die "Unsupported overlay type '$type' for $overlay"
-esac
-
-exec egencache --config-root=$METADATA_MIRROR_DIR/$overlay/ --cache-dir=$METADATA_MIRROR_DIR/cache/ --repo=$overlay --update
diff --git a/Documentation/maintainers/metadata-sync b/Documentation/maintainers/metadata-sync
deleted file mode 100755
index cd0c0fe8c69..00000000000
--- a/Documentation/maintainers/metadata-sync
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# Contact: devurandom
-METADATA_MIRROR=rsync://gentoo.kynes.de:800/gentoo-metadata-kde/
-
-if [[ "$(basename $(pwd))" == "Documentation" ]] ; then
- echo "Syncing KDE overlay metadata ..."
- exec rsync --quiet --recursive --times --compress --delete-delay $METADATA_MIRROR ../metadata/cache/
-else
- echo "ERROR: This script is meant to be run from within Documentation/ !"
- exit 255
-fi
diff --git a/Documentation/maintainers/sync-gentoo-overlay.sh b/Documentation/maintainers/sync-gentoo-overlay.sh
new file mode 100755
index 00000000000..ea28c8e8329
--- /dev/null
+++ b/Documentation/maintainers/sync-gentoo-overlay.sh
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+# Run this script via cronjob to update your overlay mirror
+
+OVERLAY_MIRROR_DIR=/var/gentoo/overlays
+
+# OVERLAY_MIRROR_DIR must contain:
+# * a folder $overlay/ for each overlay you intent to mirror.
+# * a folder cache/ to store the cache of all overlays.
+# (so it is not mixed with the cache of your system portage-trees)
+# OVERLAY_MIRROR_DIR/$overlay/ must contain:
+# * a file etc/make.conf with following contents:
+# PORTDIR=/your/portage/directory
+# PORTDIR_OVERLAY=/path/to/your/mirror/dir/$overlay/repo
+# FEATURES="${FEATURES} userpriv userfetch usersandbox usersync metadata-transfer"
+# * a directory repo/ containing the checked out overlay repository
+# For speed reasons it is advisable to have a file etc/portage/modules containing:
+# portdbapi.auxdbmodule = portage.cache.sqlite.database
+
+die() {
+ echo "USAGE: $0 <overlay>" 1>&2
+ echo "ERROR: $@" 1>&2
+ exit 1
+}
+
+[[ "$1" ]] || die 'overlay'
+overlay="$1" ; shift
+
+overlay_name="$(< $OVERLAY_MIRROR_DIR/$overlay/repo/profiles/repo_name)"
+[[ "$overlay_name" ]] || die 'overlay_name'
+
+if [ -e "$OVERLAY_MIRROR_DIR/$overlay/repo/.svn" ] ; then
+ type=svn
+elif [ -e "$OVERLAY_MIRROR_DIR/$overlay/repo/.git" ] ; then
+ type=git
+else
+ die "Unable to determine overlay type for $overlay"
+fi
+
+cd $OVERLAY_MIRROR_DIR/$overlay/repo || cd "failed to cd to $OVERLAY_MIRROR_DIR/$overlay/repo"
+
+echo 'Updating overlay ...'
+case "$type" in
+ svn)
+ [ -e metadata/layout.conf ] && svn revert metadata/layout.conf
+ svn cleanup || die 'svn cleanup failed'
+ svn update --force --config-option=config:miscellany:use-commit-times=yes || die 'svn update failed'
+ ;;
+ git)
+ [ -e metadata/layout.conf ] && git checkout metadata/layout.conf
+ git pull || die 'git update failed'
+ /usr/local/bin/git-set-file-times || die 'setting file times failed'
+ ;;
+ *)
+ die "Unsupported overlay type '$type' for $overlay"
+esac
+
+export PORTAGE_CONFIGROOT=$OVERLAY_MIRROR_DIR/$overlay PORTAGE_DEPCACHEDIR=$OVERLAY_MIRROR_DIR/cache
+
+echo 'Enforcing full manifests ...'
+#sed -e 's/^thin-manifests.*/thin-manifests = false/' -i metadata/layout.conf || die 'patching layout.conf failed'
+
+echo 'Generating manifests ...'
+#repoman manifest || die 'generating manifests failed'
+
+echo 'Generating metadata caches ...'
+egencache --config-root=$PORTAGE_CONFIGROOT --cache-dir=$PORTAGE_DEPCACHEDIR --repo=$overlay_name --update
diff --git a/Documentation/maintainers/sync-metadata.sh b/Documentation/maintainers/sync-metadata.sh
new file mode 100755
index 00000000000..d02fee4c375
--- /dev/null
+++ b/Documentation/maintainers/sync-metadata.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Contact: devurandom
+METADATA_MIRROR=rsync://gentoo.kynes.de:800/gentoo-overlay-kde/metadata/cache/
+
+if [[ "$(basename $(pwd))" != "Documentation" ]] ; then
+ echo "ERROR: This script is meant to be run from within Documentation/ !"
+ exit 1
+fi
+
+echo "Syncing KDE overlay metadata ..."
+exec rsync --quiet --recursive --times --compress --delete-delay $METADATA_MIRROR ../metadata/cache/