This file is indexed.

/usr/bin/pkgos-alioth-new-git is in openstack-pkg-tools 54.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh

set -e

CWD=`pwd`
PKG_NAME=`basename ${CWD}`

usage () {
	echo "$0 creates a new Git repository out of your current working tree on alioth."
	echo "You must be at the root of that local git repository"
	echo "$0 will use the current folder as the name for the Alioth git repository."
	echo ""
	echo "Usage: $0 [-u <alioth-username>] <destination-project-path-on-alioth>"
	echo "example: $0 openstack will create a /git/openstack/${PKG_NAME}.git repository"
	echo "note that you will need to have write access on the destination project,"
	echo "which means you must be a member of that said project on Alioth."
	echo ""
	echo "Please send patch/comments to: Thomas Goirand <zigo@debian.org>"
	exit 1
}

if [ "${1}" = "-u" ] || [ "${2}" = "-u" ]; then
	if [ $# != 3 ] ; then
		usage
	fi
	if [ "${1}" = "-u" ] ; then
		# Case were we have $0 -u USERNAME DEST_REPO
		ALIOTH_USERNAME=${2}
		DEST_PROJECT=${3}
	else
		# Case were we have $0 DEST_REPO -u USERNAME
		DEST_PROJECT=${1}
		ALIOTH_USERNAME=${3}
	fi
else
	if [ $# != 1 ] ; then
		usage
	fi
	DEST_PROJECT=$1
fi

if [ -n "${ALIOTH_USERNAME}" ] ; then
	ALIOTH_USERNAME="${ALIOTH_USERNAME}@"
fi

# Create the tarball and upload it to Alioth
cd ..
echo "===> Cloning ${PKG_NAME} as bare: ${PKG_NAME}.git"
if ! [ -e ${PKG_NAME}.git ] ; then
	git clone --bare ${PKG_NAME} ${PKG_NAME}.git
fi
echo "===> Building tarball: ${PKG_NAME}.git.tar.gz"
if ! [ -e ${PKG_NAME}.git.tar.gz ] ; then
	tar -czf ${PKG_NAME}.git.tar.gz ${PKG_NAME}.git
fi
echo "===> Uploading ${PKG_NAME}.git.tar.gz to git.debian.org"
rsync --partial --progress --rsh=ssh ${PKG_NAME}.git.tar.gz ${ALIOTH_USERNAME}git.debian.org:

# Uncompress it on Alioth, fix perms and hook
ssh ${ALIOTH_USERNAME}git.debian.org "cd /git/${DEST_PROJECT} && echo '===> Uncompressing ${PKG_NAME}.git.tar.gz in /git/${DEST_PROJECT}' && tar -xzf ~/${PKG_NAME}.git.tar.gz && echo '===> Activating update-server-info hook' &&  mv ${PKG_NAME}.git/hooks/post-update.sample ${PKG_NAME}.git/hooks/post-update && cd /git/${DEST_PROJECT}/${PKG_NAME}.git && git --bare update-server-info && echo '===> Deleting tarball on alioth' && rm ~/${PKG_NAME}.git.tar.gz && echo '===> Fixing g+w unix permissions' && find /git/${DEST_PROJECT}/${PKG_NAME}.git -exec chmod g+w {} \\; && find . -type d -exec chmod g+s {} \\; && git config core.sharedRepository group "
echo "===> Cleaning local bare copy and tarball"
rm ${PKG_NAME}.git.tar.gz
rm -rf ${PKG_NAME}.git