LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-27-2021, 05:58 PM   #1
emmet
Member
 
Registered: Oct 2003
Location: FL
Distribution: Slackware
Posts: 49

Rep: Reputation: 43
WARNING: Unique directory /usr/share/ghostscript/9.54.0/Resource/Init/ contains new files


During the zen moments of watching slackpkg upgrade-all output scroll by, I noticed a few warning messages, which boil down to the one in the title. So I looked.

Code:
eford@dimholt:~$ ls -l /usr/share/ghostscript/9.54.0/Resource/Init/
total 8
-rw-r--r-- 1 root root 6774 Mar 31 15:57 cidfmap
Eh, some file created, probably in the course of ghostscript installation. Google says ghostscript generates a font mapping of some sort and stores it in cidfmap. A nothing burger, but a bit of cruft left behind.

The date is odd, though. My system was freshly built on August 10, which, if my calculations are correct, comes after March 31. So the file is older than the package installation, but not part of the package manifest. Curious.

The new version of ghostscript has the same file, created today, but prior to my update ritual.

Code:
eford@dimholt:~$ ls -l /usr/share/ghostscript/9.55.0/Resource/Init/cidfmap
-rw-r--r-- 1 root root 6774 Sep 27 14:01 /usr/share/ghostscript/9.55.0/Resource/Init/cidfmap

eford@dimholt:~$ sudo cat /var/log/secure|grep "upgrade\-all"
Sep 27 17:44:31 dimholt sudo:    eford : TTY=pts/3 ; PWD=/home/eford ; USER=root ; COMMAND=/usr/sbin/slackpkg upgrade-all
The package manifest for the new version of ghostscript does not contain this file, but it circles around it:

Code:
eford@dimholt:~$ grep cidfmap /var/log/packages/ghostscript-9.55.0-x86_64-1
usr/share/ghostscript/9.55.0/Resource/Init/FAPIcidfmap
usr/share/ghostscript/9.55.0/Resource/Init/cidfmap.default.ghostscript-9.55.0
usr/share/ghostscript/9.55.0/Resource/Init/cidfmap.new
My hypothesis, therefore, is that future warnings await me and will likely reveal themselves sometime after version 9.56.0 of ghostscipt is released. For the moment...

Code:
eford@dimholt:~$ sudo rm -r /usr/share/ghostscript/9.54.0
I know; I'm a wild man.

Last edited by emmet; 09-27-2021 at 06:16 PM.
 
Old 09-28-2021, 12:13 AM   #2
avian
Member
 
Registered: Aug 2014
Posts: 184

Rep: Reputation: Disabled
Interesting.. I've had my install for quite some time.

Code:
/usr/share/ghostscript# ls -l
total 36
drwxr-xr-x 3 root root 4096 Oct 17  2019 9.27
drwxr-xr-x 3 root root 4096 Mar 15  2020 9.50
drwxr-xr-x 3 root root 4096 Mar 21  2020 9.51
drwxr-xr-x 3 root root 4096 Sep 14  2020 9.52
drwxr-xr-x 3 root root 4096 Sep 16  2020 9.53.0
drwxr-xr-x 3 root root 4096 Sep 28  2020 9.53.1
drwxr-xr-x 3 root root 4096 Oct  3  2020 9.53.2
drwxr-xr-x 3 root root 4096 Apr  1 22:51 9.53.3
drwxr-xr-x 7 root root 4096 Apr  1 06:57 9.54.0
lrwxrwxrwx 1 root root   22 Feb 17  2021 fonts -> /usr/share/fonts/Type1
So lets see whats in every old version's folder

Code:
find 9.27 9.50 9.51 9.52 9.53* 
9.27
9.27/Resource
9.27/Resource/Init
9.27/Resource/Init/cidfmap
9.50
9.50/Resource
9.50/Resource/Init
9.50/Resource/Init/cidfmap
9.51
9.51/Resource
9.51/Resource/Init
9.51/Resource/Init/cidfmap
9.52
9.52/Resource
9.52/Resource/Init
9.52/Resource/Init/cidfmap
9.53.0
9.53.0/Resource
9.53.0/Resource/Init
9.53.0/Resource/Init/cidfmap
9.53.1
9.53.1/Resource
9.53.1/Resource/Init
9.53.1/Resource/Init/cidfmap
9.53.2
9.53.2/Resource
9.53.2/Resource/Init
9.53.2/Resource/Init/cidfmap
9.53.3
9.53.3/Resource
9.53.3/Resource/Init
9.53.3/Resource/Init/cidfmap
Seems cidfmap is left behind every time. I think ill be doing some rm -rf's myself.
 
1 members found this post helpful.
Old 09-28-2021, 01:19 AM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,462
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
cidfmap gets treated like any other config file. It has a ".new" extension in the Slackware package. This ensures that upgrading the package doesn't overwrite any custom config you might have.

So when you remove the package, it gets left behind. This is expected.

Quote:
Originally Posted by emmet
For the moment...
Code:
eford@dimholt:~$ sudo rm -r /usr/share/ghostscript/9.54.0
I know; I'm a wild man.
Wild as in Daniel Boone? Or Jed Clampett? Either way, that's the right way to "fix" it... provided that you don't have any customisations in there that you want to keep.
 
1 members found this post helpful.
Old 09-28-2021, 01:52 AM   #4
avian
Member
 
Registered: Aug 2014
Posts: 184

Rep: Reputation: Disabled
Quote:
Originally Posted by rkelsen View Post
cidfmap gets treated like any other config file. It has a ".new" extension in the Slackware package. This ensures that upgrading the package doesn't overwrite any custom config you might have.

So when you remove the package, it gets left behind. This is expected.
Sure, but when you upgrade a package, most packages upgrade to the same destination. So .new files work as expected, i.e. you are asked to consider a newer *.new file if you've made changes to your old config files etc. Because ghostscript creates a new folder each time (that includes the version number), it doesn't seem to act like other packages.

Doesn't really bother me to be honest, I was happy to manually remove unneeded old files. But its an interesting catch by the original poster. I wonder if there is a better way to handle the cidfmap.new file with the ghostscript doinst.sh script?
 
Old 09-28-2021, 02:03 AM   #5
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108
I probably found the culprit in ghostscript.SlackBuild

line 185
Code:
# And finally, pray for upstream to quit drinking while coding. ;-)
 
2 members found this post helpful.
Old 09-28-2021, 02:11 AM   #6
avian
Member
 
Registered: Aug 2014
Posts: 184

Rep: Reputation: Disabled
Talking

Quote:
Originally Posted by marav View Post
I probably found the culprit in ghostscript.SlackBuild

line 185
Code:
# And finally, pray for upstream to quit drinking while coding. ;-)
Hilarious
 
Old 09-28-2021, 02:13 AM   #7
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,462
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by avian View Post
I wonder if there is a better way to handle the cidfmap.new file with the ghostscript doinst.sh script?
There might be... but this could be one of those situations where the solution is worse than the issue itself. You say that you've had your installation for "quite some time," and after all of that time, it was carrying 64Kb of excess config files. Is that a big problem?
 
1 members found this post helpful.
Old 09-28-2021, 02:56 AM   #8
avian
Member
 
Registered: Aug 2014
Posts: 184

Rep: Reputation: Disabled
Quote:
Originally Posted by rkelsen View Post
There might be... but this could be one of those situations where the solution is worse than the issue itself. You say that you've had your installation for "quite some time," and after all of that time, it was carrying 64Kb of excess config files. Is that a big problem?
I absolutely agree with everything you said.

But if there is an elegant solution that isn't worse than the issue itself, it would be nice. I certain wont lose sleep over it either way!
 
Old 09-28-2021, 03:15 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,376

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
On the principle of no surprise, I think it is best to leave things as is. Consider a user that has modified the config then decides to reinstall the existing package. The user would expect the existing config to be preserved. Clearing out this stale config is something I have done before.
 
