Project import/libvirt - Diff b996013415...c156a123aa

... ... --- a/.abf.yml
... ... +++ b/.abf.yml
... ... @@ -1,2 +1,2 @@
1 1
sources:
2
  libvirt-3.10.0.tar.xz: bdb540fe37abcce4dbc68c2c7b4e05e69ca0f144
2
  libvirt-4.1.0.tar.xz: 759ba2f6dabf8273be4db1a3d6e1a5efda2889a6
view file @ c156a123aa
... ... --- /dev/null
... ... +++ b/0001-Workaround-removal-of-libio.h.patch
... ... @@ -0,0 +1,100 @@
1
From 397feba12151bec18ab208bd8fe1d9f12b9989d0 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
3
Date: Mon, 5 Mar 2018 12:27:52 +0000
4
Subject: [PATCH] Workaround removal of libio.h
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
9
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
10
---
11
 gnulib/lib/fflush.c   | 8 ++++----
12
 gnulib/lib/fpurge.c   | 2 +-
13
 gnulib/lib/freading.c | 2 +-
14
 gnulib/lib/fseeko.c   | 4 ++--
15
 4 files changed, 8 insertions(+), 8 deletions(-)
16
17
diff --git a/gnulib/lib/fflush.c b/gnulib/lib/fflush.c
18
index c52883b..3ebbcae 100644
19
--- a/gnulib/lib/fflush.c
20
+++ b/gnulib/lib/fflush.c
21
@@ -32,8 +32,8 @@
22
 
23
 #undef fflush
24
 
25
-
26
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
27
+#define _IO_IN_BACKUP 0x100
28
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
29
 
30
 /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
31
 static void
32
@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
33
 
34
 #endif
35
 
36
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
37
+#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */)
38
 
39
 # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
40
 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
41
@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
42
   if (stream == NULL || ! freading (stream))
43
     return fflush (stream);
44
 
45
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
46
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
47
 
48
   clear_ungetc_buffer_preserving_position (stream);
49
 
50
diff --git a/gnulib/lib/fpurge.c b/gnulib/lib/fpurge.c
51
index b236871..ea8f7f5 100644
52
--- a/gnulib/lib/fpurge.c
53
+++ b/gnulib/lib/fpurge.c
54
@@ -62,7 +62,7 @@ fpurge (FILE *fp)
55
   /* Most systems provide FILE as a struct and the necessary bitmask in
56
      <stdio.h>, because they need it for implementing getc() and putc() as
57
      fast macros.  */
58
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
59
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
60
   fp->_IO_read_end = fp->_IO_read_ptr;
61
   fp->_IO_write_ptr = fp->_IO_write_base;
62
   /* Avoid memory leak when there is an active ungetc buffer.  */
63
diff --git a/gnulib/lib/freading.c b/gnulib/lib/freading.c
64
index 67a884d..fffda1e 100644
65
--- a/gnulib/lib/freading.c
66
+++ b/gnulib/lib/freading.c
67
@@ -31,7 +31,7 @@ freading (FILE *fp)
68
   /* Most systems provide FILE as a struct and the necessary bitmask in
69
      <stdio.h>, because they need it for implementing getc() and putc() as
70
      fast macros.  */
71
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
72
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
73
   return ((fp->_flags & _IO_NO_WRITES) != 0
74
           || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
75
               && fp->_IO_read_base != NULL));
76
diff --git a/gnulib/lib/fseeko.c b/gnulib/lib/fseeko.c
77
index ae9b100..82460e5 100644
78
--- a/gnulib/lib/fseeko.c
79
+++ b/gnulib/lib/fseeko.c
80
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
81
 #endif
82
 
83
   /* These tests are based on fpurge.c.  */
84
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
85
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
86
   if (fp->_IO_read_end == fp->_IO_read_ptr
87
       && fp->_IO_write_ptr == fp->_IO_write_base
88
       && fp->_IO_save_base == NULL)
89
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
90
           return -1;
91
         }
92
 
