C.J. Adams-Collier: You might on occasion confuse us with professionals
If we keep this up, you might.
If we keep this up, you might.
Don t spend the first two minutes of the first episode of your podcast
telling everyone what a micropodcast is, and how iTunes only lets you have
20MB per episode. The only exception to this might be if you were making a
podcast about podcasting. Which I wasn t.
That is all.
Tonight I upgraded my personal machine to run the recently released 3.5[.0]
kernel.
On my personal machine(s) I'm usually loathe to change a running
kernel, but this one was a good step forward because it allows me to
experiment with seccomp
filters.
I've tested the trivial
"no new privileges" pctl and I followed along with the
nice seccomp tutorial
which gave me simple working code which I married to my javascript
interpreter.
On top of that I upgraded node.js,
which meant I had to clean up a little depreciated code in my node reverse
proxy - which is the public face of the websites I run upon my box.
(The proxy tunnels to about 10 different thttpd instances, each running
upon 127.0.0.1:xx).
Happily however my weekend was not full of code, it was brightened by
the opportunity to take pictures of Aurora
and her long hair - more to come
as I've still got about 350 images to wade through..
ObQuote: "Don't you think I make a remarkable queen? " - St.
Trinian's (2007)
RCBW report for 2012/29 (16.7.-22.7.)
The motto for this week was:
Harfbuzz (more correctly harfbuzz-ng) is a Text Layout/shaping engine. Mostly supporting rendering
of Text including complex scripts. A quote taken from Wikipedia which describes harfbuzz
HarfBuzz (in Persian: ) is a layout/shaping engine for OpenType fonts. Its purpose is to standardize text layout in FOSS; its code originally started as part of the FreeType project, was then developed separately in Qt and Pango, and finally merged back into a common repository. Both Qt and Pango currently use HarfBuzz; other standalone users include Firefox and Chromium, the open source project behind Google Chrome.Coming directly to the point. You can get Harfbuzz from its Git repository hosted on Freedesktop. It requires following library and binary compilation
1. ragel: Finite state machine code compiler
2. libglib2.0-dev: Glib Development files
3. libcairo2-dev : Cairo 2D graphics library development files
4. libicu-dev: Development components for International components for Unicode
5. libgraphite2-dev: Development files for libgraphite2
6. libfreetype6-dev: Freetype 2 library development files
Once you install all the above package. Follow following commands to build the harfbuzz.
./autogen.sh
./configure --prefix=/usr
make
sudo make install
I can't remember exactly when, it was either pre-Zoe heart-related diagnostic
imaging or during her pregnancy with Zoe, that it became apparent that Sarah
had gall stones.
Apparently it's not uncommon for women to develop them after pregnancy, and
it turns out that Sarah is slightly more genetically predisposed to getting
them to boot. So it wasn't terribly surprising when she started having some
pain recently. She had another ultrasound to confirm it, and went off to see
a surgeon.
Apparently they care more about the symptoms than the number of stones in
the gallbladder, and they don't bother removing the stones and keeping the
gallbladder, so she was booked in for a cholecystectomy last Thursday.
It was a pretty straightforward procedure, she was out of the operating room
in just under an hour, and awake a bit over an hour after that.
I've had a few friends need to have a cholecystectomy, and the photos on
Wikipedia have always fascinated me, particularly this one. It
seems so freaky to have a gallbladder full of that much gravel. It can't be
comfortable. We're going to be able to pick up Sarah's stones on Monday, so
it'll be interesting to see what they look like.
Sarah's recovering now. It's one of the few surgeries she's had under
general anaesthesia where she hasn't been sick afterwards, so that was a
good start. The procedure was done laparoscopically, using four incisions,
and to give themselves room to work, they inflate the body with carbon
dioxide gas, which then has to work its way out of her body over the
following days. So she's dealing with some bloating, bruising and swelling
at the moment, but not doing too badly. Apparently if you're vertical for
too long, the gas can work its way up to your diaphragm, which causes some
shoulder pain, so the trick has been to walk around a bit, then lie down for
a bit, and then rinse and repeat.
She's not allowed to lift Zoe for 3-4 weeks, which presents a few
challenges for us, but nothing insurmountable (hopefully). We converted
Zoe's crib to a toddler bed a week before the surgery, and Zoe thought that
was just the best thing ever, and has taken to it really well. I'm around
at home for breakfast and dinner, so I can take care of the lifting into
and out of the high chair for those meals, and Zoe can eat lunch at her
little table. Zoe's also pretty good about getting into and out of the car
by herself (not that Sarah can drive until she's off the painkillers) and
she's normally in daycare two days a week. She's in daycare again on Monday,
so Sarah won't have to deal with Zoe on her own until Tuesday, and we have
backup daycare arrangements we can fall back on if need be. Zoe's been very
good about Sarah not being able to pick her up, and been very gentle. It
helped with the explanation that Sarah could show her all of her "owwies".
The surgeon was saying that only 1 in 400 people need to alter their diet
after removing their gallbladder, so we're hopeful that Sarah will do just
fine without it. She'll certainly be more comfortable in the long run.
Various security folks at work have been keen on a newer version of audit be in Ubuntu
(preferably 12.04), but unfortunately the Debian maintainer has been too busy
to package it for Debian, so I finally carved out some time recently to do an
upload
to experimental, with his permission.
It would have been really nice to land it in unstable before Wheezy froze, but
as it involved a library transition, and I didn't get a chance to talk to the
release team about it until very close to the freeze, they said it was too
late.
That meant the grand plan of getting it into Ubuntu 12.10 and then trying to
get it into precise-backports went up in smoke as well. Oh well.
It was a fair bit of work to package. A lot of the patches were no longer
relevant, and the remaining ones all needed to be refitted. It was also my
first attempt at touching a library package where a SONAME bump was involved. I
think I did everything correctly.
Today, I've merged my erc notifications
module inside
Emacs trunk. This way, it will be available for everybody in Emacs 24.2.
This module allows you to be notified via notifications-notify
(the Emacs implementation of the Freedesktop desktop
notifications) on
private message received on IRC, or when your nickname is mentioned on a
channel.
To enable it in Emacs > 24.1, you just have to add the following line to your configuration
file:
(add-to-list 'erc-modules 'notifications)If you want to download it and use it stand-alone for a previous Emacs version, you can fetch the latest file revision and load it before adding the previously given line.
from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() def on_events_received(events): if events: song = events[0] print "Last song: %s" % song.subjects[0].uri else: print "You haven't listened to any songs." template = Event.new_for_values(subject_interpretation=Interpretation.AUDIO) zeitgeist.find_events_for_template(template, on_events_received, num_events=1) # Start a mainloop - note: the Qt mainloop also works from gi.repository import GLib GLib.MainLoop().run()
from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() def on_events_received(events): for event in events: print "- %s" % event.subjects[0].uri tmpl1 = Event.new_for_values(subject_interpretation=Interpretation.AUDIO) tmpl2 = Event.new_for_values(subject_interpretation=Interpretation.VIDEO) zeitgeist.find_events_for_templates([tmpl1, tmpl2], on_events_received, num_events=5) # Start a mainloop from gi.repository import GLib GLib.MainLoop().run()
zeitgeist.find_events_for_templates( [tmpl1, tmpl2], on_events_received, num_events=5, result_type=ResultType.MostRecentSubjects, storage_state=StorageState.Available)
subj1 = Subject.new_for_values(interpretation=Interpretation.SOURCE_CODE, uri="file:///home/rainct/Development/*") subj2 = Subject.new_for_values(uri="!file:///home/rainct/Development/zeitgeist/*") tmpl1 = Event.new_for_values(interpretation=Interpretation.MODIFY_EVENT, subjects=[subj1, subj2]) templates = [tmpl1]
from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() def on_events_received(events): for event in events: print '- %s' % event.subjects[0].uri def on_ids_received(event_ids): print 'A total of %d source code files were found.' % len(event_ids) print 'Fetching the first 100...' zeitgeist.get_events(event_ids[:100], on_events_received) tmpl = Event.new_for_values(subject_interpretation=Interpretation.SOURCE_CODE) zeitgeist.find_event_ids_for_templates( [tmpl], on_ids_received, num_events=10000, # you can use 0 for "all events", but do you really need to? timerange=TimeRange.from_seconds_ago(3600*24*30*3), result_type=ResultType.MostPopularSubjects) # Start a mainloop from gi.repository import GLib GLib.MainLoop().run()
from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() def on_insert(time_range, events): # do awesome stuff with the events here print events def on_delete(time_range, event_ids): # a previously inserted event was deleted print event_ids templates = [Event.new_for_values(subject_uri='file:///home/user/kittens/*', subject_interpretation=Interpretation.IMAGE)] zeitgeist.install_monitor(TimeRange.always(), templates, on_insert, on_delete) # Start a mainloop from gi.repository import GLib GLib.MainLoop().run()
m = zeitgeist.install_monitor(TimeRange.always(), templates, on_insert, on_delete) zeitgeist.remove_monitor(m)
import time from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() def on_related_received(uris): print 'Related URIs:' for uri in uris: print ' - %s' % uri query_templates = [Event.new_for_values( subject_interpretation=Interpretation.SOURCE_CODE, subject_uri='file:///home/rainct/Development/zeitgeist/*', subject_mimetype="text/x-vala")] result_templates = [Event.new_for_values( subject_interpretation=Interpretation.WEBSITE, subject_manifestation=Manifestation.WEB_DATA_OBJECT)] now = time.time()*1000 zeitgeist.find_related_uris_for_events( query_templates, on_related_received, time_range=TimeRange(now - 1000*3600*24*30*6, now), result_event_templates=result_templates, num_events=10) # Start a mainloop from gi.repository import GLib GLib.MainLoop().run()
from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() index = zeitgeist._iface.get_extension('Index', 'index/activity') query = 'hello' # search query time_range = TimeRange.always() event_templates = [] offset = 0 num_events = 10 result_type = 100 # magic number for "relevancy" (ResultType.* also work) def on_reply(events, num_estimated_matches): print 'Got %d out of ~%d results.' % (len(events), num_estimated_matches) events = map(Event, events) for event in events: print ' - %s' % event.subjects[0].uri def on_error(exception): print 'Error from FTS:', exception index.Search(query, time_range, event_templates, offset, num_events, result_type, reply_handler=on_reply, error_handler=on_error) # Start a mainloop from gi.repository import GLib GLib.MainLoop().run()
The default boolean operator is AND. Thus the query foo bar will be interpreted as foo AND bar. To exclude a term from the result set prepend it with a minus sign - eg foo -bar. Phrase queries can be done by double quoting the string "foo is a bar". You can truncate terms by appending a *. There are a few keys you can prefix to a term or phrase to search within a specific set of metadata. They are used like key:value. The keys name and title search strictly within the text field of the event subjects. The key app searches within the application name or description that is found in the actor attribute of the events. Lastly you can use the site key to search within the domain name of the subject URIs. You can also control the results with the boolean operators AND and OR and you may use brackets, ( and ), to control the operator precedence.Modifying the log So far we ve only queried Zeitgeist for information, let s get a bit more active. You can delete events from Zeitgeist with the following query:
from zeitgeist.client import ZeitgeistClient zeitgeist = ZeitgeistClient() def on_deleted(timerange): print 'Deleted events going from %s to %s' % (timerange[0], timerange[1]) event_ids = [50] # put the IDs of the events you want to delete here zeitgeist.delete_events(event_ids, on_deleted) # Start a mainloop from gi.repository import GLib GLib.MainLoop().run()
import time from gi.repository import GLib from zeitgeist.client import ZeitgeistClient from zeitgeist.datamodel import * zeitgeist = ZeitgeistClient() def on_status_changed_callback(enabled): """ This method will be called whenever someone enables or disables the data-source. """ if enabled: print 'Data-source enabled and ready to send events!' else: print 'Data-source disabled; don\'t send event, they\'ll be ignored.' def register(): # Always use the same unique_id. Name and description can change # freely. unique_id = 'com.example.your.data.source' name = 'user visible name (may be translated)' description = 'user visible description (may be translated)' # Describe what sort of events will be inserted (optional) subject_template = Subject() subject_template.interpretation = Interpretation.PLAIN_TEXT_DOCUMENT subject_template.manifestation = Manifestation.FILE_DATA_OBJECT templates = [] for interp in (Interpretation.ACCESS_EVENT, Interpretation.LEAVE_EVENT): event_template = Event() event_template.interpretation = interp event_template.manifestation = Manifestation.USER_ACTIVITY event_template.append_subject(subject_template) templates.append(event_template) zeitgeist.register_data_source(unique_id, name, description, templates, on_status_changed_callback)
def log(title, uri, opened): subject = Subject.new_for_values( uri=uri, interpretation=Interpretation.PLAIN_TEXT_DOCUMENT, manifestation=Manifestation.FILE_DATA_OBJECT, origin=GLib.path_get_dirname(uri), mimetype='text/plain', text=title) event = Event.new_for_values( timestamp=time.time()*1000, manifestation=Manifestation.USER_ACTIVITY, actor='application://your_application_name.desktop', subjects=[subject]) if opened: event.interpretation = Interpretation.ACCESS_EVENT else: event.interpretation = Interpretation.LEAVE_EVENT def on_id_received(event_ids): print 'Logged %s (%d) with event id %d.' % (title, opened, event_ids[0]) zeitgeist.insert_events([event], on_id_received) if __name__ == '__main__': register() log('test.txt', 'file:///tmp/test.txt', opened=True) log('another_file.txt', 'file:///tmp/another_file.txt', opened=True) log('another_file.txt', 'file:///tmp/another_file.txt', opened=False) log('test.txt', 'file:///tmp/test.txt', opened=False) # Start a mainloop GLib.MainLoop().run()
from zeitgeist.mimetypes import * print get_interpretation_for_mimetype('text/plain') print get_manifestation_for_uri('file:///tmp/test.txt')
That's a seemingly simple question I started asking various people two
weeks ago. I didn't get many useful answers, but now I have experience
doing it myself, and so here's a blog post brain dump.
I have been trying to convert git-annex to use GHC's threaded runtime, for
a variety of reasons. Naively adding the -threaded option resulted in a
git-annex command that seemed to randomly freeze, but only sometimes
(and, infuriatingly, never when I straced it), and a test suite that froze
at a random point almost every time I ran it. Not a good result, and
lacking any knowledge about gotchas with using the threaded runtime, I was
at a loss for a long time (most of DebConf) about how to fix it.
I now know of at least three classes of problems that enabling the threaded
runtime can turn up in programs that have been developed using the
non-threaded runtime.
accessing a MVar after forkprocess can hang
MissingH has some code similar to this, which works ok with the
non-threaded runtime:
forkProcess $ do
debugM "about to run some command"
executeFile ...
In the above example, debugM accesses a MVar. Doing that after
forkProcess can result in a MVar deadlock, as it tries to access a MVar
value, that is, apparently, not accessible to the forked process.
(Bug report with test case)
So, using System.Cmd.Utils from MissingH is asking for trouble.
I switched all my code to the newer and, apparently, threaded runtime
safe System.Process.
forkProcess is a massively bad idea
Even when not accessing a MVar after forkProcess, it's very unsafe to
use. It's easy to miss the warning attached to forkProcess, when the code
seems to work. But with the threaded runtime, I've found that most
any call to forkProcess will sometimes succeed, and sometimes freeze
the whole program. This might only happen around 1 time in 1000.
Then you'll find this warning and do a lot of head-scratching about what
it really means:
forkProcess comes with a giant warning: since any other running threads are not copied into the child process, it's easy to go wrong: e.g. by accessing some shared resource that was held by another thread in the parent.The hangs I saw could be due to laziness issues deferring code to run after the
forkProcess that you'd expect to have run before it ... or
who knows what else.
It's not clear to me that it's possible to use forkProcess safely in
Haskell code. I think it's notable that System.Process runs the whole
fork/exec in C code instead.
unsafe FFI calls block
According to most of the documentation you'll find in eg, the Haskell wiki,
Real World Haskell, etc, the only difference between the safe and
unsafe imports in the FFI is that unsafe is faster, and shouldn't be
used for C code that calls back into Haskell code.
But the documentation is out of date. Actually, if you're using the FFI,
and the foreign function can block, you need to use safe. When using
unsafe, a blocking foreign function can block all threads of the program.
In my case, I was using kqueue to wait for changes to files, and this
indeed blocked my whole program when linked with -threaded. Marking it
safe fixed this.
The details are well described in this paper:
http://community.haskell.org/~simonmar/papers/conc-ffi.pdf
Somewhat surprisingly, this blocking only happens when using the threaded
runtime. If you're using the non-threaded runtime with unsafe blocking
FFI functions, your other pseudo-threads won't be blocked. This is because
the non-threaded runtime has an SIGALARM timer that interrupts (most)
blocking system calls. This leads to other troubles of its own (like
needing to restart interrupted FFI functions, or blocking the other
pseudo-threads from running if the C code ignores SIGALARM), but that's
offtopic for this post.
summary
Converting a large Haskell code base from the default, non-threaded runtime
to the threaded runtime can be quite tricky. None of the problems are the
sort of thing that Haskell helps to manage either. I will be developing new
programs using the threaded runtime from the beginning from now on.
By the way, don't take this post to say that threading in Haskell sucks.
I've really been enjoying writing threaded Haskell code. The control
Haskell gives over isolation of state to threads, and the excellent and
wide-ranging suite of thread communications data types (MVar, Chan,
QSemN, TMVar, SampleVar, etc) have made developing a complex threaded
program something I feel comfortable doing for the first time, in any
language.
Dear Lazyweb,
I'm working on a personal PyQt4 project for my parents' office, and I need to
autocomplete an editable QComboBox.
I can't use a standard Qt model (I need to store python objects in it), so I
subclassed QAbstractTableModel.
Here it is, it's a fairly generic subclass of QAbstractTableModel, with
variable number of columns:
class QGenericTableModel(QAbstractTableModel): def __init__(self, columns, parent=None, *args): super(QGenericTableModel, self).__init__(parent, *args) self.columns = columns self.headers = self.table = [] def rowCount(self, parent=QModelIndex()): return len(self.table) def columnCount(self, parent): return self.columns def row(self, row): return self.table[row] def setData(self, index, value, role): if index.isValid() and role == Qt.EditRole: row = index.row() t = self.table[row] if index.column() >= self.columns: return False if isinstance(value, QVariant): t[index.column()] = value.toString().simplified() else: t[index.column()] = value self.emit(SIGNAL('dataChanged'), index, index) return True return False def data(self, index, role = Qt.DisplayRole): if not index.isValid(): return QVariant() if (index.row() >= len(self.table)) or (index.row() < 0): return QVariant() if role == Qt.DisplayRole: return QVariant(self.table[index.row()][index.column()]) return QVariant() def insertRow(self, row, parent=QModelIndex()): self.insertRows(row, 1, parent) def insertRows(self, row, count, parent=QModelIndex()): self.beginInsertRows(parent, row, row+count-1) for i in xrange(count): self.table.insert(row, ['',]*self.columns) self.endInsertRows() return True def removeRow(self, row, parent=QModelIndex()): self.removeRows(row, 1, parent) def removeRows(self, row, count, parent=QModelIndex()): self.beginRemoveRows(parent, row, row+count-1) for i in reversed(xrange(count)): self.table.pop(row+i) self.endRemoveRows() return True def flags(self, index): if not index.isValid(): return Qt.ItemIsEnabled return super(QGenericTableModel, self).flags(index) Qt.ItemIsEditable def headerData(self, column, orientation, role = Qt.DisplayRole): if role != Qt.DisplayRole: return QVariant() if orientation == Qt.Horizontal: if column >= self.columns: return QVariant() return self.headers[column] return QVariant() def setHeaderData(self, column, orientation, value, role = Qt.EditRole): self.headers[column] = valueIt might not be perfect, but it works, and it's all that matters at the moment (since it's my first serious PyQt4 project). Oh, well, it worked until I tried to use it with an editable
QComboBox.
And here's the app code (for the full working code, insert the above class
right after the imports):
import sys from PyQt4.QtGui import * from PyQt4.QtCore import * app = QApplication(sys.argv) model = QStandardItemModel() for i, word in enumerate(['saluton', 'gxis la revido', 'hello', 'goodbye']): item = QStandardItem(word) model.setItem(i, 0, item) #model = QGenericTableModel(1) #for i, word in enumerate(['saluton', 'gxis la revido', 'hello', 'goodbye']): # model.insertRow(i) # index = model.index(i, 0) # model.setData(index, word, Qt.EditRole) combo = QComboBox() filterModel = QSortFilterProxyModel(combo) completer = QCompleter(combo) filterModel.setFilterCaseSensitivity(Qt.CaseInsensitive) filterModel.setSourceModel(model) filterModel.setFilterKeyColumn(0) completer.setModel(filterModel) completer.setCompletionColumn(0) completer.setCompletionMode(QCompleter.UnfilteredPopupCompletion) combo.setEditable(True) combo.setCompleter(completer) combo.setModel(model) combo.setModelColumn(0) if combo.isEditable(): app.connect(combo.lineEdit(), SIGNAL('textEdited(QString)'), filterModel.setFilterFixedString) combo.setModel(model) combo.setModelColumn(0) combo.show() sys.exit(app.exec_())Now, try running it. It works well when I use a
QStandardItemModel.
Then, try decommenting the part where I use my subclassed model: it just doesn't
work: clicking on any item makes the QComboBox not change its currentIndex,
and this only happens if the combobox is editable.
I suspect I'm forgetting to override some function in my model, but I don't know
what exactly to override, and Google didn't help me. This is also backed up by
the fact that the exact same behaviour shows up when, instead of a QComboBox, I
try to autocomplete on a QLineEdit.
So, dear readers: can anyone explain what is happening? Thanks in advance!
UPDATE: it turned out that the culprit was the following bit inside data():
if role == Qt.DisplayRole: return QVariant(self.table[index.row()][index.column()])Adding also
Qt.EditRole to the list of possible choices fixed the bug. YAY!
After 4 flights, about 15,000 miles, a beach, some To a and cheese and lots of geeks, I'm able to update my Places I've Been map by adding Nicaragua to it.
I was speaking at DebConf12, entitled Bits from the Release Team. In case you missed it, it's been recorded by the wonderful DebConf video team and is available in high and low quality. It was great to catch up with people again, and do quite a bit of work on Debian itself, mostly on the Wheezy release. I even found an hour to take a basic Spanish class, although I'm fairly sure I've forgotten most of it by now.
As usual, there were a number of Collaborans present, and it was good to meet them. I suspect I'll be seeing a few more at GUADEC in a weeks time.
My photos are available, should anyone be interested.
We've decided to accept sponsorships of phpMyAdmin in more official way. So if you or your company want to financially support this software, you now have great chance to do that.
Time to time we've received offers for sponsoring, but we never got to point where we could easily handle these. In the past we were limited by sf.net requirements for no advertisement on website, but it got leveraged over the time and we did not change our policy much.
For now the only benefit we are providing to our sponsors (besides good feeling that they are supporting good project) is logo and link on our website. In the future we might add some more, but at first we want to see how it works in this scale.
Anyway if you are interested in sponsoring phpMyAdmin, you can do that on our website.
Filed under: English Phpmyadmin 0 comments Flattr this!
Today's wtf:
Wed Jul 18 20:25:01 CEST 2012 MCA: Generic CACHE Generic Generic Error
Reading documentation does pay off. Browsing through the Rakefile format
documentation for
Rake, just now, I found mention of the
multitask method which declares that all of that task s prerequisites
can be executed in parallel.
A comparison run:
$ rake clean; time rake build
real 0m7.116s
user 0m6.788s
sys 0m0.260s
$rake clean; time rake multibuild
real 0m3.820s
user 0m8.809s
sys 0m0.288s
This is a trivially small build I m doing, I must admit, but halving the
build time (in this case at least) pays huge dividends in my perceived
productivity. It really blows the dust out of my CPU cores, too, which tend
to be woefully underutilised (being this is a quad-core laptop and all).
So I say unto you all: go forth and multitask!
It s been released. Use this with NIST::NVD 1.00.00 and you will be able to perform immediate look-ups of CVE and CWE data given a CPE URN. For instance:
cjac@foxtrot:/usr/src/git/f5/NIST-NVD-Store-SQLite3$ perl Makefile.PL ; make ; make test ; cjac@foxtrot:/usr/src/git/f5/NIST-NVD-Store-SQLite3$ perl -MNIST::NVD::Query -MData::Dumper -e '
$q = NIST::NVD::Query->new(store => q SQLite3 ,database => q t/data/nvdcve-2.0.db );
$cve_list = $q->cve_for_cpe( cpe => q cpe:/a:microsoft:ie:7.0.5730.11 );
print Data::Dumper::Dumper cve_list => $cve_list, first_cvss => $q->cve( cve_id => $cve_list->[0] )-> q vuln:cvss
'
$VAR1 =
'cve_list' => [
'CVE-2002-2435',
'CVE-2010-5071'
],
'first_cvss' =>
'cvss:base_metrics' =>
'cvss:confidentiality-impact' => 'PARTIAL',
'cvss:score' => '4.3',
'cvss:authentication' => 'NONE',
'cvss:access-vector' => 'NETWORK',
'cvss:source' => 'http://nvd.nist.gov',
'cvss:generated-on-datetime' => '2011-12-08T06:47:00.000-05:00',
'cvss:availability-impact' => 'NONE',
'cvss:integrity-impact' => 'NONE',
'cvss:access-complexity' => 'MEDIUM'
;
https://metacpan.org/release/CJCOLLIER/NIST-NVD-Store-SQLite3-1.00.00
A random tip for shell script hackers. You know that with set -x you can turn on tracing, so that every command is printed before being executed. In bash, you can also customize the output prefix by setting the PS4 variable. The default is PS4='+ '. Here is an example. I wanted to "profile" a deployment script, to see why it took so long. Ordinarily, I might have sprinkled it with date calls. Instead, I merely added set -xnear the top.
PS4='+\t '
\t stands for time stamp. (The script was already using bash explicitly, as opposed to /bin/sh.) That way, every line is prefixed by a time stamp, and the logs could easily be analyzed to find a possible performance bottleneck.
Once again Debian day was somewhat compromised: this time by more DIY. I
still managed a few bits and pieces, amortized over the rest of the week.
I benefited from some train time this weekend.
A new version of
flactag
and catching up the flactag packaging vcs
repository. A maintainer
endorsement for
one of the flactag maintainers and a request to NM for another maintainer to be
granted access to the collab-maint repository.
More work on the musicbrainz 'transition': First, usertag tracking of packages
to
update,
with upstream bugs where necessary. Tested and confirmed Michael Biebl's sushi
patch;
found and fixed a sushi bug along the
way; wrote patches for
sound-juicer (
merged upstream) and goobox.
And we've frozen!
How have we done on the musicbrainz stuff? I was really pleased to see Michael
Biebl upload new
sound-juicer
(four bugs closed!),
rhythmbox
and
gnome-sushi
packages which move them up to musicbrainz5. I NMUed
goobox
(with the maintainer's permission) but sadly there was a build issue and the
NMU was reversed with a second upload, so it's back to using libmusicbrainz3 in
the freeze. that leaves two more
packages.
I haven't discussed or considered putting forward this 'transition' for freeze
exceptions, but Pino
Toscano
raised a good point: upstream might not support the version 1 WS API (which
libmusicbrainz3 depends on) throughout the wheezy lifetime. Some more research
here is needed.
What else?
NMU of acpidump to resolve a trivial manpage error that I filed a patch for two
years ago; the latest flactag upstream version; a new version of
game-data-packager, incorporating stuff Joey Schmit patched last year, which
fixes Heretic support and adds Hexen support; a new version of chocolate-doom.
The last two are particularly interesting because I'm in Uploaders: despite
having left the Games team last year: there have been no subsequent uploads
before my latest ones. I removed myself from Uploaders: with these uploads,
which technically means they are NMUs.
What next?
Typically I find the freeze time a hard one to work on Debian. I've never been
very effective at chasing and resolving RC bugs. On the other hand, long,
protracted freezes are demotivational for everyone. I'm going to try and focus
on goals which hasten the release of wheezy and resist the urge to work on
things that would not show up until wheezy+1.
Next.