Big Bubbles (no troubles)

What sucks, who sucks and you suck

SLES 11 With Mrepo

Summary: It’s possible to use mrepo and the youget utility supplied with it to download updates for SLES 11.x, but some modifications are required.

(N.B. This is a fairly rough & ready procedure. I’d suggest copying /usr/bin/youget to /usr/local/bin/ or another location before modifying it.)

First of all, in youget the HTTP digest realm for authentication needs changing from ‘Express’:

--- /usr/bin/youget     2011-04-11 18:40:35.000000000 +0100
+++ /usr/local/bin/youget       2013-08-07 16:29:31.089208777 +0100
@@ -292,7 +292,9 @@
     ### Setting up connection
     host = urlparse.urlparse(url)[1]
     auth_handler = urllib2.HTTPDigestAuthHandler()
-    auth_handler.add_password('Express', host, op.username, op.password)
+    #auth_handler.add_password('Express', host, op.username, op.password)
+    # LOCAL: fix realm for SLES 11, ajr 2013-08-07
+    auth_handler.add_password('Digest Authentication for nu.novell.com', host, op.username, op.password)
     opener = urllib2.build_opener(auth_handler)
     opener.addheaders = [('User-agent', 'Mozilla/5.0')]

Note that this may break SLES 10 support, so if you want to do both then you’ll need to add a new mirroryou_sles11 function based on the existing sles10 one, and figure out how to call it when relevant (which is why I haven’t submitted this change upstream).

Download the necessary credentials for the deviceid and secret files from your SLES support account using the web portal (under My Products -> Mirror Credentials), and place these files in your repository directory.

Update your mrepo configuration to use your modified youget script:

yougetcmd = /usr/local/bin/youget

You may also want to exclude all the source RPMs that get downloaded to save disk space. The easiest way I’ve found is to modify the mrepo script to support a new youget-options flag (based on, but separate to, the existing rhnget-options flag):

--- mrepo.orig  2011-09-19 15:13:10.000000000 +0100
+++ mrepo       2013-10-08 14:30:31.802384893 +0100
@@ -250,6 +250,7 @@

         self.rhnlogin = self.getoption('main', 'rhnlogin', None)
         self.rhngetoptions = self.getoption('main', 'rhnget-options', '')
+        self.yougetoptions = self.getoption('main', 'youget-options', '')
         self.rhngetcleanup = self.getoption('main', 'rhnget-cleanup', 'yes') not in disable
         self.rhngetdownloadall = self.getoption('main', 'rhnget-download-all', 'no') not in disable

@@ -1417,7 +1418,7 @@

     url = url.replace('you://', 'https://')

-    opts = cf.rhngetoptions
+    opts = cf.yougetoptions
     if op.verbose >= 3:
         opts = opts + ' -v' * (op.verbose - 3)
     if op.dryrun:

Then add your new flag to your mrepo configuration, e.g. for 64 bit binary RPMs only:

youget-options = --filter='*.x86_64.rpm'