Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-28-2014, 09:52 PM
|
#1
|
Member
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, Sourcemage, 9front
Posts: 407
Rep: 
|
ldconfig: command not found upon sudo upgradepkg of glibc-zoneinfo
When running upgradepkg with the recent glibc security updates for Slackware 14.1 I noticed the following error message:
Code:
$ sudo /sbin/upgradepkg glibc-zoneinfo-2014i-noarch-1_slack14.1.txz
...
Pre-installing package glibc-zoneinfo-2014i-noarch-1_slack14.1...
install/doinst.sh: line 2: ldconfig: command not found
...
Executing install script for glibc-zoneinfo-2014i-noarch-1_slack14.1.txz.
install/doinst.sh: line 2: ldconfig: command not found
Package glibc-zoneinfo-2014i-noarch-1_slack14.1.txz installed.
Should be harmless since there are no libraries in this package, but it's easily enough fixed. The 2nd line calls ldconfig without qualifying it with an absolute path. Because I'm using sudo the PATH variable retains my regular user's path, which lacks /sbin. Compare that to the other glibc package doinst.sh scripts that use /sbin/ldconfig or even test first for its existence before using it.
Current has the same problem (assuming you agree it's a problem):
http://mirrors.slackware.com/slackwa...glibc-zoneinfo
Last edited by thirdm; 10-28-2014 at 10:00 PM.
|
|
|
10-29-2014, 12:00 AM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,418
Rep: 
|
The cure is simple: don't use sudo for administrative tasks on Slackware or set PATH so you can do it with your systems.
On a vanilla Slackware64-14.1:
Code:
T61 login: didier
Password:
Linux 3.10.17.
Last login: Wed Oct 29 05:50:06 +0100 2014 on /dev/tty1.
No mail.
Fourth Law of Applied Terror:
The night before the English History mid-term, your Biology
instructor will assign 200 pages on planaria.
Corollary:
Every instructor assumes that you have nothing else to do
except study for that instructor's course.
didier@T61:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin
didier@T61:~$ su
Mot de passe :
root@T61:/home/didier# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
root@T61:/home/didier# su -
Optimism is the content of small men in high places.
-- F. Scott Fitzgerald, "The Crack Up"
root@T61:~# echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin
root@T61:~#
PS If you still want to use sudo, I remind you that you don't have to change the PATH of all users who will run it. You can set that through /etc/sudoers + configuration files, see under Command environment in man sudoers if you need guidance to do that.
Last edited by Didier Spaier; 10-29-2014 at 03:17 AM.
Reason: PS added.
|
|
1 members found this post helpful.
|
10-29-2014, 08:22 AM
|
#3
|
LQ Veteran
Registered: May 2008
Posts: 7,192
|
I wouldn't consider "not using sudo" as a cure. The pkgtools shouldn't break just because a user runs them via sudo. IMO, the pkgtools scripts should be setting their PATH prior to running doinst.sh. In fact, I'm a little surprised that they don't given how important they are.
|
|
|
10-29-2014, 09:17 AM
|
#4
|
Member
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, Sourcemage, 9front
Posts: 407
Original Poster
Rep: 
|
Seems I was unclear. I intended this as a bug report thinking it might be helpful. It doesn't cause me any problems, just seems sloppy.
|
|
1 members found this post helpful.
|
10-29-2014, 11:20 AM
|
#5
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,418
Rep: 
|
Well, running "grep ldconfig|grep -v sbin" in slackware64-current/source for instance shows that l/glibc/doinst.sh-glibc-zoneinfo is the only "doinst.sh" file involved and if I understand well in this specific case ldconfig is useless anyway as this package doesn't ship any shared library so its call could be safely removed. In all other cases[1] ldconfig is called with its full path.
Also, it can be noted that installpkg itself runs ldconfig if executable with its full path before running any doinst.sh script,
In short I don't see any bug in the package tools, just maybe a rather cosmetic change to make to doinst.sh-glibc-zoneinfo on occasion, that is removing the two first lines.
But maybe something escapes me.
[1]Actually only two other cases: doinst.sh-glibc and doinst.sh-glibc-solibs
Last edited by Didier Spaier; 10-29-2014 at 12:03 PM.
Reason: [1] added
|
|
|
All times are GMT -5. The time now is 04:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|