Skip to content

Commit

Permalink
Neuter our PACKAGE_URL in SNMP code builds, update release docs [#1949
Browse files Browse the repository at this point in the history
]

Merge branch 'issue-1949-url' as PR #2563

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 29, 2024
2 parents 4503f23 + 235bc94 commit 3e35f5b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,17 @@ VERSION_DEFAULT: dummy-stamp
CLEANFILES += VERSION_DEFAULT.tmp
EXTRA_DIST += VERSION_DEFAULT

# Best-effort delivery for (overly?) customized distros, e.g. via
# echo NUT_VERSION_FORCED_SEMVER=1.1.1 > VERSION_FORCED_SEMVER
dist-hook:
for D in "$(abs_top_srcdir)" "$(abs_top_builddir)" ; do \
for F in VERSION_FORCED VERSION_FORCED_SEMVER ; do \
if [ -s "$$D/$$F" ] ; then \
cat "$$D/$$F" > "$(top_distdir)/$$F" || true ; \
fi ; \
done ; \
done

# This target adds syntax-checking for committed shell script files,
# to avoid surprises and delays in finding fatal typos after packaging
###
Expand Down
18 changes: 14 additions & 4 deletions docs/maintainer-guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ MAINTAINER SANDBOX (to be completed and pushed)
* commit these finishing touches

* bump the release identification:
** update version to <exact incremented version> (ex: 2.8.0) in `configure.ac`
** update the fallback `NUT_DEFAULT_VERSION` in `tools/gitlog2version.sh` to
<exact incremented version> (ex: `2.8.0`), and provide the `VERSION_FORCED`
and `VERSION_FORCED_SEMVER` files (to same effect but more explicitly and
visibly) to be added to the `dist` archive tarball file
*** Experiment if still needed: update version to <exact incremented version>
(ex: 2.8.0) in `configure.ac`, or if the script bump above + git tagging
would suffice:
----
:; git commit -sm 'configure.ac: update AC_INIT for NUT v2.8.0 release`
----
Expand Down Expand Up @@ -149,9 +155,9 @@ MAINTAINER SANDBOX (to be completed and pushed)
make -j 8 spellcheck && \
make -j 8 distcheck
----
* create a GPG-signed tag v<incremented version> (ex: v2.8.0):
* create an annotated GPG-signed tag v<incremented version> (ex: `v2.8.0`):
----
:; git tag -sm 'Release NUT v2.8.0' v2.8.0
:; git tag -asm 'Release NUT v2.8.0' v2.8.0
----
** in case of second thoughts, `git tag -d v2.8.0` and retry later
** try to avoid adding signed tags later (ex. v2.8.0-signed) to avoid the
Expand All @@ -166,7 +172,11 @@ MAINTAINER SANDBOX (to be completed and pushed)
then) to store the source tarball, checksum and signature files

* post-release update of the "in-development" codebase:
** maybe update nut/configure.ac version to <incremented version>.1 (ex: 2.8.0.1)
** update the fallback `NUT_DEFAULT_VERSION` in `tools/gitlog2version.sh` to
<incremented version>.1 (ex: `2.8.0.1`); remove the `VERSION_FORCED`
and `VERSION_FORCED_SEMVER` files
*** maybe update nut/configure.ac version to <incremented version>.1
(ex: `2.8.0.1`):
----
:; git commit -sm 'configure.ac: bump AC_INIT to development version 2.8.0.1'
----
Expand Down
4 changes: 4 additions & 0 deletions drivers/snmp-ups.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
#undef PACKAGE_TARNAME
#endif

#ifdef PACKAGE_URL
#undef PACKAGE_URL
#endif

#ifdef HAVE_DMALLOC_H
#undef HAVE_DMALLOC_H
#endif
Expand Down
4 changes: 4 additions & 0 deletions tools/nut-scanner/scan_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ int nutscan_unload_snmp_library(void);
# undef PACKAGE_TARNAME
#endif

#ifdef PACKAGE_URL
# undef PACKAGE_URL
#endif

#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNUSED_PARAMETER)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
Expand Down

0 comments on commit 3e35f5b

Please sign in to comment.