I recently made the same mistake a number of times when adding new hosts to my Ansible configuration and decided to ensure it couldn't happen again. The specifics of this particular issue were that whilst I had added the hostname to inventory file, I had neglected to add the host to the relevant group in my playbook:
oldhost newhost [mygroup] oldhost # missing newhost hereansible-playbook would output no hosts matched but crucially return with an successful exit code. My continuous integration system (Jenkins) would infer that the task was successful and not notify me that anything was wrong:
$ ansible-playbook deploy-mygroup.yml --limit-hosts=newhost <snip> PLAY [deploy] ************************************************* skipping: no hosts matched PLAY RECAP **************************************************** [ERROR]: No plays were matched by any host. $ echo $? 0
$ ansible-playbook [..] --error-if-no-plays-matched <snip> [ERROR]: No plays were matched by any host. $ echo $? 1
I am using the Job DSL plugin so that my configuration is backed onto revision control (highly recommended) so I actually used its textFinder publisher rather than the interface above:
publishers textFinder(/^skipping: no hosts matched$/, '', true, false, false)
+ ansible-playbook deploy-mygroup.yml --limit-hosts=newhost <snip> PLAY [deploy] ************************************************* skipping: no hosts matched PLAY RECAP **************************************************** [ERROR]: No plays were matched by any host. Checking console output /var/lib/jenkins/jobs/deploy-mygroup/builds/126/log: skipping: no hosts matched Build step 'Jenkins Text Finder' changed build result to FAILURE Finished: FAILURE
Started in 2008, lldpd is an implementation of
IEEE 802.1AB-2005 (aka LLDP) written in C. While it contains some
unit tests, like many other network-related software at the time, the
coverage of those is pretty poor: they are hard to write because the
code is written in an imperative style and tighly coupled with the
system. It would require extensive mocking1. While a rewrite
(complete or iterative) would help to make the code more
test-friendly, it would be quite an effort and it will likely
introduce operational bugs along the way.
To get better test coverage, the major features of lldpd are now
verified through integration tests. Those tests leverage Linux
network namespaces to setup a lightweight and isolated environment
for each test. They run through pytest, a powerful testing tool.
assert keyword,class testArithmetics(unittest.TestCase): def test_addition(self): self.assertEqual(1 + 3, 4)
def test_addition(): assert 1 + 3 == 4
class testInVM(unittest.TestCase): def setUp(self): self.vm = VM('Test-VM') self.vm.start() self.ssh = SSHClient() self.ssh.connect(self.vm.public_ip) def tearDown(self): self.ssh.close() self.vm.destroy() def test_hello(self): stdin, stdout, stderr = self.ssh.exec_command("echo hello") stdin.close() self.assertEqual(stderr.read(), b"") self.assertEqual(stdout.read(), b"hello\n")
tearDown() method won t be invoked. The VM
will be left running.
Instead, with pytest, we could do this:
@pytest.yield_fixture def vm(): r = VM('Test-VM') r.start() yield r r.destroy() @pytest.yield_fixture def ssh(vm): ssh = SSHClient() ssh.connect(vm.public_ip) yield ssh ssh.close() def test_hello(ssh): stdin, stdout, stderr = ssh.exec_command("echo hello") stdin.close() stderr.read() == b"" stdout.read() == b"hello\n"
@pytest.mark.parametrize("n1, n2, expected", [ (1, 3, 4), (8, 20, 28), (-4, 0, -4)]) def test_addition(n1, n2, expected): assert n1 + n2 == expected
lldpd process in each namespace.lldpcli we get the expected result in the other.@pytest.mark.skipif('LLDP-MED' not in pytest.config.lldpd.features, reason="LLDP-MED not supported") @pytest.mark.parametrize("classe, expected", [ (1, "Generic Endpoint (Class I)"), (2, "Media Endpoint (Class II)"), (3, "Communication Device Endpoint (Class III)"), (4, "Network Connectivity Device")]) def test_med_devicetype(lldpd, lldpcli, namespaces, links, classe, expected): links(namespaces(1), namespaces(2)) with namespaces(1): lldpd("-r") with namespaces(2): lldpd("-M", str(classe)) with namespaces(1): out = lldpcli("-f", "keyvalue", "show", "neighbors", "details") assert out['lldp.eth0.lldp-med.device-type'] == expected
lldpd was compiled with
LLDP-MED support. Second, the test is parametrized. We will execute
four distinct tests, one for each role that lldpd should be able to
take as an LLDP-MED-enabled endpoint.
The signature of the test has four parameters that are not covered by
the parametrize() decorator: lldpd, lldpcli, namespaces and
links. They are fixtures. A lot of magic happen in those to keep
the actual tests short:
lldpd is a factory to spawn an instance of lldpd. When called,
it will setup the current namespace (setting up the chroot,
creating the user and group for privilege separation, replacing
some files to be distribution-agnostic, ), then call lldpd
with the additional parameters provided. The output is recorded and
added to the test report in case of failure. The module also
contains the creation of the pytest.config.lldpd object that is
used to record the features supported by lldpd and skip
non-matching tests. You can read
fixtures/programs.py for more details.
lldpcli is also a factory, but it spawns instances of lldpcli,
the client to query lldpd. Moreover, it will parse the output in
a dictionary to reduce boilerplate.
namespaces is one of the most interesting pieces. It is a
factory for Linux namespaces. It will spawn a new namespace or
refer to an existing one. It is possible to switch from one namespace
to another (with with) as they are contexts. Behind the scene,
the factory maintains the appropriate file descriptors for each
namespace and switch to them with setns(). Once the test is done,
everything is wipped out as the file descriptors are garbage
collected. You can read fixtures/namespaces.py
for more details. It is quite reusable in other
projects2.
links contains helpers to handle network interfaces: creation of
virtual ethernet link between namespaces, creation of bridges,
bonds and VLAN, etc. It relies on the pyroute2 module. You can
read fixtures/network.py for more details.
pytest -n 10 --boxed. To
catch even more bugs, both the address sanitizer (ASAN) and the
undefined behavior sanitizer (UBSAN) are enabled. In case of a
problem, notably a memory leak, the faulty program will exit with a
non-zero exit code and the associated test will fail.
root and
_lldpd). Therefore, the tests have to run as root.
The second limitation is with the PID namespace. It s
not possible for a process to switch from one PID
namespace to another. When you call setns() on a PID
namespace, only children of the current process will
be in the new PID namespace. The PID namespace is
convenient to ensure everyone gets killed once the
tests are terminated but you must keep in mind that
/proc must be mounted in children only. The third
limitation is that, for some namespaces (PID and
user), all threads of a process must be part of the
same namespace. Therefore, don t use threads in
tests. Use multiprocessing module instead.
Debian LTS
March was the eleventh month I contributed to Debian LTS under the
Freexian umbrella. In total I spent 13 hours (of allocated 11.00 +
5.25h from last month) working on preparing for wheezy-lts:
The Debian repository format was designed a long time ago. The oldest
versions of it were produced with the help of tools such as
dpkg-scanpackages and consumed by dselect access methods such as
dpkg-ftp. The access methods just fetched a Packages file (perhaps
compressed) and used it as an index of which packages were available; each
package had an MD5 checksum to defend against transport errors, but being
from a more innocent age there was no repository signing or other protection
against man-in-the-middle attacks.
An important and intentional feature of the early format was that, apart
from the top-level Packages file, all other files were static in the
sense that, once published, their content would never change without also
changing the file name. This means that repositories can be efficiently
copied around using rsync without having to tell it to re-checksum all
files, and it avoids network races when fetching updates: the repository
you re updating from might change in the middle of your update, but as long
as the repository maintenance software keeps superseded packages around for
a suitable grace period, you ll still be able to fetch them.
The repository format evolved rather organically over time as different
needs arose, by what one might call distributed consensus among the
maintainers of the various client tools that consumed it. Of course all
sorts of fields were added to the index files themselves, which have an
extensible format so that this kind of thing is usually easy to do. At some
point a Sources index for source packages was added, which worked pretty
much the same way as Packages except for having a different set of fields.
But by far the most significant change to the repository structure was the
package pools project.
The original repository layout put the packages themselves under the
dists/ tree along with the index files. The dists/ tree is organised by
suite (modern examples of which would be stable , stable-updates ,
testing , unstable , xenial , xenial-updates , and so on). This meant
that making a release of Debian tended to involve copying lots of data
around, and implementing the testing suite would have been very costly.
Package pools solved this problem by moving individual package files out of
dists/ and into a new pool/ tree, allowing those files to be shared
between multiple suites with only a negligible cost in disk space and mirror
bandwidth. From a database design perspective this is obviously much more
sensible. As part of this project, the original Debian dinstall
repository maintenance scripts were
replaced
by da-katie or dak , which among other things used a new apt-ftparchive
program to build the index files; this replaced dpkg-scanpackages and
dpkg-scansources, and included its own database cache which made a big
difference to performance at the scale of a distribution.
A few months after the initial implementation of package pools, Release
files were added. These formed a sort of meta-index for each suite, telling
APT which index files were available (main/binary-i386/Packages,
non-free/source/Sources, and so on) and what their checksums were.
Detached signatures were added alongside that (Release.gpg) so that it was
now possible to fetch packages securely given a public key for the
repository, and client-side verification
support for
this eventually made its way into Debian and Ubuntu. The repository
structure stayed more or less like this for several years.
At some point along the way, those of us by now involved in repository
maintenance realised that an important property had been lost. I mentioned
earlier that the original format allowed race-free updates, but this was no
longer true with the introduction of the Release file. A client now had
to fetch Release and then fetch whichever other index files such as
Packages they wanted, typically in separate HTTP transactions. If a
client was unlucky, these transactions would fall on either side of a mirror
update and they d get a Hash Sum Mismatch error from APT. Worse, if a
mirror was unlucky and also didn t go to special lengths to verify index
integrity (most don t), its own updates could span an update of its upstream
mirror and then all its clients would see mismatches until the next mirror
update. This was compounded by using detached signatures, so Release and
Release.gpg were fetched separately and could be out of sync.
Fixing this has been a long road (the first time I remember talking about
this was in late 2007!), and we ve had to take care to maintain
client/server compatibility along the way. The first step was to add
inline-signed versions of the Release file, called InRelease, so that
there would no longer be a race between fetching Release and fetching its
signature. APT has had this for a while, Debian s repository supports it as
of stretch, and we finally implemented it for
Ubuntu six months ago.
Dealing with the other index files is more complicated, though; it isn t
sensible to inline them, as clients usually only need to fetch a small
fraction of all the indexes available for a given suite.
The solution we ve ended up with, thanks to Michael Vogt s work implementing
it in APT, is called
by-hash
and should be familiar in concept to people who ve used git: with the
exception of the top-level InRelease file, index files for suites that
support the by-hash mechanism may now be fetched using a URL based on one of
their hashes listed in InRelease. This means that clients can now operate
like this:
dists/xenial/InReleasedists/xenial/main/binary-amd64/by-hash/SHA256/46316a202cdae76a73b555414741b11d08c66620b76c470a1623cedcc8a14740
(and so on)debmirror doesn t support by-hash yet; apt-cacher-ng only supports it as
of xenial, although there s an easy configuration
workaround. Full archive mirrors must make
sure that they put new by-hash files in place before new InRelease files
(I just fixed our recommended two-stage sync
script to do this;
ubumirror still needs some work; Debian s
ftpsync is almost correct but
needs a tweak for its handling of translation files, which I ve sent to its
maintainers). Other mirrors and proxies that have specific handling of the
repository format may need similar changes.
Please let me know if you see strange things happening as a result of this
change. It s useful to check the output of apt -o
Debug::Acquire::http=true update to see exactly what requests are being issued.
A new Armadillo release 6.700.3 is out, and we uploaded RcppArmadillo 0.6.700.3.0 to CRAN and Debian. This followed the usual thorough reverse-dependecy checking of by now 216 packages using.
Armadillo is a powerful and expressive C++ template library for linear algebra aiming towards a good balance between speed and ease of use with a syntax deliberately close to a Matlab.
Changes in this release are as follows:
Changes in RcppArmadillo version 0.6.700.3.0 (2016-04-05)Courtesy of CRANberries, there is also a diffstat report for this release. As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.
- Upgraded to Armadillo 6.700.3 (Catabolic Amalgamator Deluxe)
- added
logmat()for calcuating the matrix logarithm- added
regspace()for generating vectors with regularly spaced elements- added
logspace()for generating vectors with logarithmically spaced elements- added
approx_equal()for determining approximate equality- added
trapz()for numerical integration- expanded
.save()and.load()with hdf5_binary_trans file type, to save/load data with columns transposed to rows
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
I've just released version 1.2.0 of Nageru,
my live video mixer. The main new feature is support for Blackmagic's
PCI (and Thunderbolt) series of cards through their driver (in addition
to the preexisting support for their USB3 cards, through my own free one),
but the release is really much more than that.
In particular, 1.2.0 has a lot of those small tweaks that takes it just
to that point where it starts feeling like software I can use and trust
myself. Of course, there are still tons of rough edges (and probably also
bad bugs I didn't know about), but in a sense, it's the first real 1.x release.
There's not one single thing I can point to it's more the sum.
To that end,
I will be using it at Solskogen this summer to
run what's most likely the world's first variable-framerate demoparty stream,
with the stream nominally in 720p60 but dropping to 720p50 during the
oldschool compos to avoid icky conversions on the way, given that almost
all oldschool machines are PAL. (Of course, your
player needs to handle it properly to get perfect 50 Hz playback, too :-)
Most likely through G-SYNC
or similar, unless you actually have a CRT you can set to 50 Hz.)
For more details about exactly what's new, see the
NEWS
file, or simply the git commit log.
A new version of RcppAPT -- our interface from R to the C++ library behind the awesome apt, apt-get, apt-cache, ... commands and their cache -- is now on CRAN.
It adds three new commands to the package. Two are relatively simple: showSrc() and dumpPackage() displays information about a given package, similar to what apt-cache showsrc and apt-cache showpkg, respectively, would reveal. Lastly, the buildDepends() function retrieves all build-dependencies for a packages. This should come in handy for automated tested for which I have some plans.
A bit more information is on the package page here as well as as the GitHub repo.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
The developer uploads their code to gerrit via the git-review tool. There is no further action required on their behalf and the developer simply waits for results.
Gerrit provides a JSON-encoded "firehose" output of everything happening to it. New reviews, votes, updates and more all get sent out over this pipe. Zuul is the overall scheduler that subscribes itself to this information and is responsible for managing the CI jobs appropriate for each change.
Zuul has a configuration that tells it what jobs to run for what projects. Zuul can do lots of interesting things, but for the purposes of this discussion we just consider that it puts the jobs it wants run into gearman for a Jenkins master to consume. gearman is a job-server; as they explain it "[gearman] provides a generic application framework to farm out work to other machines or processes that are better suited to do the work". Zuul puts into gearman basically a tuple (job-name, node-type) for each job it wants run, specifying the unique job name to run and what type of node it should be run on.
A group of Jenkins masters are subscribed to gearman as workers. It is these Jenkins masters that will consume the job requests from the queue and actually get the tests running. However, Jenkins needs two things to be able to run a job a job definition (what to actually do) and a slave node (somewhere to do it). The first part what to do is provided by job-definitions stored in external YAML files and processed by Jenkins Job Builder (jjb) in to job configurations for Jenkins. Each Jenkins master gets these definitions pushed to it constantly by Puppet, thus each Jenkins master instance knows about all the jobs it can run automatically. Zuul also knows about these job definitions; this is the job-name part of the tuple we said it put into gearman. The second part somewhere to run the test takes some more explaining. To the next point...
Several cloud companies donate capacity in their clouds for OpenStack to run CI tests. Overall, this capacity is managed by a customised orchestration tool called nodepool. Nodepool watches the gearman queue and sees what requests are coming out of Zuul. It looks at node-type of jobs in the queue and decides what types of nodes need to start and which cloud providers have capacity to satisfy demand. Nodepool will monitor the start-up of the virtual-machines and register the new nodes to the Jenkins master instances.
At this point, the Jenkins master has what it needs to actually get jobs started. When nodepool registers a host to a Jenkins master as a slave, the Jenkins master can now advertise its ability to consume jobs. For example, if a ubuntu-trusty node is provided to the Jenkins master instance by nodepool, Jenkins can now consume from gearman any job it knows about that is intended to run on an ubuntu-trusty slave. Jekins will run the job as defined in the job-definition on that host ssh-ing in, running scripts, copying the logs and waiting for the result. (It is a gross oversimplification, but for the purposes of OpenStack CI, Jenkins is pretty much used as a glorified ssh/scp wrapper. Zuul Version 3, under development, is working to remove the need for Jenkins to be involved at all).
Eventually, the test will finish. The Jenkins master will put the result back into gearman, which Zuul will consume. The slave will be released back to nodepool, which destroys it and starts all over again (slaves are not reused and also have no sensitive details on them, as they are essentially publicly accessible). Zuul will wait for the results of all jobs for the change and post the result back to Gerrit; it either gives a positive vote or the dreaded negative vote if required jobs failed (it also handles merges to git, but we'll ignore that bit for now).
Trusted Platform Modules are fairly unintelligent devices. They can do some crypto, but they don't have any ability to directly monitor the state of the system they're attached to. This is worked around by having each stage of the boot process "measure" state into registers (Platform Configuration Registers, or PCRs) in the TPM by taking the SHA1 of the next boot component and performing an extend operation. Extend works like this:
The developer uploads their code to gerrit via the git-review tool. They wait.
Gerrit provides a JSON-encoded "firehose" output of everything happening to it. New reviews, votes, updates and more all get sent out over this pipe. Zuul is the overall scheduler that subscribes itself to this information and is responsible for managing the CI jobs appropriate for each change.
Zuul has a configuration that tells it what jobs to run for what projects. Zuul can do lots of interesting things, but for the purposes of this discussion we just consider that it puts the jobs it wants run into gearman for a Jenkins host to consume. gearman is a job-server; as they explain it "[gearman] provides a generic application framework to farm out work to other machines or processes that are better suited to do the work".
A group of Jenkins hosts are subscribed to gearman as workers. It is these Jenkins hosts that will consume the job requests from the queue and actually get the tests running. Jenkins needs two things to be able to run a job -- a job definition (what to actually do) and a slave node (somewhere to do it). The first part -- what to do -- is provided by job-definitions stored in external YAML files and processed by Jenkins Job Builder (jjb) in to job configurations for Jenkins. Thus each Jenkins instance knows about all the jobs it might need to run. Zuul also knows about these job definitions, so you can see how we now have a mapping where Zuul can put a job into gearman saying "run test foo-bar-baz" and a Jenkins host can consume that request and know what to do. The second part -- somewhere to run the test -- takes some more explaining. To the next point...
Several cloud companies donate capacity in their clouds for OpenStack to run CI tests. Overall, this capacity is managed by nodepool -- a customised orchestration tool. Nodepool watches the gearman queue and sees what requests are coming out of Zuul, and decides what type of capacity to provide and in what clouds to satisfy the outstanding job queue. Nodepool will start-up virtual-machines as required, and register those nodes to the Jenkins instances.
At this point, Jenkins has what it needs to actually get jobs started. When nodepool registers a host to Jenkins as a slave, the Jenkins host can now advertise its ability to consume jobs. For example, if a ubuntu-trusty node is provided to the Jenkins instance by nodepool, Jenkins can now consume a job from the queue intended to run on an ubuntu-trusty host. It will run the job as defined in the job-definition -- ssh-ing into the host, running scripts, copying the logs and waiting for the result. (It is a gross oversimplification, but but Jenkins is pretty much a glorified ssh/scp wrapper to OpenStack CI. Zuul Version 3, under development, is working to remove the need for Jenkins to be involved at all).
Eventually, the test will finish. Jenkins will put the result back into gearman, which Zuul will consume. The slave will be released back to nodepool, which destroys it and starts all over again (slaves are not reused and also have no sensitive details on them, as they are essentially publicly accessible). Zuul will wait for the results of all jobs and post the result back to Gerrit and give either a positive vote or the dreaded negative vote if required jobs failed (it also handles merges to git, but we'll ignore that bit for now).
openssl ts -query -data "/etc/shells" -cert -sha256 -no_nonce \
curl -s -H "Content-Type: application/timestamp-query" \
--data-binary "@-" http://zeitstempel.dfn.de > etc-shells.tsr
openssl ts -reply -text -in etc-shells.tsr
This produces a binary timestamp file (etc-shells.tsr) which can be
used to verify that the content of the file /etc/shell with the
calculated sha256 hash existed at the point in time when the request
was made. The last command extract the content of the etc-shells.tsr
in human readable form. The idea behind such timestamp is to be able
to prove using cryptography that the content of a file have not
changed since the file was stamped.
To verify that the file on disk match the public key signature in
the timestamp file, run the following commands. It make sure you have
the required certificate for the trusted timestamp service available
and use it to compare the file content with the timestamp. In
production, one should of course use a better method to verify the
service certificate.
wget -O ca-cert.txt https://pki.pca.dfn.de/global-services-ca/pub/cacert/chain.txt openssl ts -verify -data /etc/shells -in etc-shells.tsr -CAfile ca-cert.txt -textWikipedia have a lot more information about trusted Timestamping and linked timestamping, and there are several trusted timestamping services around, both as commercial services and as free and public services. Among the latter is the zeitstempel.dfn.de service mentioned above and freetsa.org service linked to from the wikipedia web site. I believe the DIFI service should show up on https://tsa.difi.no, but it is not available to the public at the moment. I hope this will change when it is into production. The RFC 3161 trusted timestamping protocol standard is even implemented in LibreOffice, Microsoft Office and Adobe Acrobat, making it possible to verify when a document was created. I would find it useful to be able to use such trusted timestamp service to make it possible to verify that my stored syslog files have not been tampered with. This is not a new idea. I found one example implemented on the Endian network appliances where the configuration of such feature was described in 2012. But I could not find any free implementation of such feature when I searched, so I decided to try to build a prototype named syslog-trusted-timestamp. My idea is to generate a timestamp of the old log files after they are rotated, and store the timestamp in the new log file just after rotation. This will form a chain that would make it possible to see if any old log files are tampered with. But syslog is bad at handling kilobytes of binary data, so I decided to base64 encode the timestamp and add an ID and line sequence numbers to the base64 data to make it possible to reassemble the timestamp file again. To use it, simply run it like this:
syslog-trusted-timestamp /path/to/list-of-log-filesThis will send a timestamp from one or more timestamp services (not yet decided nor implemented) for each listed file to the syslog using logger(1). To verify the timestamp, the same program is used with the --verify option:
syslog-trusted-timestamp --verify /path/to/log-file /path/to/log-with-timestampThe verification step is not yet well designed. The current implementation depend on the file path being unique and unchanging, and this is not a solid assumption. It also uses process number as timestamp ID, and this is bound to create ID collisions. I hope to have time to come up with a better way to handle timestamp IDs and verification later. Please check out the prototype for syslog-trusted-timestamp on github and send suggestions and improvement, or let me know if there already exist a similar system for timestamping logs already to allow me to join forces with others with the same interest. As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address 15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.
I'm not a big fan of April Fools' day, but this year I decided to
try one. My modest contribution: a Pull Request for Chocolate Doom
titled Bring back the classic Doom "hit enter" behaviour:
When playing PWADs with classic Doom, you always got the "this game has been modified" banner and had to hit enter to continue. If you played a lot of PWADs, you got used to hitting enter regularly. It became a core part of the Doom-playing experience. Even if you used one of those lovely launchers that came on the shovelware CDs which streamlined the PWAD choosing experience, you always had to hit the enter key. This commit restores this classic behaviour and allows those who still have the muscle-memory "hit enter" behaviour permanently burned into their nervous systems to finally be at peace. TODO for a future commit: the coloured top-line of text (red for 1.666, blue for 1.9 iirc)Some feedback from IRC:
<Linguica> its funny because its nearly indistinguishable from real chocolate doom feature requests <jmickle> i actually first thought "huh, kinda surprised this isn't in already <ryan> best chocolate-doom feature yet!
[user@mymachine ~]$ chromium-browser --proxy-auto-detectTo enforce launching these two browser variants with --proxy-auto-detect whenever users click onto icons provided on the Linux desktop, you can simply follow the below recipe:
--- usr/share/applications/chromium-browser.desktop 2016-03-16 19:04:18.000000000 +0100 +++ usr/local/share/applications/chromium-browser.desktop 2016-04-01 14:23:27.410775206 +0200 @@ -167,7 +167,7 @@ Comment[zh_CN]= Comment[zh_HK]= Comment[zh_TW]= -Exec=chromium-browser %U +Exec=chromium-browser --proxy-auto-detect %U Terminal=false X-MultipleArgs=false Type=Application @@ -216,7 +216,7 @@ Name[vi]=M c a s m i Name[zh_CN]= Name[zh_TW]= -Exec=chromium-browser +Exec=chromium-browser --proxy-auto-detect [Desktop Action Incognito] Name=Open a New Window in incognito mode @@ -254,7 +254,7 @@ Name[vi]=M c a s m i trong ch n danh Name[zh_CN]= Name[zh_TW]= -Exec=chromium-browser --incognito +Exec=chromium-browser --incognito --proxy-auto-detect [Desktop Action TempProfile] Name=Open a New Window with a temporary profile @@ -292,4 +292,4 @@ Name[vi]=M c a s m i v i h s t m Name[zh_CN]= Name[zh_TW]= -Exec=chromium-browser --temp-profile +Exec=chromium-browser --temp-profile --proxy-auto-detect
--- usr/share/applications/google-chrome.desktop 2016-04-01 14:02:29.388283436 +0200 +++ usr/local/share/applications/google-chrome.desktop 2016-04-01 14:13:59.381895899 +0200 @@ -105,7 +105,7 @@ Comment[zh_CN]= Comment[zh_HK]= Comment[zh_TW]= -Exec=/usr/bin/google-chrome-stable %U +Exec=/usr/bin/google-chrome-stable --proxy-auto-detect %U Terminal=false Icon=google-chrome Type=Application @@ -165,7 +165,7 @@ Name[vi]=C a s M i Name[zh_CN]= Name[zh_TW]= -Exec=/usr/bin/google-chrome-stable +Exec=/usr/bin/google-chrome-stable --proxy-auto-detect TargetEnvironment=Unity [NewIncognito Shortcut Group] @@ -218,5 +218,5 @@ Name[vi]=C a s n danh m i Name[zh_CN]= Name[zh_TW]= -Exec=/usr/bin/google-chrome-stable --incognito +Exec=/usr/bin/google-chrome-stable --proxy-auto-detect --incognito TargetEnvironment=Unity
Yesterday my contract with my university JAIST ended. I was working there as Associate Professor for 6.5 years, but the university decided not to extend my contract (financial problems, foreigner in Japan). That means, I am now out on the job market again not the greatest fun for an academic at my age. Thanks to JAIST for circumventing the ominous 5-year clause of permanent employment.
My prime interests are academic work, that is research and teaching, where research is in a variety of fields, mostly mathematical logic, theoretical computer science, and formal methods. Recently I am working on an extension of the Curry-Howard correspondence to cover different calculi, in particular Hyper Sequent Calculi, and relate them to some kind of process algebra. For more details see the logic dedicated page.
My other focal point is programming and software development, where I have contributed to many open source projects, and act as main developer of the TeX Live infrastructure and distribution system (tlmgr). Main languages are Perl, PHP, C, but also Python, Vala, Lisp, CafeOBJ, and whatever comes around. For more details see the software page.
I recently became father, so I would prefer either an academic position in Hokuriku, Japan, or a software developer position where I can work (most of the time) remotely.
In case one of the readers here has some hints, please drop me a line. In the meantime I enjoy my unemployed life with my baby!
Firefox has had support for Google's
Safe Browsing since 2005
when it started as
a stand-alone Firefox extension.
At first it was only available in the USA, but it was opened up to the rest of the world in
2006 and moved to the
Google Toolbar.
It then got
integrated directly
into
Firefox 2.0
before the
public launch
of the service in 2007.
Many people seem confused by this phishing and malware protection
system and while there is a
pretty good explanation of how it works
on our support site, it doesn't go into technical details. This will
hopefully be of interest to those who have more questions about it.
browser.safebrowsing.malware.enabled
preference (in about:config) whereas the last one is controlled by
browser.safebrowsing.enabled.
browser.safebrowsing.provider.google.updateURL) and does a
lookup against its local database
before displaying a page to the user.
Downloading the entire list of sites flagged by Safe Browsing would be
impractical due to
its size
so the following transformations are applied:
urlclassifier.malwareTable and urlclassifier.phishTable respectively.
If you want to see some debugging information in your terminal while Firefox
is downloading updated lists, turn on browser.safebrowsing.debug.
Once downloaded, the lists can be found in the cache directory:
~/.cache/mozilla/firefox/XXXX/safebrowsing/ on Linux~/Library/Caches/Firefox/Profiles/XXXX/safebrowsing/ on MacC:\Users\XXXX\AppData\Local\mozilla\firefox\profiles\XXXX\safebrowsing\ on Windowsbrowser.safebrowsing.provider.mozilla.gethashURL) all of the
hashes that start with the affected 32-bit prefix and adds these full-length
hashes to its local database. Turn on browser.safebrowsing.debug to see
some debugging information on the terminal while these "completion" requests
are made.
If the current URL doesn't match any of these full hashes, the load
proceeds as normal. If it does match one of them, a warning interstitial
page is shown and the
load is canceled.
urlclassifier.downloadBlockTable) and block the download
in case of a match.urlclassifier.downloadAllowTable) of known good publishers and
release the download if a match is found.browser.safebrowsing.downloads.remote.url) and block the download if the
server indicates that the file isn't safe.browser.safebrowsing.malware.enabled) is turned off, it can
also be disabled independently via the
browser.safebrowsing.downloads.enabled preference.
Note that Step 5 is the only point at which any information about the
download is shared with Google. That remote lookup can be suppressed via the
browser.safebrowsing.downloads.remote.enabled preference for those users
concerned about sending that metadata to a third party.
browser.safebrowsing.downloads.remote.block_dangerousbrowser.safebrowsing.downloads.remote.block_dangerous_hostbrowser.safebrowsing.downloads.remote.block_potentially_unwantedbrowser.safebrowsing.downloads.remote.block_uncommon
See also my apps list for a more complete list of the apps I have installed on the phone. I welcome recommendations on cool free software apps I should use!I have replaced the stock firmware on the phone with Cyanogenmod 12.1, which was a fairly painful experience, partly because of the difficult ambiance on the #cyanogenmod channel on Freenode, where I had extreme experiences: a brave soul helped me through the first flashing process for around 2 hours, nicely holding my hand at every step. Other times, I have seen flames and obtuse comments from people being vulgar, brutal, obnoxious, if not sometimes downright homophobic and sexist from other users. It is clearly a community that needs to fix their attitude. I have documented everything I could in details in this wiki page, in case others want to resuscitate their old phones, but also because I ended up reinstalling the freaking phone about 4 times, and was getting tired of forgetting how to do it every time. I am somewhat fascinated by Android: here is the Linux-based device that should save us all from the proprietary Apple nightmares of fenced in gardens and censorship. Yet, public Android downloads are hidden behind license agreements, even though the code itself is free, which has led fellow Debian developers to work on making libre rebuilds of Androids to workaround this insanity. But worse: all phones are basically proprietary devices down to the core. You need custom firmware to be loaded on the machine for it to boot at all, from the bootloader all the way down to the GSM baseband and Wifi drivers. It is a minefield of closed source software, and trying to run free software on there is a bit of a delusion, especially since the baseband has so much power over the phone. Still, I think it is really interesting to run free software on those machines, and help people that are stuck with cell phones get familiar with software freedom. It seems especially important to me to make Android developers aware of software freedom considering how many apps are available for free yet on which it is not possible to contribute significantly because the source code is not published at all, or published only on the Google Store, instead of the more open and public F-Droid repository which publishes only free software. So I did contribute. This month, I am happy to announce that I contributed to the following free software projects on Android:
this battery will reach end of life (5%) in 935 days, 19:07:58.336480, on 2018-10-23 12:06:07.270290Which is, to be fair, a good life: it will somewhat work for about three more years.
Favorites list which is populated by the "star"
button in the UI.
I had a lot of fun writing this script. I started using elpy as an
IDE in Emacs. (Notice how
Emacs got a new webpage, which is a huge improvement was had been
basically unchanged since the original version, now almost 20
years old, and probably written by RMS himself.) I wonder how I
managed to stay away from Elpy for so long, as it glues together key
components of Emacs in an elegant and functional bundle:
Signal is a pretty amazing app; it manages
to combine great security with great simplicity. (It literally takes two
minutes, even for an unskilled user, to set it up.)
I looked at the Wikipedia article,
and the list of properties the protocol provides
is impressive; I had hardly any idea you would even want all of these.
But I've tried to decode what they actually mean:
Next.