[libvirt] [PATCH] docs: don't install news.rng file

Daniel P. Berrange posted 1 patch 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170404172407.10529-1-berrange@redhat.com
docs/Makefile.am | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
[libvirt] [PATCH] docs: don't install news.rng file
Posted by Daniel P. Berrange 7 years ago
The news.rng file gets picked up by the wildcard match on docs/schemas,
and so gets installed into /usr/share/libvirt, along with the schemas
for our API objects. This then generated an RPM build failure, since
we don't have news.rng in the RPM file list

The news.rng schema is not something that users of libvirt ever care
about, since it is purely an internal thing to validate our website
content.

So rather than add news.rng to the RPM file list, this changes the
make rules so that we don't install news.rng at all.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---

Technically a built-break fix, but I'm not pushing it, in case people
have any alternative suggestions. eg we could just put news.rng in
the tests/ subdirectory instead, letting us keep the wildcard in the
docs/Makefile.am

 docs/Makefile.am | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 62e069e..2251848 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -153,7 +153,30 @@ fig = \
   migration-unmanaged-direct.fig
 
 schemadir = $(pkgdatadir)/schemas
-schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
+schema_DATA = \
+	schemas/basictypes.rng \
+	schemas/capability.rng \
+	schemas/cputypes.rng \
+	schemas/domaincaps.rng \
+	schemas/domaincommon.rng \
+	schemas/domain.rng \
+	schemas/domainsnapshot.rng \
+	schemas/domain.xml \
+	schemas/interface.rng \
+	schemas/networkcommon.rng \
+	schemas/network.rng \
+	schemas/nodedev.rng \
+	schemas/nwfilter.rng \
+	schemas/secret.rng \
+	schemas/storagecommon.rng \
+	schemas/storagepool.rng \
+	schemas/storagevol.rng \
+	$(NULL)
+
+noinst_DATA = \
+	schemas/news.rng \
+	$(NULL)
+
 
 EXTRA_DIST=					\
   apibuild.py genaclperms.pl \
@@ -166,7 +189,7 @@ EXTRA_DIST=					\
   $(internals_html_in) $(internals_html) \
   aclperms.htmlinc \
   hvsupport.pl \
-  $(schema_DATA)
+  $(schema_DATA) $(noinst_DATA)
 
 acl_generated = aclperms.htmlinc
 
-- 
2.9.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: don't install news.rng file
Posted by Bjoern Walk 7 years ago
Daniel P. Berrange <berrange@redhat.com> [2017-04-04, 07:24PM +0200]:
>The news.rng file gets picked up by the wildcard match on docs/schemas,
>and so gets installed into /usr/share/libvirt, along with the schemas
>for our API objects. This then generated an RPM build failure, since
>we don't have news.rng in the RPM file list
>
>The news.rng schema is not something that users of libvirt ever care
>about, since it is purely an internal thing to validate our website
>content.
>
>So rather than add news.rng to the RPM file list, this changes the
>make rules so that we don't install news.rng at all.
>
>Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>---
>
>Technically a built-break fix, but I'm not pushing it, in case people
>have any alternative suggestions. eg we could just put news.rng in
>the tests/ subdirectory instead, letting us keep the wildcard in the
>docs/Makefile.am

I would actually prefer this solution. The current place feels weirdly
wrong.

> docs/Makefile.am | 27 +++++++++++++++++++++++++--
> 1 file changed, 25 insertions(+), 2 deletions(-)
>
>diff --git a/docs/Makefile.am b/docs/Makefile.am
>index 62e069e..2251848 100644
>--- a/docs/Makefile.am
>+++ b/docs/Makefile.am
>@@ -153,7 +153,30 @@ fig = \
>   migration-unmanaged-direct.fig
>
> schemadir = $(pkgdatadir)/schemas
>-schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
>+schema_DATA = \
>+	schemas/basictypes.rng \
>+	schemas/capability.rng \
>+	schemas/cputypes.rng \
>+	schemas/domaincaps.rng \
>+	schemas/domaincommon.rng \
>+	schemas/domain.rng \
>+	schemas/domainsnapshot.rng \
>+	schemas/domain.xml \

This is wrong?

