USM Unified Slackware Package Manager

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
Post Reply
User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

USM Unified Slackware Package Manager

Post#1 by brokenman » 16 Jan 2014, 17:29

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#2 by brokenman » 17 Jan 2014, 15:18

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)
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#3 by brokenman » 18 Jan 2014, 13:23

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#4 by brokenman » 18 Jan 2014, 20:45

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:
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: USM Unified Slackware Package Manager

Post#5 by francois » 19 Jan 2014, 04:47

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.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#6 by brokenman » 19 Jan 2014, 16:33

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: USM Unified Slackware Package Manager

Post#7 by phhpro » 20 Jan 2014, 00:24

...
Last edited by phhpro on 04 Feb 2016, 00:50, edited 1 time in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#8 by brokenman » 20 Jan 2014, 02:00

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: USM Unified Slackware Package Manager

Post#9 by phhpro » 20 Jan 2014, 03:08

...
Last edited by phhpro on 04 Feb 2016, 01:33, edited 1 time in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#10 by brokenman » 20 Jan 2014, 03:34

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: USM Unified Slackware Package Manager

Post#11 by phhpro » 21 Jan 2014, 04:23

...
Last edited by phhpro on 04 Feb 2016, 00:50, edited 1 time in total.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#12 by brokenman » 22 Jan 2014, 03:36

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: USM Unified Slackware Package Manager

Post#13 by phhpro » 23 Jan 2014, 00:03

...
Last edited by phhpro on 04 Feb 2016, 00:52, edited 1 time in total.

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: USM Unified Slackware Package Manager

Post#14 by francois » 23 Jan 2014, 00:55

This seems an honest road test. What else is there to be tested? :wink:
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5576
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: USM Unified Slackware Package Manager

Post#15 by brokenman » 23 Jan 2014, 15:13

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply