LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-16-2015, 06:36 AM   #1
navigium
Member
 
Registered: Aug 2014
Location: Switzerland
Distribution: Slackware, FreeBSD
Posts: 119

Rep: Reputation: 58
Forcing an installer to install in a certain sub directory


Hey all,

I'm trying to create a package for the new version of the VMWare View PCoIP client. VMWare provides a installer which seems to have the locations (/usr/bin /usr/share ...) hardcoded or at least there is no documented way to specify the installation directory.

Now my question: Is there a tool or a way to force it to install to a certain directory which I then can use to create my package?

Thanks,

Beni
 
Old 01-16-2015, 07:14 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
See "man chroot".
 
Old 01-16-2015, 08:20 AM   #3
navigium
Member
 
Registered: Aug 2014
Location: Switzerland
Distribution: Slackware, FreeBSD
Posts: 119

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by Richard Cranium View Post
See "man chroot".
This was my first thought, too. But for some reason I can't get it to work. Maybe I'm too stupid for that, but I ran into the following problem:

One way is to copy my full base system to the directory I want to chroot to. This gives the installer all the dependencies it needs. But that's not practical because to build a package I need to remove them again afterwards and for a SlackBuild script basically copying the whole system is way overblown. I'm trying to find an easier way.

So I tryed to run to get chroot to run the installer in an empty directory, but this doesn't work. That's what I get:

Code:
# chroot /tmp/chroot ./VMware-Horizon-Client-3.2.0-2331566.x86.bundle 
chroot: failed to run command ‘./VMware-Horizon-Client-3.2.0-2331566.x86.bundle’: No such file or directory
The man page for chroot is very concise and doesn't really help.

The installer runs just fine without chroot. So it's not a 32 vs. 64bit problem. (The installer is a shell script with some binary data attached anyway.)
 
Old 01-16-2015, 09:20 AM   #4
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
Extract the files out of the tar archive found within the self-installer

Code:
mkdir VMware-Horizon-Client-3.2.0-2331566.x86
sed '1,/^exit$/d' VMware-Horizon-Client-3.2.0-2331566.x86.bundle | gzip -qd | tar x -C VMware-Horizon-Client-3.2.0-2331566.x86
This will leave you will all the files in the "VMware-Horizon-Client-3.2.0-2331566.x86" directory. Now make your own installer!

Last edited by ruario; 01-16-2015 at 09:30 AM.
 
Old 01-16-2015, 09:21 AM   #5
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
You might also want to extract the script of the front of the bundle and open it in a text editor, to get some clues.

Code:
sed -n '1,/^exit$/p' VMware-Horizon-Client-3.2.0-2331566.x86.bundle > VMware-Horizon-Client-3.2.0-2331566.x86.txt

Last edited by ruario; 01-16-2015 at 09:30 AM.
 
Old 01-16-2015, 09:50 AM   #6
navigium
Member
 
Registered: Aug 2014
Location: Switzerland
Distribution: Slackware, FreeBSD
Posts: 119

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by ruario View Post
Extract the files out of the tar archive found within the self-installer

Code:
mkdir VMware-Horizon-Client-3.2.0-2331566.x86
sed '1,/^exit$/d' VMware-Horizon-Client-3.2.0-2331566.x86.bundle | gzip -qd | tar x -C VMware-Horizon-Client-3.2.0-2331566.x86
This will leave you will all the files in the "VMware-Horizon-Client-3.2.0-2331566.x86" directory. Now make your own installer!
This is even integrated in the script and can be done via

Code:
VMware-Horizon-Client-3.2.0-2331566.x86 -x DIR
But I wasn't able to figure out what I had to do to register a component with a install, just copying the files doesn't seem to do it. But maybe I really should dig into the script as you said. Guess there is no way around this.
 
Old 01-16-2015, 10:04 AM   #7
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by navigium View Post
This was my first thought, too. But for some reason I can't get it to work. Maybe I'm too stupid for that, but I ran into the following problem:

One way is to copy my full base system to the directory I want to chroot to. This gives the installer all the dependencies it needs. But that's not practical because to build a package I need to remove them again afterwards and for a SlackBuild script basically copying the whole system is way overblown. I'm trying to find an easier way.

So I tryed to run to get chroot to run the installer in an empty directory, but this doesn't work. That's what I get:

Code:
# chroot /tmp/chroot ./VMware-Horizon-Client-3.2.0-2331566.x86.bundle 
chroot: failed to run command ‘./VMware-Horizon-Client-3.2.0-2331566.x86.bundle’: No such file or directory
The man page for chroot is very concise and doesn't really help.

The installer runs just fine without chroot. So it's not a 32 vs. 64bit problem. (The installer is a shell script with some binary data attached anyway.)
Now that I've thought about it, chroot won't work here. The chroot environment won't point to any executables, like /bin/bash.

Listen to ruario instead of me.
 
  


Reply



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
[help]Could not install nvidia driver : ./nvidia-installer: No such file or directory anchunlei Debian 4 04-18-2008 05:30 AM
Forcing User Permissions on a Directory (and all subdirectories and files in the dir) hevfuture Linux - Newbie 3 03-26-2008 12:39 PM
forcing lower case directory names with mkisofs Earl Parker II Linux - Software 2 02-12-2007 03:49 PM
Forcing user home directory Anthraxnz Linux - Newbie 7 05-10-2006 02:02 AM
Forcing a directory tree to be SSL only leongoogs Linux - Newbie 1 05-11-2004 07:36 AM

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

All times are GMT -5. The time now is 10:33 AM.

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
Open Source Consulting | Domain Registration