93
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
94
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
95
       fp->_flags &= ~_IO_EOF_SEEN;
96
       fp->_offset = pos;
97
 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
98
-- 
99
2.14.3
100
view file @ c156a123aa
... ... --- /dev/null
... ... +++ b/0001-tests-force-use-of-NORMAL-TLS-priority-in-test-suite.patch
... ... @@ -0,0 +1,69 @@
1
From ec92abee2851344e4e8c108a26b5cec594561ff4 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
3
Date: Mon, 5 Mar 2018 12:46:16 +0000
4
Subject: [PATCH] tests: force use of "NORMAL" TLS priority in test suite
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
9
When generating certificates we rely on GNUTLS' built-in default setup
10
for the ciphers used in the certs. We then currently run with the distro
11
specific TLS priority setup which can be much stronger, to the extent
12
that the certificates we generate are considered untrustworthy. We don't
13
care about the quality of the ciphers we use in the test suite, so just
14
force the priority to "NORMAL" which should ensure our certs are
15
accepted by GNUTLS.
16
17
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
18
---
19
 tests/virnettlscontexttest.c | 4 ++--
20
 tests/virnettlssessiontest.c | 4 ++--
21
 2 files changed, 4 insertions(+), 4 deletions(-)
22
23
diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c
24
index 089c10e964..86647f3014 100644
25
--- a/tests/virnettlscontexttest.c
26
+++ b/tests/virnettlscontexttest.c
27
@@ -72,7 +72,7 @@ static int testTLSContextInit(const void *opaque)
28
                                          data->crt,
29
                                          KEYFILE,
30
                                          NULL,
31
-                                         NULL,
32
+                                         "NORMAL",
33
                                          true,
34
                                          true);
35
     } else {
36
@@ -80,7 +80,7 @@ static int testTLSContextInit(const void *opaque)
37
                                          NULL,
38
                                          data->crt,
39
                                          KEYFILE,
40
-                                         NULL,
41
+                                         "NORMAL",
42
                                          true,
43
                                          true);
44
     }
45
diff --git a/tests/virnettlssessiontest.c b/tests/virnettlssessiontest.c
46
index 6d639e5b16..7e85607181 100644
47
--- a/tests/virnettlssessiontest.c
48
+++ b/tests/virnettlssessiontest.c
49
@@ -113,7 +113,7 @@ static int testTLSSessionInit(const void *opaque)
50
                                            data->servercrt,
51
                                            KEYFILE,
52
                                            data->wildcards,
53
-                                           NULL,
54
+                                           "NORMAL",
55
                                            false,
56
                                            true);
57
 
58
@@ -121,7 +121,7 @@ static int testTLSSessionInit(const void *opaque)
59
                                            NULL,
60
                                            data->clientcrt,
61
                                            KEYFILE,
62
-                                           NULL,
63
+                                           "NORMAL",
64
                                            false,
65
                                            true);
66
 
