LinuxQuestions.org
Visit Jeremy's Blog.
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 07-02-2006, 01:19 AM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
what makes glibc-*.tgz so special?


Has anyone noticed that the Slackware (10.2 & current) glibc package is not a standard "tgz" package?

I've been trying to install Slackware onto my laptop (no cdrom or floppy) by using pkgtools in knoppix to install the Slack-packages to an empty partition. This has worked great, except for glibc. The first thing I noticed is that the glibc package is not a regular tar.gz file. On any other Slackware package I can extract it with a standard 'tar -vxf' command. When I attempt this with glibc, I get an invalid file format error. Also, when I try to install glibc with 'installpkg' I get
Code:
Executing install script for glibc-2.3.5-i486-5...
chroot: cannot run command `/bin/cp': No such file or directory
The error is not that big of a deal, I can work around it. It looks like it's trying to use chroot to preform some installation trickery which means I need to install some other packages before this one. I was more curious as to why Pat made this package different from all the others. Can any one easy my curiosity?

Thanks!
...aaron
 
Old 07-02-2006, 03:01 AM   #2
the_real_absinthe
LQ Newbie
 
Registered: May 2006
Distribution: slackware linux
Posts: 28

Rep: Reputation: 15
from glibc doinst.sh script:
Code:
# Timezone stuff:
if [ -L etc/localtime -a ! -r etc/localtime-copied-from ]; then
  mv etc/localtime etc/localtime-copied-from
  chroot . /bin/cp etc/localtime-copied-from etc/localtime
fi
# Add the default timezone in /etc, if none exists:
if [ ! -r etc/localtime ]; then
  ( cd etc ; rm -rf localtime localtime-copied-from )
  ( cd etc ; ln -sf /usr/share/zoneinfo/Factory localtime-copied-from )
  chroot . /bin/cp etc/localtime-copied-from etc/localtime
fi
this is all and only chroot stuff inside the script. I really don't understand which directory is '.' and why chroot inside to perform a copy of time stuff in etc... ?!?!

about the tgz: consider that the glibc-version-arch package is used to build other sources, the glibc-solib-version is used to run binaries.

finally, I've tryed to open it via tar xzvf and it works as a common gzipped archive (as a tar.gz).

M
 
Old 07-02-2006, 03:06 AM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by the_real_absinthe
I really don't understand which directory is '.'
. is the current directory.
 
Old 07-02-2006, 03:56 AM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Quote:
about the tgz: consider that the glibc-version-arch package is used to build other sources, the glibc-solib-version is used to run binaries.
so glibc is just the headers while glibc-solibs are the compiled libraries? This is good to know, I was only going to install glibc.

Quote:
this is all and only chroot stuff inside the script. I really don't understand which directory is '.' and why chroot inside to perform a copy of time stuff in etc... ?!?!
If this is anything like gcc, it probably doesn't like being worked on in a directory that is not the final install directory. chroot is probably used to trick it into thinking it's in /etc instead of /tmp/glibc*/etc (temporary work directory).

Quote:
finally, I've tryed to open it via tar xzvf and it works as a common gzipped archive (as a tar.gz).
erm... sorry, I must have mis-typed.

It does appear to extract with 'tar', but I can't extract it with 'arch' or browse though the archive with Konqueror like I normally can. This is actually why I noticed it, at which point I tested the glibc in slack-current and got the same thing. After that I tried using tar from the command line which didn't work. I see now that it does work from the command line once I use the right options.

Any idea why KDE does not recognize glibc as a regular archive file when all of the other packages work just fine?

Thanks!
...aaron
 
Old 07-02-2006, 06:31 AM   #5
the_real_absinthe
LQ Newbie
 
Registered: May 2006
Distribution: slackware linux
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by Nylex
. is the current directory.
sorry! I now that '.' is the current dir. I neant why does he chroot in current dir to perform those operation?

M

PS: sorry but I don't use kde so I really don't know anything about arch

Last edited by the_real_absinthe; 07-02-2006 at 06:32 AM.
 
Old 07-03-2006, 12:40 PM   #6
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
Quote:
Originally Posted by the_real_absinthe
sorry! I now that '.' is the current dir. I neant why does he chroot in current dir to perform those operation?
Before the doinst.sh script is executed, the install script changes directory to $ROOT (or "/" if $ROOT isn't defined). I think that what Pat is attempting to do is run the /bin/cp of the *new* installation instead of the one provided by the install CD (or whatever enviroment you're using to install).
This means that to install the glibc package you will need some package from a/ which contains /bin/cp to be installed before.
 
Old 07-03-2006, 01:10 PM   #7
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Quote:
This means that to install the glibc package you will need some package from a/ which contains /bin/cp to be installed before.
That's what I thought, I was more curious about why the package was different then the error itself. For some reason KDE does not like the file format of this package in both 10.2 and current. Oh well, I guess it doesn't matter to much now that I have the answer to the error.

thanks!
...aaron
 
Old 07-03-2006, 04:11 PM   #8
trev_vb
LQ Newbie
 
Registered: Jul 2006
Location: In a house
Distribution: You mean there's MORE than one? I better let Mr. Gates know
Posts: 4

Rep: Reputation: 0
Perhaps I'm going out on a limb here, but here's my $0.02 worth to attempt to answer the original question of what makes glibc* so special...
Most (if not all) of the standard utilities in linux (du, ls, cp et al) are not compiled as standalone (statically linked) binaries. Instead, they are dynamically linked against the shared sobject (.so) of glibc. This saves a small TRUCKLOAD of disk space (not to mention all the RAM that would be used at runtime).
However, that does tend to make the glibc shared object rather a critical one because if you accidentally screw it up, you're basically left in a pile of excrement since all the normal utilities RELY on a functional glibc.
Therefore, when it comes time to upgrade glibc (and I'm not going to ask WHY you find the need to do this), the installation scripts need to be especially careful since the new version of glibc might BREAK all the system utilities that were linked against the outgoing version of glibc.
I'm guessing that by temporarily installing the new glibc into a 'holding' location and then using chroot to make that holding location 'appear' to be the correct location is what's really happening...
 
Old 07-03-2006, 04:16 PM   #9
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Thanks, that makes a lot of sense.

And welcome to LQ!
...aaron
 
  


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
block special and character special files s_shenbaga Linux - Newbie 4 06-23-2015 02:16 AM
a tgz that doesn't end in tgz flebber VectorLinux 3 05-03-2006 05:31 AM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM
tgz file doesn't end in .tgz? detpenguin Slackware 4 05-15-2004 07:13 PM
X Sever crash after xset.tgz & vg16.tgz install lachlan Slackware 0 08-13-2003 02:48 AM

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

All times are GMT -5. The time now is 09:23 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