summaryrefslogtreecommitdiff
path: root/Documentation/maintainers
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2011-08-01 14:12:20 +0300
committerTheo Chatzimichos <tampakrap@gentoo.org>2011-08-01 14:12:20 +0300
commitaaddd843c34fc43bfe0bde780dedfb27ec260717 (patch)
tree9cbee06765c945252a3c975199e204ef96817155 /Documentation/maintainers
parent6eddd3008e75192bf2b01daa13c2561865287753 (diff)
downloadkde-aaddd843c34fc43bfe0bde780dedfb27ec260717.tar.gz
kde-aaddd843c34fc43bfe0bde780dedfb27ec260717.tar.bz2
kde-aaddd843c34fc43bfe0bde780dedfb27ec260717.zip
Move scripts into the maintainers dir
Diffstat (limited to 'Documentation/maintainers')
-rwxr-xr-xDocumentation/maintainers/change_slot83
-rwxr-xr-xDocumentation/maintainers/git-hooks-commit-msg33
-rw-r--r--Documentation/maintainers/inherit_fu_pkgs47
-rwxr-xr-xDocumentation/maintainers/metadata-mirror-update.sh51
-rwxr-xr-xDocumentation/maintainers/metadata-sync12
5 files changed, 226 insertions, 0 deletions
diff --git a/Documentation/maintainers/change_slot b/Documentation/maintainers/change_slot
new file mode 100755
index 00000000000..9dc4545bed9
--- /dev/null
+++ b/Documentation/maintainers/change_slot
@@ -0,0 +1,83 @@
+#
+# change_slot script
+#
+# 2008/10/05
+# Jorge Manuel B. S. Vicetto (jmbsvicetto@gentoo.org)
+
+
+###############
+# Constants
+###############
+VDBDIR=$(portageq vdb_path)
+
+
+###############
+# Functions
+###############
+
+# Show options screen
+show_options () {
+
+# Present options
+ echo "Usage: $0 repo old_slot new_slot"
+ echo "repo - The repo name as specified in ${repo}/profiles/repo_name"
+ echo "old_slot - The slot to be replaced"
+ echo "new_slot - The new slot to use"
+ echo "change - really change? [Y] to apply"
+ exit
+}
+
+# Change slot
+change_slot () {
+ sed -e "s/^${OLD_SLOT}$/${NEW_SLOT}/" "${package}/SLOT"
+
+ if [[ ${CHANGE} == "Y" ]]; then
+ sed -i -e "s/^${OLD_SLOT}$/${NEW_SLOT}/" "${package}/SLOT"
+ fi
+}
+
+# Run the vdb
+run_vdb() {
+
+ # Get categories from the VDB
+ categories=$(find "${VDBDIR}" -mindepth 1 -maxdepth 1 -type d)
+ for category in ${categories[@]}; do
+
+ # For each category
+ packages=$(find "${category}" -mindepth 1 -maxdepth 1 -type d)
+ for package in ${packages[@]}; do
+
+ # If the package has no repository, warn the user
+ if [[ ! -e "${package}/repository" ]]; then
+ echo "Warning: $(basename ${package}) was installed from a repo without repo_name"
+ continue
+ fi
+ # If package was installed from the repo
+ name=$(cat ${package}/repository)
+ if [[ "${name}" == "${REPO}" ]]; then
+ echo "package: ${package} - matches ${REPO}"
+ change_slot
+ fi
+ done
+ done
+}
+
+
+###############
+# Get options and commands
+###############
+[[ -z "$*" ]] && show_options
+
+SCRIPT_ARGS="$*"
+REPO="${1}"
+OLD_SLOT="${2}"
+NEW_SLOT="${3}"
+CHANGE="${4}"
+
+if ([[ -z "${REPO}" ]] || [[ -z "${OLD_SLOT}" ]] || [[ -z "${NEW_SLOT}" ]]); then
+ show_options
+fi
+
+echo "You've asked to update all packages from repo ${REPO} in ${VDBDIR} by changing the old_slot (${OLD_SLOT}) to new_slot (${NEW_SLOT})"
+
+run_vdb
diff --git a/Documentation/maintainers/git-hooks-commit-msg b/Documentation/maintainers/git-hooks-commit-msg
new file mode 100755
index 00000000000..374b6cd7d53
--- /dev/null
+++ b/Documentation/maintainers/git-hooks-commit-msg
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# To enable this hook, link it into .git/hooks/commit-msg like this:
+# ln -s ../../Documentation/git-hooks-commit-msg .git/hooks/commit-msg
+
+FILE=$1
+
+die() {
+ echo "Aborting commit: $1"
+ echo "(Your message was saved in $FILE)"
+ exit 1
+}
+
+summary=`head -n1 "$FILE"`
+
+### Enforce first-line summary ###
+if [[ -z `grep '^\[[^]]\+\]' <<< "$summary"` ]] ; then
+ die 'Summary (first line) should start with [changed path]'
+fi
+
+### Enforce usage of repoman ###
+if [[ -n `grep -e '^\[Documentation' <<< "$summary"` ]] ; then
+ # Do not enforce usage of repoman where it makes no sense
+ exit 0
+elif grep '^NO_REPOMAN' "$FILE" >& /dev/null ; then
+ # Allow i-know-what-i-am-doing override
+ sed -i -e '/^NO_REPOMAN/d' "$FILE"
+ exit 0
+elif ! grep '^(Portage version' "$FILE" >& /dev/null ; then
+ die 'Please use repoman to commit'
+fi
+
+exit 0
diff --git a/Documentation/maintainers/inherit_fu_pkgs b/Documentation/maintainers/inherit_fu_pkgs
new file mode 100644
index 00000000000..943965c388e
--- /dev/null
+++ b/Documentation/maintainers/inherit_fu_pkgs
@@ -0,0 +1,47 @@
+The listed packages have moved out of their module into standalone git repos
+and now need to inherit from kde4-base instead of -meta in the live version.
+For now, we use a conditional inherit until we know in which tarballs they're
+going to end up in stable releases.
+
+kde-base/kate
+kde-base/konsole
+kde-base/kwrite
+kde-base/katepart
+
+kde-base/gwenview
+kde-base/kamera
+kde-base/kcolorchooser
+kde-base/kdegraphics-strigi-analyzer
+kde-base/kgamma
+kde-base/koulorpaint
+kde-base/kruler
+kde-base/ksaneplugin
+kde-base/ksnapshot
+kde-base/libkdcraw
+kde-base/libkexiv2
+kde-base/libkipi
+kde-base/libksane
+kde-base/svgpart
+kde-base/thumbnailers
+kde-base/blinken
+kde-base/cantor
+kde-base/kalgebra
+kde-base/kalzium
+kde-base/kanagram
+kde-base/kbruch
+kde-base/kgeography
+kde-base/khangman
+kde-base/kig
+kde-base/kiten
+kde-base/klettres
+kde-base/kmplot
+kde-base/kstars
+kde-base/ktouch
+kde-base/kturtle
+kde-base/kwordquiz
+kde-base/libkdeedu
+kde-base/marble
+kde-base/parley
+kde-base/rocs
+kde-base/step
+
diff --git a/Documentation/maintainers/metadata-mirror-update.sh b/Documentation/maintainers/metadata-mirror-update.sh
new file mode 100755
index 00000000000..fc2b7b76d5f
--- /dev/null
+++ b/Documentation/maintainers/metadata-mirror-update.sh
@@ -0,0 +1,51 @@
+#!/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
new file mode 100755
index 00000000000..cd0c0fe8c69
--- /dev/null
+++ b/Documentation/maintainers/metadata-sync
@@ -0,0 +1,12 @@
+#!/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