[WBEL-devel] up2date patches
Kevin Ediger
kediger@licor.com
Thu, 04 Dec 2003 13:18:09 -0600
This is a multi-part message in MIME format.
--------------090009010907050201090102
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hello all,
John Morris wrote:
> While up2date+yum does work, it isn't close to being polished yet. And
> with my pitiful python skills it may never be perfect unless someone
> better than me jumps in. (hint!) Most importantly, it keeps moaning
> about a lack of RedHat's GPG key every run, even though it was left in
> it's normal place AND a RedHat key is on the keyring in
> /etc/sysconfig/rhn. Even worse, it is allowing packages to be installed
> which are signed with the WBEL key even though that key is NOT on the
> keyring and the option to check signatures is enabled. Bottom line, it
> sorta works but don't trust it on anything even close to mission critical
> yet.
I looked into the key problem in RC2. It seems that the gpgUtils.py is
"moaning" about the lack of a key because the fedora key isn't on the
keyring. Adding the fedora key
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
stops the moaning. But, the real problem is a bug introduced by the fedora
team. I've included a new up2date patch for whitebox that fixes that problem
and a patch for the RC2 up2date.spec file.
I ran several tests with up2date trying to load a package without a
signature and without the whitebox sig and up2date warned me about the issue
both times. I loaded my signature into rpm, and then up2date loaded the RPM
without warning. So, I'm not sure what the issue is here.
You can view all the loaded signatures with
rpm -q gpg-pubkey
and unload them with
rpm -e gpg-pubkey
Note that the up2date patch I've submitted loads BOTH the whitebox key and
the redhat key. Is that what is desired? I assumed so since it is
technically possible to load RHEL3 binaries into whitebox. The fedora key is
not loaded.
-Kevin
--
Kevin Ediger
Engineering Group Leader, Software
LI-COR, Inc.
Lincoln, NE
kediger@licor.com
--------------090009010907050201090102
Content-Type: text/plain;
name="up2date.spec-whitebox.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="up2date.spec-whitebox.patch"
--- up2date.spec 2003-12-02 21:14:24.000000000 -0600
+++ up2date.spec-whitebox 2003-12-04 11:38:42.000000000 -0600
@@ -3,7 +3,7 @@ License: GPL
Group: System Environment/Base
Source0: %{name}-%{version}.tar.gz
Source1: version
-Patch0: up2date-whitebox.patch
+Patch0: %{name}-%{version}-whitebox.patch
Url: http://rhn.redhat.com
Name: up2date
Version: %(echo `awk '{ print $1 }' %{SOURCE1}`)
@@ -30,8 +30,8 @@ BuildRequires: python >= 2.2.2-7
BuildRequires: python-devel
BuildRequires: gettext
-# for fedora releases with there special keyring
-%define fedora 1
+# for whitebox releases with special keyring
+%define whitebox 1
# only need mkinitrd on x86 and only grubby on 7.2 or higher
%ifnarch i386 ia64
@@ -74,8 +74,8 @@ make LIBDIR=%{_libdir}
rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
-%if %{fedora}
-make install FEDORA=1 PREFIX=$RPM_BUILD_ROOT MANPATH=%{_mandir} LIBDIR=%{_libdir}
+%if %{whitebox}
+make install WHITEBOX=1 PREFIX=$RPM_BUILD_ROOT MANPATH=%{_mandir} LIBDIR=%{_libdir}
%else
make install PREFIX=$RPM_BUILD_ROOT MANPATH=%{_mandir} LIBDIR=%{_libdir}
%endif
--------------090009010907050201090102
Content-Type: text/plain;
name="up2date-4.1.16-whitebox.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="up2date-4.1.16-whitebox.patch"
diff -purN up2date-4.1.16-orig/config.py up2date-4.1.16-whitebox/config.py
--- up2date-4.1.16-orig/config.py 2003-10-07 21:35:22.000000000 -0500
+++ up2date-4.1.16-whitebox/config.py 2003-12-04 11:02:09.000000000 -0600
@@ -26,9 +26,9 @@ Defaults = {
'enableProxy' : ("Use a HTTP Proxy",
0),
'serverURL' : ("Remote server URL",
- "https://xmlrpc.rhn.redhat.com/XMLRPC"),
+ "http://localhost/XMLRPC"),
'noSSLServerURL' : ("Remote server URL without SSL",
- "http://xmlrpc.rhn.redhat.com/XMLRPC"),
+ "http://localhost/XMLRPC"),
'debug' : ("Whether or not debugging is enabled",
0),
'systemIdPath' : ("Location of system id",
diff -purN up2date-4.1.16-orig/distrotype.py up2date-4.1.16-whitebox/distrotype.py
--- up2date-4.1.16-orig/distrotype.py 2003-10-29 14:54:56.000000000 -0600
+++ up2date-4.1.16-whitebox/distrotype.py 2003-12-04 11:02:09.000000000 -0600
@@ -1,2 +1,3 @@
notrawhide=0
-fedora=1
+fedora=0
+whitebox=1
diff -purN up2date-4.1.16-orig/gpgUtils.py up2date-4.1.16-whitebox/gpgUtils.py
--- up2date-4.1.16-orig/gpgUtils.py 2003-10-29 14:54:28.000000000 -0600
+++ up2date-4.1.16-whitebox/gpgUtils.py 2003-12-04 11:29:59.000000000 -0600
@@ -20,6 +20,7 @@ redhat_gpg_fingerprint = "219180CDD
redhat_beta_gpg_fingerprint = "FD372689897DA07A"
fedora_gpg_fingerprint = "B44269D04F2A6FD2"
fedora_test_gpg_fingerprint = "DA84CBD430C9ECF8"
+whitebox_gpg_fingerprint = "AE52A76D73307DE6"
# basically determines if we care about the
# beta key or not.
@@ -31,15 +32,18 @@ def checkGPGInstallation():
if not findKey(redhat_gpg_fingerprint):
return 2
- if hasattr(distrotype, "fedora") and not findKey(fedora_gpg_fingerprint):
+ if hasattr(distrotype, "fedora") and distrotype.fedora and not findKey(fedora_gpg_fingerprint):
return 2
- if hasattr(distrotype, "rawhide"):
+ if hasattr(distrotype, "whitebox") and distrotype.whitebox and not findKey(whitebox_gpg_fingerprint):
+ return 2
+
+ if hasattr(distrotype, "rawhide") and distrotype.rawhide:
if not findKey(redhat_beta_gpg_fingerprint):
return 2
- if hasattr(distrotype, "fedora") and not findKey(fedora_test_gpg_fingerprint):
- return 2
-
+ if hasattr(distrotype, "fedora") and distrotype.fedora and not findKey(fedora_test_gpg_fingerprint):
+ return 2
+
return 0
def checkGPGSanity():
@@ -93,7 +97,9 @@ def importRedHatGpgKeys():
if hasattr(distrotype, 'rawhide') and distrotype.rawhide:
keys.append("/usr/share/rhn/BETA-RPM-GPG-KEY")
if hasattr(distrotype, 'fedora') and distrotype.fedora:
- keys.append("/usr/share/rhn/RPM-GPG-KEY-fedora-test")
+ keys.append("/usr/share/rhn/RPM-GPG-KEY-fedora-test")
+ if hasattr(distrotype, 'whitebox') and distrotype.whitebox:
+ keys.append("/usr/share/rhn/RPM-GPG-KEY-whitebox")
for key in keys:
importKey(key)
diff -purN up2date-4.1.16-orig/gui.glade up2date-4.1.16-whitebox/gui.glade
--- up2date-4.1.16-orig/gui.glade 2003-09-03 21:44:37.000000000 -0500
+++ up2date-4.1.16-whitebox/gui.glade 2003-12-04 11:02:09.000000000 -0600
@@ -6,7 +6,7 @@
<widget class="GtkWindow" id="mainWin">
<property name="visible">True</property>
- <property name="title" translatable="yes">Red Hat Update Agent</property>
+ <property name="title" translatable="yes">Update Agent</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="modal">False</property>
@@ -24,10 +24,9 @@
<widget class="GnomeDruidPageEdge" id="startPage">
<property name="visible">True</property>
<property name="position">GNOME_EDGE_START</property>
- <property name="title" translatable="yes">Welcome to Red Hat Update Agent</property>
- <property name="text" translatable="yes">This is Red Hat Update Agent. It will assist you in updating
-your Red Hat Linux system with the latest software available
-from Red Hat Network.
+ <property name="title" translatable="yes">Welcome to Update Agent</property>
+ <property name="text" translatable="yes">This is Update Agent. It will assist you in updating
+your Linux system with the latest software available.
To continue, click "Forward." To cancel without updating
@@ -9486,8 +9485,8 @@ more information about the channels avai
<property name="border_width">1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="url">https://rhn.redhat.com</property>
- <property name="label" translatable="yes">https://rhn.redhat.com</property>
+ <property name="url">http://localhost</property>
+ <property name="label" translatable="yes">http://localhost</property>
</widget>
<packing>
<property name="padding">0</property>
diff -purN up2date-4.1.16-orig/gui.py up2date-4.1.16-whitebox/gui.py
--- up2date-4.1.16-orig/gui.py 2003-10-07 21:35:22.000000000 -0500
+++ up2date-4.1.16-whitebox/gui.py 2003-12-04 11:02:09.000000000 -0600
@@ -172,13 +172,11 @@ class QuestionDialog(MessageWindow):
class AboutWindow:
def __init__(self):
- self.window = gnome.ui.About(_("Red Hat Update Agent"),
+ self.window = gnome.ui.About(_("Up2Date Update Agent"),
up2dateUtils.version(),
"Copyright (c) 1999-2002 Red Hat, Inc.\n" +
- _("This software is distributed under the GPL\n" \
- "Please Report bugs to Red Hat's Bug Tracking " \
- "System: http://bugzilla.redhat.com/bugzilla/"),
- _("Update Agent - a program for updating packages on Red Hat Linux"),
+ _("This software is distributed under the GPL\n"),
+ _("Update Agent - a program for updating packages on Linux"),
["Preston Brown <pbrown@redhat.com>",
"Adrian Likins <alikins@redhat.com>",
"Cristian Gafton <gafton@redhat.com>"],
@@ -1348,7 +1346,7 @@ class Gui:
self.druid.set_buttons_sensitive(TRUE, FALSE, TRUE, TRUE)
pwin = progress.Progress()
- pwin.setLabel(_("Red Hat Update Agent is building a list of updated\nRPM packages installed on your system. Please wait."))
+ pwin.setLabel(_("Update Agent is building a list of updated\nRPM packages installed on your system. Please wait."))
try:
if self.cfg['useRhn']:
@@ -2131,7 +2129,7 @@ Please unselect some packages and contin
self.druid.set_show_finish(TRUE)
self.druid.finish.set_label (_("Finish"))
- text = _("The Red Hat Update Agent has finished ")
+ text = _("The Update Agent has finished ")
if self.cfg["retrieveOnly"]:
text = text + _("retrieving\n the following packages successfully:\n\n")
else:
diff -purN up2date-4.1.16-orig/Makefile up2date-4.1.16-whitebox/Makefile
--- up2date-4.1.16-orig/Makefile 2003-10-29 14:57:30.000000000 -0600
+++ up2date-4.1.16-whitebox/Makefile 2003-12-04 11:16:17.000000000 -0600
@@ -27,8 +27,9 @@ CONFIG = up2date.config
MACROS_CONFIG = macros.up2date
SOURCES_CONFIG = sources.up2date
SOURCES_CONFIG_FEDORA = sources.up2date.fedora
+SOURCES_CONFIG_WHITEBOX = sources.up2date.whitebox
PROGRAM = up2date
-KEYS = RPM-GPG-KEY BETA-RPM-GPG-KEY RHNS-CA-CERT RPM-GPG-KEY-fedora RPM-GPG-KEY-fedora-test
+KEYS = RPM-GPG-KEY BETA-RPM-GPG-KEY RHNS-CA-CERT RPM-GPG-KEY-fedora RPM-GPG-KEY-fedora-test RPM-GPG-KEY-whitebox
KEYRING = up2date-keyring.gpg
BETAKEYRING = up2date-keyring-beta.gpg
UUID = up2date-uuid
@@ -36,8 +37,9 @@ KICKSTART = rhnreg_ks
PYTHON_VER = python2.2
FEDORA =
+WHITEBOX =
# uh, yeah, we'll change the name later...
-FEDORASTATUS = distrotype.py
+WHITEBOXSTATUS = distrotype.py
RHNSD = rhnsd
RHN_CHECK = rhn_check
GO_RHN = go-rhn.sh
@@ -124,9 +126,9 @@ install:: all $(DIRS)
[ -f $(MACROS_DIR)/macros.up2date ] && true || \
$(INSTALL_DATA) $(MACROS_CONFIG) $(MACROS_DIR)/macros.up2date
- if [ "x" != "x$(FEDORA)" ] ; then \
+ if [ "x" != "x$(WHITEBOX)" ] ; then \
[ -f $(CONFIG_DIR)/sources ] && true || \
- $(INSTALL_DATA) $(SOURCES_CONFIG_FEDORA) $(CONFIG_DIR)/sources; \
+ $(INSTALL_DATA) $(SOURCES_CONFIG_WHITEBOX) $(CONFIG_DIR)/sources; \
else \
[ -f $(CONFIG_DIR)/sources ] && true || \
$(INSTALL_DATA) $(SOURCES_CONFIG) $(CONFIG_DIR)/sources; \
@@ -174,9 +176,8 @@ install:: all $(DIRS)
[ -f $(CONFIG_DIR)/$(UUID) ] && true || \
$(INSTALL_UUID) $(UUID) $(CONFIG_DIR)/$(UUID)
- if [ "x" != "x$(FEDORA)" ] ; then \
- $(INSTALL_KEYRING) $(BETAKEYRING) $(CONFIG_DIR)/$(KEYRING); \
- $(INSTALL_BIN) $(FEDORASTATUS) $(RHNSHARE_DIR)/up2date_client/distrotype.py; \
+ if [ "x" != "x$(WHITEBOX)" ] ; then \
+ $(INSTALL_BIN) $(WHITEBOXSTATUS) $(RHNSHARE_DIR)/up2date_client/distrotype.py; \
fi
# recompile everything so pyc dont recompile themselves after we munge a couple *.py in the builddroot
diff -purN up2date-4.1.16-orig/redhat-rhn-up2date-config.desktop up2date-4.1.16-whitebox/redhat-rhn-up2date-config.desktop
--- up2date-4.1.16-orig/redhat-rhn-up2date-config.desktop 2002-07-25 18:36:53.000000000 -0500
+++ up2date-4.1.16-whitebox/redhat-rhn-up2date-config.desktop 2003-12-04 11:02:09.000000000 -0600
@@ -1,8 +1,8 @@
[Desktop Entry]
-Name=Red Hat Network Configuration
+Name=Up2Date Network Configuration
GenericName=Configure System Update Tool
Categories=-Red-Hat-Base;Application;System;
-Comment=Configure setting for Red Hat Network
+Comment=Configure setting for Up2Date Network
Icon=up2date.png
Exec=/usr/bin/up2date-config
Type=Application
diff -purN up2date-4.1.16-orig/redhat-rhn-up2date.desktop up2date-4.1.16-whitebox/redhat-rhn-up2date.desktop
--- up2date-4.1.16-orig/redhat-rhn-up2date.desktop 2002-07-22 18:43:19.000000000 -0500
+++ up2date-4.1.16-whitebox/redhat-rhn-up2date.desktop 2003-12-04 11:02:09.000000000 -0600
@@ -1,10 +1,10 @@
[Desktop Entry]
-Name=Red Hat Network
+Name=Up2Date Network
GenericName=System Update
Categories=X-Red-Hat-Base;Application;System;
Name[sv]=RHN Uppdateringsprogram
-Comment=Determines which system packages need to be updated via Red Hat Network.
-Comment[sv]=uppdatera automatiskt RPM:er för Red Hat Linux
+Comment=Determines which system packages need to be updated via Up2Date Network.
+Comment[sv]=uppdatera automatiskt RPM:er för RWhite Box Linux
Icon=up2date.png
Exec=/usr/bin/up2date
Type=Application
diff -purN up2date-4.1.16-orig/rhnreg_ks.py up2date-4.1.16-whitebox/rhnreg_ks.py
--- up2date-4.1.16-orig/rhnreg_ks.py 2003-09-24 22:46:56.000000000 -0500
+++ up2date-4.1.16-whitebox/rhnreg_ks.py 2003-12-04 11:02:09.000000000 -0600
@@ -59,7 +59,7 @@ def printUsage():
def showVersion():
- print "Red Hat Network Registration Agent "\
+ print "Up2Date Network Registration Agent "\
"(Kickstart Version) v%s" % rhnreg.version()
print "Copyright (c) 1999-2002 Red Hat, Inc."
print _("Licensed under terms of the GPL.")
diff -purN up2date-4.1.16-orig/RPM-GPG-KEY-whitebox up2date-4.1.16-whitebox/RPM-GPG-KEY-whitebox
--- up2date-4.1.16-orig/RPM-GPG-KEY-whitebox 1969-12-31 18:00:00.000000000 -0600
+++ up2date-4.1.16-whitebox/RPM-GPG-KEY-whitebox 2003-12-04 11:02:09.000000000 -0600
@@ -0,0 +1,21 @@
+Beauregard Parish Library Signing Key
+This key is used to sign all of the packages in White Box
+Enterprise Linux.
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.2.1 (GNU/Linux)
+
+mQGiBD+jALkRBADOtTnRVj1qPLsqAhKo1it9GdpvT6y9fCB1xGJ5PHWaHWPZ2YV5
+YJmMz7NwNKOiQ0tqileUpRn4rKGBadOHCR7J61Tc6k3uaUE69Zw086OzNYJK1ylk
+dlEavRxgPJVl4UvWwqNh1JenxBIODF5v31wecWBaSCF0QBfQmZyaluQVGwCgvxor
+VpUV2cCpSDxeXWufAtdahfkD+gMVZScnfA8/c92ml655PV3x5ISRJm5gsT5W+7P8
+Bdq4tcvw+QTmbmAEmiOn4yHEmHuU7Xo8815NMuoflMF4bNGfLGSF609iFI3LraIB
+/h8qsZYLkynoVq5X1OQgH9RhF9ClR+U9op4dxnyQbczeF2C/oniMBeZJCgCdwfwA
+j+nsA/9AAtYsxW6BGQyKeWbjvvnTgwxKhW+UAvUPEonqMDQSRBrwc/egygUfByu/
+wPUqC2ED6VUZu73v3Q++hMvXSLi9O+E7f6SayZjq5VpN0HI9yjzejm+PtGCJXAot
+nEIgRRArZkstTGjTi/DTJhH+YrFy+Si9rcplI9kWT+lHm8VOb7Q4QmVhdXJlZ2Fy
+ZCBQYXJpc2ggTGlicmFyeSAoU2lnbmluZyBLZXkpIDxhZG1pbkBiZWF1Lm9yZz6I
+XwQTEQIAHwUCP6MAuQUJEswDAAQLBwMCAxUCAwMWAgECHgECF4AACgkQrlKnbXMw
+feasJgCglSRutq1/rPSytgKQUWbh801xt0YAoLazzu2wwdaPbhyMyYuD3Zad7JB0
+=N3OS
+-----END PGP PUBLIC KEY BLOCK-----
diff -purN up2date-4.1.16-orig/sources.up2date.whitebox up2date-4.1.16-whitebox/sources.up2date.whitebox
--- up2date-4.1.16-orig/sources.up2date.whitebox 1969-12-31 18:00:00.000000000 -0600
+++ up2date-4.1.16-whitebox/sources.up2date.whitebox 2003-12-04 11:02:09.000000000 -0600
@@ -0,0 +1,51 @@
+### this describes the various package repos up2date will look into
+### for packages. It currently supports apt-rpm repos, yum repos,
+### and "dir" repos
+
+
+### format is one repo entry per line, # starts comments, the
+### first word on each line is the type of repo.
+
+### the defalt rhn (using "default" as the url means
+### use the one in the up2date config file
+#up2date default
+
+### When a channel-label is required for the non up2date repo's,
+### the label is soley used as an internal identifier and is not
+### based on the url or any other info from the repo.
+
+### an apt style repo, this time arjanv's 2.6 kernel repo
+### format is:
+### type channel-label service:server path repo name
+
+#apt arjan-2.6-kernel-i386 http://people.redhat.com ~arjanv/2.5/ kernel
+
+### Note that for apt repos, there can be multiple repo names specificed
+### space seperated.
+
+### an yum style repo
+### format:
+### type channel-label url
+
+# These channels point to the Beauregard Parish Library and will provide
+# very poor service for anyone outside our WAN. Comment them out and
+# uncomment one of the alternates below.
+
+yum WBEL-3.0-RC2 http://whiteboxlinux.org/pub/3.0-RC2/en/os/i386
+yum updates-released http://whiteboxlinux.org/pub/3.0-RC2/en/updates
+#yum updates-testing http://fedora.redhat.com/updates/testing/fedora-core-1
+
+# yum WBEL-3.0-RC2 ftp://mirror.physics.ncsu.edu/pub/whitebox/3.0-RC2/en/os/i386/
+# yum updates-released ftp://mirror.physics.ncsu.edu/pub/whitebox/3.0-RC2/en/updates/
+# yum WBEL-3.0-RC2 ftp://ftp.esat.net/mirrors/whitebox.org/3.0-RC2/en/os/i386/
+# yum updates-released ftp://ftp.esat.net/mirrors/whitebox.org/3.0-RC2/en/updates/
+
+### an local directory full of packages
+### format
+#dir my-favorite-rpms-i386-9 /var/spool/RPMS/
+
+
+# multiple versions of all repos except "up2date" can be used. Depenencies
+# can be resolved "cross-repo" if need be.
+
+
diff -purN up2date-4.1.16-orig/up2dateUtils.py up2date-4.1.16-whitebox/up2dateUtils.py
--- up2date-4.1.16-orig/up2dateUtils.py 2003-10-24 15:52:17.000000000 -0500
+++ up2date-4.1.16-whitebox/up2dateUtils.py 2003-12-04 11:02:09.000000000 -0600
@@ -219,7 +219,7 @@ def getOSVersionAndRelease():
return releaseVersion
else:
raise up2dateErrors.RpmError(
- "Could not determine what version of Red Hat Linux you "\
+ "Could not determine what version of Linux you "\
"are running.\nIf you get this error, try running \n\n"\
"\t\trpm --rebuilddb\n\n")
diff -purN up2date-4.1.16-orig/update-up2date.py up2date-4.1.16-whitebox/update-up2date.py
--- up2date-4.1.16-orig/update-up2date.py 2002-09-03 00:58:45.000000000 -0500
+++ up2date-4.1.16-whitebox/update-up2date.py 2003-12-04 11:02:09.000000000 -0600
@@ -14,7 +14,7 @@ import glob
# the url to look at for the manifest and config files
# see genRescueURL() as well
-BASE_URL="http://sludge.devel.redhat.com/foo/linux/7.2/i386"
+BASE_URL="http://localhost/foo/linux/3.0/i386"
# go to url
# grab a manifest
diff -purN up2date-4.1.16-orig/wrapper.py up2date-4.1.16-whitebox/wrapper.py
--- up2date-4.1.16-orig/wrapper.py 2003-10-29 14:53:04.000000000 -0600
+++ up2date-4.1.16-whitebox/wrapper.py 2003-12-04 11:02:09.000000000 -0600
@@ -873,7 +873,7 @@ def showVersion(hasGui):
print _("Unable to open gui. Try specifying \"--nox\" "\
"as an option")
else:
- print "Red Hat Update Agent v%s" % up2dateUtils.version()
+ print "Update Agent v%s" % up2dateUtils.version()
print "Copyright (C) 1999-2002 Red Hat, Inc."
print _("Licensed under terms of the GPL.")
--------------090009010907050201090102--