Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update [release-1_4_x-branch]: /current, /current/docs/, /current/docs/developer_docs/, /current/src/, /current/support/

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

CVS update [release-1_4_x-branch]: /current, /current/docs/, /current/docs/developer_docs/, /current/src/, /current/support/

Reply

Author hunterm
Full name Hunter Matthews
Date 2003-02-10 14:34:22 PST
Message Tag: release-1_4_x-branch
User: hunterm
Date: 03/02/10 14:34:22

Removed
 /current
  tar-excludes

Added
 /current
  .cvsignore
 /current/docs/
  transition_notes_1.0-1.4.txt
 /current/docs/developer_docs/
  rhl-8.0_server.notes

Modified
 /current
  CHANGELOG, Makefile, README, cadmin, current.conf
 /current/src/
  channel.py, config.py, current_apache.py, errata.py, misc.py, registration.py,
  up2date.py
 /current/support/
  current.spec

Log
 
 All of this should NOT have been committed as one go - I know that, and I'm
 sorry. Please be patient with me as I learn to do this more incrementally,
 so thats its more easily visible to others.
 There's doc updates, code changes for compatibility with 8.0, bug fixe
 for the bogus rpm names, bug fix for the symlink problem, the now
 probably useless 1.0 -> 1.4 transition guide.
 Whats not in here, and needs to be done for 1.4.3 to release, is the spec
 file updated to handle the changed deps. If you build this (and you can)
 grab the pheobe mod_python or rebuild the one from rawhide, and this code
 DOES WORK.
 Feedback welcome.

File Changes:

Directory: /current/
====================

File [added]: .cvsignore
Url: http://current.tigri​s.org/source/browse/​current/.cvsignore?r​ev=1.1.2.1&conte​nt-type=text/x-cvswe​b-markup
Added lines: 2
--------------
CVS
*.tar.gz

File [changed]: CHANGELOG
Url: http://current.tigri​s.org/source/browse/​current/CHANGELOG.di​ff?r1=1.2.4.1&r2​=1.2.4.2
Delta lines: +17 -3
--------------------
--- CHANGELOG 29 Jan 2003 01:49:14 -0000 1.2.4.1
+++ CHANGELOG 10 Feb 2003 22:34:21 -0000 1.2.4.2
@@ -1,6 +1,20 @@
                         Current Project Changelog
 
-* Fri Oct 18 2002 Hunter Matthews <thm at duke dot edu>
+* Mon Jan 27 2003 Hunter Matthews <thm at duke dot edu> v1.4.3
+- Finally added the 1.0 to 1.4 transition guide to the docs directory.
+- Added some notes about the changes in RHL 8.0
+- FIX: a symlink creation bug where the symlink already exists, but the
+ file it pointed to is gone (deleted)
+- FIX: header file name bug for bugus, screwed up (IBM) rpm files, where
+ the rpm filename doesn't match the name,version,release,arch
+- backported some config.py changes from 1.5.x.
+ I forgot why. :)
+- Updated config.py, because only cadmin use the command line parsing.
+- FIX: added some extra logging to one error path.
+- Sam Bingner figured out the core problem with RHL 8.0 - mod_python bugs
+ in 3.0.0. We'll end up having to require mod_python 3.0.1
+
+* Fri Oct 18 2002 Hunter Matthews <thm at duke dot edu> v1.4.2
 - Found what may be hitting people - gtk+10 in 6.2 at least had None
   data in the rpm. (I claim thats a bad rpm, but whatever).
 - Massive updates to the documentation based on user feedback.

File [changed]: Makefile
Url: http://current.tigri​s.org/source/browse/​current/Makefile.dif​f?r1=1.2.4.1&r2=​1.2.4.2
Delta lines: +3 -3
-------------------
--- Makefile 29 Jan 2003 01:49:14 -0000 1.2.4.1
+++ Makefile 10 Feb 2003 22:34:21 -0000 1.2.4.2
@@ -7,7 +7,7 @@
 
 # Things that change from build to build
 PROJECT = current
-VERSION = 1.4.2
+VERSION = 1.4.3
 PYTHON_BIN = /usr/bin/python
 PREFIX = /usr
 INSTALL_ROOT =
@@ -17,7 +17,7 @@
 CONFIG = current.conf
 SRC = src
 DOC = docs CHANGELOG LICENSE README TODO RELEASE-NOTES
-MISC = Makefile future support tar-excludes
+MISC = Makefile future support .cvsignore
 
 ALLFILES = $(PROGRAMS) $(SRC) $(CONFIG) $(DOC) $(MISC)
 
