LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-23-2012, 10:50 AM   #61
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Original Poster
Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963

As a side note to those who preferred the name /etc/distro-release, it wouldn't have worked anyway as rPath already uses this file name for its release information, so if freedesktop.org has specified that name instead rPath would have had to switch the internal format to comply and this in turn could have broken any scripts that expected their formatting.
 
Old 08-24-2012, 05:15 PM   #62
ttk
Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware
Posts: 268
Blog Entries: 13

Rep: Reputation: 220Reputation: 220Reputation: 220
Quote:
Originally Posted by ruario View Post
@ttk: I suspect Mageia might be ok in any case as (Mageia 2 at least) have /etc/os-release.
Good deal. self-id looks for os-release first, so that is enough. Thanks.

Quote:
Careful reading /etc/lsb_release. The format of this is not part of any LSB standard, only the "lsb_release" binary is, so you would be better calling that directly even though this introduces an extra overhead.
self-id calls lsb_release and reads its output when possible. The only time I've encountered an /etc/lsb-release when the lsb_release utility was not installed was when the worker nodes in a cluster got some of their /etc files copied to them from a master node which did have the lsb_release utility installed.

Since reading /etc/lsb-release is fairly far down the checklist, I'm not too worried about it. When it becomes important to support a different format, the parser will be adjusted to accommodate it.

That having been said, I just checked Ubuntu 12.04's /etc/lsb-release and it is a different format. Ubuntu is becoming increasingly prevalent in the datacenter (ugh) and 12.04 is a UTS release, so I'm going to go ahead and support it.
 
Old 08-24-2012, 06:43 PM   #63
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 308

Rep: Reputation: 22
@ruario, congratulations!
Quote:
Originally Posted by slackware64-current/ChangeLog.txt
Fri Aug 24 20:08:37 UTC 2012
This is Slackware 14.0 release candidate 3,...
a/aaa_base-14.0-x86_64-5.txz: Rebuilt.
Added /etc/os-release.
Touched /etc/slackware-version to bring the datestamp closer to release.
 
1 members found this post helpful.
Old 08-24-2012, 10:48 PM   #64
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Original Poster
Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
Thanks Pat, that is very much appreciated!
 
Old 08-25-2012, 05:03 AM   #65
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,525

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
Looks like business as usual at the Slackware forum at LQ. From /etc/os-release
Quote:
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
 
Old 08-25-2012, 05:05 AM   #66
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Originally Posted by allend View Post
Looks like business as usual at the Slackware forum at LQ. From /etc/os-release
Why can I see this causing problems in the future ....
 
Old 08-25-2012, 05:46 AM   #67
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware64 14.0 / 14.1
Posts: 131

Rep: Reputation: 50
Quote:
Originally Posted by wildwizard View Post
Why can I see this causing problems in the future ....
At least three of the core team are active here, everyone else who helps out in this forum is polite and fast to respond, and it's been the de facto source of first-line support for years. More to the point, it's been identified as "the best place to turn for free support from the user community" on Slackware's support page itself, so why not make it official in /etc/os-release?

Nothing much will change. Have faith
 
Old 08-25-2012, 06:11 AM   #68
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Originally Posted by CTM View Post
itself, so why not make it official in /etc/os-release?
You missed the obvious.

hint check the forum URL and then check the next version number of Slackware
 
Old 08-25-2012, 06:28 AM   #69
StreamThreader
Member
 
Registered: Mar 2012
Location: Ukraine/Odesa
Distribution: Slackware
Posts: 96

Rep: Reputation: 9
For this reason i create slackbuild in program for example Vacuum-IM and add patch for detect salckware.
Patch link i cannot post, maybe this is my first post ).
if you download source go to - src/packages/linux/slackware/
 
Old 08-25-2012, 11:59 AM   #70
zithro
Member
 
Registered: Aug 2012
Distribution: Slackware 13.37
Posts: 46

Rep: Reputation: Disabled
So if I understand correctly, the detection scripts will move from
Code:
// find a file named /etc/*release
// grep the name by keeping [A-Za-z0-9] to get the distro name
// getting the content to get the distro version number
to

Code:
// get the content of /etc/os-release
// get the distro name
// get the distro version
? If that's it, such an evolution ...

Also, will this file be adopted by *BSD folks ?
 
Old 08-25-2012, 01:24 PM   #71
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,298

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Quote:
Originally Posted by zithro View Post
Also, will this file be adopted by *BSD folks ?
Only when hell freezes over, I think. They do not seem to take suggestions from Linux folks very kindly.
 
Old 08-25-2012, 01:44 PM   #72
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Rep: Reputation: Disabled
Quote:
Originally Posted by ruario View Post
I'm not expecting everyone around here to start suddenly liking Lennart. Hell, I'm no fan of the guy. But you don't need to like the guy to decide if /etc/os-release is beneficial or not. It would be nice if we could focus on that.
http://en.wikipedia.org/wiki/Pragmatism
 
Old 08-25-2012, 03:01 PM   #73
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Original Poster
Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
Quote:
Originally Posted by zithro View Post
Code:
// find a file named /etc/*release
Many distros have more than one such file, so make sure you pick the right one. Also, Slackware uses slackware-version, so your method would have failed to detect Slackware right off the bat. Other naming formats are used as well and the file is not always in /etc. Some distros store their file in the docs directory (e.g. TinyCore). So you would also fail to find all of these distros.

Quote:
Originally Posted by zithro View Post
Code:
// grep the name by keeping [A-Za-z0-9] to get the distro name
They don't always have the distro name in the file itself (e.g. Arch). Also others often have the code name as well as the distro name and sometimes other words are included as well. How will you be sure to you pick the right string when the formating of these types of files is not standardised?

Quote:
Originally Posted by zithro View Post
Code:
// getting the content to get the distro version number
The number could be on any line in any place or not be included at all, since there is no standard.

Quote:
Originally Posted by zithro View Post
If that's it, such an evolution ...
Yes, the reason you didn't realise the difficulty is simply because you never attempted to write a script to do this.

P.S. On the upside you were right about this part:

Quote:
Originally Posted by zithro View Post
Code:
// get the content of /etc/os-release
// get the distro name
// get the distro version
Pretty nice, eh?

Last edited by ruario; 08-25-2012 at 03:22 PM. Reason: rewritten
 
Old 08-25-2012, 03:12 PM   #74
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Original Poster
Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
Quote:
Originally Posted by zithro View Post
Also, will this file be adopted by *BSD folks ?
Quote:
Originally Posted by T3slider View Post
Only when hell freezes over, I think. They do not seem to take suggestions from Linux folks very kindly.
It doesn't matter because telling apart BSDs is easy since there kernels are named the same as the OS, hence 'uname -s' would do it. The Linux distros share a kernel so you couldn't do the same trick.
 
Old 08-25-2012, 03:15 PM   #75
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,902

Original Poster
Rep: Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963Reputation: 963
Quote:
Originally Posted by Mercury305 View Post
Yep, I said pretty much the same thing myself.

Quote:
Originally Posted by ruario View Post
Rather than spend too much time worrying about Lennart, his methods of pushing for things or if there is some theoretical better standard with no hope of acceptance, I think we should be pragmatic and accept the solution that is available.
 
  


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
Slackware 8.1 minimum install (including KDE) JaymzCobain Slackware 11 02-03-2004 08:09 AM


All times are GMT -5. The time now is 06:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration