From: Marcin Krol Date: Thu, 5 Sep 2019 18:38:22 +0000 (+0200) Subject: - tldized X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=f7b22268ab563fa906be0653d037f1805e220e5c;p=tld-ftp-admin.git - tldized --- diff --git a/bin/pfa-checksign b/bin/pfa-checksign index 14060e2..0da6f61 100755 --- a/bin/pfa-checksign +++ b/bin/pfa-checksign @@ -3,7 +3,7 @@ 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 diff --git a/bin/pfa-checktree b/bin/pfa-checktree index 226e4df..b2e424a 100755 --- a/bin/pfa-checktree +++ b/bin/pfa-checktree @@ -2,7 +2,7 @@ # 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 @@ -164,7 +164,7 @@ class Screen: 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) diff --git a/bin/pfa-dump-locks b/bin/pfa-dump-locks index 32fdfdf..84b9b95 100755 --- a/bin/pfa-dump-locks +++ b/bin/pfa-dump-locks @@ -2,7 +2,7 @@ # 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 diff --git a/bin/pfa-from-incoming b/bin/pfa-from-incoming index 6523ea1..3d7ea08 100755 --- a/bin/pfa-from-incoming +++ b/bin/pfa-from-incoming @@ -2,7 +2,7 @@ # 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 @@ -276,4 +276,4 @@ for arch in ftp_archs: 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"))) diff --git a/bin/pfa-genindex b/bin/pfa-genindex index dc12b64..a5133c5 100755 --- a/bin/pfa-genindex +++ b/bin/pfa-genindex @@ -3,7 +3,7 @@ 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 diff --git a/bin/pfa-lintpkg b/bin/pfa-lintpkg index c9ae537..dca510f 100755 --- a/bin/pfa-lintpkg +++ b/bin/pfa-lintpkg @@ -4,7 +4,7 @@ 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 diff --git a/bin/pfa-maintainer b/bin/pfa-maintainer index 0d2ea04..87fe48b 100755 --- a/bin/pfa-maintainer +++ b/bin/pfa-maintainer @@ -2,7 +2,7 @@ # 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 diff --git a/bin/pfa-mvpkg b/bin/pfa-mvpkg index 5693465..dc225d1 100755 --- a/bin/pfa-mvpkg +++ b/bin/pfa-mvpkg @@ -2,7 +2,7 @@ # 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 diff --git a/bin/pfa-rmpkg b/bin/pfa-rmpkg index 8054135..d5ee340 100755 --- a/bin/pfa-rmpkg +++ b/bin/pfa-rmpkg @@ -2,7 +2,7 @@ # 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 diff --git a/bin/pfa-signpkg b/bin/pfa-signpkg index d45fc7c..e976b2f 100755 --- a/bin/pfa-signpkg +++ b/bin/pfa-signpkg @@ -3,7 +3,7 @@ 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 diff --git a/bin/pfa-testmvpkg b/bin/pfa-testmvpkg index 53a0e48..c35c71e 100755 --- a/bin/pfa-testmvpkg +++ b/bin/pfa-testmvpkg @@ -2,7 +2,7 @@ # 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 diff --git a/bin/pfa-unlocktree b/bin/pfa-unlocktree index 43acb09..32e06a4 100755 --- a/bin/pfa-unlocktree +++ b/bin/pfa-unlocktree @@ -2,7 +2,7 @@ # 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 diff --git a/cgi-bin/index.py b/cgi-bin/index.py deleted file mode 100755 index 208a66a..0000000 --- a/cgi-bin/index.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 '
'
-        sys.__excepthook__(type, value, traceback)
-        print '
' - 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() - diff --git a/doc/README b/doc/README deleted file mode 100644 index 5b15bc4..0000000 --- a/doc/README +++ /dev/null @@ -1,3 +0,0 @@ -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 - diff --git a/etc/rpmlint b/etc/rpmlint deleted file mode 100644 index 3a84113..0000000 --- a/etc/rpmlint +++ /dev/null @@ -1,233 +0,0 @@ -# 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"); - diff --git a/ftpiod/ftpiod.py b/ftpiod/ftpiod.py index 1726904..00f2a2e 100755 --- a/ftpiod/ftpiod.py +++ b/ftpiod/ftpiod.py @@ -2,7 +2,7 @@ # 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(): diff --git a/html/footer.html b/html/footer.html deleted file mode 100644 index 69aae56..0000000 --- a/html/footer.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/html/header.html b/html/header.html deleted file mode 100644 index 80a3694..0000000 --- a/html/header.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -PLD ftp manager - Th - - - - - diff --git a/html/index.html b/html/index.html deleted file mode 100644 index b54a43e..0000000 --- a/html/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - PLD Th :: Info Page - - - -

