Description: build reproducibly Author: Bernhard Schmidt Last-Update: 2022-01-22 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/build_tools/make_build_h +++ b/build_tools/make_build_h @@ -5,6 +5,14 @@ OS=`uname -s` USER=`id | awk -F")" '{print $1}'| awk -F"(" '{print $2}' | sed 's/\\\\/\\\\\\\\/g'` DATE=`date -u "+%Y-%m-%d %H:%M:%S"` +if [ -n "${SOURCE_DATE_EPOCH}" ]; then + # building reproducibly, faking some data + HOSTNAME='buildd.debian.org' + KERNEL='unknown' + MACHINE='unknown' + USER='nobody' + DATE=`date -u "+%Y-%m-%d %H:%M:%S" -d @${SOURCE_DATE_EPOCH}` +fi cat << END /* * build.h --- a/build_tools/make_xml_documentation +++ b/build_tools/make_xml_documentation @@ -201,7 +201,7 @@ for subdir in ${mod_subdirs} ; do printf "%s " "${subdir}" subdir_path=$(make_absolute "$subdir") - for i in $(${FIND} "${subdir_path}" -name '*.c' -or -name '*.cc'); do + for i in $(${FIND} "${subdir_path}" -name '*.c' -or -name '*.cc' | LC_ALL=C sort); do if [ "${with_moduleinfo}" -eq "1" ] ; then MODULEINFO=$(${AWK} -f "${source_tree}/build_tools/get_moduleinfo" "${i}") if [ "${MODULEINFO}" != "" ] ; then @@ -228,7 +228,7 @@ # Set the module name on specific elements ${SED} -r -e "s/<(manager|managerEvent|managerEventInstance|function|application|info)\s+([^>]+)>/<\1 \2 module=\"${mn}\">/g" "${tmp_output_file}" >> "${output_file}" done - for i in $(${FIND} "${subdir_path}" -name '*.xml') ; do + for i in $(${FIND} "${subdir_path}" -name '*.xml' | LC_ALL=C sort) ; do ${GREP} -q "appdocsxml.dtd" "${i}" || continue if [ "${validate}" -eq "1" ] ;then if [ "${XMLLINT}" != ":" ] ; then