@@ -75,7 +75,7 @@
     rm -rf $(PROJECT)-$(VERSION).tar.gz $(PROJECT)-$(VERSION)
     mkdir $(PROJECT)-$(VERSION)
     cp -ra $(ALLFILES) $(PROJECT)-$(VERSION)
- tar czf $(PROJECT)-$(VERSION).tar.gz -X tar-excludes $(PROJECT)-$(VERSION)
+ tar czf $(PROJECT)-$(VERSION).tar.gz -X .cvsignore $(PROJECT)-$(VERSION)
     rm -rf $(PROJECT)-$(VERSION)
 
 install:: sedrules

File [changed]: README
Url: http://current.tigri​s.org/source/browse/​current/README.diff?​r1=1.1.4.1&r2=1.​1.4.2
Delta lines: +2 -1
-------------------
--- README 29 Jan 2003 01:49:14 -0000 1.1.4.1
+++ README 10 Feb 2003 22:34:21 -0000 1.1.4.2
@@ -71,5 +71,6 @@
 Contributors:
 Ivan Martinez Bug fixes
 Toby D. Reeves SQL work
-Barry Nathan Debugging help
+Barry K. Nathan Debugging help
+Sam Bingner Debugging help
 

File [changed]: cadmin
Url: http://current.tigri​s.org/source/browse/​current/cadmin.diff?​r1=1.1&r2=1.1.4.​1
Delta lines: +5 -23
--------------------
--- cadmin 29 Jan 2003 00:17:40 -0000 1.1
+++ cadmin 10 Feb 2003 22:34:21 -0000 1.1.4.1
@@ -56,7 +56,9 @@
 # Remember that Directory has precedence over Location
 #
 ##
-## YOU MUST put "Include %(apache_config_file)s" in your httpd.conf file!
+## For apache 1.3.x, YOU MUST put "Include %(apache_config_file)s" in
+## your httpd.conf file. For apache 2.0.x, simply put the file in
+## the /etc/httpd/conf.d directory.
 ##
 ####################​####################​####################​#################
 
@@ -77,7 +79,8 @@
 
 <Location /XMLRPC/$RHN>
     PythonPath "sys.path + ['%(mod_dir)s']"
- PythonHandlerModule current_apache
+ PythonAccessHandler current_apache
+ PythonTypeHandler current_apache
 </Location>
 
 ## END OF CURRENT ##
@@ -115,27 +118,6 @@
       config.cfg.getItem('server_id') == 'YOUR_HOSTNAME_HERE':
         sys.exit('ERROR: You must edit the config file to start')
         
- # Look for an already running server - we need to know that, BEFORE
- # we begin logging
-# if os.path.exists(confi​g.cfg.getItem('pid_f​ile')):
-# try:
-# pid = int(open(config.cfg.​getItem('pid_file'))​.read())
-# except ValueError:
-# sys.exit('Pidfile %s contains non numeric value' % config.cfg.getItem('pid_file'))
-#
-# try:
-# os.kill(pid, 0)
-# except OSError, why:
-# import errno
-# if why[0] == errno.ESRCH:
-# # The pid doesnt exists.
-# print 'Removing stale pid_file %s' % config.cfg.getItem('pid_file')
-# os.remove(config.cfg​.getItem('pid_file')​)
-# else:
-# sys.exit('Can\'t check status of PID %s from pid_file %s: %s' % (pid, config.cfg.getItem('pid_file'), why[1]))
-# else:
-# sys.exit('Current server is already running, PID %s' % pid)
-
     ## Logging system must be operational for the other modules to work.
     # FIXME: tradition says this should be a dash for stdout/stderr
     # How should Config know that?

File [changed]: current.conf
Url: http://current.tigri​s.org/source/browse/​current/current.conf​.diff?r1=1.1&r2=​1.1.4.1
Delta lines: +8 -2
-------------------
--- current.conf 29 Jan 2003 00:17:40 -0000 1.1
+++ current.conf 10 Feb 2003 22:34:21 -0000 1.1.4.1
@@ -20,7 +20,9 @@
 # log_level = How much should we send to the log file?
 #
 # apache_config_file = file to put apache/mod_python configuration
-# in. Should be included in httpd.conf
+# in. For RHL 7.x, /etc/httpd/httpd.current.conf was a
+# common value. For RHL 8.x,
+# /etc/httpd/conf.d/current.conf is correct.
 #
 # access_check_type = How should checkperms tell if you have your permissions
 # set correctly? Values are:
