LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can slackpkg+ work on 32bit and 64bit repos at the same time (https://www.linuxquestions.org/questions/slackware-14/can-slackpkg-work-on-32bit-and-64bit-repos-at-the-same-time-4175485033/)

samac 11-18-2013 12:36 PM

Can slackpkg+ work on 32bit and 64bit repos at the same time
 
I run a multi-lib system and use slackpkg+ to manage repos from AlienBob, multilib, ktown, restricted and alien. All 64 bit.

However being a multi-lib system means that I run 32-bit apps like steamclient and that is not in a 64bit repo.

So is it possible to run two repos with the same name but different architectures?

samac

kikinovak 11-18-2013 01:48 PM

I'd say this is asking for trouble. Use 64-bit repos, and then add needed 32-bit compatibility packages. It's well described in AlienBob's multilib documentation.

samac 11-18-2013 03:15 PM

Installing multilib and compatibility packages is not a problem. All is working perfectly. However not all the packages that you run via multilib are available in a multilib-applications repo.

For example:

I have been able to download wine and upgrade it via slackpkg+ but not steamclient

Perhaps it would be better if the packages that are only available in 32bit versions are made available in a 32bit repo and also in multilib-application repo. These could include:

wine
steamclient
skype
google earth

etc...

samac

number22 11-18-2013 03:28 PM

massconvert32.sh

samac 11-18-2013 03:59 PM

I appear to be unable to make my point clearly so I will try yet again. I am not asking how to get multi-lib or multi-lib programs working.

I am trying to get it so that an installed 32bit program will upgrade via slackpkg+

This does not happen at the moment because the 32bit program is not in the 64bit repo. So I am either trying to find a way to run to repos with the same name and different architecture, or suggesting the creation of a new repo for those few 32bit programs that multi-lib enable users wish to run.

samac

zerouno 11-19-2013 03:10 AM

Currently slackpkg+ check for arch.

This is needed for repository that contains mixed architecture packages (as was alienbob and others).

As workaround edit /var/lib/slackpkg/functions.d/slackpkgplus
search that code
Code:

    if [ "$(basename $1)" == "CHECKSUMS.md5" ];then
      X86_64=$(ls /var/log/packages/aaa_base*x86_64*|head -1 2>/dev/null)
      for PREPO in $REPOPLUS;do
        if [ ! -z "$X86_64" ];then
          egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -- "-(x86_64|noarch)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
        else
          egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "-(x86_64|arm)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
        fi
      done
    fi

and remove it and give me feedback.

phenixia2003 11-19-2013 03:33 AM

Hello,

Quote:

Originally Posted by samac (Post 5066834)
I appear to be unable to make my point clearly so I will try yet again. I am not asking how to get multi-lib or multi-lib programs working.

I am trying to get it so that an installed 32bit program will upgrade via slackpkg+

This does not happen at the moment because the 32bit program is not in the 64bit repo. So I am either trying to find a way to run to repos with the same name and different architecture, or suggesting the creation of a new repo for those few 32bit programs that multi-lib enable users wish to run.

samac

I understand what you are trying to do. Currently this is not possible, slackpkg+ removes automatically references to 32-bit packages in configured repositories when running on 64-bit. It will be better to give user a way to configure that. Something like ALLOW_32ON64=on|off in slackpkgplus.conf.

In the meantime, you can achieve this as below (as root) :

1. save the file /usr/libexec/slackpkgplus/functions.d/slackpkgplus.sh
Code:

cd /usr/libexec/slackpkgplus/functions.d
cat slackpkgplus.sh > slackpkgplus.sh.bak

2. edit /usr/libexec/slackpkgplus/functions.d/slackpkgplus.sh, and change the line #232 (slackpkg+ 1.0.1), which is as below :

Code:

          egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -- "-(x86_64|noarch)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
to

Code:

          egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -- "-(x86_64|noarch|i[3456]86)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
3. Edit the file /etc/slackpkg/slackpkgplus.conf and create an entry into the MIRRORPLUS array for the 32-bit repository you want. Don't use the same name as for 64-bit. Example :

Code:

MIRRORPLUS['repositoryname.x86']=http://url/of/32-bit/repository/
4. run :
Code:

$ slackpkg update
4. If there's no 64-bit version for packages you want to install, you should be able to install/upgrade them without any additional work. Otherwise, you'll have to give them priority over the 64-bit using the variable PKGS_PRIORITY in /etc/slackpkg/slackpkgplus.conf. For instance :
Code:

PKGS_PRIORITY=( repositoryname.x86:packagename )
Hope this helps.

Cheers.

--
SeB

samac 11-19-2013 03:40 AM

OK I will make the modification but cannot test it at the moment as there appears to be a problem with alien bob's server.

samac

zerouno 11-19-2013 07:12 AM

I added ALLOW32BIT flag (and some other features) in the development package. Please test it.
Thanks all.

AlienBob repository is now up.

samac 11-19-2013 07:16 AM

Tried SeB's solution.

The package is steamclient-1.0.0.41-i386-1alien and it has been upgraded in the x86 repo to version 1.0.0.44

I modified the required line to include i[3456]86
Created a new repo alienx86 and pointed it to the correct place
slackpkg update gpg
slackpkg update

Repo was found and files updated

slackpkg upgrade-all

Found the new slackware updates and the update to slackpkg+ but not steamclient

I modified my priorities, but no effect even when I put alienx86:steamclient before alienbob:.*

samac

samac 11-19-2013 07:18 AM

Have downloaded the development package and will have a look.

samac

phenixia2003 11-19-2013 07:21 AM

Hello,

Quote:

Originally Posted by samac (Post 5067123)
OK I will make the modification but cannot test it at the moment as there appears to be a problem with alien bob's server.

samac

Sorry, but this will not work in case of upgrade because there's code in slackpkg [ in function makelist() ] that prevents this :

Code:

                        for ARGUMENT in $(echo $INPUTLIST); do
                                for i in $(grep -w -- "${ARGUMENT}" ${TMPDIR}/pkglist | cut -f2 -d\  | sort -u); do
                                        givepriority $i
                                        [ ! "$FULLNAME" ] && continue

                                        case $CMD in
                                                'upgrade')
                                                        VRFY=$(cut -f6 -d\  ${TMPDIR}/tmplist | \
                                                              grep -x "${NAME}-[^-]\+-\(noarch\|fw\|${ARCH}\)-[^-]\+")
                                                        [ "${FULLNAME/%.t[blxg]z/}" != "${VRFY}" ]  && \
                                                                                [ "${VRFY}" ] && \
                                                                LIST="$LIST ${FULLNAME}"

