backport: fix rst2html and ASN1 compiler failure

Signed-off-by: imxcc <xingchaochao@huawei.com>
This commit is contained in:
imxcc 2022-01-11 22:32:12 +08:00 committed by yezengruan
parent 49be1710c5
commit 823729a5f2
3 changed files with 151 additions and 2 deletions

View File

@ -0,0 +1,62 @@
From c99e7e8abe1e22f504173a976a82e1a72551bdc1 Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@redhat.com>
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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: rpm-build <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

View File

@ -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 <xingchaochao@huawei.com>
- docs: build: Don't include stylesheet in intermediate html
- tests: Replace deprecated ASN1 code
* Mon Dec 06 2021 Euler Robot <euler.robot@huawei.com>
- hotpatch: implement hotpatch virsh api
- hotpatch: check vm id and pid before using hotpatch api

View File

@ -0,0 +1,81 @@
From 88b38f685d57aac074656104def7111fe854e7c3 Mon Sep 17 00:00:00 2001
From: Luke Yue <lukedyue@gmail.com>
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 <lukedyue@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
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 <config.h>
#include <libtasn1.h>
-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