How to package rpms with VirtualBox 5 (using 5.0.6)

Discussions related to using the OSE version of VirtualBox.

How to package rpms with VirtualBox 5 (using 5.0.6)

Postby spatry » 16. Oct 2015, 16:35

Hey,

I got VirtualBox 5.0.6 compiled and packed (.run) on CentOS 6 but I can't figure out how to create the rpms. Tried "rpm/rules binary" but when trying to build the "build-stamp" target make can't find rpm/env.sh. Should that file have been generated earlier with the initial "kmk all" as instructed by the VirtualBox build instructions? Or did the process changed?

Code: Select all   Expand viewCollapse view
bash-4.1$ pwd
/localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux
bash-4.1$ ./rpm/rules
./rpm/rules:123: /localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux/rpm/builddir/version-generated.mk: No such file or directory
. rpm/env.sh && kmk -C /localdisk/data/VirtualBox-5.0.6 /localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux/rpm/builddir/version-generated.mk AUTOCFG=/localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux/rpm/AutoConfig.kmk LOCALCFG=/localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux/rpm/LocalConfig.kmk PATH_OUT=/localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux/rpm/builddir VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1  VBOX_DO_STRIP= VBOX_WITH_MULTIVERSION_PYTHON= VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/VirtualBox-5.0-_centos6\""  VBOX_PACKAGE_DIST=CENTOS_6   --no-print-directory   VBOX_WITH_SYSFS_BY_DEFAULT=1
/bin/sh: rpm/env.sh: No such file or directory
make: *** [/localdisk/data/VirtualBox-5.0.6/src/VBox/Installer/linux/rpm/builddir/version-generated.mk] Error 1
bash-4.1$


Code: Select all   Expand viewCollapse view
bash-4.1$ pwd
/localdisk/data/VirtualBox-5.0.6/out/linux.amd64/release
bash-4.1$ ls -C1 bin
additions
components
DbgPlugInDiggers.so
dtrace
ExtensionPacks
helpers
icons
iPxeBaseBin
loadall.sh
load.sh
nls
postinst-common.sh
prerm-common.sh
routines.sh
scripts
sdk
src
SUPInstall
SUPLoggerCtl
SUPUninstall
testcase
tools
tstAnimate
tstAsmStructsRC
tstAsmStructsRC.debug
tstDeviceStructSizeRC
tstDeviceStructSizeRC.debug
tstInstrEmul
tstInt
tstMicro
tstMicroRC.debug
tstMicroRC.gc
tstPDMAsyncCompletion
tstPDMAsyncCompletionStress
tstSSLCertDownloads
tstVBoxDbg
tstVMM
tstVMMFork
tstVMM-HM
tstVMREQ
tstVMStructRC
tstVMStructRC.debug
VBoxAuthSimple.so
VBoxAuth.so
VBoxAutostart
vboxautostart-service.sh
VBoxBalloonCtrl
vboxballoonctrl-service.sh
VBoxCpuReport
VBoxCreateUSBNode.sh
VBoxDbg.so
VBoxDbgSyms
VBoxDD2R0.debug
VBoxDD2R0.r0
VBoxDD2RC.debug
VBoxDD2RC.rc
VBoxDD2.so
VBoxDDR0.debug
VBoxDDR0.r0
VBoxDDRC.debug
VBoxDDRC.rc
VBoxDD.so
VBoxDDU.so
VBoxDragAndDropSvc.so
vboxdrv.sh
VBoxDTrace
VBoxEFI32.fd
VBoxEFI64.fd
VBoxExtPackHelperApp
VBoxGuestControlSvc.so
VBoxGuestPropSvc.so
VBoxHeadless
VBoxHeadless.so
VBoxHostChannel.so
vbox-img
VBoxKeyboard.so
vboxkeyboard.tar.bz2
VBoxManage
VBoxNetAdpCtl
VBoxNetDHCP
VBoxNetDHCP.so
VBoxNetNAT
VBoxNetNAT.so
VBoxOGLhostcrutil.so
VBoxOGLhosterrorspu.so
VBoxOGLrenderspu.so
VBox.png
VBoxPython2_6.so
VBoxPython.so
VBoxREM.so
VBoxRT.so
VBoxSDL
VBoxSDL.so
VBox.sh
VBoxSharedClipboard.so
VBoxSharedCrOpenGL.so
VBoxSharedFolders.so
vboxshell.py
VBoxSVC
VBoxSysInfo.sh
VBoxTestOGL
VBoxTunctl
VBoxVMMPreload
VBoxVMMPreload.so
VBoxVMM.so
VBoxVolInfo
vboxweb-service.sh
VBoxXPCOMC.so
VBoxXPCOMIPCD
VBoxXPCOM.so
VirtualBox
VirtualBox-5.0.6_OSE-r103037.run
VirtualBox-dbg.tar.bz2
virtualbox.desktop
VirtualBox.so
virtualbox.xml
VMMR0.debug
VMMR0.r0
VMMRC.debug
VMMRC.rc
xpidl
bash-4.1$
Last edited by noteirak on 1. Nov 2015, 02:19, edited 1 time in total.
Reason: Added code tag
spatry
 
Posts: 2
Joined: 16. Oct 2015, 14:28

Re: How to package rpms with VirtualBox 5 (using 5.0.6)

Postby Perryg » 16. Oct 2015, 16:52

Create a /etc/distname file and add your OS version to it (see /src/VBox/Installer/linux/distributions_rpm for the proper syntax)
The LocalConfig.kmk that is in the /trunk and the env.sh also in the /trunk should not matter since you should be running this is the rpm folder.

You may be running into an issue because you have already run the build to make the .run. Make sure you delete the /trunk/out folder before you try to build again and only do the
"/trunk/src/VBox/Installer/linux/rpm/rules binary" Assuming that you have set your host ( extra packages needed ) to be able to build rpm it should work.

If at any point your build fails be sure to clean the build env before attempting again. ( /trunk/src/VBox/Installer/linux/rpm/rules clean )
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to package rpms with VirtualBox 5 (using 5.0.6)

Postby spatry » 29. Oct 2015, 00:45

Thank you, "rpm/rules clean" and "rpm/rules binary" worked. :)
spatry
 
Posts: 2
Joined: 16. Oct 2015, 14:28


Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest