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.
[edit] I wrote that before read latest phenixia2003 post.
The bug was introduced in Version 1.5.2 - 18/Dec/2015
I don't know why [[:digit:]] does not work as [0-9], and only if used together sudo su -
Just what I know is that grep uses a limited set of regular expression (that is what we need in that part of code), and I don't know the limits.
Some other (italian) user had the same problem, so I was able to compare more outputs and replicate on my machine (both slackware64-current multilib), and from experiment I discovered that [0-9] does work and [[:digit:]] does not.
May be a grep or sudo or su or enviroment or permission or kernel bug. Or may not.
slackpkg+-1.6.1-noarch-6mt.txz should fix.
@Didier: I not missing to read your post about the a stable release (or an LTS release) of slackpkg+. I'm just thinking about the feasibility of that.
@All: What do you think about the ConnochaetOS problem?
I know nothing about legal pratices.
The patch in post #356 (that is not pushed on github) disallow haary to use slackpkg+ unless he re-sign all slackware packages, and a patch that I have not posted deny to sign the official packages without the official slackware GPG key, disallowing haary to use slackpkg+ in a full-free distribution unless he does not use CHECKGPG=off.
If a user import a key from another link than official, however he has imported one trusted key.
We can add a slackpkgplus.conf directive that allow to download and install packages signed with external keys (that in effect is more secure than re-sign official packages with an non-official key, that means that a user must 'appropriate' himself package of other users)
Last edited by zerouno; 01-02-2016 at 11:11 AM.
Reason: [edit] I wrote that before read latest phenixia2003 post.
In any case maybe using GNU grep (but hey, that's what we have) can make hard to predict the results in some cases, as it lacks a "--posix" option as e.g. bash.
For instance I see in "man grep":
Quote:
In GNU grep, there is no difference in available functionality between basic and extended syntaxes
which is worrying IMHO as e.g. then in a basic regular expression you have to write \+ so that + be considered as a repetition operator, whilst for a POSIX compliant grep in such a case + is a repetition operator only in extended regular expressions, and has to be escaped with \ to loose this role then... Room for confusion here. But I guess that we have to live with that.
[edit] but only if running with the latest grep in pipe
[edit2] and only if something break the pipe before output does not finish, for example with head -1
But the output is correct, so technically may be sufficient a 2>/dev/null after second grep (but will not be that the solution)
One thing could be to write specs for the "stable" version, voluntarily limited but that could be extended in the "current" or "devel" branch. I am ready to participate in writing down these limited specs with anyone interested.
I never thought a my script (becouse that was slackpkg+sl at start) would become what it is now and that someone would have ever used.
For that reason I add function when I need one (all, included remote and local repositories, are primarily added becouse I did need it).
And I never thought that it could enter into a distribution.
How do you think that I should proceed?
The problem is that the community is not high for testing a development release; if most use the stable/LTS release, no one can test new feature; when I can consider it stable?
There is on github the master and the devel branch.
In past I did make packages "slackpkg+dev-...".
But there was a moment when I was writing a large update; during this time was needed some bugfix on master branch and the devel branch was not ready to test patch to backport on stable tree. Also there was a moment when I had very few time (no time really) to developing slackpkg+. So master and devel tree diverged a lot, until the devel branch was oldest and bugged becouse the not backported patches from master. I reverted development tree aligning it to master.
Currently devel and master diverge for a code restyling, but no function modifications, so to merge I was waiting to solve the 'write error' bug (that was not a real bug; all functionality was not impacted; just a non beautiful error on video).
P.S.: In development tree, on github, I added slint repository.
Note that you have a small bug in HOW-TO:
MIRRORPLUS['slint']=http:/slint.fr/packages/14.1-i486/
should be
MIRRORPLUS['slint']=http://slint.fr/packages/14.1-i486/
Unfortunately I have no experience with respect to git repositories, thus I am not able to give you a valuable advice about the management of your two branches (master/devel) on github.com.
However, from a user's point of view there have been recently a lot of updates in the "official" download location, i.e. sourceforge.net, and that can be slightly worrisome, at least for someone who doesn't follow this thread.
To put it in simple terms I would suggest that you publish on Sourceforge only updates including major bug fixes and propose new features less frequently.
Of course the definition of the "core" scope is only useful if you consider maintaining this tool on the long term with a possible inclusion in distributions. On the other hand if you only want to share a tool to which you continue adding features that you use for yourself my suggestion becomes moot. Only you can decide on that.
I will make sure Slint stays compatible with usage of slackpkg+ and, at least in the next version, also provide an already configured slapt-get, as it is widely used in SlackLand and I wish to make sharing packages among Slackware and derivatives or spin-off as easy as possible.
Thanks for adding the slint repositories in the development tree and for the heads-up about the bug in HOW-TO, now fixed. And of course, thanks for sharing slackpkg+!
Last edited by Didier Spaier; 01-03-2016 at 11:10 AM.
I would agree with Didier's suggestion. Only publish the stable version of slackpkg+. Then post on linuxquestions a test version, asking for testers. While I fully appreciate your patches and response to the bugs I found, I would have preferred to known the version was a testing version so I could decide if there was time in my work load to help with some testing. The current version (7mt) certainly seems to be stable as of today. Thank You for all you do to promote and extend Slackware. BrianA_MN
Download file..
https://connochaetos.org/slack-n-free/salix/i486/slackware-14.1/testing/MANIFEST.bz2:
2016-01-04 20:48:44 ERROR 404: Not Found.
You can add an empty CHECKSUMS.md5 (with relative CHECKSUMS.md5.asc) and an empty bizziped2 MANIFEST, and in all tree the PACKAGES.TXT should not gzipped.
I'm developing a version that check the GPG-KEY, but allow to use the legacy mode with a configuration in slackpkgplus.conf.
However (it is valid also with current version of slackpkg+) you must find a way to import the official gpg key. If you NEVER do a slackpkg update gpg using the offical mirror you will not import the slackware key, so you will not able to verify slackware signed packages in your replica-repository.
@All
I'm developing slackpkg+ 1.7; I will release that as a -beta, -rc, ... in the devel tree.
After release -stable, I will try to make it an LTS release (*); all new functions will be freezed and developed in a >=1.8 version, and all bugfix will be backported in slackpkg+ 1.7
slackpkg+ 1.6 will be supported for bugfix backporting until slackpkg+ 1.7 will be released; after that it will be declared EOL.
I ask you for more possible testing before releasing it.
Currently the only new planned feature is the strict gpg check.
(*) I will TRY that. Also depends for the time that I will find for developing it.
[EDIT] Someone have never tested slackpkg+ for arm or other architectures or have a way to test it? slackpkg support it, and also some part of slackpkg+ code, but there are parts of code in very doubt. I saw somewhere a slackpkplus.conf customized for arm (but I cannot find it now)
to install copy it in /usr/libexec/slackpkg/functions.d and remove zdialogplus.sh from the same directory.
Also you must add in slackpkgplus.sh
STRICTGPG=on
Quote:
Version 1.7.a1 - 04/Jan/2015
It's the time for a stable version of slackpkg+. Currently it is just a
development version to fix older feature and add/test new. I'll need more
test possible to make it bugfree .
- Code reordering; now slackpkg+ is only slackpkgplus.sh
- Added repositories; improved checkrepos.sh
- BugFix: slackpk give 'grep: write error' when running with "sudo su -"
- SecurityFix: Strict GPG Check. Packages MUST to be signed with root-GPG-KEY.
If can disable it via CHECKGPG in slackpkgplus.sh; see README
- New repository for slackpkg+ development version
The patch to fix the grep error can causes noticeable slowdowns as you can see below :
1. current slackpkg+
Code:
$ slackpkg -dialog=off upgrade-all
Checking local integrity... DONE
Looking for packages to upgrade. Please wait...
upgrade-all -> 26 s elapsed
[snip]
Total package(s): 281
2. previous slackpkg+
Code:
$ slackpkg -dialog=off upgrade-all
Checking local integrity... DONE
Looking for packages to upgrade. Please wait...
upgrade-all -> 23 s elapsed
[snip]
Total package(s): 281
Looking at the code "responsible" to the grep error, I don't see any reason to not simply redirect grep errors to /dev/null :
furthermore, this code can be optimized this way :
Code:
if [ ! -e ${TMPDIR}/${REPOSITORY}-pkglist ] ; then
grep -n "^${DIR} " ${TMPDIR}/pkglist > ${TMPDIR}/${REPOSITORY}-pkglist
fi
if [ "${PAT}" = ".*" ] ; then
PKGINFOS=$(grep -m 1 "^[0-9]\+:${DIR} ${ARGUMENT} " ${TMPDIR}/${REPOSITORY}-pkglist)
else
PKGINFOS=$(grep 2>/dev/null -w "${PAT}" ${TMPDIR}/${REPOSITORY}-pkglist | grep -m 1 "^[0-9]\+:${DIR} ${ARGUMENT} ")
fi
which gives :
Code:
$ slackpkg -dialog=off upgrade-all
Checking local integrity... DONE
Looking for packages to upgrade. Please wait...
upgrade-all -> 21 s elapsed
[snip]
Total package(s): 281
The patch to fix the grep error can causes noticeable slowdowns as you can see below :
I know that TEORICALLY that fix can introduce lag becouse it write a file MANY MANY times (50KB every time on my pc; pkglist is 150KB), but I don't see any difference
1.6.1-6mt
Code:
# time echo n|slackpkg -dialog=off upgrade-all 2>&1|grep -v t.z
NOTICE: pkglist is older than 24h; you are encouraged to re-run 'slackpkg update'
Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE
[ Repository ] [ Package ]
Total package(s): 708
Do you wish to upgrade selected packages (Y/n)?
real 0m26.871s
user 0m5.599s
sys 0m6.971s
1.6.1-7mt
Code:
# time echo n|slackpkg -dialog=off upgrade-all 2>&1|grep -v t.z
NOTICE: pkglist is older than 24h; you are encouraged to re-run 'slackpkg update'
Checking local integrity... DONE
Looking for packages to upgrade. Please wait... DONE
[ Repository ] [ Package ]
Total package(s): 708
Do you wish to upgrade selected packages (Y/n)?
real 0m26.813s
user 0m5.747s
sys 0m7.444s
also I tried mounting /tmp as tmpfs
mount -t tmpfs tmpfs /tmp
but I continue to no see differences
Quote:
I don't see any reason to not simply redirect grep errors to /dev/null :
Yes, it is most elegant
Quote:
furthermore, this code can be optimized this way :
With this code I obtain
Code:
real 0m24.837s
user 0m4.545s
sys 0m6.100s
(2 seconds less), but I not obtain the same result:
Total package(s): 707 instead 708.
Code:
# slackpkg -dialog=off upgrade-all >2 (new code)
# slackpkg -dialog=off upgrade-all >1 (-7mt)
root@homepc:~# diff 1 2
6c6
< Looking for packages to upgrade. Please wait... DONE
---
> Looking for packages to upgrade. Please wait... DONE
53c53
< slackware bridge-utils-1.4-i486-1.txz
---
> bridge-utils-1.4-i486-1.txz
409c409
< patches openssl-1.0.1q-i486-1_slack14.1.txz
---
> slackware openssl-1.0.1e-i486-1.txz
429d428
< slackware pinentry-0.8.3-i486-1.txz
718c717
< Total package(s): 708
---
> Total package(s): 707
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.