#18900 closed defect (fixed)
openSUSE Tumbleweed: cannot build RPM packages
Reported by: | Frank Batschulat (Oracle) | Owned by: | Frank Batschulat (Oracle) |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.0.10 |
Keywords: | opensuse Tumbleweed rpm | Cc: | |
Guest type: | all | Host type: | Linux |
Description
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 }}}
Change History (10)
comment:1 by , 5 years ago
Keywords: | opensuse Tumbleweed rpm added |
---|
follow-up: 4 comment:3 by , 5 years ago
Since this is the rolling release train of openSUSE I filed this bug more for documentation purposes then anything else in case others try the same and wonder.
comment:4 by , 5 years ago
Replying to fbatschu:
Since this is the rolling release train of openSUSE I filed this bug more for documentation purposes then anything else in case others try the same and wonder.
Thanks Frank, I'll keep it in mind if anyone asks in the forums and/or files a new ticket.
Just to be 100% clear:
- OpenSUSE official releases work fine, up to (and including) 15.1, the latest as of this writing,
- OpenSUSE rolling release (Tumbleweed) fail.
comment:5 by , 5 years ago
fwiw, openSUSE itself can and did produced RPMs for Tumbleweed:
S | Name | Summary | Type --+--------------------------------+--------------------------------------------------+-------- | python3-virtualbox | Python bindings for virtualbox | package | virtualbox | VirtualBox is an Emulator | package | virtualbox-devel | Devel files for virtualbox | package | virtualbox-guest-desktop-icons | Icons for guest desktop files | package | virtualbox-guest-source | Source files for virtualbox guest kernel modules | package | virtualbox-guest-tools | VirtualBox guest tools | package | virtualbox-guest-x11 | VirtualBox X11 drivers for mouse and video | package | virtualbox-host-source | Source files for virtualbox host kernel modules | package | virtualbox-kmp-default | Kernel modules for VirtualBox | package | virtualbox-qt | Qt GUI part for virtualbox | package | virtualbox-vnc | VNC desktop sharing | package | virtualbox-websrv | WebService GUI part for virtualbox | package $sudo zypper install virtualbox virtualbox-guest-tools Loading repository data... Reading installed packages... Resolving package dependencies... The following 4 NEW packages are going to be installed: virtualbox virtualbox-guest-tools virtualbox-kmp-default virtualbox-qt The following recommended package was automatically selected: virtualbox-qt 4 new packages to install. Overall download size: 38.6 MiB. Already cached: 0 B. After the operation, additional 102.0 MiB will be used. Continue? [y/n/v/...? shows all options] (y): y Retrieving package virtualbox-kmp-default-6.0.14_k5.3.12_1-2.6.x86_64 (1/4), 349.3 KiB ( 1.7 MiB unpacked) Retrieving: virtualbox-kmp-default-6.0.14_k5.3.12_1-2.6.x86_64.rpm .............................................[done (567.3 KiB/s)] Retrieving package virtualbox-guest-tools-6.0.14-2.6.x86_64 (2/4), 727.2 KiB ( 3.6 MiB unpacked) Retrieving: virtualbox-guest-tools-6.0.14-2.6.x86_64.rpm .......................................................[done (537.3 KiB/s)] Retrieving package virtualbox-6.0.14-2.6.x86_64 (3/4), 12.2 MiB ( 38.6 MiB unpacked) Retrieving: virtualbox-6.0.14-2.6.x86_64.rpm ...................................................................[done (827.6 KiB/s)] Retrieving package virtualbox-qt-6.0.14-2.6.x86_64 (4/4), 25.3 MiB ( 58.1 MiB unpacked) Retrieving: virtualbox-qt-6.0.14-2.6.x86_64.rpm ................................................................[done (827.5 KiB/s)]
https://rpmfind.net/linux/RPM/opensuse/tumbleweed/x86_64/virtualbox-6.0.14-2.6.x86_64.html
https://rpmfind.net/linux/opensuse/tumbleweed/repo/oss/x86_64/virtualbox-6.0.14-2.6.x86_64.rpm
So we should find out whats broken for us in our own build process. Ideally they could have told us ;-)
comment:6 by , 5 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:7 by , 5 years ago
so turns out the fix is straight forward and small actually:
VBox/Trunk root@hpbox trunk # svn status M src/VBox/Installer/linux/distributions_rpm M src/VBox/Installer/linux/rpm/rules VBox/Trunk root@hpbox trunk # svn diff Index: src/VBox/Installer/linux/distributions_rpm =================================================================== --- src/VBox/Installer/linux/distributions_rpm (revision 135815) +++ src/VBox/Installer/linux/distributions_rpm (working copy) @@ -1,3 +1,4 @@ +openSUSETW = OPENSUSE_TW openSUSE150 = OPENSUSE_15_0 openSUSE132 = OPENSUSE_13_2 openSUSE131 = OPENSUSE_13_1 Index: src/VBox/Installer/linux/rpm/rules =================================================================== --- src/VBox/Installer/linux/rpm/rules (revision 135815) +++ src/VBox/Installer/linux/rpm/rules (working copy) @@ -91,7 +91,11 @@ # look for openSUSE rpmrel := $(shell cat /etc/SUSE-brand 2> /dev/null | sed -ne 's/^VERSION *= *\([0-9]*\)\.\([0-9]*\)/openSUSE\1\2/p') endif + # look for openSUSE Tumbleweed ifeq ($(rpmrel),) + rpmrel := $(shell cat /etc/SUSE-brand 2> /dev/null | sed -ne 's/^VERSION *= *tumbleweed/openSUSETW/p') + endif + ifeq ($(rpmrel),) $(error failed to detect the release type. Hack the detection.) endif @@ -103,7 +107,7 @@ ifeq ($(filter-out el5 el6 el7 el8 fedora18 fedora19 fedora20 fedora21 fedora22 fedora24 fedora25 fedora26 fedora29 fedora31,$(rpmrel)),) rpmspec := rpm_redhat endif - ifeq ($(filter-out openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114 openSUSE123 openSUSE131 openSUSE132 openSUSE150,$(rpmrel)),) + ifeq ($(filter-out openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114 openSUSE123 openSUSE131 openSUSE132 openSUSE150 openSUSETW,$(rpmrel)),) rpmspec := rpm_suse endif ifeq ($(rpmspec),)
With this patch, we are now able to properly build RPM packages on openSUSE Tumbleweed right out of our workspace and the containing build system.
VBox/Trunk root@hpbox linux # pwd /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux VBox/Trunk root@hpbox linux # export KBUILD_TYPE=release ; export BUILD_TYPE=release VBox/Trunk root@hpbox linux # rpm/rules binary NOWINE=1 NODOCS=1 [...] Processing files: VirtualBox-6.1-6.1.3_openSUSETW-1.x86_64 warning: Missing build-id in /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/BUILDROOT/VirtualBox-6.1-6.1.3_openSUSETW-1.x86_64/usr/lib/virtualbox/chrpath warning: absolute symlink: /usr/bin/vbox-img -> /usr/lib/virtualbox/vbox-img warning: absolute symlink: /usr/bin/vboximg-mount -> /usr/lib/virtualbox/vboximg-mount warning: absolute symlink: /usr/src/vboxhost-6.1.3 -> /usr/share/virtualbox/src/vboxhost Provides: VirtualBox-6.1 = 6.1.3_openSUSETW-1 VirtualBox-6.1(x86-64) = 6.1.3_openSUSETW-1 application() application(virtualbox.desktop) libvboxjxpcom.so()(64bit) mimehandler(application/x-virtualbox-ova) mimehandler(application/x-virtualbox-ovf) mimehandler(application/x-virtualbox-vbox) mimehandler(application/x-virtualbox-vbox-extpack) python3.7dist(vboxapi) = 1 python3dist(vboxapi) = 1 Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(pre): /bin/sh Requires(post): /bin/sh Requires(preun): /bin/sh Requires(postun): /bin/sh Requires: /bin/sh /usr/bin/env libGL.so.1()(64bit) libQt5Core.so.5()(64bit) libQt5Core.so.5(Qt_5)(64bit) libQt5Core.so.5(Qt_5.13)(64bit) libQt5Gui.so.5()(64bit) libQt5Gui.so.5(Qt_5)(64bit) libQt5OpenGL.so.5()(64bit) libQt5OpenGL.so.5(Qt_5)(64bit) libQt5PrintSupport.so.5()(64bit) libQt5PrintSupport.so.5(Qt_5)(64bit) libQt5Widgets.so.5()(64bit) libQt5Widgets.so.5(Qt_5)(64bit) libQt5X11Extras.so.5()(64bit) libQt5X11Extras.so.5(Qt_5)(64bit) libSDL-1.2.so.0()(64bit) libX11.so.6()(64bit) libXcursor.so.1()(64bit) libXext.so.6()(64bit) libXmu.so.6()(64bit) libXt.so.6()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.10)(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.15)(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.28)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.6)(64bit) libc.so.6(GLIBC_2.7)(64bit) libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) libcurl.so.4()(64bit) libdevmapper.so.1.03()(64bit) libdevmapper.so.1.03(Base)(64bit) libdevmapper.so.1.03(DM_1_02_97)(64bit) libdl.so.2()(64bit) libdl.so.2(GLIBC_2.2.5)(64bit) libdl.so.2(GLIBC_2.3.4)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libm.so.6(GLIBC_2.27)(64bit) libm.so.6(GLIBC_2.29)(64bit) libopus.so.0()(64bit) libpng16.so.16()(64bit) libpng16.so.16(PNG16_0)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.2)(64bit) libpthread.so.0(GLIBC_2.3.3)(64bit) libpthread.so.0(GLIBC_2.3.4)(64bit) librt.so.1()(64bit) librt.so.1(GLIBC_2.2.5)(64bit) librt.so.1(GLIBC_2.3.3)(64bit) libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.8)(64bit) libstdc++.so.6(CXXABI_1.3.9)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.15)(64bit) libstdc++.so.6(GLIBCXX_3.4.20)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libvpx.so.6()(64bit) libxcb.so.1()(64bit) libxml2.so.2()(64bit) libxml2.so.2(LIBXML2_2.4.30)(64bit) libxml2.so.2(LIBXML2_2.6.0)(64bit) libxml2.so.2(LIBXML2_2.6.8)(64bit) libz.so.1()(64bit) python(abi) = 3.7 rtld(GNU_HASH) Processing files: VirtualBox-6.1-debugsource-6.1.3_openSUSETW-1.x86_64 warning: Empty %files file /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/BUILD/VirtualBox-6.1-6.1.3_openSUSETW/debugsourcefiles.list Processing files: VirtualBox-6.1-debuginfo-6.1.3_openSUSETW-1.x86_64 Provides: VirtualBox-6.1-debuginfo = 6.1.3_openSUSETW-1 VirtualBox-6.1-debuginfo(x86-64) = 6.1.3_openSUSETW-1 debuginfo(build-id) = 0380bde02370220e99472b7c86f4d657bed7be03 debuginfo(build-id) = 0ca78ee3c2c68409eac2cd96a36a6aa5f41f6a4a debuginfo(build-id) = 14db2ab3a119a9399930f7833d7fe232df4ec3ad debuginfo(build-id) = 1d59ec75df8abe97f6a447f519e0f2d6f6a02977 debuginfo(build-id) = 25115a1d11a08c797e26cb49ad86bc423dcf02f4 debuginfo(build-id) = 2564389a85a95d0bfa9a1433f202007ea440d706 debuginfo(build-id) = 26076f729b70e8cd159c3cd07808e16caf63b4a9 debuginfo(build-id) = 26da3bf78530095f8bfb2de206d1e07ae37b3644 debuginfo(build-id) = 2fd8aaa7e96acfeddb3de7e4c978d8dd253c7d44 debuginfo(build-id) = 3269e34d7fe04c9d30ce6369ca52a0dac9347227 debuginfo(build-id) = 3393fda8b0502844b4b893ee9f9ba1181de672a1 debuginfo(build-id) = 3dc27115ba5e19bb050f18da577eb4098336b977 debuginfo(build-id) = 4365a79ed529db9d4d98f2e667fbc845bc737bea debuginfo(build-id) = 4af5a010a2bad5d58a3b0eeb2e028cf23a7808fc debuginfo(build-id) = 4cb403bb4668644e06e1695c4308a2835d1500cd debuginfo(build-id) = 4fcef55b8eda0a64e4b9121c0464274ce49f9466 debuginfo(build-id) = 52f55e3e49dde1b63346bf87f7e33a79567653f1 debuginfo(build-id) = 56557a6859556b1e9c731c7aa600c0b40033788c debuginfo(build-id) = 595dbdfe2de83ad2b35119d3c7f75f20b9c576d3 debuginfo(build-id) = 5f1fd7ccd33a56aef5f28d011d7641c7157da017 debuginfo(build-id) = 60a45e437109dbf7a9228b06ab72384e1b932773 debuginfo(build-id) = 637a380d1576fdf825278e70e4b321f73ac6ef29 debuginfo(build-id) = 69048ecdd821d60100fda752e41f0c7e8e53b159 debuginfo(build-id) = 6959f79e6393da4c8bfb91ecb9ddced503e40285 debuginfo(build-id) = 6fb35e59b44b1f73b21be6fd49e56acca7b89b9c debuginfo(build-id) = 7c56a3026cbe199c987562e92d4fade58cd26503 debuginfo(build-id) = 7fbcec9ac0960551eaa6c75cf7dd92f82b850495 debuginfo(build-id) = 83fa8a20fbd3a9d4bcbfd8a99fdcc7af09dd3c4c debuginfo(build-id) = 85dc5529f920f6e11ff22778e500dc58bc554d60 debuginfo(build-id) = 86dab56b886ae1f6270ebc42f8aca77020abea8e debuginfo(build-id) = 93674df71c7599a318183a53714758ed31576c29 debuginfo(build-id) = 9a18bfc6471a11f06722750b77446e67fea33b66 debuginfo(build-id) = 9a9fd6f1c0fec7e070f0b7052f4c8f5cdbae2c34 debuginfo(build-id) = 9e0971733bfcffa400fcb6191a02da3329bf1e03 debuginfo(build-id) = a0491a774b336795944011c9b64740db09a81796 debuginfo(build-id) = a15b09f369438c067636a4d7ff6ffc3e76e8dace debuginfo(build-id) = a221c56755b1fbdb6787a8848a1e17645a780af6 debuginfo(build-id) = a431e92988cd220f9274a4ccc29eb2e7f1f140c8 debuginfo(build-id) = b13d93d10e1a8baedd3274f99b901459690d0349 debuginfo(build-id) = b5690c2d832027c98a1188a111f233fdba322e6e debuginfo(build-id) = bab0dbcc67293424860804871b98c699163985bf debuginfo(build-id) = c2267369d8c27e064415d4b4888ea8fdf60ff03d debuginfo(build-id) = c4be2981dd17d115dd1debb2559a058e77793a36 debuginfo(build-id) = c69dfd4423787359557d05187a97afeb45feb3a0 debuginfo(build-id) = c71fea6e95d6c5f905b5b6868ce417f4f12e93f0 debuginfo(build-id) = cfe2fca2c03baf8ba8a8294c2161443d8b562b0d debuginfo(build-id) = d56f02ceb2cb62859a18263e5d64f6924d8b2b21 debuginfo(build-id) = de2c5046891342b331807c00e59ffbebec24be3a debuginfo(build-id) = e16ade7b7a2dd1d12b0d5643cfedaf66d31468df debuginfo(build-id) = e3b0d463efb0867b402edf9935aff76c10c1bb6d debuginfo(build-id) = edea0ad4b283a14207ed02613504bce31c1bcbc3 debuginfo(build-id) = f11746d5ab496cb0bcb664aea711e8f3a1873c49 debuginfo(build-id) = f9428f39485ecfedb1526fd81a33d1be2c70d397 debuginfo(build-id) = fb37639ce6cbd76d6540a166ead90c1fa6bbc770 debuginfo(build-id) = fef65aba8b554ca353cee6ec4131cb0292a6dd28 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Recommends: VirtualBox-6.1-debugsource(x86-64) = 6.1.3_openSUSETW-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/BUILDROOT/VirtualBox-6.1-6.1.3_openSUSETW-1.x86_64 Wrote: /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/RPMS/x86_64/VirtualBox-6.1-debugsource-6.1.3_openSUSETW-1.x86_64.rpm Wrote: /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/RPMS/x86_64/VirtualBox-6.1-6.1.3_openSUSETW-1.x86_64.rpm Wrote: /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/RPMS/x86_64/VirtualBox-6.1-debuginfo-6.1.3_openSUSETW-1.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.ieSw8U + umask 022 + cd /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/BUILD + cd VirtualBox-6.1-6.1.3_openSUSETW + rm -rf /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/BUILDROOT/VirtualBox-6.1-6.1.3_openSUSETW-1.x86_64 + rm -rf filelists Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.RTsKOU + umask 022 + cd /site/ws/vbtrunkrpm/trunk/src/VBox/Installer/linux/rpmbuild/BUILD + rm -rf VirtualBox-6.1-6.1.3_openSUSETW + rm -rf filelists mv rpmbuild/RPMS/*/VirtualBox-6.1-debug* /site/ws/vbtrunkrpm || true file=`find rpmbuild/RPMS -name VirtualBox-6.1*rpm -print`; \ mv $file /site/ws/vbtrunkrpm }}}} VBox/Trunk root@hpbox linux # ls /site/ws/vbtrunkrpm .svn VirtualBox-6.1-debuginfo-6.1.3_openSUSETW-1.x86_64.rpm trunk VirtualBox-6.1-6.1.3_openSUSETW-1.x86_64.rpm VirtualBox-6.1-debugsource-6.1.3_openSUSETW-1.x86_64.rpm
comment:8 by , 5 years ago
comment:9 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
on openSUSE 15.1 the picture is this instead: cat /etc/SUSE-brand