FLOSS Project Planets

Sven Hoexter: examine gpg key properties

Planet Debian - Tue, 2016-02-09 11:03

Note to myself so I don't have to search for it the next time I've to answer security audit questions.

If you're lucky and you're running Debian you can install pgpdump and use

gpg --export-options export-minimal --export $KEYID | pgpdump

to retrieve a human friendly output. If you're unlucky you have to use

gpg --export-options export-minimal --export $KEYID | gpg --list-packets

and match the CIPHER_ALGO_∗ and DIGEST_ALGO_∗ numbers with those in include/cipher.h.

Found the information in this thread.

Update: anarcat suggested to take a look at the tools contained in hopenpgp-tools.

Categories: FLOSS Project Planets

Cryptic.Zone: Drupal 8 Cheatsheet for Developers

Planet Drupal - Tue, 2016-02-09 11:02

It has been a few months since Drupal 8 was released and sites built with it are starting to crop up. I myself have had the pleasure of working with it, and more Drupal 8 projects are certainly on the horizon. From a developer's perspective, this version is substantially different from the previous one, and we will need to learn a handful of new ways of doing things. To ease the process, I have put together this list of how-tos with tasks that I commonly encounter during development. I hope you will find it helpful.

Categories: FLOSS Project Planets

Joachim Breitner: GHC performance is rather stable

Planet Debian - Tue, 2016-02-09 10:17

Johannes Bechberger, while working on his Bachelor’s thesis supervised by my colleague Andreas Zwinkau, has developed a performance benchmark runner and results visualizer called “temci”, and used GHC as a guinea pig. You can read his elaborate analysis on his blog.

This is particularly interesting given recent discussions about GHC itself becoming slower and slower, as for example observed by Johannes Waldmann and Anthony Cowley.