@@ -89,7 +91,11 @@
 valid_channels = redhat-7.3-i386
 log_file = /var/log/httpd/current.log
 log_level = 0
-apache_config_file = /etc/httpd/conf/curr​ent.httpd.conf
+
+# You must pick one of the following values:
+# 7.x apache_config_file = /etc/httpd/conf/curr​ent.httpd.conf
+# 8.x apache_config_file = /etc/httpd/conf.d/current.conf
+
 access_check_type = user
 access_check_arg = apache
 server_secret = YOUR_SECRET_STRING_HERE

File [removed]: tar-excludes

Directory: /current/docs/
=========================

File [added]: transition_notes_1.0-1.4.txt
Url: http://current.tigri​s.org/source/browse/​current/docs/transit​ion_notes_1.0-1.4.tx​t?rev=1.1.2.1&co​ntent-type=text/x-cv​sweb-markup
Added lines: 45
---------------
Transitioning from Current 1.0.x to Current 1.4.x


1. What do I do convert a current 1.0.x style current.pem key/cert pair
into something that apache will understand?

Nothing. Come on people, I can do no better than this... :)

cp /etc/current/current.pem /etc/httpd/conf/ssl.​crt/server.crt
cp /etc/current/current.pem /etc/httpd/conf/ssl.​key/server.key

If you got real adventurous you could then EDIT those two files with a
plain text editor and remove the part of the file that isn't needed.
(IE, for server.crt, you'd remove the key, and for server.key you'd
remove the certificate)

I didn't on mine, and it works perfectly. No changes on the clients.

2. What do I do about apache/mod_ssl listening to ports 80 and 443, when
current 1.0.x listened on 8080 and 8081?

Couple things present themselves:

A. Just change 80's to 8080's and 443's to 8081's in httpd.conf. A blind
sed should get it right. I don't think this is the most correct answer,
but it WILL work.

B. Apache can be configured to listen to several ports, some ssl'd and
some not. I did that, and my httpd.conf is at
http://www.biology.d​uke.edu/computer/uni​x/current/httpd.conf​
which is also now linked to from the home page.

Looking through that file, if you search for "deny", you'll get several
hits of commented out sections- here's how I limit access to my
departmental current server to just my subnets.

If anyone's apache-fu is stronger than mine, I wouldn't mine knowing how
to JUST specify those subnets in one place, instead of about 6.

Running apache at the normal ports I think is the better long term solution,
as it will let you use that apache for other things. (I'm also doing my
kickstarts from that apache, and putting up internal documentation).


You do have to re-create your database... but thats it.

Directory: /current/docs/developer_docs/
====================​====================​

File [added]: rhl-8.0_server.notes
Url: http://current.tigri​s.org/source/browse/​current/docs/develop​er_docs/rhl-8.0_serv​er.notes?rev=1.1.2.1​&content-type=te​xt/x-cvsweb-markup
Added lines: 46
---------------
1. Apache -> httpd rename
   Delete current.spec dependancy or wrap it in 8.x-ness

2. httpd now has an /etc/httpd/conf.d dir
   Tailor made for us to slip a current.conf file into.
   Installation is now easier.

3. mod_ssl configured in /etc/httpd/conf.d/ssl.conf file
   has "ServerName new.host:443" which must be replaced with the
   real ssl'd server name.

Typical error message is as follows:

