Steinar H. Gunderson: Frankenmachine
- 6 HDMI outputs,
- 5 DVI outputs,
- 2 DisplayPort outputs,
- 2 HDMI inputs,
- 2 SDI inputs,
- 2 SDI outputs,
- And some analog in/out (no VGA, though).
A.pdf, B.pdf and C.pdf) are copies
of multi-page PDFs where I need to sign each page and then send them back.
One of them (let's say C.pdf) needs to be signed on each page except the
last, which needs instead to be signed twice in two special blank spaces.
I have a transparent png with my signature (let's call it signature.png).
Let's start with C.pdf:
# Split C.pdf into single-page PDFs
pdftk C.pdf burst
# Edit a random page in inkscape, add a signature to the corner of the
# page, delete the rest of the contents and save as signature.pdf
inkscape pg_0001.pdf
# Edit the last page in inkscape, add the signatures where needed, save
# as pg_0005-signed.pdf
inkscape pg_0005.pdf
# Stamp the signatures all over all pages but the last one
for f in pg_000[1-4].pdf
do
pdftk $f stamp signature.pdf output basename $f .pdf -signed.pdf
done
# Put it all together
pdftk pg_000*-signed.pdf cat output C-signed.pdf
And now that I have signature.pdf, I can easily process A and B:
pdftk A.pdf stamp signature.pdf output A-signed.pdf
pdftk B.pdf stamp signature.pdf output B-signed.pdf
pdftk is much smarted than that, and it would have been able to extract a
single document with all pages of C.pdf except the last one, but with Italian
bureaucracy it is painful enough to get the job done that afterwards one is
more likely to need eating chocolate to avoid depression, rather than to try
and redo it all again more elegantly.
So, there are times when bureaucracy calls for printing a pile of sheets,
mindlessly sign them all, scan them again, shred them, plant a new tree, and
then finally book a MRI scan of your wrist to assess the state of your carpal
tunnel.
In those times, pdftk and
inkscape can save the day.
A.pdf, B.pdf and C.pdf) are copies
of multi-page PDFs where I need to sign each page and then send them back.
One of them (let's say C.pdf) needs to be signed on each page except the
last, which needs instead to be signed twice in two special blank spaces.
I have a transparent png with my signature (let's call it signature.png).
Let's start with C.pdf:
# Split C.pdf into single-page PDFs
pdftk C.pdf burst
# Edit a random page in inkscape, add a signature to the corner of the
# page, delete the rest of the contents and save as signature.pdf
inkscape pg_0001.pdf
# Edit the last page in inkscape, add the signatures where needed, save
# as pg_0005-signed.pdf
inkscape pg_0005.pdf
# Stamp the signatures all over all pages but the last one
for f in pg_000[1-4].pdf
do
pdftk $f stamp signature.pdf output basename $f .pdf -signed.pdf
done
# Put it all together
pdftk pg_000*-signed.pdf cat output C-signed.pdf
And now that I have signature.pdf, I can easily process A and B:
pdftk A.pdf stamp signature.pdf output A-signed.pdf
pdftk B.pdf stamp signature.pdf output B-signed.pdf
pdftk is much smarted than that, and it would have been able to extract a
single document with all pages of C.pdf except the last one, but with Italian
bureaucracy it is painful enough to get the job done that afterwards one is
more likely to need eating chocolate to avoid depression, rather than to try
and redo it all again more elegantly.
So, there are times when bureaucracy calls for printing a pile of sheets,
mindlessly sign them all, scan them again, shred them, plant a new tree, and
then finally book a MRI scan of your wrist to assess the state of your carpal
tunnel.
In those times, pdftk and
inkscape can save the day.
A.pdf, B.pdf and C.pdf) are copies
of multi-page PDFs where I need to sign each page and then send them back.
One of them (let's say C.pdf) needs to be signed on each page except the
last, which needs instead to be signed twice in two special blank spaces.
I have a transparent png with my signature (let's call it signature.png).
Let's start with C.pdf:
# Split C.pdf into single-page PDFs pdftk C.pdf burst # Edit a random page in inkscape, add a signature to the corner of the # page, delete the rest of the contents and save as signature.pdf inkscape pg_0001.pdf # Edit the last page in inkscape, add the signatures where needed, save # as pg_0005-signed.pdf inkscape pg_0005.pdf # Stamp the signatures all over all pages but the last one for f in pg_000[1-4].pdf do pdftk $f stamp signature.pdf output basename $f .pdf -signed.pdf done # Put it all together pdftk pg_000*-signed.pdf cat output C-signed.pdf
signature.pdf, I can easily process A and B:
pdftk A.pdf stamp signature.pdf output A-signed.pdf pdftk B.pdf stamp signature.pdf output B-signed.pdf
pdftk is much smarted than that, and it would have been able to extract a
single document with all pages of C.pdf except the last one, but with Italian
bureaucracy it is painful enough to get the job done that afterwards one is
more likely to need eating chocolate to avoid depression, rather than to try
and redo it all again more elegantly.
So, there are times when bureaucracy calls for printing a pile of sheets,
mindlessly sign them all, scan them again, shred them, plant a new tree, and
then finally book a MRI scan of your wrist to assess the state of your carpal
tunnel.
In those times, pdftk and
inkscape can save the day.
The binary code, although necessary for major social and technological developments, is annihilating the Homo Technologicus, stifling his innate freedom for analog connections.
The first widespread use of the binary code was the Morse code alphabet. For decades, this communication system allowed to transmit information over long distances, between ships in the ocean and the mainland, between one continent and another, and today its use is still active in emergency situations. In its disarming simplicity (connect or interrupt two electrical wires), this system proved to be the shortest way to transcribe an alphabet.
Then, the Boolean algebra (binary) represented the language of communication between humans and computers, enabling the translation of instructions and commands towards the processing unit (microprocessor / CPU). This determined the Big Bang of the computers and the technological era
<Read More...>
The US Government is attempting to force Apple to build a signed image that can be flashed onto an iPhone used by one of the San Bernardino shooters. To their credit, Apple have pushed back against this - there's an explanation of why doing so would be dangerous here. But what's noteworthy is that Apple are arguing that they shouldn't do this, not that they can't do this - Apple (and many other phone manufacturers) have designed their phones such that they can replace the firmware with anything they want.The distribution model is broken! if you get your software from a distribution you have to trust the package maintainer not to add malicious code!
What happened in the reproducible
builds effort between February
14th and February 20th 2016:
asciidoc.C locale to format the changelog date.C locale to format the build date.SOURCE_DATE_EPOCH..deb files in the same parent directory. Alongside more bug fixes, support for ICC profiles has been added, and libarchive is now also used to read metadata for ar archives.
.mo files.
ccache, skip disorderfs hook if device nodes cannot be created, compatibility with grsec trusted path execution (Reiner Herrmann), code cleanup (Esa Peuha).
I recently stumbled across an XML format specified in a DTD that I wanted
to work with from within C++. The XML format is document centric, which
is a bit of a pain with existing data binding compilers according to my limited
experience.
So to learn something new, and to keep control over generated code,
I started to investigate what it would take to write my
own little custom data binding compiler.
To keep my life simple, I am focusing on generating accessors for XML attributes only for now. I leave it up to the library client to figure out how to deal with child elements.
- The DTD class from lxml.etree.
- The Jinja2 templating system.
class element
public:
using attributes_type = std::map<xml::qname, std::string>;
using elements_type = std::vector<std::shared_ptr<element>>;
element(const xml::qname& name) : tag_name_(name)
virtual ~element() = default;
xml::qname const& tag_name() const return tag_name_;
attributes_type const& attributes() const return attributes_;
attributes_type& attributes() return attributes_;
std::string const& text() const return text_;
void text(std::string const& text) text_ = text;
elements_type const& elements() const return elements_;
elements_type& elements() return elements_;
element(xml::parser&, bool start_end = true);
void serialize (xml::serializer&, bool start_end = true) const;
template<typename T> static std::shared_ptr<element> create(xml::parser& p)
return std::make_shared<T>(p, false);
private:
xml::qname tag_name_;
attributes_type attributes_;
std::string text_; // Simple content only.
elements_type elements_; // Complex content only.
;
class factory
public:
static std::shared_ptr<element> make(xml::parser& p);
protected:
struct element_info
xml::content content_type;
std::shared_ptr<element> (*construct)(xml::parser&);
;
using map_type = std::map<xml::qname, element_info>;
static map_type *get_map()
if (!map) map = new map_type;
return map;
private:
static map_type *map;
;
template<typename T>
struct register_element : factory
register_element(xml::qname const& name, xml::content const& content)
get_map()->insert( name, element_info content, &element::create<T> );
;
shared_ptr<element> factory::make(xml::parser& p)
auto name = p.qname();
auto iter = get_map()->find(name);
if (iter == get_map()->end())
// No subclass found, so store plain data so we do not loose on roundtrip.
return std::make_shared<element>(p, false);
auto const& element = iter->second;
p.content(element.content_type);
return element.create(p);
%- for elem in dtd.iterelements() %
%- if elem.name in forwards_for %
%- for forward in forwards_for[elem.name] %
class forward ;
%- endfor %
%- endif %
class elem.name : public dom::element
static register_element< elem.name > factory_registration;
public:
elem.name (xml::parser& p, bool start_end = true) : dom::element(p, start_end)
%- for attr in elem.iterattributes() %
%- if attr is required_string_attribute %
std::string attr.name () const;
void attr.name (std::string const&);
%- elif attr is implied_string_attribute %
optional<std::string> attr.name () const;
void attr.name (optional<std::string>);
# more branches to go here #
%- endif %
%- endfor %
;
%- endfor %
templates.tests['required_string_attribute'] = lambda a: \
a.type in ['id', 'cdata', 'idref'] and a.default == 'required'
templates.tests['implied_string_attribute'] = lambda a: \
a.type in ['id', 'cdata', 'idref'] and a.default == 'implied'
%- elif attr is known_enumeration_attribute %
%- set enum = enumerations[tuple(attr.values())]['name'] %
%- if attr.default == 'required' %
enum elem.name :: attr.name () const
auto iter = attributes().find(qname " attr.name " );
if (iter != attributes().end())
%- for value in attr.values() %
% if not loop.first % else % else % % endif -%
if (iter->second == " value ") return enum :: value mangle ;
%- endfor %
throw illegal_enumeration ;
throw missing_attribute ;
void elem.name :: attr.name ( enum value)
static qname const attr " attr.name " ;
switch (value)
%- for value in attr.values() %
case enum :: value mangle :
attributes()[attr] = " value ";
break;
%- endfor %
default:
throw illegal_enumeration ;
%- elif attr.default == 'implied' %
# similar implementation using boost::optional #
%- endif %
%- endif %
from jinja2 import DictLoader, Environment
from lxml.etree import DTD
LIBRARY_HEADER = """
# Our template code #
"""
bmml = DTD('bmml.dtd')
templates = Environment(loader=DictLoader(globals()))
templates.filters['mangle'] = lambda ident: \
'8th_or_128th': 'eighth_or_128th',
'256th': 'twohundredfiftysixth',
'continue': 'continue_'
.get(ident, ident)
def template(name):
return templates.get_template(name)
def hpp():
print(template('LIBRARY_HEADER').render(
'dtd': bmml,
'enumerations': enumerations,
'forwards_for': 'ornament': ['ornament_type'],
'score': ['score_data', 'score_header']
))
template<typename T>
typename std::enable_if<std::is_base_of<element, T>::value, std::ostream&>::type
operator<<(std::ostream &out, std::shared_ptr<T> elem)
if (!std::dynamic_pointer_cast<note_data>(elem) &&
!std::dynamic_pointer_cast<rest_data>(elem) &&
!std::dynamic_pointer_cast<score_header>(elem))
auto const& text = elem->text();
if (text.empty()) for (auto child : *elem) out << child; else out << text;
return out;
#include <fstream>
#include <iostream>
#include <xml/parser>
#include <xml/serializer>
#include "bmml.hxx"
using namespace std;
using namespace xml;
int main (int argc, char *argv[])
if (argc < 2)
cerr << "usage: " << argv[0] << " [<filename.bmml>...]" << endl;
return EXIT_FAILURE;
try
for (int i = 1; i < argc; ++i)
ifstream ifs argv[i] ;
if (ifs.good())
parser p ifs, argv[i] ;
p.next_expect(parser::start_element, "score", content::complex);
cout << make_shared<bmml::score>(p, false) << endl;
p.next_expect(parser::end_element, "score");
else
cerr << "Unable to open '" << argv[i] << "'." << endl;
return EXIT_FAILURE;
catch (xml::exception const& e)
cerr << e.what() << endl;
return EXIT_FAILURE;
I recently stumbled across an XML format specified in a DTD that I wanted
to work with from within C++. The XML format is document centric, which
is a bit of a pain with existing data binding compilers according to my limited
experience.
So to learn something new, and to keep control over generated code,
I started to investigate what it would take to write my
own little custom data binding compiler.
To keep my life simple, I am focusing on generating accessors for XML attributes only for now. I leave it up to the library client to figure out how to deal with child elements.
- The DTD class from lxml.etree.
- The Jinja2 templating system.
class element
public:
using attributes_type = std::map<xml::qname, std::string>;
using elements_type = std::vector<std::shared_ptr<element>>;
element(const xml::qname& name) : tag_name_(name)
virtual ~element() = default;
xml::qname const& tag_name() const return tag_name_;
attributes_type const& attributes() const return attributes_;
attributes_type& attributes() return attributes_;
std::string const& text() const return text_;
void text(std::string const& text) text_ = text;
elements_type const& elements() const return elements_;
elements_type& elements() return elements_;
element(xml::parser&, bool start_end = true);
void serialize (xml::serializer&, bool start_end = true) const;
template<typename T> static std::shared_ptr<element> create(xml::parser& p)
return std::make_shared<T>(p, false);
private:
xml::qname tag_name_;
attributes_type attributes_;
std::string text_; // Simple content only.
elements_type elements_; // Complex content only.
;
class factory
public:
static std::shared_ptr<element> make(xml::parser& p);
protected:
struct element_info
xml::content content_type;
std::shared_ptr<element> (*construct)(xml::parser&);
;
using map_type = std::map<xml::qname, element_info>;
static map_type *get_map()
if (!map) map = new map_type;
return map;
private:
static map_type *map;
;
template<typename T>
struct register_element : factory
register_element(xml::qname const& name, xml::content const& content)
get_map()->insert( name, element_info content, &element::create<T> );
;
shared_ptr<element> factory::make(xml::parser& p)
auto name = p.qname();
auto iter = get_map()->find(name);
if (iter == get_map()->end())
// No subclass found, so store plain data so we do not loose on roundtrip.
return std::make_shared<element>(p, false);
auto const& element = iter->second;
p.content(element.content_type);
return element.create(p);
%- for elem in dtd.iterelements() %
%- if elem.name in forwards_for %
%- for forward in forwards_for[elem.name] %
class forward ;
%- endfor %
%- endif %
class elem.name : public dom::element
static register_element< elem.name > factory_registration;
public:
elem.name (xml::parser& p, bool start_end = true) : dom::element(p, start_end)
%- for attr in elem.iterattributes() %
%- if attr is required_string_attribute %
std::string attr.name () const;
void attr.name (std::string const&);
%- elif attr is implied_string_attribute %
optional<std::string> attr.name () const;
void attr.name (optional<std::string>);
# more branches to go here #
%- endif %
%- endfor %
;
%- endfor %
templates.tests['required_string_attribute'] = lambda a: \
a.type in ['id', 'cdata', 'idref'] and a.default == 'required'
templates.tests['implied_string_attribute'] = lambda a: \
a.type in ['id', 'cdata', 'idref'] and a.default == 'implied'
%- elif attr is known_enumeration_attribute %
%- set enum = enumerations[tuple(attr.values())]['name'] %
%- if attr.default == 'required' %
enum elem.name :: attr.name () const
auto iter = attributes().find(qname " attr.name " );
if (iter != attributes().end())
%- for value in attr.values() %
% if not loop.first % else % else % % endif -%
if (iter->second == " value ") return enum :: value mangle ;
%- endfor %
throw illegal_enumeration ;
throw missing_attribute ;
void elem.name :: attr.name ( enum value)
static qname const attr " attr.name " ;
switch (value)
%- for value in attr.values() %
case enum :: value mangle :
attributes()[attr] = " value ";
break;
%- endfor %
default:
throw illegal_enumeration ;
%- elif attr.default == 'implied' %
# similar implementation using boost::optional #
%- endif %
%- endif %
from jinja2 import DictLoader, Environment
from lxml.etree import DTD
LIBRARY_HEADER = """
# Our template code #
"""
bmml = DTD('bmml.dtd')
templates = Environment(loader=DictLoader(globals()))
templates.filters['mangle'] = lambda ident: \
'8th_or_128th': 'eighth_or_128th',
'256th': 'twohundredfiftysixth',
'continue': 'continue_'
.get(ident, ident)
def template(name):
return templates.get_template(name)
def hpp():
print(template('LIBRARY_HEADER').render(
'dtd': bmml,
'enumerations': enumerations,
'forwards_for': 'ornament': ['ornament_type'],
'score': ['score_data', 'score_header']
))
template<typename T>
typename std::enable_if<std::is_base_of<element, T>::value, std::ostream&>::type
operator<<(std::ostream &out, std::shared_ptr<T> elem)
if (!std::dynamic_pointer_cast<note_data>(elem) &&
!std::dynamic_pointer_cast<rest_data>(elem) &&
!std::dynamic_pointer_cast<score_header>(elem))
auto const& text = elem->text();
if (text.empty()) for (auto child : *elem) out << child; else out << text;
return out;
#include <fstream>
#include <iostream>
#include <xml/parser>
#include <xml/serializer>
#include "bmml.hxx"
using namespace std;
using namespace xml;
int main (int argc, char *argv[])
if (argc < 2)
cerr << "usage: " << argv[0] << " [<filename.bmml>...]" << endl;
return EXIT_FAILURE;
try
for (int i = 1; i < argc; ++i)
ifstream ifs argv[i] ;
if (ifs.good())
parser p ifs, argv[i] ;
p.next_expect(parser::start_element, "score", content::complex);
cout << make_shared<bmml::score>(p, false) << endl;
p.next_expect(parser::end_element, "score");
else
cerr << "Unable to open '" << argv[i] << "'." << endl;
return EXIT_FAILURE;
catch (xml::exception const& e)
cerr << e.what() << endl;
return EXIT_FAILURE;
I had no access to the internet for most of my childhood. Nobody in my area knew anything about programming. I learned a great deal from a number of CDs that included free software source code and archives of project mailing lists. When I got to university, I learned even more by being able to develop a Debian-based OS for use in our computer facilities. That gave me the experience and knowledge that I needed to become involved in Debian development, which in turn gave me the background required to be able to help Ubuntu become the first free software operating system to work out of the box on modern laptops. From there, I've been able to build my career around developing free software.if [ "$PEERDNS" != "no" ] [ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
[ -n "$MS_DNS1" ] && DNS1=$MS_DNS1
[ -n "$MS_DNS2" ] && DNS2=$MS_DNS2
if [ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf &&
tr=$(mktemp /tmp/XXXXXX) ; then
...
So if you adjust only the second nameserver IP you stored in "DNS2" in your configuration
you end up without an update to your 'resolv.conf'. Now knowing that, I'd say this is
relevant distribution specific knowledge, and I'm wondering how many of such subtle
behaviours we've hidden in Debian specific solutions? Maybe knowledge about distribution
specific implementation details even matters after all.
Regardig the 'resolv.conf' issue itself the fault is on us. We as the responsible team
did not read the documentation properly and thus deployed a configuration that later on
let to some unexpected consequences. I try to remember those issues as an example for the
next NetworkManager/systemd-networkd vs old-school-network-scripts argument.
The first major version of the scalable timeserie database I work on,
Gnocchi was a released a few months ago. In this first
iteration, it took a rather naive approach to data storage. We had little ideas
about if and how our distributed back-ends were going to be heavily used, so we
stuck to the code of the first proof-of-concept written a couple of years ago.
Recently we got more feedbacks from our users, ran a few
benchmarks. That gave us enough feedback to start
investigating in improving our storage strategy.
Data split
Up to Gnocchi 1.3, all data for a single metric are stored in a single gigantic
file per aggregation method (min, max, average ). This means that the
file can grow to several megabytes in size, which make it slow to manipulate.
For the next version of Gnocchi, our first work has been to rework that storage
and split the data into smaller parts.
The diagram above shows how data are organized inside Gnocchi. Until version
1.3, there would have been only one file for each aggregation methods.
In the upcoming 2.0 version, Gnocchi will split all these data into smaller
parts, where each data split is stored in a file/object. This allows to
manipulate smaller pieces of data and to increase the parallelism of the CRUD
operations on the back-end leading to large speed improvement.
In order to split timeseries into several chunks, Gnocchi defines a maximum
number of N points to keep per chunk, to limit their maximum size. It then
defines a hash function that produces a non-unique key for any timestamp. It
makes it easy to find in which chunk any timestamp should be stored or
retrieved.
Data compression
Up to Gnocchi 1.3, the data stored for each metric is simply serialized using
msgpack, a fast and small serialization format. Though,
this format does not provide any compression. That means that storing data
points needs 8 bytes for a timestamp (64 bits timestamp with nanosecond
precision) and 8 bytes for a value (64 bits double-precision floating-point),
plus some overhead (extra information and msgpack itself).
After looking around on how to compress all these measures, I stumbled upon a
paper from some Facebook engineers called about Gorilla,
their in-memory timeserie database, entitled
"Gorilla: A Fast, Scalable, In-Memory Time Series Database".
For reference, part of this encoding is also used by
InfluxDB
in its new storage engine.
The first technique I implemented is easy enough, and it's inspired from
delta-of-delta encoding. Instead of storing each timestamp for each data point,
and since all the data points are aggregated on a regular interval, we
transpose points to be the time difference divided by the interval. For
example, the suite of timestamps timestamps =
[41230, 41235, 41240, 41250, 41255] is encoded into timestamps =
[41230, 1, 1, 2, 1], interval = 5. This allows regular compression algorithms
to reduce the size of the integer list using
run-length encoding.
To actually compress the values, I tried two different algorithms:
The XOR algorithm implemented in Python is pretty slow, compared to LZ4. Truth
is that python-lz4 is fully implemented
in C, which makes it fast. I've profiled my XOR implementation in Python, to
discover that one operation took 20 % of the time:
count_lead_and_trail_zeroes, which is in charge of counting the number of
leading and trailing zeroes in a binary number.
I tried 2 Python implementations of the same algorithm (and submitted them to
my friend and Python developer
Victor Stinner by the way).
The first version using string search with .index() is 10 faster than the
second one that only do integer computation. Ah, Python As Victor explained,
each Python operation is slow and there's a lot in the second version, whereas
.index() is implemented in C and really well optimized and only needs 2
Python operations.
Finally, I ended up optimizing that code by leveraging
cffi to use directly ffsll() and
flsll(). That decreased the run-time of count_lead_and_trail_zeroes by
45 %, making the entire XOR compression code speed increased by a small 7 %.
This is not enough to catch up with LZ4 speed. At this stage, the only solution
to achieve a high-speed would probably to go with a full C implementation.
Considering the compression ratio of the different algorithms, they are pretty
much identical. The worst case scenario (random values) for LZ4 compress down
to 9 bytes per data point, whereas XOR can go down to 7.38 bytes per data
point. In general XOR encoding beats LZ4 by 15 %, except for cases where all
values are 0 or 1. However, LZ4 is faster than XOR by a factor of 4 -70
depending on cases.
That means that we'll use LZ4 for data compression in Gnocchi 2.0. It's
possible that we could achieve as fast compression/decompression algorithm, but
I don't think it's worth the effort right now it'd represent a lot of code to
write and to maintain.
Like each month, here comes a report about the work of paid contributors to Debian LTS.
Individual reports
In December, 113.50 work hours have been dispatched among 9 paid contributors. Their reports are available:
No comment Liked this article? Click here. My blog is Flattr-enabled.
More than 10 years ago, I launched Unhappy Birthday in a fit of copyrighteous exuberance. In the last decade, I have been interviewed on the CBC show WireTap and have received an unrelenting stream of hate mail from random strangers.
With a recently announced settlement suggesting that Happy Birthday is on its way into the public domain, it s not possible for even the highest-protectionist in me to justify the continuation of the campaign in its original form. As a result, I ve suspended the campaign while I plan my next move. Here s the full text of the notice I posted on the Unhappy Birthday website:
Unfortunately, a series of recent legal rulings have forced us to suspend our campaign. In 2015, Time Warner s copyright claim to Happy Birthday was declared invalid. In 2016, a settlement was announced that calls for a judge to officially declare that the song is in the public domain. This is horrible news for the future of music. It is horrible news for anybody who cares that creators, their heirs, etc., are fairly remunerated when their work is performed. What incentive will there be for anybody to pen the next Happy Birthday knowing that less than a century after their deaths their estates and the large multinational companies that buy their estates might not be able to reap the financial rewards from their hard work and creativity? We are currently planning a campaign to push for a retroactive extension of copyright law to place Happy Birthday, and other works, back into the private domain where they belong! We believe this is a winnable fight. After all, copyright has been retroactively extended before! Stay tuned! In the meantime, we ll keep this page here for historical purposes.Copyrighteous Benjamin Mako Hill (2016-02-11)
I've integrated letsencrypt into propellor today.
I'm using the reference letsencrypt client. While I've seen complaints that
it has a lot of dependencies and is too complicated, it seemed to only need
to pull in a few packages, and use only a few megabytes of disk space, and
it has fewer options than ls does. So seems fine. (Although it would be
nice to have some alternatives packaged in Debian.)
I ended up implementing this:
letsEncrypt :: AgreeTOS -> Domain -> WebRoot -> Property NoInfo
This property just makes the certificate available, it does not configure
the web server to use it. This avoids relying on the letsencrypt client's
apache config munging, which is probably useful for many people, but not
those of us using configuration management systems. And so avoids most of
the complicated magic that the letsencrypt client has a reputation for.
Instead, any property that wants to use the certificate can just
use leteencrypt to get it and set up the server when it makes a change to
the certificate:
letsEncrypt (LetsEncrypt.AgreeTOS (Just "me@my.domain")) "example.com" "/var/www"
onChange setupthewebserver
(Took me a while to notice I could use onChange like that,
and so divorce the cert generation/renewal from the server setup.
onChange is awesome! This blog post has been updated accordingly.)
In practice, the http site has to be brought up first, and then
letsencrypt run, and then the cert installed and the https site brought up
using it. That dance is automated by this property:
Apache.httpsVirtualHost "example.com" "/var/www"
(LetsEncrypt.AgreeTOS (Just "me@my.domain"))
That's about as simple a configuration as I can imagine for such a website!
Most recently, former Greek finance minister Yanis Varoufakis has announced plans to found a movement (not a political party) that claims to "democratise" the EU by 2025. Ironically, one of his first steps has been to create a web site directing supporters to Facebook and Twitter. A groundbreaking effort to put citizens back in charge? Or further entangling activism in the false hope of platforms that are run for profit by their Silicon Valley overlords? A Greek tragedy indeed, in the classical sense.
Varoufakis rails against authoritarian establishment figures who don't put the citizens' interests first. Ironically, big data and the cloud are a far bigger threat than Brussels. The privacy and independence of each citizen is fundamental to a healthy democracy. Companies like Facebook are obliged - by law and by contract - to service the needs of their shareholders and advertisers paying to study and influence the poor user. If "Facebook privacy" settings were actually credible, who would want to buy their shares any more?
Facebook is more akin to an activism placebo: people sitting in their armchair clicking to "Like" whales or trees are having hardly any impact at all. Maintaining democracy requires a sufficient number of people to be actively involved, whether it is raising funds for worthwhile causes, scrutinizing the work of our public institutions or even writing blogs like this. Keeping them busy on Facebook and Twitter renders them impotent in the real world (but please feel free to alert your friends with a tweet)
Big data is one of the areas that requires the greatest scrutiny. Many of the professionals working in the field are actually selling out their own friends and neighbours, their own families and even themselves. The general public and the policy makers who claim to represent us are oblivious or reckless about the consequences of this all-you-can-eat feeding frenzy on humanity.
Pretending to be democratic is all part of the illusion. Facebook's recent announcement to deviate from their real-name policy is about as effective as using sunscreen to treat HIV. By subjecting themselves to the laws of Facebook, activists have simply given Facebook more status and power.
Data means power. Those who are accumulating it from us, collecting billions of tiny details about our behavior, every hour of every day, are fortifying a position of great strength with which they can personalize messages to condition anybody, anywhere, to think the way they want us to. Does that sound like the route to democracy?
I would encourage Mr Varoufakis to get up to speed with Free Software and come down to Zurich next week to hear Richard Stallman explain it the day before launching his DiEM25 project in Berlin.
Will the DiEM25 movement invite participation from experts on big data and digital freedom and make these issues a core element of their promised manifesto? Is there any credible way they can achieve their goal of democracy by 2025 without addressing such issues head-on?
Or put that the other way around: what will be left of democracy in 2025 if big data continues to run rampant? Will it be as distant as the gods of Greek mythology?
Still not convinced? Read about Amazon secretly removing George Orwell's 1984 and Animal Farm from Kindles while people were reading them, Apple filtering the availability of apps with a pro-Life bias and Facebook using algorithms to identify homosexual users.
See the appstream wiki page to learn how to embed the package metadata in a way appstream can use. This same approach can be used to find any package supporting a given MIME type. This is very useful when you get a file you do not know how to handle. First find the mime type using file --mime-type, and next look up the package providing support for it. Lets say you got an SVG file. Its MIME type is image/svg+xml, and you can find all packages handling this type like this:% apt install appstream [...] % apt update [...] % appstreamcli what-provides firmware:runtime ctfw-3.2.3.0.bin \ awk '/Package:/ print $2 ' firmware-qlogic %
I believe the MIME types are fetched from the desktop file for packages providing appstream metadata.% apt install appstream [...] % apt update [...] % appstreamcli what-provides mimetype image/svg+xml \ awk '/Package:/ print $2 ' bkchem phototonic inkscape shutter tetzle geeqie xia pinta gthumb karbon comix mirage viewnior postr ristretto kolourpaint4 eog eom gimagereader midori %
Next.