[libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario

Daniel P. Berrangé posted 4 patches 7 years, 2 months ago
[libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Daniel P. Berrangé 7 years, 2 months ago
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .travis.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 41a293451c..0328fcb8f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,8 @@ matrix:
   include:
     - compiler: gcc
       dist: precise
+      env:
+        - CONFIGURE_ARGS=--with-init-script=upstart
     # Special scenario to run distcheck, so we don't waste time duplicating
     # work in all the other scenarios. Doesn't work on precise due to the
     # CVE-2012-3386 flaw being present on that Ubuntu version
@@ -103,7 +105,7 @@ before_install:
   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew upgrade && brew install rpcgen yajl; fi
 
 before_script:
-  - mkdir build && cd build && ../autogen.sh
+  - mkdir build && cd build && ../autogen.sh $CONFIGURE_ARGS
 
 script:
   # Many unit tests still fail on macOS, and there are a bunch of issues with
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Andrea Bolognani 7 years, 2 months ago
On Fri, 2018-02-23 at 12:00 +0000, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  .travis.yml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 41a293451c..0328fcb8f1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -6,6 +6,8 @@ matrix:
>    include:
>      - compiler: gcc
>        dist: precise
> +      env:
> +        - CONFIGURE_ARGS=--with-init-script=upstart

Both precise and trusty use upstart, so there's no reason not
to apply this to both, especially if we're going trusty-only as
suggested earlier. Limiting it to the gcc build is rather strange
as well.

Even macOS doesn't seem bothered by that at all, though it's kinda
nasty to install an upstart init script there. Not that it would
break anything, but it just feels wrong.

Perhaps we should improve our init system detection so that Ubuntu
releases older than 16.04 and CentOS 6 will automatically choose
upstart rather than passing this explicitly? The latter detects
init system "redhat", and frankly I'm not quite sure what that's
even supposed to be :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Daniel P. Berrangé 7 years, 2 months ago
On Tue, Feb 27, 2018 at 04:14:21PM +0100, Andrea Bolognani wrote:
> On Fri, 2018-02-23 at 12:00 +0000, Daniel P. Berrangé wrote:
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  .travis.yml | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/.travis.yml b/.travis.yml
> > index 41a293451c..0328fcb8f1 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -6,6 +6,8 @@ matrix:
> >    include:
> >      - compiler: gcc
> >        dist: precise
> > +      env:
> > +        - CONFIGURE_ARGS=--with-init-script=upstart
> 
> Both precise and trusty use upstart, so there's no reason not
> to apply this to both, especially if we're going trusty-only as
> suggested earlier. Limiting it to the gcc build is rather strange
> as well.

The initscript handling code is only exercised if you run 'make install'
and only the 'make distcheck' rule I added to precise will exercise
'make install'.

> Even macOS doesn't seem bothered by that at all, though it's kinda
> nasty to install an upstart init script there. Not that it would
> break anything, but it just feels wrong.

We're not running 'make install' on macOS so its a no-op :-)
 
> Perhaps we should improve our init system detection so that Ubuntu
> releases older than 16.04 and CentOS 6 will automatically choose
> upstart rather than passing this explicitly? The latter detects
> init system "redhat", and frankly I'm not quite sure what that's
> even supposed to be :)

Even though RHEL-6 supports upstart, I'm fairly sure we always
deployed RHEL-6 using traditional initscripts, not the upstart
scripts.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Daniel P. Berrangé 7 years, 2 months ago
On Tue, Feb 27, 2018 at 03:19:44PM +0000, Daniel P. Berrangé wrote:
> On Tue, Feb 27, 2018 at 04:14:21PM +0100, Andrea Bolognani wrote:
> > On Fri, 2018-02-23 at 12:00 +0000, Daniel P. Berrangé wrote:
> > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > ---
> > >  .travis.yml | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/.travis.yml b/.travis.yml
> > > index 41a293451c..0328fcb8f1 100644
> > > --- a/.travis.yml
> > > +++ b/.travis.yml
> > > @@ -6,6 +6,8 @@ matrix:
> > >    include:
> > >      - compiler: gcc
> > >        dist: precise
> > > +      env:
> > > +        - CONFIGURE_ARGS=--with-init-script=upstart
> > 
> > Both precise and trusty use upstart, so there's no reason not
> > to apply this to both, especially if we're going trusty-only as
> > suggested earlier. Limiting it to the gcc build is rather strange
> > as well.
> 
> The initscript handling code is only exercised if you run 'make install'
> and only the 'make distcheck' rule I added to precise will exercise
> 'make install'.

Opps, I forgot the very next patch enables make install everywhere :-)