Johannes Bechberger’s take-away is that, at least for the programs at hand (which were taken from the The Computer Language Benchmarks Game, there are hardly any changes worth mentioning, as most of the observed effects are less than a standard deviation and hence insignificant. He tries hard to distill some useful conclusions from the data; the one he finds are:

  • Compile time does not vary significantly.
  • The compiler flag -O2 indeed results in faster code than -O.
  • With -O (but not -O2), GHC 8.0.1 is better than GHC 7.0.1. Maybe some optimizations were promoted to -O?

If you are interested, please head over to Johannes’s post and look at the gory details of the analysis and give him feedback on that. Also, maybe his tool temci is something you want to try out?

Personally, I find it dissatisfying to learn so little from so much work, but as he writes: “It’s so easy to lie with statistics.”, and I might add “lie to yourself”, e.g. by ignoring good advise about standard deviations and significance. I’m sure my tool gipeda (which powers perf.haskell.org) is guilty of that sin.

Maybe a different selection of test programs would yield more insight; the benchmark’s games programs are too small and hand-optimized, the nofib programs are plain old and the fibon collection has bitrotted. I would love to see a curated, collection of real-world programs, bundled with all dependencies and frozen to allow meaningful comparisons, but updated to a new, clearly marked revision, on a maybe bi-yearly basis – maybe Haskell-SPEC-2016 if that were not a trademark infringement.

Categories: FLOSS Project Planets

PyCon: Announcing the PyCon 2016 Talks Schedule

Planet Python - Tue, 2016-02-09 08:36
The Talks committee has been hard at work since the Call For Proposals closed 5 weeks ago, and today we are thrilled to present the result — here are the talks that the committee has chosen for PyCon 2016 in Portland, Oregon!https://us.pycon.org/2016/schedule/Every committee member is a volunteer who has given the conference many hours of their own time to make PyCon an event that serves the Python community. They were helped along in the process this year by the new talk selection web app that the committee chair wrote. The app lets people read proposals and cast votes whenever they find the time, instead of making them attend pre-scheduled meetings online. We hope this made participation possible for Python community members whose work schedule, family situation, or time zone made it difficult or impossible to help select talks in previous years.

As always, the committee faced a daunting task with determination:
  • The talks committee received 528 talk proposals
  • They knew the conference only has room for 95 talks
  • 45 people served on this year’s talks committee
In the first round of review, each proposal was evaluated on its own, against a fixed set of criteria:
  • The committee offered 11,371 votes
  • They nominated 123 proposals directly into the second round
  • They wrote 1,322 messages
  • Of those, 298 were feedback to the author
  • Every proposal received 11 or more reviews
  • 6 committee members managed to review every single proposal!
In the second round of review, proposals were grouped by topic, and committee members selected the best few talks from each batch:
  • 319 proposals made it into the second round
  • They were grouped into 68 batches
  • The committee offered 1,675 votes
  • They wrote 299 more messages
  • 34 voters participated
  • Every batch received 15 or more reviews
  • The result was 95 talks that fit PyCon’s schedule!
The conference offers its thanks to this year’s Talks committee Chair and Co-Chair, Ned Jackson Lovely and Karen Rustad Tölva, as well as to every committee member who worked long hours to make this process succeed. We were also helped along in keeping a tight schedule by the many speakers who submitted their proposal well before the deadline, which let the committee get to work early and start their review process before the Call for Proposals was even closed.We look forward to making more schedule announcements in the coming two weeks — the list of keynote speakers, the poster presentations, and the slate of tutorials. Stay tuned!
Categories: FLOSS Project Planets

Kushal Das: Tunir 0.13 is released and one year of development

Planet Python - Tue, 2016-02-09 07:31

Tunir 0.13 release is out. I already have a koji build in place for F23. There are two major feature updates in this release.

AWS support

Yes, we now support testing on AWS EC2. You will have to provide your access tokens in the job configuration along with the required AMI details. Tunir will boot up the instance, will run the tests, and then destroy the instance. There is documentation explaining the configuration details.

CentOS images

We now also support CentOS cloud images, and Vagrant images in Tunir. You can run the same tests on the CentOS images based on your need.

One year of development

I have started Tunir on Jan 12 2015, means it got more than one year of development history. At the beginning it was just a project to help me out with Fedora Cloud image testing. But it grew to a point where it is being used as the Autocloud backend to test Fedora Cloud, and Vagrant images. We will soon start testing the Fedora AMI(s) too using the same. Within this one year, there were total 7 contributors to the project. In total we are around 1k lines of Python code. I am personally using Tunir for various other projects too. One funny thing from the code commits timings, no commit on Sundays :)

Categories: FLOSS Project Planets

Python Does What?!: Undecoratable

Planet Python - Tue, 2016-02-09 07:18
Decorators are one of Python's bigger success stories, and many programmers' first experience with higher-order programming. Most practiced and prolific Python programmers will find themselves making good use of them regularly.

But every feature has its limits, and here's a new one to try on for size:

>>> @x().y()
  File "<stdin>", line 1
SyntaxError: invalid syntax

That's right, decoration is not an arbitrary Python expression. It doesn't matter what x and y were, or even if they were defined. You can't follow a function call with a dot. @x() works fine, @x.y() would work fine, too. But @x().y(), that's only for mad Pythonists who would take things TOO FAR.

Decorator invocations, defined at the top of the Python grammar, can only be followed by class definitions and function definitions.

Well, now we know, and now we can all say we've been there

-- Mahmoud
Categories: FLOSS Project Planets

FSF Events: Richard Stallman to speak in Santa Coloma de Gramenet, Spain

GNU Planet! - Tue, 2016-02-09 06:53

Esa charla de Richard Stallman no será técnica y será abierta al público; todos están invitados a asistir.

El título de la charla será determinado.

Lugar: Institut Puig Castellar, Avinguda Anselm de Riu 10 Santa Coloma de Gramenet (metro 'Can Zam' (L9), 'Santa Coloma' (L1))

Favor de rellenar este formulario, para que podamos contactarle acerca de eventos futuros en la región de Barcelona.