- About PLD Th -

- -

Builder queue

-

-

  • PLD Th
  • -

    - -

    Dep checks

    -

    -

  • Main deps x86_64
  • -
  • Main ready deps x86_64
  • -
  • Main+ready+test deps x86_64
  • - -
  • Main deps i686
  • -
  • Main ready deps i686
  • -
  • Main+ready+test deps i686
  • - -
  • Main deps x32
  • -
  • Main ready deps x32
  • -
  • Main+ready+test deps x32
  • - -

    - -

    Freshness checks

    -

    -

  • Differences between AC and TH
  • -
  • Th main+test freshness (compare to git)
  • -

    - -

    Rpmlint checks

    -

    -

  • rpmlint: PLD tree
  • -
  • rpmlint: ready tree
  • -
  • rpmlint: test tree
  • -

    - - diff --git a/html/layout.css b/html/layout.css deleted file mode 100644 index d7ead8a..0000000 --- a/html/layout.css +++ /dev/null @@ -1,82 +0,0 @@ -body { - margin:0px; - padding:0px; - font-family:verdana, arial, helvetica, sans-serif; - color:#333; - background-color:white; - } -h1 { - margin:0px 0px 15px 0px; - padding:0px; - font-size:28px; - line-height:28px; - font-weight:900; - color:#ccc; - } -p { - font:11px/20px verdana, arial, helvetica, sans-serif; - margin:0px 0px 16px 0px; - padding:0px; - } -#Content>p {margin:0px;} -#Content>p+p {text-indent:30px;} - -a { - color:#09c; - font-size:11px; - text-decoration:none; - font-weight:600; - font-family:verdana, arial, helvetica, sans-serif; - } -a:link {color:#09c;} -a:visited {color:#07a;} -a:hover {background-color:#eee;} - -#Header { - margin:25px 0px 10px 0px; - padding:17px 0px 0px 20px; - /* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */ - height:33px; /* 14px + 17px + 2px = 33px */ - border-style:solid; - border-color:black; - border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */ - line-height:11px; - background-color:#eee; - -/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. -Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. -IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style -declaration. The incorrect IE5/Win value is above, while the correct value is -below. See http://glish.com/css/hacks.asp for details. */ - voice-family: "\"}\""; - voice-family:inherit; - height:14px; /* the correct height */ - } -/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct -length values to user agents that exhibit the parsing error exploited above yet get -the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include -a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */ -body>#Header {height:14px;} - -#Content { - margin:0px 50px 50px 200px; - padding:10px; - } - -#Menu { - position:absolute; - top:100px; - left:20px; - width:172px; - padding:10px; - background-color:#eee; - border:1px dashed #999; - line-height:17px; -/* Again, the ugly brilliant hack. */ - voice-family: "\"}\""; - voice-family:inherit; - width:150px; - } -/* Again, "be nice to Opera 5". */ -body>#Menu {width:150px;} - diff --git a/html/loggedinmenu.html b/html/loggedinmenu.html deleted file mode 100644 index cd63ab1..0000000 --- a/html/loggedinmenu.html +++ /dev/null @@ -1 +0,0 @@ -Logout
    diff --git a/html/menufooter.html b/html/menufooter.html deleted file mode 100644 index c1f08de..0000000 --- a/html/menufooter.html +++ /dev/null @@ -1,2 +0,0 @@ -Th bugs
    -Buildlogs
    diff --git a/html/qa.php b/html/qa.php deleted file mode 100644 index a24416e..0000000 --- a/html/qa.php +++ /dev/null @@ -1,103 +0,0 @@ - - - - PLD QA Reports - - - - - - - "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 "\n"; -} - -/** - * Create text input for filtering results - */ -function filter_box() { - echo '
    Filter results: '; - echo '
    ? errors'; -} - -function format_report($report) { - echo "
    View the raw report
    \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 '
      '; - foreach (file($file) as $line) { - $line = preg_replace_callback('/^(?Perror:|GIT:)\s*\[(?P[^]]+)\]\s*(?P.+)$/', function($m) use ($giturl) { - $package = basename($m['spec'], '.spec'); - $url = sprintf($giturl, $package); - return sprintf('
    1. %s [%s] %s', $m['prefix'], $url, $m['spec'], $m['msg']); - }, $line); - echo $line, "
      \n"; - } - echo '
    '; -} - -reports_selection($reports); -filter_box(); -if (isset($reports[$report])) { - format_report($report); -} - -?> - - diff --git a/html/regform.html b/html/regform.html deleted file mode 100644 index dde6db4..0000000 --- a/html/regform.html +++ /dev/null @@ -1,8 +0,0 @@ -
    - - -
    - -
    - -
    diff --git a/modules/common.py b/modules/common.py index 19f3aa8..39279de 100644 --- a/modules/common.py +++ b/modules/common.py @@ -15,7 +15,7 @@ def checkdir(dir): sys.exit(1) if 'HOME' in os.environ: - ftpadmdir = os.environ['HOME'] + '/pld-ftp-admin' + ftpadmdir = os.environ['HOME'] + '/tld-ftp-admin' else: ftpadmdir = '..' diff --git a/modules/ftpio.py b/modules/ftpio.py index 5e0132b..96fbc53 100644 --- a/modules/ftpio.py +++ b/modules/ftpio.py @@ -9,7 +9,7 @@ import config 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 diff --git a/shell/bash-completion.sh b/shell/bash-completion.sh index ca05c32..63e6af8 100644 --- a/shell/bash-completion.sh +++ b/shell/bash-completion.sh @@ -1,4 +1,4 @@ -# various completions for pld-ftp-admin tools +# various completions for tld-ftp-admin tools # Author: Elan Ruusamäe # return list of pld ftp trees diff --git a/shell/bash_profile b/shell/bash_profile index 8221875..9c12952 100644 --- a/shell/bash_profile +++ b/shell/bash_profile @@ -43,4 +43,4 @@ if [ "$FTPADM" ]; then fi export EDITOR=vim -PATH=$PATH:~/pld-ftp-admin/bin +PATH=$PATH:~/tld-ftp-admin/bin diff --git a/shell/bashrc b/shell/bashrc index 09ca3f5..1edd4c9 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -1,13 +1,13 @@ # .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' @@ -26,7 +26,7 @@ fi unlocktree() { for tree in "$@"; do ( - cd ~/pld-ftp-admin/modules + cd ~/tld-ftp-admin/modules python -c " import ftpio ftpio.connect() diff --git a/wwwbin/ac-th-diff.py b/wwwbin/ac-th-diff.py deleted file mode 100755 index b8a518d..0000000 --- a/wwwbin/ac-th-diff.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/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 diff --git a/wwwbin/by-group.sh b/wwwbin/by-group.sh deleted file mode 100755 index f00c93b..0000000 --- a/wwwbin/by-group.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 {} \; diff --git a/wwwbin/checkrepo.sh b/wwwbin/checkrepo.sh deleted file mode 100755 index db2cff1..0000000 --- a/wwwbin/checkrepo.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/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 diff --git a/wwwbin/clean-dups-archive.py b/wwwbin/clean-dups-archive.py deleted file mode 100755 index 4961c39..0000000 --- a/wwwbin/clean-dups-archive.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/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) diff --git a/wwwbin/clean-dups-old.py b/wwwbin/clean-dups-old.py deleted file mode 100755 index e0ba2a0..0000000 --- a/wwwbin/clean-dups-old.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/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) diff --git a/wwwbin/clean-dups.py b/wwwbin/clean-dups.py deleted file mode 100755 index 003b538..0000000 --- a/wwwbin/clean-dups.py +++ /dev/null @@ -1,127 +0,0 @@ -#!/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) diff --git a/wwwbin/clean-test.sh b/wwwbin/clean-test.sh deleted file mode 100755 index 475f84f..0000000 --- a/wwwbin/clean-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 diff --git a/wwwbin/consistency-check.sh b/wwwbin/consistency-check.sh deleted file mode 100755 index 25ed2c3..0000000 --- a/wwwbin/consistency-check.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/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 diff --git a/wwwbin/dump-packagenames.py b/wwwbin/dump-packagenames.py deleted file mode 100755 index 59f9e89..0000000 --- a/wwwbin/dump-packagenames.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/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) - diff --git a/wwwbin/freshness.sh b/wwwbin/freshness.sh deleted file mode 100755 index 4646650..0000000 --- a/wwwbin/freshness.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 - diff --git a/wwwbin/ftp-freshness.py b/wwwbin/ftp-freshness.py deleted file mode 100755 index aa27b37..0000000 --- a/wwwbin/ftp-freshness.py +++ /dev/null @@ -1,122 +0,0 @@ -#!/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() diff --git a/wwwbin/obsolete-check.sh b/wwwbin/obsolete-check.sh deleted file mode 100755 index 52a9f81..0000000 --- a/wwwbin/obsolete-check.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/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 - -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 diff --git a/wwwbin/rpmcheck.sh b/wwwbin/rpmcheck.sh deleted file mode 100755 index 35f4373..0000000 --- a/wwwbin/rpmcheck.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# check for packages on local system with PLD-doc/PLD-update-TODO -# Author: Elan Ruusamäe -# 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