> > Even macOS doesn't seem bothered by that at all, though it's kinda
> > nasty to install an upstart init script there. Not that it would
> > break anything, but it just feels wrong.
> 
> We're not running 'make install' on macOS so its a no-op :-)
>  
> > Perhaps we should improve our init system detection so that Ubuntu
> > releases older than 16.04 and CentOS 6 will automatically choose
> > upstart rather than passing this explicitly? The latter detects
> > init system "redhat", and frankly I'm not quite sure what that's
> > even supposed to be :)
> 
> Even though RHEL-6 supports upstart, I'm fairly sure we always
> deployed RHEL-6 using traditional initscripts, not the upstart
> scripts.
> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Andrea Bolognani 7 years, 2 months ago
On Tue, 2018-02-27 at 15:19 +0000, Daniel P. Berrangé wrote:
> > Both precise and trusty use upstart, so there's no reason not
> > to apply this to both, especially if we're going trusty-only as
> > suggested earlier. Limiting it to the gcc build is rather strange
> > as well.
> 
> The initscript handling code is only exercised if you run 'make install'
> and only the 'make distcheck' rule I added to precise will exercise
> 'make install'.

That changes with patch 4/4, where you introduce a call to 'make
install' in the global script.

Either way, there's no downside in having the definition in the
global environment, as it makes everything tidier and easier to
reason about.

> > Even macOS doesn't seem bothered by that at all, though it's kinda
> > nasty to install an upstart init script there. Not that it would
> > break anything, but it just feels wrong.
> 
> We're not running 'make install' on macOS so its a no-op :-)

Yes we are, at least as of patch 4/4.

> > Perhaps we should improve our init system detection so that Ubuntu
> > releases older than 16.04 and CentOS 6 will automatically choose
> > upstart rather than passing this explicitly? The latter detects
> > init system "redhat", and frankly I'm not quite sure what that's
> > even supposed to be :)
> 
> Even though RHEL-6 supports upstart, I'm fairly sure we always
> deployed RHEL-6 using traditional initscripts, not the upstart
> scripts.

So we have on Ubuntu, apparently.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Daniel P. Berrangé 7 years, 2 months ago
On Tue, Feb 27, 2018 at 04:43:18PM +0100, Andrea Bolognani wrote:
> On Tue, 2018-02-27 at 15:19 +0000, Daniel P. Berrangé wrote:
> > > Both precise and trusty use upstart, so there's no reason not
> > > to apply this to both, especially if we're going trusty-only as
> > > suggested earlier. Limiting it to the gcc build is rather strange
> > > as well.
> > 
> > The initscript handling code is only exercised if you run 'make install'
> > and only the 'make distcheck' rule I added to precise will exercise
> > 'make install'.
> 
> That changes with patch 4/4, where you introduce a call to 'make
> install' in the global script.
> 
> Either way, there's no downside in having the definition in the
> global environment, as it makes everything tidier and easier to
> reason about.
> 
> > > Even macOS doesn't seem bothered by that at all, though it's kinda
> > > nasty to install an upstart init script there. Not that it would
> > > break anything, but it just feels wrong.
> > 
> > We're not running 'make install' on macOS so its a no-op :-)
> 
> Yes we are, at least as of patch 4/4.
> 
> > > Perhaps we should improve our init system detection so that Ubuntu
> > > releases older than 16.04 and CentOS 6 will automatically choose
> > > upstart rather than passing this explicitly? The latter detects
> > > init system "redhat", and frankly I'm not quite sure what that's
> > > even supposed to be :)
> > 
> > Even though RHEL-6 supports upstart, I'm fairly sure we always
> > deployed RHEL-6 using traditional initscripts, not the upstart
> > scripts.
> 
> So we have on Ubuntu, apparently.

While upstream libvirt may be installing init scripts on Ubuntu, their
own dpkg setup will use the upstart scripts :-) That is something we
could usefully fix though.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] travis: test upstart script handling on precise distro scenario
Posted by Andrea Bolognani 7 years, 2 months ago
On Tue, 2018-02-27 at 15:46 +0000, Daniel P. Berrangé wrote:
> > > Even though RHEL-6 supports upstart, I'm fairly sure we always
> > > deployed RHEL-6 using traditional initscripts, not the upstart
> > > scripts.
> > 
> > So we have on Ubuntu, apparently.
> 
> While upstream libvirt may be installing init scripts on Ubuntu, their
> own dpkg setup will use the upstart scripts :-) That is something we
> could usefully fix though.

Actually, they pass --with-init-script=none and install their own
upstart script, at least in trusty. One has to wonder if there's
any point in keeping around upstart integration at all these days.

-- 
Andrea Bolognani / Red Hat / Virtualization

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