[svn] r5933 - in trunk/tools/mrepo: . config/dists docs
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Mon Oct 22 13:39:50 CEST 2007
Author: dag
Date: 2007-10-22 13:39:49 +0200 (Mon, 22 Oct 2007)
New Revision: 5933
Modified:
trunk/tools/mrepo/config/dists/rhel4as.conf
trunk/tools/mrepo/config/dists/rhel5c.conf
trunk/tools/mrepo/config/dists/rhel5s.conf
trunk/tools/mrepo/docs/redhat-network.txt
trunk/tools/mrepo/youget
Log:
Updates
Modified: trunk/tools/mrepo/config/dists/rhel4as.conf
===================================================================
--- trunk/tools/mrepo/config/dists/rhel4as.conf 2007-10-22 10:49:30 UTC (rev 5932)
+++ trunk/tools/mrepo/config/dists/rhel4as.conf 2007-10-22 11:39:49 UTC (rev 5933)
@@ -11,20 +11,37 @@
### ISO images
#iso = RHEL$release-U4-$arch-AS-disc?.iso
-### Additional repositories
+### RHEL updates
updates = rhns:///rhel-$arch-as-4
#beta = rhns:///rhel-$arch-as-4-beta
fastrack = rhns:///rhel-$arch-as-4-fastrack
+
+### RHEL Extras
extras = rhns:///rhel-$arch-as-4-extras
#extras-beta = rhns:///rhel-$arch-as-4-extras-beta
+
+### RHEL Developer Suite
rhds = rhns:///rhel-4-as-$arch-rhds-2.1
+#rhds = http://ftp.redhat.com/pub/redhat/linux/enterprise/$release/en/RHDS2.1/$arch/RPMS/
#rhds-beta = rhns:///rhel-4-as-$arch-rhds-2.1-beta
+rhds3 = rhel-4-as-$arch-rhds-3
+
+### RHEL Hardware Certification
hwcert = rhns:///rhel-$arch-as-4-hwcert
+
+### RHEL SDK
sdk = rhns:///rhel-$arch-as-4-sdk
+
+### Red Hat Application Server
rhaps = rhns:///rhel-4-as-$arch-rhaps-2
#rhaps-beta = rhns:///rhel-4-as-$arch-rhaps-2-beta
+
+### Red Hat Web Application Stack
webapp-beta = rhns:///rhel-$arch-as-4-webapp-1-beta
+### Red Hat Network Tools
+rhn-tools = rhns:///rhn-tools-rhel-4-as-$arch
+
### RPMforge repository
rpmforge = rsync://apt.sw.be/pub/freshrpms/pub/dag/redhat/el$release/en/$arch/RPMS.dag/
#rpmforge = ftp://apt.sw.be/pub/dag/pub/redhat/el$release/en/$arch/RPMS.dag/
@@ -44,5 +61,8 @@
### PostgreSQL repository
#postgresql = ftp://ftp.fr.postgresql.org/binary/v8.1.4/linux/rpms/redhat/rhel-as-$release-$arch/
+### Fedora EPEL packages (incompatible with RPMforge)
+epel = http://download.fedora.redhat.com/pub/epel/$release/$arch/
+
### Custom repository for your own RPM packages
custom =
Modified: trunk/tools/mrepo/config/dists/rhel5c.conf
===================================================================
--- trunk/tools/mrepo/config/dists/rhel5c.conf 2007-10-22 10:49:30 UTC (rev 5932)
+++ trunk/tools/mrepo/config/dists/rhel5c.conf 2007-10-22 11:39:49 UTC (rev 5933)
@@ -29,5 +29,8 @@
#ovztemplate = http://download.openvz.org/template/
#ovzutils = http://download.openvz.org/utils/
+### Fedora EPEL packages (incompatible with RPMforge)
+#epel = http://download.fedora.redhat.com/pub/epel/$release/$arch/
+
### Custom repository for your own RPM packages
custom =
Modified: trunk/tools/mrepo/config/dists/rhel5s.conf
===================================================================
--- trunk/tools/mrepo/config/dists/rhel5s.conf 2007-10-22 10:49:30 UTC (rev 5932)
+++ trunk/tools/mrepo/config/dists/rhel5s.conf 2007-10-22 11:39:49 UTC (rev 5933)
@@ -29,5 +29,8 @@
#ovztemplate = http://download.openvz.org/template/
#ovzutils = http://download.openvz.org/utils/
+### Fedora EPEL packages (incompatible with RPMforge)
+#epel = http://download.fedora.redhat.com/pub/epel/$release/$arch/
+
### Custom repository for your own RPM packages
custom =
Modified: trunk/tools/mrepo/docs/redhat-network.txt
===================================================================
--- trunk/tools/mrepo/docs/redhat-network.txt 2007-10-22 10:49:30 UTC (rev 5932)
+++ trunk/tools/mrepo/docs/redhat-network.txt 2007-10-22 11:39:49 UTC (rev 5933)
@@ -1,31 +1,35 @@
-Using RHN support in mrepo
-==========================
+= Using RHN support in mrepo
+Dag Wieers <dag at wieers.com>
+0.8.4svn, 20 august 2007
-Requirements
-------------
+// Please send me improvements to this document.
+
+This document describes how to set up a Red Hat Network mirror for various
+RHEL versions and architectures and provide the packages to local clients.
+
+
+== Requirements
For RHN support to work, you need to install the up2date package
that comes with your RHEL distribution. It may not work with
another up2date package (eg. Fedora Core).
-RHN systemid creation
----------------------
+== RHN systemid creation
For each distribution you want to add to mrepo, you need to have a valid
RHN systemid. You can create a systemid (provided you have the correct
entitlements to do so) by using the gensystemid tool that comes with
mrepo, eg.
----
+----
gensystemid -r 4AS -a x86_64 /var/mrepo/rhel4as-x86_64
----
-The tool will create a new system called <hostname>-4AS-x86_64-mrepo,
+The tool will create a new system called _<hostname>-4AS-x86_64-mrepo_,
register this system on RHN and create a systemid file in
-/var/mrepo/rhel4as-x86_64
+_/var/mrepo/rhel4as-x86_64_
-RHN configuration
------------------
+== RHN configuration
Having done that, you can enable multiple channels for this systemid
on the RHN website. And then configure mrepo to use these channels, eg.
@@ -47,8 +51,7 @@
all packages for the configured channels.
-Creating systemids for different dists/archs
---------------------------------------------
+== Creating systemids for different dists/archs
Previously it was not possible to generate a new systemid for a
dist/arch without installing a system, connecting it to the Internet
and then register on RHN.
@@ -61,17 +64,14 @@
The gensystemid tool that comes with mrepo will help you with creating
valid systemids for mrepo, eg.
-----
-gensystemid -r 4AS -a x86_64 /var/mrepo/rhel4as-x86_64
-----
+ $ gensystemid -r 4AS -a x86_64 /var/mrepo/rhel4as-x86_64
You can manage your systems on the RHN website afterwards.
-WARNING: For yet unknown reasons, you have to be root to run gensystemid.
+WARNING: For yet unknown reasons, you have to be root to run +gensystemid+.
-Downloading from unsubscribed channels
---------------------------------------
+== Downloading from unsubscribed channels
You can let mrepo subscribe to the necessary channels, unfortunately this
requires your RHN username and password. You can provide these in
the main section, like:
@@ -82,24 +82,22 @@
----
Or you can supply them to rhnget at the appropriate time. Unfortunately since
-rhnget is a seperate tool invoked by mrepo, you may need to provide this
++rhnget+ is a seperate tool invoked by mrepo, you may need to provide this
information several times (every time you need to subscribe to a new channel).
-You can also choose to only provide the username in /etc/mrepo.conf and provide
-the password interactively.
+You can also choose to only provide the username in _/etc/mrepo.conf_ and
+provide the password interactively.
----
[main]
rhnlogin = username
----
-Of course if you put the password in /etc/mrepo.conf, you need to protect it.
+Of course if you put the password in _/etc/mrepo.conf_, you need to protect it.
You may want to do:
-----
-chmod og= /etc/mrepo.conf
-chown root.root /etc/mrepo.conf
-----
+ $ chmod og= /etc/mrepo.conf
+ $ chown root.root /etc/mrepo.conf
Since you only need the username/password to subscribe to new channels
(only the very first time you access them) you may wish to remove the
@@ -109,10 +107,10 @@
to the channels you require.
-Configuring up2date sources
----------------------------
+== Configuring up2date sources
If you encounter the following message:
+----
Traceback (most recent call last):
File "/usr/bin/mrepo", line 1364, in ?
main()
@@ -127,19 +125,38 @@
File "/usr/share/rhn/up2date_client/repoDirector.py", line 21, inlistPackages
return self.handlers[channel['type']].listPackages(channel, msgCallback, progressCallback)
KeyError: 'up2date'
+----
you need to configure up2date by adding or enabling the following line in
-/etc/sysconfig/rhn/sources
+_/etc/sysconfig/rhn/sources_
- up2date default
+ up2date default
-Especially on a system that wasn't using RHN or on CentOS this is a manual
+Especially on a system that was not using RHN or on CentOS this is a manual
change you have to make. mrepo doesn't really care, but the up2date
implementation it is using simply requires it.
-List of RHN channels
---------------------
+== Adding up2date-uuid file
+If you get the following error:
+
+ No rhnuuid config option found in /etc/sysconfig/rhn/up2date-uuid
+
+Then you are missing the file _/etc/sysconfig/rhn/up2date-uuid_, the content
+of this file looks similar to:
+
+----
+uuid[comment]=Universally Unique ID for this server
+rhnuuid=7d2bee48-99b6-11d8-83df-000475ffe7a6
+----
+
+where +rhnuuid+ contains a unique identifier that matches your system. You can
+generate this identifier by running:
+
+ $ uuidgen
+
+
+== List of RHN channels
For a complete and up-to-date list of available channels, check the RHN
website. This list has been compiled with only EL2.1, EL3, EL4 and
i386, x86_64 archs.
@@ -156,7 +173,6 @@
rhel-4-XX-$arch-rhds-2.1
rhel-4-XX-$arch-rhds-2.1-beta
-
RHEL3
rhel-$arch-XX-3
rhel-$arch-XX-3-beta
@@ -179,8 +195,7 @@
Please send updates on these.
-Ignore packages you already have elsewhere
-------------------------------------------
+== Ignore packages you already have elsewhere
This is possible, although hard to implement currently. I could check
whether the file exists on one of the ISOs (or in the RPMS/ directory),
but I prefer to implement this after a redesign.
@@ -222,23 +237,22 @@
Run this script when you download new RHEL ISO files and make these available
in mrepo, but before downloading any updates from RHN.
-----
-mrepo --umount
-### Download new ISO files
-### Change /etc/mrepo.conf to change the iso=
-mrepo -v
-./clean.sh
-mrepo -uvg
-----
+ $ mrepo --umount
+Then download new ISO files and modify the mrepo config file(s) to reflect
+this change. And then do:
+
+ $ mrepo -v
+ $ ./clean.sh
+ $ mrepo -uvg
+
This will free up some space by symlinking duplicate RPM packages from the ISO
files on top of the RPM packages on disk. As a side-effect it will also prevent
the new updates from being downloaded. You can also remove _all_ packages from
the updates repository prior to doing this.
-rhn:// and rhns:// URL schemes
-------------------------------
+== rhn:// and rhns:// URL schemes
The default scheme for RHN is rhns:// (HTTPS), but it was reported that
in some cases (related to proxies or firewalls) the HTTPS connections
fail, so there is a need to allow for HTTP connections. You can specify
@@ -247,8 +261,7 @@
In this case, the authentication is not done using SSL either !
-Using Red Hat satellite servers
--------------------------------
+== Using Red Hat satellite servers
You can override the hardcoded RHN server by specifying it in the URL.
If it is not specified, mrepo will assume a default value of
xmlrpc.rhn.redhat.com
@@ -265,10 +278,9 @@
(Please let me know if this works or not !)
-Using a single systemid
------------------------
+== Using a single systemid
You can experiment with using a single systemid for multiple dists
-using the rhnrelease option:
+using the +rhnrelease+ directive:
----
[rhel3as]
@@ -282,8 +294,7 @@
But not from the ES or WS channels and not from different architectures.
-RHN documentation and references
---------------------------------
+== RHN documentation and references
A useful list of RHN references:
Red Hat: RHN XMLRPC API
@@ -303,5 +314,4 @@
Installing YAM 0.8.0 on Red Hat Enterprise Linux 4
http://wiki.garylaw.net/doku.php?id=technical:unix:linux:yam
----
-Please send me improvements to this document.
+// vim: set syntax=asciidoc:
Modified: trunk/tools/mrepo/youget
===================================================================
--- trunk/tools/mrepo/youget 2007-10-22 10:49:30 UTC (rev 5932)
+++ trunk/tools/mrepo/youget 2007-10-22 11:39:49 UTC (rev 5933)
@@ -198,6 +198,25 @@
error(0, str)
sys.exit(ret)
+def remove(file):
+ "Remove files or directories"
+ if isinstance(file, types.StringType):
+ if op.dryrun:
+ return
+ if os.path.islink(file):
+ os.unlink(file)
+ elif os.path.isdir(file):
+ try:
+ os.rmdir(file)
+ except:
+ os.path.walk(file, removedir, ())
+ os.rmdir(file)
+ elif os.path.isfile(file) or os.path.islink(file):
+ os.unlink(file)
+ else:
+ for f in file:
+ remove(f)
+
def mirroryou(url, path):
'Mirror a channel from YOU'
More information about the svn-commits
mailing list