Skip to content

Commit

Permalink
Merge pull request #3713 from kgaillot/release
Browse files Browse the repository at this point in the history
Final backports for 2.1.9 release
  • Loading branch information
kgaillot authored Oct 31, 2024
2 parents 40d69ff + 094afe8 commit 993bd1a
Show file tree
Hide file tree
Showing 16 changed files with 381 additions and 532 deletions.
39 changes: 39 additions & 0 deletions cts/cli/regression.dates.exp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ crm_time_parse_duration error: 'P1YM/2019-02-20 00:00:00Z' is not a valid ISO 8
iso8601: Invalid interval specified: P1YM/2019-02-20 00:00:00Z
=#=#=#= End test: Invalid period - [P1YM/2019-02-20 00:00:00Z] - Invalid parameter (2) =#=#=#=
* Passed: iso8601 - Invalid period - [P1YM/2019-02-20 00:00:00Z]
=#=#=#= Begin test: '2005-040/2005-043' period =#=#=#=
Period: 2005-02-09 00:00:00Z to 2005-02-12 00:00:00Z
=#=#=#= End test: '2005-040/2005-043' period - OK (0) =#=#=#=
* Passed: iso8601 - '2005-040/2005-043' period
=#=#=#= Begin test: '2005-040/2005-043' period (XML) =#=#=#=
<pacemaker-result api-version="X" request="iso8601 -p 2005-040/2005-043 --output-as=xml">
<period>
<start>2005-02-09 00:00:00Z</start>
<end>2005-02-12 00:00:00Z</end>
</period>
<status code="0" message="OK"/>
</pacemaker-result>
=#=#=#= End test: '2005-040/2005-043' period (XML) - OK (0) =#=#=#=
* Passed: iso8601 - '2005-040/2005-043' period (XML)
=#=#=#= Begin test: 2014-01-01 00:30:00 - 1 Hour =#=#=#=
Date: 2014-01-01 00:30:00Z
Duration: -3600 seconds (1 hour)
Expand Down Expand Up @@ -324,6 +338,13 @@ Date: 2040-W01-1 00:00:00Z
Date: 2009-W53-7 00:00:00Z
=#=#=#= End test: 2009-W53-07 - OK (0) =#=#=#=
* Passed: iso8601 - 2009-W53-07
=#=#=#= Begin test: 2009-W53-07 (XML) =#=#=#=
<pacemaker-result api-version="X" request="iso8601 -d '2009-W53-7 00:00:00Z' -W -E '2009-W53-7 00:00:00Z' --output-as=xml">
<date>2009-W53-7 00:00:00Z</date>
<status code="0" message="OK"/>
</pacemaker-result>
=#=#=#= End test: 2009-W53-07 (XML) - OK (0) =#=#=#=
* Passed: iso8601 - 2009-W53-07 (XML)
=#=#=#= Begin test: epoch + 2 Years 5 Months 6 Minutes =#=#=#=
Date: 1970-01-01 00:00:00Z
Duration: 2 years 5 months 360 seconds (6 minutes)
Expand Down Expand Up @@ -354,9 +375,27 @@ Duration: -1 months
Duration ends at: 2009-02-28 01:00:00 +01:00
=#=#=#= End test: 2009-03-31 - 1 Month - OK (0) =#=#=#=
* Passed: iso8601 - 2009-03-31 - 1 Month
=#=#=#= Begin test: 2009-03-31 - 1 Month (XML) =#=#=#=
<pacemaker-result api-version="X" request="iso8601 -d '2009-03-31 01:00:00 +01:00' -D P-1M -E '2009-02-28 00:00:00Z' --output-as=xml">
<date>2009-03-31 00:00:00Z</date>
<duration>-1 months </duration>
<duration_ends>2009-02-28 01:00:00 +01:00</duration_ends>
<status code="0" message="OK"/>
</pacemaker-result>
=#=#=#= End test: 2009-03-31 - 1 Month (XML) - OK (0) =#=#=#=
* Passed: iso8601 - 2009-03-31 - 1 Month (XML)
=#=#=#= Begin test: 2038-01-01 + 3 Months =#=#=#=
Date: 2038-01-01 00:00:00Z
Duration: 3 months
Duration ends at: 2038-04-01 00:00:00Z
=#=#=#= End test: 2038-01-01 + 3 Months - OK (0) =#=#=#=
* Passed: iso8601 - 2038-01-01 + 3 Months
=#=#=#= Begin test: 2038-01-01 + 3 Months (XML) =#=#=#=
<pacemaker-result api-version="X" request="iso8601 -d '2038-01-01 00:00:00Z' -D P3M -E '2038-04-01 00:00:00Z' --output-as=xml">
<date>2038-01-01 00:00:00Z</date>
<duration> 3 months </duration>
<duration_ends>2038-04-01 00:00:00Z</duration_ends>
<status code="0" message="OK"/>
</pacemaker-result>
=#=#=#= End test: 2038-01-01 + 3 Months (XML) - OK (0) =#=#=#=
* Passed: iso8601 - 2038-01-01 + 3 Months (XML)
21 changes: 21 additions & 0 deletions cts/cts-cli.in
Original file line number Diff line number Diff line change
Expand Up @@ -2561,6 +2561,14 @@ function test_dates() {
test_assert $CRM_EX_INVALID_PARAM 0
done

desc="'2005-040/2005-043' period"
cmd="iso8601 -p '2005-040/2005-043'"
test_assert $CRM_EX_OK 0

desc="'2005-040/2005-043' period (XML)"
cmd="iso8601 -p '2005-040/2005-043' --output-as=xml"
test_assert_validate $CRM_EX_OK 0

desc="2014-01-01 00:30:00 - 1 Hour"
cmd="iso8601 -d '2014-01-01 00:30:00Z' -D P-1H -E '2013-12-31 23:30:00Z'"
test_assert $CRM_EX_OK 0
Expand Down Expand Up @@ -2599,6 +2607,10 @@ function test_dates() {
cmd="iso8601 -d '2009-W53-7 00:00:00Z' -W -E '2009-W53-7 00:00:00Z'"
test_assert $CRM_EX_OK 0

desc="2009-W53-07 (XML)"
cmd="iso8601 -d '2009-W53-7 00:00:00Z' -W -E '2009-W53-7 00:00:00Z' --output-as=xml"
test_assert_validate $CRM_EX_OK 0

desc="epoch + 2 Years 5 Months 6 Minutes"
cmd="iso8601 -d 'epoch' -D P2Y5MT6M -E '1972-06-01 00:06:00Z'"
test_assert $CRM_EX_OK 0
Expand All @@ -2619,9 +2631,17 @@ function test_dates() {
cmd="iso8601 -d '2009-03-31 01:00:00 +01:00' -D P-1M -E '2009-02-28 00:00:00Z'"
test_assert $CRM_EX_OK 0

desc="2009-03-31 - 1 Month (XML)"
cmd="iso8601 -d '2009-03-31 01:00:00 +01:00' -D P-1M -E '2009-02-28 00:00:00Z' --output-as=xml"
test_assert_validate $CRM_EX_OK 0

desc="2038-01-01 + 3 Months"
cmd="iso8601 -d '2038-01-01 00:00:00Z' -D P3M -E '2038-04-01 00:00:00Z'"
test_assert $CRM_EX_OK 0

desc="2038-01-01 + 3 Months (XML)"
cmd="iso8601 -d '2038-01-01 00:00:00Z' -D P3M -E '2038-04-01 00:00:00Z' --output-as=xml"
test_assert_validate $CRM_EX_OK 0
}

function test_acl_loop() {
Expand Down Expand Up @@ -3559,6 +3579,7 @@ for t in $tests; do
-e 's/ version="[^"]*"/ version=""/' \
-e 's/.*Relax-NG validity error : //' \
-e 's/request=\".*\(crm_[a-zA-Z0-9]*\)/request=\"\1/' \
-e 's/request=\".*iso8601/request=\"iso8601/' \
-e 's/crm_feature_set="[^"]*" //'\
-e 's/@crm_feature_set=[0-9.]*, //'\
-e 's/\(<change-attr name="crm_feature_set" .* value="\)[0-9.]*"/\1"/' \
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PROJECT_BRIEF = "Scalable High-Availability cluster resource manager"
# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
# to the output directory.

#PROJECT_LOGO =
PROJECT_LOGO = clusterlabs-logo-55x55.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down
58 changes: 18 additions & 40 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2003-2023 the Pacemaker project contributors
# Copyright 2003-2024 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
Expand All @@ -8,8 +8,9 @@
#
include $(top_srcdir)/mk/common.mk

# Define release-related variables
# Define release- and upload-related variables
include $(top_srcdir)/mk/release.mk
include $(top_srcdir)/mk/uploads.mk

# What formats to use for book uploads (i.e. "make www";
# use BOOK_FORMATS in sphinx subdirectory to change local builds)
Expand All @@ -22,28 +23,11 @@ BOOK_FORMATS ?= html \
mibdir = $(datadir)/snmp/mibs
dist_mib_DATA = PCMK-MIB.txt

# Deprecated plaintext documents (dynamically converted to HTML)
DEPRECATED_ORIGINAL = crm_fencing.txt
DEPRECATED_GENERATED =
if BUILD_ASCIIDOC
DEPRECATED_GENERATED += $(DEPRECATED_ORIGINAL:%.txt=%.html)
endif
DEPRECATED_ALL = $(DEPRECATED_ORIGINAL) \
$(DEPRECATED_GENERATED)

doc_DATA = $(DEPRECATED_ALL)
noinst_SCRIPTS = abi-check

SUBDIRS = sphinx

EXTRA_DIST = $(DEPRECATED_ORIGINAL)

# toplevel rsync destination for www targets (without trailing slash)
RSYNC_DEST ?= sites.clusterlabs.org:/var/www/html

# recursive, preserve symlinks, preserve permissions, verbose, compress,
# don't cross filesystems, sparse, show progress
RSYNC_OPTS = -rlpvzxS --progress
EXTRA_DIST = clusterlabs-logo-55x55.png

if IS_ASCIIDOC
ASCIIDOC_HTML_ARGS = --unsafe --backend=xhtml11
Expand All @@ -59,19 +43,10 @@ endif
# For Makefile debugging
.PHONY: vars
vars:
@echo DEPRECATED_ORIGINAL=\'$(DEPRECATED_ORIGINAL)\'
@echo DEPRECATED_GENERATED=\'$(DEPRECATED_GENERATED)\'
@echo LAST_RELEASE=\'$(LAST_RELEASE)\'
@echo TAG=\'$(TAG)\'


.PHONY: deprecated-upload
deprecated-upload: $(DEPRECATED_ALL)
rsync $(RSYNC_OPTS) $(DEPRECATED_ALL) "$(RSYNC_DEST)/$(PACKAGE)/doc/"

.PHONY: deprecated-clean
deprecated-clean:
-rm -f $(DEPRECATED_GENERATED)
@echo RSYNC_DEST=\'$(RSYNC_DEST)\'
@echo RSYNC_PACKAGE_DEST=\'$(RSYNC_PACKAGE_DEST)\'


# Annotated source code as HTML
Expand All @@ -85,7 +60,7 @@ global:

.PHONY: global-upload
global-upload: global
rsync $(RSYNC_OPTS) HTML/ "$(RSYNC_DEST)/$(PACKAGE)/global/$(TAG)/"
rsync $(RSYNC_OPTS) HTML/ "$(RSYNC_PACKAGE_DEST)/global/$(TAG)/"

.PHONY: global-clean
global-clean:
Expand All @@ -94,6 +69,8 @@ global-clean:

# Man pages as HTML

MANPAGE_DIRS = ../agents ../daemons ../tools

%.8.html: %.8
groff -mandoc `man -w ./$<` -T html > $@

Expand All @@ -103,17 +80,17 @@ global-clean:
.PHONY: manhtml
manhtml:
$(MAKE) $(AM_MAKEFLAGS) -C .. all
find ../agents ../daemons ../tools -name "[a-z]*.[78]" \
find $(MANPAGE_DIRS) -name "[a-z]*.[78]" \
-exec $(MAKE) $(AM_MAKEFLAGS) \{\}.html \;

.PHONY: manhtml-upload
manhtml-upload: manhtml
find .. -name "[a-z]*.[78].html" -exec \
rsync $(RSYNC_OPTS) \{\} "$(RSYNC_DEST)/$(PACKAGE)/man/" \;
find $(MANPAGE_DIRS) -name "[a-z]*.[78].html" -exec \
rsync $(RSYNC_OPTS) \{\} "$(RSYNC_PACKAGE_DEST)/man/" \;

.PHONY: manhtml-clean
manhtml-clean:
-find .. -name "[a-z]*.[78].html" -exec rm \{\} \;
-find $(MANPAGE_DIRS) -name "[a-z]*.[78].html" -exec rm \{\} \;


# API documentation as HTML
Expand All @@ -124,7 +101,7 @@ doxygen: Doxyfile

.PHONY: doxygen-upload
doxygen-upload: doxygen
rsync $(RSYNC_OPTS) api/html/ "$(RSYNC_DEST)/$(PACKAGE)/doxygen/$(TAG)/"
rsync $(RSYNC_OPTS) api/html/ "$(RSYNC_PACKAGE_DEST)/doxygen/$(TAG)/"

.PHONY: doxygen-clean
doxygen-clean:
Expand All @@ -139,7 +116,8 @@ abi: abi-check

.PHONY: abi-www
abi-www:
export RSYNC_DEST=$(RSYNC_DEST); ./abi-check -u $(PACKAGE) $(LAST_RELEASE) $(TAG)
export RSYNC_PACKAGE_DEST=$(RSYNC_PACKAGE_DEST); \
./abi-check -u $(PACKAGE) $(LAST_RELEASE) $(TAG)

.PHONY: abi-clean
abi-clean:
Expand All @@ -158,10 +136,10 @@ books-upload:

# All online documentation (except ABI compatibility, which is run separately)
.PHONY: www
www: clean-local deprecated-upload manhtml-upload global-upload doxygen-upload books-upload
www: clean-local manhtml-upload global-upload doxygen-upload books-upload

.PHONY: clean-local
clean-local: global-clean manhtml-clean doxygen-clean abi-clean deprecated-clean
clean-local: global-clean manhtml-clean doxygen-clean abi-clean

# "make check" will cause "make all" to be run, which means docs will get built
# as a part of running tests if they haven't already. That seems unnecessary, so
Expand Down
8 changes: 4 additions & 4 deletions doc/abi-check.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!@BASH_PATH@
#
# Copyright 2011-2023 the Pacemaker project contributors
# Copyright 2011-2024 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
Expand All @@ -16,8 +16,8 @@
# upload it to the website.
#

# Top-level rsync destination for www targets (without trailing slash)
: ${RSYNC_DEST:=root@www.clusterlabs.org:/var/www/html}
# Top-level rsync destination for package's file uploads (without trailing slash)
: ${RSYNC_PACKAGE_DEST:=sites.clusterlabs.org:/var/www/html/projects/$(PACKAGE)}

# If the argument is of form x.y.z, print Pacemaker-x.y.z,
# otherwise print the argument (presumably a commit ID) directly
Expand Down Expand Up @@ -159,6 +159,6 @@ if [ $# -eq 2 ]; then

COMPAT_REPORT="compat_reports/${PACKAGE}/${V1}_to_${V2}"
if [ $UPLOAD -eq 1 ] && [ -d "$COMPAT_REPORT" ]; then
rsync -azxlSD --progress "$COMPAT_REPORT" "${RSYNC_DEST}/${PACKAGE}/abi/"
rsync -azxlSD --progress "$COMPAT_REPORT" "${RSYNC_PACKAGE_DEST}/abi/"
fi
fi
Binary file added doc/clusterlabs-logo-55x55.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 993bd1a

Please sign in to comment.