Categories: FLOSS Project Planets

Alessio Treglia: The poetic code

Planet Debian - Tue, 2016-02-09 06:31


As well as the simple reading of a musical score is sufficient to an experienced musician to recognize the most velvety harmonic variations of an orchestral piece, so the apparent coldness of a fragment of program code can stimulate emotions of ecstatic contemplation in the developer.

Don’t be misled by the simplicity of the laconic definition of the code as a sequence of instructions to be given to a computer to solve a specific problem. Generally, a problem has multiple solutions, the most simple and fast to implement, the most economical from the point of view of machine cycles or memory, the elegant solution and the makeshift one.

However, there is always a “poetic” solution, the one that has a particular and unusual beauty and that is always generated by the inexhaustible forge of the human intuition….

[Read More…]

Categories: FLOSS Project Planets

Ingo Juergensmann: Letsencrypt - when your blog entries don't show up on Planet Debian

Planet Debian - Tue, 2016-02-09 06:27

Recently there is much talk on Planet Debian about LetsEncrypt certs. This is great, because using HTTPS everywhere improves security and gives the NSA some more work to decrypt the traffic.

However, when you enabled your blog with a LetsEncrypt cert, you might run into the same problem as I: your new article won't show up on Planet Debian after changing your feed URI to HTTPS. The reason seems to be quite simple: planet-venus, which is the software behind Planet Debian seems to have problems with SNI enabled websites.

When following the steps outlined in the Debian Wiki, you can check this by yourself: 

INFO:planet.runner:Fetching https://blog.windfluechter.net/taxonomy/term/2/feed via 5
ERROR:planet.runner:HttpLib2Error: Server presented certificate that does not match host blog.windfluechter.net: {'subjectAltName': (('DNS', 'abi94oesede.de'), ('DNS', 'www.abi94oesede.de')), 'notBefore': u'Jan 26 18:05:00 2016 GMT', 'caIssuers': (u'http://cert.int-x1.letsencrypt.org/',), 'OCSP': (u'http://ocsp.int-x1.letsencrypt.org/',), 'serialNumber': u'01839A051BF9D2873C0A3BAA9FD0227C54D1', 'notAfter': 'Apr 25 18:05:00 2016 GMT', 'version': 3L, 'subject': ((('commonName', u'abi94oesede.de'),),), 'issuer': ((('countryName', u'US'),), (('organizationName', u"Let's Encrypt"),), (('commonName', u"Let's Encrypt Authority X1"),))} via 5

I've filed bug #813313 for this. So, this might explain why your blog post doesn't appear on Planet Debian. Currently there seem 18 sites to be affected by this cert mismatch.

Kategorie: DebianTags: DebianSoftwareBugPython 
Categories: FLOSS Project Planets

Commerce Guys: Commerce Guys Refocusing on Drupal Commerce as Platform.sh Becomes an Independent Company

Planet Drupal - Tue, 2016-02-09 06:26

Commerce Guys has long been a leader in the development of e-commerce websites using Drupal, with our flagship Drupal Commerce project running on over 60,000 sites. We are now releasing alphas of Commerce 2.x for Drupal 8 every two weeks, with alpha3 up next. Our first production ready beta is scheduled for end of March, but developers are already using our standalone libraries for addressing and currency localization in production. Written to support Commerce 2.x, these libraries gave us a chance to share our knowledge and experience with the broader PHP world.

Over the last several years, we have also developed and launched a second generation Platform-as-a-Service for web applications, Platform.sh. With thousands of customers and an ever expanding list of supported technologies, Platform.sh is now becoming an independent company led by my two partners, Frédéric Plais as CEO and Damien Tournoud as CTO. With the full support of our existing investors, Platform.sh will use this move to grow and adapt to meet the needs of the new development communities it serves.