To workaround this, slackpkg+ should modify the variable ARCH when user run "slackpkg upgrade[-all]" and only when mixing 32 on 64 has been enabled.

--
SeB

zerouno 11-19-2013 07:29 AM

mmm

I have only tried the display (dialog, without the real installation).

upgrade-all
Code:

│ │[ ] amsn-0.98.9-i486-2sl.txz                        slacky    │ │

thankyou.

samac 11-19-2013 07:32 AM

Sorry the dev package only picks up the stable version of slackpkg+ , I merged the new slackpkgplus.conf with mw changes and enabled the new switch.

samac

phenixia2003 11-19-2013 07:40 AM

Hello,

Here is a patch, for slackpkg+/dev (i.e slackpkg+-20131119.2) that should solve the issue with upgrade and upgrade-all :

Code:

--- slackpkgplus.sh.orig        2013-11-19 14:39:09.790146073 +0100
+++ slackpkgplus.sh        2013-11-19 14:40:26.942951798 +0100
@@ -742,6 +742,10 @@
    fi
  done
 
+  if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]] && [ "$ALLOW32BIT" == "on" ] ; then
+        ARCH="\($ARCH\)\|\([i]*[3456x]86[^_]*\)"
+  fi
+
  if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] || [ "$CMD" == "reinstall" ] || [ "$CMD" == "remove" ] ; then
 
    NEWINPUTLIST=""

Hope this helps.

--
SeB


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