2 members found this post helpful.
Old 09-28-2021, 03:53 AM   #10
avian
Member
 
Registered: Aug 2014
Posts: 184

Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
On the principle of no surprise, I think it is best to leave things as is. Consider a user that has modified the config then decides to reinstall the existing package. The user would expect the existing config to be preserved. Clearing out this stale config is something I have done before.
Yeah you are almost certainly correct. I dont mind occasionally deleting stale files. Not suggesting anything, just thinking aloud. What if the cidfmap file is stored in a fixed location, say under /etc/ghostscript or /usr/share/ghostscript/ghostscript-settings or something. Then the ghostscript package can have a symbolic link to the file. Would allow one to automatically carry over modifications when upgrading (or reinstalling), and allow the symbolic link to be deleted when upgrading not leaving stale directories?

I'm sure that's probably well into the "could be one of those situations where the solution is worse than the issue itself" territory rkelsen mentioned.

Anyway, allend, as a fellow Melbournian, might be time to baton down the hatches, I hear we are in for a bunch of wild weather tonight.
 
Old 09-28-2021, 08:07 AM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,376

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
@avian -
Wild weather? Nah, just some spring wind and rain. I could slip on one of my Slackware T-shirts. There was a long period when I thought I was the only one in Melbourne with those.
 
Old 09-28-2021, 05:19 PM   #12
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I see no problem at all. It works s expected. Besides couple of rules there is no rules at all in Slackware. Now I can recall only two rules. Init system and using generic kernel. Beside that nothing comes to my mind. Shortly: there is no expected way for work. Rather we expect Slackware to be stable even supporting our own phantasies. Let OP has hope that accidents that something caught it's eyes in log won't happen often. In other case, well, managing system may became very boring.
 
Old 09-28-2021, 05:39 PM   #13
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,462
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by allend View Post
I could slip on one of my Slackware T-shirts. There was a long period when I thought I was the only one in Melbourne with those.
I'd highly doubt that. Back in the day, there was a whole section of Linux Users of Victoria dedicated to Slackware. I met a few of them back in the late 90s/early 2000s. One of them put a particular version of Slackware onto a CD for me, but I can't remember which. Maybe 7.1 or 8.0. Anyhow, he had access to high speed broadband at his office, and his employer let him download it. I was still on dial up at home, and my employer had stricter rules about using the internet.

I'm in the NW part of the metro area and that rain hasn't started here yet. By the look of the radar it might not happen for a few more hours.
 
Old 10-04-2021, 04:02 PM   #14
Xsane
Member
 
Registered: Jan 2014
Posts: 186

Rep: Reputation: 134Reputation: 134
This was discussed before here:
https://www.linuxquestions.org/quest...er-4175666296/

None of the replies in either thread have changed my opinion that the dot new handler should not be used for config files with the version number it their path. It causes inconsistent behavior, leaves cruft in the filesystem and doesn't solve any problem.
 
1 members found this post helpful.
Old 10-04-2021, 09:18 PM   #15
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,462
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by Xsane View Post
None of the replies in either thread have changed my opinion that the dot new handler should not be used for config files with the version number it their path. It causes inconsistent behavior, leaves cruft in the filesystem and doesn't solve any problem.
The amount of "cruft" is 8kb each time you upgrade this program. A small amount compared to the hours someone might have spent customising this file...

Ideally, the upstream authors should stop changing the file's location.
 
1 members found this post helpful.
  


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
[SOLVED] Bionicpup, message: Error loading backdrop image: image file /usr/share/backgrounds/default.jpg/ contains no data Backdrop removed. Edward4m Puppy 7 06-07-2020 08:43 AM
Slackware-current: /usr/share/cmake and /usr/share/cmake-3.3 directories igor29768 Slackware 1 11-07-2015 12:37 AM
Redirect an app resource folder from system /usr/share to /home/user/[app]/usr/share minyor Linux - Software 2 04-23-2013 06:44 AM
removepkg: WARNING: Unique directory contains new files merchtemeagle Slackware 10 06-23-2005 08:51 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM

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

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