As the remaining founder, I have acquired Commerce Guys' Drupal Commerce business. I am succeeding Fred to manage the company as its President and will lead it to refocus on the development and support of Drupal Commerce and its community. My co-maintainers, Bojan Živanović and Matt Glaman, will continue to lead our software development and consulting programs respectively, with goals to achieve a Commerce 2.x release candidate by DrupalCon New Orleans (join us! : ) and to offer more strategic consulting and support to companies implementing Drupal Commerce.

Finally, we are adopting a new operating model whereby we deliver full Drupal Commerce projects through exclusive regional affiliates. I'm pleased to announce two launch partners, Actualys of Paris, France and Acro Media of Kelowna, BC, Canada:

  • Actualys has acquired Commerce Guys’ France-based services team and clients. They will deliver Drupal Commerce projects as Commerce Guys France and facilitate promotion and development of the software in France, Switzerland, Belgium, and Luxembourg.
  • Acro Media has acquired Commerce Guys’ U.S.-based services team and clients. They will deliver Drupal Commerce projects in affiliation with Commerce Guys in the United States and Canada and are dedicating developers and designers to the development of Drupal Commerce (and especially Commerce 2.x).

We expect to deliver strategic consulting services to these and other agencies and to deliver projects in territories not represented above. However, we do plan to engage additional affiliates in strategic territories throughout 2016.

Categories: FLOSS Project Planets

Investing using Python: History (hst) files to MongoDB using Python

Planet Python - Tue, 2016-02-09 06:08
As I mentioned previously, due to performance issues I've switched from MySQL to MongoDB. Now instead of running script for 4 days it seems read half gigabyte of hst files in one night with one instance. Other pro is that MongoDB in comparison doesn't overload disk resources and uses a lot more RAM, so I;m […]
Categories: FLOSS Project Planets

[Howto] Look up of external sources in Ansible

Planet KDE - Tue, 2016-02-09 06:07

Part of Ansible’s power comes from an easy integration with other systems. In this post I will cover how to look up data from external sources like DNS or Redis.


A tool for automation is only as good as it is capable to integrate it with the already existing environment – thus with other tools. Among various ways Ansible offers the possibility to look up Ansible variables from external stores like DNS, Redis, etcd or even generic INI or CSV files. This enables Ansible to easily access data which are stored – and changed, managed – outside of Ansible.


Ansible’s lookup feature is already installed by default.

Queries are executed on the host where the playbook is executed – in case of Tower this would be the Tower host itself. Thus the node needs access to the resources which needs to be queried.

Some lookup functions for example for DNS or Redis servers require additional python libraries – on the host actually executing the queries! On Fedora, the python-dns package is necessary for DNS queries and the package python-redis for Redis queries.

Generic usage

The lookup function can be used the exact same way variables are used: curly brackets surround the lookup function, the result is placed where the variable would be. That means lookup functions can be used in the head of a playbook, inside the tasks, even in templates.

The lookup command itself has to list the plugin as well as the arguments for the plugin:

{{ lookup('plugin','arguments') }} Examples Files

Entire files can be used as content of a variable. This is simply done via:

vars: content: "{{ lookup('file','lorem.txt') }}"

As a result, the variable has the entire content of the file. Note that the lookup of files always searches the files relative to the path of the actual playbook, not relative to the path where the command is executed.

Also, the lookup might fail when the file itself contains quote characters.


While the file lookup is pretty simple and generic, the CVS lookup module gives the ability to access values of given keys in a CVS file. An optional parameter can identify the appropriate column. For example, if the following CSV file is given:

$ cat gamma.csv daytime,time,meal breakfast,7,soup lunch,12,rice tea,15,cake dinner,18,noodles

Now the lookup function for CVS files can access the lines identified by keys which are compared to the values of the first column. The following example looks up the key dinner and gives back the entry of the third column: {{ lookup('csvfile','dinner file=gamma.csv delimiter=, col=2') }}.

Inserted in a playbook, this looks like:

ansible-playbook examples/lookup.yml PLAY [demo lookups] *********************************************************** GATHERING FACTS *************************************************************** ok: [neon] TASK: [lookup of a cvs file] ************************************************** ok: [neon] => { "msg": "noodles" } PLAY RECAP ******************************************************************** neon : ok=2 changed=0 unreachable=0 failed=0

The corresponding playbook gives out the variable via the debug module:

--- - name: demo lookups hosts: neon tasks: - name: lookup of a cvs file debug: msg="{{ lookup('csvfile','dinner file=gamma.csv delimiter=, col=2') }}" DNS

The DNS lookup is particularly interesting in cases where the local DNS provides a lot of information like SSH fingerprints or the MX record.

The DNS lookup plugin is called dig – like the command line client dig. As arguments, the plugin takes a domain name and the DNS type: {{ lookup('dig', 'redhat.com. qtype=MX') }}. Another way to hand over the type argument is via slash: {{ lookup('dig', 'redhat.com./MX') }}

The result for this example is:

TASK: [lookup of dns dig entries] ********************************************* ok: [neon] => { "msg": "10 int-mx.corp.redhat.com." } Redis

It gets even more interesting when existing databases are queried. Ansible lookup supports for example Redis databases. The plugin takes as argument the entire URL: redis://$URL:$PORT,$KEY.

For example, to query a local Redis server for the key dinner:

--- tasks: - name: lookup of redis entries debug: msg="{{ lookup('redis_kv', 'redis://localhost:6379,dinner') }}"

The result is:

TASK: [lookup of redis entries] *********************************************** ok: [neon] => { "msg": "noodles" } Template

As already mentioned, lookups can not only be used in Playbooks, but also directly in templates. For example, given the template code:

$ cat templatej2 ... Red Hat MX: {{ lookup('dig', 'redhat.com./MX') }} $ cat template.conf ... Red Hat MX: 10 mx2.redhat.com.,5 mx1.redhat.com. Conclusion

As shown the lookup plugin of Ansible provides many possibilities to integrate Ansible with existing tools and environments which already contain valuable data about the systems. It is easy to use, integrates well with the existing Ansible concepts and can quickly be integrated. Just drop it where a variable would be dropped, and it already works.

I am looking forward to more lookup modules support in the future – I’d love to see a generic “http” and a generic “SQL” plugin, even with the ability to provide credentials, although these features can be somewhat realized with already existing modules.

Filed under: Business, Cloud, Debian & Ubuntu, Fedora & RHEL, HowTo, Linux, RPM, Shell, SUSE, Technology
Categories: FLOSS Project Planets

Django Weblog: DjangoCon Europe 2016: Call for Sponsors

Planet Python - Tue, 2016-02-09 06:00

A number of generous sponsors have already stepped forward to help make DjangoCon Europe happen, but we need more. Can you help? We'd love to hear from you.

DjangoCon Europe is run entirely by volunteers, and every cent received in sponsorship will go towards making it the best event possible. The organizers aim to make the event as affordable and accessible as possible for everyone.

With your help, here are some of the things we're able to do:

  • provide 20 free tickets and 5000€ towards the Scholarship program,
  • assist a Django Girls workshop with 21 hugely discounted tickets for the attendees,
  • offer complimentary child care to everyone attending the conference with their children,
  • offer live captioning and subsequent text transcripts of all talks at the conference.

Sponsoring DjangoCon Europe is a great way to recruit Django developers, promote your product or give back to the community. The sponsorship packages start at 500€ and you can find more information in the sponsorship brochure.

Get in touch today!

Categories: FLOSS Project Planets

Michal &#268;iha&#345;: Weekly phpMyAdmin contributions 2016-W05

Planet Debian - Tue, 2016-02-09 06:00

Last week was really focused on code cleanups. The biggest change was removal of PmaAbsoluteUri configuration directive, which has caused quite some pain in past and is not really needed these days (when browsers support relative paths in the Location HTTP header).

