]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- missed new files
authorMarcin Krol <hawk@tld-linux.org>
Thu, 28 Jul 2016 12:30:06 +0000 (12:30 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 28 Jul 2016 12:30:06 +0000 (12:30 +0000)
TLD_Builder/blacklist.py [new file with mode: 0644]
TLD_Builder/script.js [new file with mode: 0644]
TLD_Builder/style.css [new file with mode: 0644]
etc/tld-builder.sysconfig [new file with mode: 0644]

diff --git a/TLD_Builder/blacklist.py b/TLD_Builder/blacklist.py
new file mode 100644 (file)
index 0000000..40367c2
--- /dev/null
@@ -0,0 +1,50 @@
+# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
+
+import string
+import fnmatch
+import os
+import stat
+import re
+
+import path
+import log
+import status
+from mailer import Message
+from config import config
+
+class Blacklist_File:
+    def __init__(self):
+        self.reload()
+
+    def try_reload(self):
+        mtime = os.stat(path.blacklist_file)[stat.ST_MTIME]
+        if mtime != self.blacklist_file_mtime:
+            log.notice("blacklist file has changed, reloading...")
+            self.reload()
+            return True
+        return False
+
+    def reload(self):
+        self.blacklist_file_mtime = os.stat(path.blacklist_file)[stat.ST_MTIME]
+        self.blacklist = set()
+        status.push("reading package-blacklist")
+        f = open(path.blacklist_file)
+        for l in f:
+            p = l.rstrip()
+            if re.match(r"^#.*", p):
+                continue
+            self.blacklist.add(p)
+            log.notice("blacklist added: %s" % l)
+        f.close()
+        status.pop()
+
+    def package(self, p):
+#       log.notice("blacklist check: %s (%d)" % (p, self.blacklist.has_key(p)))
+        if p in self.blacklist:
+            return True
+        return False
+
+    def packages(self):
+        return self.blacklist
+
+blacklist = Blacklist_File()
diff --git a/TLD_Builder/script.js b/TLD_Builder/script.js
new file mode 100644 (file)
index 0000000..5b8b060
--- /dev/null
@@ -0,0 +1,42 @@
+jQuery(function($) {
+       update_tz();
+       filter_requesters();
+
+       // setup relative time display
+       function update_tz() {
+               $('time.timeago').timeago();
+       }
+
+       // draw filter for requesters
+       function filter_requesters() {
+               var requesters = ['everyone'];
+               $('div b.requester').each(function(i, d) {
+                       var requester = $(d).text();
+                       if (!~requesters.indexOf(requester)) {
+                               requesters.push(requester);
+                       }
+               });
+
+               var $filter = $('#requesters-filter');
+               if ($filter.length == 0) {
+                       $filter = $('<div id=requesters-filter>Filter by requesters:<br></div>');
+                       $('body').prepend($filter);
+               }
+               requesters.forEach(function(r) {
+                       var $button = $('<button class=request-filter>'+ r + '</button>');
+                       $button.on('click', function() {
+                               $('div#requesters-filter button').removeAttr('disabled');
+                               $('div.request').filter(function(i, d) {
+                                       var c = $(d).find('b.requester').text();
+                                       if (c == r || r == 'everyone') {
+                                               $(d).show();
+                                               $button.attr('disabled', 'disabled');
+                                       } else {
+                                               $(d).hide();
+                                       }
+                               })
+                       })
+                       $filter.append($button);
+               });
+       }
+});
diff --git a/TLD_Builder/style.css b/TLD_Builder/style.css
new file mode 100644 (file)
index 0000000..82e2150
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * css from www.pld-linux.org (moinmoin) wiki theme, using css usage firebug plugin to cleanup
+ */
+html {
+       background-color: white;
+       color: #5e5e5e;
+       font-family: Tahoma, Arial, Lucida Grande, sans-serif;
+       font-size: 0.75em;
+       line-height: 1.25em;
+}
+
+a {
+       text-decoration: underline;
+       color: #006;
+}
+
+a:hover {
+       color: #006;
+}
+
+pre {
+       background: #FFF8EB;
+       border: 1pt solid #FFE2AB;
+       font-family: courier, monospace;
+       padding: 0.5em;
+       white-space: pre-wrap;
+       word-wrap: break-word;
+}
+
+@media screen, projection {
+       html {
+               background-color: #f3efe3;
+       }
+
+       body {
+               position: relative;
+       }
+
+       div.request {
+               background-color: white;
+               margin: 10px 0px;
+               padding: 2px;
+       }
+       div > a {
+               font-weight: bold;
+               color: #5e5e5e;
+       }
+       div > a:hover {
+               color: #5e5e5e;
+       }
+       div.upgrade {
+               background-color: #e4f1cf;
+       }
+       div:target {
+               background-color: #ffffcc;
+               color: black;
+       }
+
+       #header {
+               background-color: white;
+               border: 1px solid black;
+               padding: 0.5em;
+               position: fixed;
+               right: 0px;
+               bottom: 0px;
+               z-index: 100;
+       }
+
+       #content {
+               clear: both;
+               overflow: auto;
+               position: absolute;
+               width: 100%;
+       }
+}
+@media print {
+       a {
+               background-color: inherit;
+               color: inherit;
+       }
+       #header {
+               display: none;
+       }
+}
+
+@media projection {
+       html { line-height: 1.8em; }
+       body, b, a, p { font-size: 22pt; }
+}
diff --git a/etc/tld-builder.sysconfig b/etc/tld-builder.sysconfig
new file mode 100644 (file)
index 0000000..c0a3832
--- /dev/null
@@ -0,0 +1,3 @@
+# define chroots whose /proc to mount on startup
+
+#CHROOTS=/srv/builders/tld/th/{i686,x86_64}