[SOLVED] How to identify Slackware Current? (Feature Request)
SlackwareThis 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.
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.
Perhaps some people want that, but that was not the original focus of this (my) thread. My focus was a request for a simple scriptable way to distinguish a stable release from current. Something in /etc/os-release would suffice and be simple and is what I requested. Pat is a veteran hacker with these things. I am sure if he provides a solution the method will be simple.
Ah, that is much simpler than I was imagining. Pat would just need to update /etc/os-release and /etc/slackware-version the update after a stable release to change the versions to current and then the last update with the announcement of a stable release, he changes those versions to whatever the new stable number is.
I have a virtual machine that has not been update in a while. I simply looked at /var/lib/slackpkg/ChangeLog.txt and determined that the last update was "Tue Nov 28 06:20:03 UTC 2017". Also noted the newest files in /var/log/packages was Nov 29 22:47, which means that the update was applied. Of course this is a manual way, not a scripted way.
I think the best place would be to use /etc/slackware-version. An example. On release of 14.2, it was set to "Slackware 14.2" On the first batch up updates to Slackware 14.2, now a new -current, set it to "Slackware-current 14.2" This way one knows this -current is based on 14.2. One could also just set it to Slackware-current and rely on os-version to determine what version -current is based on.
A lot of the work enumerated there has already been done, and components "just" need to be installed and configured. Still, installing and configuring them represents a lot of work in its own right.
I dream of implementing a turnkey solution someday, but am already buried under a pile of neglected projects.
Yes, but as mentioned in the original post, not all Slackers use slackpkg. Some folks update systems only with pkgtools.
Guess I'm one of those pkgtool users. I tag a kernel, so when a script needs to know, it looks up there for clues.
Liked the idea of sticking time and date into /etc/* anyway, it's a good one.
SLKGCC="$(gcc --version | grep gcc)"
if [ "$SLKGCC" = "gcc (GCC) 4.7.1" ]; then
SLKUSYS="14.0"
elif [ "$SLKGCC" = "gcc (GCC) 4.8.2" ]; then
SLKUSED="14.1"
elif [ "$SLKGCC" = "gcc (GCC) 5.5.0" ]; then
SLKUSYS="14.2"
else
SLKUSYS="current"
fi
echo $SLKUSYS
echo $SLKGCC
Here is a script I use for grabbing Alien Bob's Packages.
helps you install the correct ones and lets you download any you want for any version.
Code:
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
while true; do
# Ask the user for the Program name
echo -e "\e[1;33m what Alian Bob program do you need?\e[0m"
read prgname
echo -e "\e[1;34m It's ok lets download or install $prgname \e[0m"
sleep 2
PROGNM=$prgname
# Need the version of Slackware you are running
echo -e "\e[1;33m Enter the version number of Slackware you need to download ? \e[0m"
read slackwareversion
echo -e "\e[1;34m You chose slackware version $slackwareversion \e[0m"
sleep 2
SLKVER=$slackwareversion
# Need the version of Slackware you are downloading
echo -e "\e[1;33m Type yes or no to install? \e[0m"
read install
echo -e "\e[1;33m Are going to install $install \e[0m"
sleep 2
INST=$install
EDITPG=vim # add you favorite editor here defaylt is vim kwrite,kate,gvim,geany.
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo/$SLKVER}
BOB=$TMP/$PROGNM
if [ "$ARCH" = "x86_64" ]; then
PKG="pkg64"
else
PKG="pkg"
fi
#rm -rf $BOB
mkdir -p $TMP/$PROGNM
echo going to grab slackware.uk/people/alien/slackbuilds/$PROGNM/$PKG/$SLKVER/
sleep 5 #http://slackware.uk/people/alien/slackbuilds/
rsync -r -a -v --delete --progress --stats rsync://slackware.uk/people/alien/slackbuilds/$PROGNM/$PKG/$SLKVER/ $TMP/$PROGNM
cd $TMP
SLKGCC="$(gcc --version | grep gcc)"
if [ "$SLKGCC" = "gcc (GCC) 4.7.1" ]; then
SLKUSYS="14.0"
elif [ "$SLKGCC" = "gcc (GCC) 4.8.2" ]; then
SLKUSED="14.1"
elif [ "$SLKGCC" = "gcc (GCC) 5.5.0" ]; then
SLKUSYS="14.2"
else
SLKUSYS="current"
fi
sleep 5
if [ "$SLKVER" = "$SLKUSYS" ]; then
echo -e "\e[1;34m Your Installing the right program for your system \e[0m"
sleep 3
elif [ "$INST" = "no" ]; then
echo -e "\e[1;34m it is downloaded do not install on this system \e[0m"
else
echo -e '\E[37;41m'"\033[1m !!!!Unable TO Istall You are running the wrong Slackware Version !!!!\033[0m"
sleep 5
exit 1
fi
if [ -f $TMP/$PROGNM/*.txz ]; then
echo -e "\e[1;33m $PROGNM downloaded \e[0m"
sleep 1
else
function pause(){
read -p "$*"
}
# ...
echo -e "\e[1;33m Program Not found. Was It Spelled Right? \e[0m"
echo -e "\e[1;33m Would you like to look it up? press enter to see the repo \e[0m"
pause 'Press [Enter] key to continue or ctrl c to stop...'
# ...
lynx http://slackware.uk/people/alien/slackbuilds/
fi
if [ -f $TMP/$PROGNM/*.dep ]; then
echo -e "\e[1;33m This Program Has Dependencies exit vim press shit>colon then type q \e[0m"
echo -e "\e[1;33m or a gui editor gvim kwrite \e[0m"
sleep 5
$EDITPG $TMP/$PROGNM/*.dep
function pause(){
read -p "$*"
}
# ...
echo -e "\e[1;33m Look at them good you may need them. \e[0m"
pause 'Press [Enter] key to continue or ctrl c to stop...'
# ...
else
echo -e "\e[1;33m No dependencies needed \e[0m"
sleep 3
fi
if [ "$INST" = "yes" ]; then
cd $BOB
upgradepkg --reinstall --install-new *.t?z
else
echo -e "\e[1;33m your program is locate $BOB \e[0m"
sleep 3
fi
function pause(){
read -p "$*"
}
# ...
echo -e "\e[1;33m Would you like to install or download another alien pkg \e[0m"
pause 'Press [Enter] key to continue or ctrl c to stop...'
# ...
# rest of the script
#
for i in {Type In another Program}; do
echo -e "\e[1;34m $i\e[0m"
sleep 1
done
done
Last edited by Drakeo; 04-12-2018 at 06:47 PM.
Reason: add full script
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,096
Rep:
From today's change log,
Quote:
Thu Apr 12 23:00:51 UTC 2018
a/aaa_base-14.2-x86_64-3.txz: Rebuilt.
If the system is running -current, append a "+" to /etc/slackware-version.
Identify the system as stable or current in /etc/os-release by setting
VERSION_CODENAME to either stable or current. In PRETTY_NAME, really
spell it out, e.g: PRETTY_NAME="Slackware 14.2 (pre-15.0 -current)"
Identifying -current is great. However I'd prefer to see "post-14.2 -current"
When a -current software version first appears after a stable release, Mr. Volkerding may think it will be called 14.3. But a year later, due to major changes, a release version of 15.0 may make better sense to him.
I'm not a fan of announcing the version number of the next stable release far in advance. It encourages many on LQ to refer to -current with that future version number long before it is ever released. This makes it difficult to find issues with the stable release with that version number when -current is also referenced as a stable released version number (e.g. 15.0). It makes it difficult to know which version of the software the poster is actually using.
Precision in referencing a release in a post, such as "pre-15.0", would help but the problem is caused by a poster's lack of precision with version name references in the first place. Referencing -current as pre-xx.x is actually more precise then simply -current but I don't know if LQ search can differentiate "xx.x" from "pre-xx.x" when searching for stable release "xx.x".
Sure knowledge of release dates for different software versions can help narrow the search, but needing to apply additional attributes dilutes the value of having version references.
I brought this issue up previously and it doesn't seem to be a problem for anyone else. I'm not trying to convince anyone. I'm just voicing my unshared opinion. I like to see software versions referenced unambiguously.
Here it is on a freshly updated Slackware64 14.2 current box ( a Slackware 14.2+ box )
Code:
~/bin/what-version # I named the script ~/bin/what-version
post-14.2 -current
Here it is on a different slackware 14.2 box:
Code:
# ~/bin/what-version
14.2
I am sure there are better ways to do what I did but the simple '+' suffix says that my current box is Slackware Current based on the latest 14.2 ( or post-14.2-current )
HTH.
-- kjh
Last edited by kjhambrick; 04-13-2018 at 02:08 PM.
Reason: missed the point :)
Although I tagged this thread as solved, my thanks to Pat for implementing the change. For years I have used my own admin shell script to synchronize certain files among all of my Slackware systems. With the new change I now can distinguish a Current system and not sync files incorrectly. Nice!
Is there a way to know the actual time stamp of the current version one is using? I know this is an old thread and https://docs.slackware.com/howtos:mi...ckware_version shows how to get the slackware version, but I would also like to know the actual time stamp for the current version. The changelog shows something like
Quote:
Fri Jan 7 06:03:52 UTC 2022
a/kernel-firmware-20220106_4aa2c65-noarch-1.txz: Upgraded.
a/tcsh-6.23.02-x86_64-1.txz: Upgraded.
ap/sqlite-3.37.2-x86_64-1.txz: Upgraded.
...
so the first line would be useful to be included in /etc/os-release, if possible. I admin a computer room where I create golden images based on slackware current that are meant to be distributed by using clonezilla, but sometimes some installs fail and require manual tinkering and at the end I have several systems on "different" slackware current (different dates).
Thanks
PS: I do not mean to hijack the thread, I think this is a related question. Sorry in advance.
Is there a way to know the actual time stamp of the current version one is using? I know this is an old thread and https://docs.slackware.com/howtos:mi...ckware_version shows how to get the slackware version, but I would also like to know the actual time stamp for the current version. The changelog shows something like
so the first line would be useful to be included in /etc/os-release, if possible. I admin a computer room where I create golden images based on slackware current that are meant to be distributed by using clonezilla, but sometimes some installs fail and require manual tinkering and at the end I have several systems on "different" slackware current (different dates).
Thanks
PS: I do not mean to hijack the thread, I think this is a related question. Sorry in advance.
Hmm yeah, I did not want to suggest what fields to use, but now that you cited the docs, maybe VARIANT or VARIANT_ID would be useful tags ...
According to the link I already posted (https://docs.slackware.com/howtos:mi...ckware_version), there is no currently a way to distinguish among current versions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.