LinuxQuestions.org
Review your favorite Linux distribution.
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 10-28-2014, 09:52 PM   #1
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, 9front
Posts: 334

Rep: Reputation: Disabled
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.
 
Old 10-29-2014, 12:00 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,116

Rep: Reputation: Disabled
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.
Old 10-29-2014, 08:22 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,962

Rep: Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094Reputation: 5094
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.
 
Old 10-29-2014, 09:17 AM   #4
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, 9front
Posts: 334

Original Poster
Rep: Reputation: Disabled
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.
Old 10-29-2014, 11:20 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,116

Rep: Reputation: Disabled
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
 
  


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
sudo cd /root gives 'sudo: cd: command not found'. stf92 Linux - Newbie 4 03-03-2012 09:05 AM
slackware glibc-zoneinfo-multilib-noarch update: why blacklisted/special? kingbeowulf Slackware 2 11-12-2011 05:10 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
question about upgradepkg glibc-2.3.6 garrymhl Slackware 1 12-29-2005 04:34 AM
ldconfig command not found Draylath Linux - Newbie 5 06-23-2004 04:30 PM

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

All times are GMT -5. The time now is 01:57 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
Open Source Consulting | Domain Registration