[libvirt] [jenkins-ci PATCH 0/2] guests: Remove readline symlink kludge

The last remaining one! \o/ Andrea Bolognani (2): guests: Install ncurses for libvirt guests: Remove readline symlink kludge guests/playbooks/update/tasks/kludges.yml | 14 -------------- guests/vars/mappings.yml | 8 ++++++++ guests/vars/projects/libvirt.yml | 1 + 3 files changed, 9 insertions(+), 14 deletions(-) -- 2.20.1

As of libvirt commit c98de2173e95, we use pkg-config to obtain CFLAGS and LIBS for readline whenever possible. However, since the readline.pc file contains a Requires.private for a module that's shipped with ncurses (the actual module varies based on the platform) we will end up falling back to the old library detection if said library is not installed on the system. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/vars/mappings.yml | 8 ++++++++ guests/vars/projects/libvirt.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 05d312d..464c403 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -603,6 +603,14 @@ mappings: nano: default: nano + ncurses: + deb: libncurses-dev + pkg: ncurses + rpm: ncurses-devel + Debian9: libncurses5-dev + Ubuntu18: libncurses5-dev + cross-policy-deb: foreign + netcf: deb: libnetcf-dev rpm: netcf-devel diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml index f813f21..688dfa3 100644 --- a/guests/vars/projects/libvirt.yml +++ b/guests/vars/projects/libvirt.yml @@ -38,6 +38,7 @@ packages: - libxml2 - lvm2 - modprobe + - ncurses - netcf - numad - openwsman -- 2.20.1

On Fri, Apr 12, 2019 at 04:31:35PM +0200, Andrea Bolognani wrote:
As of libvirt commit c98de2173e95, we use pkg-config to obtain CFLAGS and LIBS for readline whenever possible. However, since the readline.pc file contains a Requires.private for a module that's shipped with ncurses (the actual module varies based on the platform) we will end up falling back to the old library detection if said library is not installed on the system.
Wow, this looks like a packaging dep bug on every platform :-(
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/vars/mappings.yml | 8 ++++++++ guests/vars/projects/libvirt.yml | 1 + 2 files changed, 9 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 05d312d..464c403 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -603,6 +603,14 @@ mappings: nano: default: nano
+ ncurses: + deb: libncurses-dev + pkg: ncurses + rpm: ncurses-devel + Debian9: libncurses5-dev + Ubuntu18: libncurses5-dev + cross-policy-deb: foreign + netcf: deb: libnetcf-dev rpm: netcf-devel diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml index f813f21..688dfa3 100644 --- a/guests/vars/projects/libvirt.yml +++ b/guests/vars/projects/libvirt.yml @@ -38,6 +38,7 @@ packages: - libxml2 - lvm2 - modprobe + - ncurses - netcf - numad - openwsman -- 2.20.1
-- 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 :|

On Fri, 2019-04-12 at 15:36 +0100, Daniel P. Berrangé wrote:
On Fri, Apr 12, 2019 at 04:31:35PM +0200, Andrea Bolognani wrote:
As of libvirt commit c98de2173e95, we use pkg-config to obtain CFLAGS and LIBS for readline whenever possible. However, since the readline.pc file contains a Requires.private for a module that's shipped with ncurses (the actual module varies based on the platform) we will end up falling back to the old library detection if said library is not installed on the system.
Wow, this looks like a packaging dep bug on every platform :-(
Either that or the readline.pc file is not entirely accurate, which would not surprise me seeing how wrong they got include path handling so far O:-) When you think about it, so far we have been able to link against readline on all platforms using -lreadline only; plus FreeBSD folks are commenting out the Requires.private line entirely anyway. So it looks to me like readline.pc is being extremely conservative and they could get away with not having a Requires.private in the first place - but then again it might be needed on platforms that are outside of our support list but not theirs... Whatever it is, including ncurses among our requirements is safe enough (in fact, our .spec file already does so) and doesn't significantly impact the size of our guest / container images, so I'm perfectly happy handling it this way. -- Andrea Bolognani / Red Hat / Virtualization

It's no longer needed as of libvirt commit dfe06e6202e4. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/update/tasks/kludges.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/guests/playbooks/update/tasks/kludges.yml b/guests/playbooks/update/tasks/kludges.yml index 708e7a4..3648514 100644 --- a/guests/playbooks/update/tasks/kludges.yml +++ b/guests/playbooks/update/tasks/kludges.yml @@ -1,18 +1,4 @@ --- -# libvirt can't detect these automatically at the moment, so a kludge -# is required. Can be dropped it as soon as libvirt has been fixed -- name: Create compatibility symlinks - file: - src: '/usr/local/{{ item }}' - dest: '/usr/{{ item }}' - state: link - force: yes - with_items: - - include/readline - - lib/libreadline.so - when: - - os_name == 'FreeBSD' - # FreeBSD compiles bash without defining SSH_SOURCE_BASHRC, which means # it won't try to detect when it's spawned by ssh and source ~/.bashrc # when that's the case. Our workaround is setting $BASH_ENV globally -- 2.20.1

On Fri, Apr 12, 2019 at 04:31:36PM +0200, Andrea Bolognani wrote:
It's no longer needed as of libvirt commit dfe06e6202e4.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/update/tasks/kludges.yml | 14 -------------- 1 file changed, 14 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé