[SOLVED] Version number mismatch in slackbuilds script.
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.
Hi: I've downloaded sources and script for the application nted from slackbuilds dot org. The following are the filenames:
Code:
nted.tar.gz ;this is the script.
nted_1.10.18-12.debian.tar.xz 24K
nted_1.10.18.orig.tar.gz 4.0M
Now, in the script I have the following line:
Code:
VERSION=${VERSION:-1.10.18_12}
As you can see the version string in the script does not match any of the strings in the filenames. Notice the mismatch between the hyphen and the underscore (18-12 and 18_12). In which of the two source files should the version number match the version number in the script? I think the script should match the number in the second file listed and I have to replace the underscore in the script by a hyphen. What do you think?
Many SBo scripts are like that. The maintainers have a reason for doing that because often developers are not careful with how software is named and sometimes version strings conflict with Slackware package naming conventions.
Study the entire script. Notice that VERSION is later parsed into two additional variables, MAINVER and DEBVER.
Many SBo scripts are like that. The maintainers have a reason for doing that because often developers are not careful with how software is named and sometimes version strings conflict with Slackware package naming conventions.
Well, then what would your answer be to post #1? ("I think the script should match the number in the second file listed and I have to replace the underscore in the script by a hyphen. What do you think?").
I Just update my own when I find one that has not been (blender for example, the one that is using the self contained tarball) that takes changing the vers and some of the format for the file within the script itself, sometimes. I just fix whatever needs fixing run it then install it then go on about my day.
Well, then what would your answer be to post #1? ("I think the script should match the number in the second file listed and I have to replace the underscore in the script by a hyphen. What do you think?").
Slackware packages are required to follow a specific naming convention:
NAME-VERSION-ARCH-BUILD
The NAME is allowed to contain hyphens, but none of the other components may. Sometimes, the upstream developers' naming does not follow the Slackware convention, and in those cases you would end up with an invalid Slackware package filename, breaking Slackware package management tools. That is why it has been renamed to not match upstream exactly. I recommend you leave it as is.
Anyway, to answer your question, no, I don't think the Slackware version number should be changed to match upstream, as that would result in an invalid package name.
Last edited by montagdude; 03-16-2020 at 11:11 PM.
To give an actual example of montagdude's post, if you do decide to rename the version to contain a hyphen, the filename would be nted-1.10.18-12-x86_64-1_SBo.tgz
Slackware's package tools basically take the filename, reverse it and then start checking for hyphens. So the first hyphen it finds, it knows everything before that is the BUILD. The characters between the first and second hyphens is the ARCH, the characters between the second and third hyphens is the VERSION, and anything beyond the third hyphen is the package name. This allows package names to include hyphens without breaking the package naming scheme. So, if we were to colorize this package names in Slackware to the below, it would look like this.
NAME-VERSION-ARCH-BUILD
The normal package would be broken out like this:
nted-1.10.18_12-x86_64-1_SBo
But if we swap that underscore to a hyphen, the it now looks like this:
nted-1.10.18-12-x86_64-1_SBo
This will prevent the slack-desc from working, as it is required to match the package name and if you try and update it if 1.10.19-1 comes out, Slackware won't recognize it for upgrade since it will be trying to match the package name nted-1.10.18 against nted-1.10.19, and they obviously won't match.
This is why we keep hyphens out of versions in Slackware.
Note that this -12 is specific for Debian (and rpm too) style of packages, it - in fact - is the Debian build of the package. As package names follow a different convention in Slackware, you cannot use that - in a Slackbuild script.
In fact the number says: this is version 1.10.18, with build 12 for Debian.
In Slackware that would be nted-1.10.18-architecture-12_debian.txz
Note that I had to exchange the first _ for a - too.
I'll run the script, without touching anything and see if the resulting package works when installed. I mean, if the programs run correctly. If they do, then I won't worry about other considerations. Thanks montagdude for answering my question.
Hum... In post #7 I have both the author and his email URL. I would very much like to know how average_user got those data. He seems to have started with the MD5 checksum for one of the files. Ahhh, thanks for your illustrative posts.
Hum... In post #7 I have both the author and his email URL. I would very much like to know how average_user got those data. He seems to have started with the MD5 checksum for one of the files.
Yeah I used Git, this repository specifically https://github.com/SlackBuildsOrg/slackbuilds because that is the one I send PRs to so I have it cloned locally and the following command:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.