LinuxQuestions.org
Visit Jeremy's Blog.
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-13-2018, 05:57 PM   #16
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247

Quote:
Originally Posted by linuxbawks View Post
Yeah I will say it here. What a dumb idea hardcoding package audits to /var/log.
Your knowledge about Slackware is so epic high, that you yet have to figure out that that thing is the installed packages records, an essential piece for proper work of the packages management in the Slackware.

Last edited by Darth Vader; 01-13-2018 at 06:02 PM.
 
Old 01-13-2018, 06:04 PM   #17
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Darth Vader View Post
If you happened to work where I work myself, most likely you had be fired in the next second after making this statement in the front of TM. No questions accepted.
What a silly statement af.
 
Old 01-13-2018, 06:17 PM   #18
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Original Poster
Rep: Reputation: 17
Logging is useful where it is merited. Unless you have a system doing unexpected things there is little use for logs, generally. Certainly there is little point in collecting days/weeks/months worth of logs in such scenarios. However should a use case arise for logging a flaw then the facility could be turned on as required. There is no requirement to unnecessarily compile system logs of redundant info repeating itself over and over again. For this reason my own policy has been to discard logs at every boot. The info is largely irrelevant. Second, you're not going to id a hacker from your standard iptables logs.

rsyslog collects very generic system generated logs and tonnes of it. Many of you call yourselves sa's and come across as clutching to this info like there's no tomorrow. In a well tuned system much of this info is largely superfluous.

