Debian Codegraph @

debian/patches/1009_build_reproducibly.patch

raw symbols SCIP
1 Description: build reproducibly
2 Author: Bernhard Schmidt <[email protected]>
3 Last-Update: 2022-01-22
4 ---
5 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
6 --- a/build_tools/make_build_h
7 +++ b/build_tools/make_build_h
8 @@ -5,6 +5,14 @@
9 OS=`uname -s`
10 USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}' | sed 's/\\\\/\\\\\\\\/g'`
11 DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
12 +if [ -n "${SOURCE_DATE_EPOCH}" ]; then
13 + # building reproducibly, faking some data
14 + HOSTNAME='buildd.debian.org'
15 + KERNEL='unknown'
16 + MACHINE='unknown'
17 + USER='nobody'
18 + DATE=`date -u "+%Y-%m-%d %H:%M:%S" -d @${SOURCE_DATE_EPOCH}`
19 +fi
20 cat << END
21 /*
22 * build.h
23 --- a/build_tools/make_xml_documentation
24 +++ b/build_tools/make_xml_documentation
25 @@ -201,7 +201,7 @@
26 for subdir in ${mod_subdirs} ; do
27 printf "%s " "${subdir}"
28 subdir_path=$(make_absolute "$subdir")
29 - for i in $(${FIND} "${subdir_path}" -name '*.c' -or -name '*.cc'); do
30 + for i in $(${FIND} "${subdir_path}" -name '*.c' -or -name '*.cc' | LC_ALL=C sort); do
31 if [ "${with_moduleinfo}" -eq "1" ] ; then
32 MODULEINFO=$(${AWK} -f "${source_tree}/build_tools/get_moduleinfo" "${i}")
33 if [ "${MODULEINFO}" != "" ] ; then
34 @@ -228,7 +228,7 @@
35 # Set the module name on specific elements
36 ${SED} -r -e "s/<(manager|managerEvent|managerEventInstance|function|application|info)\s+([^>]+)>/<\1 \2 module=\"${mn}\">/g" "${tmp_output_file}" >> "${output_file}"
37 done
38 - for i in $(${FIND} "${subdir_path}" -name '*.xml') ; do
39 + for i in $(${FIND} "${subdir_path}" -name '*.xml' | LC_ALL=C sort) ; do
40 ${GREP} -q "appdocsxml.dtd" "${i}" || continue
41 if [ "${validate}" -eq "1" ] ;then
42 if [ "${XMLLINT}" != ":" ] ; then