This lead to cleanup in other parts as well - support for dead Mozilla Prism is gone, used HTTPS for OpenStreetMap tiles (the map layer now works on HTTPS as well), removed ForceSSL configuration directive as this is something what really needs to be handled at web server level. To improve test coverage, several tests no longer require runkit as the header() call is wrapped within Response class and can be overridden for testing without using runkit.

The list of handled issues is not that impressive this week:

Filed under: English phpMyAdmin | 0 comments

Categories: FLOSS Project Planets

Mike Gabriel: Résumé of our Edu Workshop in Kiel (26th - 29th January)

Planet Debian - Tue, 2016-02-09 04:50

In the last week of January, the project IT-Zukunft Schule (Logo EDV-Systeme GmbH and DAS-NETZWERKTEAM) had visitors from Norway: Klaus Ade Johnstad and Linnea Skogtvedt from LinuxAvdelingen [1] came by for exchanging insights, knowledge, technology, stories regarding IT services at school in Norway and Nothern Germany.

This was our schedule...

  • 3pm – Arrival of Klaus Ade and Linnea, meet up at LOGO with coffee and cake
  • 4pm – Planning the workshop, coming up with an agenda for the next two days (Klaus Ade, Andreas, Mike)
  • 5pm – Preparing OPSI demo sites (Mike, Linnea)
  • 8pm – Grünkohl and Rotkohl and ... at Traum GmbH, Kiel (Klaus Ade, Linnea, Andreas, Mike)
  • 8.30am – more work on the OPSI demo site (Mike, Linnea)
  • 10am – pfSense (esp. captive portal functionality), backup solutions (Klaus Ade, all)
  • 11am – ITZkS overlay packages, basic principles of Debian packaging (Mike, special guests: Torsten, Lucian, Benni)
  • 12am-2pm – lunch break
  • 2pm – OPSI demonstration, discussion, foundation of the OpsiPackages project [2] (Mike)
  • 4pm – Puppet (Linnea)
  • 7pm – dinner time (eating in, Thai fast food :-) )
  • 20pm – Sepiida hacking (Mike, Linnea), customer care (Andreas, Klaus Ade)
  • 22:30pm – zZzZzZ time...

read more

Categories: FLOSS Project Planets

Some Neon Artwork

Planet KDE - Tue, 2016-02-09 04:29

Quoting from the announcement:
“KDE Neon is the intersection of these needs using a stable Ubuntu long-term release as its core, packaging the hottest software fresh from the KDE Community ovens. Compute knowing you have a solid foundation and enjoy the features you experience in the world’s most customisable desktop.”

This is pretty exciting for anyone who wants a stable core system with a setup of KDE Plasma software on to as recent as possible, setted-up and configured as good as possible, with hopefully less issues like “distro X has a slightly outdated version of kibrary Y which is know that makes app Z crash”.

Hell, I was so excited that during a sleepless night, I has been completely possessed by the Muse and I had to do this artwork based on a riff of its logo:

NEON written as a neon sign, how original :p It’s pretty tacky but it’s intended to be, here for your viewing pleasure at a typical wallpaper resolution.

Categories: FLOSS Project Planets

Microserve: Caching beyond the norm in Drupal 7

Planet Drupal - Tue, 2016-02-09 04:19
Caching beyond the norm in Drupal 7Feb 9th 2016

When developing in a drupal centric environment there are two general methods used to cache information on the system in modules, these can be used to persist while a page is loading using drupal static or for a longer periods using cache set and cache get.

I have used some other simple and alternative methods, and from reading notes before the drupal_static function declaration in bootstrap.inc; ways of getting even more efficient caching.

First I’ll address drupal static; it’s explained very neatly on this Lullabot article.

This is not necessarily always required. If you have a simple function in your code that you want to remember, a setting and speed is a must, you can just use a static variable.

