Results 1 to 3 of 3

Thread: Can YAST import bash or perl scripts?

  1. #1

    Default Can YAST import bash or perl scripts?

    If there is a page like this one: https://software.opensuse.org/package/alien

    I would like to understand. Does YAST just download the perl script?
    If so, where?
    Is it added to your system so that you can run it from the command line?

    Once downloaded, does YAST show you downloaded scripts, and provide a way to delete them, or do they effectively disappear from YAST?

    *Note to other new users: If you are directed to a web page like the one above, and want to add it, YAST does not always work properly. You will be shown two fields after 'add:' The 'Name' field is OPTIONAL, and NOT required. It will NOT tell you this (although it would be simple for it to do so). And even if you input the web page URL address with nothing in the 'name' field, it still may work only temperamentally. And it may not confirm when a download has completed successfully.

  2. #2
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,076

    Default Re: Can YAST import bash or perl scripts?

    On Tue, 04 Jul 2017 00:26:01 +0000, dcnblues wrote:

    > If there is a page like this one:
    > https://software.opensuse.org/package/alien
    >
    > I would like to understand. Does YAST just download the perl script?
    > If so, where?
    > Is it added to your system so that you can run it from the command line?
    >
    > Once downloaded, does YAST show you downloaded scripts, and provide a
    > way to delete them, or do they effectively disappear from YAST?
    >
    > *Note to other new users: If you are directed to a web page like the one
    > above, and want to add it, YAST does not always work properly. You will
    > be shown two fields after 'add:' The 'Name' field is OPTIONAL, and NOT
    > required. It will NOT tell you this (although it would be simple for it
    > to do so). And even if you input the web page URL address with nothing
    > in the 'name' field, it still may work only temperamentally. And it may
    > not confirm when a download has completed successfully.


    YaST is just a setup tool - if you're asking if it manages scripts like
    packages, then no, it doesn't.



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  3. #3

    Default Re: Can YAST import bash or perl scripts?

    I am going to guess by your question that you are new to Linux, or at
    least SUSE Linux and probably package management systems like RPM. That
    may not all be true, but it's a guess, and one I'm using to provide a
    reply that is probably a bit more verbose than you may want, but without
    knowing what you know, I need to provide more answer than you may need.

    First, Yast is a setup tool (Yet Another Setup Tool) and as such does a
    lot of things, but it does not directly handle package management, whether
    for the 'alien' package or anything else. Instead it is coded to do
    things like call 'zypper' or 'rpm' on the backend, which are the tools
    that do the real work with packages.

    RPM is the package management system that actually manages the files in
    the filesystem, first in the form of RPM files (packages, which are files
    ending in .rpm tyipcally), and later in their extracted forms in the RPM
    databases, and actual binaries/configurations/etc. in the filesystem after
    the packages are installed via the 'rpm' command.

    zypper is a wrapper of sorts around 'rpm' which also manages repositories,
    which are stores of RPM packages for a particular purpose, whether that's
    openSUSE Leap 42.2, or openSUSE Tumbleweed, or SUSE Linux Enterprise
    Server (SLES) 12 SP3, or maybe something specific like SAP code to run on
    top of SLES, or the Desktop extension to provide desktop tools for the
    same. Repositories can be created by anybody, for any purpose, and in
    that link you provided for 'alien' you can see repositories that are
    labeled 'systemackagemanager' as well as 'utilities' in addition to
    various users' own home repositories. Once zypper is configured to point
    to one of these, it can see which packages are available and add them over
    the wire without you doing much of anything, like this:

    Code:
    zypper install alien
    zypper finds the repository with the package, pulls it down, and then
    tells 'rpm' to install it, also resolving any dependencies at the time
    (e.g. you need 'perl' to run alien's scripts, so if 'perl' is not present,
    zypper would find and add that first).

    Now we can perhaps get to your question. Does Ysat just pull down perl
    scripts ever? Probably not, but it may be used to add a repository, or it
    may even be used to query a repository and then have the underlying system
    pull down RPMs which themselves container perl scripts. The Command Line
    Interface (CLI) can also add the repository and install the package, which
    would look like this:

    Code:
    #'ar' is short for add-repository
    zypper ar
    http://download.opensuse.org/repositories/utilities/openSUSE_Leap_42.2/x86_64/alien-8.88-3.1.x86_64.rpm
    'opensuse-utilities'
    
    #'in' is short for install
    zypper in alien
    Where are they located? Wherever the RPM creator (packager) directed them
    to be placed in the filesystem. There are several ways to find this out,
    both via Yast and the CLI, but I would recommend the latter; assuming the
    package is just named 'alien' you can query it and list its files using
    this command once it is installed:

    Code:
    rpm -ql alien
    If you want to delete the scripts, it is best to remove the package, which
    an be done either from Yast again, or from the CLI a few different ways:

    Code:
    #rm is short for remove
    zypper rm alien
    
    #or
    rpm -e alien
    When the package is removed, associated files (at least non-configuration
    ones like perl scripts) are removed as well. If you checked for the
    location of files before as shown above, you could check the paths again
    and see they are gone; if you try to query for the 'alien' package's files
    again, you'd get nothing back as the package is no longer there to
    reference the files (which are also no-longer there).

    Give these steps a try and see if things work out for you; if you have
    subsequent questions, feel free to follow up here. If not, please provide
    your results as well in case I missed anything or one of us can clarify on
    something.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below.

    If you want to send me a private message, please let me know in the
    forum as I do not use the web interface often.

Posting Permissions

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