LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   rpm2txz and slackpkg blacklist (https://www.linuxquestions.org/questions/slackware-14/rpm2txz-and-slackpkg-blacklist-4175717385/)

M0M0 10-03-2022 04:54 AM

rpm2txz and slackpkg blacklist
 
I installed a few programs via converting there rpm to slackware pkgs with rpm2txz and installpkg name-of-program.txz. When I run slackpkg clean-system, it obviously wants to remove those packages. Therefore, I added the names of those packages to /etc/slackpkg/blacklist. While this always works for all packages that I build from slackbuilds.org, it does not work for slackpkgs generated by rpm2txz.

So, i.e., I installed rustdesk, when I now run 'slackpkg clean-system' it want to remove 'rustdesk-1.1.9-fedora28-centos8'. Adding any of the following lines to /etch/slackpg/blacklist did not prevent this:

Code:

rustdesk-1.1.9-fedora28-centos8
rustdesk
*-centos8
*centos8

How can I find out the correct name of a package that slackpkg uses?

chrisretusn 10-03-2022 05:31 AM

rpm2txz is outputting an improper formatted package name.

Rename the package from rustdesk-1.1.9-fedora28-centos8.txz to rustdesk-1.1.9-fedora28_centos8.txz. Note the underscore between fedora28_centos8 replacing the dash.

Then run upgradepkg rustdesk-1.1.9-fedora28-centos8.txz%rustdesk-1.1.9-fedora28_centos8.txz

Code:

mv rustdesk-1.1.9-fedora28-centos8.txz rustdesk-1.1.9-fedora28_centos8.txz
upgradepkg rustdesk-1.1.9-fedora28-centos8.txz%rustdesk-1.1.9-fedora28_centos8.txz


allend 10-03-2022 06:56 AM

Use the -n option to rpm2txz to get a correct package name.
Code:

rpm2txz -n rustdesk-1.1.9-fedora28-centos8.rpm
...
Slackware package /tmp/rustdesk-1.1.9-x86_64-0.txz created.

Other options to rpm2txz are available. Type 'rpm2txz' to see the usage message.

M0M0 01-06-2023 10:52 AM

Ok, a similar thing happend again. I downloaded the chess engine stockfish from slackbuilds.org and made a manual version up (replacing the version number 14.1 with 15.1). It compiles fine and builds
Code:

/tmp/stockfish-15.1-x86-64-modern-1_SBo.tgz
But again, adding
Code:

stockfish
to
Code:

/etc/slackpkg/blacklist
does not prevent
Code:

slackpkg clean-system
from asking me, if it should remove the package :(

Petri Kaukasoina 01-06-2023 11:07 AM

It's packagename-version-architecture-buildnumber.tgz. Start reading from the end backwards. You have stockfish-15.1-x86-64-modern-1_SBo.tgz:

buildnumber: 1_SBo
architecture: modern
version: 64
packagename: stockfish-15.1-x86

You could rename it to stockfish-15.1-x86_64-modern_1_SBo.tgz (only three dashes):

buildnumber: modern_1_SBo
architecture: x86_64
version: 15.1
packagename: stockfish

Slackpkg needs the architecture part set correctly. It should be x86_64 for the 64-bit slackware or noarch if the package is independent of the architecture.

drumz 01-06-2023 11:12 AM

Quote:

Originally Posted by M0M0 (Post 6402630)
Ok, a similar thing happend again. I downloaded the chess engine stockfish from slackbuilds.org and made a manual version up (replacing the version number 14.1 with 15.1). It compiles fine and builds
Code:

/tmp/stockfish-15.1-x86-64-modern-1_SBo.tgz

That is not a valid package name (the same problem you had before).

Slackware package names are formatted like so:

Code:

NAME-VERSION-ARCH-TAG
Importantly, the NAME may contain "-" characters, but VERSION, ARCH, and TAG may not. Your package name above gives:

Code:

TAG=1_SBo
ARCH=modern
VERSION=64
NAME=stockfish-15.1-x86

Note how the splitting on "-" starts at the end and moves towards the beginning.

I don't know why a SlackBuild from SBo would produce such a package name. Are you sure you used it correctly?

For comparison, here is a properly formatted package name from SBo I have installed:

zoom-linux-5.13.3.651-x86_64-1_SBo

Code:

TAG=1_SBo
ARCH=x86_64
VERSION=5.13.3.651
NAME=zoom-linux

Edit: Petri beat me to it!

drumz 01-06-2023 01:01 PM

I'm guessing you uncommented the line that sets ARCH to "x86-64-modern"?

Code:

# More optimized, but may not run on all x86_64 hardware
# [ "$ARCH" = x86_64 ] && grep -w popcnt /proc/cpuinfo && ARCH=x86-64-modern
export CXXFLAGS="$SLKCFLAGS"
case $ARCH in
  x86_64)        make build ARCH=x86-64    COMP=gcc;;
  x86-64-modern) make build ARCH=$ARCH      COMP=gcc;;
  i?86)          make build ARCH=x86-32    COMP=gcc;;
  arm)          make build ARCH=armv7      COMP=gcc;;
  *)            make build ARCH=general-32 COMP=gcc;;
esac

I suggest you get in contact with the maintainer of the stockfish SlackBuild to fix the "x86-64-modern" ARCH setting. That's the cause of the invalid package name.

M0M0 01-07-2023 11:40 AM

Quote:

Originally Posted by drumz (Post 6402651)
I'm guessing you uncommented the line that sets ARCH to "x86-64-modern

Yes, it seems that I did this indeed. If I commenting that line and hardcode the make command to
Code:

make build ARCH=x86-64-modern COMP=gcc
(while leaving the content of $ARCH unchanged) solves the issue. I will contact the maintainer


All times are GMT -5. The time now is 08:25 AM.