Page 1 of 25

USM Unified Slackware Package Manager

Posted: 16 Jan 2014, 17:29
by brokenman
This is a work in progress and is still in it's infancy. USM is a CLI slackware package manager that resolves dependencies and integrates various slackware repositories including slackware, slacky, slackers, salix and alien. At the moment i have only written it for 64bit but will update for 32bit shortly. It will also support many languages. Once all bugs are squashed and features are stable a front end will come.

After installing the slackware package please run: usm -u all to update the databases, then: usm -h to see the usage.

http://sourceforge.net/projects/usm/

It would be nice to get some feedback, ideas and constructive criticism.

Re: USM Unified Slackware Package Manager

Posted: 17 Jan 2014, 15:18
by brokenman
Thanks phhpro, i am expecting to find more bugs since it was written in 3 days.

I have finished making the package noarch, after which i can not reproduce the gtk errors you listed below so it must be something in the included database. The next version (when I push these updates tonight) should download all databases.

There is an -s (--search) option to search for packages but you still need to know the package name. I plan to include a 'keyword' search which will search the package descriptions and return a package name. This should be easier for most users.

The -S options is correct. You may pass either the option 14.1 or /path/to/storage and USM will act accordingly. I will put a link to the wiki in the usage (-h) and also add a man page which will make the options clearer. This option (-S) should not be needed as the slackware version is automatically sensed but i included it so i can add slackware-current later. On the first run USM will ask you about your storage and ask if you want to change it from the default. Perhaps I should remove this option as it is really only needed for testing/development and people that want to search slackware-current.

Expected use would go something like this:

usm -s imagemagick (search for a package)
usm -i imagemagick (get info on said package)
usm -g imagemagick (download said package)

Re: USM Unified Slackware Package Manager

Posted: 18 Jan 2014, 13:23
by brokenman
having options do different jobs depending the case, I find it a semi no-go. OK for seasoned nixers, but critical for the average Joe. How about adding a debug switch, which spits out some bonus gimmicks on demand?
Noted. I will remove the case switches. The problem is that using this '-s' form you run out of letters fast. For example -i is already used and now i want to add something for 'ignoring' dependencies.

Auto-sense: The default for me on first run was 14.1
Interesting. Not in a good way. The script first checks the config file found at /etc/usm/usm.conf and if you havn't manually set the slackware version it reads /etc/slackware-version. I will double check the script on 14.0 before updating. How did you check it was set to 14.1?

I can't default to slackware-current because some people still use 14.0 (and even 13.37) and since this tool is aimed at the slackware community i don't want to leave them out. Manually editing the config file will allow people to use current if they choose. I will add this information to the wiki. Thanks.

Re: USM Unified Slackware Package Manager

