diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..5eb6edd
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.tar.bz2 filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1534ba5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.rpm
+*.log
+*spec-20*
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..23900f9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+# Makefile for source rpm: plague
+# $Id: Makefile,v 1.1 2016/02/15 14:25:35 vip-ire Exp $
+NAME := plague
+SPECFILE = $(firstword $(wildcard *.spec))
+
+define find-makefile-common
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+endef
+
+MAKEFILE_COMMON := $(shell $(find-makefile-common))
+
+ifeq ($(MAKEFILE_COMMON),)
+# attept a checkout
+define checkout-makefile-common
+test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
+endef
+
+MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
+endif
+
+include $(MAKEFILE_COMMON)
diff --git a/README.md b/README.md
index 9529ec0..97a71b6 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,11 @@
# plague
-3rd Party (Maintained by Koozali) git repo for plague smeserver
\ No newline at end of file
+3rd Party (Maintained by Koozali) git repo for plague smeserver
+
+## Description
+
+
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
+*Once it has been checked, then this comment will be deleted*
+
+
+Plague is a software package designed to detect and analyze malicious payloads. It leverages multiple techniques to detect a wide range of threats including backdoors, droppers, malware, ransomware, rootkits, spyware, and viruses. It provides an interactive interface for analyzing the detected threats, allowing users to detect, analyze, and remediate malicious payloads.
diff --git a/contriborbase b/contriborbase
new file mode 100644
index 0000000..ef36a67
--- /dev/null
+++ b/contriborbase
@@ -0,0 +1 @@
+sme10
diff --git a/plague-0.4.5.8-keepjobs.patch b/plague-0.4.5.8-keepjobs.patch
new file mode 100644
index 0000000..215d51c
--- /dev/null
+++ b/plague-0.4.5.8-keepjobs.patch
@@ -0,0 +1,16 @@
+diff -up plague-0.4.5.8/server/BuildMaster.py.keepjobs plague-0.4.5.8/server/BuildMaster.py
+--- plague-0.4.5.8/server/BuildMaster.py.keepjobs 2011-04-09 09:55:35.645857362 -0600
++++ plague-0.4.5.8/server/BuildMaster.py 2011-04-09 09:56:01.285336069 -0600
+@@ -421,9 +421,9 @@ class BuildMaster(threading.Thread):
+ def _cleanup_db(self):
+ expiretime = int(time.time()-14*24*3600)
+ print "DB cleanup: %d" % expiretime
+- self._cursor.execute("DELETE FROM jobs WHERE (status='failed' OR status='finished') AND endtime<=%d" % expiretime)
+- self._dbcx.commit()
+-
++ #self._cursor.execute("DELETE FROM jobs WHERE (status='failed' OR status='finished') AND endtime<=%d" % expiretime)
++ #self._dbcx.commit()
++
+ def _finish_signed(self): # only for Fedora Extras pushscript
+ print "Checking needsign"
+ self._cursor.execute("SELECT * FROM jobs WHERE status='needsign'")
diff --git a/plague-0.4.5.8-pushscript-extras.patch b/plague-0.4.5.8-pushscript-extras.patch
new file mode 100644
index 0000000..6095a88
--- /dev/null
+++ b/plague-0.4.5.8-pushscript-extras.patch
@@ -0,0 +1,77 @@
+diff -Nur plague-0.4.5.4-orig/server/BuildMaster.py plague-0.4.5.4/server/BuildMaster.py
+--- plague-0.4.5.4-orig/server/BuildMaster.py 2008-09-08 00:00:53.000000000 +0200
++++ plague-0.4.5.4/server/BuildMaster.py 2008-09-08 00:19:17.000000000 +0200
+@@ -83,6 +83,9 @@
+ self._db_ping_interval = self._cfg.get_int('Database','ping_interval')
+ self._db_ping_job = PeriodicJob(self._db_ping_interval,self._ping_db)
+
++ self._cleanup_db_job = PeriodicJob(24*3600,self._cleanup_db)
++ self._finish_signed_job = PeriodicJob(3600,self._finish_signed)
++
+ threading.Thread.__init__(self)
+ self.setName("BuildMaster")
+
+@@ -415,6 +418,28 @@
+ def is_paused(self):
+ return self._paused
+
++ def _cleanup_db(self):
++ expiretime = int(time.time()-14*24*3600)
++ print "DB cleanup: %d" % expiretime
++ self._cursor.execute("DELETE FROM jobs WHERE (status='failed' OR status='finished') AND endtime<=%d" % expiretime)
++ self._dbcx.commit()
++
++ def _finish_signed(self): # only for Fedora Extras pushscript
++ print "Checking needsign"
++ self._cursor.execute("SELECT * FROM jobs WHERE status='needsign'")
++ self._dbcx.commit()
++ rows = self._dbcx.fetchall(self._cursor)
++ for row in rows:
++ uid = row['uid']
++ target = row['target_distro']+'-'+row['target_target']+'-'+row['target_repo']
++ (n,v,r) = (row['package'],row['rpm_version'],row['rpm_release'])
++ pkgroot = os.path.join(self._repodir,target,n,'%s-%s'%(v,r))
++ if not os.path.exists(pkgroot) or \
++ os.path.exists(os.path.join(pkgroot,'PUSHED')):
++ print pkgroot, 'PUSHED => mark as finished'
++ self._cursor.execute("UPDATE jobs SET status='finished' WHERE uid=%d" % uid)
++ self._dbcx.commit()
++
+ def run(self):
+ DebugUtils.registerThreadName(self)
+
+@@ -441,6 +466,9 @@
+ self._start_new_jobs()
+ self._start_requeued_jobs()
+
++ self._cleanup_db_job.run()
++ self._finish_signed_job.run()
++
+ last_time = time.time()
+ while not self._have_work() and time.time() <= last_time + 5:
+ time.sleep(0.25)
+diff -Nur plague-0.4.5.4-orig/server/UserInterface.py plague-0.4.5.4/server/UserInterface.py
+--- plague-0.4.5.4-orig/server/UserInterface.py 2008-09-07 19:02:30.000000000 +0200
++++ plague-0.4.5.4/server/UserInterface.py 2008-09-08 00:09:16.000000000 +0200
+@@ -606,6 +606,7 @@
+
+
+ def finish(self, uid_list):
++ return (-1, "Feature disabled.")
+ user = AuthedXMLRPCServer.get_authinfo()
+ if not user or not user.own_jobs:
+ return (-1, "Insufficient privileges.")
+diff -Nur plague-0.4.5.4-orig/www/success.psp plague-0.4.5.4/www/success.psp
+--- plague-0.4.5.4-orig/www/success.psp 2008-01-31 15:30:57.000000000 +0100
++++ plague-0.4.5.4/www/success.psp 2008-09-08 00:09:16.000000000 +0200
+@@ -10,8 +10,8 @@
+ try:
+ # show any jobs that have successfully built
+ args = {}
+- args['status'] = ['add_to_repo', 'needsign', 'repowait', 'repodone']
+- args['orderby'] = ['status', 'endtime desc']
++ args['status'] = ['add_to_repo', 'finished', 'repowait', 'needsign', 'repodone']
++ args['orderby'] = ['endtime desc']
+ args['maxrows'] = 100
+ (e, msg, jobs) = server.list_jobs(args)
+ except socket.error, e:
diff --git a/plague-0.4.5.8-scm-updates.patch b/plague-0.4.5.8-scm-updates.patch
new file mode 100644
index 0000000..1d8062f
--- /dev/null
+++ b/plague-0.4.5.8-scm-updates.patch
@@ -0,0 +1,256 @@
+diff -up plague-0.4.5.8/server/PackageJob.py.scm-updates plague-0.4.5.8/server/PackageJob.py
+--- plague-0.4.5.8/server/PackageJob.py.scm-updates 2008-09-21 07:38:41.000000000 -0600
++++ plague-0.4.5.8/server/PackageJob.py 2011-04-09 09:56:01.290335772 -0600
+@@ -37,6 +37,7 @@ from plague import ArchUtils
+ from plague import DebugUtils
+
+ CVS_CMD = "/usr/bin/cvs"
++GIT_CMD = "/usr/bin/git"
+ MAKE_CMD = "/usr/bin/make"
+
+ DEBUG = False
+@@ -134,7 +135,7 @@ class PackageJob:
+ self.username = username
+ self.starttime = time.time()
+ self.endtime = 0
+- self.use_cvs = self._server_cfg.get_bool("CVS", "use_cvs")
++
+ self._source = source
+ self.result_dir = None
+ self.srpm_path = None
+@@ -150,7 +151,7 @@ class PackageJob:
+ "server_work_dir"), "srpm_http_dir")
+
+ first_stage = 'initialize'
+- if self.use_cvs == False:
++ if source.endswith(".src.rpm") or source.find("/") != -1:
+ first_stage = 'prep'
+ pjc = PackageJobController(self, first_stage, 'waiting')
+ pjc.start()
+@@ -289,54 +290,96 @@ class PackageJob:
+ dirname = "%s-%s-%d" % (self.uid, self._source, time.time())
+ tmpdir = self._server_cfg.get_str("Directories", "tmpdir")
+ self.checkout_tmpdir = os.path.join(tmpdir, dirname)
+- if os.path.exists(self.checkout_tmpdir):
+- shutil.rmtree(self.checkout_tmpdir, ignore_errors=True)
++ if not self._source.endswith(".src.rpm") and self._source.find("/") == -1:
++ if os.path.exists(self.checkout_tmpdir):
++ shutil.rmtree(self.checkout_tmpdir, ignore_errors=True)
+ os.makedirs(self.checkout_tmpdir)
+
+- # Set up CVS environment
+- env_args = "CVSROOT='%s'" % self._target_cfg.get_str("CVS", "cvs_root")
+- cvs_rsh = self._target_cfg.get_str("CVS", "cvs_rsh")
+- if len(cvs_rsh) > 0:
+- env_args = "%s CVS_RSH='%s'" % (env_args, cvs_rsh)
+-
+- # Checkout the module
+- cmd = 'umask 0022; cd %s; %s %s co -r %s %s' % (self.checkout_tmpdir, env_args, CVS_CMD,
+- self._source, self.package)
+- debugprint("%d: Running %s" % (self.uid, cmd))
+- s, o = commands.getstatusoutput(cmd)
+- if s != 0:
+- err_msg = "Error: could not check out %s from %s - output was:\n\n" \
+- "%s" % (self._source, self._target_str, o)
+- else:
+- # Just in case the 'common' directory didn't come along for the ride,
+- # get it from CVS
+- pkg_path = os.path.join(self.checkout_tmpdir, self.package)
+- if not os.path.exists(os.path.join(pkg_path, "common")):
+- cmd = 'cd %s; %s %s co common' % (pkg_path, env_args, CVS_CMD)
++ if self._target_cfg.has_option("SCM", "cvs_root"):
++ # Set up CVS environment
++ env_args = "CVSROOT='%s'" % self._target_cfg.get_str("SCM", "cvs_root")
++ cvs_rsh = self._target_cfg.get_str("SCM", "cvs_rsh")
++ if len(cvs_rsh) > 0:
++ env_args = "%s CVS_RSH='%s'" % (env_args, cvs_rsh)
++
++ # Checkout the module
++ cmd = 'umask 0022; cd %s; %s %s co -r %s %s' % (self.checkout_tmpdir, env_args, CVS_CMD,
++ self._source, self.package)
++ debugprint("%d: Running %s" % (self.uid, cmd))
++ s, o = commands.getstatusoutput(cmd)
++ if s != 0:
++ err_msg = "Error: could not check out %s from %s - output was:\n\n" \
++ "%s" % (self._source, self._target_str, o)
++ else:
++ # Just in case the 'common' directory didn't come along for the ride,
++ # get it from CVS
++ pkg_path = os.path.join(self.checkout_tmpdir, self.package)
++ if not os.path.exists(os.path.join(pkg_path, "common")):
++ cmd = 'cd %s; %s %s co common' % (pkg_path, env_args, CVS_CMD)
++ debugprint("%d: Running %s" % (self.uid, cmd))
++ s, o = commands.getstatusoutput(cmd)
++ if s != 0:
++ err_msg = "Error: could not check out common directory - " \
++ "output was:\n\n%s" % (self._source, self._target_str, o)
++
++ self.bm.notify_checkout_done(self)
++
++ if err_msg:
++ raise PrepError(err_msg)
++
++ elif self._target_cfg.has_option("SCM", "git_root"):
++ gitroot = self._target_cfg.get_str("SCM", "git_root")
++ gitrepo = "%s/%s" % (gitroot, self.package)
++ commonrepo = os.path.dirname(gitroot) + '/common'
++ self.checkout_path = os.path.basename(self.package)
++ if self.package.endswith('.git'):
++ self.checkout_path = os.path.basename(self.package[:-4])
++ commonrepo = os.path.dirname(gitroot) + '/common.git'
++ sourcedir = '%s/%s' % (self.checkout_tmpdir, self.checkout_path)
++
++ # Checkout the module
++ cmd = 'cd %s; umask 0022; %s clone -n %s %s' % (self.checkout_tmpdir,
++ GIT_CMD, gitrepo, self.checkout_path)
++ debugprint("%d: Running %s" % (self.uid, cmd))
++ s, o = commands.getstatusoutput(cmd)
++ if s == 0:
++ cmd = 'cd %s; umask 0022; %s reset --hard %s' % (sourcedir, GIT_CMD, self._source)
+ debugprint("%d: Running %s" % (self.uid, cmd))
+ s, o = commands.getstatusoutput(cmd)
+- if s != 0:
+- err_msg = "Error: could not check out common directory - " \
+- "output was:\n\n%s" % (self._source, self._target_str, o)
+-
+- self.bm.notify_checkout_done(self)
+-
+- if err_msg:
+- raise PrepError(err_msg)
+-
++
++ if s != 0:
++ err_msg = "Error: could not check out %s from %s - output was:\n\n" \
++ "%s" % (self._source, self._target_str, o)
++
++ self.bm.notify_checkout_done(self)
++
++ if err_msg:
++ raise PrepError(err_msg)
++ else:
++ self.bm.notify_checkout_done(self)
++
++ raise PrepError( "Error: could not check out %s from %s\n" %
++ (self._source, self._target_str) )
++
+ self._set_cur_stage('make_srpm')
+ return False
+
+ def _stage_make_srpm(self):
+- # Map our target to the CVS target alias, since CVS may have
++ # Map our target to the SCM target alias, since SCM may have
+ # different target names than we expose
+- cvs_target = self._target_dict['target']
+- cvs_alias = self._target_cfg.get_str("Aliases", "cvs_alias")
+- if len(cvs_alias) > 0:
+- cvs_target = cvs_alias
++ srpm_dir = None
++ if self._target_cfg.has_option("SCM", "cvs_root"):
++ cvs_target = self._target_dict['target']
++ cvs_alias = self._target_cfg.get_str("Aliases", "cvs_alias")
++ if len(cvs_alias) > 0:
++ cvs_target = cvs_alias
++
++ self.srpm_path = None
++ srpm_dir = os.path.join(self.checkout_tmpdir, self.package, cvs_target)
++
++ elif self._target_cfg.has_option("SCM", "git_root"):
++ srpm_dir = os.path.join(self.checkout_tmpdir, self.checkout_path)
+
+- self.srpm_path = None
+- srpm_dir = os.path.join(self.checkout_tmpdir, self.package, cvs_target)
+ if not os.path.exists(srpm_dir):
+ msg = "Error: could not find checkout directory %s for %s. Sources probably don't exist for this target." % (srpm_dir, self._source)
+ raise PrepError(msg)
+@@ -383,8 +426,8 @@ class PackageJob:
+
+ def _stage_prep(self):
+
+- # In SRPM-only mode, cvs_tag is path to the SRPM to build
+- if self.use_cvs == False:
++ # In SRPM-only mode, _source is path to the SRPM to build
++ if self._source.endswith(".src.rpm") or self._source.find("/") != -1:
+ self.srpm_path = self._source
+
+ # fail the job if we can't access the SRPM. Can happen during
+@@ -425,9 +468,10 @@ class PackageJob:
+ shutil.copy(self.srpm_path, self.srpm_http_path)
+ self.srpm_path = None
+
+- # Remove CVS checkout and make_srpm dirs
+- if self.use_cvs == True:
+- shutil.rmtree(self.checkout_tmpdir, ignore_errors=True)
++ # Remove SCM checkout and make_srpm dirs
++ if not self._source.endswith(".src.rpm") and self._source.find("/") == -1:
++ if os.path.exists(self.checkout_tmpdir):
++ shutil.rmtree(self.checkout_tmpdir, ignore_errors=True)
+
+ self._request_arch_jobs()
+ self._set_cur_stage('waiting')
+@@ -554,8 +598,9 @@ class PackageJob:
+ self._event.wait()
+ self._event.clear()
+ except PrepError, e:
+- if self.use_cvs == True:
+- shutil.rmtree(self.checkout_tmpdir, ignore_errors=True)
++ if not self._source.endswith(".src.rpm") and self._source.find("/") == -1:
++ if os.path.exists(self.checkout_tmpdir):
++ shutil.rmtree(self.checkout_tmpdir, ignore_errors=True)
+ subj = 'Prep Error (Job %s): %s on %s' % (self.uid, self._source, self._target_str)
+ self.email_result(self.username, resultstring=e.msg, subject=subj)
+ self._stage_failed(e.msg)
+diff -up plague-0.4.5.8/server/UserInterface.py.scm-updates plague-0.4.5.8/server/UserInterface.py
+--- plague-0.4.5.8/server/UserInterface.py.scm-updates 2011-04-09 09:55:35.647857242 -0600
++++ plague-0.4.5.8/server/UserInterface.py 2011-04-09 09:56:01.294335535 -0600
+@@ -58,7 +58,7 @@ def validate_package_name(name):
+ return False
+ return True
+
+-def validate_cvs_tag(tag):
++def validate_scm_tag(tag):
+ safe_list = ['-', '_', '.', ':', '~', '[', ']', '+']
+ for c in tag:
+ if not (c in safe_list) and not c.isalnum():
+@@ -117,28 +117,8 @@ class UserInterface:
+ def enqueue(self, email, package, source, target_alias, buildreq=None):
+ """ Accept a job to build and stuff it into the job database """
+
+- is_cvs_tag = True
+- if source.endswith(".src.rpm") or source.find("/") != -1:
+- is_cvs_tag = False
+-
+ # Do source-type specifc validation
+- if is_cvs_tag:
+- if self._cfg.get_bool("CVS", "use_cvs") == False:
+- self.email_result(email, source, "Error setting up build for %s on "\
+- "%s: this server builds SRPMs, not CVS checkouts." % (source, target_alias))
+- return (-1, "This build server is set up for building SRPMS only. ", -1)
+-
+- if not validate_cvs_tag(source):
+- self.email_result(email, source, "Error setting up build for %s on "\
+- "%s: The CVS tag '%s' contained an illegal character. "\
+- "Submit a bug report?" % (package, target_alias, cvs_tag))
+- return (-1, "The CVS tag contained an illegal character.", -1)
+- else:
+- if self._cfg.get_bool("CVS", "use_cvs") == True:
+- self.email_result(email, source, "Error setting up build for %s on "\
+- "%s: this server builds CVS checkouts, not SRPMs." % (source, target_alias))
+- return (-1, "This build server is set up for building CVS checkouts only. ", -1)
+-
++ if source.endswith(".src.rpm") or source.find("/") != -1:
+ # We limit the database field to 255 chars
+ if len(source) > 255:
+ self.email_result(email, source, "Error setting up build for %s on "\
+@@ -150,6 +130,12 @@ class UserInterface:
+ self.email_result(email, source, "Error setting up build for %s on "\
+ "%s: The SRPM does not exist, or is not accessible. Remember to use absolute paths." % (source, target_alias))
+ return (-1, "SRPM does not exist or is not accessible, remember to use absolute paths.", -1)
++ else:
++ if not validate_scm_tag(source):
++ self.email_result(email, source, "Error setting up build for %s on "\
++ "%s: The SCM tag '%s' contained an illegal character. "\
++ "Submit a bug report?" % (package, target_alias, scm_tag))
++ return (-1, "The SCM tag contained an illegal character.", -1)
+
+ if not validate_package_name(package):
+ self.email_result(email, source, "Error setting up build for %s on "\
diff --git a/plague-0.4.5.8.tar.bz2 b/plague-0.4.5.8.tar.bz2
new file mode 100644
index 0000000..c56396c
--- /dev/null
+++ b/plague-0.4.5.8.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:315cc6dbd21585528d83dbe8c3c2bb0edd4b81f11306f355c6055b1f3f542607
+size 83175
diff --git a/plague.spec b/plague.spec
new file mode 100644
index 0000000..9819f36
--- /dev/null
+++ b/plague.spec
@@ -0,0 +1,417 @@
+BuildArch: noarch
+
+Summary: Distributed build system for RPMs
+Name: plague
+Version: 0.4.5.8
+Release: 2%{?dist}
+License: GPLv2+
+Group: Development/Tools
+#Source: http://fedoraproject.org/projects/plague/releases/%{name}-%{version}.tar.bz2
+Source: %{name}-%{version}.tar.bz2
+Patch0: plague-0.4.5.8-pushscript-extras.patch
+Patch1: plague-0.4.5.8-keepjobs.patch
+Patch2: plague-0.4.5.8-scm-updates.patch
+URL: http://www.fedoraproject.org/wiki/Projects/Plague
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: python
+Requires: createrepo >= 0.4.7
+# get the version of the sqlite api thats available to us
+%if 0%{?rhel}
+Requires: python-sqlite
+%else
+Requires: python-sqlite2
+%endif
+
+Requires: %{name}-common = %{version}-%{release}
+Requires(post): /sbin/chkconfig
+Requires(post): /sbin/service
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+
+
+%description
+The Plague build system is a client/server distributed build system for
+building RPM packages. This package provides the plague server.
+
+
+%package common
+Summary: Common resources for the Plague build system
+Group: Development/Tools
+Requires: pyOpenSSL
+
+%description common
+This package includes the common Python module that all Plague services
+require.
+
+
+%package builder
+Summary: Builder daemon for Plague builder slaves
+Group: Development/Tools
+Requires: %{name}-common = %{version}-%{release}
+Requires: yum >= 2.2.1
+Requires: mock >= 0.8
+Requires(post): /sbin/chkconfig
+Requires(post): /sbin/service
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+Requires(pre): /usr/sbin/useradd
+
+%description builder
+The Plague builder does the actual RPM package building on slave machines.
+
+%package client
+Summary: Package queueing client for the Plague build system
+Group: Development/Tools
+Requires: %{name}-common = %{version}-%{release}
+
+%description client
+Client program for enqueueing package builds and interrogating the build
+system.
+
+
+%package utils
+Summary: Utility programs for the Plague build system
+Group: Development/Tools
+Requires: %{name}-common = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
+
+%description utils
+This package includes user utilities for the Plague build system, including
+the interface to the build server.
+
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+
+%build
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
+chmod +x $RPM_BUILD_ROOT%{_bindir}/*
+install -p -D -m 0644 etc/plague-builder.config $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}-builder
+install -p -D -m 0755 etc/plague-builder.init $RPM_BUILD_ROOT%{_initrddir}/%{name}-builder
+install -p -D -m 0644 etc/plague-server.config $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}-server
+install -p -D -m 0755 etc/plague-server.init $RPM_BUILD_ROOT%{_initrddir}/%{name}-server
+mkdir -p $RPM_BUILD_ROOT/var/lib/plague/builder
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post
+/sbin/chkconfig --add plague-server
+/sbin/service plague-server condrestart >> /dev/null || :
+
+%preun
+if [ $1 = 0 ]; then
+ /sbin/service plague-server stop &> /dev/null
+ /sbin/chkconfig --del plague-server
+fi
+
+%pre builder
+/usr/sbin/useradd -G mock -s /sbin/nologin -M -r -d /var/lib/plague/builder plague-builder 2>/dev/null || :
+
+%post builder
+/sbin/chkconfig --add plague-builder
+/sbin/service plague-builder condrestart >> /dev/null || :
+
+%preun builder
+if [ $1 = 0 ]; then
+ /sbin/service plague-builder stop &> /dev/null
+ /sbin/chkconfig --del plague-builder
+fi
+
+%files
+%defattr(-, root, root)
+%{_bindir}/%{name}-server
+%dir %{_datadir}/%{name}/server
+%{_datadir}/%{name}/server/*.py*
+%dir %{_sysconfdir}/%{name}/server
+%dir %{_sysconfdir}/%{name}/server/certs
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-server
+%{_initrddir}/%{name}-server
+%doc www
+
+%files common
+%defattr(-, root, root)
+%doc README ChangeLog
+%dir %{_sysconfdir}/%{name}
+%dir %{_datadir}/%{name}
+%dir /usr/lib/python?.?/site-packages/%{name}
+/usr/lib/python?.?/site-packages/%{name}/*.py*
+
+%files builder
+%defattr(-, root, root)
+%{_bindir}/%{name}-builder
+%dir %{_datadir}/%{name}/builder
+%{_datadir}/%{name}/builder/*.py*
+%dir %{_sysconfdir}/%{name}/builder
+%dir %{_sysconfdir}/%{name}/builder/certs
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-builder
+%{_initrddir}/%{name}-builder
+%dir /var/lib/plague
+%attr(0755, plague-builder, plague-builder) /var/lib/plague/builder
+
+%files client
+%defattr(-, root, root)
+%{_bindir}/%{name}-client
+
+%files utils
+%defattr(-, root, root)
+%{_bindir}/%{name}-user-manager
+%{_bindir}/%{name}-certhelper
+
+
+%changelog
+* Fri Jul 14 2023 BogusDateBot
+- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
+ by assuming the date is correct and changing the weekday.
+ Mon Aug 19 2005 --> Mon Aug 15 2005 or Fri Aug 19 2005 or Mon Aug 22 2005 or ....
+
+* Sat Apr 9 2011 Shad L. Lords - 0.4.5.8-2
+- Apply patches to detect pushed packages, keep packages around, add git as a checkout method
+
+* Sat Apr 9 2011 Shad L. Lords - 0.4.5.8-1
+- Update to 0.4.5.8
+
+* Wed May 5 2010 Michael Schwendt - 0.4.5.7-7.20100505cvs
+- patch with fix from cvs (file download with Mock createrepo_on_rpms).
+
+* Sun Jul 26 2009 Fedora Release Engineering - 0.4.5.7-6.20090612cvs
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Fri Jul 17 2009 Michael Schwendt - 0.4.5.7-5.20090612cvs
+- patch with fix from cvs (SSLConnection.py shutdown)
+
+* Thu Feb 26 2009 Fedora Release Engineering - 0.4.5.7-4.20081216cvs
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Tue Dec 16 2008 Michael Schwendt - 0.4.5.7-3.20081216cvs
+- patch with fixes from cvs, also to make work with Python 2.6
+
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.4.5.7-2
+- Rebuild for Python 2.6
+
+* Wed Nov 5 2008 Michael Schwendt - 0.4.5.7-1
+- update to 0.4.5.7 (Python 2.4 fix and optional POSIX lockfile support)
+
+* Sun Sep 21 2008 Michael Schwendt - 0.4.5.6-1
+- update to 0.4.5.6
+
+* Sat Sep 20 2008 Michael Schwendt - 0.4.5.5-2
+- add fix for sqlite's limited ALTER TABLE
+
+* Mon Sep 8 2008 Michael Schwendt - 0.4.5.5-1
+- update to 0.4.5.5
+
+* Sun Sep 07 2008 Michael Schwendt - 0.4.5.4-1
+- update to 0.4.5.4 to make it work with MySQL 5
+
+* Sun Sep 7 2008 Michael Schwendt - 0.4.5.3-2
+- fix mod_user in plague-user-manager for sqlite2/3
+
+* Fri Sep 5 2008 Michael Schwendt - 0.4.5.3-1
+- update to 0.4.5.3 for sqlite2 compatibility fixes for Fedora
+- merge fedora pkg spec changes
+- include the www tree as server pkg docs
+
+* Thu Sep 04 2008 Dennis Gilmore - 0.4.5.2-1
+- fix bug in find option to plague-user-manager
+
+* Wed Sep 03 2008 Dennis Gilmore - 0.4.5.1-1
+- update to 0.4.5.1 applying Michael schwendt's logging and mock patches
+- using pysqlite2 on fedora and python-sqlite on RHEL
+- requires mock > 0.8
+- requires createrepo >= 0.4.7
+
+* Wed Sep 3 2008 Michael Schwendt - 0.4.5-2
+- add the patches from 0.4.5-0.4 (sqlite3, mock08, logtail)
+- merge more spec changes
+
+* Tue Sep 02 2008 Dennis Gilmore - 0.4.5-1
+- update to 0.4.5 lots of fixes
+
+* Thu May 22 2008 Seth Vidal - 0.4.4.1-6
+- licensing tag fix
+
+* Tue Sep 18 2007 Michael Schwendt - 0.4.4.1-5
+- Add dirs /etc/plague and /usr/share/plague to plague-common
+ since "plague-builder" and "plague" use them (#233904).
+
+* Fri Dec 15 2006 Toshio Kuratomi - 0.4.4.1-4
+- Small fix for a change in python 2.5's xmlrpc library. The patch has been
+ upstreamed.
+
+* Thu Dec 14 2006 Jason L Tibbitts III - 0.4.4.1-3
+- Rebuild for new Python
+
+* Thu Sep 14 2006 Dennis Gilmore 0.4.4.0-2
+- add patch for bad umask setting
+
+* Mon Mar 13 2006 Dan Williams 0.4.4.1-1
+- Update to 0.4.4.1
+- Fix createrepo dep to >= 0.4.3 (#rh170531)
+
+* Sun Mar 12 2006 Dan Williams 0.4.4-1
+- Update to 0.4.4 release
+ - Don't use pyOpenSSL's sendall() call, but simulate it to achieve
+ timeouts, better error handling, and more efficient CPU usage
+ - Fix up initscripts and lifecycle management
+ - Implement a TERM handler in server & builder for clean shutdown
+ - Ensure jobs don't hang around on builders if they get left there for
+ some reason (ie, server didn't unlock repo for the job)
+ - Make Additional Package Arches really work (kmod support)
+- Own /usr/lib/python?.?/site-packages/plague (#rh172794#)
+- Require createrepo >= 4.3 (#rh170531#)
+
+* Tue Jan 24 2006 Dan Williams 0.4.3-6
+- Increase build server builder thread sleep time to work around SSL issues
+- Spawn mock in a new process group, and when killing jobs kill the entire
+ process group. Hopefully fix orphaned rpmbuild processes on job kill
+
+* Mon Jan 23 2006 Dan Williams 0.4.3-5
+- Restore builder connection timeout
+
+* Mon Jan 23 2006 Dan Williams 0.4.3-4
+- Revert SSL fixes from last build
+
+* Sun Jan 22 2006 Dan Williams 0.4.3-3
+- Don't traceback when killing jobs on builders
+- Work around SSL hanging issues
+
+* Tue Nov 29 2005 Dan Williams 0.4.3-2
+- Move README and ChangeLog to -common package
+- Traceback/debug functionality added in server, depends on
+ threadframe module from elsewhere. Disabled by default.
+
+* Thu Nov 24 2005 Dan Williams 0.4.3-1
+- Add socket timeouts for fileserver and xmlrpc bits
+
+* Fri Nov 18 2005 Dan Williams 0.4.2-7
+- Suspend builders on hard errors such as running out of disk space
+- Retry downloads from server/builder 5 times, not 3
+- Log retried downloads on the server
+- Add socket timeouts to downloads to work around hanging issues
+ when downloading from the builder (the downloading/done issue)
+
+* Tue Nov 15 2005 Dan Williams 0.4.2-5
+- Log kill requests on the server
+
+* Mon Nov 14 2005 Dan Williams 0.4.2-4
+- In the builder, close files we open before exec-ing the
+ child process. Fixes massive file descriptor leaks.
+
+* Sun Nov 13 2005 Dan Williams 0.4.2-3
+- Hopefully fix builds not moving past downloading/done
+- Immediately kill jobs in the 'waiting' state when requested
+- Utilize pthread_sigmask python module, if present, on Python
+ 2.3 and earlier to work around signal blocking issues in
+ Python
+
+* Tue Nov 1 2005 Dan Williams 0.4.2-2
+- Make builders retry downloads from the server up to 3 times
+
+* Tue Nov 1 2005 Dan Williams 0.4.2-1
+- Fix job download from the builders
+- Fix RPM copy to the repository on the server
+
+* Mon Oct 31 2005 Dan Williams 0.4.1-1
+- Fail jobs on restart if we can't access the original SRPM
+- For the server, honor config file location passed in on
+ the command line (Jeff Sheltren)
+- Catch another mock failure case (Alexandr Kanevskiy)
+
+* Tue Oct 25 2005 Dan Williams 0.4-6
+- Retry downloads from builders up to 3 times before failing
+ the job
+
+* Tue Oct 25 2005 Dan Williams 0.4-5
+- Add a MySQL database backend (Jeff Sheltren)
+- Trap repo copy errors rather than doing a traceback
+- On the builder, deal correctly with jobs in 'downloaded' state
+ that have been killed
+
+* Wed Oct 19 2005 Dan Williams 0.4-4
+- Really fix client's "allow_uploads" problem
+
+* Wed Oct 19 2005 Dan Williams 0.4-3
+- Fix errors in client's 'job detail' function
+- Ignore missing "allow_uploads" option in client config file
+- Fix server when the Additional Package Arches section is missing
+ from a target config file
+- Make server more robust against random builder SSL issues
+
+* Mon Oct 17 2005 Dan Williams 0.4-2
+- Increase field size of 'username' and 'status' fields when
+ we initially create them on the server. Server ops will
+ need to increase manually or blow away their jobdb.
+
+* Sun Oct 16 2005 Dan Williams 0.4-1
+- Version 0.4
+ o Server:
+ - Per-target config files, new format
+ - Support PostgreSQL as a database backend
+
+ o Builder:
+ - Multiple concurrent builds with one builder process
+ - Better tracking of mock child processes
+ - Autodetect supported architectures and number of
+ concurrent build processes
+ - Per-target config files, new format
+
+ o Client:
+ - Ability to upload packages to server
+
+ o Utilities:
+ - New distro-rebuild.py utility
+ - Fixes for certhelper.py
+
+* Tue Aug 23 2005 Dan Williams 0.3.4-1
+- Version 0.3.4
+ o Make repo scripts actually work
+ o Don't traceback when cleaning up job files if we have none
+
+* Fri Aug 19 2005 Dan Williams 0.3.3-1
+ Mon Aug 19 2005 --> Mon Aug 15 2005 or Fri Aug 19 2005 or Mon Aug 22 2005 or ....
+- Version 0.3.3
+ o Add repo script support
+ o Fix double-slashes in log URL (Ignacio Vazquez-Abrams)
+ o Clear out old job info when requeueing jobs
+
+* Mon Aug 15 2005 Dan Williams 0.3.2-3
+- Clear out old job info when requeueing jobs
+
+* Mon Aug 15 2005 Dan Williams 0.3.2-2
+- Append %{?dist} to Releases to get correct precedence on FC3, FC4, and Rawhide
+
+* Mon Aug 15 2005 Dan Williams 0.3.2-1
+- Version 0.3.2
+ o Fix errors in enqueue and enqueue_srpm return values
+ o Implement client/server API versioning
+
+* Thu Aug 11 2005 Dan Williams 0.3.1-1
+- Version 0.3.1
+ o Clean up web interface error handling, catches more errors
+ o Clean up builder code, hopefully deal with block mock processes waiting
+ to write to stderr
+ o Use HTTP GET rather than POST for web forms, more back/forward/reload
+ friendly (Ville Skyttä)
+
+* Mon Aug 8 2005 Dan Williams 0.3-1
+- Version 0.3
+
+* Sat Jul 16 2005 Dan Williams
+- Bump version to 0.2
+- Grab python files from /usr/lib, not %%{_libdir} until the
+ multiarch issues get worked out
+
+* Sun Jun 26 2005 Dan Williams
+- first version/packaging