This file is indexed.

/usr/bin/lskpatches is in kernel-patch-scripts 0.99.36+nmu1.

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

KPATCHDIR=/usr/src/kernel-patches
FORMAT='%-20s%-10s%-10s%-12s%s\n'

ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)

DIRS_ALL_ALL=$(ls -d ${KPATCHDIR}/all/apply 2>/dev/null || true)
DIRS_ARCH_ALL=$(ls -d ${KPATCHDIR}/*/apply 2>/dev/null | grep -v "^${KPATCHDIR}/all/" || true)
DIRS_ALL_VERS=$(ls -d ${KPATCHDIR}/all/*/apply 2>/dev/null || true)
DIRS_ARCH_VERS=$(ls -d ${KPATCHDIR}/*/*/apply 2>/dev/null | grep -v "^${KPATCHDIR}/all/" || true)

# Note: additional "echo $()" calls used to strip spurious spaces

dhkp_kversions()
{
    echo $(grep ^KVERSIONS $1 | sed 's/^.*(\(.*\))$/\1/')
}

dhkp_version()
{
    local rcs=$(echo $(grep -F 'apply.tmpl $''Revision:' $1 | cut -d'$' -f2 | cut -d: -f2))
    local dhkp=$(grep ^DHPKPATCHES_VERSION= $1 | cut -d= -f2)
    if [ -n "${dhkp}" ]
    then
	# post-woody
	echo ${dhkp}
    elif [ -n "${rcs}" ]
    then
	# woody era
	echo "RCS ${rcs}"
    else
	echo '<not built using dh-kpatches>'
    fi
}

format()
{
    printf ${FORMAT} "$1" "$2" "$3" "$(dhkp_version $1)" "$(dhkp_kversions $1)"
}

# Header
printf ${FORMAT} PatchID Arch KVers dhkpVers dhkp-KVers


for dir in ${DIRS_ALL_ALL}
do
    (
	cd ${dir}
	for kp in $(ls)
	do
	    format ${kp} 'all' 'all'
	done
    )
done

for dir in ${DIRS_ARCH_ALL}
do
    (
	arch=$(basename $(dirname ${dir}))
	cd ${dir}
	for kp in $(ls)
	do
	    format ${kp} ${arch} 'all'
	done
    )
done


for dir in ${DIRS_ALL_VERS}
do
    (
	vers=$(basename $(dirname ${dir}))
	cd ${dir}
	for kp in $(ls)
	do
	    format ${kp} 'all' ${vers}
	done
    )
done


for dir in ${DIRS_ARCH_VERS}
do
    (
	vers=$(basename $(dirname ${dir}))
	arch=$(basename $(dirname $(dirname ${dir})))
	cd ${dir}
	for kp in $(ls)
	do
	    format ${kp} ${arch} ${vers}
	done
    )
done