LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-08-2019, 06:36 PM   #1
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Rep: Reputation: 66
VirtualBox Additions Slackware Package


Greetings Slackers...

I want to create a Slackware package with the VirtualBox guest additions in it. The latest official ones, not the old 5.0.40 version on Slackbuilds. I don't need anything in this package other than the ability to execute programs in the guest, but a complete package would of course be nice.

Creating a Slack build script to compile the kernel modules and package up the binaries seems prohibitively complicated, so I'm left with (I think) two options:

1) Look for recently changed files and so capture the files/symlinks that got installed when I ran the installer

2) Watch the file system using some software that will give me callbacks on changes.

I'm just wondering how other people are solving/have solved this problem. I know I can google all sorts of possible solutions to this but I'm looking for real-life experiences, ideally giving me a generated package, or enough bits that I don't have too much coding to do to finish the job.

many thanks,
Biff.
 
Old 11-08-2019, 08:44 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,279

Rep: Reputation: 609Reputation: 609Reputation: 609Reputation: 609Reputation: 609Reputation: 609
Quote:
Originally Posted by bifferos View Post
Greetings Slackers...

I want to create a Slackware package with the VirtualBox guest additions in it.
Why? It all gets installed under /opt. There's no need to package it. I don't package VirtualBox or LibreOffice for the same reason.
 
Old 11-08-2019, 09:50 PM   #3
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Original Poster
Rep: Reputation: 66
Quote:
Originally Posted by rkelsen View Post
Why? It all gets installed under /opt. There's no need to package it. I don't package VirtualBox or LibreOffice for the same reason.
For my own personal VM? Yes, but it's not for that. I need the package, and I'd very much appreciate not having to argue about that here, even if you are just trying to be helpful.
 
Old 11-08-2019, 10:34 PM   #4
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware, Proxmox, Debian, CentOS
Posts: 1,262

Rep: Reputation: Disabled
Quote:
I'm just wondering how other people are solving/have solved this problem.
I'm using VirtualBox 5.2.28 on 14.2 64-bit. I've been using that branch for a long time. I modified the 5.0.40 SBo built script. Look here for a discussion about modifying the build script.

For my host systems I much prefer packages. For my VMs I use the main and kernel module build scripts. The kernel module package gets rebuilt occasionally. For example, today I updated to 4.4.199 and rebuilt the kernel module package.

Mostly because VMs are "disposable," for VirtualBox guest systems I never use a package, regardless of the OS in the VM. Instead I insert the GA ISO and install from there with the guest system OS prompts/dialogs. While not a hard requirement, if a VM remains on my system for a while and I update the main VirtualBox package, I repeat the GA ISO process to keep the two versions in sync.

Loosely related, at work we use Proxmox (free/libre software). Mostly for servers with no GUI, but we have three Windows VMs using the virtio drivers, which is somewhat the equivalent of VirtualBox GA.
 
Old 11-08-2019, 11:27 PM   #5
slackware-current
Member
 
Registered: Jun 2019
Posts: 50

Rep: Reputation: Disabled
Been this route use VB . Just use KISS and let VB do what they do Slackware is built for what they do.
Slackware HISS And VB run is made to go together. PKG will break.
 
Old 11-09-2019, 12:41 AM   #6
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 986

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Quote:
Originally Posted by rkelsen View Post
Why? It all gets installed under /opt. There's no need to package it. I don't package VirtualBox or LibreOffice for the same reason.
Why? It fits the package management system of Slackware and allows adding. upgrading and removing using slackpkg. I have a package for installation of a single file. Overkill perhaps, but I don't have to remember I put it on my system. I have a package that takes care of that.
 
Old 11-09-2019, 04:29 AM   #7
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Original Poster
Rep: Reputation: 66
Quote:
Originally Posted by slackware-current View Post
Been this route use VB . Just use KISS and let VB do what they do Slackware is built for what they do.
Slackware HISS And VB run is made to go together. PKG will break.
You presume to know what my project is, what its requirements are and then proceed to tell me to not try to do what I'm doing. I really hate this about public forums, you see it on stackoverflow all the time. I suppose I could have kept it simple and not work on any of my open-source projects, spent time in the garden clearing up leaves and that would 'keep it simple', as you say. But the point is I came here looking for help. I didn't want to get drawn into a protracted discussion on this, but how would you make the additions available in initrd? Put the entire kernel sources and compiler into RAM? I suppose you're now going to tell me I don't need to do that either, and on it goes.

Please can people stop filling this thread with cruft that doesn't answer the question. If you don't know the answer, then please don't post.
 
1 members found this post helpful.
Old 11-09-2019, 04:54 AM   #8
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 975

Rep: Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512Reputation: 512
Quote:
Originally Posted by bifferos View Post
But the point is I came here looking for help. I didn't want to get drawn into a protracted discussion on this, but how would you make the additions available in initrd? Put the entire kernel sources and compiler into RAM?
The problem is: the VB guest additions are dependant on BOTH the VB version and the kernel version (as it installs kernel modules for the guest O/S), so your package would have to be updated about every week (for Slackware-current).
It would be more usefull to just create a SlackBuild script, that REcompiles the kernel modules every time you update the kernel in your VM, so:
fetch the additions in the VM and use its install script to build the stuff.
 
