From 362c27d4ba1940bdb713eda634771c232b344b6c Mon Sep 17 00:00:00 2001 From: imxcc Date: Tue, 11 Jan 2022 22:32:12 +0800 Subject: [PATCH] backport: fix rst2html and ASN1 compiler failure Signed-off-by: imxcc --- ...-include-stylesheet-in-intermediate-.patch | 62 ++++++++++++++ libvirt.spec | 10 ++- tests-Replace-deprecated-ASN1-code.patch | 81 +++++++++++++++++++ 3 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 docs-build-Don-t-include-stylesheet-in-intermediate-.patch create mode 100644 tests-Replace-deprecated-ASN1-code.patch diff --git a/docs-build-Don-t-include-stylesheet-in-intermediate-.patch b/docs-build-Don-t-include-stylesheet-in-intermediate-.patch new file mode 100644 index 0000000..b13d5e0 --- /dev/null +++ b/docs-build-Don-t-include-stylesheet-in-intermediate-.patch @@ -0,0 +1,62 @@ +From c99e7e8abe1e22f504173a976a82e1a72551bdc1 Mon Sep 17 00:00:00 2001 +From: Peter Krempa +Date: Mon, 3 Aug 2020 07:32:29 +0200 +Subject: [PATCH] docs: build: Don't include stylesheet in intermediate html + files generated from RST +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +'docutils' add a stylesheet to the output html file for direct +consumption. Since we use the html files just as an intermediate step +which is post-processed to add our own stylesheet and drop the docutils +one in the process we can ask 'rst2html' to not add any for an +intermediate file with less garbage. + +Signed-off-by: Peter Krempa +Reviewed-by: Ján Tomko +Signed-off-by: rpm-build +--- + docs/Makefile.am | 4 ++-- + docs/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/docs/Makefile.am b/docs/Makefile.am +index 61862c4..4c44504 100644 +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -420,11 +420,11 @@ manpages/%.html.in: manpages/%.rst + grep -v '^:Manual ' < $< | \ + sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \ + -e 's|RUNSTATEDIR|$(runstatedir)|g' | \ +- $(RST2HTML) --strict > $@ || { rm $@ && exit 1; } ++ $(RST2HTML) --stylesheet= --strict > $@ || { rm $@ && exit 1; } + + %.html.in: %.rst + $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ +- $(RST2HTML) --strict $< > $@ || { rm $@ && exit 1; } ++ $(RST2HTML) --stylesheet= --strict $< > $@ || { rm $@ && exit 1; } + + %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ + $(acl_generated) +diff --git a/docs/Makefile.in b/docs/Makefile.in +index 61eac52..1836655 100644 +--- a/docs/Makefile.in ++++ b/docs/Makefile.in +@@ -1469,11 +1469,11 @@ manpages/%.html.in: manpages/%.rst + grep -v '^:Manual ' < $< | \ + sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \ + -e 's|RUNSTATEDIR|$(runstatedir)|g' | \ +- $(RST2HTML) --strict > $@ || { rm $@ && exit 1; } ++ $(RST2HTML) --stylesheet= --strict > $@ || { rm $@ && exit 1; } + + %.html.in: %.rst + $(AM_V_GEN)$(MKDIR_P) `dirname $@` && \ +- $(RST2HTML) --strict $< > $@ || { rm $@ && exit 1; } ++ $(RST2HTML) --stylesheet= --strict $< > $@ || { rm $@ && exit 1; } + + %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ + $(acl_generated) +-- +2.27.0 + diff --git a/libvirt.spec b/libvirt.spec index 9f9b3cb..ff9d866 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -34,7 +34,7 @@ # Then the secondary host drivers, which run inside libvirtd %define with_storage_rbd 0%{!?_without_storage_rbd:1} %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:0} -%define with_storage_gluster 0%{!?_without_storage_gluster:1} +%define with_storage_gluster 0%{!?_without_storage_gluster:0} %define with_numactl 0%{!?_without_numactl:1} @@ -105,7 +105,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 6.2.0 -Release: 27 +Release: 28 License: LGPLv2+ URL: https://libvirt.org/ @@ -196,6 +196,8 @@ Patch0079: hotpatch-introduce-hotpatch-async-job-flag.patch Patch0080: hotpatch-implement-hotpatch-virsh-api.patch Patch0081: hotpatch-check-vm-id-and-pid-before-using-hotpatch-a.patch Patch0082: domain-add-logs-for-virDomainHotpatchManage.patch +Patch0083: docs-build-Don-t-include-stylesheet-in-intermediate-.patch +Patch0084: tests-Replace-deprecated-ASN1-code.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -1929,6 +1931,10 @@ exit 0 %changelog +* Tue Jun 11 2022 imxcc +- docs: build: Don't include stylesheet in intermediate html +- tests: Replace deprecated ASN1 code + * Mon Dec 06 2021 Euler Robot - hotpatch: implement hotpatch virsh api - hotpatch: check vm id and pid before using hotpatch api diff --git a/tests-Replace-deprecated-ASN1-code.patch b/tests-Replace-deprecated-ASN1-code.patch new file mode 100644 index 0000000..2cf05d5 --- /dev/null +++ b/tests-Replace-deprecated-ASN1-code.patch @@ -0,0 +1,81 @@ +From 88b38f685d57aac074656104def7111fe854e7c3 Mon Sep 17 00:00:00 2001 +From: Luke Yue +Date: Tue, 18 May 2021 09:19:26 +0800 +Subject: [PATCH] tests: Replace deprecated ASN1 code + +This fixes compiler warnings when building with libtasn1 4.17.0. + +Signed-off-by: Luke Yue +Reviewed-by: Michal Privoznik +--- + tests/pkix_asn1_tab.c | 2 +- + tests/virnettlshelpers.c | 12 ++++++------ + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/pkix_asn1_tab.c b/tests/pkix_asn1_tab.c +index 5d5ca3db5d..a28d5f20c3 100644 +--- a/tests/pkix_asn1_tab.c ++++ b/tests/pkix_asn1_tab.c +@@ -5,7 +5,7 @@ + #include + #include + +-const ASN1_ARRAY_TYPE pkix_asn1_tab[] = { ++const asn1_static_node pkix_asn1_tab[] = { + { "PKIX1", 536875024, NULL }, + { NULL, 1073741836, NULL }, + { "id-pkix", 1879048204, NULL }, +diff --git a/tests/virnettlshelpers.c b/tests/virnettlshelpers.c +index ce38571b0a..905e633e60 100644 +--- a/tests/virnettlshelpers.c ++++ b/tests/virnettlshelpers.c +@@ -37,8 +37,8 @@ VIR_LOG_INIT("tests.nettlshelpers"); + * These store some static data that is needed when + * encoding extensions in the x509 certs + */ +-ASN1_TYPE pkix_asn1; +-extern const ASN1_ARRAY_TYPE pkix_asn1_tab[]; ++asn1_node pkix_asn1; ++extern const asn1_static_node pkix_asn1_tab[]; + + /* + * To avoid consuming random entropy to generate keys, +@@ -107,7 +107,7 @@ void testTLSCleanup(const char *keyfile) + /* + * Turns an ASN1 object into a DER encoded byte array + */ +-static void testTLSDerEncode(ASN1_TYPE src, ++static void testTLSDerEncode(asn1_node src, + const char *src_name, + gnutls_datum_t * res) + { +@@ -267,7 +267,7 @@ testTLSGenerateCert(struct testTLSCertReq *req, + * the 'critical' field which we want control over + */ + if (req->basicConstraintsEnable) { +- ASN1_TYPE ext = ASN1_TYPE_EMPTY; ++ asn1_node ext = NULL; + + asn1_create_element(pkix_asn1, "PKIX1.BasicConstraints", &ext); + asn1_write_value(ext, "cA", req->basicConstraintsIsCA ? "TRUE" : "FALSE", 1); +@@ -292,7 +292,7 @@ testTLSGenerateCert(struct testTLSCertReq *req, + * to be 'critical' + */ + if (req->keyUsageEnable) { +- ASN1_TYPE ext = ASN1_TYPE_EMPTY; ++ asn1_node ext = NULL; + char str[2]; + + str[0] = req->keyUsageValue & 0xff; +@@ -321,7 +321,7 @@ testTLSGenerateCert(struct testTLSCertReq *req, + * set this the hard way building up ASN1 data ourselves + */ + if (req->keyPurposeEnable) { +- ASN1_TYPE ext = ASN1_TYPE_EMPTY; ++ asn1_node ext = NULL; + + asn1_create_element(pkix_asn1, "PKIX1.ExtKeyUsageSyntax", &ext); + if (req->keyPurposeOID1) { +-- +2.27.0 + -- Gitee