OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

December 23, 2006

Automate Insertion of YAST Installation Sources on Your openSUSE 10.2 Machine

by @ 7:35 am. Filed under bash, freebies, How-To, SUSE Tips & Tricks

Installation sources are wonderful things. That’s where the packages come from that we install on our SUSE machines.

So how do we add them in YAST? Is there a way to add them via the command line? Is there any way to automatically add them? Is there a list somewhere of repositories to add?

I would like to take on the task of answering each of these questions.

Adding installation repositories in YAST

This process is relatively painless, outlined as follows:

Open YAST.

Type in your root password.

In the window that appears, click INSTALLATION SOURCE on the right.

In the window that appears, click ADD.

You are taken to another screen asking you what Media Type the new source is. Select the type (many times it will be FTP or HTTP). Click NEXT.

In the next screen, fill in the SERVER NAME, and DIRECTORY ON SERVER. Click NEXT.

You will see some progress dialog boxes popping up and going away as the new installation source is added.

When you are done, click on the FINISH button.

See? That isn’t so bad. It can get tedious, though, if you have lots of installation sources to add.

Adding installation repositories via Commandline

This process is way more painless than adding the installation sources through YAST, outlined here:

Open a terminal window. Become root with the ‘su’ command:

$ su
Password: [Enter root password here]
#

The syntax for the command is:

rug service-add [URL] -type=ZYPP “[NAME OF REPO]”

To add an actual service, you’ll run a command like:

# rug service-add http://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2/RPMS/ --type=ZYPP "Guru"

 

Adding installation repositories via Shell Script

I have put a bunch of repositories into a shell script. Remember, kids, that your mom always told you not to just randomly add installation sources. She didn’t? Well, she should have because it’s good advice. Because anyone can put anything into their repository, understand the following sentence: I make no guarantees that this shell script will not add a repository that will totally bork your system. That said, I have had no problems whatsoever with them. Because of this, I am providing this shell script for whoever wants it.

Download the script here

It will add a handful of installation sources for your shiny new openSUSE 10.2 system.

One strange thing…. when it adds the OSS repo, sometimes it will exit with a “Failed to parse XML metadata” error. If it does, just re-run the script. It will not put in duplicates, but it will likely add the OSS repo successfully. Also, this particular repo takes like 9,349 centuries (half an hour) to add in, so just kind of be patient with it.

Also, if you have nvidia or ATI, you may want to add the appropriate repository to the script.

What repository to add? From the lists below.

Lists of available repositories

Where are the lists of repositories?

Here is a link to the one on opensuse.org, called “Additional YaST Package Repositories.” What’s also interesting is that one of my articles published by Novell is one of the first things referenced on that page.

Here is a link to the list found on E@zyVG’s blog, called “openSUSE 10.2: The Most Complete List of Repositories.”

Again, do not just blindly add every repository you can find. That will very likely blow up your system. The ones in the shell script should work, but YMMV. Enjoy.

6 Responses to “Automate Insertion of YAST Installation Sources on Your openSUSE 10.2 Machine”

  1. Benjamin Weber Says:

    Using rug to add sources requires ZMD to be installed, and there are still synchronization issues in 10.2. It is better to use “zypper sa “, preferably after removing zmd; If you need to add non-interactively you can pipe in yes, “yes | zypper sa “. Also an easier way to add in the yast2 gui is to use yast -> installation sources -> add -> specify URL -> .

  2. David Cook Says:

    Just a quick add on to the above comment, if you have UNinstalled the Enterprise Software Management stuff and gone with the OpenSUSE software management option (zypper instead of rug/zmd etc) the command line looks quite different (but still easily adapted).

    It would show, something like this:

    zypper sa –type=YaST http://software.opensuse.org/download/KDE:/Community/openSUSE_10.2/ “KDE-Community”

    type is going to be YUM or YaST in almost all cases.

    If you forget to move the –type option then all your sources will end up named “–type=YUM” or “–type=YaST” which will result in only the last one of each type actually showing up in the Install Sources (yeah, I learned this one the hard way 😛 ).

    Anyway, hope this helps someone, this script has made installs much quicker for me, thanks heaps.

  3. openSUSE Linux Rants » Blog Archive » Automate Installation of Web Server in openSUSE 10.2 (installs Apache, MySQL, and PHP) - bash script - suse linux opensuse Says:

    […] Generally, when installing a new machine, I actually use this script I put together to automate the insertion of YAST Installation Sources as well. Run the Installation Sources script first, and then the LAMP stack script, and you’ll be 90% of the way to having yourself a web server. Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages. […]

  4. Automate Installation of Web Server in openSUSE 10.2 (installs Apache, MySQL, and PHP) - bash script « Mr.Novell’s Blog Says:

    […] Generally, when installing a new machine, I actually use this script I put together to automate the insertion of YAST Installation Sources as well. Run the Installation Sources script first, and then the LAMP stack script, and you’ll be 90% of the way to having yourself a web server. […]

  5. openSUSE 10.2: Automate Insertion of YAST Installation Sources « alll about linux Says:

    […] HowTo […]

  6. srikanth Says:

    how do I run shell scripting in linux suse 10.2, ./or sh filename or @ filename?????how

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:

categories:

SUSE Resources

search blog:

archives:

July 2018
S M T W T F S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

58 queries. 0.769 seconds