Old 11-09-2019, 06:58 AM   #9
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Original Poster
Rep: Reputation: 66
Quote:
Originally Posted by ehartman View Post
It would be more usefull to just create a SlackBuild script
This is correct, it would be more universally useful and I'm sure a lot of people would want to use it, however I have a hunch it would be harder than tracking the install process, and the process would change if the VB code changed. That said, I'm unsure how often they do that. But I suppose unless I actually do it both ways, I'll never know! One spin-off is that if I wrote (or figured out how to adapt) a utility to track the install it could be useful for the generation of other packages.

I don't need to do this every two weeks, when a new current comes out, I only need to do it from time-to-time. But I think that doesn't matter too much, I do still need a way to automate the generation of such a package using some kind of networked service, and that's another challenge to be solved, probably using vagaslack as a starting point. Plenty of challenges ahead that's for sure.
 
Old 11-09-2019, 08:31 AM   #10
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,309

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
From /usr/doc/slacktrack-2.20/OVERVIEW
Quote:
So how do you know what files were installed where and
even if you did, how do you pull all these files together in order
to run makepkg over them ?
That's the purpose of slacktrack! :-)
 
Old 11-09-2019, 09:46 AM   #11
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Original Poster
Rep: Reputation: 66
/usr/doc/slacktrack-2.20/OVERVIEW also says:
Quote:
slacktrack only works with 'official' Slackware directory locations
and /usr/local.
For example, if your make install installs binaries in /opt/packagename/bin
and the man pages in anywhere other than /usr/man or /usr/local/man, then
slacktrack's relevant options (eg stripping libs, bins, gzman) will
not detect them.
Although I'm unsure how much of a problem that is.
 
Old 11-09-2019, 11:34 AM   #12
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Original Poster
Rep: Reputation: 66
For info, slacktrack was able to get me *something*, even with just default parameters. I need to remove the /etc/* files that it picked up and change those into doinst.sh commands to create the relevant users/groups, figure out how to remove the /dev/vbox* files. There seem to be a few different ways to approach this but the simplest seems to be a post build script. I don't think I need to create a .build file because I can run the perl installer direct from slacktrack.

Once I've done that it will be interesting to see if the created package installs and runs.
 
Old 11-09-2019, 01:45 PM   #13
bormant
Member
 
Registered: Jan 2008
Posts: 356

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by ehartman View Post
It would be more usefull to just create a SlackBuild script, that REcompiles the kernel modules every time you update the kernel in your VM
It is already created by the VirtualBox VM scripts itself; when you update the kernel in VM /sbin/rcvboxadd updates vbox* kernel modules for your VM and after you initiate VM reboot or shutdown.
All you need -- remove vboxguest.ko module (and maybe vboxvideo.ko module) installed from the kernel-modules package:
/lib/modules/<kernel-version>/kernel/drivers/virt/vboxguest/vboxguest.ko
/lib/modules/<kernel-version>/kernel/drivers/staging/vboxvideo/vboxvideo.ko

Last edited by bormant; 11-10-2019 at 02:31 AM.
 
Old 11-09-2019, 04:33 PM   #14
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,279

Rep: Reputation: 609Reputation: 609Reputation: 609Reputation: 609Reputation: 609Reputation: 609
Quote:
Originally Posted by bifferos View Post
For my own personal VM? Yes, but it's not for that. I need the package, and I'd very much appreciate not having to argue about that here, even if you are just trying to be helpful.
I believe that I owe you an apology. I completely mis-read the question and thought that you were trying to package the VirtualBox Extensions.

The best starting point for you is going to be the Slackbuild for the old version. Download the files, look at what it does and replicate that with the new version. That will simplify things and most likely will answer your questions. There is one qualification to this: I'd make the suggestion that you use sysv-style scripts (which Slackware supports) instead of physically adding commands to the rc.local file (IMO, manually adding things to rc.local ruins the "portability" of the package).

I use a Slackware VM to run & maintain the mission-critical backups for my business and haven't bothered packaging the guest additions, although that's running on a bare metal hypervisor (not VBox) and it's a very basic installation without X.
 
Old 11-09-2019, 06:39 PM   #15
bifferos
Member
 
Registered: Jul 2009
Posts: 201

Original Poster
Rep: Reputation: 66
Quote:
Originally Posted by rkelsen View Post
I believe that I owe you an apology. I completely mis-read the question and thought that you were trying to package the VirtualBox Extensions.
I've given up on the extensions since the license change. Pity that. Anyways, fear not, because I think this is almost what's required:
https://github.com/bifferos/slackbui...ons.SlackBuild

Unfortunately now my issue is makepkg, or lack of understanding thereof. I can't get my setup script executed. According to the manual it's supposed to be put in
/var/lib/pkgtools/setup/setup.*
Although I've also tried:
/var/log/setup/setup.* as well.

installpkg doesn't seem to execute it regardless of which I use. If I execute the setup script manually everything seems to work, so that's the good news.

Last edited by bifferos; 11-09-2019 at 08:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 12 04-25-2019 08:33 AM
4MLinux as VirtualBox guest - how can I install VirtualBox Guest Additions? wghay 4MLinux 11 09-30-2018 01:17 PM
[SOLVED] VirtualBox guest additions for init 3 Slackware guest? kikinovak Slackware 2 06-04-2013 11:36 AM
slackware 13 guest additions for virtualbox on xp host - process questions kih Slackware 3 11-22-2012 07:53 AM
VirtualBox Additions in a Slackware virtual gmartin Slackware 6 06-25-2008 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration