This file is indexed.

/usr/bin/dh_make_pgxs is in postgresql-server-dev-all 190.

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
#!/bin/bash

# (C) 2015-2017 Christoph Berg <myon@debian.org>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.

set -eu

# basic variables

template_dir="/usr/share/postgresql-common/dh_make_pgxs/debian"
DIRECTORY="$(basename $PWD)"
NAME="${DIRECTORY%-*}" # Upstream name
VERSION="${DIRECTORY##*-}"

# options

while getopts "fn:v:" opt ; do
    case $opt in
        f) FORCE=yes ;;
        n) NAME="$OPTARG" ;;
        v) VERSION="$OPTARG" ;;
        *) exit 5 ;;
    esac
done
shift $((OPTIND - 1)) # shift away args

# more variables

SOURCE="${NAME//_/-}" # Debian name
EXTNAME="$(echo $SOURCE | sed -e 's/^\(postgresql\|pgsql\|pg\)-//')" # binary package name suffix
COMPAT="$(apt-cache show debhelper | sed -n 's/Version: \([0-9]*\)\..*/\1/p' | head -n1)"
STANDARDS_VERSION="$(apt-cache show debian-policy | sed -n 's/Version: \(.*\)\..*/\1/p' | head -n1)"
USERNAME=${LOGNAME:-${USER:-root}}
MAINTAINER_NAME=$(getent passwd $USERNAME | cut -d : -f 5 | sed -e 's/,.*//')
: ${DEBEMAIL:=$USERNAME@localhost}

echo "Upstream: $NAME ($VERSION)"
echo "Debian:   $SOURCE ($VERSION-1)"
echo "Binaries: postgresql-PGVERSION-$EXTNAME ($VERSION-1)"
echo "Uploader: $MAINTAINER_NAME <$DEBEMAIL>"
echo
if [ -t 0 ]; then
    echo -n "Press Enter to continue, ^C to abort "
    read
fi

# install files

install_dir ()
{
    local directory="debian/$1"
    #[ -z "$directory" ] && return
    [ -d "$directory" ] && return
    echo "Creating $directory/"
    mkdir "$directory"
}

install_template ()
{
    local template="$1"

    if [ "${FORCE:-}" ] || ! [ -e debian/$template ]; then
        echo "Installing debian/$template"
        sed -e "s/@COMPAT@/$COMPAT/g" \
            -e "s/@EXTNAME@/$EXTNAME/g" \
            -e "s/@NAME@/$NAME/g" \
            -e "s/@STANDARDS_VERSION@/$STANDARDS_VERSION/g" \
            -e "s/@SOURCE@/$SOURCE/g" \
            -e "s/@MAINTAINER_NAME@/$MAINTAINER_NAME/g" \
            -e "s/@DEBEMAIL@/$DEBEMAIL/g" \
            "$template_dir/$template" > "debian/$template"
        if [ -x $template_dir/$template ]; then
            chmod +x "debian/$template"
        fi
    else
        echo "Keeping existing debian/$template"
    fi
}

mkdir -p debian

for template in $(find $template_dir -mindepth 1 | sort); do
    case $template in
        *.swp|*~) continue ;; # skip vim stuff
    esac
    basename=${template##$template_dir/}
    if [ -d $template ]; then
        install_dir "$basename"
    else
        install_template "$basename"
    fi
done

echo "Updating debian/control from debian/control.in"
pg_buildext updatecontrol

if [ "${FORCE:-}" ] || ! [ -e debian/changelog ]; then
    rm -f debian/changelog
    echo "Creating debian/changelog"
    dch --create --package "$SOURCE" --newversion "$VERSION-1"
else
    echo "Keeping existing debian/changelog"
fi