67
-- 
68
2.14.3
69
view file @ c156a123aa
... ... --- /dev/null
... ... +++ b/libvirt.rpmlintrc
... ... @@ -0,0 +1,12 @@
1
# libvirtd.lxc is a logrotate conf file...
2
addFilter("E: outside-libdir-files")
3
4
# None of the logrotate files sports the package name
5
addFilter("E: incoherent-logrotate-file")
6
7
# /var/log/libvirt/* have 0700 as perms mask
8
addFilter("E: non-standard-dir-perm")
9
10
# 60-libvirtd.conf is correctly placed in /usr/lib/sysctl.d
11
addFilter("W: non-etc-or-var-file-marked-as-conffile")
12
... ... --- a/libvirt.spec
... ... +++ b/libvirt.spec
... ... @@ -1,21 +1,21 @@
1
%define _disable_ld_no_undefined 1
1
%define	_disable_ld_no_undefined 1
2 2
3
%define common_summary interact with virtualization capabilities
4
%define common_description Libvirt is a C toolkit to interact with the virtualization\
3
%define	common_summary interact with virtualization capabilities
4
%define	common_description Libvirt is a C toolkit to interact with the virtualization\
5 5
capabilities of recent versions of Linux.
6 6
7
%define major 0
8
%define libname %mklibname virt %{major}
9
%define libadmin %mklibname virt-admin %{major}
10
%define liblxc %mklibname virt-lxc %{major}
11
%define libqemu %mklibname virt-qemu %{major}
12
%define devname %mklibname virt -d
7
%define	major 0
8
%define	libname %mklibname virt %{major}
9
%define	libadmin %mklibname virt-admin %{major}
10
%define	liblxc %mklibname virt-lxc %{major}
11
%define	libqemu %mklibname virt-qemu %{major}
12
%define	devname %mklibname virt -d
13 13
14
%define nss_major 2
15
%define nss_plugin %mklibname nss_libvirt %{nss_major}
14
%define	nss_major 2
15
%define	nss_plugin %mklibname nss_libvirt %{nss_major}
16 16
17
# libxenstore is not versionned properly
18
%define __noautoreq 'devel\\(libxenstore.*'
17
# libxenstore is not versioned properly
18
%define	__noautoreq 'devel\\(libxenstore.*'
19 19
20 20
%bcond_with	xen
21 21
%bcond_without	lxc
... ... @@ -28,32 +28,34 @@ capabilities of recent versions of Linux.
28 28
29 29
Summary:	Toolkit to %{common_summary}
30 30
Name:		libvirt
31
Version:	3.10.0
31
Version:	4.1.0
32 32
Release:	1
33 33
License:	LGPLv2+
34 34
Group:		System/Kernel and hardware
35 35
Url:		http://libvirt.org/
36 36
Source0:	http://libvirt.org/sources/%{name}-%{version}.tar.xz
37 37
Source1:	%{name}-tmpfiles.conf
38
Source100:	%{name}.rpmlintrc
39
Patch1:		0001-Workaround-removal-of-libio.h.patch
40
Patch2:		0001-tests-force-use-of-NORMAL-TLS-priority-in-test-suite.patch
38 41
Patch203:	rpcgen-libvirt-1.1.2.patch
39
40 42
BuildRequires:	dmsetup
43
# For configure to be able to detect dnsmasq binary location
44
BuildRequires:	dnsmasq-base
41 45
BuildRequires:	docbook-dtd45-xml
42 46
BuildRequires:	docbook-style-xsl
43 47
BuildRequires:	libxml2-utils
44 48
BuildRequires:	lvm2
45 49
BuildRequires:	polkit
46 50
BuildRequires:	xsltproc
47
BuildRequires:	glibc-devel
48 51
BuildRequires:	nfs-utils
49 52
BuildRequires:	open-iscsi
50 53
#BuildRequires:	qemu
51 54
BuildRequires:	gettext-devel
55
BuildRequires:	glibc-devel
52 56
%ifnarch %{arm} %{mips} aarch64
53 57
BuildRequires:	numa-devel
54 58
%endif
55
# For configure to be able to detect dnsmasq binary location
56
BuildRequires:	dnsmasq-base
57 59
BuildRequires:	pcap-devel
58 60
BuildRequires:	readline-devel
59 61
BuildRequires:	sasl-devel
... ... @@ -83,6 +85,7 @@ Requires: cyrus-sasl
85 85
Requires:	gettext
86 86
Requires:	netcf
87 87
Requires:	python-gobject-cairo
88
Requires:	rpm-helper
88 89
89 90
%track
90 91
prog %{name} = {
... ... @@ -94,25 +97,25 @@ prog %{name} = {
97 97
%description
98 98
%{common_description}
99 99
100
Virtualization of the Linux Operating System means the
101
ability to run multiple instances of Operating Systems concurently on
102
a single hardware system where the basic resources are driven by a
103
Linux instance. The library aim at providing long term stable C API
104
initially for the Xen paravirtualization but should be able to
105
integrate other virtualization mechanisms if needed.
100
Virtualization of the Linux Operating System means the ability to run multiple
101
instances of Operating Systems concurently on a single hardware system where
102
the basic resources are driven by a Linux instance. The library aim at
103
providing long term stable C API initially for the Xen paravirtualization but
104
should be able to integrate other virtualization mechanisms if needed.
106 105
107 106
#----------------------------------------------------------------------------
108 107
109 108
%package -n %{libname}
110 109
Summary:	A library to %{common_summary}
111 110
Group:		System/Libraries
112
Obsoletes:	python-%{name} < 2.3.0
111
%rename		python-%{name} < 2.3.0
113 112
114 113
%description -n %{libname}
115
This package contains the library needed to run programs dynamically
116
linked with %{name}.
114
This package contains the library needed to run programs dynamically linked
115
with %{name}.
117 116
118 117
%files -n %{libname}
118
%doc COPYING
119 119
%{_libdir}/%{name}.so.%{major}*
120 120
121 121
#----------------------------------------------------------------------------
... ... @@ -122,10 +125,11 @@ Summary: A library to %{common_summary}
125 125
Group:		System/Libraries
126 126
127 127
%description -n %{libadmin}
128
This package contains the library needed to run programs dynamically
129
linked with %{name}.
128
This package contains the library needed to run programs dynamically linked
129
with %{name}.
130 130
131 131
%files -n %{libadmin}
132
%doc COPYING
132 133
%{_libdir}/%{name}-admin.so.%{major}*
133 134
134 135
#----------------------------------------------------------------------------
... ... @@ -135,10 +139,11 @@ Summary: A library to %{common_summary}
139 139
Group:		System/Libraries
140 140
141 141
%description -n %{liblxc}
142
This package contains the library needed to run programs dynamically
143
linked with %{name}.
142
This package contains the library needed to run programs dynamically linked
143
with %{name}.
144 144
145 145
%files -n %{liblxc}
146
%doc COPYING
146 147
%{_libdir}/%{name}-lxc.so.%{major}*
147 148
148 149
#----------------------------------------------------------------------------
... ... @@ -149,10 +154,11 @@ Group: System/Libraries
154 154
Conflicts:	%{_lib}virt0 < 1.0.2-1
155 155
156 156
%description -n %{libqemu}
157
This package contains the library needed to run programs dynamically
158
linked with %{name}.
157
This package contains the library needed to run programs dynamically linked
158
with %{name}.
159 159
160 160
%files -n %{libqemu}
161
%doc COPYING
161 162
%{_libdir}/%{name}-qemu.so.%{major}*
162 163
163 164
#----------------------------------------------------------------------------
... ... @@ -172,8 +178,8 @@ Provides: %{name}-devel = %{EVRD}
178 178
%description -n %{devname}
179 179
%{common_description}
180 180
181
This package contains the header files and libraries needed for
182
developing programs using the %{name} library.
181
This package contains the header files and libraries needed for developing
182
programs using the %{name} library.
183 183
184 184
%files -n %{devname}
185 185
%{_docdir}/%{name}
... ... @@ -202,6 +208,7 @@ Provides: nss_libvirt = %{EVRD}
208 208
NSS plugin for %{common_summary}.
209 209
210 210
%files -n %{nss_plugin}
211
%doc COPYING
211 212
%{_libdir}/libnss_libvirt.so.%{nss_major}*
212 213
%{_libdir}/libnss_libvirt_guest.so.%{nss_major}*
213 214
... ... @@ -211,11 +218,12 @@ NSS plugin for %{common_summary}.
218 218
Summary:	Tools to %{common_summary}
219 219
Group:		System/Kernel and hardware
220 220
Requires:	bridge-utils
221
Requires:	polkit
222
Requires:	ebtables
223 221
Requires:	dnsmasq-base
222
Requires:	ebtables
224 223
Requires:	netcf
225 224
Requires:	pm-utils
225
Requires:	polkit
226
Requires:	rpm-helper
226 227
Suggests:	netcat
227 228
Conflicts:	%{_lib}virt0 < 1.0.1-1
228 229
... ... @@ -248,8 +256,8 @@ This package contains tools for the %{name} library.
256 256
%{_libexecdir}/libvirt_iohelper
257 257
%{_libexecdir}/libvirt_leaseshelper
258 258
%{_libexecdir}/libvirt_lxc
259
# No ABF
260
#%%{_libexecdir}/libvirt_parthelper
259
# Not built on  ABF
260
#{_libexecdir}/libvirt_parthelper
261 261
%{_libexecdir}/libvirt-guests.sh
262 262
%{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so
263 263
%{_libdir}/libvirt/connection-driver/libvirt_driver_lxc.so
... ... @@ -266,8 +274,8 @@ This package contains tools for the %{name} library.
274 274
%{_libdir}/libvirt/connection-driver/libvirt_driver_libxl.so
275 275
%endif
276 276
%{_libdir}/libvirt/lock-driver/lockd.so
277
# No ABF
278
#%%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so
277
# Not built on  ABF
278
#{_libdir}/%%{name}/storage-backend/libvirt_storage_backend_disk.so
279 279
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so
280 280
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so
281 281
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so
... ... @@ -282,6 +290,8 @@ This package contains tools for the %{name} library.
290 290
%{_datadir}/systemtap/tapset/libvirt_functions.stp
291 291
%{_datadir}/systemtap/tapset/libvirt_probes.stp
292 292
%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp
293
# Not built on  ABF
294
#{_datadir}/bash-completion/completions/*
293 295
294 296
%config(noreplace) %{_sysconfdir}/libvirt
295 297
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
... ... @@ -295,7 +305,9 @@ This package contains tools for the %{name} library.
305 305
%{_unitdir}/libvirt-guests.service
306 306
%{_unitdir}/virt-guest-shutdown.target
307 307
%{_unitdir}/virtlockd.*
308
%{_unitdir}/virtlockd-admin.*
308 309
%{_unitdir}/virtlogd.*
310
%{_unitdir}/virtlogd-admin.*
309 311
%{_tmpfilesdir}/%{name}.conf
310 312
311 313
%post -n %{name}-utils
... ... @@ -316,8 +328,9 @@ This package contains tools for the %{name} library.
328 328
%setup -q
329 329
%apply_patches
330 330
331
331 332
%build
332
autoreconf -fi
333
autoreconf -vfi
333 334
%configure2_5x \
334 335
	--disable-static \
335 336
	--localstatedir=%{_var} \
... ... @@ -347,10 +360,12 @@ autoreconf -fi
360 360
	%if !%{with parallels}
361 361
	--without-parallels \
362 362
	%endif
363
	--with-test-suite \
363 364
	--without-hal
364 365
365 366
%make LIBS="-ltirpc"
366 367
368
367 369
%install
368 370
%makeinstall_std SYSTEMD_UNIT_DIR=%{_unitdir}
369 371
... ... @@ -364,10 +379,28 @@ rm -rf %{buildroot}%{_var}/run/%{name}
379 379
380 380
%find_lang %{name}
381 381
382
# fix documentation
382
# Fix documentation
383 383
install -m 644 ChangeLog README NEWS %{buildroot}%{_docdir}/%{name}
384 384
385
# Fix perms
386
chmod -x %{buildroot}%{_sysconfdir}/sysconfig/*
387
#chmod -x %%{buildroot}%%{_datadir}/bash-completion/completions/*
388
389
385 390
%check
386
# fhimpe: disabled for now because it fails on 100Hz kernels, such as used on bs
387
# http://www.mail-archive.com/libvir-list@redhat.com/msg13727.html
388
#make check
391
set -x
392
cd tests
393
make
394
# These tests don't current work in a mock build root
395
for i in nodeinfotest seclabeltest
396
do
397
  rm -f $i
398
  printf 'int main(void) { return 0; }' > $i.c
399
  printf '#!/bin/sh\nexit 0\n' > $i
400
  chmod +x $i
401
done
402
if ! make check VIR_TEST_DEBUG=1
403
then
404
  cat test-suite.log || true
405
  exit 1
406
fi