Changes to 'refs/tags/spacewalk-ssl-cert-check-2.0-1'
by Jan Pazdziora
Tag 'spacewalk-ssl-cert-check-2.0-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2010-05-04 14:19 +0000
Tagging package [spacewalk-ssl-cert-check] version [2.0-1] in directory [projects/ssl-cert-check/].
Changes since spacewalk-backend-1.1.12-1:
Jan Pazdziora (2):
461270 - replace our own ssl-cert-check with stock certwatch.
Automatic commit of package [spacewalk-ssl-cert-check] release [2.0-1].
---
projects/ssl-cert-check/rhn-ssl-cert-check | 37 -
projects/ssl-cert-check/spacewalk-ssl-cert-check.spec | 10
projects/ssl-cert-check/ssl-cert-check | 379 ------------------
rel-eng/packages/spacewalk-ssl-cert-check | 2
4 files changed, 9 insertions(+), 419 deletions(-)
---
13 years, 12 months
2 commits - projects/ssl-cert-check rel-eng/packages
by Jan Pazdziora
projects/ssl-cert-check/rhn-ssl-cert-check | 37 -
projects/ssl-cert-check/spacewalk-ssl-cert-check.spec | 10
projects/ssl-cert-check/ssl-cert-check | 379 ------------------
rel-eng/packages/spacewalk-ssl-cert-check | 2
4 files changed, 9 insertions(+), 419 deletions(-)
New commits:
commit f76e275374007e35fb5a03883994f09e3f2fbf33
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 16:19:36 2010 +0200
Automatic commit of package [spacewalk-ssl-cert-check] release [2.0-1].
diff --git a/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec b/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec
index be1fffe..7aaa0aa 100644
--- a/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec
+++ b/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec
@@ -40,6 +40,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Tue May 04 2010 Jan Pazdziora 2.0-1
+- 461270 - replace our own ssl-cert-check with stock certwatch.
+
* Thu Sep 24 2009 Miroslav Suchý <msuchy(a)redhat.com> 1.9-1
- 524053 - Force to "upgrade" to older version of rhn-ssl-cert-check
diff --git a/rel-eng/packages/spacewalk-ssl-cert-check b/rel-eng/packages/spacewalk-ssl-cert-check
index aec6b0b..09a3f5a 100644
--- a/rel-eng/packages/spacewalk-ssl-cert-check
+++ b/rel-eng/packages/spacewalk-ssl-cert-check
@@ -1 +1 @@
-1.9-1 projects/ssl-cert-check/
+2.0-1 projects/ssl-cert-check/
commit 78291f1becc421fb431ad200b776b58821fe93dc
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 16:15:43 2010 +0200
461270 - replace our own ssl-cert-check with stock certwatch.
We take crypto-utils' /etc/cron.daily/certwatch and change it
to override any CERTWATCH_OPTS and NOCERTWATCH, use traceback_mail
value from Spacewalk configuration as the recipient's email
address, and to suggest the use of rhn-ssl-tool besides genkey.
diff --git a/projects/ssl-cert-check/rhn-ssl-cert-check b/projects/ssl-cert-check/rhn-ssl-cert-check
index ce59b9f..d39cb00 100644
--- a/projects/ssl-cert-check/rhn-ssl-cert-check
+++ b/projects/ssl-cert-check/rhn-ssl-cert-check
@@ -31,23 +31,6 @@ unset ADMIN EXPIRATION CHECK
EXPIRATION=${EXPIRATION:-60}
-RHN_CONF_FILE=/etc/rhn/rhn.conf
-SSL_HTTPD_CONF_FILE=/etc/httpd/conf.d/ssl.conf
-SSL_CERT_CHECK=/usr/share/ssl/ssl-cert-check
-REMOTE_HOSTS=/etc/sysconfig/rhn/ssl-hosts.conf
-
-# If the admin email address is not set and RHN_CONF_FILE could not be found,
-# there's no point in moving forward
-[ -z "$ADMIN" -a ! -f $RHN_CONF_FILE ] && exit 0
-
-
-# Return path to the SSL certificate
-get_ssl_cert_file() {
- awk '/^SSLCertificateFile/ {print $2}' $SSL_HTTPD_CONF_FILE
-}
-
-# main
-
if [ -z "$ADMIN" ]; then
ADMIN=$(spacewalk-cfg-get traceback_mail)
# Replace commas with spaces
@@ -68,21 +51,7 @@ if [ -z "$ADMIN" ]; then
exit 0
fi
-# Parse remote hosts file
-if [ -f "$REMOTE_HOSTS" ]; then
- # Get rid of comments
- grep -v "^[[:blank:]]*#" $REMOTE_HOSTS |
- while IFS=: read server port; do
- if [ -n "$server" ]; then
- if [ -z "$port" ]; then
- port=443
- fi
- $SSL_CERT_CHECK -x $EXPIRATION -a -e "$ADMIN" -q -s $server -p $port
- fi
- done
-fi
+sed -e "s!| */usr/sbin/sendmail!| sed \"s/'genkey'/'rhn-ssl-tool' or 'genkey'/; /Generated by/a\\\\ and $0\" &!" \
+ -e "/\. *\/etc\/sysconfig\/httpd/aexport CERTWATCH_OPTS='--address $ADMIN --period $EXPIRATION' ; unset NOCERTWATCH" /etc/cron.daily/certwatch \
+ | bash -
-SSL_CERT_FILE=$(get_ssl_cert_file)
-if [ -f "$SSL_CERT_FILE" ]; then
- $SSL_CERT_CHECK -x $EXPIRATION -c $SSL_CERT_FILE -a -e "$ADMIN" -q
-fi
diff --git a/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec b/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec
index d2f2213..be1fffe 100644
--- a/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec
+++ b/projects/ssl-cert-check/spacewalk-ssl-cert-check.spec
@@ -5,11 +5,11 @@ License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
Epoch: 1
-Version: 1.9
+Version: 2.0
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-Requires: openssl
+Requires: /etc/cron.daily/certwatch
Obsoletes: rhn-ssl-cert-check < %{epoch}:%{version}
Provides: rhn-ssl-cert-check = %{epoch}:%{version}
@@ -27,10 +27,8 @@ administrator.
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/%{_datadir}/ssl
install -d $RPM_BUILD_ROOT/etc/cron.daily
-install -m755 ssl-cert-check $RPM_BUILD_ROOT/%{_datadir}/ssl/ssl-cert-check
install -m755 rhn-ssl-cert-check $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/rhn-ssl-cert-check
%clean
@@ -39,7 +37,6 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%attr(0755,root,root) %{_sysconfdir}/cron.daily/rhn-ssl-cert-check
-%attr(0755,root,root) %{_datadir}/ssl/ssl-cert-check
%doc LICENSE
%changelog
diff --git a/projects/ssl-cert-check/ssl-cert-check b/projects/ssl-cert-check/ssl-cert-check
deleted file mode 100644
index c00e9f1..0000000
--- a/projects/ssl-cert-check/ssl-cert-check
+++ /dev/null
@@ -1,379 +0,0 @@
-#!/bin/bash
-#
-# Program: SSL Certificate Check <ssl-cert-check>
-#
-# Author: Matty <matty(a)daemons.net>
-#
-# Current Version: 1.4
-#
-# Revision History:
-#
-# Version 1.4
-# Added "-c" flag to report expiration status of a PEM encoded certificate
-# -- functionality added by Hampus Lundqvist
-#
-# Version 1.3
-# Updated the prints messages to display the reason a connection
-# failed (connection refused, connection timeout, bad cert, etc)
-#
-# Updated the GNU date checking routines. I really wish UNIX/BSD/Linux
-# based systems utilized a common set of options/interfaces. *sigh*
-#
-# Version 1.2
-# Added checks for each binary required
-# Added checks for connection timeouts
-#
-# Versions 1.1
-# Added checks for GNU date
-# Added a "-h" option
-# Cleaned up the documentation
-#
-# Version 1.0
-# Initial Release
-#
-# Last Updated: 01-04-2005
-#
-# Purpose:
-# ssl-cert-check checks to see if a digital certificate in X.509 format
-# has expired. ssl-cert-check can be run in interactive and batch mode,
-# and provides facilities to alarm if a certificate is about to expire.
-#
-# License:
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# Requirements:
-# Requires openssl and GNU date
-#
-# Installation:
-# Copy the shell script to a suitable location
-#
-# Usage (script should be run as a non-privileged user):
-# Usage: ./ssl-cert-check {[ -c certificate file ]} || {[ -b ] && [ -f cert_file ]} || {[ -s common_name ] && [ -p port]}}
-# [ -e email ] [ -x expir_days ] [ -q ] [ -a ] [ -h ]
-# -a : Send a warning message through email
-# -b : Print the expiration date for all certificates in cert_file (batch mode)
-# -c : Print the expiration date for a PEM formatted certificate
-# -e email address : Email address to send expiration notices
-# -f cert file : File with a list of common names and ports (eg., blatch.com 443)
-# -h : Print this screen
-# -p port : Port to connect to (interactive mode)
-# -s commmon name : Server to connect to (interactive mode)
-# -q : Don't print anything on the console
-# -x days : Certificate expiration interval (eg. if cert_date < days)
-#
-#
-# Examples:
-# Print the certificate expiration status of the X.509 certificate stored in file cacert.pem
-# $ ssl-cert-check -c /etc/ca/cacert.pem
-#
-# Print the certificate expiration dates for a list of domains specified in the file ssldomains:
-# $ ssl-cert-check -b -f ssldomains
-#
-# Print the certificate expiration date for mail.daemons.net:
-# $ ssl-cert-check -s mail.daemons.net -p 995
-#
-# Run ssl-cert-check in quiet mode, check for all certificates that will
-# expire in 75-days or less. Email the expiring certs to matty(a)daemons.net:
-# $ ssl-cert-check -a -b -f ssldomains -q -x 75 -e matty(a)daemons.net
-
-PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/ssl/bin ; export PATH
-
-# Who to page when an expired certificate is detected (cmdline: -e)
-ADMIN="sysadmin(a)mydomain.com"
-
-# Number of days to give as a buffer (cmdline: -x)
-WARNDAYS=30
-
-# If QUIET is set to TRUE, don't print anything on the console (cmdline: -q)
-QUIET="FALSE"
-
-# Don't send emails by default (cmdline: -a)
-ALARM="FALSE"
-
-# Location of system binaries
-DATE="/bin/date"
-MAIL="/bin/mail"
-OPENSSL="/usr/bin/openssl"
-
-# Place to stash temporary files
-CERT_TMP="$HOME/cert.$$"
-ERROR_TMP="$HOME/error.$$"
-
-# Set the default umask to be somewhat restrictive
-umask 077
-
-
-###########################################################
-### Converts a date in string format passed as $1 into
-### the number of seconds since 01/01/70 00:00:00 UTC.
-### Replace this with another date normalization routine if
-### you do not have GNU date available.
-###########################################################
-utcseconds() {
- utcsec=`${DATE} -d "$1" +%s`
- echo "$utcsec"
-}
-
-
-###########################################################
-### Calculate the number of seconds between two dates
-###########################################################
-date_diff() {
- diff=`expr $2 - $1`
- echo "${diff}"
-}
-
-
-###########################################################
-### Calculate days given seconds
-###########################################################
-date_days() {
- DAYS=`expr ${1} \/ 86400`
- echo "${DAYS}"
-}
-
-
-#####################################################################
-### Method used to print a line with a certificates expiration status
-#####################################################################
-prints() {
- if [ "${QUIET}" != "TRUE" ]
- then
- MIN_DATE=`echo $4 | awk '{ print $1, $2, $4 }'`
- printf "%-30s %-25s %-20s %-5s\n" "$1:$2" "$3" "$MIN_DATE" "$5"
- fi
-}
-
-
-########################
-### Print out a heading
-########################
-print_heading() {
- if [ "${QUIET}" != "TRUE" ]
- then
- printf "\n%-30s %-25s %-20s %-5s\n" "Host" "Status" "Expires" "Days Left"
- fi
-}
-
-
-##########################################
-# Provide a listing of how the tool works
-##########################################
-useage() {
- echo "Usage: $0 {[ -c certificate file ]} || {[ -b ] && [ -f cert_file ]} || {[ -s common_name ] && [ -p port]}}"
- echo " [ -e email ] [ -x expir_days ] [ -q ] [ -a ] [ -h ]"
- echo " -a : Send a warning message through email "
- echo " -b : Print the expiration date for all certificates in cert_file (batch mode)"
- echo " -c : Print the expiration date for a PEM formatted certificate"
- echo " -e email address : Email address to send expiration notices"
- echo " -f cert file : File with a list of common names and ports (eg., blatch.com 443)"
- echo " -h : Print this screen"
- echo " -p port : Port to connect to (interactive mode)"
- echo " -s commmon name : Server to connect to (interactive mode)"
- echo " -q : Don't print anything on the console"
- echo " -x days : Certificate expiration interval (eg. if cert_date < days)"
-}
-
-
-##################################################################
-### Connect to a server ($1) and port ($2) to see if a certificate
-### has expired
-##################################################################
-check_server_status() {
-
- echo "" | ${OPENSSL} s_client -connect ${1}:${2} 2> ${ERROR_TMP} 1> ${CERT_TMP}
-
- if grep -i "Connection refused" ${ERROR_TMP} > /dev/null
- then
- prints ${1} ${2} "Connection refused" "?" "?"
-
- elif grep -i "gethostbyname failure" ${ERROR_TMP} > /dev/null
- then
- prints ${1} ${2} "Cannot resolve domain" "?" "?"
-
- elif grep -i "Operation timed out" ${ERROR_TMP} > /dev/null
- then
- prints ${1} ${2} "Operation timed out" "?" "?"
-
- elif grep -i "ssl handshake failure" ${ERROR_TMP} > /dev/null
- then
- prints ${1} ${2} "SSL handshake failed" "?" "?"
-
- elif grep -i "connect: Connection timed out" ${ERROR_TMP} > /dev/null
- then
- prints ${1} ${2} "Connection timed out" "?" "?"
-
- else
- check_expiration ${CERT_TMP} $1 $2
- fi
-}
-
-#####################################################
-### Check the expiration status of a certificate file
-### Accepts three parameters:
-### $1 -> certificate file to process
-### $2 -> Server name
-### $3 -> Port number of certificate
-#####################################################
-check_expiration() {
-
- CERTDATE=`${OPENSSL} x509 -in ${1} -enddate -noout | sed 's/notAfter\=//'`
-
- # Convert the date to seconds, and get the diff between NOW and the expiration date
- CERTUTC=`utcseconds "${CERTDATE}"`
- CERTDIFF=`date_diff ${NOWUTC} ${CERTUTC}`
-
- if [ ${CERTDIFF} -lt 0 ]
- then
- if [ "${ALARM}" == "TRUE" ]
- then
- echo "The SSL certificate for ${2} has expired!" \
- | ${MAIL} -s "Certificate for ${2} has expired!" ${ADMIN}
- fi
-
- DAYS=`date_days $CERTDIFF`
- prints ${2} ${3} "Expired" "$CERTDATE" "$DAYS"
-
- elif [ ${CERTDIFF} -lt ${WARNSECS} ]
- then
- if [ "${ALARM}" == "TRUE" ]
- then
- echo "The SSL certificate for ${2} will expire on ${CERTDATE}" \
- | ${MAIL} -s "$0: Certificate for ${2} will expire in ${WARNDAYS}-days or less" ${ADMIN}
- fi
-
- DAYS=`date_days $CERTDIFF`
- prints ${2} ${3} "Expiring" "${CERTDATE}" "${DAYS}"
-
- else
- DAYS=`date_days $CERTDIFF`
- prints ${2} ${3} "Valid" "${CERTDATE}" "${DAYS}"
-
- fi
-}
-
-
-#################################
-### Being the main program logic
-#################################
-while getopts abe:f:c:hp:s:qx: option
-do
- case "${option}"
- in
- a) ALARM="TRUE";;
- b) REPORT_ALL="TRUE";;
- c) CERTFILE=${OPTARG};;
- e) ADMIN=${OPTARG};;
- f) SERVERFILE=$OPTARG;;
- h) useage
- exit 1;;
- p) PORT=$OPTARG;;
- s) HOST=$OPTARG;;
- q) QUIET="TRUE";;
- x) WARNDAYS=$OPTARG;;
- \?) useage
- exit 1;;
- esac
-done
-
-
-if [ ! -f ${OPENSSL} ]
-then
- echo "ERROR: $OPENSSL does not exist. Please modify the \$OPENSSL variable."
- exit 1
-fi
-
-if [ ! -f ${DATE} ]
-then
- echo "ERROR: $DATE does not exist. Please modify the \$DATE variable."
- exit 1
-fi
-
-if [ ! -f ${MAIL} ]
-then
- echo "ERROR: $MAIL does not exist. Please modify the \$MAIL variable."
- exit 1
-fi
-
-if ${DATE} -R -d "Wed Jan 1 00:00:00 EDT 2000" "+%s" 2>&1 | grep -i "illegal option" > /dev/null
-then
- echo "ERROR: \$DATE does not point to GNU date"
- exit 1
-fi
-
-if ${DATE} -R -d "Wed Jan 1 00:00:00 EDT 2000" "+%s" 2>&1 | grep -i "unknown option" > /dev/null
-then
- echo "ERROR: \$DATE does not point to GNU date"
- exit 1
-fi
-
-### Baseline the dates so we have something to compare with
-NOWDATE=`${DATE}`
-NOWUTC=`utcseconds "${NOWDATE}"`
-
-
-### Get the number of seconds to compare the UTC time with
-WARNSECS=`expr ${WARNDAYS} \* 86400`
-
-
-### Touch the files to avoid issues
-touch ${CERT_TMP} ${ERROR_TMP}
-
-
-### IF a HOST and PORT were passed on the cmdline, use that
-if [ "${HOST}" != "" ] && [ "${PORT}" != "" ]
-then
- print_heading
- check_server_status "${HOST}" "${PORT}"
-
-
-#####################################################################
-### If a file and a "-a" are passed on the command line, check all
-### of the certificates in the file to see if they are about to expire
-#####################################################################
-elif [ "${REPORT_ALL}" == "TRUE" ] && [ -f "${SERVERFILE}" ]
-then
- print_heading
- while read HOST PORT
- do
- check_server_status "${HOST}" "${PORT}"
-
- done < ${SERVERFILE}
-
-
-###################################################################
-### Check to see if the certificate in CERTFILE is about to expire
-###################################################################
-elif [ "${CERTFILE}" != "" ]
-then
- print_heading
- if [ -f "${CERTFILE}" ]
- then
- check_expiration ${CERTFILE} "FILE" "${CERTFILE}"
- else
- echo "ERROR: The file named ${CERTFILE} doesn't exist"
- fi
-
-###################################################
-### There was an error, so print how the tool works
-###################################################
-else
- useage
-fi
-
-###############################
-### Remove the temporary files
-###############################
-rm -f ${CERT_TMP} ${ERROR_TMP}
13 years, 12 months
Changes to 'refs/tags/spacewalk-backend-1.1.12-1'
by Michael Mraka
Tag 'spacewalk-backend-1.1.12-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-05-04 11:34 +0000
Tagging package [spacewalk-backend] version [1.1.12-1] in directory [backend/].
Changes since osad-5.9.34-1:
Jan Pazdziora (3):
Removing web/conf/*.conf files that are not packages nor used.
The satellite-httpd service is no more.
Setting server.nls_lang once, later in this file, should be enough.
Michael Mraka (36):
made _compute_unique_packages() simple and straightforward
changed class and procedure comments to docstrings
modified importer to read new checksum element from dump
check if any of checksums we got matches to checksum of the package we have
modified rhn-package, rhn-erratum-file and rhn-kickstart-file to import checksum element
fixed typo
fixed variables changed in b2b2398f7b78938841a2e9c67164dd3780f4516d
path has been removed from the collection
choose primary checksum according to rpm capability
path may be None if package has been synced with --no-rpms
check whether database contains one of the checksums we got from dump
package metadata have to go before rpms now
removed an extra condition and made code slightly readable
removed an extra condition
let the comment make sense
removed _ChecksumEntryDumper(): can be simply rewriten via EmptyDumper()
removed unused code and its comment
ShortPackageCollection doesn't have enough information about checksum
made checksum priority list configurable
modified rhn-package-file to import new checksum correctly
simplified _compute_unique_source_packages()
moved repeated code into function
made _compute_unique_packages() even more simple and straightforward
straightened logic in _process_package() and _verify_file()
removed unused variable
moved file verification to rpm download step
rpms have to go before packages
simplified _compute_unique_kickstarts()
_verify_file() returns only errcode now
simplified errata uniquify
removed unused method
reuse get_nevra()
created get_nevra_dict() so it can be reused
fixed global name 'l_timestamp' is not defined
short packages doesn't have enough information about checksums, let's use packages instead
Automatic commit of package [spacewalk-backend] release [1.1.12-1].
Miroslav Suchý (1):
code cleanup - this configuration files are not used in proxy
---
backend/rhn-conf/rhn_server.conf | 2
backend/satellite_tools/exporter/exportLib.py | 15
backend/satellite_tools/satsync.py | 477 ++----
backend/satellite_tools/sync_handlers.py | 3
backend/satellite_tools/xmlSource.py | 48
backend/server/importlib/importLib.py | 56
backend/spacewalk-backend.spec | 5
rel-eng/packages/spacewalk-backend | 2
satellite/setup-symlinks.sh | 4
spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf | 2
web/conf/proxy/httpd.conf | 1201 ----------------
web/conf/proxy/local.conf | 6
web/conf/proxy/proxy.conf | 8
web/conf/rhn-profile.conf | 1
web/conf/rhn-r.conf | 1
web/conf/rhn-sat.conf | 2
web/conf/rhn-test02.conf | 4
web/conf/rhn_web.conf | 2
web/conf/rhnapp.conf | 26
19 files changed, 259 insertions(+), 1606 deletions(-)
---
13 years, 12 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit d10776034c521b33ec5b0399a0d27fb9d3655495
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue May 4 13:34:55 2010 +0200
Automatic commit of package [spacewalk-backend] release [1.1.12-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 525ee1d..a205a60 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.1.11
+Version: 1.1.12
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -632,6 +632,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue May 04 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.1.12-1
+- modified satellite-sync to new xml dumps
+
* Mon May 03 2010 Jan Pazdziora 1.1.11-1
- 585233 - the has-comps attribute will no longer be used by hosted.
- add dependency information for DEB packages (lukas.durfina(a)gmail.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 1022d56..535a9bb 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.1.11-1 backend/
+1.1.12-1 backend/
13 years, 12 months
35 commits - backend/rhn-conf backend/satellite_tools backend/server
by Michael Mraka
backend/rhn-conf/rhn_server.conf | 2
backend/satellite_tools/exporter/exportLib.py | 15
backend/satellite_tools/satsync.py | 477 +++++++++-----------------
backend/satellite_tools/sync_handlers.py | 3
backend/satellite_tools/xmlSource.py | 48 ++
backend/server/importlib/importLib.py | 56 +--
6 files changed, 253 insertions(+), 348 deletions(-)
New commits:
commit 9ad7fbe8fd05accec78d8de5e65fb192e1ba4f6f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue May 4 13:25:11 2010 +0200
short packages doesn't have enough information about checksums, let's use packages instead
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 7107e66..f046fb7 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -88,7 +88,6 @@ class Runner:
'channels' : ['channel-families'],
'channel-families' : ['blacklists'],
'blacklists' : ['arches'],
- 'short' : [''],
'download-errata' : ['errata'],
'download-packages' : [''],
'download-source-packages' : [''],
@@ -103,7 +102,6 @@ class Runner:
'arches',
'channels',
'blacklists',
- 'short',
'download-packages',
'rpms',
'packages',
@@ -300,16 +298,6 @@ class Runner:
def _step_blacklists(self):
return self.syncer.processBlacklists()
- def _step_short(self):
- try:
- return self.syncer.processShortPackages()
- except xmlDiskSource.MissingXmlDiskSourceFileError, e:
- msg= "ERROR: The dump is missing package data, use --no-rpms to skip this step or fix the content to include package data."
- log2disk(-1, msg)
- log2stderr(-1, msg, cleanYN=1)
- sys.exit(25)
-
-
def _step_download_packages(self):
return self.syncer.download_package_metadata()
@@ -852,37 +840,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
self._channel_packages[chn] = package_ids
self._avail_channel_packages[chn] = avail_package_ids
- def processShortPackages(self):
- log(1, ["", "Retrieving short package metadata (used for indexing)"])
-
- # Compute the unique packages and populate self._channel_packages
- self._compute_unique_packages()
-
- h = sync_handlers.get_short_package_handler()
- stream_loader = StreamProducer(h)
- if self.mountpoint:
- s = xmlDiskSource.ShortPackageDiskSource(self.mountpoint)
- stream_loader.set_disk_loader(s)
- else:
- s = self.xmlWireServer.getChannelShortPackagesXmlStream
- stream_loader.set_wire_loader(s)
-
- # OK, now uq_channel_packages only has the unique packages
- for channel_label, package_ids in self._channel_packages.items():
- # Pretend we fetch all packages
- log(1, " Retrieving / parsing short package metadata: %s (%s)" %
- (channel_label, len(package_ids)))
-
- lm = self._channel_collection.get_channel_timestamp(channel_label)
- channel_last_modified = int(rhnLib.timestamp(lm))
-
- stream_loader.set_args(channel_label, channel_last_modified)
- stream_loader.process(package_ids)
-
- h.close()
-
- self._diff_packages()
-
_query_compare_packages = """
select p.id, c.checksum_type, c.checksum, p.path, p.package_size,
TO_CHAR(p.last_modified, 'YYYYMMDDHH24MISS') last_modified
@@ -896,7 +853,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
"""
# XXX the "is null" condition will have to change in multiorg satellites
def _diff_packages(self):
- package_collection = sync_handlers.ShortPackageCollection()
+ package_collection = sync_handlers.PackageCollection()
h = rhnSQL.prepare(self._query_compare_packages)
missing_channel_packages = {}
@@ -1067,7 +1024,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
missing_packages = {}
# First, determine what has to be downloaded
- short_package_collection = sync_handlers.ShortPackageCollection()
package_collection = sync_handlers.PackageCollection()
for channel, pids in self._missing_channel_packages.items():
missing_packages[channel] = mp = []
@@ -1078,7 +1034,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
for pid in pids:
# XXX Catch errors
- timestamp = short_package_collection.get_package_timestamp(pid)
+ timestamp = package_collection.get_package_timestamp(pid)
if not package_collection.has_package(pid, timestamp):
# not in the cache
mp.append(pid)
@@ -1086,9 +1042,9 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
return missing_packages
def download_package_metadata(self):
- log(1, ["", "Downloading package metadata"])
- # Get the missing but uncached packages
- missing_packages = self._missing_not_cached_packages()
+
+ # Compute the unique packages and populate self._channel_packages
+ self._compute_unique_packages()
h = sync_handlers.get_package_handler()
stream_loader = StreamProducer(h)
@@ -1099,7 +1055,12 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
s = self.xmlWireServer.getPackageXmlStream
stream_loader.set_wire_loader(s)
- for channel, pids in missing_packages.items():
+ log(1, ["", "Downloading package metadata"])
+ # Get the missing but uncached packages
+# missing_packages = self._missing_not_cached_packages()
+
+
+ for channel, pids in self._channel_packages.items():
package_count = len(pids)
log(1, messages.package_parsing % (channel,
@@ -1114,6 +1075,9 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
pb.redrawYN = 0
pb.printAll(1)
+ lm = self._channel_collection.get_channel_timestamp(channel)
+ channel_last_modified = int(rhnLib.timestamp(lm))
+
ss = SequenceServer(pids[:], nevermorethan=self._batch_size)
while not ss.doneYN():
chunk = ss.getChunk()
@@ -1126,6 +1090,8 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
h.close()
+ self._diff_packages()
+
# Double-check that we got all the packages
missing_packages = self._missing_not_cached_packages()
for channel, pids in missing_packages.items():
@@ -1760,12 +1726,11 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _link_channel_packages(self):
log(1, ["", messages.link_channel_packages])
- short_package_collection = sync_handlers.ShortPackageCollection()
package_collection = sync_handlers.PackageCollection()
uq_packages = {}
for chn, package_ids in self._channel_packages.items():
for pid in package_ids:
- timestamp = short_package_collection.get_package_timestamp(pid)
+ timestamp = package_collection.get_package_timestamp(pid)
package = package_collection.get_package(pid, timestamp)
assert package is not None
channel_obj = {'label' : chn}
@@ -1799,14 +1764,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
""" short-circuit the most common case"""
if not chunk:
return []
- short_package_collection = sync_handlers.ShortPackageCollection()
if sources:
package_collection = sync_handlers.SourcePackageCollection()
else:
package_collection = sync_handlers.PackageCollection()
batch = []
for pid in chunk:
- timestamp = short_package_collection.get_package_timestamp(pid)
+ timestamp = package_collection.get_package_timestamp(pid)
package = package_collection.get_package(pid, timestamp)
if package is None:
# not in the cache
@@ -1853,7 +1817,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _fix_erratum(self, erratum):
""" Replace the list of packages with references to short packages"""
- sp_coll = sync_handlers.ShortPackageCollection()
+ sp_coll = sync_handlers.PackageCollection()
pids = unique(erratum['packages'])
# map all the pkgs objects to the erratum
packages = []
@@ -1909,7 +1873,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _fetch_packages(self, channel, missing_fs_packages, sources=0):
- short_package_collection = sync_handlers.ShortPackageCollection()
if sources:
# acronym = "SRPM"
package_collection = sync_handlers.SourcePackageCollection()
@@ -1924,7 +1887,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
cfg = config.initUp2dateConfig()
for package_id, path in missing_fs_packages:
pkg_current = pkg_current + 1
- timestamp = short_package_collection.get_package_timestamp(package_id)
+ timestamp = package_collection.get_package_timestamp(package_id)
package = package_collection.get_package(package_id, timestamp)
checksum_type = package['checksum_type']
@@ -2419,7 +2382,6 @@ def processCommandline():
if actionDict['no-packages']:
actionDict['packages'] = 0
- actionDict['short'] = 0
actionDict['download-packages'] = 0
actionDict['rpms'] = 0
diff --git a/backend/satellite_tools/sync_handlers.py b/backend/satellite_tools/sync_handlers.py
index 7e79c3c..59c74f8 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -288,9 +288,6 @@ class PackageCollection(ShortPackageCollection):
def _init_cache(self):
self._cache = syncCache.PackageCache()
- def get_package_timestamp(self, package_id):
- raise NotImplementedError
-
class PackageContainer(xmlSource.PackageContainer):
def endItemCallback(self):
commit 7d79306c59cea1f2040ceb3da6f71bddac34f838
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 23:35:04 2010 +0200
fixed global name 'l_timestamp' is not defined
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 00165d7..7107e66 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1942,7 +1942,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
package['path'] = path
package_collection.add_package(package)
- errcode = self._verify_file(path, l_timestamp, package_size,
+ errcode = self._verify_file(path, rhnLib.timestamp(timestamp), package_size,
checksum_type, checksum)
if errcode == 0:
# file is already there
commit 014ac47b005e0101077ffddbe554468888b252ee
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 23:33:42 2010 +0200
created get_nevra_dict() so it can be reused
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index e3d6451..00165d7 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -61,7 +61,7 @@ from server.importlib.errataCache import schedule_errata_cache_update
from server.importlib.importLib import InvalidChannelFamilyError
from server.importlib.importLib import MissingParentChannelError
-from server.importlib.importLib import get_nevra
+from server.importlib.importLib import get_nevra, get_nevra_dict
import satCerts
import req_channels
@@ -897,7 +897,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
# XXX the "is null" condition will have to change in multiorg satellites
def _diff_packages(self):
package_collection = sync_handlers.ShortPackageCollection()
- nvrea_keys = ['name', 'epoch', 'version', 'release', 'arch']
h = rhnSQL.prepare(self._query_compare_packages)
missing_channel_packages = {}
@@ -923,17 +922,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
l_timestamp = rhnLib.timestamp(p_timestamp)
package = package_collection.get_package(pid, p_timestamp)
assert package is not None
- nevra = {}
- for t in nvrea_keys:
- nevra[t] = package[t] or ""
if package['org_id'] is not None:
- nevra['org_id'] = OPTIONS.orgid or DEFAULT_ORG
package['org_id'] = OPTIONS.orgid or DEFAULT_ORG
- else:
- nevra['org_id'] = package['org_id']
+ nevra = get_nevra_dict(package)
+ nevra['org_id'] = package['org_id']
- apply(h.execute, (), nevra)
+ h.execute(**nevra)
row = None
for r in (h.fetchall_dict() or []):
# let's check which checksum we have in database
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index 76fe3be..4d2601e 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -844,9 +844,17 @@ def copy_package(fd, basedir, relpath, checksum_type, checksum, force=None):
# Returns a list of containing nevra for the given RPM header
+NEVRA_TAGS = ['name', 'epoch', 'version', 'release', 'arch']
def get_nevra(header):
# Get nevra
nevra = []
- for tag in ['name', 'epoch', 'version', 'release', 'arch']:
+ for tag in NEVRA_TAGS:
nevra.append(header[tag])
return nevra
+
+def get_nevra_dict(header):
+ # Get nevra
+ nevra = {}
+ for tag in NEVRA_TAGS:
+ nevra[tag] = header[tag]
+ return nevra
commit 4664d0dc8240f412c93fdbd6f9564c90df6ace5a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 22:48:15 2010 +0200
reuse get_nevra()
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 5785c53..e3d6451 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -61,6 +61,7 @@ from server.importlib.errataCache import schedule_errata_cache_update
from server.importlib.importLib import InvalidChannelFamilyError
from server.importlib.importLib import MissingParentChannelError
+from server.importlib.importLib import get_nevra
import satCerts
import req_channels
@@ -1935,9 +1936,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
checksum = package['checksum']
package_size = package['package_size']
if not path:
- nevra = []
- for t in ['name', 'epoch', 'version', 'release', 'arch']:
- nevra.append(package[t])
+ nevra = get_nevra(package)
orgid = None
if package['org_id']:
orgid = OPTIONS.orgid or DEFAULT_ORG
commit e2738df2ca0b6e489fc7d8eacc5ec6468ff7a5ea
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 19:54:07 2010 +0200
removed unused method
moreover it looks completely wrong as it returns name twice
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index 4fc23a2..76fe3be 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -318,10 +318,6 @@ class IncompletePackage(BaseInformation):
return "%s-%s-%s.%s.rpm" % (self.name, self.evr[1], self.evr[2],
self.arch)
- def get_nevrao(self):
- return (self.name, self['name'], self['epoch'], self['version'],
- self['release'], self['arch'], self['org_id'])
-
class Package(IncompletePackage):
"""
A package is a hash of attributes
commit a00c35c49f93eaefeb84ead9114cf54578fa0c95
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 16:47:58 2010 +0200
simplified errata uniquify
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 0470f97..5785c53 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -401,7 +401,7 @@ class Syncer:
self._failed_fs_packages = {}
self._extinct_packages = {}
- self._uq_channel_errata = {}
+ self._channel_errata = {}
self._missing_channel_errata = {}
self._channel_source_packages = {}
@@ -1537,7 +1537,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
# First, determine what has to be downloaded
errata_collection = sync_handlers.ErrataCollection()
- for channel, errata in self._uq_channel_errata.items():
+ for channel, errata in self._channel_errata.items():
missing_errata[channel] = mp = []
if not errata:
@@ -1620,19 +1620,8 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
channel_errata[chn] = errata
# Uniquify the errata
- self._uq_channel_errata = uq_channel_errata = {}
- uq_errata = {}
for channel, errata in channel_errata.items():
- ch_erratum_ids = uq_channel_errata[channel] = []
- for eid, timestamp, advisory_name in errata:
- if uq_errata.has_key(eid):
- # Saw this erratum already
- continue
- ch_erratum_ids.append((eid, timestamp, advisory_name))
- uq_errata[eid] = None
- # Be nice enough to sort the list
- ch_erratum_ids.sort()
- del uq_errata
+ self._channel_errata[channel] = sorted(list(set(errata)))
def _diff_db_errata(self):
""" Compute errata that are missing from the satellite
@@ -1642,7 +1631,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
errata_collection = sync_handlers.ErrataCollection()
self._missing_channel_errata = missing_channel_errata = {}
db_channel_errata = self._get_db_channel_errata()
- for channel, errata in self._uq_channel_errata.items():
+ for channel, errata in self._channel_errata.items():
ch_erratum_ids = missing_channel_errata[channel] = []
for eid, timestamp, advisory_name in errata:
if timestamp is not None:
commit 163a0cd2b59940eef3566fe2c6301c85675a9783
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 16:33:54 2010 +0200
_verify_file() returns only errcode now
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index f3a808f..0470f97 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1498,7 +1498,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
dest_path = os.path.join(base_path, relative_path)
timestamp = rhnLib.timestamp(f['last_modified'])
file_size = f['file_size']
- (errcode, ret_path) = self._verify_file(dest_path,
+ errcode = self._verify_file(dest_path,
timestamp, file_size, f['checksum_type'], f['checksum'])
if errcode != 0:
# Have to download it
commit f4c3fbb166e7d05a2ec8221f7179050af3088844
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 16:23:12 2010 +0200
simplified _compute_unique_kickstarts()
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 4d80a4a..f3a808f 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -407,7 +407,6 @@ class Syncer:
self._channel_source_packages = {}
self._channel_kickstarts = {}
- self._uq_channel_kickstarts = {}
def initialize(self):
"""Initialization that requires IO, etc."""
@@ -1318,22 +1317,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _compute_unique_kickstarts(self):
""" process package metadata for one channel at a time"""
relevant = self._channel_req.get_requested_channels()
- self._channel_kickstarts = channel_kickstarts = {}
- self._uq_channel_kickstarts = uq_channel_kickstarts = {}
- uq_kickstarts = {}
+ self._channel_kickstarts = {}
for chn in relevant:
timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
- kickstart_trees = channel_obj['kickstartable_trees']
- cks = channel_kickstarts[chn] = kickstart_trees
- uq_cks = uq_channel_kickstarts[chn] = []
- for kt in kickstart_trees:
- if uq_kickstarts.has_key(kt):
- # Found this one already
- continue
- uq_kickstarts[kt] = None
- uq_cks.append(kt)
+ self._channel_kickstarts[chn] = \
+ sorted(set(channel_obj['kickstartable_trees'] or []))
_query_get_kickstarts = rhnSQL.Statement("""
select TO_CHAR(last_modified, 'YYYYMMDDHH24MISS') last_modified
@@ -1400,7 +1390,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
s = self.xmlWireServer.getKickstartsXmlStream
stream_loader.set_wire_loader(s)
- for channel, ktids in self._uq_channel_kickstarts.items():
+ for channel, ktids in self._channel_kickstarts.items():
kt_count = len(ktids)
log(1, messages.kickstart_parsing % (channel,
@@ -1494,7 +1484,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
missing_ks_files = {}
# download files for the ks trees
- for channel, ktids in self._uq_channel_kickstarts.items():
+ for channel, ktids in self._channel_kickstarts.items():
missing_ks_files[channel] = missing = []
for ktid in ktids:
# No timestamp for kickstartable trees
commit 966552317ffbc11232134d71fcc7c671b8db496d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 15:52:14 2010 +0200
rpms have to go before packages
we need to know rpm path in package import step
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index eb571cd..4d80a4a 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -104,8 +104,8 @@ class Runner:
'blacklists',
'short',
'download-packages',
- 'packages',
'rpms',
+ 'packages',
'srpms',
'download-source-packages',
'download-errata',
commit db7fbc3cee201b56671c303e32294644a2bf943c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon May 3 15:57:07 2010 +0200
moved file verification to rpm download step
because checksum might be unknown in package diff step
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 1a2c228..eb571cd 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1034,33 +1034,21 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
package_size, checksum_type, checksum)
if errcode:
# file doesn't match
- fs_package = (package_id, db_path)
-
- # package is missing from the DB
- channel_package = package_id
-
- if not fs_package:
- nevra = []
- for t in ['name', 'epoch', 'version', 'release', 'arch']:
- nevra.append(package[t])
-
- if package['org_id'] is not None:
- orgid = OPTIONS.orgid or DEFAULT_ORG
- else:
- orgid = package['org_id']
-
- path = self._get_rel_package_path(nevra, orgid, source,
- checksum_type, checksum)
- errcode = self._verify_file(path,
- l_timestamp, package_size, checksum_type, checksum)
- if errcode:
- # file doesn't match
- fs_package = (package_id, path)
+ fs_package = package_id
+ path = db_path
+ else:
+ # upload package and reimport metadata
+ channel_package = package_id
+ fs_package = package_id
+ else:
+ # package is missing from the DB
+ channel_package = package_id
+ fs_package = package_id
if channel_package:
m_channel_packages.append(channel_package)
if fs_package:
- m_fs_packages.append(fs_package)
+ m_fs_packages.append((fs_package, path))
return
def download_rpms(self):
@@ -1849,8 +1837,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
# not in the cache
raise Exception("Package Not Found in Cache, Clear the Cache to \
Regenerate it.")
- # Now set the path
-# FIXME package['path'] = file_path
batch.append(package)
return batch
@@ -1948,12 +1934,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _fetch_packages(self, channel, missing_fs_packages, sources=0):
+ short_package_collection = sync_handlers.ShortPackageCollection()
if sources:
# acronym = "SRPM"
package_collection = sync_handlers.SourcePackageCollection()
else:
# acronym = "RPM"
- package_collection = sync_handlers.ShortPackageCollection()
+ package_collection = sync_handlers.PackageCollection()
self._failed_fs_packages.clear()
self._extinct_packages.clear()
@@ -1962,9 +1949,32 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
cfg = config.initUp2dateConfig()
for package_id, path in missing_fs_packages:
pkg_current = pkg_current + 1
- timestamp = package_collection.get_package_timestamp(package_id)
+ timestamp = short_package_collection.get_package_timestamp(package_id)
package = package_collection.get_package(package_id, timestamp)
+ checksum_type = package['checksum_type']
+ checksum = package['checksum']
+ package_size = package['package_size']
+ if not path:
+ nevra = []
+ for t in ['name', 'epoch', 'version', 'release', 'arch']:
+ nevra.append(package[t])
+ orgid = None
+ if package['org_id']:
+ orgid = OPTIONS.orgid or DEFAULT_ORG
+ path = self._get_rel_package_path(nevra, orgid, sources,
+ checksum_type, checksum)
+
+ # update package path
+ package['path'] = path
+ package_collection.add_package(package)
+
+ errcode = self._verify_file(path, l_timestamp, package_size,
+ checksum_type, checksum)
+ if errcode == 0:
+ # file is already there
+ continue
+
rpmManip = RpmManip(package, path)
nvrea = rpmManip.nvrea()
commit 0d427b6e63adca1d86af75af2522c57c5f85daa4
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 30 15:44:45 2010 +0200
removed unused variable
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 13d26b8..1a2c228 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2149,7 +2149,6 @@ def _validate_package_org(batch):
If custom and package org is not valid default to org 1
"""
orgid = OPTIONS.orgid or None
- orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
for pkg in batch:
if not pkg['org_id'] or pkg['org_id'] == 'None':
# default to Null so do nothing
commit 048ecb8d454a2e1f947d01b012b7f7bbad1a5795
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 30 14:18:54 2010 +0200
straightened logic in _process_package() and _verify_file()
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index e1d5bbb..13d26b8 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -972,105 +972,96 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
source=source, checksum_type=checksum_type, checksum=checksum)
def _verify_file(self, path, mtime, size, checksum_type, checksum):
- """Verifies if the file is on the filesystem and matches the mtime and
- checksum
- Computing the checksum is costly, that's why we rely on mtime
- comparisons.
- Returns a tuple (error_code, ret_path) where:
- if the file has the specified mtime and checksum, error_code is 0
- and ret_path is None
- if the file has the checksum, the function sets mtime, error_code is
- 0 and ret_path is path
- if the file exists but has a different checksum, error_code is the
- file's current checksum and ret_path is path
- if the file does not exist at all, error_code is 1 and ret_path is
- null
- The idea is that error_code is 0 if the file exists or something else
- otherwise
+ """
+ Verifies if the file is on the filesystem and matches the mtime and checksum.
+ Computing the checksum is costly, that's why we rely on mtime comparisons.
+ Returns errcode:
+ 0 - file is ok, it has either the specified mtime and size
+ or checksum matches (then function sets mtime)
+ 1 - file does not exist at all
+ 2 - file has a different checksum
"""
if not path:
- return (1, None)
+ return 1
abs_path = os.path.join(CFG.MOUNT_POINT, path)
try:
stat_info = os.stat(abs_path)
except OSError:
# File is missing completely
- return (1, None)
+ return 1
l_mtime = stat_info[stat.ST_MTIME]
l_size = stat_info[stat.ST_SIZE]
if l_mtime == mtime and l_size == size:
# Same mtime, and size, assume identity
- return (0, None)
+ return 0
# Have to check checksum
l_checksum = getFileChecksum(checksum_type, filename=abs_path)
if l_checksum != checksum:
- # Different checksums
- return (l_checksum, path)
+ return 2
# Set the mtime
os.utime(abs_path, (mtime, mtime))
- return (0, path)
+ return 0
def _process_package(self, package_id, package, l_timestamp, row,
m_channel_packages, m_fs_packages, source=0):
- nevra = []
- for t in ['name', 'epoch', 'version', 'release', 'arch']:
- nevra.append(package[t])
- package_size = package['package_size']
-
- if package['org_id'] is not None:
- orgid = OPTIONS.orgid or DEFAULT_ORG
- else:
- orgid = package['org_id']
-
- if not row:
- # Package is missing completely from the DB
- m_channel_packages.append(package_id)
- #m_fs_packages.append((package_id, path))
- return
+ path = None
+ channel_package = None
+ fs_package = None
+ if row:
+ # package found in the DB
+ checksum_type = row['checksum_type']
+ if checksum_type in package['checksums']:
+ checksum = package['checksums'][row['checksum_type']]
+ package_size = package['package_size']
- # Package found in the DB
- checksum_type = row['checksum_type']
- if checksum_type in package['checksums']:
- checksum = package['checksums'][row['checksum_type']]
-
- db_timestamp = int(rhnLib.timestamp(row['last_modified']))
- db_checksum = row['checksum']
- db_package_size = row['package_size']
- db_path = row['path']
- final_path = db_path
-
- path = self._get_rel_package_path(nevra, orgid, source, checksum_type, checksum)
- # Check the filesystem
- # This is one ugly piece of code
- (errcode, ret_path) = self._verify_file(db_path, l_timestamp,
- package_size, checksum_type, checksum)
- if errcode != 0:
- if errcode != 1 or path == db_path:
- # Package is modified; fix it
- m_fs_packages.append((package_id, path))
- else:
- # Package is missing, and the DB path is, for some
- # reason, not the same as the computed path.
- (errcode, ret_path) = self._verify_file(path,
- l_timestamp, package_size, checksum_type, checksum)
- if errcode != 1:
- # Use the computed path
- final_path = path
- if errcode != 0:
- # file is modified too; re-download
- m_fs_packages.append((package_id, final_path))
-
- if (l_timestamp <= db_timestamp and
- checksum == db_checksum and
- package_size == db_package_size and final_path == db_path):
- # Same package
- return
- # Have to re-import the package - this may be just because the
- # path has changed
- m_channel_packages.append(package_id)
+ db_timestamp = int(rhnLib.timestamp(row['last_modified']))
+ db_checksum = row['checksum']
+ db_package_size = row['package_size']
+ db_path = row['path']
+
+ if not (l_timestamp <= db_timestamp and
+ checksum == db_checksum and
+ package_size == db_package_size):
+ # package doesn't match
+ channel_package = package_id
+
+ if db_path:
+ # check the filesystem
+ errcode = self._verify_file(db_path, l_timestamp,
+ package_size, checksum_type, checksum)
+ if errcode:
+ # file doesn't match
+ fs_package = (package_id, db_path)
+
+ # package is missing from the DB
+ channel_package = package_id
+
+ if not fs_package:
+ nevra = []
+ for t in ['name', 'epoch', 'version', 'release', 'arch']:
+ nevra.append(package[t])
+
+ if package['org_id'] is not None:
+ orgid = OPTIONS.orgid or DEFAULT_ORG
+ else:
+ orgid = package['org_id']
+
+ path = self._get_rel_package_path(nevra, orgid, source,
+ checksum_type, checksum)
+ errcode = self._verify_file(path,
+ l_timestamp, package_size, checksum_type, checksum)
+ if errcode:
+ # file doesn't match
+ fs_package = (package_id, path)
+
+ if channel_package:
+ m_channel_packages.append(channel_package)
+ if fs_package:
+ m_fs_packages.append(fs_package)
+ return
def download_rpms(self):
log(1, ["", "Downloading rpm packages"])
commit 8bc0b88a8528d15ddebdadec0a273a39605390f1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Apr 29 23:20:19 2010 +0200
made _compute_unique_packages() even more simple and straightforward
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index b0bf855..e1d5bbb 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -847,13 +847,10 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
- package_ids = channel_obj['all-packages']
- avail_package_ids = channel_obj['packages']
- if package_ids is None:
- # Not an incremental
- package_ids = avail_package_ids
- self._channel_packages[chn] = set(package_ids or [])
- self._avail_channel_packages[chn] = set(avail_package_ids or [])
+ avail_package_ids = sorted(set(channel_obj['packages'] or []))
+ package_ids = sorted(set(channel_obj['all-packages'] or [])) or avail_package_ids
+ self._channel_packages[chn] = package_ids
+ self._avail_channel_packages[chn] = avail_package_ids
def processShortPackages(self):
log(1, ["", "Retrieving short package metadata (used for indexing)"])
commit 2b8ba63777b4b00e295259139fc8fa71acc66fd2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Apr 29 23:14:30 2010 +0200
moved repeated code into function
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 09ba88d..b0bf855 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -830,17 +830,21 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
except Exception:
None
+ def _get_channel_timestamp(self, channel):
+ try:
+ timestamp = self._channel_collection.get_channel_timestamp(channel)
+ except KeyError:
+ # XXX Do something with this exception
+ raise
+ return timestamp
+
def _compute_unique_packages(self):
""" process package metadata for one channel at a time """
relevant = self._channel_req.get_requested_channels()
self._channel_packages = {}
self._avail_channel_packages = {}
for chn in relevant:
- try:
- timestamp = self._channel_collection.get_channel_timestamp(chn)
- except KeyError:
- # XXX Do something with this exception
- raise
+ timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
package_ids = channel_obj['all-packages']
@@ -1184,11 +1188,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
self._channel_source_packages = {}
self._avail_channel_source_packages = {}
for chn in relevant:
- try:
- timestamp = self._channel_collection.get_channel_timestamp(chn)
- except KeyError:
- # XXX Do something with this exception
- raise
+ timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
sps = set(channel_obj['source_packages'])
@@ -1346,11 +1346,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
self._uq_channel_kickstarts = uq_channel_kickstarts = {}
uq_kickstarts = {}
for chn in relevant:
- try:
- timestamp = self._channel_collection.get_channel_timestamp(chn)
- except KeyError:
- # XXX Do something with this exception
- raise
+ timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
kickstart_trees = channel_obj['kickstartable_trees']
@@ -1376,11 +1372,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
missing_kickstarts = {}
h = rhnSQL.Statement(self._query_get_kickstarts)
for chn in relevant:
- try:
- timestamp = self._channel_collection.get_channel_timestamp(chn)
- except KeyError:
- # XXX Do something with this exception
- raise
+ timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
kickstart_trees = channel_obj['kickstartable_trees']
@@ -1635,11 +1627,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
channel_errata = {}
for chn in relevant:
db_ce = db_channel_errata[chn]
- try:
- timestamp = self._channel_collection.get_channel_timestamp(chn)
- except KeyError:
- # XXX Do something with this exception
- raise
+ timestamp = self._get_channel_timestamp(chn)
channel_obj = self._channel_collection.get_channel(chn, timestamp)
errata_timestamps = channel_obj['errata_timestamps']
commit bd61764a494504c62609a35665d0860f11456140
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Apr 29 16:03:45 2010 +0200
simplified _compute_unique_source_packages()
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 218fff1..09ba88d 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -405,7 +405,6 @@ class Syncer:
self._missing_channel_errata = {}
self._channel_source_packages = {}
- self._uq_channel_source_packages = {}
self._channel_kickstarts = {}
self._uq_channel_kickstarts = {}
@@ -1182,10 +1181,8 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _compute_unique_source_packages(self):
""" process package metadata for one channel at a time"""
relevant = self._channel_req.get_requested_channels()
- self._channel_source_packages = channel_sp = {}
- self._avail_channel_source_packages = avail_channel_source_packages = {}
- self._uq_channel_source_packages = uq_sp = {}
- uq = {}
+ self._channel_source_packages = {}
+ self._avail_channel_source_packages = {}
for chn in relevant:
try:
timestamp = self._channel_collection.get_channel_timestamp(chn)
@@ -1194,7 +1191,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
raise
channel_obj = self._channel_collection.get_channel(chn, timestamp)
- sps = channel_obj['source_packages']
+ sps = set(channel_obj['source_packages'])
if not sps:
# No source package info
continue
@@ -1207,29 +1204,15 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
ret_sps.append((sp['id'], sp['last_modified']))
del sps
ret_sps.sort()
- channel_sp[chn] = ret_sps
-
- avail_channel_source_packages[chn] = ret_sps
-
- # Uniquify source packages
- for channel_label, sps in channel_sp.items():
- ch_sp_ids = uq_sp[channel_label] = []
- for sp_id, timestamp in sps:
- if uq.has_key(sp_id):
- # Saw this source package already
- continue
- ch_sp_ids.append((sp_id, timestamp))
- uq[sp_id] = None
- # Be nice enough to sort the list
- ch_sp_ids.sort()
- del uq
+ self._channel_source_packages[chn] = ret_sps
+ self._avail_channel_source_packages[chn] = ret_sps
def _compute_not_cached_source_packages(self):
missing_sps = {}
# First, determine what has to be downloaded
sp_collection = sync_handlers.SourcePackageCollection()
- for channel, sps in self._uq_channel_source_packages.items():
+ for channel, sps in self._channel_source_packages.items():
missing_sps[channel] = mp = []
if not sps:
@@ -1263,7 +1246,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
missing_channel_source_packages = {}
missing_fs_source_packages = {}
- for channel_label, upids in self._uq_channel_source_packages.items():
+ for channel_label, upids in self._channel_source_packages.items():
log(1, "Diffing source package metadata (what's missing locally?): %s" % channel_label)
m_channel_source_packages = missing_channel_source_packages[channel_label] = []
m_fs_source_packages = missing_fs_source_packages[channel_label] = []
commit 7e775347bf70ee73ba5e69d21e772dc90c4c8f36
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Apr 29 15:31:30 2010 +0200
modified rhn-package-file to import new checksum correctly
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index d6d6546..a82d9cb 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -483,6 +483,11 @@ class BaseChecksummedItem(BaseItem):
for csum in item['checksum_list']:
item['checksums'][csum['type']] = csum['value']
del(item['checksum_list'])
+ for ctype in CFG.CHECKSUM_PRIORITY_LIST:
+ if ctype in item['checksums']:
+ item['checksum_type'] = ctype
+ item['checksum'] = item['checksums'][ctype]
+ break
return item
addItem(BaseChecksummedItem)
@@ -551,14 +556,9 @@ class PackageItem(IncompletePackageItem):
item = IncompletePackageItem.populate(self, attributes, elements)
# find out "primary" checksum
have_filedigests = len([1 for i in item['requires'] if i['name'] == 'rpmlib(FileDigests)'])
- if have_filedigests:
- for ctype in CFG.CHECKSUM_PRIORITY_LIST:
- if ctype in item['checksums']:
- item['checksum_type'] = ctype
- break
- else:
+ if not have_filedigests:
item['checksum_type'] = 'md5'
- item['checksum'] = item['checksums'][item['checksum_type']]
+ item['checksum'] = item['checksums']['md5']
return item
addItem(PackageItem)
@@ -632,16 +632,11 @@ addItem(ObsoletesItem)
class FileItem(BaseChecksummedItem):
item_name = 'rhn-package-file'
item_class = importLib.File
- tagMap = {
- 'md5' : 'md5sum',
- 'checksum-type': 'checksum_type',
- 'checksum' : 'checksum',
- }
def populate(self, attributes, elements):
+ if 'md5' in attributes:
+ attributes['checksum_type'] = 'md5'
+ attributes['checksum'] = attributes['md5']
item = BaseChecksummedItem.populate(self, attributes, elements)
- if not item['checksum_type']:
- item['checksum_type'] = item['checksums'].keys()[0]
- item['checksum'] = item['checksums'][item['checksum_type']]
return item
addItem(FileItem)
@@ -769,7 +764,6 @@ class KickstartFileItem(BaseChecksummedItem):
'relative-path' : 'relative_path',
'file-size' : 'file_size',
'last-modified' : 'last_modified',
- 'checksum-type' : 'checksum_type',
}
addItem(KickstartFileItem)
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index 29dfabc..4fc23a2 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -239,10 +239,8 @@ class File(Item):
'flags' : IntType,
'verifyflags' : IntType,
'lang' : StringType,
- # those attributes are mutualy exclusive
- 'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
+ 'checksum' : StringType,
+ 'checksum_type' : StringType,
}
def __init__(self):
Item.__init__(self, self.attributeTypes)
commit 6dac065ac479e58d450de49938008ff94db77422
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Apr 29 11:10:26 2010 +0200
made checksum priority list configurable
diff --git a/backend/rhn-conf/rhn_server.conf b/backend/rhn-conf/rhn_server.conf
index 8a5c3fa..c6808fa 100644
--- a/backend/rhn-conf/rhn_server.conf
+++ b/backend/rhn-conf/rhn_server.conf
@@ -131,3 +131,5 @@ repomd_path_prefix = rhn/repodata
# Default to not using taskomatic for repomd
use_taskomatic_repomd = 1
+# list of checksum types, most prefered first
+checksum_priority_list = sha512, sha384, sha256, sha1, md5
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 020224e..d6d6546 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -22,7 +22,7 @@ import string
from xml.sax import make_parser, SAXParseException, ContentHandler, \
ErrorHandler
-from common import log_debug, Traceback, rhnFlags
+from common import log_debug, Traceback, rhnFlags, CFG
from server.importlib import importLib, backendLib
@@ -552,7 +552,7 @@ class PackageItem(IncompletePackageItem):
# find out "primary" checksum
have_filedigests = len([1 for i in item['requires'] if i['name'] == 'rpmlib(FileDigests)'])
if have_filedigests:
- for ctype in ['sha512','sha384','sha256','sha1','md5']:
+ for ctype in CFG.CHECKSUM_PRIORITY_LIST:
if ctype in item['checksums']:
item['checksum_type'] = ctype
break
commit 96d243d2e98381c5faab066c48f1540cf936c3a7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Apr 28 17:13:43 2010 +0200
ShortPackageCollection doesn't have enough information about checksum
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 722b142..218fff1 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1839,11 +1839,12 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _link_channel_packages(self):
log(1, ["", messages.link_channel_packages])
short_package_collection = sync_handlers.ShortPackageCollection()
+ package_collection = sync_handlers.PackageCollection()
uq_packages = {}
for chn, package_ids in self._channel_packages.items():
for pid in package_ids:
timestamp = short_package_collection.get_package_timestamp(pid)
- package = short_package_collection.get_package(pid, timestamp)
+ package = package_collection.get_package(pid, timestamp)
assert package is not None
channel_obj = {'label' : chn}
if uq_packages.has_key(pid):
commit a47dbb4789ac898cba72e47401b6c0abf9867dc6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Apr 28 16:33:03 2010 +0200
removed unused code and its comment
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index b3a8c64..722b142 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1839,8 +1839,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _link_channel_packages(self):
log(1, ["", messages.link_channel_packages])
short_package_collection = sync_handlers.ShortPackageCollection()
- # XXX: don't use this next line for anything. Why is it here?
- #relevant = self._channel_req.get_requested_channels()
uq_packages = {}
for chn, package_ids in self._channel_packages.items():
for pid in package_ids:
commit 587c345ae82b1fc0cd5cba946132577355d7db19
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Apr 27 16:45:58 2010 +0200
removed _ChecksumEntryDumper(): can be simply rewriten via EmptyDumper()
diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py
index 6c68926..4b290c6 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -838,19 +838,12 @@ class _ChecksumDumper(BaseDumper):
tag_name = 'checksums'
def dump_subelement(self, data):
- c = _ChecksumEntryDumper(self._writer, data)
+ c = EmptyDumper(self._writer, 'checksum', attributes={
+ 'type' : data['type'],
+ 'value': data['value'],
+ })
c.dump()
-class _ChecksumEntryDumper(BaseRowDumper):
- tag_name = 'checksum'
-
- def set_attributes(self):
- attrs = ['type', 'value']
- attrdict = {}
- for attr in attrs:
- attrdict[attr] = self._row[attr]
- return attrdict
-
##
class _ChangelogDumper(BaseDumper):
tag_name = 'rhn-package-changelog'
commit ae9705bfdb895160fb6d9ff0cb236b9f1a8b1b54
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 15:12:34 2010 +0200
let the comment make sense
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 953b222..b3a8c64 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2323,7 +2323,7 @@ def processCommandline():
global OPTIONS
OPTIONS, args = optionParser.parse_args()
- # we take no extra commandline arguments that are not linked to an option
+ # we take extra commandline arguments that are not linked to an option
if args:
msg = "ERROR: these arguments make no sense in this context (try --help): %s" % repr(args)
log2stderr(-1, msg, 1,1)
commit cd53bea124d3749f8e6a2c8e31f57caf839b000d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 15:00:21 2010 +0200
removed an extra condition
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 8004e4a..953b222 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -660,10 +660,12 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
dataServer.setChannel(c)
stream = dataServer.load()
h.process(stream)
+ doEOSYN=0
else:
dataServer = self.xmlWireServer.getChannelXmlStream
stream = dataServer([])
h.process(stream)
+ doEOSYN=1
h.close()
@@ -676,10 +678,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
#satellite-sync is running with the --mount-point (-m) option. If it
#did, it would incorrectly list channels as end-of-service if they had been
#synced already but aren't in the channel dump.
- if self.mountpoint:
- self._printChannelTree(doEOSYN=0)
- else:
- self._printChannelTree(doEOSYN=1)
+ self._printChannelTree(doEOSYN=doEOSYN)
if self.listChannelsYN:
# We're done here
commit f436d8bfe8d25aa13796a097de349de9ce88afd5
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 14:53:08 2010 +0200
removed an extra condition and made code slightly readable
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 7785a51..8004e4a 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -422,16 +422,17 @@ class Syncer:
self.xmlWireServer = xmlWireSource.MetadataWireSource(self.systemid,
self.sslYN, self.xml_dump_version)
if CFG.ISS_PARENT:
- url = self.xmlWireServer.schemeAndUrl(CFG.ISS_PARENT)
+ sync_parent = CFG.ISS_PARENT
+ is_iss = 1
else:
- url = self.xmlWireServer.schemeAndUrl(CFG.RHN_PARENT)
+ sync_parent = CFG.RHN_PARENT
+ is_iss = 0
+
+ url = self.xmlWireServer.schemeAndUrl(sync_parent)
log(1, ['Red Hat Network Satellite - live synchronization',
' url: %s' % url,
' debug/output level: %s' % CFG.DEBUG])
- if CFG.ISS_PARENT:
- self.xmlWireServer.setServerHandler(isIss=1)
- else:
- self.xmlWireServer.setServerHandler()
+ self.xmlWireServer.setServerHandler(isIss=is_iss)
if not self.mountpoint:
# check and fetch systemid (NOTE: systemid kept in memory... may or may not
commit f0ae657e1cac57136d7fdaa12bcc459ae6eb2c1b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 14:31:57 2010 +0200
package metadata have to go before rpms now
(we need whether package is md5 or sha256)
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 4ff9548..7785a51 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -103,13 +103,13 @@ class Runner:
'channels',
'blacklists',
'short',
+ 'download-packages',
+ 'packages',
'rpms',
'srpms',
- 'download-packages',
'download-source-packages',
'download-errata',
'download-kickstarts',
- 'packages',
'source-packages',
'errata',
'kickstarts',
commit e94ebbd78cf08b7dadadce51c3cc866ac4aa7a4c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 14:29:19 2010 +0200
check whether database contains one of the checksums we got from dump
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index fefbabe..4ff9548 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1033,39 +1033,41 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
# Package found in the DB
checksum_type = row['checksum_type']
- checksum = package['checksum']
- db_timestamp = int(rhnLib.timestamp(row['last_modified']))
- db_checksum = row['checksum']
- db_package_size = row['package_size']
- db_path = row['path']
- final_path = db_path
-
- path = self._get_rel_package_path(nevra, orgid, source, checksum_type, checksum)
- # Check the filesystem
- # This is one ugly piece of code
- (errcode, ret_path) = self._verify_file(db_path, l_timestamp,
- package_size, checksum_type, checksum)
- if errcode != 0:
- if errcode != 1 or path == db_path:
- # Package is modified; fix it
- m_fs_packages.append((package_id, path))
- else:
- # Package is missing, and the DB path is, for some
- # reason, not the same as the computed path.
- (errcode, ret_path) = self._verify_file(path,
- l_timestamp, package_size, checksum_type, checksum)
- if errcode != 1:
- # Use the computed path
- final_path = path
- if errcode != 0:
- # file is modified too; re-download
- m_fs_packages.append((package_id, final_path))
-
- if (l_timestamp <= db_timestamp and
- checksum == db_checksum and
- package_size == db_package_size and final_path == db_path):
- # Same package
- return
+ if checksum_type in package['checksums']:
+ checksum = package['checksums'][row['checksum_type']]
+
+ db_timestamp = int(rhnLib.timestamp(row['last_modified']))
+ db_checksum = row['checksum']
+ db_package_size = row['package_size']
+ db_path = row['path']
+ final_path = db_path
+
+ path = self._get_rel_package_path(nevra, orgid, source, checksum_type, checksum)
+ # Check the filesystem
+ # This is one ugly piece of code
+ (errcode, ret_path) = self._verify_file(db_path, l_timestamp,
+ package_size, checksum_type, checksum)
+ if errcode != 0:
+ if errcode != 1 or path == db_path:
+ # Package is modified; fix it
+ m_fs_packages.append((package_id, path))
+ else:
+ # Package is missing, and the DB path is, for some
+ # reason, not the same as the computed path.
+ (errcode, ret_path) = self._verify_file(path,
+ l_timestamp, package_size, checksum_type, checksum)
+ if errcode != 1:
+ # Use the computed path
+ final_path = path
+ if errcode != 0:
+ # file is modified too; re-download
+ m_fs_packages.append((package_id, final_path))
+
+ if (l_timestamp <= db_timestamp and
+ checksum == db_checksum and
+ package_size == db_package_size and final_path == db_path):
+ # Same package
+ return
# Have to re-import the package - this may be just because the
# path has changed
m_channel_packages.append(package_id)
commit e59e8f13eb3d2d3d5a8baa3f4790a94fcaa8ebfd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 14:17:07 2010 +0200
path may be None if package has been synced with --no-rpms
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index c437cc5..fefbabe 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -988,6 +988,8 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
The idea is that error_code is 0 if the file exists or something else
otherwise
"""
+ if not path:
+ return (1, None)
abs_path = os.path.join(CFG.MOUNT_POINT, path)
try:
stat_info = os.stat(abs_path)
commit 4bb4793ca32abac24afa658181c9fd01dea0e9cc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Apr 26 12:16:49 2010 +0200
choose primary checksum according to rpm capability
fix rpm-package-file's checksum
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index a96dab4..020224e 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -547,6 +547,19 @@ class PackageItem(IncompletePackageItem):
'rhn-package-changelog' : 'changelog',
}
tagMap.update(IncompletePackageItem.tagMap)
+ def populate(self, attributes, elements):
+ item = IncompletePackageItem.populate(self, attributes, elements)
+ # find out "primary" checksum
+ have_filedigests = len([1 for i in item['requires'] if i['name'] == 'rpmlib(FileDigests)'])
+ if have_filedigests:
+ for ctype in ['sha512','sha384','sha256','sha1','md5']:
+ if ctype in item['checksums']:
+ item['checksum_type'] = ctype
+ break
+ else:
+ item['checksum_type'] = 'md5'
+ item['checksum'] = item['checksums'][item['checksum_type']]
+ return item
addItem(PackageItem)
class IncompleteSourcePackageItem(BaseItem):
@@ -621,7 +634,15 @@ class FileItem(BaseChecksummedItem):
item_class = importLib.File
tagMap = {
'md5' : 'md5sum',
+ 'checksum-type': 'checksum_type',
+ 'checksum' : 'checksum',
}
+ def populate(self, attributes, elements):
+ item = BaseChecksummedItem.populate(self, attributes, elements)
+ if not item['checksum_type']:
+ item['checksum_type'] = item['checksums'].keys()[0]
+ item['checksum'] = item['checksums'][item['checksum_type']]
+ return item
addItem(FileItem)
class DistItem(BaseItem):
commit 39635cb117feda28e062fe09ccfe563fe5c9e555
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 23 11:21:51 2010 +0200
path has been removed from the collection
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 67c4a3c..c437cc5 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1880,7 +1880,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
else:
package_collection = sync_handlers.PackageCollection()
batch = []
- for pid, file_path in chunk:
+ for pid in chunk:
timestamp = short_package_collection.get_package_timestamp(pid)
package = package_collection.get_package(pid, timestamp)
if package is None:
@@ -1888,7 +1888,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
raise Exception("Package Not Found in Cache, Clear the Cache to \
Regenerate it.")
# Now set the path
- package['path'] = file_path
+# FIXME package['path'] = file_path
batch.append(package)
return batch
commit ac116e50ced003ff24e05ec51632ce84af08a6ab
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 23 11:18:53 2010 +0200
fixed variables changed in b2b2398f7b78938841a2e9c67164dd3780f4516d
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 3f474ae..67c4a3c 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -849,8 +849,8 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
if package_ids is None:
# Not an incremental
package_ids = avail_package_ids
- channel_packages[chn] = set(package_ids or [])
- avail_channel_packages[chn] = set(avail_package_ids or [])
+ self._channel_packages[chn] = set(package_ids or [])
+ self._avail_channel_packages[chn] = set(avail_package_ids or [])
def processShortPackages(self):
log(1, ["", "Retrieving short package metadata (used for indexing)"])
commit bea4a180f0220a75e065dc2141de5fa214e6906d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 23 11:10:59 2010 +0200
fixed typo
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 83faa81..3f474ae 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -935,7 +935,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
apply(h.execute, (), nevra)
row = None
- for r in (h.fetchall_dict() or []):
+ for r in (h.fetchall_dict() or []):
# let's check which checksum we have in database
if package['checksums'][r['checksum_type']] == r['checksum']:
row = r
commit 503e6a858b5d6ada430a654307b04796e971f095
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 23 10:58:51 2010 +0200
modified rhn-package, rhn-erratum-file and rhn-kickstart-file to import checksum element
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index fc5c597..29dfabc 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -349,13 +349,8 @@ class Package(IncompletePackage):
'header_start' : IntType,
'header_end' : IntType,
'path' : StringType,
- # these attributes are mutualy exclusive
'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
- 'sigmd5' : StringType, # xml dumps < 3.5 and rpms
- 'sigchecksum_type' : StringType, # xml dumps >= 3.5
- 'sigchecksum' : StringType, # xml dumps >= 3.5
+ 'sigmd5' : StringType,
# These attributes are lists of objects
'files' : [File],
'requires' : [Dependency],
@@ -364,6 +359,7 @@ class Package(IncompletePackage):
'obsoletes' : [Dependency],
'changelog' : [ChangeLog],
'channels' : [StringType],
+ 'checksum_list' : [Checksum],
}
def __init__(self):
# Inherit from IncompletePackage
@@ -389,11 +385,8 @@ class SourcePackage(IncompletePackage):
'last_modified' : DateType,
# these attributes are mutualy exclusive
'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
'sigmd5' : StringType, # xml dumps < 3.5 and rpms
- 'sigchecksum_type' : StringType, # xml dumps >= 3.5
- 'sigchecksum' : StringType, # xml dumps >= 3.5
+ 'checksum_list' : [Checksum],
}
def __init__(self):
# Inherit from IncompletePackage
@@ -414,8 +407,7 @@ class SourcePackageFile(Information):
'org_id' : IntType,
# these attributes are mutualy exclusive
'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
+ 'checksum_list' : [Checksum],
}
@@ -434,8 +426,7 @@ class ErrataFile(Information):
'package_id' : IntType,
# these attributes are mutualy exclusive
'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
+ 'checksum_list' : [Checksum],
}
@@ -544,10 +535,8 @@ class KickstartFile(Information):
'relative_path' : StringType,
'last_modified' : DateType,
'file_size' : IntType,
- # these attributes are mutualy exclusive
'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
+ 'checksum_list' : [Checksum],
}
class KickstartableTree(Information):
commit 0a3d13f3b3771c6593a3256f2d620e3584c0867a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Apr 23 10:21:41 2010 +0200
check if any of checksums we got matches to checksum of the package we have
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index a4c616e..83faa81 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -893,14 +893,11 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
and (p.org_id = :org_id or
(p.org_id is null and :org_id is null))
and p.checksum_id = c.id
- and c.checksum = :checksum
- and c.checksum_type = :checksum_type
"""
# XXX the "is null" condition will have to change in multiorg satellites
def _diff_packages(self):
package_collection = sync_handlers.ShortPackageCollection()
- nvrea_keys = ['name', 'epoch', 'version', \
- 'release', 'arch', 'checksum', 'checksum_type']
+ nvrea_keys = ['name', 'epoch', 'version', 'release', 'arch']
h = rhnSQL.prepare(self._query_compare_packages)
missing_channel_packages = {}
@@ -937,7 +934,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
nevra['org_id'] = package['org_id']
apply(h.execute, (), nevra)
- row = h.fetchone_dict()
+ row = None
+ for r in (h.fetchall_dict() or []):
+ # let's check which checksum we have in database
+ if package['checksums'][r['checksum_type']] == r['checksum']:
+ row = r
+ break
+
# Update the progress bar
pb.addTo(1)
pb.printIncrement()
@@ -955,8 +958,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
In an incremental approach, one may request packages that are actually
not available in the current dump, probably because of applying an
incremental to the wrong base"""
- for channel_label, objs in missing_channel_packages.items():
- pids = map(lambda x: x[0], objs)
+ for channel_label, pids in missing_channel_packages.items():
if sources:
avail_pids = map(lambda x: x[0], self._avail_channel_source_packages[channel_label])
else:
@@ -1014,8 +1016,6 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
nevra = []
for t in ['name', 'epoch', 'version', 'release', 'arch']:
nevra.append(package[t])
- checksum_type = package['checksum_type']
- checksum = package['checksum']
package_size = package['package_size']
if package['org_id'] is not None:
@@ -1023,27 +1023,22 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
else:
orgid = package['org_id']
- path = self._get_rel_package_path(nevra, orgid, source, checksum_type, checksum)
if not row:
# Package is missing completely from the DB
- m_channel_packages.append((package_id, path))
- (errcode, ret_path) = self._verify_file(path,
- l_timestamp, package_size, checksum_type, checksum)
- if errcode == 0:
- # Package on the filesystem, and matches
- return
- # we have to update this rpm
- m_fs_packages.append((package_id, path))
+ m_channel_packages.append(package_id)
+ #m_fs_packages.append((package_id, path))
return
# Package found in the DB
+ checksum_type = row['checksum_type']
+ checksum = package['checksum']
db_timestamp = int(rhnLib.timestamp(row['last_modified']))
- db_checksum_type = row['checksum_type']
db_checksum = row['checksum']
db_package_size = row['package_size']
db_path = row['path']
final_path = db_path
+ path = self._get_rel_package_path(nevra, orgid, source, checksum_type, checksum)
# Check the filesystem
# This is one ugly piece of code
(errcode, ret_path) = self._verify_file(db_path, l_timestamp,
@@ -1065,13 +1060,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
m_fs_packages.append((package_id, final_path))
if (l_timestamp <= db_timestamp and
- checksum_type == db_checksum_type and checksum == db_checksum and
+ checksum == db_checksum and
package_size == db_package_size and final_path == db_path):
# Same package
return
# Have to re-import the package - this may be just because the
# path has changed
- m_channel_packages.append((package_id, final_path))
+ m_channel_packages.append(package_id)
def download_rpms(self):
log(1, ["", "Downloading rpm packages"])
@@ -1103,7 +1098,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
# Nothing to see here
continue
- for (pid, path) in pids:
+ for pid in pids:
# XXX Catch errors
timestamp = short_package_collection.get_package_timestamp(pid)
if not package_collection.has_package(pid, timestamp):
commit ab6f2343ee881d88e15c2b26a6be7b7e8dc962bb
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Apr 21 15:49:24 2010 +0200
modified importer to read new checksum element from dump
<rhn-package-short md5sum="ba311903b5549a2ed382ea463f6" ... >
<checksums>
<checksum type="md5" value="ba311903b5549a2ed382ea463f6"/>
<checksum type="sha256" value="1908d9bfd416739c34cae407b03b9ee046084a9dfd858103b0bf79dd8dcb9129"/>
</checksums>
</rhn-package-short>
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 13ae0ad..a96dab4 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -474,12 +474,15 @@ addItem(ChannelItem)
class BaseChecksummedItem(BaseItem):
def populate(self, attributes, elements):
item = BaseItem.populate(self, attributes, elements)
+ item['checksums'] = {}
if 'md5sum' in item:
- if type(item['checksum']) != types.StringType:
- # xml dumps < 3.5 (aka pre-sha256)
- item['checksum_type'] = 'md5'
- item['checksum'] = item['md5sum']
+ # xml dumps < 3.6 (aka pre-sha256)
+ item['checksums']['md5'] = item['md5sum']
del(item['md5sum'])
+ if 'checksum_list' in item and item['checksum_list']:
+ for csum in item['checksum_list']:
+ item['checksums'][csum['type']] = csum['value']
+ del(item['checksum_list'])
return item
addItem(BaseChecksummedItem)
@@ -492,10 +495,20 @@ class IncompletePackageItem(BaseChecksummedItem):
'last-modified' : 'last_modified',
'package-arch' : 'arch',
'org-id' : 'org_id',
- 'checksum-type' : 'checksum_type', # xml dump 3.5 (sha256)
+ 'checksums' : 'checksum_list',
}
addItem(IncompletePackageItem)
+class ChecksumItem(BaseItem):
+ item_name = 'checksum'
+ item_class = importLib.Checksum
+ tagMap = {
+ 'checksum-type' : 'type',
+ 'checksum-value' : 'value',
+ }
+addItem(ChecksumItem)
+
+
class PackageItem(IncompletePackageItem):
item_name = 'rhn-package'
item_class = importLib.Package
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index c0b2b64..fc5c597 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -268,6 +268,15 @@ class ChangeLog(Item):
Item.__init__(self, self.attributeTypes)
+class Checksum(Item):
+ attributeTypes = {
+ 'type' : StringType,
+ 'value' : StringType,
+ }
+ def __init__(self):
+ Item.__init__(self, self.attributeTypes)
+
+
class IncompletePackage(BaseInformation):
attributeTypes = {
'package_id' : StringType, # RH db id
@@ -279,12 +288,10 @@ class IncompletePackage(BaseInformation):
'org_id' : IntType,
'package_size' : IntType,
'last_modified' : DateType,
- # those attributes are mutualy exclusive
'md5sum' : StringType, # xml dumps < 3.5
- 'checksum' : StringType, # xml dumps >= 3.5
- 'checksum_type' : StringType, # xml dumps >= 3.5
# These attributes are lists of objects
'channels' : [StringType],
+ 'checksum_list' : [Checksum],
}
def __init__(self):
BaseInformation.__init__(self, IncompletePackage.attributeTypes)
commit bae794c9d7f815b1db0569a381778379fd1a4253
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Apr 21 10:46:28 2010 +0200
changed class and procedure comments to docstrings
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 02522a5..a4c616e 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -259,7 +259,7 @@ class Runner:
def _run_syncer_step(self, function, step_name):
- # Runs a function, and catches the most common error cases
+ """ Runs a function, and catches the most common error cases """
try:
ret = function()
except (xmlDiskSource.MissingXmlDiskSourceDirError,
@@ -344,7 +344,7 @@ class Runner:
self.syncer.import_kickstarts()
def sendMail(forceEmail=0):
- ### Send email summary
+ """ Send email summary """
if forceEmail or (OPTIONS is not None and OPTIONS.email):
body = dumpEMAIL_LOG()
if body:
@@ -411,7 +411,7 @@ class Syncer:
self._uq_channel_kickstarts = {}
def initialize(self):
- "Initialization that requires IO, etc."
+ """Initialization that requires IO, etc."""
# Sync from filesystem:
if self.mountpoint:
@@ -542,8 +542,9 @@ class Syncer:
return self._process_cert(cert)
def _process_cert(self, cert, store_cert=1):
- # Give the cert a check - if it's broken xml we'd better find it out
- # now
+ """Give the cert a check - if it's broken xml we'd better find it out
+ now
+ """
log2(1, 4, " - parsing for sanity")
sat_cert = satellite_cert.SatelliteCert()
try:
@@ -642,8 +643,9 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
self._set_comps_for_channel(backend, data[label]['id'], comps_path, timestamp)
def process_channels(self):
- # push channels, channel-family and dist. map information
- # as well upon parsing.
+ """ push channels, channel-family and dist. map information
+ as well upon parsing.
+ """
log(1, ["", "Retrieving / parsing channel data"])
h = sync_handlers.get_channel_handler()
@@ -830,7 +832,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
None
def _compute_unique_packages(self):
- ### process package metadata for one channel at a time
+ """ process package metadata for one channel at a time """
relevant = self._channel_req.get_requested_channels()
self._channel_packages = {}
self._avail_channel_packages = {}
@@ -1179,7 +1181,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
log(1, "Processing srpm packages complete")
def _compute_unique_source_packages(self):
- ### process package metadata for one channel at a time
+ """ process package metadata for one channel at a time"""
relevant = self._channel_req.get_requested_channels()
self._channel_source_packages = channel_sp = {}
self._avail_channel_source_packages = avail_channel_source_packages = {}
@@ -1356,7 +1358,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
raise ReprocessingNeeded
def _compute_unique_kickstarts(self):
- ### process package metadata for one channel at a time
+ """ process package metadata for one channel at a time"""
relevant = self._channel_req.get_requested_channels()
self._channel_kickstarts = channel_kickstarts = {}
self._uq_channel_kickstarts = uq_channel_kickstarts = {}
@@ -1386,7 +1388,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
""")
def _compute_missing_kickstarts(self):
- ### process package metadata for one channel at a time
+ """ process package metadata for one channel at a time"""
relevant = self._channel_req.get_requested_channels()
coll = sync_handlers.KickstartableTreesCollection()
missing_kickstarts = {}
@@ -1642,7 +1644,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
return db_channel_errata
def _diff_errata(self):
- # Fetch the errata for this channel
+ """ Fetch the errata for this channel"""
db_channel_errata = self._get_db_channel_errata()
relevant = self._channel_req.get_requested_channels()
@@ -1697,9 +1699,10 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
del uq_errata
def _diff_db_errata(self):
- # Compute errata that are missing from the satellite
- # Kind of similar to diff_errata, if we had the timestamp and advisory
- # information available
+ """ Compute errata that are missing from the satellite
+ Kind of similar to diff_errata, if we had the timestamp and advisory
+ information available
+ """
errata_collection = sync_handlers.ErrataCollection()
self._missing_channel_errata = missing_channel_errata = {}
db_channel_errata = self._get_db_channel_errata()
@@ -1873,7 +1876,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
return importer.affected_channels
def _get_cached_package_batch(self, chunk, sources=0):
- # short-circuit the most common case
+ """ short-circuit the most common case"""
if not chunk:
return []
short_package_collection = sync_handlers.ShortPackageCollection()
@@ -1931,7 +1934,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
pb.printComplete()
def _fix_erratum(self, erratum):
- # Replace the list of packages with references to short packages
+ """ Replace the list of packages with references to short packages"""
sp_coll = sync_handlers.ShortPackageCollection()
pids = unique(erratum['packages'])
# map all the pkgs objects to the erratum
commit 164fad7cad3098ddf3413afe3111fd1b1c0532d7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Apr 21 10:38:20 2010 +0200
made _compute_unique_packages() simple and straightforward
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 9a5a65d..02522a5 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -393,7 +393,6 @@ class Syncer:
self.systemid = None
self._channel_packages = {}
- self._uq_channel_packages = {}
self._avail_channel_packages = {}
self._missing_channel_packages = None
@@ -833,10 +832,8 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def _compute_unique_packages(self):
### process package metadata for one channel at a time
relevant = self._channel_req.get_requested_channels()
- self._channel_packages = channel_packages = {}
- self._avail_channel_packages = avail_channel_packages = {}
- uq_package_ids = {}
- self._uq_channel_packages = uq_channel_packages = {}
+ self._channel_packages = {}
+ self._avail_channel_packages = {}
for chn in relevant:
try:
timestamp = self._channel_collection.get_channel_timestamp(chn)
@@ -850,27 +847,13 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
if package_ids is None:
# Not an incremental
package_ids = avail_package_ids
- channel_packages[chn] = package_ids
- avail_channel_packages[chn] = avail_package_ids
-
- # Uniquify the packages
- for channel_label, package_ids in channel_packages.items():
- ch_package_ids = uq_channel_packages[channel_label] = []
- for pid in package_ids:
- if uq_package_ids.has_key(pid):
- # Saw this package already
- continue
- ch_package_ids.append(pid)
- uq_package_ids[pid] = None
- # Be nice enough to sort the list
- ch_package_ids.sort()
- del uq_package_ids
+ channel_packages[chn] = set(package_ids or [])
+ avail_channel_packages[chn] = set(avail_package_ids or [])
def processShortPackages(self):
log(1, ["", "Retrieving short package metadata (used for indexing)"])
- # Compute the unique packages and populate self._channel_packages and
- # self._uq_channel_packages
+ # Compute the unique packages and populate self._channel_packages
self._compute_unique_packages()
h = sync_handlers.get_short_package_handler()
@@ -921,7 +904,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
missing_channel_packages = {}
missing_fs_packages = {}
- for channel_label, upids in self._uq_channel_packages.items():
+ for channel_label, upids in self._channel_packages.items():
log(1, "Diffing package metadata (what's missing locally?): %s" %
channel_label)
m_channel_packages = missing_channel_packages[channel_label] = []
13 years, 12 months
web/conf
by Jan Pazdziora
web/conf/rhn_web.conf | 2 --
1 file changed, 2 deletions(-)
New commits:
commit 557446234d37a16a25c4020fa2bc732f9590e093
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 13:25:51 2010 +0200
Setting server.nls_lang once, later in this file, should be enough.
diff --git a/web/conf/rhn_web.conf b/web/conf/rhn_web.conf
index 6e63fea..4e94b63 100644
--- a/web/conf/rhn_web.conf
+++ b/web/conf/rhn_web.conf
@@ -10,8 +10,6 @@ web.base_acls = RHN::Access
web.base_domain =
web.base_port =
-server.nls_lang=english.utf8
-
# Limit the size of POST data (in bytes)
web.post_max = 512000
13 years, 12 months
web/conf
by Miroslav Suchý
web/conf/proxy/httpd.conf | 1201 ----------------------------------------------
web/conf/proxy/local.conf | 6
web/conf/proxy/proxy.conf | 8
3 files changed, 1215 deletions(-)
New commits:
commit 577d64981ff98f2de6cddff9d7377890756d1e3e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue May 4 13:23:19 2010 +0200
code cleanup - this configuration files are not used in proxy
diff --git a/web/conf/proxy/httpd.conf b/web/conf/proxy/httpd.conf
deleted file mode 100644
index 63c7843..0000000
--- a/web/conf/proxy/httpd.conf
+++ /dev/null
@@ -1,1201 +0,0 @@
-##
-## httpd.conf -- Apache HTTP server configuration file
-##
-
-#
-# Based upon the NCSA server configuration files originally by Rob McCool.
-#
-# This is the main Apache server configuration file. It contains the
-# configuration directives that give the server its instructions.
-# See <URL:http://www.apache.org/docs/> for detailed information about
-# the directives.
-#
-# Do NOT simply read the instructions in here without understanding
-# what they do. They're here only as hints or reminders. If you are unsure
-# consult the online docs. You have been warned.
-#
-# After this file is processed, the server will look for and process
-# /usr/conf/srm.conf and then /usr/conf/access.conf
-# unless you have overridden these with ResourceConfig and/or
-# AccessConfig directives here.
-#
-# The configuration directives are grouped into three basic sections:
-# 1. Directives that control the operation of the Apache server process as a
-# whole (the 'global environment').
-# 2. Directives that define the parameters of the 'main' or 'default' server,
-# which responds to requests that aren't handled by a virtual host.
-# These directives also provide default values for the settings
-# of all virtual hosts.
-# 3. Settings for virtual hosts, which allow Web requests to be sent to
-# different IP addresses or hostnames and have them handled by the
-# same Apache server process.
-#
-# Configuration and logfile names: If the filenames you specify for many
-# of the server's control files begin with "/" (or "drive:/" for Win32), the
-# server will use that explicit path. If the filenames do *not* begin
-# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
-# with ServerRoot set to "/usr/local/apache" will be interpreted by the
-# server as "/usr/local/apache/logs/foo.log".
-#
-
-### Section 1: Global Environment
-#
-# The directives in this section affect the overall operation of Apache,
-# such as the number of concurrent requests it can handle or where it
-# can find its configuration files.
-#
-
-#
-# ServerType is either inetd, or standalone. Inetd mode is only supported on
-# Unix platforms.
-#
-ServerType standalone
-
-#
-# ServerRoot: The top of the directory tree under which the server's
-# configuration, error, and log files are kept.
-#
-# NOTE! If you intend to place this on an NFS (or otherwise network)
-# mounted filesystem then please read the LockFile documentation
-# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
-# you will save yourself a lot of trouble.
-#
-# Do NOT add a slash at the end of the directory path.
-#
-ServerRoot "/etc/httpd"
-
-#
-# The LockFile directive sets the path to the lockfile used when Apache
-# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
-# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
-# its default value. The main reason for changing it is if the logs
-# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
-# DISK. The PID of the main server process is automatically appended to
-# the filename.
-#
-LockFile /var/lock/httpd.lock
-
-#
-# PidFile: The file in which the server should record its process
-# identification number when it starts.
-#
-PidFile /var/run/httpd.pid
-
-#
-# ScoreBoardFile: File used to store internal server process information.
-# Not all architectures require this. But if yours does (you'll know because
-# this file will be created when you run Apache) then you *must* ensure that
-# no two invocations of Apache share the same scoreboard file.
-#
-ScoreBoardFile /var/run/httpd.scoreboard
-
-#
-# In the standard configuration, the server will process this file,
-# srm.conf, and access.conf in that order. The latter two files are
-# now distributed empty, as it is recommended that all directives
-# be kept in a single file for simplicity. The commented-out values
-# below are the built-in defaults. You can have the server ignore
-# these files altogether by using "/dev/null" (for Unix) or
-# "nul" (for Win32) for the arguments to the directives.
-#
-#ResourceConfig conf/srm.conf
-#AccessConfig conf/access.conf
-
-#
-# Timeout: The number of seconds before receives and sends time out.
-#
-Timeout 300
-
-#
-# KeepAlive: Whether or not to allow persistent connections (more than
-# one request per connection). Set to "Off" to deactivate.
-#
-KeepAlive On
-
-#
-# MaxKeepAliveRequests: The maximum number of requests to allow
-# during a persistent connection. Set to 0 to allow an unlimited amount.
-# We recommend you leave this number high, for maximum performance.
-#
-MaxKeepAliveRequests 100
-
-#
-# KeepAliveTimeout: Number of seconds to wait for the next request from the
-# same client on the same connection.
-#
-KeepAliveTimeout 15
-
-#
-# Server-pool size regulation. Rather than making you guess how many
-# server processes you need, Apache dynamically adapts to the load it
-# sees --- that is, it tries to maintain enough server processes to
-# handle the current load, plus a few spare servers to handle transient
-# load spikes (e.g., multiple simultaneous requests from a single
-# Netscape browser).
-#
-# It does this by periodically checking how many servers are waiting
-# for a request. If there are fewer than MinSpareServers, it creates
-# a new spare. If there are more than MaxSpareServers, some of the
-# spares die off. The default values are probably OK for most sites.
-#
-MinSpareServers 3
-MaxSpareServers 5
-
-#
-# Number of servers to start initially --- should be a reasonable ballpark
-# figure.
-#
-StartServers 8
-
-#
-# Limit on total number of servers running, i.e., limit on the number
-# of clients who can simultaneously connect --- if this limit is ever
-# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
-# It is intended mainly as a brake to keep a runaway server from taking
-# the system with it as it spirals down...
-#
-MaxClients 40
-
-#
-# MaxRequestsPerChild: the number of requests each child process is
-# allowed to process before the child dies. The child will exit so
-# as to avoid problems after prolonged use when Apache (and maybe the
-# libraries it uses) leak memory or other resources. On most systems, this
-# isn't really needed, but a few (such as Solaris) do have notable leaks
-# in the libraries. For these platforms, set to something like 10000
-# or so; a setting of 0 means unlimited.
-#
-# NOTE: This value does not include keepalive requests after the initial
-# request per connection. For example, if a child process handles
-# an initial request and 10 subsequent "keptalive" requests, it
-# would only count as 1 request towards this limit.
-#
-MaxRequestsPerChild 10000
-
-#
-# Listen: Allows you to bind Apache to specific IP addresses and/or
-# ports, in addition to the default. See also the <VirtualHost>
-# directive.
-#
-#Listen 3000
-#Listen 12.34.56.78:80
-Listen 80
-
-#
-# BindAddress: You can support virtual hosts with this option. This directive
-# is used to tell the server which IP address to listen to. It can either
-# contain "*", an IP address, or a fully qualified Internet domain name.
-# See also the <VirtualHost> and Listen directives.
-#
-#BindAddress *
-
-#
-# Dynamic Shared Object (DSO) Support
-#
-# To be able to use the functionality of a module which was built as a DSO you
-# have to place corresponding `LoadModule' lines at this location so the
-# directives contained in it are actually available _before_ they are used.
-# Please read the file README.DSO in the Apache 1.3 distribution for more
-# details about the DSO mechanism and run `httpd -l' for the list of already
-# built-in (statically linked and thus always available) modules in your httpd
-# binary.
-#
-# Note: The order is which modules are loaded is important. Don't change
-# the order below without expert advice.
-#
-# Example:
-# LoadModule foo_module modules/mod_foo.so
-
-#LoadModule mmap_static_module modules/mod_mmap_static.so
-LoadModule vhost_alias_module modules/mod_vhost_alias.so
-LoadModule env_module modules/mod_env.so
-LoadModule config_log_module modules/mod_log_config.so
-LoadModule agent_log_module modules/mod_log_agent.so
-LoadModule referer_log_module modules/mod_log_referer.so
-#LoadModule mime_magic_module modules/mod_mime_magic.so
-LoadModule mime_module modules/mod_mime.so
-LoadModule negotiation_module modules/mod_negotiation.so
-LoadModule status_module modules/mod_status.so
-LoadModule info_module modules/mod_info.so
-LoadModule includes_module modules/mod_include.so
-LoadModule autoindex_module modules/mod_autoindex.so
-LoadModule dir_module modules/mod_dir.so
-LoadModule cgi_module modules/mod_cgi.so
-LoadModule asis_module modules/mod_asis.so
-LoadModule imap_module modules/mod_imap.so
-LoadModule action_module modules/mod_actions.so
-#LoadModule speling_module modules/mod_speling.so
-LoadModule userdir_module modules/mod_userdir.so
-LoadModule alias_module modules/mod_alias.so
-#LoadModule rewrite_module modules/mod_rewrite.so
-LoadModule access_module modules/mod_access.so
-LoadModule auth_module modules/mod_auth.so
-LoadModule anon_auth_module modules/mod_auth_anon.so
-#LoadModule db_auth_module modules/mod_auth_db.so
-#LoadModule dbm_auth_module modules/mod_auth_dbm.so
-#LoadModule auth_ldap_module modules/mod_auth_ldap.so
-#LoadModule digest_module modules/mod_digest.so
-#LoadModule proxy_module modules/libproxy.so
-#LoadModule cern_meta_module modules/mod_cern_meta.so
-LoadModule expires_module modules/mod_expires.so
-LoadModule headers_module modules/mod_headers.so
-#LoadModule usertrack_module modules/mod_usertrack.so
-#LoadModule example_module modules/mod_example.so
-#LoadModule unique_id_module modules/mod_unique_id.so
-LoadModule setenvif_module modules/mod_setenvif.so
-#LoadModule bandwidth_module modules/mod_bandwidth.so
-#LoadModule put_module modules/mod_put.so
-#LoadModule throttle_module modules/mod_throttle.so
-#LoadModule define_module modules/mod_define.so
-<IfDefine HAVE_PERL>
-LoadModule perl_module modules/libperl.so
-</IfDefine>
-<IfDefine HAVE_PHP>
-LoadModule php_module modules/mod_php.so
-</IfDefine>
-<IfDefine HAVE_PHP3>
-LoadModule php3_module modules/libphp3.so
-</IfDefine>
-<IfDefine HAVE_PHP4>
-LoadModule php4_module modules/libphp4.so
-</IfDefine>
-<IfDefine HAVE_DAV>
-LoadModule dav_module modules/libdav.so
-</IfDefine>
-<IfDefine HAVE_ROAMING>
-LoadModule roaming_module modules/mod_roaming.so
-</IfDefine>
-<IfDefine HAVE_SSL>
-LoadModule ssl_module modules/libssl.so
-</IfDefine>
-
-# Reconstruction of the complete module list from all available modules
-# (static and shared ones) to achieve correct module execution order.
-# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
-ClearModuleList
-#AddModule mod_mmap_static.c
-AddModule mod_vhost_alias.c
-AddModule mod_env.c
-AddModule mod_log_config.c
-AddModule mod_log_agent.c
-AddModule mod_log_referer.c
-#AddModule mod_mime_magic.c
-AddModule mod_mime.c
-AddModule mod_negotiation.c
-AddModule mod_status.c
-AddModule mod_info.c
-AddModule mod_include.c
-AddModule mod_autoindex.c
-AddModule mod_dir.c
-AddModule mod_cgi.c
-AddModule mod_asis.c
-AddModule mod_imap.c
-AddModule mod_actions.c
-#AddModule mod_speling.c
-AddModule mod_userdir.c
-AddModule mod_alias.c
-#AddModule mod_rewrite.c
-AddModule mod_access.c
-AddModule mod_auth.c
-AddModule mod_auth_anon.c
-#AddModule mod_auth_db.c
-#AddModule mod_digest.c
-#AddModule mod_proxy.c
-#AddModule mod_cern_meta.c
-AddModule mod_expires.c
-AddModule mod_headers.c
-#AddModule mod_usertrack.c
-#AddModule mod_example.c
-#AddModule mod_unique_id.c
-AddModule mod_so.c
-AddModule mod_setenvif.c
-#AddModule mod_bandwidth.c
-#AddModule mod_put.c
-<IfDefine HAVE_PERL>
-AddModule mod_perl.c
-</IfDefine>
-<IfDefine HAVE_PHP>
-AddModule mod_php.c
-</IfDefine>
-<IfDefine HAVE_PHP3>
-AddModule mod_php3.c
-</IfDefine>
-<IfDefine HAVE_PHP4>
-AddModule mod_php4.c
-</IfDefine>
-<IfDefine HAVE_DAV>
-AddModule mod_dav.c
-</IfDefine>
-<IfDefine HAVE_ROAMING>
-AddModule mod_roaming.c
-</IfDefine>
-<IfDefine HAVE_SSL>
-AddModule mod_ssl.c
-</IfDefine>
-
-#
-# ExtendedStatus: controls whether Apache will generate "full" status
-# information (ExtendedStatus On) or just basic information (ExtendedStatus
-# Off) when the "server-status" handler is called. The default is Off.
-#
-#ExtendedStatus On
-
-### Section 2: 'Main' server configuration
-#
-# The directives in this section set up the values used by the 'main'
-# server, which responds to any requests that aren't handled by a
-# <VirtualHost> definition. These values also provide defaults for
-# any <VirtualHost> containers you may define later in the file.
-#
-# All of these directives may appear inside <VirtualHost> containers,
-# in which case these default settings will be overridden for the
-# virtual host being defined.
-#
-
-#
-# If your ServerType directive (set earlier in the 'Global Environment'
-# section) is set to "inetd", the next few directives don't have any
-# effect since their settings are defined by the inetd configuration.
-# Skip ahead to the ServerAdmin directive.
-#
-
-#
-# Port: The port to which the standalone server listens. For
-# ports < 1023, you will need httpd to be run as root initially.
-#
-Port 80
-
-#
-# If you wish httpd to run as a different user or group, you must run
-# httpd as root initially and it will switch.
-#
-# User/Group: The name (or #number) of the user/group to run httpd as.
-# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
-# . On HPUX you may not be able to use shared memory as nobody, and the
-# suggested workaround is to create a user www and use that user.
-# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
-# when the value of (unsigned)Group is above 60000;
-# don't use Group nobody on these systems!
-#
-User apache
-Group apache
-
-#
-# ServerAdmin: Your address, where problems with the server should be
-# e-mailed. This address appears on some server-generated pages, such
-# as error documents.
-#
-ServerAdmin rhn-feedback(a)redhat.com
-
-#
-# ServerName: allows you to set a host name which is sent back to clients for
-# your server if it's different than the one the program would get (i.e., use
-# "www" instead of the host's real name).
-#
-# Note: You cannot just invent host names and hope they work. The name you
-# define here must be a valid DNS name for your host. If you don't understand
-# this, ask your network administrator.
-# If your host doesn't have a registered DNS name, enter its IP address here.
-# You will have to access it by its address (e.g., http://123.45.67.89/)
-# anyway, and this will make redirections work in a sensible way.
-#
-ServerName www.devel.rhns.redhat.com
-
-#
-# DocumentRoot: The directory out of which you will serve your
-# documents. By default, all requests are taken from this directory, but
-# symbolic links and aliases may be used to point to other locations.
-#
-DocumentRoot "/var/www/html"
-
-#
-# Each directory to which Apache has access, can be configured with respect
-# to which services and features are allowed and/or disabled in that
-# directory (and its subdirectories).
-#
-# First, we configure the "default" to be a very restrictive set of
-# permissions.
-#
-<Directory />
- Options FollowSymLinks
- AllowOverride None
-</Directory>
-
-#
-# Note that from this point forward you must specifically allow
-# particular features to be enabled - so if something's not working as
-# you might expect, make sure that you have specifically enabled it
-# below.
-#
-
-#
-# This should be changed to whatever you set DocumentRoot to.
-#
-<Directory "/var/www/html">
-
-#
-# This may also be "None", "All", or any combination of "Indexes",
-# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
-#
-# Note that "MultiViews" must be named *explicitly* --- "Options All"
-# doesn't give it to you.
-#
- Options Indexes Includes FollowSymLinks
-
-#
-# This controls which options the .htaccess files in directories can
-# override. Can also be "All", or any combination of "Options", "FileInfo",
-# "AuthConfig", and "Limit"
-#
- AllowOverride None
-
-#
-# Controls who can get stuff from this server.
-#
- Order allow,deny
- Allow from all
-</Directory>
-
-#
-# UserDir: The name of the directory which is appended onto a user's home
-# directory if a ~user request is received.
-#
-# The path to the end user account 'public_html' directory must be
-# accessible to the webserver userid. This usually means that ~userid
-# must have permissions of 711, ~userid/public_html must have permissions
-# of 755, and documents contained therein must be world-readable.
-# Otherwise, the client will only receive a "403 Forbidden" message.
-#
-# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
-#
-UserDir public_html
-
-#
-# Control access to UserDir directories. The following is an example
-# for a site where these directories are restricted to read-only.
-#
-#<Directory /home/*/public_html>
-# AllowOverride FileInfo AuthConfig Limit
-# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
-# <Limit GET POST OPTIONS PROPFIND>
-# Order allow,deny
-# Allow from all
-# </Limit>
-# <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
-# Order deny,allow
-# Deny from all
-# </Limit>
-#</Directory>
-
-#
-# DirectoryIndex: Name of the file or files to use as a pre-written HTML
-# directory index. Separate multiple entries with spaces.
-#
-DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.cgi
-
-#
-# AccessFileName: The name of the file to look for in each directory
-# for access control information.
-#
-AccessFileName .htaccess
-
-#
-# The following lines prevent .htaccess files from being viewed by
-# Web clients. Since .htaccess files often contain authorization
-# information, access is disallowed for security reasons. Comment
-# these lines out if you want Web visitors to see the contents of
-# .htaccess files. If you change the AccessFileName directive above,
-# be sure to make the corresponding changes here.
-#
-# Also, folks tend to use names such as .htpasswd for password
-# files, so this will protect those as well.
-#
-<Files ~ "^\.ht">
- Order allow,deny
- Deny from all
-</Files>
-
-#
-# CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
-# document that was negotiated on the basis of content. This asks proxy
-# servers not to cache the document. Uncommenting the following line disables
-# this behavior, and proxies will be allowed to cache the documents.
-#
-#CacheNegotiatedDocs
-
-#
-# UseCanonicalName: (new for 1.3) With this setting turned on, whenever
-# Apache needs to construct a self-referencing URL (a URL that refers back
-# to the server the response is coming from) it will use ServerName and
-# Port to form a "canonical" name. With this setting off, Apache will
-# use the hostname:port that the client supplied, when possible. This
-# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
-#
-UseCanonicalName On
-
-#
-# TypesConfig describes where the mime.types file (or equivalent) is
-# to be found.
-#
-TypesConfig /etc/mime.types
-
-#
-# DefaultType is the default MIME type the server will use for a document
-# if it cannot otherwise determine one, such as from filename extensions.
-# If your server contains mostly text or HTML documents, "text/plain" is
-# a good value. If most of your content is binary, such as applications
-# or images, you may want to use "application/octet-stream" instead to
-# keep browsers from trying to display binary files as though they are
-# text.
-#
-DefaultType text/plain
-
-#
-# The mod_mime_magic module allows the server to use various hints from the
-# contents of the file itself to determine its type. The MIMEMagicFile
-# directive tells the module where the hint definitions are located.
-# mod_mime_magic is not part of the default server (you have to add
-# it yourself with a LoadModule [see the DSO paragraph in the 'Global
-# Environment' section], or recompile the server and include mod_mime_magic
-# as part of the configuration), so it's enclosed in an <IfModule> container.
-# This means that the MIMEMagicFile directive will only be processed if the
-# module is part of the server.
-#
-<IfModule mod_mime_magic.c>
- MIMEMagicFile conf/magic
-</IfModule>
-
-#
-# HostnameLookups: Log the names of clients or just their IP addresses
-# e.g., www.apache.org (on) or 204.62.129.132 (off).
-# The default is off because it'd be overall better for the net if people
-# had to knowingly turn this feature on, since enabling it means that
-# each client request will result in AT LEAST one lookup request to the
-# nameserver.
-#
-HostnameLookups Off
-
-#
-# ErrorLog: The location of the error log file.
-# If you do not specify an ErrorLog directive within a <VirtualHost>
-# container, error messages relating to that virtual host will be
-# logged here. If you *do* define an error logfile for a <VirtualHost>
-# container, that host's errors will be logged there and not here.
-#
-ErrorLog /var/log/httpd/error_log
-
-#
-# LogLevel: Control the number of messages logged to the error_log.
-# Possible values include: debug, info, notice, warn, error, crit,
-# alert, emerg.
-#
-LogLevel warn
-
-#
-# The following directives define some format nicknames for use with
-# a CustomLog directive (see below).
-#
-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-LogFormat "%h %l %u %t \"%r\" %>s %b" common
-LogFormat "%{Referer}i -> %U" referer
-LogFormat "%{User-agent}i" agent
-
-#
-# The location and format of the access logfile (Common Logfile Format).
-# If you do not define any access logfiles within a <VirtualHost>
-# container, they will be logged here. Contrariwise, if you *do*
-# define per-<VirtualHost> access logfiles, transactions will be
-# logged therein and *not* in this file.
-#
-# CustomLog /var/log/httpd/access_log common
-CustomLog /var/log/httpd/access_log combined
-
-#
-# If you would like to have agent and referer logfiles, uncomment the
-# following directives.
-#
-#CustomLog /var/log/httpd/referer_log referer
-#CustomLog /var/log/httpd/agent_log agent
-
-#
-# If you prefer a single logfile with access, agent, and referer information
-# (Combined Logfile Format) you can use the following directive.
-#
-#CustomLog /var/log/httpd/access_log combined
-
-#
-# Optionally add a line containing the server version and virtual host
-# name to server-generated pages (error documents, FTP directory listings,
-# mod_status and mod_info output etc., but not CGI generated documents).
-# Set to "EMail" to also include a mailto: link to the ServerAdmin.
-# Set to one of: On | Off | EMail
-#
-ServerSignature On
-
-#
-# Aliases: Add here as many aliases as you need (with no limit). The format is
-# Alias fakename realname
-#
-# Note that if you include a trailing / on fakename then the server will
-# require it to be present in the URL. So "/icons" isn't aliased in this
-# example, only "/icons/"..
-#
-Alias /icons/ "/var/www/icons/"
-
-<Directory "/var/www/icons">
- Options Indexes MultiViews
- AllowOverride None
- Order allow,deny
- Allow from all
-</Directory>
-
-#
-# ScriptAlias: This controls which directories contain server scripts.
-# ScriptAliases are essentially the same as Aliases, except that
-# documents in the realname directory are treated as applications and
-# run by the server when requested rather than as documents sent to the client.
-# The same rules about trailing "/" apply to ScriptAlias directives as to
-# Alias.
-#
-ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
-
-#
-# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
-# CGI directory exists, if you have that configured.
-#
-<Directory "/var/www/cgi-bin">
- AllowOverride None
- Options ExecCGI
- Order allow,deny
- Allow from all
-</Directory>
-
-#
-# Redirect allows you to tell clients about documents which used to exist in
-# your server's namespace, but do not anymore. This allows you to tell the
-# clients where to look for the relocated document.
-# Format: Redirect old-URI new-URL
-#
-
-#
-# Directives controlling the display of server-generated directory listings.
-#
-
-#
-# FancyIndexing: whether you want fancy directory indexing or standard
-#
-IndexOptions FancyIndexing NameWidth=*
-
-#
-# AddIcon* directives tell the server which icon to show for different
-# files or filename extensions. These are only displayed for
-# FancyIndexed directories.
-#
-AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
-
-AddIconByType (TXT,/icons/text.gif) text/*
-AddIconByType (IMG,/icons/image2.gif) image/*
-AddIconByType (SND,/icons/sound2.gif) audio/*
-AddIconByType (VID,/icons/movie.gif) video/*
-
-AddIcon /icons/binary.gif .bin .exe
-AddIcon /icons/binhex.gif .hqx
-AddIcon /icons/tar.gif .tar
-AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
-AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
-AddIcon /icons/a.gif .ps .ai .eps
-AddIcon /icons/layout.gif .html .shtml .htm .pdf
-AddIcon /icons/text.gif .txt
-AddIcon /icons/c.gif .c
-AddIcon /icons/p.gif .pl .py
-AddIcon /icons/f.gif .for
-AddIcon /icons/dvi.gif .dvi
-AddIcon /icons/uuencoded.gif .uu
-AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
-AddIcon /icons/tex.gif .tex
-AddIcon /icons/bomb.gif core
-
-AddIcon /icons/back.gif ..
-AddIcon /icons/hand.right.gif README
-AddIcon /icons/folder.gif ^^DIRECTORY^^
-AddIcon /icons/blank.gif ^^BLANKICON^^
-
-#
-# DefaultIcon: which icon to show for files which do not have an icon
-# explicitly set.
-#
-DefaultIcon /icons/unknown.gif
-
-#
-# AddDescription: allows you to place a short description after a file in
-# server-generated indexes. These are only displayed for FancyIndexed
-# directories.
-# Format: AddDescription "description" filename
-#
-#AddDescription "GZIP compressed document" .gz
-#AddDescription "tar archive" .tar
-#AddDescription "GZIP compressed tar archive" .tgz
-
-#
-# ReadmeName: the name of the README file the server will look for by
-# default, and append to directory listings.
-#
-# HeaderName: the name of a file which should be prepended to
-# directory indexes.
-#
-# The server will first look for name.html and include it if found.
-# If name.html doesn't exist, the server will then look for name.txt
-# and include it as plaintext if found.
-#
-ReadmeName README.html
-HeaderName HEADER.html
-
-#
-# IndexIgnore: a set of filenames which directory indexing should ignore
-# and not include in the listing. Shell-style wildcarding is permitted.
-#
-IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
-
-#
-# AddEncoding: allows you to have certain browsers (Mosaic/X 2.1+) uncompress
-# information on the fly. Note: Not all browsers support this.
-# Despite the name similarity, the following Add* directives have nothing
-# to do with the FancyIndexing customization directives above.
-#
-AddEncoding x-compress Z
-AddEncoding x-gzip gz tgz
-
-#
-# AddLanguage: allows you to specify the language of a document. You can
-# then use content negotiation to give a browser a file in a language
-# it can understand. Note that the suffix does not have to be the same
-# as the language keyword --- those with documents in Polish (whose
-# net-standard language code is pl) may wish to use "AddLanguage pl .po"
-# to avoid the ambiguity with the common suffix for perl scripts.
-#
-AddLanguage en .en
-AddLanguage fr .fr
-AddLanguage de .de
-AddLanguage da .da
-AddLanguage el .el
-AddLanguage it .it
-
-#
-# LanguagePriority: allows you to give precedence to some languages
-# in case of a tie during content negotiation.
-# Just list the languages in decreasing order of preference.
-#
-LanguagePriority en fr de
-
-#
-# AddType: allows you to tweak mime.types without actually editing it, or to
-# make certain files to be certain types.
-#
-# The following is for PHP4 (conficts with PHP/FI, below):
-<IfModule mod_php4.c>
- AddType application/x-httpd-php .php4 .php3 .phtml .php
- AddType application/x-httpd-php-source .phps
-</IfModule>
-
-# The following is for PHP3:
-<IfModule mod_php3.c>
- AddType application/x-httpd-php3 .php3
- AddType application/x-httpd-php3-source .phps
-</IfModule>
-
-# The following is for PHP/FI (PHP2):
-<IfModule mod_php.c>
- AddType application/x-httpd-php .phtml
-</IfModule>
-
-AddType application/x-tar .tgz
-
-#
-# AddHandler: allows you to map certain file extensions to "handlers",
-# actions unrelated to filetype. These can be either built into the server
-# or added with the Action command (see below)
-#
-# If you want to use server side includes, or CGI outside
-# ScriptAliased directories, uncomment the following lines.
-#
-# To use CGI scripts:
-#
-#AddHandler cgi-script .cgi
-
-#
-# To use server-parsed HTML files
-#
-AddType text/html .shtml
-AddHandler server-parsed .shtml
-
-#
-# Uncomment the following line to enable Apache's send-asis HTTP file
-# feature
-#
-#AddHandler send-as-is asis
-
-#
-# If you wish to use server-parsed imagemap files, use
-#
-AddHandler imap-file map
-
-#
-# To enable type maps, you might want to use
-#
-#AddHandler type-map var
-
-#
-# Action: lets you define media types that will execute a script whenever
-# a matching file is called. This eliminates the need for repeated URL
-# pathnames for oft-used CGI file processors.
-# Format: Action media/type /cgi-script/location
-# Format: Action handler-name /cgi-script/location
-#
-
-#
-# MetaDir: specifies the name of the directory in which Apache can find
-# meta information files. These files contain additional HTTP headers
-# to include when sending the document
-#
-#MetaDir .web
-
-#
-# MetaSuffix: specifies the file name suffix for the file containing the
-# meta information.
-#
-#MetaSuffix .meta
-
-#
-# Customizable error response (Apache style)
-# these come in three flavors
-#
-# 1) plain text
-#ErrorDocument 500 "The server made a boo boo.
-# n.b. the (") marks it as text, it does not get output
-#
-# 2) local redirects
-#ErrorDocument 404 /missing.html
-# to redirect to local URL /missing.html
-#ErrorDocument 404 /cgi-bin/missing_handler.pl
-# N.B.: You can redirect to a script or a document using server-side-includes.
-#
-# 3) external redirects
-#ErrorDocument 402 http://some.other_server.com/subscription_info.html
-# N.B.: Many of the environment variables associated with the original
-# request will *not* be available to such a script.
-
-#
-# The following directives modify normal HTTP response behavior.
-# The first directive disables keepalive for Netscape 2.x and browsers that
-# spoof it. There are known problems with these browser implementations.
-# The second directive is for Microsoft Internet Explorer 4.0b2
-# which has a broken HTTP/1.1 implementation and does not properly
-# support keepalive when it is used on 301 or 302 (redirect) responses.
-#
-BrowserMatch "Mozilla/2" nokeepalive
-BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
-
-#
-# The following directive disables HTTP/1.1 responses to browsers which
-# are in violation of the HTTP/1.0 spec by not being able to grok a
-# basic 1.1 response.
-#
-BrowserMatch "RealPlayer 4\.0" force-response-1.0
-BrowserMatch "Java/1\.0" force-response-1.0
-BrowserMatch "JDK/1\.0" force-response-1.0
-
-
-# If the perl module is installed, this will be enabled.
-<IfModule mod_perl.c>
- Alias /perl/ /var/www/perl/
- <Location /perl>
- SetHandler perl-script
- PerlHandler Apache::Registry
- Options +ExecCGI
- </Location>
-</IfModule>
-
-#
-# Allow http put (such as Netscape Gold's publish feature)
-# Use htpasswd to generate /etc/httpd/conf/passwd.
-# You must unremark these two lines at the top of this file as well:
-#LoadModule put_module modules/mod_put.so
-#AddModule mod_put.c
-#
-#Alias /upload /tmp
-#<Location /upload>
-# EnablePut On
-# AuthType Basic
-# AuthName Temporary
-# AuthUserFile /etc/httpd/conf/passwd
-# EnableDelete Off
-# umask 007
-# <Limit PUT>
-# require valid-user
-# </Limit>
-#</Location>
-
-#
-# Allow server status reports, with the URL of http://servername/server-status
-# Change the ".your_domain.com" to match your domain to enable.
-#
-#<Location /server-status>
-# SetHandler server-status
-# Order deny,allow
-# Deny from all
-# Allow from .your_domain.com
-#</Location>
-
-#
-# Allow remote server configuration reports, with the URL of
-# http://servername/server-info (requires that mod_info.c be loaded).
-# Change the ".your_domain.com" to match your domain to enable.
-#
-#<Location /server-info>
-# SetHandler server-info
-# Order deny,allow
-# Deny from all
-# Allow from .your_domain.com
-#</Location>
-
-# Allow access to local system documentation from localhost
-Alias /doc/ /usr/share/doc/
-<Location /doc>
- order deny,allow
- deny from all
- allow from localhost .localdomain
- Options Indexes FollowSymLinks
-</Location>
-
-#
-# There have been reports of people trying to abuse an old bug from pre-1.1
-# days. This bug involved a CGI script distributed as a part of Apache.
-# By uncommenting these lines you can redirect these attacks to a logging
-# script on phf.apache.org. Or, you can record them yourself, using the script
-# support/phf_abuse_log.cgi.
-#
-#<Location /cgi-bin/phf*>
-# Deny from all
-# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
-#</Location>
-
-#
-# Proxy Server directives. Uncomment the following lines to
-# enable the proxy server:
-#
-#<IfModule mod_proxy.c>
-#ProxyRequests On
-#
-#<Directory proxy:*>
-# Order deny,allow
-# Deny from all
-# Allow from .your_domain.com
-#</Directory>
-
-#
-# Enable/disable the handling of HTTP/1.1 "Via:" headers.
-# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
-# Set to one of: Off | On | Full | Block
-#
-#ProxyVia On
-
-#
-# To enable the cache as well, edit and uncomment the following lines:
-# (no cacheing without CacheRoot)
-#
-#CacheRoot "/var/cache/httpd"
-#CacheSize 5
-#CacheGcInterval 4
-#CacheMaxExpire 24
-#CacheLastModifiedFactor 0.1
-#CacheDefaultExpire 1
-#NoCache a_domain.com another_domain.edu joes.garage_sale.com
-
-#</IfModule>
-# End of proxy directives.
-
-### Section 3: Virtual Hosts
-#
-# VirtualHost: If you want to maintain multiple domains/hostnames on your
-# machine you can setup VirtualHost containers for them.
-# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
-# for further details before you try to setup virtual hosts.
-# You may use the command line option '-S' to verify your virtual host
-# configuration.
-
-#
-# If you want to use name-based virtual hosts you need to define at
-# least one IP address (and port number) for them.
-#
-#NameVirtualHost 12.34.56.78:80
-#NameVirtualHost 12.34.56.78
-
-#
-# VirtualHost example:
-# Almost any Apache directive may go into a VirtualHost container.
-#
-#<VirtualHost ip.address.of.host.some_domain.com>
-# ServerAdmin webmaster(a)host.some_domain.com
-# DocumentRoot /www/docs/host.some_domain.com
-# ServerName host.some_domain.com
-# ErrorLog logs/host.some_domain.com-error_log
-# CustomLog logs/host.some_domain.com-access_log common
-#</VirtualHost>
-
-#<VirtualHost _default_:*>
-#</VirtualHost>
-
-<IfDefine HAVE_SSL>
-##
-## SSL Virtual Host Context
-##
-
-# Apache will only listen on port 80 by default. Defining the virtual server
-# (below) won't make it automatically listen on the virtual server's port.
-Listen 443
-
-# SSL Session Cache:
-# The cache speeds up processing of multiple parallel requests from
-# the same client.
-SSLSessionCache shm:/var/cache/ssl_gcache_data(524288)
-
-<VirtualHost _default_:443>
-
-# General setup for the virtual host
-DocumentRoot "/var/www/html"
-
-# SSL Engine Switch:
-# Enable/Disable SSL for this virtual host.
-SSLEngine on
-
-# SSL Cipher Suite:
-# List the ciphers that the client is permitted to negotiate.
-# See the mod_ssl documentation for a complete list.
-#SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
-
-# Server Certificate:
-# Point SSLCertificateFile at a PEM encoded certificate. If
-# the certificate is encrypted, then you will be prompted for a
-# pass phrase. Note that a kill -HUP will prompt again. A test
-# certificate can be generated with `make certificate' under
-# built time. Keep in mind that if you've both a RSA and a DSA
-# certificate you can configure both in parallel (to also allow
-# the use of DSA ciphers, etc.)
-SSLCertificateFile /etc/httpd/conf/cert-beta.rhns
-#SSLCertificateFile /etc/httpd/conf/ssl.crt/server-dsa.crt
-
-# Server Private Key:
-# If the key is not combined with the certificate, use this
-# directive to point at the key file. Keep in mind that if
-# you've both a RSA and a DSA private key you can configure
-# both in parallel (to also allow the use of DSA ciphers, etc.)
-SSLCertificateKeyFile /etc/httpd/conf/cert-beta.rhns
-#SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server-dsa.key
-
-# Server Certificate Chain:
-# Point SSLCertificateChainFile at a file containing the
-# concatenation of PEM encoded CA certificates which form the
-# certificate chain for the server certificate. Alternatively
-# the referenced file can be the same as SSLCertificateFile
-# when the CA certificates are directly appended to the server
-# certificate for convinience.
-#SSLCertificateChainFile /etc/httpd/conf/ssl.crt/ca.crt
-
-# Certificate Authority (CA):
-# Set the CA certificate verification path where to find CA
-# certificates for client authentication or alternatively one
-# huge file containing all of them (file must be PEM encoded)
-# Note: Inside SSLCACertificatePath you need hash symlinks
-# to point to the certificate files. Use the provided
-# Makefile to update the hash symlinks after changes.
-#SSLCACertificatePath /etc/httpd/conf/ssl.crt
-#SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt
-
-# Certificate Revocation Lists (CRL):
-# Set the CA revocation path where to find CA CRLs for client
-# authentication or alternatively one huge file containing all
-# of them (file must be PEM encoded)
-# Note: Inside SSLCARevocationPath you need hash symlinks
-# to point to the certificate files. Use the provided
-# Makefile to update the hash symlinks after changes.
-#SSLCARevocationPath /etc/httpd/conf/ssl.crl
-#SSLCARevocationFile /etc/httpd/conf/ssl.crl/ca-bundle.crl
-# Client Authentication (Type):
-# Client certificate verification type and depth. Types are
-# none, optional, require and optional_no_ca. Depth is a
-# number which specifies how deeply to verify the certificate
-# issuer chain before deciding the certificate is not valid.
-#SSLVerifyClient require
-#SSLVerifyDepth 10
-
-# Access Control:
-# With SSLRequire you can do per-directory access control based
-# on arbitrary complex boolean expressions containing server
-# variable checks and other lookup directives. The syntax is a
-# mixture between C and Perl. See the mod_ssl documentation
-# for more details.
-#<Location />
-#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \
-# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
-# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
-# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
-# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
-# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
-#</Location>
-# SSL Engine Options:
-# Set various options for the SSL engine.
-# o FakeBasicAuth:
-# Translate the client X.509 into a Basic Authorisation. This means that
-# the standard Auth/DBMAuth methods can be used for access control. The
-# user name is the `one line' version of the client's X.509 certificate.
-# Note that no password is obtained from the user. Every entry in the user
-# file needs this password: `xxj31ZMTZzkVA'.
-# o ExportCertData:
-# This exports two additional environment variables: SSL_CLIENT_CERT and
-# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
-# server (always existing) and the client (only existing when client
-# authentication is used). This can be used to import the certificates
-# into CGI scripts.
-# o StdEnvVars:
-# This exports the standard SSL/TLS related `SSL_*' environment variables.
-# Per default this exportation is switched off for performance reasons,
-# because the extraction step is an expensive operation and is usually
-# useless for serving static content. So one usually enables the
-# exportation for CGI and SSI requests only.
-# o CompatEnvVars:
-# This exports obsolete environment variables for backward compatibility
-# to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
-# to provide compatibility to existing CGI scripts.
-# o StrictRequire:
-# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
-# under a "Satisfy any" situation, i.e. when it applies access is denied
-# and no other module can change it.
-# o OptRenegotiate:
-# This enables optimized SSL connection renegotiation handling when SSL
-# directives are used in per-directory context.
-#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
-<Files ~ "\.(cgi|shtml)$">
- SSLOptions +StdEnvVars
-</Files>
-<Directory "/var/www/cgi-bin">
- SSLOptions +StdEnvVars
-</Directory>
-
-# Notice: Most problems of broken clients are also related to the HTTP
-# keep-alive facility, so you usually additionally want to disable
-# keep-alive for those clients, too. Use variable "nokeepalive" for this.
-SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
-
-# Per-Server Logging:
-# The home of a custom SSL log file. Use this when you want a
-# compact non-error SSL logfile on a virtual host basis.
-CustomLog /var/log/httpd/ssl_request_log \
- "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
-
-</VirtualHost>
-
-</IfDefine>
-
-
-Include conf/local.conf
-Include conf/proxy.conf
diff --git a/web/conf/proxy/local.conf b/web/conf/proxy/local.conf
deleted file mode 100644
index 085b6da..0000000
--- a/web/conf/proxy/local.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-
-##
-## RHN STUFF
-##
-
-
diff --git a/web/conf/proxy/proxy.conf b/web/conf/proxy/proxy.conf
deleted file mode 100644
index f2bff1f..0000000
--- a/web/conf/proxy/proxy.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-LoadModule proxy_module modules/libproxy.so
-AddModule mod_proxy.c
-
-# so the backend can know what the request host was
-ProxyVia full
-
-ProxyPass /network/ http://webapp.devel.rhns.redhat.com/network/
-ProxyPassReverse /network/ http://webapp.devel.rhns.redhat.com/network/
13 years, 12 months
satellite/setup-symlinks.sh spacewalk/config
by Jan Pazdziora
satellite/setup-symlinks.sh | 4 ----
spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
New commits:
commit 40e70a160fb4fa208aea16625207118a97327175
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 13:22:10 2010 +0200
The satellite-httpd service is no more.
diff --git a/satellite/setup-symlinks.sh b/satellite/setup-symlinks.sh
index d9bbdac..a77d1cf 100755
--- a/satellite/setup-symlinks.sh
+++ b/satellite/setup-symlinks.sh
@@ -116,10 +116,6 @@ symlink $SVNDIR/eng/java/conf/workers.properties
chdir /etc/init.d
symlink $SVNDIR/eng/satellite/config/etc/init.d/satellite-httpd
-chdir /etc/sysconfig
-symlink $SVNDIR/eng/satellite/config/etc/sysconfig/satellite-httpd
-sudo sed -i 's/@@serverDOTnls_lang@(a)/english.UTF8/g' /etc/sysconfig/satellite-httpd
-
chdir /var/www
symlink $SVNDIR/eng/web/html
diff --git a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
index 2b6fd5e..24bde80 100644
--- a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
+++ b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
@@ -11,7 +11,7 @@ PerlFixupHandler Apache2::SizeLimit
PerlRequire /etc/rhn/satellite-httpd/conf/startup.pl
-# these will be set via /etc/sysconfig/satellite-httpd
+# these will be set via /etc/sysconfig/httpd
PerlPassEnv ORACLE_HOME
PerlPassEnv NLS_LANG
13 years, 12 months
web/conf
by Jan Pazdziora
web/conf/rhn-profile.conf | 1 -
web/conf/rhn-r.conf | 1 -
web/conf/rhn-sat.conf | 2 --
web/conf/rhn-test02.conf | 4 ----
web/conf/rhnapp.conf | 26 --------------------------
5 files changed, 34 deletions(-)
New commits:
commit 54eadab1897ccae70861e74f9f68164efeda355e
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue May 4 12:09:15 2010 +0200
Removing web/conf/*.conf files that are not packages nor used.
diff --git a/web/conf/rhn-profile.conf b/web/conf/rhn-profile.conf
deleted file mode 100644
index 95a6823..0000000
--- a/web/conf/rhn-profile.conf
+++ /dev/null
@@ -1 +0,0 @@
-web.profile_queries = 1
diff --git a/web/conf/rhn-r.conf b/web/conf/rhn-r.conf
deleted file mode 100644
index a484177..0000000
--- a/web/conf/rhn-r.conf
+++ /dev/null
@@ -1 +0,0 @@
-web.pxt_database_dsn = rdu
diff --git a/web/conf/rhn-sat.conf b/web/conf/rhn-sat.conf
deleted file mode 100644
index 3cd07e6..0000000
--- a/web/conf/rhn-sat.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-web.satellite = 1
-web.encrypted_passwords = 0
diff --git a/web/conf/rhn-test02.conf b/web/conf/rhn-test02.conf
deleted file mode 100644
index 4f07680..0000000
--- a/web/conf/rhn-test02.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-web.satellite = 1
-web.encrypted_passwords = 1
-web.pxt_database_dsn = foo/foo@foo
-web.enable_oai_sync = 0
diff --git a/web/conf/rhnapp.conf b/web/conf/rhnapp.conf
deleted file mode 100644
index 0b5890a..0000000
--- a/web/conf/rhnapp.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## RHN STUFF
-##
-
-# added for oracle
-SetEnv ORACLE_HOME /opt/oracle
-SetEnv NLS_LANG english.UTF8
-
-# MOD_PYTHON
-LoadModule python_module modules/mod_python.so
-PythonPath "sys.path+['/var/www/rhns']"
-PythonDebug Off
-
-<Location /XMLRPC>
- SetHandler python-program
- # all of these handlers are defined in apacheServer
- PythonHeaderParserHandler server.apacheServer::HeaderParserHandler
- PythonHandler server.apacheServer::Handler
- PythonLogHandler server.apacheServer::LogHandler
- PythonCleanupHandler server.apacheServer::CleanupHandler
- PythonOption SERVER xmlrpcServer
- PythonOption RootDir /var/www/rhns
- PythonOption RHNComponentType Server
- DefaultType text/xml
-</Location>
-
13 years, 12 months
Changes to 'refs/tags/osad-5.9.34-1'
by Jan Pazdziora
Tag 'osad-5.9.34-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2010-05-04 09:08 +0000
Tagging package [osad] version [5.9.34-1] in directory [client/tools/osad/].
Changes since osad-5.9.33-1:
Jan Pazdziora (2):
575555 - remove corecmd_exec_sbin as we already have corecmd_exec_bin there.
Automatic commit of package [osad] release [5.9.34-1].
---
client/tools/osad/osa-dispatcher-selinux/osa-dispatcher.te | 1 -
client/tools/osad/osad.spec | 5 ++++-
rel-eng/packages/osad | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
---
13 years, 12 months