Pino Toscano
2018-Oct-01 11:44 UTC
[Libguestfs] [supermin PATCH] rpm: support openSUSE Leap 15
openSUSE Leap 15 has "opensuse-leap" as ID in os-release, so add it both in the detection code of the RPM handler, and in test-harder.sh. --- src/ph_rpm.ml | 2 +- tests/test-harder.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml index b0a5eb2..3caa38e 100644 --- a/src/ph_rpm.ml +++ b/src/ph_rpm.ml @@ -40,7 +40,7 @@ let fedora_detect () let opensuse_detect () Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () && Config.zypper <> "no" && - (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || + (List.mem (Os_release.get_id ()) [ "opensuse-leap"; "opensuse"; "sled"; "sles" ] || try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) let mageia_detect () diff --git a/tests/test-harder.sh b/tests/test-harder.sh index cfa448a..54362de 100755 --- a/tests/test-harder.sh +++ b/tests/test-harder.sh @@ -29,7 +29,7 @@ if [ -f /etc/os-release ]; then distro=$(. /etc/os-release && echo $ID) case "$distro" in fedora|rhel|centos) distro=redhat ;; - opensuse|sled|sles) distro=suse ;; + opensuse-leap|opensuse|sled|sles) distro=suse ;; ubuntu) distro=debian ;; esac elif [ -f /etc/arch-release ]; then -- 2.17.1
Richard W.M. Jones
2018-Oct-01 12:29 UTC
Re: [Libguestfs] [supermin PATCH] rpm: support openSUSE Leap 15
On Mon, Oct 01, 2018 at 01:44:51PM +0200, Pino Toscano wrote:> openSUSE Leap 15 has "opensuse-leap" as ID in os-release, so add it both > in the detection code of the RPM handler, and in test-harder.sh. > --- > src/ph_rpm.ml | 2 +- > tests/test-harder.sh | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml > index b0a5eb2..3caa38e 100644 > --- a/src/ph_rpm.ml > +++ b/src/ph_rpm.ml > @@ -40,7 +40,7 @@ let fedora_detect () > let opensuse_detect () > Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () && > Config.zypper <> "no" && > - (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || > + (List.mem (Os_release.get_id ()) [ "opensuse-leap"; "opensuse"; "sled"; "sles" ] || > try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) > > let mageia_detect () > diff --git a/tests/test-harder.sh b/tests/test-harder.sh > index cfa448a..54362de 100755 > --- a/tests/test-harder.sh > +++ b/tests/test-harder.sh > @@ -29,7 +29,7 @@ if [ -f /etc/os-release ]; then > distro=$(. /etc/os-release && echo $ID) > case "$distro" in > fedora|rhel|centos) distro=redhat ;; > - opensuse|sled|sles) distro=suse ;; > + opensuse-leap|opensuse|sled|sles) distro=suse ;; > ubuntu) distro=debian ;; > esac > elif [ -f /etc/arch-release ]; thenPretty obviously correct, so ACK. Does the same apply in libguestfs m4/guestfs-appliance.m4? Pre-ACK that fix too. 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
Pino Toscano
2018-Oct-01 12:56 UTC
Re: [Libguestfs] [supermin PATCH] rpm: support openSUSE Leap 15
On Monday, 1 October 2018 14:29:22 CEST Richard W.M. Jones wrote:> On Mon, Oct 01, 2018 at 01:44:51PM +0200, Pino Toscano wrote: > > openSUSE Leap 15 has "opensuse-leap" as ID in os-release, so add it both > > in the detection code of the RPM handler, and in test-harder.sh. > > --- > > src/ph_rpm.ml | 2 +- > > tests/test-harder.sh | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml > > index b0a5eb2..3caa38e 100644 > > --- a/src/ph_rpm.ml > > +++ b/src/ph_rpm.ml > > @@ -40,7 +40,7 @@ let fedora_detect () > > let opensuse_detect () > > Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () && > > Config.zypper <> "no" && > > - (List.mem (Os_release.get_id ()) [ "opensuse"; "sled"; "sles" ] || > > + (List.mem (Os_release.get_id ()) [ "opensuse-leap"; "opensuse"; "sled"; "sles" ] || > > try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false) > > > > let mageia_detect () > > diff --git a/tests/test-harder.sh b/tests/test-harder.sh > > index cfa448a..54362de 100755 > > --- a/tests/test-harder.sh > > +++ b/tests/test-harder.sh > > @@ -29,7 +29,7 @@ if [ -f /etc/os-release ]; then > > distro=$(. /etc/os-release && echo $ID) > > case "$distro" in > > fedora|rhel|centos) distro=redhat ;; > > - opensuse|sled|sles) distro=suse ;; > > + opensuse-leap|opensuse|sled|sles) distro=suse ;; > > ubuntu) distro=debian ;; > > esac > > elif [ -f /etc/arch-release ]; then > > Pretty obviously correct, so ACK. > > Does the same apply in libguestfs m4/guestfs-appliance.m4? Pre-ACK > that fix too.Yes, indeed. I'm still testing libguestfs on openSUSE Leap 15.0, in case other changes are needed too. -- Pino Toscano
Reasonably Related Threads
- [supermin PATCH] rpm: generalize openSUSE support
- Re: [supermin PATCH] rpm: support openSUSE Leap 15
- [PATCH 0/2] supermin: use /etc/os-release
- [PATCH 0/4] supermin: use dnf on Mageia
- [supermin][PATCH] os-release: use ID_LIKE as a fallback for SUSE detection