>+	schemas/interface.rng \
>+	schemas/networkcommon.rng \
>+	schemas/network.rng \
>+	schemas/nodedev.rng \
>+	schemas/nwfilter.rng \
>+	schemas/secret.rng \
>+	schemas/storagecommon.rng \
>+	schemas/storagepool.rng \
>+	schemas/storagevol.rng \
>+	$(NULL)
>+
>+noinst_DATA = \
>+	schemas/news.rng \
>+	$(NULL)
>+
>
> EXTRA_DIST=					\
>   apibuild.py genaclperms.pl \
>@@ -166,7 +189,7 @@ EXTRA_DIST=					\
>   $(internals_html_in) $(internals_html) \
>   aclperms.htmlinc \
>   hvsupport.pl \
>-  $(schema_DATA)
>+  $(schema_DATA) $(noinst_DATA)
>
> acl_generated = aclperms.htmlinc
>
>-- 
>2.9.3
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
>

However, this does its job, with the above fixed.

Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>

-- 
IBM Systems
Linux on z Systems & Virtualization Development
------------------------------------------------------------------------
IBM Deutschland
Schönaicher Str. 220
71032 Böblingen
Phone: +49 7031 16 1819
E-Mail: bwalk@de.ibm.com
------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294 
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: don't install news.rng file
Posted by Peter Krempa 7 years ago
On Wed, Apr 05, 2017 at 07:58:36 +0200, Bjoern Walk wrote:
> Daniel P. Berrange <berrange@redhat.com> [2017-04-04, 07:24PM +0200]:
> > The news.rng file gets picked up by the wildcard match on docs/schemas,
> > and so gets installed into /usr/share/libvirt, along with the schemas
> > for our API objects. This then generated an RPM build failure, since
> > we don't have news.rng in the RPM file list
> > 
> > The news.rng schema is not something that users of libvirt ever care
> > about, since it is purely an internal thing to validate our website
> > content.
> > 
> > So rather than add news.rng to the RPM file list, this changes the
> > make rules so that we don't install news.rng at all.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
> > 
> > Technically a built-break fix, but I'm not pushing it, in case people
> > have any alternative suggestions. eg we could just put news.rng in
> > the tests/ subdirectory instead, letting us keep the wildcard in the
> > docs/Makefile.am
> 
> I would actually prefer this solution. The current place feels weirdly
> wrong.

Describe the wrongness please. It's together with other schemas in the
directory containing documentation. The place makes sense. Only thing
which does not is that it would be installed.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: don't install news.rng file
Posted by Bjoern Walk 7 years ago
Peter Krempa <pkrempa@redhat.com> [2017-04-05, 08:44AM +0200]:
>On Wed, Apr 05, 2017 at 07:58:36 +0200, Bjoern Walk wrote:
>> Daniel P. Berrange <berrange@redhat.com> [2017-04-04, 07:24PM +0200]:
>> > The news.rng file gets picked up by the wildcard match on docs/schemas,
>> > and so gets installed into /usr/share/libvirt, along with the schemas
>> > for our API objects. This then generated an RPM build failure, since
>> > we don't have news.rng in the RPM file list
>> >
>> > The news.rng schema is not something that users of libvirt ever care
>> > about, since it is purely an internal thing to validate our website
>> > content.
>> >
>> > So rather than add news.rng to the RPM file list, this changes the
>> > make rules so that we don't install news.rng at all.
>> >
>> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>> > ---
>> >
>> > Technically a built-break fix, but I'm not pushing it, in case people
>> > have any alternative suggestions. eg we could just put news.rng in
>> > the tests/ subdirectory instead, letting us keep the wildcard in the
>> > docs/Makefile.am
>>
>> I would actually prefer this solution. The current place feels weirdly
>> wrong.
>
>Describe the wrongness please. It's together with other schemas in the
>directory containing documentation. The place makes sense. Only thing
>which does not is that it would be installed.

It's an auxiliary file to solve a build(?)-specific problem, not like
the other rngs. I actually tried to solve this failure yesterday by
adding the news.rng to the spec file and it didn't fit anywhere. So, it
just feels in the wrong place.

I like you suggestion to put the news.rng next to the news.xml, it would
make sense to have them paired and it gets the news.rng out of the way.

>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list


-- 
IBM Systems
Linux on z Systems & Virtualization Development
------------------------------------------------------------------------
IBM Deutschland
Schönaicher Str. 220
71032 Böblingen
Phone: +49 7031 16 1819
E-Mail: bwalk@de.ibm.com
------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294 
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: don't install news.rng file
Posted by Peter Krempa 7 years ago
On Tue, Apr 04, 2017 at 18:24:07 +0100, Daniel Berrange wrote:
> The news.rng file gets picked up by the wildcard match on docs/schemas,
> and so gets installed into /usr/share/libvirt, along with the schemas
> for our API objects. This then generated an RPM build failure, since
> we don't have news.rng in the RPM file list
> 
> The news.rng schema is not something that users of libvirt ever care
> about, since it is purely an internal thing to validate our website
> content.
> 
> So rather than add news.rng to the RPM file list, this changes the
> make rules so that we don't install news.rng at all.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> 
> Technically a built-break fix, but I'm not pushing it, in case people
> have any alternative suggestions. eg we could just put news.rng in
> the tests/ subdirectory instead, letting us keep the wildcard in the
> docs/Makefile.am

I did not put it into tests since we did not have any directory for
schemas there. But that certainly is an option.

Other possibility would be to move it to docs/ along with news.xml. That
way it still can be next to the file and does not match the wildcart.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] docs: Move news.rng out of docs/schemas
Posted by Peter Krempa 7 years ago
docs/schemas directory is meant for schemas which are installed on the
system. The schema for the news file does not need to be installed.
Store it along with the file it describes for simplicity.
---
Patch for the alternative of moving news rng to docs/ along with the file it
should describe.

 docs/{schemas => }/news.rng | 0
 docs/news.xml               | 2 +-
 tests/virschematest.c       | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename docs/{schemas => }/news.rng (100%)

diff --git a/docs/schemas/news.rng b/docs/news.rng
similarity index 100%
rename from docs/schemas/news.rng
rename to docs/news.rng
diff --git a/docs/news.xml b/docs/news.xml
index 9c0dcfd23..2a15b1236 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -17,7 +17,7 @@

      Lines should be kept under 80 columns, and should not exceed 100 columns.

-     This file is validated against docs/schemas/news.rng schema.
+     This file is validated against docs/news.rng schema.

      Use the following template to add a new release section:

diff --git a/tests/virschematest.c b/tests/virschematest.c
index 1f990f7cd..119d4ba39 100644
--- a/tests/virschematest.c
+++ b/tests/virschematest.c
@@ -236,7 +236,7 @@ mymain(void)
     DO_TEST_DIR("storagevol.rng", "storagevolxml2xmlin", "storagevolxml2xmlout",
                 "storagevolschemadata");

-    DO_TEST_FILE("news.rng", "../docs/news.xml");
+    DO_TEST_FILE("../news.rng", "../docs/news.xml");

     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.12.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: Move news.rng out of docs/schemas
Posted by Daniel P. Berrange 7 years ago
On Wed, Apr 05, 2017 at 09:56:13AM +0200, Peter Krempa wrote:
> docs/schemas directory is meant for schemas which are installed on the
> system. The schema for the news file does not need to be installed.
> Store it along with the file it describes for simplicity.
> ---
> Patch for the alternative of moving news rng to docs/ along with the file it
> should describe.
> 
>  docs/{schemas => }/news.rng | 0
>  docs/news.xml               | 2 +-
>  tests/virschematest.c       | 2 +-
>  3 files changed, 2 insertions(+), 2 deletions(-)
>  rename docs/{schemas => }/news.rng (100%)

ACK,

Lets do this instead of my patch.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: Move news.rng out of docs/schemas
Posted by Peter Krempa 7 years ago
On Wed, Apr 05, 2017 at 09:13:00 +0100, Daniel Berrange wrote:
> On Wed, Apr 05, 2017 at 09:56:13AM +0200, Peter Krempa wrote:
> > docs/schemas directory is meant for schemas which are installed on the
> > system. The schema for the news file does not need to be installed.
> > Store it along with the file it describes for simplicity.
> > ---
> > Patch for the alternative of moving news rng to docs/ along with the file it
> > should describe.
> > 
> >  docs/{schemas => }/news.rng | 0
> >  docs/news.xml               | 2 +-
> >  tests/virschematest.c       | 2 +-
> >  3 files changed, 2 insertions(+), 2 deletions(-)
> >  rename docs/{schemas => }/news.rng (100%)
> 
> ACK,
> 
> Lets do this instead of my patch.

Pushed; thanks. Sorry for not noticing that it would get installed.

Peter
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list