import sys, os
import getopt
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
import getpass
from common import checkdir
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
ftptree.quietmode=True
from common import checkdir
def __redraw_titlebar(self):
self.titlebar.clrtobot()
-# self.titlebar.addstr(0, self.scr_w-14, "pld-ftp-admin")
+# self.titlebar.addstr(0, self.scr_w-14, "tld-ftp-admin")
self.titlebar.addstr(0, 1, 'Window #%s' % self.window)
tmp="%s => %s" % (self.srctree, self.dsttree)
self.titlebar.addstr(0, int(self.scr_w/2-len(tmp)/2)-1, tmp)
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
import ftpio
import config
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os, stat, time, re
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
from config import incoming_dir, default_to, ftp_archs
from config import value as cval
import config
ftpio.unlock(cval['default_to'])
if moved_anything:
- os.system("%s/pld-ftp-admin/bin/pfa-genindex --quiet test > /dev/null" % (os.getenv("HOME")))
+ os.system("%s/tld-ftp-admin/bin/pfa-genindex --quiet test > /dev/null" % (os.getenv("HOME")))
import getopt
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
from common import checkdir
from config import ftp_dir,all_ftp_archs
import config
import sys, os, re
import getopt
import subprocess
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
from common import checkdir
import ftpio
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import time
from config import test_builds_dir, ftp_archs
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
from common import checkdir
import ftpio
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
from common import checkdir
import ftpio
import sys, os
import getopt
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
import getpass
from common import checkdir
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
from common import checkdir
import ftpio
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import ftptree
import ftpio
import config
+++ /dev/null
-#!/usr/bin/env python
-# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
-
-# Printing errors (no SyntaxErrors though, but that's not a problem)
-import sys, os
-sys.stderr=sys.stdout
-
-contenttypesent=False
-
-def myexceptionhandler(type, value, traceback):
- if contenttypesent:
- print '<pre>'
- sys.__excepthook__(type, value, traceback)
- print '</pre>'
- else:
- print "Content-Type: text/plain\n"
- sys.__excepthook__(type, value, traceback)
- sys.exit(1)
-
-sys.excepthook=myexceptionhandler
-# End printing errors
-
-sys.path.insert(0, '../modules')
-
-import wwwiface, user
-
-opts, cks = wwwiface.getopts()
-u=user.User(cks, opts)
-
-if u.loggedin:
- wwwiface.addheader('Logged in: '+u.login)
- wwwiface.addmenu(file='loggedinmenu')
- import wwwcmds
- wwwcmds.handlecmds(opts)
-else:
- wwwiface.addheader('Login form')
- wwwiface.addcontent(file='regform')
-
-wwwiface.sendhttpheaders()
-contenttypesent=True
-
-wwwiface.sendhtml()
-
+++ /dev/null
-You can find a comprehensive description of current features at
-http://cvs.pld-linux.org/cgi-bin/cvsweb/PLD-doc/PLD_2.0_ftp_administration
-
+++ /dev/null
-# vim:ft=python
-# see global config for more options: /etc/rpmlint/config
-
-# Configure the checks if you don't want the default ones.
-# --------------------------------------------------------
-
-#addCheck("FHSCheck")
-#addCheck("BinariesCheck")
-
-# Configuration options used by the checks shipped with rpmlint.
-# The values in the commented out setOption() calls represent default
-# or typical example values for the option.
-# -------------------------------------------------------------------
-setOption("UseEnchant", False)
-setOption("UseVersionInChangelog", False)
-
-# Base directory where to extract uninstalled packages while checking.
-# Type: string, default: tempfile.gettempdir()
-#setOption("ExtractDir", "/tmp")
-
-# Output filters.
-# ---------------
-#UseVersionInChangelog
-
-# these are against pld own policy
-addFilter("E: incoherent-version-in-name")
-addFilter("E: no-packager-tag")
-addFilter("E: no-signature")
-addFilter("W: macro-in-%changelog")
-addFilter("W: no-major-in-name")
-addFilter("W: python-bytecode-without-source")
-addFilter("W: requires-on-release")
-addFilter("E: init-script-non-executable /etc/rc.d/init.d/functions")
-
-# hard to fix at this time
-addFilter("E: non-executable-script")
-
-setOption("ValidLicenses", (
- # These are the short names for all of the PLD Linux approved licenses.
- 'BSD',
- 'GPL, Open Data License',
- 'GPL v2',
- 'LGPL v2.1',
- 'LGPL v3',
- 'MPL v1.1',
- 'LGPL',
-))
-
-# filter out stuff that is not critical for pkg move bypass
-addFilter("W: no-documentation")
-addFilter("W: no-manual-page-for-binary")
-
-# epoch match error or sth
-#dirac-libs.i486: W: ghost-files-without-postin
-#dirac-devel.i486: W: incoherent-version-dependency-on dirac/dirac-libs/libdirac 1.0.2 0:1.0.2
-addFilter("W: ghost-files-without-postin")
-addFilter("W: incoherent-version-dependency-on")
-
-# we have no strict lib package policy
-addFilter("E: outside-libdir-files")
-addFilter("E: executable-in-library-package")
-
-# not our problem to fix
-addFilter("E: incorrect-fsf-address")
-
-#addFilter("E: backup-file-in-package")
-#addFilter("E: arch-dependent-file-in-usr-share")
-#addFilter("E: world-writable")
-#addFilter("W: unexpanded-macro")
-#addFilter("E: init-script-non-executable")
-#addFilter("E: filename-not-utf8")
-#addFilter("E: info-dir-file")
-#addFilter("E: info-files-without-install-info-post")
-#addFilter("E: init-script-without-chkconfig-postin")
-#addFilter("E: init-script-without-chkconfig-preun")
-#addFilter("E: invalid-desktopfile /usr/share/applications")
-#addFilter("E: invalid-ldconfig-symlink")
-#addFilter("E: invalid-shell-in-")
-#addFilter("E: no-chkconfig-line")
-#addFilter("E: no-description-tag")
-#addFilter("E: no-ldconfig-symlink")
-#addFilter("E: non-empty-%postun")
-#addFilter("E: non-executable-script")
-#addFilter("E: non-ghost-file")
-#addFilter("E: non-root-group-log-file")
-#addFilter("E: non-utf8-desktopfile")
-#addFilter("E: tag-not-utf8")
-#addFilter("W: non-etc-or-var-file-marked-as-conffile")
-#addFilter("W: one-line-command-in-%post")
-#addFilter("W: one-line-command-in-%postun")
-#addFilter("W: one-line-command-in-%trigger")
-#addFilter("W: spurious-bracket-in-%post")
-#addFilter("W: spurious-bracket-in-%trigger")
-#addFilter("W: spurious-executable-perm")
-
-# to get important errors out
-addFilter("E: arch-dependent-file-in-usr-share")
-addFilter("E: arch-independent-package-contains-binary-or-object")
-addFilter("E: binary-or-shlib-defines-rpath")
-addFilter("E: compressed-symlink-with-wrong-ext")
-addFilter("E: description-line-too-long")
-addFilter("E: devel-dependency")
-addFilter("E: dir-or-file-in-home")
-addFilter("E: dir-or-file-in-tmp")
-addFilter("E: dir-or-file-in-usr-local")
-addFilter("E: executable-crontab-file")
-addFilter("E: executable-marked-as-config-file")
-addFilter("E: executable-sourced-script")
-addFilter("E: explicit-lib-dependency")
-addFilter("E: htaccess-file")
-addFilter("E: incoherent-logrotate-file")
-addFilter("E: incoherent-subsys")
-addFilter("E: incorrect-locale-subdir")
-addFilter("E: invalid-directory-reference")
-addFilter("E: invalid-soname")
-addFilter("E: invalid-version")
-addFilter("E: library-not-linked-against-libc")
-addFilter("E: library-without-ldconfig-postin")
-addFilter("E: library-without-ldconfig-postun")
-addFilter("E: menu-in-wrong-dir")
-addFilter("E: missing-PT_GNU_STACK-section")
-addFilter("E: no-binary")
-addFilter("E: no-dependency-on")
-addFilter("E: no-dependency-on locales-")
-addFilter("E: non-root-user-log-file")
-addFilter("E: non-standard-dir-perm")
-addFilter("E: non-standard-executable-perm")
-addFilter("E: non-standard-executable-perm /etc/rc.d/init.d/")
-addFilter("E: non-versioned-file-in-library-package")
-addFilter("E: no-signature")
-addFilter("E: no-status-entry")
-addFilter("E: no-summary-tag")
-addFilter("E: postin-without-chkconfig")
-addFilter("E: postin-without-install-info /usr/share/info")
-addFilter("E: postin-without-ldconfig")
-addFilter("E: postun-without-ldconfig")
-addFilter("E: preun-without-chkconfig")
-addFilter("E: python-bytecode-inconsistent-mtime")
-addFilter("E: rpath-in-buildconfig")
-addFilter("E: script-without-shebang")
-addFilter("E: setgid-binary")
-addFilter("E: setuid-binary")
-addFilter("E: shared-lib-without-dependency-information")
-addFilter("E: shlib-with-non-pic-code")
-addFilter("E: sourced-script-with-shebang")
-addFilter("E: standard-dir-owned-by-package")
-addFilter("E: statically-linked-binary")
-addFilter("E: subdir-in-bin")
-addFilter("E: subsys-not-used")
-addFilter("E: summary-too-long")
-addFilter("E: unknown-key GPG#e4f1bc2d")
-addFilter("E: unknown-lsb-keyword")
-addFilter("E: useless-provides")
-addFilter("E: use-of-home-in-%post")
-addFilter("E: use-old-pam-stack")
-addFilter("E: use-tmp-in-%pre")
-addFilter("E: version-control-internal-file")
-addFilter("E: wrong-script-end-of-line-encoding")
-addFilter("E: wrong-script-interpreter")
-addFilter("E: zero-length")
-addFilter("W: binaryinfo-readelf-failed")
-addFilter("W: binaryinfo-tail-failed")
-addFilter("W: class-path-in-manifest")
-addFilter("W: conffile-without-noreplace-flag")
-addFilter("W: cross-directory-hard-link")
-addFilter("W: dangerous-command-in-")
-addFilter("W: dangling-relative-symlink")
-addFilter("W: dangling-symlink")
-addFilter("W: devel-file-in-non-devel-package")
-addFilter("W: doc-file-dependency")
-addFilter("W: duplicate-executable")
-addFilter("W: executable-stack")
-addFilter("W: filename-too-long-for-joliet")
-addFilter("W: file-not-in-%lang")
-addFilter("W: file-not-utf8")
-addFilter("W: file-not-utf8 /usr/share/doc/")
-addFilter("W: file-not-utf8 /usr/share/man/")
-addFilter("W: hidden-file-or-dir")
-addFilter("W: incoherent-init-script-name")
-addFilter("W: incoherent-subsys")
-addFilter("W: infopage-not-compressed")
-addFilter("W: invalid-license")
-addFilter("W: invalid-url")
-addFilter("W: jar-not-indexed")
-addFilter("W: log-files-without-logrotate")
-addFilter("W: manpage-not-compressed")
-addFilter("W: manual-page-warning /usr/share/man/")
-addFilter("W: missing-lsb-keyword")
-addFilter("W: name-repeated-in-summary")
-addFilter("W: no-default-runlevel")
-addFilter("W: no-dependency-on")
-addFilter("W: non-conffile-in-etc")
-addFilter("W: non-executable-in-bin")
-addFilter("W: non-standard-dir-in-usr")
-addFilter("W: non-standard-dir-in-var")
-addFilter("W: non-standard-gid")
-addFilter("W: non-standard-group")
-addFilter("W: non-standard-uid")
-addFilter("W: no-provides")
-addFilter("W: no-reload-entry")
-addFilter("W: no-soname")
-addFilter("W: no-url-tag")
-addFilter("W: no-version-in-last-changelog")
-addFilter("W: obsolete-not-provided")
-addFilter("W: ocaml-naming-policy-not-applied")
-addFilter("W: only-non-binary-in-usr-lib")
-addFilter("W: percent-in-%post")
-addFilter("W: percent-in-%trigger")
-addFilter("W: perl5-naming-policy-not-applied")
-addFilter("W: postin-without-ghost-file-creation")
-addFilter("W: private-shared-object-provides")
-addFilter("W: python-naming-policy-not-applied")
-addFilter("W: read-error")
-addFilter("W: requires-on-release")
-addFilter("W: service-default-enabled")
-addFilter("W: shared-lib-calls-exit")
-addFilter("W: spelling-error")
-addFilter("W: summary-ended-with-dot")
-addFilter("W: summary-not-capitalized")
-addFilter("W: symlink-should-be-relative")
-addFilter("W: tag-in-description")
-addFilter("W: unable-to-read-zip")
-addFilter("W: uncompressed-zip")
-addFilter("W: unexpanded-macro /usr/share/ri/");
-addFilter("W: unexpanded-macro /var/lib/gdm/.gconf.mandatory/%gconf-tree.xml")
-addFilter("W: unstripped-binary-or-object")
-addFilter("W: wrong-file-end-of-line-encoding")
-addFilter("W: xmms-naming-policy-not-applied")
-addFilter("E: non-readable")
-# kde4-kdenetwork-kppp.x86_64
-addFilter("W: unexpanded-macro /usr/share/apps/kppp/");
-addFilter("kde4-.* W: self-obsoletion");
-
# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
import sys, os
-sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
+sys.path.insert(0, os.environ['HOME']+'/tld-ftp-admin/modules')
import cons
def daemonize():
+++ /dev/null
-</body>
-</html>
-
+++ /dev/null
-<html>
-
-<head>
-<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
-<title>PLD ftp manager - Th</title>
-<style type="text/css" media="all">@import "../html/layout.css";</style>
-</head>
-
-<body>
-
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="StyleSheet" href="styles.css" type="text/css">
- <title>PLD Th :: Info Page</title>
-</head>
-<body>
-
-<h3>
- <a href="http://www.pld-linux.org/ThInfo">About PLD Th</a>
-</h3>
-
-<h3>Builder queue</h3>
-<p>
-<li><a href="http://src.th.pld-linux.org/queue.html">PLD Th</a></li>
-</p>
-
-<h3>Dep checks</h3>
-<p>
-<li><a href="qa.php?q=main">Main deps x86_64</a></li>
-<li><a href="qa.php?q=main-ready">Main ready deps x86_64</a></li>
-<li><a href="qa.php?q=main-ready-test">Main+ready+test deps x86_64</a></li>
-
-<li><a href="qa.php?q=main-i686">Main deps i686</a></li>
-<li><a href="qa.php?q=main-ready-i686">Main ready deps i686</a></li>
-<li><a href="qa.php?q=main-ready-test-i686">Main+ready+test deps i686</a></li>
-
-<li><a href="qa.php?q=main-x32">Main deps x32</a></li>
-<li><a href="qa.php?q=main-ready-x32">Main ready deps x32</a></li>
-<li><a href="qa.php?q=main-ready-test-x32">Main+ready+test deps x32</a></li>
-
-</p>
-
-<h3>Freshness checks</h3>
-<p>
-<li><a href="qa.php?q=ac-th-diff">Differences between AC and TH</a></li>
-<li><a href="qa.php?q=freshness">Th main+test freshness (compare to git)</a></li>
-</p>
-
-<h3>Rpmlint checks</h3>
-<p>
-<li><a href="qa.php?q=lint-PLD">rpmlint: PLD tree</a></li>
-<li><a href="qa.php?q=lint-ready">rpmlint: ready tree</a></li>
-<li><a href="qa.php?q=lint-test">rpmlint: test tree</a></li>
-</p>
-</body>
-</html>
+++ /dev/null
-body {\r
- margin:0px;\r
- padding:0px;\r
- font-family:verdana, arial, helvetica, sans-serif;\r
- color:#333;\r
- background-color:white;\r
- }\r
-h1 {\r
- margin:0px 0px 15px 0px;\r
- padding:0px;\r
- font-size:28px;\r
- line-height:28px;\r
- font-weight:900;\r
- color:#ccc;\r
- }\r
-p {\r
- font:11px/20px verdana, arial, helvetica, sans-serif;\r
- margin:0px 0px 16px 0px;\r
- padding:0px;\r
- }\r
-#Content>p {margin:0px;}\r
-#Content>p+p {text-indent:30px;}\r
-\r
-a {\r
- color:#09c;\r
- font-size:11px;\r
- text-decoration:none;\r
- font-weight:600;\r
- font-family:verdana, arial, helvetica, sans-serif;\r
- }\r
-a:link {color:#09c;}\r
-a:visited {color:#07a;}\r
-a:hover {background-color:#eee;}\r
-\r
-#Header {\r
- margin:25px 0px 10px 0px;\r
- padding:17px 0px 0px 20px;\r
- /* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */\r
- height:33px; /* 14px + 17px + 2px = 33px */\r
- border-style:solid;\r
- border-color:black;\r
- border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */\r
- line-height:11px;\r
- background-color:#eee;\r
-\r
-/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. \r
-Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. \r
-IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style \r
-declaration. The incorrect IE5/Win value is above, while the correct value is \r
-below. See http://glish.com/css/hacks.asp for details. */\r
- voice-family: "\"}\"";\r
- voice-family:inherit;\r
- height:14px; /* the correct height */\r
- }\r
-/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct \r
-length values to user agents that exhibit the parsing error exploited above yet get \r
-the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include\r
-a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */\r
-body>#Header {height:14px;}\r
-\r
-#Content {\r
- margin:0px 50px 50px 200px;\r
- padding:10px;\r
- }\r
-\r
-#Menu {\r
- position:absolute;\r
- top:100px;\r
- left:20px;\r
- width:172px;\r
- padding:10px;\r
- background-color:#eee;\r
- border:1px dashed #999;\r
- line-height:17px;\r
-/* Again, the ugly brilliant hack. */\r
- voice-family: "\"}\"";\r
- voice-family:inherit;\r
- width:150px;\r
- }\r
-/* Again, "be nice to Opera 5". */\r
-body>#Menu {width:150px;}\r
-\r
+++ /dev/null
-<a href="index.py?action=logout">Logout</a><br/>
+++ /dev/null
-<a href="http://bugs.pld-linux.org/index.php?tasks=all&project=3">Th bugs</a><br/>
-<a href="http://buildlogs.pld-linux.org/">Buildlogs</a><br/>
+++ /dev/null
-<html>
-<head>
-<link rel="Shortcut Icon" href="//www.pld-linux.org/favicon.ico"/>
- <title>PLD QA Reports</title>
- <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="//srcbuilder.pld-linux.org/th/style.css">
- <style>
- .hidden { display: none; }
- span#count { font-weight: bold; }
- </style>
-</head>
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
-<script>
-jQuery(function($) {
- $('#q').on('change', function(e) {
- var el = e.target;
- var o = el.options;
- var v = o[o.selectedIndex].value;
- location.href = "?q=" + v;
- });
-
- var $lines = $('#lines>li');
- var $count = $('#count');
- $('#filter').on('keyup', function() {
- var search = $(this).val();
- var count = 0;
- $lines.each(function() {
- var $line = $(this);
- var text = $line.text();
- var fn = text.match(search) && ++count ? 'removeClass' : 'addClass';
- $line[fn]('hidden');
- });
- $count.html(count);
- });
- $count.html($lines.length);
-});
-</script>
-<body>
-<?php
-
-$report = isset($_GET['q']) ? basename($_GET['q']) : null;
-$reports = array(
- "main" => "Main deps x86_64",
- "main-ready" => "Main ready deps x86_64",
- "main-ready-test" => "Main+ready+test deps x86_64",
-
- "main-i686" => "Main deps i686",
- "main-ready-i686" => "Main ready deps i686",
- "main-ready-test-i686" => "Main+ready+test deps i686",
-
- "main-x32" => "Main deps x32",
- "main-ready-x32" => "Main ready deps x32",
- "main-ready-test-x32" => "Main+ready+test deps x32",
-
- "freshness" => "GIT vs FTP freshness",
-
- "lint-PLD" => "rpmlint: main",
- "lint-test" => "rpmlint: test",
- "lint-ready" => "rpmlint: ready",
-);
-
-function reports_selection($reports) {
- global $report;
- echo "Select report:";
- echo "<select id=q name=q>\n";
- foreach ($reports as $q => $title) {
- printf("<option value=%s %s>%s</option>\n", $q, $q == $report ? 'selected' :'', $title);
- }
- echo "</select>\n";
-}
-
-/**
- * Create text input for filtering results
- */
-function filter_box() {
- echo '<br>Filter results: <input id="filter">';
- echo '<br><span id="count">?</span> errors';
-}
-
-function format_report($report) {
- echo "<br>View the <a href=$report.txt>raw</a> report<br/>\n";
- $file = "$report.txt";
- $giturl = 'http://git.pld-linux.org/gitweb.cgi?p=packages/%1$s.git;f=%1$s.spec;h=HEAD;a=shortlog';
- echo '<ol id="lines">';
- foreach (file($file) as $line) {
- $line = preg_replace_callback('/^(?P<prefix>error:|GIT:)\s*\[(?P<spec>[^]]+)\]\s*(?P<msg>.+)$/', function($m) use ($giturl) {
- $package = basename($m['spec'], '.spec');
- $url = sprintf($giturl, $package);
- return sprintf('<li><font color=red>%s</font> [<a href="%s">%s</a>] %s', $m['prefix'], $url, $m['spec'], $m['msg']);
- }, $line);
- echo $line, "<br/>\n";
- }
- echo '</ol>';
-}
-
-reports_selection($reports);
-filter_box();
-if (isset($reports[$report])) {
- format_report($report);
-}
-
-?>
-</body>
-</html>
+++ /dev/null
-<form action="index.py" method="post">
-<input type="hidden" name="action" value="register">
-<label for="login">Username:</label>
-<input type="text" name="login"><br>
-<label for="pass">Password:</label>
-<input type="password" name="pass"><br>
-<input type="submit" value="Log in">
-</form>
sys.exit(1)
if 'HOME' in os.environ:
- ftpadmdir = os.environ['HOME'] + '/pld-ftp-admin'
+ ftpadmdir = os.environ['HOME'] + '/tld-ftp-admin'
else:
ftpadmdir = '..'
pubsock=config.value['pubsock']
if os.environ.has_key('HOME'):
- privsock=os.environ['HOME']+'/pld-ftp-admin/var/privsock'
+ privsock=os.environ['HOME']+'/tld-ftp-admin/var/privsock'
socketname=privsock
else:
socketname=pubsock
-# various completions for pld-ftp-admin tools
+# various completions for tld-ftp-admin tools
# Author: Elan Ruusamäe <glen@pld-linux.org>
# return list of pld ftp trees
fi
export EDITOR=vim
-PATH=$PATH:~/pld-ftp-admin/bin
+PATH=$PATH:~/tld-ftp-admin/bin
# .bashrc - file executed when executing bash
# ftp admin aliases
-alias rmpkg=~/pld-ftp-admin/bin/pfa-rmpkg
-alias gen-indexes=~/pld-ftp-admin/bin/pfa-genindex
-alias dump-locks=~/pld-ftp-admin/bin/pfa-dump-locks
-alias signpkg=~/pld-ftp-admin/bin/pfa-signpkg
-alias mvpkg=~/pld-ftp-admin/bin/pfa-mvpkg
-alias testmvpkg=~/pld-ftp-admin/bin/pfa-testmvpkg
-alias lintpkg=~/pld-ftp-admin/bin/pfa-lintpkg
+alias rmpkg=~/tld-ftp-admin/bin/pfa-rmpkg
+alias gen-indexes=~/tld-ftp-admin/bin/pfa-genindex
+alias dump-locks=~/tld-ftp-admin/bin/pfa-dump-locks
+alias signpkg=~/tld-ftp-admin/bin/pfa-signpkg
+alias mvpkg=~/tld-ftp-admin/bin/pfa-mvpkg
+alias testmvpkg=~/tld-ftp-admin/bin/pfa-testmvpkg
+alias lintpkg=~/tld-ftp-admin/bin/pfa-lintpkg
# usual aliases to make your terminal usable
alias ls='ls --color=auto -BFN --show-control-chars'
unlocktree() {
for tree in "$@"; do
(
- cd ~/pld-ftp-admin/modules
+ cd ~/tld-ftp-admin/modules
python -c "
import ftpio
ftpio.connect()
+++ /dev/null
-#!/usr/bin/python
-
-import os
-import re
-import struct
-
-acdir = "/home/ftp/pub/Linux/PLD/dists/ac/PLD/SRPMS/SRPMS"
-thdir = "/home/ftp/pub/Linux/PLD/dists/th/PLD/SRPMS/RPMS/"
-
-thpkg = []
-acpkg = []
-
-ign = '^(xorg-.*|X11-.*|XcursorTheme-.*)$'
-re_c = re.compile(ign)
-
-re_n = re.compile('^(.*)-([^-]*)-([^-]*)$')
-
-def getname(file):
- #f = os.popen('rpm --nomd5 --nodigest --nosignature -qp --queryformat "%{NAME}" ' + file, "r")
- #name = f.read()
- #f.close()
- #f = open(file, 'rb')
- #rpmlead = f.read(96)
- #f.close()
- #data = struct.unpack("6B2h66s2h16s", rpmlead)
- #name = data[8].strip()
- #print name
- m = re_n.match(file)
- name = m.group(1).strip()
- return name
-
-for rpm in os.listdir(acdir):
- if re_c.match(rpm):
- continue
- acpkg.append(getname(rpm))
-
-for rpm in os.listdir(thdir):
- if re_c.match(rpm):
- continue
- thpkg.append(getname(rpm))
-
-thpkg.sort()
-acpkg.sort()
-
-print "*****************************************************"
-print "Packages in AC repo that are not in TH repo:"
-for pkg in acpkg:
- if pkg not in thpkg:
- print pkg
-
-print
-print
-print "*****************************************************"
-print "Packages in TH repo that are not in AC repo:"
-for pkg in thpkg:
- if pkg not in acpkg:
- print pkg
+++ /dev/null
-#!/bin/sh
-
-dir="$1"
-cd $dir || exit 1
-
-for f in *.rpm ; do
- g=$(rpm --qf '%{GROUP}' -qp $f)
- level=".."
- a="$g"
- b=
- while [ "$a" != "$b" ]; do
- b="$a"
- a=${a#*/}
- level="${level}/.."
- done
- [ -d "../by-group/$g" ] || mkdir -p "../by-group/$g"
- ln -sf "$level/RPMS/$f" "../by-group/$g/$f"
-done
-
-# remove dangling symlinks...
-symlinks -dr $dir/../by-group
-# and empty directories
-find $dir/../by-group -depth -type d -empty -exec rmdir {} \;
+++ /dev/null
-#!/bin/sh
-# stat(1) each file in .info to see if they exist
-
-REPODIR=${1:-/home/pld/admins/th/ftp/test}
-
-# expand files from .info file
-expand_info() {
- awk -F ':' -vD="$REPODIR/" '
- /file:/ {
- if (/-debuginfo-/) {
- print D $2 "/debuginfo/" $3
- } else {
- print D $2 "/RPMS/" $3
- }
- }
- ' "$@"
-}
-
-i=0
-nn=
-ls -1 $REPODIR/SRPMS/RPMS | sed -rne "s/^((.+)-[^-]+-[^-]+\.src\.rpm)$/\1.info/p" | \
-while read pkg; do
- for f in $(expand_info $REPODIR/SRPMS/.metadata/$pkg); do
- if ! stat $f >/dev/null; then
- echo "!!!: $pkg : $f" >&2
- fi
- done
-done
+++ /dev/null
-#!/usr/bin/python
-# arekm, 2008
-# remove
-
-import os
-import re
-import time
-import rpm
-import sys
-
-re_rpm = re.compile(r'.*\.rpm$')
-re_nvr = re.compile('^(.*)-([^-]*)-([^-]*)\.rpm$')
-dir = '/home/pld/admins/th/ftp/.archive/PLD/SRPMS/RPMS'
-
-ts = rpm.TransactionSet("", (rpm.RPMVSF_NOHDRCHK or rpm.RPMVSF_NEEDPAYLOAD))
-
-def compare(f1, f2):
- try:
- fd1 = os.open(os.path.join(dir, f1), os.O_RDONLY)
- except Exception, e:
- print e
- # ignore non-files
- return 0
- try:
- fd2 = os.open(os.path.join(dir, f2), os.O_RDONLY)
- except Exception, e:
- print e
- # ignore non-files
- return 0
- h1 = ts.hdrFromFdno(fd1)
- h2 = ts.hdrFromFdno(fd2)
- os.close(fd1)
- os.close(fd2)
-
- l1 = rpm.versionCompare(h1, h2)
- l2 = rpm.versionCompare(h2, h1)
-
- if l1 > 0 and l2 > 0:
- return 0
-
- return -l1
-
-
-def find_old(files):
- return sorted(files, compare)
-
-files = {}
-dupes = {}
-
-for file in os.listdir(dir):
- if not re_rpm.match(file):
- continue
-
- m = re_nvr.match(file)
- if not m:
- print "problem with: %s" % file
- sys.exit(1)
-
- if len(sys.argv) == 0:
- p = os.path.join(dir, file)
- mtime = os.stat(p).st_mtime
- if mtime > time.time() - 3*86400:
- continue
-
- name = m.group(1)
-
- if files.has_key(name):
- if dupes.has_key(name):
- dupes[name].append(file)
- else:
- dupes[name] = [ files[name] ]
- dupes[name].append(file)
- else:
- files[name] = file
-
-for i in dupes.iterkeys():
- for old in find_old(dupes[i])[1:]:
- os.system("/home/pld/admins/th/pld-ftp-admin/scripts/remove.py .archive/PLD %s" % old)
+++ /dev/null
-#!/usr/bin/python
-# arekm, 2008
-# remove
-
-import os
-import re
-import time
-import rpm
-import sys
-
-re_info = re.compile(r'.*\.info$')
-re_nvr = re.compile('^(.*)-([^-]*)-([^-]*)\.info$')
-dir = '/home/pld/admins/th/ftp/test/SRPMS/.metadata'
-
-def compare(f1, f2):
- m1 = re_nvr.match(f1)
- n1 = m1.group(1)
- v1 = m1.group(2)
- r1 = m1.group(3)
-
- m2 = re_nvr.match(f2)
- n2 = m2.group(1)
- v2 = m2.group(2)
- r2 = m2.group(3)
-
- l1 = rpm.labelCompare((n1, v1, r1), (n2, v2, r2))
- l2 = rpm.labelCompare((n2, v2, r2), (n1, v1, r1))
-
- if l1 > 0 and l2 > 0:
- return 0
-
- return -l1
-
-
-def find_old(files):
- return sorted(files, compare)
-
-files = {}
-dupes = {}
-
-for file in os.listdir(dir):
- if not re_info.match(file):
- continue
-
- m = re_nvr.match(file)
- if not m:
- print "problem with: %s" % file
- sys.exit(1)
-
- if len(sys.argv) == 0:
- p = os.path.join(dir, file)
- mtime = os.stat(p).st_mtime
- if mtime > time.time() - 3*86400:
- continue
-
- name = m.group(1)
-
- if files.has_key(name):
- if dupes.has_key(name):
- dupes[name].append(file)
- else:
- dupes[name] = [ files[name] ]
- dupes[name].append(file)
- else:
- files[name] = file
-
-for i in dupes.iterkeys():
- for old in find_old(dupes[i])[1:]:
- os.system("/home/pld/admins/th/pld-ftp-admin/scripts/remove.py test %s" % old)
+++ /dev/null
-#!/usr/bin/python
-# arekm, 2008
-# remove
-
-import os
-import re
-import time
-import rpm
-import sys
-
-re_rpm = re.compile(r'.*\.rpm$')
-re_nvr = re.compile('^(.*)-([^-]*)-([^-]*)\.rpm$')
-dir = '/home/pld/admins/th/ftp/test/SRPMS/RPMS'
-
-ignore = re.compile('^(kernel-.*)$')
-#|\
-#crash-.*|\
-#dahdi-linux-.*|\
-#e1000e-.*|\
-#igb-.*|\
-#ipset-.*|\
-#iscsitarget-.*|\
-#ixgbe-.*|\
-#kernel-net-wl-.*|\
-#lin_tape-.*|\
-#linux-fusion-.*|\
-#linuxrdac-.*|\
-#lirc-.*|\
-#lttng-modules-.*|\
-#madwifi-ng-.*|\
-#nvidiabl-.*|\
-#open-vm-tools-.*|\
-#openvswitch-.*|\
-#r8168-.*|\
-#spl-.*|\
-#tpm_emulator-.*|\
-#VirtualBox-.*|\
-#vpb-driver-.*|\
-#xorg-driver-video-fglrx-.*|\
-#xorg-driver-video-fglrx-legacy-.*|\
-#xorg-driver-video-nvidia-.*|\
-#xorg-driver-video-nvidia-legacy3-.*|\
-#xorg-driver-video-nvidia-legacy-304xx-.*|\
-#xtables-addons-.*)$')
-
-ts = rpm.TransactionSet("", (rpm.RPMVSF_NOHDRCHK or rpm.RPMVSF_NEEDPAYLOAD))
-
-def compare(f1, f2):
- try:
- fd1 = os.open(os.path.join(dir, f1), os.O_RDONLY)
- except Exception, e:
- print e
- # ignore non-files
- return 0
- try:
- fd2 = os.open(os.path.join(dir, f2), os.O_RDONLY)
- except Exception, e:
- print e
- # ignore non-files
- return 0
- try:
- h1 = ts.hdrFromFdno(fd1)
- except Exception, e:
- print "hdrFromFdno for %s failed: %s" % (f1, e)
- os.close(fd1)
- os.close(fd2)
- return 0
-
- try:
- h2 = ts.hdrFromFdno(fd2)
- except Exception, e:
- print "hdrFromFdno for %s failed: %s" % (f2, e)
- os.close(fd1)
- os.close(fd2)
- return 0
-
- os.close(fd1)
- os.close(fd2)
-
- l1 = rpm.versionCompare(h1, h2)
- l2 = rpm.versionCompare(h2, h1)
-
- if l1 > 0 and l2 > 0:
- return 0
-
- return -l1
-
-
-def find_old(files):
- return sorted(files, compare)
-
-files = {}
-dupes = {}
-
-for file in os.listdir(dir):
- if not re_rpm.match(file):
- continue
-
- if ignore.match(file):
- continue
-
- m = re_nvr.match(file)
- if not m:
- print "problem with: %s" % file
- sys.exit(1)
-
- if len(sys.argv) == 0:
- p = os.path.join(dir, file)
- mtime = os.stat(p).st_mtime
- if mtime > time.time() - 3*86400:
- continue
-
- name = m.group(1)
-
- if files.has_key(name):
- if dupes.has_key(name):
- dupes[name].append(file)
- else:
- dupes[name] = [ files[name] ]
- dupes[name].append(file)
- else:
- files[name] = file
-
-for i in dupes.iterkeys():
- for old in find_old(dupes[i])[1:]:
- print "removing: %s" % old
- os.system("/home/pld/admins/th/pld-ftp-admin/scripts/remove.py test %s" % old)
+++ /dev/null
-#!/bin/sh
-LC_ALL=C; export LC_ALL
-cd /home/pld/admins/th/ftp/test/SRPMS/.metadata || exit 1
-#for file in `find . -name '*.info' -print`; do
-for file in `find . -name '*.info' -mtime +1 -print`; do
- dfile=$(basename $file | sed -e 's#^\./##g')
- if (~/pld-ftp-admin/scripts/test-move.py test ready "$dfile" | grep -q "has only src.rpm built"); then
- echo "Removing $dfile..."
- ~/pld-ftp-admin/scripts/remove.py test "$dfile"
- fi
-done
-for file in `find . -name '*.info' -mtime +100`; do
- dfile=$(basename $file | sed -e 's#^\./##g')
- echo "Removing $dfile..."
- ~/pld-ftp-admin/scripts/remove.py test "$dfile"
-done
+++ /dev/null
-#!/bin/sh
-
-export LC_ALL=C
-
-filter_deps() {
- if [ $1 = "x32" ]; then
- grep -Ev "(uname\(release\)|-multilib-|\/eclipse\/|statifier|kernel-nopae-source-|kernel-tools-perf-vdso|libreoffice|iceape|iceweasel|icedove|nodejs)"
- else
- grep -Ev "(uname\(release\)|-multilib-|\/eclipse\/|statifier|kernel-nopae-source-|kernel-tools-perf-vdso)"
- fi
-}
-
-# group errors by same error kind
-group_deps() {
- local t=$(mktemp)
- cat > $t
- sed -ne 's/.*req \(.*\) not found.*/\1/p' $t | sort -u | while read dep; do
- grep -F "req $dep not found" $t
- done
- rm -f $t
-}
-
-# convert pkg name to src.rpm name
-# uses poldek
-pkg2src() {
- local t=$(mktemp)
- local t3=$(mktemp)
-
- # save input
- cat > $t
-
- # create list of N-V-R.A.rpm -> src-N pairs from error report
- # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
- sed -ne 's/error: \(.*\): req .* not found/\1/p' $t | sort -u | \
- xargs -d '\n' poldek --noignore -Q "$@" --cmd ls -q -s | \
- sed -rne "s/^([^\t ]+)[\t ]+(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\2/p" >$t3
-
- local pkg error message srpm
- while read error pkg message; do
- # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
- srpm=$(awk -vpkg="${pkg%:}" '$1 == pkg {printf("%s.spec", $2)}' $t3)
- if [ -z "$srpm" ]; then
- echo >&2 "srpms: No match for [${pkg%:}]"
- fi
- echo "$error [$srpm] $pkg $message"
- done < $t
-
- rm -f $t $t3
-}
-
-gen_list() {
- arch=$1
- shift
- date
- poldek -O "auto directory dependencies = yes" \
- --ignore "*-debuginfo-*" \
- --ignore "opera-plugin32-*" \
- --ignore "nspluginwrapper-*" \
- --ignore "mbrola-voice-*" \
- --ignore "pysql-*" \
- --ignore "yasql-*" \
- --ignore "kde4-kdenetwork-kopete-protocol-skype-*.x86_64" \
- --ignore "libpurple-protocol-skype-*.x86_64" \
- --ignore "nagios-plugin-check_cciss-*" \
- --ignore "libpng1*" \
- --verify=deps -Q "$@" | filter_deps $arch | group_deps | pkg2src "$@" | sort
-}
-
-gen_list_uniq() {
- arch=$1
- shift
- gen_list $arch -O"unique package names = yes" "$@"
-}
-
-t=$(mktemp)
-ftpdir=$HOME/ftp
-for arch in x86_64 i686 x32 ; do
- if [ "$arch" = x86_64 ]; then
- outfext=.txt
- else
- outfext=-$arch.txt
- fi
- gen_list $arch -s $ftpdir/PLD/$arch/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main$outfext
- gen_list_uniq $arch -s $ftpdir/PLD/$arch/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/$arch/RPMS/ -s $ftpdir/ready/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready$outfext
- gen_list_uniq $arch -s $ftpdir/PLD/$arch/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/$arch/RPMS/ -s $ftpdir/ready/noarch/RPMS/ -s $ftpdir/test/$arch/RPMS/ -s $ftpdir/test/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-test$outfext
-done
-
-chmod 644 $HOME/www/*.txt
-rm -f $t
+++ /dev/null
-#!/usr/bin/python
-
-import os
-import re
-
-import rpm
-
-dirs = ['/home/services/ftp/pld/dists/3.0/PLD/x32/RPMS',
- '/home/services/ftp/pld/dists/3.0/PLD/i686/RPMS',
- '/home/services/ftp/pld/dists/3.0/PLD/x86_64/RPMS',
- '/home/services/ftp/pld/dists/3.0/ready/x32/RPMS',
- '/home/services/ftp/pld/dists/3.0/ready/i686/RPMS',
- '/home/services/ftp/pld/dists/3.0/ready/x86_64/RPMS',
- '/home/services/ftp/pld/dists/3.0/test/x32/RPMS',
- '/home/services/ftp/pld/dists/3.0/test/i686/RPMS',
- '/home/services/ftp/pld/dists/3.0/test/x86_64/RPMS']
-
-#dirs = ['/home/services/ftp/pld/dists/3.0/test/x86_64/RPMS']
-
-outname = "/home/pld/admins/th/www/name-srcname.txt"
-
-re_rpm = re.compile(r'.*\.rpm$')
-re_nvr = re.compile('^(.*)-([^-]*)-([^-]*)\.rpm$')
-
-ts = rpm.ts()
-ts.setVSFlags(-1)
-pkgs = {}
-for dir in dirs:
- for file in os.listdir(dir):
- if not re_rpm.match(file):
- continue
-
- rpm_file = os.path.join(dir, file)
-
- fdno = os.open(rpm_file, os.O_RDONLY)
- try:
- hdr = ts.hdrFromFdno(fdno)
- except Exception, e:
- print "hdrFromFdno: %s: %s" % (rpm_file, e)
- os.close(fdno)
- continue
- os.close(fdno)
-
- name = hdr[rpm.RPMTAG_NAME]
- sourcerpm = hdr[rpm.RPMTAG_SOURCERPM]
- m = re_nvr.match(sourcerpm)
- if not m:
- print "%s: doesn't match src.rpm file name" % (sourcerpm)
- continue
- srcname = m.group(1)
- pkgs[name] = srcname
-
-f = open(outname + ".tmp", "w")
-for (pkg, spkg) in pkgs.iteritems():
- f.write("%s:%s\n" % (pkg, spkg))
-f.close()
-os.chmod(outname + ".tmp", 0644)
-os.rename(outname + ".tmp", outname)
-
+++ /dev/null
-#!/bin/sh
-date > $HOME/www/freshness.txt.new
-/usr/bin/time -f '\nElapsed time: %E' $HOME/bin/ftp-freshness.py >> $HOME/www/freshness.txt.new 2>&1
-chmod 644 $HOME/www/freshness.txt.new
-mv $HOME/www/freshness.txt.new $HOME/www/freshness.txt
-
+++ /dev/null
-#!/usr/bin/python
-# arekm, 2007
-
-import os
-import re
-import struct
-import rpm
-import subprocess
-
-# earlier == more important
-dirs = [ "/home/ftp/pub/Linux/PLD/dists/th/test/SRPMS/RPMS/",
- "/home/ftp/pub/Linux/PLD/dists/th/ready/SRPMS/RPMS/",
- "/home/ftp/pub/Linux/PLD/dists/th/PLD/SRPMS/RPMS/" ]
-#dirs = [ "/home/pld/admins/th/1" ]
-specsdir = "/home/pld/admins/th/SPECS"
-
-if os.path.isdir(specsdir):
- os.chdir(specsdir)
- cmd = ['git', 'pull']
-else:
- cmd = ['git', 'clone', '--depth=1', 'git://git.pld-linux.org/SPECS', specsdir]
-
-p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-(out, err) = p.communicate(None)
-
-
-os.chdir(specsdir)
-class Pkgs(object):
- def __init__(self):
- self.pkg = {}
- self.cvs = {}
- self.cvs_new_nvr = []
- self.cvs_new_nv = []
- self.re_n = re.compile('^(.*)-([^-]*)-([^-]*)\.src\.rpm$')
-
- def __get_from_rpm(self, file_name):
- m = self.re_n.match(file_name)
- if not m:
- return False
- name = m.group(1).strip()
- version = m.group(2).strip()
- release = m.group(3).strip()
- return (name, version, release)
-
- def __get_from_cvs(self, name):
- f = os.popen('rpm --specfile -q --queryformat "%{name}\n%{version}\n%{release}\n" ' + specsdir + '/' + name + '.spec 2> /dev/null', 'r')
- name = f.readline().strip()
- version = f.readline().strip()
- release = f.readline().strip()
- f.close()
- return (name, version, release)
-
- def __update_cvs(self, name):
- if not self.cvs.has_key(name):
- self.cvs[name] = self.__get_from_cvs(name)
-
- def __update_new(self, name):
- cvs_nvr = self.cvs[name]
- pkg_nvr = self.pkg[name]
-
- cvs_rpm_vr = rpm.labelCompare((cvs_nvr[0], cvs_nvr[1], cvs_nvr[2]), (pkg_nvr[0], pkg_nvr[1], pkg_nvr[2]))
- cvs_rpm_v = rpm.labelCompare((cvs_nvr[0], cvs_nvr[1], ""), (pkg_nvr[0], pkg_nvr[1], ""))
- rpm_cvs_vr = rpm.labelCompare((pkg_nvr[0], pkg_nvr[1], pkg_nvr[2]), (cvs_nvr[0], cvs_nvr[1], cvs_nvr[2]))
- rpm_cvs_v = rpm.labelCompare((pkg_nvr[0], pkg_nvr[1], ""), (cvs_nvr[0], cvs_nvr[1], ""))
-
- if rpm_cvs_v < 0 and cvs_rpm_v > 0:
- self.cvs_new_nv.append(name)
- else:
- if rpm_cvs_vr < 0 and cvs_rpm_vr > 0 and cvs_nvr[1] == pkg_nvr[1]:
- self.cvs_new_nvr.append(name)
-
- def prepare(self):
- self.cvs_new_nvr.sort()
- self.cvs_new_nvr = list(set(self.cvs_new_nvr))
- self.cvs_new_nv.sort()
- self.cvs_new_nv = list(set(self.cvs_new_nv))
-
- pkgs = list(self.pkg) + list(self.cvs)
-
- for name in list(set(pkgs)):
- self.__update_new(name)
-
- def add_rpm(self, file_name):
- nvr = self.__get_from_rpm(file_name)
- if not nvr:
- return False
- name = nvr[0]
- if self.pkg.has_key(name):
- if rpm.labelCompare(nvr, self.pkg[name]) > 0:
- del self.pkg[name]
- self.pkg[name] = nvr
- else:
- self.pkg[name] = nvr
- self.__update_cvs(name)
-
- def print_nvr(self):
- print "*** VERSION-RELEASE COMPARE FOR THE SAME VERSIONS ONLY ***"
- for name in self.cvs_new_nvr:
- self.cvs_new_nvr.sort()
- cvs_nvr = self.cvs[name]
- pkg_nvr = self.pkg[name]
- print "GIT: [%s.spec] %s-%s-%s vs FTP: %s-%s-%s" % (name, cvs_nvr[0], cvs_nvr[1], cvs_nvr[2], pkg_nvr[0], pkg_nvr[1], pkg_nvr[2])
-
- def print_nv(self):
- print "*** VERSION COMPARE ONLY ***"
- self.cvs_new_nv.sort()
- for name in self.cvs_new_nv:
- cvs_nvr = self.cvs[name]
- pkg_nvr = self.pkg[name]
- print "GIT: [%s.spec] %s-%s-%s vs FTP: %s-%s-%s" % (name, cvs_nvr[0], cvs_nvr[1], cvs_nvr[2], pkg_nvr[0], pkg_nvr[1], pkg_nvr[2])
-
-p = Pkgs()
-
-for d in dirs:
- for rpm_file_name in os.listdir(d):
- p.add_rpm(rpm_file_name)
-
-p.prepare()
-
-p.print_nv()
-print "\n\n"
-p.print_nvr()
+++ /dev/null
-#!/bin/sh
-# check for packages on ftp whose .spec does not exist (anymore)
-# this is extremely heavy on cvs server, so you run it once per month or so
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-
-export LC_ALL=C
-ftpdir=$HOME/ftp
-wwwdir=$HOME/www
-CVSROOT=:pserver:cvs@cvs.pld-linux.org:/cvsroot
-d=$-
-
-orphaned_pkgs() {
- set -$d
- [ -s $t/pkgs.desc ] || /usr/bin/poldek --skip-installed "$@" --cmd "desc *" > $t/pkgs.desc
- [ -s $t/pkgs.lst ] || sed -n 's/^Source package: \(.*\)-[^-]\+-[^-]\+$/\1/p' $t/pkgs.desc | sort -u > $t/pkgs.lst
- # {w32codec,acroread,...}-installer pkgs
- sed -i -e 's,-installer$,,' $t/pkgs.lst
- for pkg in $(cat $t/pkgs.lst); do
- # use awk to match package without any regexp fuzz
- awk -vpkg=$pkg.spec -vm=1 '$1 == pkg{m=0} END{exit m}' $t/cvs.lst || echo Obsolete: $pkg
- done
-}
-
-# generate list of .specs on ftp. needs cvsnt client
-cvs_pkgs() {
- set -$d
- [ -s $t/cvs.raw ] || cvs -d $CVSROOT -Q ls -e packages > $t/cvs.raw 2>/dev/null
- [ -s $t/cvs.dirs ] || awk -F/ '$1 == "D" { print $2 } ' $t/cvs.raw > $t/cvs.dirs
- [ -s $t/cvs.specs ] || {
- while read pkg; do
- cvs -d $CVSROOT -Q ls -e packages/$pkg/$pkg.spec 2>/dev/null
- done < $t/cvs.dirs > $t/cvs.lst.tmp && mv $t/cvs.lst.tmp $t/cvs.specs
- }
- [ -s $t/cvs.lst ] || awk -F/ '$1 == "" { print $2 } ' $t/cvs.specs > $t/cvs.lst
-}
-
-
-set -e
-t=$(mktemp -d)
-#t=/home/pld/admins/th/tmp/tmp.KOCrX7BtOy
-
-cvs_pkgs
-orphaned_pkgs -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t/orphaned.txt && cat $t/orphaned.txt > $wwwdir/main-orphaned4.txt
-
-chmod 644 $wwwdir/*.txt
-#rm -rf $t
+++ /dev/null
-#!/bin/sh
-# check for packages on local system with PLD-doc/PLD-update-TODO
-# Author: Elan Ruusamäe <glen@pld-linux.org>
-# Date: 2012-04-05
-
-export LC_ALL=C
-CVSROOT=:pserver:cvs@cvs.pld-linux.org:/cvsroot
-d=$-
-
-# generate list of package basenames from rpmdb
-rpm_pkgs() {
- set -$d
-
- [ -s $t/rpm.db ] || rpm -qa --qf '%{SOURCERPM} %{VERSION}\n' > $t/rpm.db
-
- # translate pkg names to basenames
- [ -s $t/rpm.basenames ] || sed -re 's,^(.+)-[^-]+-[^-]+ ,\1 ,' $t/rpm.db > $t/rpm.basenames
- # uniq
- [ -s $t/rpm.lst ] || sort -u $t/rpm.basenames > $t/rpm.lst
-}
-
-# fetch PLD-update-TODO
-cvs_todo() {
- set -$d
-
- [ -s $t/PLD-doc/PLD-update-TODO ] || (cd $t; cvs -d $CVSROOT -Q co PLD-doc/PLD-update-TODO)
-
- # reformat for easier parsing
- # amaya(13) [OLD] 9.54 [NEW] 11.0
- # vim [OLD] 7.3.401 [NEW] 7.3.515
- [ -s $t/rpm.todo ] || sed -rne 's,^([^( ]+).*?\[NEW\] (.+)$,\1 \2,p' $t/PLD-doc/PLD-update-TODO > $t/rpm.todo
-
- # TODO: should uniq as well:
- # $ grep links2 PLD-doc/PLD-update-TODO
- # links2(22) [OLD] 2.2 [NEW] 2.6
- # links2(25) [OLD] 2.1pre28 [NEW] 2.6
-}
-
-rpm_diff() {
-# set -$d
-
- rpm_pkgs
- cvs_todo
-
- [ -s $t/rpm.diffs ] || {
- set +e
- while read pkg v2; do
- v1=$(awk -vpkg=$pkg '$1 == pkg {print $2}' $t/rpm.lst)
- [ "$v1" ] || continue
-
- cmp=$(rpmvercmp $v1 $v2)
- if [ $? -eq 2 ]; then
- echo "$pkg $cmp"
- fi
- done < $t/rpm.todo
- set -e
- }
-}
-
-set -e
-t=$(mktemp -d)
-#t=.
-
-rpm_diff
-
-rm -rf $t