This file is indexed.

/usr/bin/mh_installsite is in maven-repo-helper 1.9.2.

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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/bash --

# Copyright 2009 Ludovic Claude.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

. /usr/share/maven-repo-helper/mh_lib.sh

syntax()
{
   echo -e "Usage: mh_installsite [option]... [pom] [site-file]"
   echo -e "Installs the site.xml file in /usr/share/maven-repo, at the correct location for"
   echo -e "Maven."
   echo -e ""
   echo -e "Where"
   echo -e "\t[pom] is the location of the POM associated with the site.xml file to install."
   echo -e "\t  GroupId, artifactId and version will be extracted from this file."
   echo -e "\t[site-file] is the location of the site.xml to install."
   echo -e "Options:"
   echo -e "\t-h --help: show this text"
   echo -e "\t-V --version: show the version"
   echo -e "\t-p<package> --package=<package>: name of the Debian package which"
   echo -e "\t  will contain the site file"
   echo -e "\t-e<version>, --set-version=<version>: set the version for the artifact,"
   echo -e "\t  do not use the version declared in the POM file."
   echo -e "\t-r<rules> --rules=<rules>: path to the file containing the"
   echo -e "\t  rules to apply when cleaning the POM."
   echo -e "\t  Optional, the default location is debian/maven.rules"
   echo -e "\t  Maven rules are used here to extract the groupId, artifactId"
   echo -e "\t  and version from the POM file."
   echo -e "\t-v --verbose: show more information while running"
   echo -e "\t-n --no-act: don't actually do anything, just print the results"
   echo -e "\t--skip-clean-pom: don't clean the pom, assume that a previous action ran"
   echo -e "\t  mh_cleanpom with the correct options. mh_cleanpom is run only to extract"
   echo -e "\t  the groupId, artifactId and version of the jar"
   echo -e ""
   echo -e "See also: mh_installpom(1), mh_installjar(1)"
   exit 1
}

# The following elements are options which just need to be ignored: no-parent has-package-version keep-elements ignore-pom classifier
ARGS="p package e set-version r rules l java-lib n usj-name i usj-version s no-usj-versionless d dest-jar c classifier v verbose n no-act skip-clean-pom no-parent has-package-version keep-elements ignore-pom classifier" parseargs "$@"

if [ "$ARGC" -lt "2" ]; then
   syntax
fi

SETVERSION=$(getarg e set-version)
RULES=$(getarg r rules)
PACKAGE=$(getarg p package)
PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"}
VERBOSE=$(getarg v verbose)
NOACT=$(getarg n no-act)
SKIP_CLEAN_POM=$(getarg skip-clean-pom)
POM="${ARGV[0]}"
SITE_FILE="${ARGV[1]}"

DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}"
CLEAN_ARGS="--package=${PACKAGE} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES}"

mkdir -p debian/.mh 2> /dev/null

if [ -z "$SKIP_CLEAN_POM" ]; then
    if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then
        echo -e "\tmh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties"
    fi

    mh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties
fi

source debian/.mh/pom.properties

groupPath=$(echo $groupId | tr . / )

if [ ! -e $SITE_FILE ]; then
    echo "Cannot find the site.xml file to install: $SITE_FILE"
    exit 2
fi

VERSIONED_SITE_NAME="${artifactId}-${version}-site.xml"
DEBIAN_SITE_NAME="${artifactId}-${debianVersion}-site.xml"

MVN_VERSIONED_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${version}
MVN_DEBIAN_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${debianVersion}

install_site ()
{
	local srcSite=$1
	local destDir=$2
	local destSite=$3

	if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then
		echo "mh_installsite: Install $srcSite to $destDir $destSite"
	fi

    cp ${srcSite} debian/.mh/${destSite}
	if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then
		echo -e "\tinstall -m 644 -D debian/.mh/${destSite} debian/${PACKAGE}/${destDir}/${destSite}"
	fi
	install -m 644 -D debian/.mh/${destSite} debian/${PACKAGE}/${destDir}/${destSite}
}

# Install site.xml in the Maven repository
install_site "$SITE_FILE" "$MVN_VERSIONED_DIR" "$VERSIONED_SITE_NAME"

if [[ "${version}" != "${debianVersion}" ]]; then
	install_site "$SITE_FILE" "$MVN_DEBIAN_DIR" "$DEBIAN_SITE_NAME"
fi