Cédric Bosdonnat
2015-Sep-29 13:59 UTC
[Libguestfs] [PATCH v2 1/2] builder: add opensuse images sources
--- builder/Makefile.am | 3 ++- builder/opensuse.conf.in | 3 +++ builder/opensuse.gpg | 21 +++++++++++++++++++++ configure.ac | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 builder/opensuse.conf.in create mode 100644 builder/opensuse.gpg diff --git a/builder/Makefile.am b/builder/Makefile.am index 4bed54c..e8f8dfb 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -315,7 +315,8 @@ DISTCLEANFILES = .depend # virt-builder's default repository repoconfdir = $(sysconfdir)/xdg/virt-builder/repos.d -repoconf_DATA = libguestfs.conf libguestfs.gpg +repoconf_DATA = libguestfs.conf libguestfs.gpg \ + opensuse.conf opensuse.gpg install-exec-hook: $(LN_S) xdg/virt-builder $(DESTDIR)$(sysconfdir)/virt-builder diff --git a/builder/opensuse.conf.in b/builder/opensuse.conf.in new file mode 100644 index 0000000..80db267 --- /dev/null +++ b/builder/opensuse.conf.in @@ -0,0 +1,3 @@ +[opensuse.org] +uri=http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index +gpgkey=file://@SYSCONFDIR@/xdg/virt-builder/repos.d/opensuse.gpg diff --git a/builder/opensuse.gpg b/builder/opensuse.gpg new file mode 100644 index 0000000..001376f --- /dev/null +++ b/builder/opensuse.gpg @@ -0,0 +1,21 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQENBFImAl0BCACkjaXGvVLHBGTVXVP0khtpUVHqFvCRtaIIMHaX/5oTr3nyehDQ +Ex9VLsSRcNa0QxtnCHFRQzjWWqe+i6pBginnSjucgmjnIKyJsF4l6R+rwAiinHQX +C4s6Lqg/wH9xDPRBrMYFqlc/7MVf0Glhk1+lAxgQjolMt+5AbbrWlBbwc/i+++zl +ES3MaeH8aiwup/ogjhmk0SbCQQ/ib21p3XWBwx2oz/KM6Voq9tKDvMczjzNRY3ZT +6Di3FsUSKI7kgljiNiuN+675YwqEqxWEJgdE5a7Zb67giH1Ik08b5wQiF5jSAICD +DxW7/ibWBvZJnqhqQT2xJpLC5VaJqwkN8o83ABEBAAG0PlZpcnR1YWxpemF0aW9u +IE9CUyBQcm9qZWN0IDxWaXJ0dWFsaXphdGlvbkBidWlsZC5vcGVuc3VzZS5vcmc+ +iQE7BBMBAgAmBQJSJgJdAhsDBQkEHrAABgsJCAcDAgQVAggDBBYCAwECHgECF4AA +CgkQoZP7tXIXT8ITnwf3SVUUoVjVLFCjhIxdet8BL011cJDwr9TwKEQfq4Ybsq5L +5Y1/Zk86rTzrVOZrODLwNRIC3fMuegZV5f85KMggXu37Di+UvX+dQW9v1hte+hAT ++gsqb60kOnE/Yacgkb6D3xIzRudAB2q/xfvHl/hgfn416yGI8NvntT7n4Hk9wT28 +9JSFkun0uaessg77aXlAdsqHwdugm9hELeva89OoYoiZ4d9r4ScTMSj0UkNgnh7g +CyIScZHYqiiOeosUtAX9u1PyUFfFsg9s5snfud7aF48EfXU0RTtZAGKtG4GPDv3q +bYc5TJ2pQzs9y5Bk/jAMR/QQw8CKglBsn1cjYkKViEYEExECAAYFAlImAl0ACgkQ +OzARt2udZSO5yACgr6Ei7QZ+PAmg4Mr5db+4M3aepAEAniU33RaTKBCGkwQi6kHr +4VaII2/E +=l8DH +-----END PGP PUBLIC KEY BLOCK----- diff --git a/configure.ac b/configure.ac index 86ed4a4..98a39c1 100644 --- a/configure.ac +++ b/configure.ac @@ -1734,6 +1734,7 @@ AC_CONFIG_FILES([Makefile bash/Makefile builder/Makefile builder/libguestfs.conf + builder/opensuse.conf builder/test-config/virt-builder/repos.d/test-index.conf builder/test-simplestreams/virt-builder/repos.d/cirros.conf builder/test-website/virt-builder/repos.d/libguestfs.conf -- 2.1.4
Cédric Bosdonnat
2015-Sep-29 13:59 UTC
[Libguestfs] [PATCH v2 2/2] customize: get zypper to eat licenses and gpg keys
Without these flags --install will most likely fail as the GPG key may no be imported in the guest image. --- customize/customize_run.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index 9d97522..ad0ab7f 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -116,7 +116,7 @@ exec >>%s 2>&1 | "yum" -> sprintf "yum -y install %s" quoted_args | "zypper" -> - sprintf "zypper -n in %s" quoted_args + sprintf "zypper -n --gpg-auto-import-keys in -l %s" quoted_args | "unknown" -> error (f_"--install is not supported for this guest operating system") | pm -> @@ -143,7 +143,7 @@ exec >>%s 2>&1 | "yum" -> sprintf "yum -y update" | "zypper" -> - sprintf "zypper update" + sprintf "zypper -n --gpg-auto-import-keys update -l" | "unknown" -> error (f_"--update is not supported for this guest operating system") | pm -> -- 2.1.4
Richard W.M. Jones
2015-Sep-29 16:47 UTC
Re: [Libguestfs] [PATCH v2 1/2] builder: add opensuse images sources
On Tue, Sep 29, 2015 at 03:59:34PM +0200, Cédric Bosdonnat wrote:> --- > builder/Makefile.am | 3 ++- > builder/opensuse.conf.in | 3 +++ > builder/opensuse.gpg | 21 +++++++++++++++++++++ > configure.ac | 1 + > 4 files changed, 27 insertions(+), 1 deletion(-) > create mode 100644 builder/opensuse.conf.in > create mode 100644 builder/opensuse.gpg > > diff --git a/builder/Makefile.am b/builder/Makefile.am > index 4bed54c..e8f8dfb 100644 > --- a/builder/Makefile.am > +++ b/builder/Makefile.am > @@ -315,7 +315,8 @@ DISTCLEANFILES = .depend > # virt-builder's default repository > > repoconfdir = $(sysconfdir)/xdg/virt-builder/repos.d > -repoconf_DATA = libguestfs.conf libguestfs.gpg > +repoconf_DATA = libguestfs.conf libguestfs.gpg \ > + opensuse.conf opensuse.gpgWondering if you need to add these files to EXTRA_DIST? Some automake rules do this implicitly, not sure if *_DATA is one of them.> install-exec-hook: > $(LN_S) xdg/virt-builder $(DESTDIR)$(sysconfdir)/virt-builder > diff --git a/builder/opensuse.conf.in b/builder/opensuse.conf.in > new file mode 100644 > index 0000000..80db267 > --- /dev/null > +++ b/builder/opensuse.conf.in > @@ -0,0 +1,3 @@ > +[opensuse.org] > +uri=http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index > +gpgkey=file://@SYSCONFDIR@/xdg/virt-builder/repos.d/opensuse.gpg > diff --git a/builder/opensuse.gpg b/builder/opensuse.gpg > new file mode 100644 > index 0000000..001376f > --- /dev/null > +++ b/builder/opensuse.gpg > @@ -0,0 +1,21 @@ > +-----BEGIN PGP PUBLIC KEY BLOCK----- > +Version: GnuPG v1.4.5 (GNU/Linux) > + > +mQENBFImAl0BCACkjaXGvVLHBGTVXVP0khtpUVHqFvCRtaIIMHaX/5oTr3nyehDQ > +Ex9VLsSRcNa0QxtnCHFRQzjWWqe+i6pBginnSjucgmjnIKyJsF4l6R+rwAiinHQX > +C4s6Lqg/wH9xDPRBrMYFqlc/7MVf0Glhk1+lAxgQjolMt+5AbbrWlBbwc/i+++zl > +ES3MaeH8aiwup/ogjhmk0SbCQQ/ib21p3XWBwx2oz/KM6Voq9tKDvMczjzNRY3ZT > +6Di3FsUSKI7kgljiNiuN+675YwqEqxWEJgdE5a7Zb67giH1Ik08b5wQiF5jSAICD > +DxW7/ibWBvZJnqhqQT2xJpLC5VaJqwkN8o83ABEBAAG0PlZpcnR1YWxpemF0aW9u > +IE9CUyBQcm9qZWN0IDxWaXJ0dWFsaXphdGlvbkBidWlsZC5vcGVuc3VzZS5vcmc+ > +iQE7BBMBAgAmBQJSJgJdAhsDBQkEHrAABgsJCAcDAgQVAggDBBYCAwECHgECF4AA > +CgkQoZP7tXIXT8ITnwf3SVUUoVjVLFCjhIxdet8BL011cJDwr9TwKEQfq4Ybsq5L > +5Y1/Zk86rTzrVOZrODLwNRIC3fMuegZV5f85KMggXu37Di+UvX+dQW9v1hte+hAT > ++gsqb60kOnE/Yacgkb6D3xIzRudAB2q/xfvHl/hgfn416yGI8NvntT7n4Hk9wT28 > +9JSFkun0uaessg77aXlAdsqHwdugm9hELeva89OoYoiZ4d9r4ScTMSj0UkNgnh7g > +CyIScZHYqiiOeosUtAX9u1PyUFfFsg9s5snfud7aF48EfXU0RTtZAGKtG4GPDv3q > +bYc5TJ2pQzs9y5Bk/jAMR/QQw8CKglBsn1cjYkKViEYEExECAAYFAlImAl0ACgkQ > +OzARt2udZSO5yACgr6Ei7QZ+PAmg4Mr5db+4M3aepAEAniU33RaTKBCGkwQi6kHr > +4VaII2/E > +=l8DH > +-----END PGP PUBLIC KEY BLOCK----- > diff --git a/configure.ac b/configure.ac > index 86ed4a4..98a39c1 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1734,6 +1734,7 @@ AC_CONFIG_FILES([Makefile > bash/Makefile > builder/Makefile > builder/libguestfs.conf > + builder/opensuse.conf > builder/test-config/virt-builder/repos.d/test-index.conf > builder/test-simplestreams/virt-builder/repos.d/cirros.conf > builder/test-website/virt-builder/repos.d/libguestfs.confACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Richard W.M. Jones
2015-Sep-29 16:48 UTC
Re: [Libguestfs] [PATCH v2 2/2] customize: get zypper to eat licenses and gpg keys
On Tue, Sep 29, 2015 at 03:59:35PM +0200, Cédric Bosdonnat wrote:> Without these flags --install will most likely fail as the GPG key > may no be imported in the guest image. > --- > customize/customize_run.ml | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/customize/customize_run.ml b/customize/customize_run.ml > index 9d97522..ad0ab7f 100644 > --- a/customize/customize_run.ml > +++ b/customize/customize_run.ml > @@ -116,7 +116,7 @@ exec >>%s 2>&1 > | "yum" -> > sprintf "yum -y install %s" quoted_args > | "zypper" -> > - sprintf "zypper -n in %s" quoted_args > + sprintf "zypper -n --gpg-auto-import-keys in -l %s" quoted_args > | "unknown" -> > error (f_"--install is not supported for this guest operating system") > | pm -> > @@ -143,7 +143,7 @@ exec >>%s 2>&1 > | "yum" -> > sprintf "yum -y update" > | "zypper" -> > - sprintf "zypper update" > + sprintf "zypper -n --gpg-auto-import-keys update -l" > | "unknown" -> > error (f_"--update is not supported for this guest operating system") > | pm -> > -- > 2.1.4ACK. I will push this one shortly. I'll let Pino push the other patch if he's happy with it. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Pino Toscano
2015-Sep-30 08:44 UTC
Re: [Libguestfs] [PATCH v2 1/2] builder: add opensuse images sources
On Tuesday 29 September 2015 17:47:31 Richard W.M. Jones wrote:> On Tue, Sep 29, 2015 at 03:59:34PM +0200, Cédric Bosdonnat wrote: > > --- > > builder/Makefile.am | 3 ++- > > builder/opensuse.conf.in | 3 +++ > > builder/opensuse.gpg | 21 +++++++++++++++++++++ > > configure.ac | 1 + > > 4 files changed, 27 insertions(+), 1 deletion(-) > > create mode 100644 builder/opensuse.conf.in > > create mode 100644 builder/opensuse.gpg > > > > diff --git a/builder/Makefile.am b/builder/Makefile.am > > index 4bed54c..e8f8dfb 100644 > > --- a/builder/Makefile.am > > +++ b/builder/Makefile.am > > @@ -315,7 +315,8 @@ DISTCLEANFILES = .depend > > # virt-builder's default repository > > > > repoconfdir = $(sysconfdir)/xdg/virt-builder/repos.d > > -repoconf_DATA = libguestfs.conf libguestfs.gpg > > +repoconf_DATA = libguestfs.conf libguestfs.gpg \ > > + opensuse.conf opensuse.gpg > > Wondering if you need to add these files to EXTRA_DIST? Some automake > rules do this implicitly, not sure if *_DATA is one of them.They are installed, so automake should already pack them in the distribution tarball.> > > install-exec-hook: > > $(LN_S) xdg/virt-builder $(DESTDIR)$(sysconfdir)/virt-builder > > diff --git a/builder/opensuse.conf.in b/builder/opensuse.conf.in > > new file mode 100644 > > index 0000000..80db267 > > --- /dev/null > > +++ b/builder/opensuse.conf.in > > @@ -0,0 +1,3 @@ > > +[opensuse.org] > > +uri=http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index > > +gpgkey=file://@SYSCONFDIR@/xdg/virt-builder/repos.d/opensuse.gpg > > diff --git a/builder/opensuse.gpg b/builder/opensuse.gpg > > new file mode 100644 > > index 0000000..001376f > > --- /dev/null > > +++ b/builder/opensuse.gpg > > @@ -0,0 +1,21 @@ > > +-----BEGIN PGP PUBLIC KEY BLOCK----- > > +Version: GnuPG v1.4.5 (GNU/Linux) > > + > > +mQENBFImAl0BCACkjaXGvVLHBGTVXVP0khtpUVHqFvCRtaIIMHaX/5oTr3nyehDQ > > +Ex9VLsSRcNa0QxtnCHFRQzjWWqe+i6pBginnSjucgmjnIKyJsF4l6R+rwAiinHQX > > +C4s6Lqg/wH9xDPRBrMYFqlc/7MVf0Glhk1+lAxgQjolMt+5AbbrWlBbwc/i+++zl > > +ES3MaeH8aiwup/ogjhmk0SbCQQ/ib21p3XWBwx2oz/KM6Voq9tKDvMczjzNRY3ZT > > +6Di3FsUSKI7kgljiNiuN+675YwqEqxWEJgdE5a7Zb67giH1Ik08b5wQiF5jSAICD > > +DxW7/ibWBvZJnqhqQT2xJpLC5VaJqwkN8o83ABEBAAG0PlZpcnR1YWxpemF0aW9u > > +IE9CUyBQcm9qZWN0IDxWaXJ0dWFsaXphdGlvbkBidWlsZC5vcGVuc3VzZS5vcmc+ > > +iQE7BBMBAgAmBQJSJgJdAhsDBQkEHrAABgsJCAcDAgQVAggDBBYCAwECHgECF4AA > > +CgkQoZP7tXIXT8ITnwf3SVUUoVjVLFCjhIxdet8BL011cJDwr9TwKEQfq4Ybsq5L > > +5Y1/Zk86rTzrVOZrODLwNRIC3fMuegZV5f85KMggXu37Di+UvX+dQW9v1hte+hAT > > ++gsqb60kOnE/Yacgkb6D3xIzRudAB2q/xfvHl/hgfn416yGI8NvntT7n4Hk9wT28 > > +9JSFkun0uaessg77aXlAdsqHwdugm9hELeva89OoYoiZ4d9r4ScTMSj0UkNgnh7g > > +CyIScZHYqiiOeosUtAX9u1PyUFfFsg9s5snfud7aF48EfXU0RTtZAGKtG4GPDv3q > > +bYc5TJ2pQzs9y5Bk/jAMR/QQw8CKglBsn1cjYkKViEYEExECAAYFAlImAl0ACgkQ > > +OzARt2udZSO5yACgr6Ei7QZ+PAmg4Mr5db+4M3aepAEAniU33RaTKBCGkwQi6kHr > > +4VaII2/E > > +=l8DH > > +-----END PGP PUBLIC KEY BLOCK----- > > diff --git a/configure.ac b/configure.ac > > index 86ed4a4..98a39c1 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -1734,6 +1734,7 @@ AC_CONFIG_FILES([Makefile > > bash/Makefile > > builder/Makefile > > builder/libguestfs.conf > > + builder/opensuse.conf > > builder/test-config/virt-builder/repos.d/test-index.conf > > builder/test-simplestreams/virt-builder/repos.d/cirros.conf > > builder/test-website/virt-builder/repos.d/libguestfs.conf > > ACK.LGTM as well, I will apply and push. Thanks, -- Pino Toscano
Reasonably Related Threads
- Re: [PATCH v2 1/2] builder: add opensuse images sources
- [PATCH 0/2] virt-builder OpenSUSE images
- [PATCH 2/2] builder: add opensuse images sources
- [PATCH 1/3] inspect: recognize the Void Linux distribution
- [PATCH 1/2] inspection: Set package manager to "unknown" if parsing major version failed (RHBZ#1332025).