[Sat Jan 11 19:01:24 2003] [warn] RSA server certificate CommonName (CN)
`dangermouse.biology.duke.edu' does NOT match server name!?

Note: THIS IS NOT CURRENT SPECIFIC - ALL USERS OF MOD_SSL WILL HAVE TO DO
THIS.

4. /var/log/httpd is now writable only by root, as is the "parent" httpd
   process. HOWEVER, the actual children are owned by "apache". So
   as a temporary measure, I moved the log file up one dir to /var/log.

5. Rpm breakage. (he did upgrade from 4.0 to 4.1)
   rpm.headerFromPackage() is now rpm.ts.hdrFromFdno()

6. Recode to the 4.1 API for the final 1.5 solution, but installing
   rpm404-python and librpm404 should be a good temporary fix for 1.4
   
   We do the correct import now in channel.py, and I pulled all the
   other references to the rpm module out - only channel.py needed it
   anyway.

7. Something in 6.2 packages is causing xmlrpclib to choke on the
   getObsoletes file. Ditched 6.2 for now.

8. Error from the mime_magic_file. Disabled by commenting out in
   httpd.conf. Fix / work around later.

NOTE: This was due to the mod_python 3.0.0 breakage - if you are
using a mod_python that works (3.0.1-2 works for me here - its the srpm
from rawhide rebuilt on 8.0 with no changes) this is not a problem.


9. Once I remembered to set the permissions correctly on the tree (always a
problem in every release) things Just Worked(tm).

Directory: /current/src/
========================

File [changed]: channel.py
Url: http://current.tigri​s.org/source/browse/​current/src/channel.​py.diff?r1=1.2.4.1​&r2=1.2.4.2
Delta lines: +13 -3
--------------------
--- channel.py 29 Jan 2003 01:49:14 -0000 1.2.4.1
+++ channel.py 10 Feb 2003 22:34:22 -0000 1.2.4.2
@@ -13,7 +13,6 @@
 import os.path
 import pickle
 import pprint
-import rpm
 import shelve
 import stat
 import string
@@ -22,6 +21,12 @@
 import copy
 import xmlrpclib
 
+try:
+ import rpm404
+ rpm = rpm404
+except:
+ import rpm
+
 import misc
 from logger import *
 
@@ -846,12 +851,17 @@
         # Add the symlink for the GET requests
         linkname = misc.PathJoin(self.c​hanInfo['package_dir​'],
                                  os.path.basename(pathname))
- if not os.path.exists(linkname):
+ # FIX: symlink may remain, but the file is gone.
+ if not os.path.islink(linkname):
             os.symlink(pathname, linkname)
 
         # Cache the header itself for getPackageHeader() call
         # compressed, not compressed, compressed, not compressed
- hdr_name = string.replace(file, '.rpm', '.hdr')
+
+ # FIX: some rpms have bogus filenames
+ hdr_name = "%s-%s-%s.%s.hdr" % (nvreas_list[0], nvreas_list[1],
+ nvreas_list[3], nvreas_list[5])
+
         filename = misc.PathJoin(self.c​hanInfo['headers_dir​'], hdr_name)
         h_file = open(filename, 'w')
         h_file.write(hdr.unload())

File [changed]: config.py
Url: http://current.tigri​s.org/source/browse/​current/src/config.p​y.diff?r1=1.2.4.1​&r2=1.2.4.2
Delta lines: +18 -17
---------------------
--- config.py 29 Jan 2003 01:49:14 -0000 1.2.4.1
+++ config.py 10 Feb 2003 22:34:22 -0000 1.2.4.2
@@ -16,7 +16,7 @@
 cfg = None
 
 ## These are replaced by make, so beware
-VERSION="1.4.2"
+VERSION="1.4.3"
 MODULES_DIR="/usr/sh​are/current"
 CONFIG_DIR="/etc/current"
 LOG_DIR="/var/log/httpd"
@@ -35,9 +35,9 @@
     "apache_config_file": "/etc/httpd/conf/cur​rent.httpd.conf",
     "log_file": LOG_DIR + "/current.log",
     "log_level": 0,
- "dump": 0,
 }
 
+
 # Configuration Exceptions
 class Error(exceptions.Exception):
     pass
@@ -100,6 +100,17 @@
         del self._defaults
 
         
+ def __getitem__(self, item):
+ """ We support config[key] type access."""
+ # Backported from 1.5
+ return self._data.get(item, "")
+
+
+ def __str__(self):
+ # Backported from 1.5
+ return str(self._data)
+
+
     def getItem(self, item):
         # deliberately fail - we should get asked if we don't know -
         # the defaults should cover that sort of thing.
@@ -123,13 +134,10 @@
         """
 
         ## FIXME: this should be outside the base class somewhere
- usage = """Usage: current [options]
+ usage = """Usage: cadmin [options]
   -c, --config config file to use
   -d, --dump dump final configuration and exit
   -h, --help print this help and exit
- -k, --kill kill a running daemon
- -l, --logfile log file to use
- -n, --nodaemon do not run as a daemon
   -v, --verbose increase level of logging (can use more than once)
   -V, --version print version and exit"""
         
@@ -137,9 +145,8 @@
         tmp = {}
 
         try:
- opts, args = getopt.getopt(argv[1:], "c:dhkl:nvV",
- ("config=", "dump", "help", "kill", "logfile=",
- "nodaemon", "verbose", "version"))
+ opts, args = getopt.getopt(argv[1:], "c:dhvV",
+ ("config=", "dump", "help", "verbose", "version"))
 
         except getopt.error, msg:
             sys.stdout = sys.stderr
@@ -157,16 +164,10 @@
                 tmp["dump"] = 1
             if o in ("-h", "--help"):
                 usage_requested = 1
- if o in ("-k", "--kill"):
- tmp["kill"] = 1
- if o in ("-l", "--logfile"):
- tmp["log_file"] = a
- if o in ("-n", "--nodaemon"):
- tmp["nodaemon"] = 1
             if o in ("-v", "--verbose"):
                 tmp["log_level"] = tmp.get('log_level', 0) + 1
             if o in ("-V", "--version"):
- print "current v%s (C) 2001 Hunter Matthews" % \
+ print "cadmin v%s (C) 2001,2002 Hunter Matthews" % \
                     self._defaults["version"]
                 print "Released under the GPL"
                 sys.exit(0)

File [changed]: current_apache.py
Url: http://current.tigri​s.org/source/browse/​current/src/current_​apache.py.diff?r1=1.​2.4.1&r2=1.2.4.2​
Delta lines: +3 -0
-------------------
--- current_apache.py 29 Jan 2003 01:49:14 -0000 1.2.4.1
+++ current_apache.py 10 Feb 2003 22:34:22 -0000 1.2.4.2
@@ -190,6 +190,9 @@
             # Fixme: need to pass req object here?
             result = callAPIMethod(method, params)
         except:
+ apacheLog('Exception at callAPIMethod()', 'NOTICE')
+ apacheLog('method was %s' % method, 'NOTICE')
+ apacheLog('params were %s' % pprint.pformat(params), 'NOTICE')
             logException()
             return apache.HTTP_BAD_REQUEST
 

File [changed]: errata.py
Url: http://current.tigri​s.org/source/browse/​current/src/errata.p​y.diff?r1=1.2&r2​=1.2.4.1
Delta lines: +0 -1
-------------------
--- errata.py 29 Jan 2003 00:41:48 -0000 1.2
+++ errata.py 10 Feb 2003 22:34:22 -0000 1.2.4.1
@@ -10,7 +10,6 @@
 """
 
 import xmlrpclib
-import rpm
 import pprint
 
 import misc

File [changed]: misc.py
Url: http://current.tigri​s.org/source/browse/​current/src/misc.py.​diff?r1=1.1&r2=1​.1.4.1
Delta lines: +0 -1
-------------------
--- misc.py 29 Jan 2003 00:17:41 -0000 1.1
+++ misc.py 10 Feb 2003 22:34:22 -0000 1.1.4.1
@@ -8,7 +8,6 @@
 
 import xmlrpclib
 import pprint
-import rpm
 import string
 import os
 

File [changed]: registration.py
Url: http://current.tigri​s.org/source/browse/​current/src/registra​tion.py.diff?r1=1.2​&r2=1.2.4.1
Delta lines: +0 -1
-------------------
--- registration.py 29 Jan 2003 00:41:48 -0000 1.2
+++ registration.py 10 Feb 2003 22:34:22 -0000 1.2.4.1
@@ -10,7 +10,6 @@
 """
 
 import xmlrpclib
-import rpm
 import pprint
 
 import misc

File [changed]: up2date.py
Url: http://current.tigri​s.org/source/browse/​current/src/up2date.​py.diff?r1=1.2.4.1​&r2=1.2.4.2
Delta lines: +0 -1
-------------------
--- up2date.py 29 Jan 2003 01:49:14 -0000 1.2.4.1
+++ up2date.py 10 Feb 2003 22:34:22 -0000 1.2.4.2
@@ -12,7 +12,6 @@
 import copy
 import os
 import pprint
-import rpm
 import xmlrpclib
 import stat
 import string

Directory: /current/support/
============================

File [changed]: current.spec
Url: http://current.tigri​s.org/source/browse/​current/support/curr​ent.spec.diff?r1=1.2​.4.1&r2=1.2.4.2
Delta lines: +3 -1
-------------------
--- current.spec 29 Jan 2003 01:48:30 -0000 1.2.4.1
+++ current.spec 10 Feb 2003 22:34:22 -0000 1.2.4.2
@@ -1,6 +1,8 @@
+%define for8x 0
+
 Summary: A server for Red Hat's up2date tools.
 Name: current
-Version: 1.4.2
+Version: 1.4.3
 Release: 1
 License: GPL
 Group: System Environment/Daemons




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@curr​ent.tigris.org
For additional commands, e-mail: cvs-help at current dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update [release-1_4_x-branch]: /current, /current/docs/, /current/docs/developer_docs/, /current/src/, /current/support/ hunterm Hunter Matthews 2003-02-10 14:34:22 PST
Messages per page: