﻿id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host
18900,openSUSE Tumbleweed: cannot build RPM packages,Frank Batschulat (Oracle),Frank Batschulat (Oracle),"building RPM packages on openSUSE Tumbleweed fails because the VBOX logic to detect the OS version breaks on Tumbleweed, details below:

{{{
fbatschu@hpbox:/site/ws/vb/trunk> tools/env.sh
tools/env.sh: info: Spawning work shell...
VBox/Trunk fbatschu@hpbox trunk $ kmk clean ; rm -rf out AutoConfig.kmk
 
VBox/Trunk fbatschu@hpbox linux $ rpm/rules binary NOWINE=1 BUILD_TYPE=release KBUILD_TYPE=release
rpm/rules:94: *** failed to detect the release type.  Hack the detection..  Stop.

VBox/Trunk fbatschu@hpbox trunk $ env|grep BUILD_TYPE
KBUILD_TYPE=debug
BUILD_TYPE=debug

VBox/Trunk fbatschu@hpbox linux $ rpm/rules binary NOWINE=1 BUILD_TYPE=release
rpm/rules:94: *** failed to detect the release type.  Hack the detection..  Stop.

VBox/Trunk fbatschu@hpbox linux $ rpm/rules binary NOWINE=1 KBUILD_TYPE=release

rpm/rules:94: *** failed to detect the release type.  Hack the detection..  Stop.
 
VBox/Trunk fbatschu@hpbox trunk $ ./configure
 
VBox/Trunk fbatschu@hpbox trunk $ source /site/ws/vb/trunk/env.sh

VBox/Trunk fbatschu@hpbox trunk $ env |grep BUILD_TYPE
KBUILD_TYPE=debug
BUILD_TYPE=release
 
VBox/Trunk fbatschu@hpbox trunk $ grep BUILD_TYPE env.sh
BUILD_TYPE=""release""
export BUILD_TYPE
 
VBox/Trunk fbatschu@hpbox trunk $ cd src/VBox/Installer/linux
VBox/Trunk fbatschu@hpbox linux $ rpm/rules binary NOWINE=1
rpm/rules:94: *** failed to detect the release type.  Hack the detection..  Stop.
 
VBox/Trunk fbatschu@hpbox linux $ rpm/rules binary NOWINE=1 BUILD_TYPE=release
rpm/rules:94: *** failed to detect the release type.  Hack the detection..  Stop.
}}} 
rpm/rules has this detection logic we fall over on Tumbleweed:
{{{
 89  ifeq ($(rpmrel),)
 90  # look for openSUSE
 91   rpmrel  := $(shell cat /etc/SUSE-brand 2> /dev/null | sed -ne 's/^VERSION *= *\([0-9]*\)\.\([0-9]*\)/openSUSE\1\2/p')
 92  endif
 93  ifeq ($(rpmrel),)
 94   $(error failed to detect the release type.  Hack the detection.)
 95  endif
}}}
fbatschu@hpbox:~> cat /etc/os-release
NAME=""openSUSE Tumbleweed""
# VERSION=""20190828""
ID=""opensuse-tumbleweed""
ID_LIKE=""opensuse suse""
VERSION_ID=""20190828""
PRETTY_NAME=""openSUSE Tumbleweed""
ANSI_COLOR=""0;32""
CPE_NAME=""cpe:/o:opensuse:tumbleweed:20190828""

fbatschu@hpbox:~> ls -la  /etc/SUSE-brand
-rw-r--r-- 1 root root 30 Aug  8 14:00 /etc/SUSE-brand
fbatschu@hpbox:~> cat  /etc/SUSE-brand
openSUSE
VERSION = tumbleweed
 
fbatschu@hpbox:~> cat /etc/SUSE-brand 2> /dev/null | sed -ne 's/^VERSION *= *\([0-9]*\)\.\([0-9]*\)/openSUSE\1\2/p'
fbatschu@hpbox:~> echo $?
0
}}}
",defect,closed,other,VirtualBox 6.0.10,fixed,opensuse Tumbleweed rpm,,all,Linux