Now the point of this topic wasn't to have a discussion or debate. I asked if package logs can be audited elsewhere. The answer should have been a succinct No. It's is a terrible idea to have /var/logs/packages when there is practically all of /var/* to choose from.
 
Old 01-13-2018, 06:24 PM   #19
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Darth Vader View Post
I for one, I believe that something like /var/lib/packages is a more appropriate location, considering that it is basically a files based database.
So you are odds with discarding logs and yet you're making this suggestion to place the package logs elsewhere. That's contradictory, so why bother? Best keep your trap shut.

/var/lib contains libraries, binaries. This is not an appropriate place for text file audits of packages either. Fool.
 
Old 01-13-2018, 06:51 PM   #20
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by Darth Vader View Post
I for one, I believe that something like /var/lib/packages is a more appropriate location, considering that it is basically a files based database.
I can remember having a discussion with Pat about this here on LQ a good while back. He said that the original idea was to have them in /var/adm/packages, but that the FHS came along and decreed that /var/adm should be a symlink to /var/log which kind of made the location nonsensical. If I remember rightly, he said that he regretted following the standard and wished he'd just stuck with /var/adm.

/var/lib/packages is probably the right place for them based on the current standards, but the change would be disruptive as people are now used to them being under /var/log/.

Personally, I never really liked '/var/lib' as a name. I always thought /var/state was a better name to hold this sort of stuff but again, the FHS decided otherwise.
 
2 members found this post helpful.
Old 01-13-2018, 06:52 PM   #21
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
@linuxbawks

Seems like that makes no sense for someone to try to explain you that those files are NOT "text file audits of packages", because you are so proud for nothing that you probably are unable to assimilate that information.

Good luck with your endeavor.

Last edited by Darth Vader; 01-13-2018 at 06:58 PM.
 
Old 01-13-2018, 06:56 PM   #22
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
Originally Posted by GazL View Post
I can remember having a discussion with Pat about this here on LQ a good while back. He said that the original idea was to have them in /var/adm/packages, but that the FHS came along and decreed that /var/adm should be a symlink to /var/log which kind of made the location nonsensical. If I remember rightly, he said that he regretted following the standard and wished he'd just stuck with /var/adm.

/var/lib/packages is probably the right place for them based on the current standards, but the change would be disruptive as people are now used to them being under /var/log/.

Personally, I never really liked '/var/lib' as a name. I always thought /var/state was a better name to hold this sort of stuff but again, the FHS decided otherwise.
I know that Patrick's statement. And he's right, it is a bit strange to have the packages database in a directory dedicated for log files.
 
Old 01-13-2018, 07:27 PM   #23
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 linuxbawks View Post
Logging is useful where it is merited. Unless you have a system doing unexpected things there is little use for logs, generally. Certainly there is little point in collecting days/weeks/months worth of logs in such scenarios. However should a use case arise for logging a flaw then the facility could be turned on as required. There is no requirement to unnecessarily compile system logs of redundant info repeating itself over and over again. For this reason my own policy has been to discard logs at every boot. The info is largely irrelevant. Second, you're not going to id a hacker from your standard iptables logs.

rsyslog collects very generic system generated logs and tonnes of it. Many of you call yourselves sa's and come across as clutching to this info like there's no tomorrow. In a well tuned system much of this info is largely superfluous.

Now the point of this topic wasn't to have a discussion or debate. I asked if package logs can be audited elsewhere. The answer should have been a succinct No. It's is a terrible idea to have /var/logs/packages when there is practically all of /var/* to choose from.
Sucks to be you. Literally.
 
Old 01-13-2018, 07:34 PM   #24
zakame
Member
 
Registered: Apr 2012
Location: Philippines
Distribution: Debian, Ubuntu, Slackware
Posts: 295

Rep: Reputation: 181Reputation: 181
Don't forget, there's also /var/log/scripts/ too, as well as the corresponding /var/log/removed_{packages,scripts} directories.

Yeah, I don't think it is worthwhile to alter these locations to enable /var/log in tmpfs, unless you're on LVM to create separate LVs for them, as Richard Cranium said.

What's your system workload like to even consider putting /var/log in tmpfs in the first place?
 
Old 01-13-2018, 08:05 PM   #25
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by linuxbawks View Post
/var/lib contains libraries, binaries. This is not an appropriate place for text file audits of packages either. Fool.
Have you looked at the FHS? /var/lib/ has nothing to do with libraries. It is different from /lib/ and /usr/lib/. Maybe you should verify what you're posting before you call someone a fool...

Quote:
This hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host. Users must never need to modify files in /var/lib to configure a package's operation, and the specific file hierarchy used to store the data must not be exposed to regular users.

SOURCE: https://refspecs.linuxfoundation.org...html#purpose38
If we follow the FHS, /var/lib/ is probably the best place for the package data to move to.

Quote:
Originally Posted by upnort View Post
Retaining /var/log/packages is not a hard requirement for system operation, but various package tools expect to find that directory. That said, you could move /var/log/packages to /var/cache/packages, for example. Mount /var/log to tmpfs and sym link /var/cache/packages to /var/log/packages. Likewise for /var/log/removed_packages and /var/log/removed_scripts.
Actually /var/cache/ has a requirement that all data should be able to be deleted and, if needed, regenerated.

Quote:
/var/cache is intended for cached data from applications. Such data is locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. Unlike /var/spool, the cached files can be deleted without data loss. The data must remain valid between invocations of the application and rebooting the system.

SOURCE: https://refspecs.linuxfoundation.org...html#purpose33
 
Old 01-13-2018, 08:09 PM   #26
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
One could always tweak logrotate files in /etc/logrotate.d to minimize log files size
 
Old 01-13-2018, 08:20 PM   #27
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by keefaz View Post
One could always tweak logrotate files in /etc/logrotate.d to minimize log files size
Yes this is a way around it. Or symlink the relevant files elsewhere.
However I still think it's bad design to fix /var/log/packages. This could easily be made into a setting and pushed into the env or a conf file. For those string and obtuse jammed and fixated with /var/log/packages can still have it their way by leaving said setting alone. There's no reason to literally hijack /var/log in what's really such a fledgling packaging system.
 
Old 01-13-2018, 08:23 PM   #28
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by zakame View Post
Don't forget, there's also /var/log/scripts/ too, as well as the corresponding /var/log/removed_{packages,scripts} directories.

Yeah, I don't think it is worthwhile to alter these locations to enable /var/log in tmpfs, unless you're on LVM to create separate LVs for them, as Richard Cranium said.

What's your system workload like to even consider putting /var/log in tmpfs in the first place?
You miss the point. Logging to disk also creates an inordinate number of writes for very little return.
 
Old 01-13-2018, 08:31 PM   #29
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by linuxbawks View Post
Logging is useful where it is merited. Unless you have a system doing unexpected things there is little use for logs, generally. Certainly there is little point in collecting days/weeks/months worth of logs in such scenarios.
Do you maintain any servers in production?

You seem to be talking purely from a desktop user's viewpoint.

In production, it can take months for the results of an issue to surface. In those circumstances, it is helpful to have several months worth of logged information.

Since you're not interested in keeping logs, why not turn off logging altogether? It is easy enough to do.
 
Old 01-13-2018, 08:34 PM   #30
zakame
Member
 
Registered: Apr 2012
Location: Philippines
Distribution: Debian, Ubuntu, Slackware
Posts: 295

Rep: Reputation: 181Reputation: 181
Quote:
Originally Posted by linuxbawks View Post
You miss the point. Logging to disk also creates an inordinate number of writes for very little return.
Which is why I asked the question: what's your workload such that you'd care for disk writes in the first place?

Is this on an embedded environment, or one where there's such high level of write amplification and/or wear that you'd care to limit disk writes as much as possible? And to follow-up: would the effort to reduce disk writes be lesser than to say, get/replace disks for cheap?
 
  


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
/var/log/packages is empty! babyphil Slackware 31 11-01-2019 04:58 PM
/var/log/packages and /var/log/setup sunny_5252 Slackware 4 05-17-2007 08:17 PM
/var/log/packages Crazed_Mofo VectorLinux 3 04-10-2006 06:54 PM
/var/log/packages vanished Idle Slackware 3 09-19-2005 12:57 PM
/var/log/packages gone! PurpleMotion Slackware 1 10-02-2004 03:04 PM

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

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