Posted: 18 Jan 2014, 20:45
by brokenman
I just made the discovery that in order to support versions older than 14.1 i would need to clone each individual repository locally (something i don't particularly want to do). This means USM will only support 14.1+. :wall:

Re: USM Unified Slackware Package Manager

Posted: 19 Jan 2014, 04:47
by francois
Thanks for providing slackware with that new package manager. This is really appreciated. :D

Setting the local directory for downloads, does not seem to work. I get package downloads in the /root folder and not in the /usr/tmp folder with:

Code: Select all

root@porteus:~# usm -S /usr/tmp
Download usm -g does not work for gnumeric though usm -s works:

Code: Select all

root@porteus:~# usm -s gnumeric

gnumeric-1.10.17-x86_64-2sl.txz was found in slacky
gnumeric-1.10.17-x86_64-1gv.txz was found in salix
Packages found:   2 

Use:   usm -i <package>  for more info
Use:   usm -g <package>  to download

root@porteus:~# usm -g gnumeric

 Nothing found for:  gnumeric 

root@porteus:~# 
Though it just worked fine for gimp. With all the generated dependencies, we will need a batch txz2xzm converter soon. :wink:

Great tool yet.

Re: USM Unified Slackware Package Manager

Posted: 19 Jan 2014, 16:33
by brokenman
Why not use numbers instead of characters?
Not so user friendly. In fact USM supports a string in place of a letter.
For example: -i -info --info info (are all the same)
Perhaps the usage should show the string instead of the character argument?
Relying on the env is a bit like trusting HTTP headers
Are you talking about the 'env' command which gives environment variables? If so this is very reliable. Applications rely on it to be.
If you can't trust the environment to return your machine architecture correctly (for example) then writing anything becomes difficult.
Doing the mirror yourself is not an acceptable option, IMHO.
Not sure what you mean. 'yourself' refers to 'user' or 'application author'?

@Francois
Thanks. I've fixed the setting of storage and will take a look at the option for download gnumeric.

A newer 'noarch' version is not far away. It also addresses many bugs.

Re: USM Unified Slackware Package Manager

Posted: 20 Jan 2014, 02:00
by brokenman
Ok i see. Sensing the slackware version should be fool proof. Just checking the file /etc/slackware-version should give the correct version. There is no reason why anyone would alter this file so i think it is a fairly safe bet. I would say the anomaly with your setup showing 14.0 instead was something more to do with the database files i uploaded. In any case i don't have enough info to make an informed statement about it.

In fact i was exactly talking about mirroring the repo. Not for users to download from, but in order to generate the required files to make dependency resolution work. I need access to the full repository in order to do this. It would be nice if the repo maintainers took 5 minutes and generated this file which is a simple readelf, objdump or ldd query to see what libraries will be called by the binary when it is executed. Unfortunately i have to create this file myself. I've automated it so on my end all i need to do is set a cronjob to run my script every 5 days to update the files. As far as i can tell there is no other way to have any kind of dependency resolution except in the case of slacky which actually uses the PACKAGES REQUIRED: line in the /var/log/packages file as it is meant to be used.

Re: USM Unified Slackware Package Manager

Posted: 20 Jan 2014, 03:34
by brokenman
I've uploaded a new 'noarch' version which fixes a number of bugs. Francois please try gnumeric again. All database files are up to date as of today. Please report any more bugs here. One request was NOT to have the choice when two files of the same version are available. The suggestion was to just automatically choose one for the user, since the versions are the same (repositories may be different). I will implement this for the next update.

Re: USM Unified Slackware Package Manager

Posted: 22 Jan 2014, 03:36
by brokenman
Updated new version.

+-------------------------------
Wed Jan 22 02:13:29 UTC 2014
usm-3.0.1-noarch-1.txz: updated

Added slackbuilds support (see man page)
Fixed slackware exclusion list in update_database()
Fixed bad cleanup after invalid command
Fixed sniff of package size for ponce repo
Added check for existing file when downloading
Added file to insert missing libraries into LIBS.TXT
Fixed bug for updating of slackwarepatches
Removed compat32 package from showing up as dependency
Removed duplicated packages of same version when resolving deps
Added usm ChangeLog.txt to options: usm -c usm

Please test as much as you can. Feedback like phhpro and Francois above will help refine the application. Please especially try to build stuff from SBo and let me know what fails. I want to make the building from source as painless as possible. I've added in checks for qmake and cmake when they are found in the slackbuild file. If the user doesn't have the required compilation tool, they should get a warning.

Re: USM Unified Slackware Package Manager

Posted: 23 Jan 2014, 00:55
by francois
This seems an honest road test. What else is there to be tested? :wink:

Re: USM Unified Slackware Package Manager

Posted: 23 Jan 2014, 15:13
by brokenman
Thanks again for more testing.

The only Gimp I'm getting is 2.8.2
Just checked and i am getting gimp-2.8.6 (are you on 32bit?)

sbo -l graphics renders a fair list, but without any hint at which version. Would be nice to have that little extra info on the same screen.
To do this USM would need to do one of two things: 1. sync entire SBO repo 2. download the .info files for each package shown in result.
The version info is given in the step just before building the package.
This is "usm -b appname". Perhaps i should add: "usm sbo -i appname"

There's a gallery pkg in sbo graphics but usm sbo -b gallery does nothing at all,
usm -b gallery (will add the syntax you used. It makes perfect sense.)

usm -s gallery returns nothing found.
I added this 'secondary search' of slackbuilds last night only. If a package is not found in the first slackware search it will search slackbuilds.
Not so sure it is a good idea since many packages from SBO will not build without required build dependencies.

usm -i sbo gallery
Wrong syntax. Looks like i will have to add all sbo switches: usm sbo -i gallery
This seems to be intuitive.

Since usm sbo -b appname doesn't seem to do any, how to actually get stuff off sbo?
Looks like i missed the "sbo -b" completely from the case. Will add it today.
For now you can use "usm -b appname" as per usage in "usm -h"

usm -d gimp
Should be usm -d /var/log/packages/gimp* as per usage in "usm -h"
This function only works for installed packages at the moment.
The syntax you used above has pitfalls in the case of say gimp-plugins or gimp-brushes.
Perhaps i should check the given string against what is installed and present a menu for the user to choose from?

Just tried usm -l. Fancy listing, but what happened to either gimp or gallery
Do you have them installed? "usm -l" lists installed packages. I'll update the usage in "usm -h" to be more accurate. "man usm" is useful.
Perhaps you meant: usm sbo -l

So next release will contain:
1) better switches for: usm sbo
2) a more detailed usage and man page

