This file is indexed.

/usr/bin/pbuild is in pbuilder-scripts 19.

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
#!/bin/sh
# -*- indent-tabs-mode: t; tab-width: 2 -*-
#
# Copyright 2009 Canonical Ltd
#
# 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, version 3 of the License.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

. /usr/share/pbuilder-scripts/pfuncs
setup_all $*

extra_args=""
bin_only="false"

for arg in $*; do
	if [ $arg = "--source" ]; then
		extra_args="$extra_args -S"
	elif [ $arg = "--binary-only" ]; then
		bin_only="true"
	elif [ $arg = "--debug" ]; then
		extra_args="$extra_args --set-envvar=DEB_BUILD_OPTIONS=debug,nostrip,noopt"
	elif [ $arg = "--help" ]; then
		echo "Usage: pbuild [--source, --debug, --help] [PROJECT]"
		echo "       You must be in the source directory"
		exit 0
	fi
done

if [ $bin_only = "true" ]; then
	debuild_args="-b $extra_args"
	pdebuild_args="--use-pdebuild-internal" # oddly, normal pdebuild explicitly forces source
else
	debuild_args="-i -I -sa $extra_args"
	pdebuild_args=""
fi

# Let builddir just be '..', since it's hard to say where we should put it.
# If the user's PBUILDER_SRCDIR_FORMAT is pkg, we'd have to guess package name
# from current directory, and I don't want to go there.  This is easier.
builddir=..

pdebuild --buildresult "$builddir" $pdebuild_args \
         --debbuildopts "\"$debuild_args\"" -- \
			   --basetgz "/var/cache/pbuilder/$proj.tgz" \
         --hookdir "/usr/share/pbuilder-scripts/hooks"