function get_a_value($value_name) { static $function_settings = array(); if (!isset($function_settings[$value_name])) { //get variable from database and set it to $fetched_value $function_settings['$value_name'] = $fetched_value; } else { return $function_settings[$value_name]; } }

The static variable $function_settings stays persistent throughout the execution of your page, and the caching stays localised to your function / module.

Another way to do something similar to above, but to include the drupal_static function, would be to do an advanced drupal_static pattern (this is mentioned in the drupal_static notes).

function user_access($string, $account = NULL) { // Use the advanced drupal_static() pattern, since this is called very often. static $drupal_static_fast; if (!isset($drupal_static_fast)) { $drupal_static_fast['perm'] = &drupal_static(__FUNCTION__); } $perm = &$drupal_static_fast['perm']; //... }

This is taken directly from the notes. Here we assign a local static variable as in the previous example but if the local static variable is not set, we assign the local static variable to drupal_static. Now other functions and code outside of the function can call on drupal_static_reset and reset the locally declared static variable, but will still retain the efficiency of having the static variable locally as in the previous example.

The last method I would like to approach is by using a cache in an object:

class SomeClass { /** * * @var array */ protected $localCache = array(); public function getData($cid) { if ($data = $this->getCache($cid)) { return $data; } //nothing set //do time intensive task here and set to data $this->cache($cid, $data); return $data; } /** * * @param type $cid * @param type $data */ protected function cache($cid, $data) { $this->setLocalCache($cid, $data); cache_set($cid, $data, 'cache', strtotime('+7 days', time())); } protected function getCache($cid) { if ($data = $this->getLocalCache($cid)) { return $data; } if ($cache = cache_get($cid)) { return $cache->data; } return FALSE; } /** * * @param any $cid * @param any $data */ protected function setLocalCache($cid, $data) { $this->localCache[$cid] = $data; } /** * * @param any $cid * @return any */ protected function getLocalCache($cid) { return isset($this->localCache[$cid]) ? $this->localCache[$cid] : FALSE; } }

In this example, I do all the local caching within the object but if needs be, I will retrieve and save to the system cache if the required data is not saved locally. One thing I have omitted is methods to clear the local cache. This caching this essentially using a local property.

If you wanted to clear the cache externally, you could create a public method or a static method.

So that about wraps this one up. Have you used any different methods? Can it be done better? Tell me what you think in the comment section below.

Written by: Darren Whittington, Senior Developer

Microserve is a Drupal Agency based in Bristol, UK. We specialise in Drupal Development, Drupal Site Audits and Health Checks, and Drupal Support and Maintenance. Contact us for for further information.

Categories: FLOSS Project Planets

Deeson: Drupal Focal Point Module: Making the most of your images

Planet Drupal - Tue, 2016-02-09 04:15

Focal point is a Drupal module that allows site administrators to select an important portion of an image to focus on.

It’s similar in many ways to the Image field focus module. But rather than giving a square box with crosshairs for focusing and another for cropping (which you can only do inside the focus area and can be quite confusing), focal point allows you to select a single point on the image to focus on. It is also fully compatible with the Media module.

User experience

Let's take a look at focal point from an administrator's perspective. The user can click on the image at any point which adds an icon over that particular area, representing the chosen focal point (see below).

From this, the administrator can then select the “Image preview” link below the image which will display a page with both the original image and how the image will look with the different image styles.

As you can see below, the image has now been focused upon the parrot on the right.

Setup and configuration

Firstly, you need to download and enable the focal point module (https://www.drupal.org/project/focal_point).

Upon enabling the module you will find a new image style called “Focal Point Preview”. This is used for the admin page and is the default preview style for setting the focal point. It rescales the image width to 250px with upscaling allowed.

You will also have two new image effects available for cropping “Focal Point Crop” and “Focal Point Scale And Crop” within the drupal image styles at admin/config/media/image-styles.

These both crop down to the point to which the user has selected on the image, and ensure that the chosen focal point will not be cropped out of the image.

Now you can create a new image style with one of these image effects, and then apply this image style to an image field within the manage display page of your content type. The images will then crop to the selection the user has chosen.


To enable the compatibility with the media module, you should ensure that the “Media module image fields” setting at admin/config/media/focal_point is enabled.

Then, after adding an image via a field using the media browser widget, another step is provided in the media browser overlay. You can now add a focal point as you would in a standard image field.

You can also edit previously uploaded images to set an individual focal point.

Categories: FLOSS Project Planets

eGenix.com: eGenix pyOpenSSL Distribution 0.13.13 GA

Planet Python - Tue, 2016-02-09 04:00

The eGenix.com pyOpenSSL Distribution includes everything you need to get started with SSL in Python. It comes with an easy to use installer that includes the most recent OpenSSL library versions in pre-compiled
form, making your application independent of OS provided OpenSSL libraries:

>>>   eGenix pyOpenSSL Distribution Page

pyOpenSSL is an open-source Python add-on that allows writing SSL-aware networking applications as as certificate managment tools. It uses the OpenSSL library as performant and robust SSL engine.

OpenSSL is an open-source implementation of the SSL/TLS protocol.


This new release of the eGenix.com pyOpenSSL Distribution includes the following updates:

New in OpenSSL
  • CVE-2015-3197  If SSLv2 was not disabled via SSL_OP_NO_SSLv2, a client could negotiate SSLv2 ciphers that have been disabled, even if all SSLv2 ciphers have been disabled.
  • Updated the Mozilla CA root bundle to version 2016-01-19.
Please see the product changelog for the full set of changes. pyOpenSSL / OpenSSL Binaries Included

In addition to providing sources, we make binaries available that include both pyOpenSSL and the necessary OpenSSL libraries for all supported platforms: Windows, Linux, Mac OS X and FreeBSD, for x86 and x64.

To simplify installation, we have uploaded a web installer to PyPI which will automatically choose the right binary for your platform, so a simple

pip install egenix-pyopenssl

will get you the package with OpenSSL libraries installed. Please see our installation instructions for details.

We have also added .egg-file distribution versions of our eGenix.com pyOpenSSL Distribution for Windows, Linux and Mac OS X to the available download options. These make setups using e.g. zc.buildout and other egg-file based installers a lot easier.


Please visit the eGenix pyOpenSSL Distribution page for downloads, instructions on installation and documentation of the package.


Before installing this version of pyOpenSSL, please make sure that you uninstall any previously installed pyOpenSSL version. Otherwise, you could end up not using the included OpenSSL libs.

More Information

For more information on the eGenix pyOpenSSL Distribution, licensing and download instructions, please write to sales@egenix.com.

Enjoy !

Marc-Andre Lemburg, eGenix.com

Categories: FLOSS Project Planets

Orestis Ioannou: Using debsources API to determine the license of foo.bar

Planet Debian - Tue, 2016-02-09 03:45

Following up on the hack of Matthieu - A one-liner to catch'em all! - and the recent features of Debsources I got the idea to modify a bit the one liner in order to retrieve the license of foo.bar.

The script will calculate the SHA256 hash of the file and then query the Debsources API in order to retrieve the license of that particular file.

Save the following in a file as license-of and add it in your $PATH

#!/bin/bash function license-of { readlink -f $1 | xargs dpkg-query --search | awk -F ": " '{print $1}' | xargs apt-cache showsrc | grep-dctrl -s 'Package' -n '' | awk -v sha="$(sha256sum $1 | awk '{ print $1 }')" -F " " '{print "https://sources.debian.net/copyright/api/sha256/?checksum="sha"&packagename="$1""}' | xargs curl -sS } CMD="$1" license-of ${CMD}

Then you can try something like:

license-of /usr/lib/python2.7/dist-packages/pip/exceptions.py Notes:
  • if the checksum is not found in the DB (compiled file, modified file, not part of any package) this will fail
  • if the debian/copyright file of the specific package is not machine readable then you are out of luck!
  • if there are more than 1 versions of the package you will get all the available information. If you want to get just testing then add "&suite=testing" after the &packagename="$1" in the debsources link.
Categories: FLOSS Project Planets
Syndicate content