@ Francois
The feedback i'm getting from phhpro is what is useful. It tells me what is intuitive. What he expects to get from what he enters, and what he expects entering something will do. This is the stuff (relative viewpoints) that one person alone can not do. It would be nice if you could do a few test builds from SBO and let me know what fails. I doubt there is anything that can be done for failed builds, but having qt and the devel modules should cover most builds. Please also let me know which desktop environment and architecture you are using to test USM. Thanks again.

Re: USM Unified Slackware Package Manager

Posted: 23 Jan 2014, 16:35
by brokenman
Updated to v3.0.2 which addresses above issues. I also added a 'keyword search' option.

+-------------------------
Wed Jan 23 16:52:03 UTC 2014
usm-3.0.2-noarch-1.txz: updated: updated
Added secondary search of slackbuilds after normal search fails
Added usm sbo -b appname
Fixed bug with getting link for slacky
Added sanity check for slackbuilds function
Added keyword search option -k

Re: USM Unified Slackware Package Manager

Posted: 23 Jan 2014, 20:16
by francois
@brokenman:
I am working with kde 3.0 when I am on usm. I should have some testing in the following hours.

Re: USM Unified Slackware Package Manager

Posted: 24 Jan 2014, 00:07
by brokenman
The error regarding SLACKBUILDS.TXT.gz is odd. It is working fine here. Did you try updating a second time? It could perhaps be that the file didn't download correctly, hence not being seen as a gzip file.

that would render most of the present PPM redundant.

You are correct in both respects. I was aiming at a broader slackware audience with this tool, and (once modified for porteus) it will render PPM redundant. This means devs will not need to maintain repositories and all packages can be converted client side.

My intention is to wait until this CLI version is stable and then write a front end for it. It would then replace the current PPM. PPM is bloated and the code is far from optimized. It was not easy to write and when i review the code now i understand why. At the time of writing i didn't have a broader picture of how it would work. In this situation you tend to tack on things to fix problems that you didn't foresee coming up. Hindsight is always 20/20 but i believe in rewriting it now, it would much leaner and cleaner.

If at all possible i would like to work with ViktorNova in getting the arch stuff to play nice with slackware which would open up another world of packages. I tried it with debian packages but found that dep resolution was below par. This may also be the case for arch which would be a shame since the priority is dependency resolution and simplicity so that packages work.

Question: Do you think GPG checks are necessary if the repositories are all well known and trusted?

Re: USM Unified Slackware Package Manager

Posted: 24 Jan 2014, 17:15
by Slaxmax
How to skip a package? I tried installing VLC, but do not want to download the samba package.
I want to skip the samba package, but did not see option.