mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 13:08:06 +00:00
Do not hardcode release date in man pages
The util/meson-dist-package.sh script hardcodes the date it is run on into the man pages it creates in the dist tarball. This causes pkgdiff to report discrepancies if the util/release-tarball-comparison.sh script is run on a different day than the one the dist tarball was generated on. Fix by using the exact same solution as in BIND 9.20: generating the man page stubs with a @RELEASE_DATE@ placeholder instead of a specific date and only replacing that placeholder with a specific date during the build process.
This commit is contained in:
parent
08814b10a1
commit
25e0fade1c
17
meson.build
17
meson.build
@ -1632,15 +1632,30 @@ alias_target('system-test-dependencies', system_test_targets)
|
|||||||
|
|
||||||
alias_target('doc-misc', doc_misc_targets)
|
alias_target('doc-misc', doc_misc_targets)
|
||||||
|
|
||||||
|
get_release_date = '''
|
||||||
|
import os
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
changelog_mtime = os.path.getmtime("doc/arm/changelog.rst")
|
||||||
|
release_date = datetime.date.fromtimestamp(changelog_mtime)
|
||||||
|
print(release_date, end="")
|
||||||
|
'''
|
||||||
|
|
||||||
if doc_opt.allowed()
|
if doc_opt.allowed()
|
||||||
|
release_date = ''
|
||||||
|
if python.found()
|
||||||
|
release_date = run_command(python, ['-c', get_release_date], check: true).stdout()
|
||||||
|
endif
|
||||||
|
|
||||||
man_srcconf = man_srcset.apply(config, strict: false)
|
man_srcconf = man_srcset.apply(config, strict: false)
|
||||||
foreach man : man_srcconf.sources()
|
foreach man : man_srcconf.sources()
|
||||||
man_pages += configure_file(
|
man_pages += configure_file(
|
||||||
input: man,
|
input: man,
|
||||||
output: fs.stem(man),
|
output: fs.stem(man),
|
||||||
configuration: {
|
configuration: {
|
||||||
'SYSCONFDIR': sysconfdir,
|
'RELEASE_DATE': release_date,
|
||||||
'RUNSTATEDIR': runstatedir,
|
'RUNSTATEDIR': runstatedir,
|
||||||
|
'SYSCONFDIR': sysconfdir,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -35,7 +35,7 @@ generate_man_pages() {
|
|||||||
-b man \
|
-b man \
|
||||||
-D "release=${MESON_PROJECT_VERSION}" \
|
-D "release=${MESON_PROJECT_VERSION}" \
|
||||||
-D "version=${MESON_PROJECT_VERSION}" \
|
-D "version=${MESON_PROJECT_VERSION}" \
|
||||||
-D "today_fmt=%Y-%m-%d" \
|
-D "today=@RELEASE_DATE@" \
|
||||||
-d "${MESON_BUILD_ROOT}/dist-man-buildroot" \
|
-d "${MESON_BUILD_ROOT}/dist-man-buildroot" \
|
||||||
-c "${MESON_SOURCE_ROOT}/doc/man" \
|
-c "${MESON_SOURCE_ROOT}/doc/man" \
|
||||||
"${MESON_SOURCE_ROOT}/doc/man" \
|
"${MESON_SOURCE_ROOT}/doc/man" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user