Results 1 to 5 of 5

Thread: Searching/Downloading packages using zypper for foreigh architecture

  1. #1
    Join Date
    Jul 2011
    Location
    GB
    Posts
    69

    Default Searching/Downloading packages using zypper for foreigh architecture

    Hi

    I have just installed opensuse 12.1 on two systems - a 32-bit older system which will be a server, and a 64 bit desktop system.

    I currently use a 32 bit opensuse 11.3 system and I am in the process of configuring both new 12.1 systems. I want to use the 11.3 system to search and download packages (to store locally) for each 12.1 system whilst they are being configured. I cannot get zypper to search for just x86-64 packages, or even to report x86_64 packages in the standard repos, packman and build service repos. I want to be able to selectively search based on architecture but cannot get zypper to do this.

    I have no problem accessing the correct repos for 12.1 from the 11.3 system, but it ALWAYS reports i586/noarch packages ONLY and never reports x86_64 packages. I am using a custom zypp.conf file and have created a separate directory structure (/var/cache/zypp-12.1/x86_64 and i586) for meta-data, packages and solv.

    Here is the script I use to search for x86_64 packages :

    Code:
    #!/bin/sh
    
    # Script to search for particular x86_64 packages named by argument $1 using 12.1 repositories
    
    zypper --config zypp-12.1-x86_64.conf -v -D /root/test/zypper/x86_64/repos-12.1.d search -s $1
    
    exit 0
    The config file points to a different configuration directory from the normal /etc/zypp - I have also tried the above script with a full path in front of the config file name - but from the output in zypper.log zypper seems to be always using the config file in /etc/zypp and insists on using the default system architecture as reported by uname rather than the architecture I specify in the config file.

    The download script also has problems finding the right packages :

    Code:
    #!/bin/sh
    
    # Script to download specific x86_64 packages named by argument $1 from repository specified by $2 (alias name)
    
    zypper --config /root/test/zypper/x86_64/zypp-12.1-x86_64.conf -v -D /root/test/zypper/x86_64/repos-12.1.d install -r $2 -d $1
    
    exit 0
    This one uses a full path to the config file - but it doesn't seem t make any difference. I specify the package name in $1 and the repo in $2. I have tried adding the ARCH extension on the end of the package (eg vlc.x86_64) but without success.

    In the config file I specify the arch (x86_64) and the path to the configuration directory (in this case /root/test/zypper/x86_64) - but zypper continues to only report packages which match my system architecture.

    Any help on getting zypper search to report foreign architecture packages would be very welcome!!!!

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Question Re: Searching/Downloading packages using zypper for foreigh architecture

    Quote Originally Posted by stevekrupa View Post
    Hi

    I have just installed opensuse 12.1 on two systems - a 32-bit older system which will be a server, and a 64 bit desktop system.

    I currently use a 32 bit opensuse 11.3 system and I am in the process of configuring both new 12.1 systems. I want to use the 11.3 system to search and download packages (to store locally) for each 12.1 system whilst they are being configured. I cannot get zypper to search for just x86-64 packages, or even to report x86_64 packages in the standard repos, packman and build service repos. I want to be able to selectively search based on architecture but cannot get zypper to do this.

    I have no problem accessing the correct repos for 12.1 from the 11.3 system, but it ALWAYS reports i586/noarch packages ONLY and never reports x86_64 packages. I am using a custom zypp.conf file and have created a separate directory structure (/var/cache/zypp-12.1/x86_64 and i586) for meta-data, packages and solv.

    Here is the script I use to search for x86_64 packages :

    Code:
    #!/bin/sh
    
    # Script to search for particular x86_64 packages named by argument $1 using 12.1 repositories
    
    zypper --config zypp-12.1-x86_64.conf -v -D /root/test/zypper/x86_64/repos-12.1.d search -s $1
    
    exit 0
    The config file points to a different configuration directory from the normal /etc/zypp - I have also tried the above script with a full path in front of the config file name - but from the output in zypper.log zypper seems to be always using the config file in /etc/zypp and insists on using the default system architecture as reported by uname rather than the architecture I specify in the config file.

    The download script also has problems finding the right packages :

    Code:
    #!/bin/sh
    
    # Script to download specific x86_64 packages named by argument $1 from repository specified by $2 (alias name)
    
    zypper --config /root/test/zypper/x86_64/zypp-12.1-x86_64.conf -v -D /root/test/zypper/x86_64/repos-12.1.d install -r $2 -d $1
    
    exit 0
    This one uses a full path to the config file - but it doesn't seem t make any difference. I specify the package name in $1 and the repo in $2. I have tried adding the ARCH extension on the end of the package (eg vlc.x86_64) but without success.

    In the config file I specify the arch (x86_64) and the path to the configuration directory (in this case /root/test/zypper/x86_64) - but zypper continues to only report packages which match my system architecture.

    Any help on getting zypper search to report foreign architecture packages would be very welcome!!!!
    So my real question for you is why do this? First, when you search from a 32 bit system, it will favor such files as a 64 bit system will favor 64 bit files. If you load 32 bit libraries onto a 64 bit system, you will get 32 and 64 bit matches for installed software. However, if a Computer has internet access, its best to use zypper on that PC for any file searches. Also, for the record, openSUSE 11.3 is now no longer in standard support and it suggested you upgrade everything to openSUSE 12.1 or in just a few days hence, openSUSE 12.2 will be released. If you have internet access from only one PC or you want to use that PC to serve up an entire repository, I have a bash script that would allow you to setup such a thing here:

    S.L.R.C. - SuSE Local Repository Creator - Version 1.20 - Now for Packman & openSUSE 11.4 & 12.1 - Blogs - openSUSE Forums

    Any local PC that has shared folders could server up repositories to other PC's on the network and would include both 32 and 64 bit files. Overall though, I am not sure what problem you are trying to fix with such an attempted setup as you describe.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3
    Join Date
    Jul 2011
    Location
    GB
    Posts
    69

    Default Re: Searching/Downloading packages using zypper for foreigh architecture

    Hi - thanks for the reply.

    To explain - I have only just installed 12.1 and am configuring both systems offline and will only put them online when configuration is complete. Configuration involves installing a number of packages (more for the server and fewer for the desktop) so I want to use my current system (the 11.3 system) to download these packages - both i586 packages for the server and x86_64 packages for the desktop. Once the 12.1 systems are fully configured the 11.3 system will go into retirement, and package updates on the new systems will be done in the normal way.

    I really don't want to have to replicate repositories locally, just store key packages (and their dependencies) to allow the new systems to be configured effectively before putting them both online.

    So, I will ask the question again - how can I get my 32-bit 11.3 system to find (using zypper search) and download (using zypper install -d) packages for x86_64 and i586 versions of 12.1? I can't believe that there isn't a simple way to do this - but I cannot find it at present!! Just to add some info, the first time I ran the zypper search script, it reported x86_64 packages AND i586/noarch packages - but since then (for some reason I do not understand) it has only reported the latter.

    I have been through the zypper log file with a fine tooth-comb - one thing I notice is that the solver (which I presume is built in to either zypper or rpm???) reports that there is a boolean (among others) called allowarchchange - it is set to 0, which presumably has some impact on my ability to request packages for a different architecture - this may be a red herring however. If anyone knows differently please let me know!!

    Thanks for any and all help - as I've already spent much more time than I had planned on this issue!!

  4. #4

    Default Re: Searching/Downloading packages using zypper for foreigh architecture

    Quote Originally Posted by jdmcdaniel3 View Post
    So my real question for you is why do this?
    On a Unix forum (maybe not on Linux forums noawdays though) people would object that the real question was "how" and not 'why".

    Quote Originally Posted by stevekrupa View Post
    So, I will ask the question again - how can I get my 32-bit 11.3 system to find (using zypper search) and download (using zypper install -d) packages for x86_64 and i586 versions of 12.1? I can't believe that there isn't a simple way to do this - but I cannot find it at present!!
    Obviously you have to add and refresh 12.1 repos - but I guess you did that already. Then you have to overwrite the architecture in your zypp.conf and do a full refresh of the repos.

    Code:
    [main]
    
    
    ##
    ## Override the detected architecture
    ##
    ## Valid values:  i586, i686, x86_64, ppc, ppc64, ia64, s390, s390x, ..
    ## Default value: Autodetected
    ##
    ## ** CAUTION: Only set if you know what you're doing !
    ## ** Changing this needs a full refresh (incl. download)
    ## ** of all repository data.
    ##
    # arch = s390

    But I don't know if it works, I never did it myself.

  5. #5
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Default Re: Searching/Downloading packages using zypper for foreigh architecture

    Once you get outside of the normal tasks on which openSUSE is used and the typical problems that come up, you may be in uncharted territory. As by evidence of the very few responses I have seen here. There are no bounds in what one may try on their own with a copy of openSUSE as long as that it is legal and moral to do. That does not mean you could find a good reason for every action taken and must consider there may be a much better way of doing it. The YaST package manager and the repository system work very well for most people. There is a way to have your own repositories and I have provided a bash script to automate that process. Beyond that, you will very likely be creating your very own guide as no one else will be following you and that is OK, just don't expect much help in getting there.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •