FLOSS Project Planets

Drupal Easy: DrupalEasy Podcast 143: Scheming (Schema.org integration in D8 - Stéphane Corlosquet)

Planet Drupal - Wed, 2015-01-28 15:16
Download Podcast 143

Stéphane Corlosquet, Sachni Herath, Kevin Oleary, and Kay VanValkenberg join Mike, Ted, and Ryan for a look into Drupal 8's impressive integration with Schema.org. The RDF UI module is really the star of the show, it promises to provide a super-easy way to create a content type based on an existing schema. We also talk about Dries' 2014 Drupal retrospective, Twig syntax vs. tokens, and Mike's bad internet connection causes hijinx. Picks of the week include a font for demos, a lightweight alternative to a popular Drupal module, and Views changes in D8.

read more

Categories: FLOSS Project Planets

Plasma 5.2 Released

Planet KDE - Wed, 2015-01-28 15:07

Packages for the release of Plasma 5.2 are available for Kubuntu Plasma5 14.10 and our development release. You can get them from the Kubuntu Next Backports PPA for 14.10, users of the development release will get it as a regular update.

The 14.10 packages include updates to Qt 5.4 which will remove any Unity packages.

Categories: FLOSS Project Planets

Drupal Association News: Drupal Association Board Meeting: 21 January 2015

Planet Drupal - Wed, 2015-01-28 15:02

In the first board meeting of 2015, we hit the pause button and looked back on 2014. With all the numbers in and so many projects completed, we wanted to evaluate our success (and our misses) with the board and with you. We feel really good about what we accomplished with the rest of the community. To me, it's doubly impressive because the Association spent so much of last year growing like crazy. We started the year with just about 13 staff and ended the year with 27. We're still small, but doubling your staff is never an easy endeavor. So to go through that kind of change, and to also get some much other good stuff done seems pretty remarkable to me. As always, you can check out the notes, the materials, and the recording, or peruse my summary of the meeting here.


Operational update


I think I can safely say that the theme of 2014 was “Let’s see what we learn from this!” We started the year with a Leadership Plan that outlined some important goals and strategies. We also defined key metrics we would track to help us understand if we were making progress on those goals. This was the first time the organization had this kind of framework to not only get a lot of stuff done, but to understand if that stuff was fulfilling its purpose.

The plan helped us identify lots of things to experiment with, and throughout the year we learned a lot about our plan itself. Metrics didn’t always point to the outcomes we thought they did. Some goals that we set were impossible to meet because of outside influences. But having the plan - that was important. It forced us to think about our work before, during, and after every project. So where did all our experiments take us? A lot of places. Here is a short, incomplete, and grossly over-simplified list of what we accomplished in 2014:

  • We set the proper frame. We developed a vision statement, revamped the mission statement, and created a values statement for the Association.
  • We rebranded, developing new logos for the Association and our programs that reflect our maturity as an organization.
  • We diversified our revenue, by a lot. Introducing new programs and services we were able to make a dent in the ration of Con related revenue to non-Con revenue. This is important for the financial health of the Association, but also because if Cons are our primary source of revenue, we can’t innovate and evolve them with as much courage for fear of undermining our total revenue.
  • Speaking of DrupalCons, we held two really big ones. Lots of things went right - they are well run, with great speakers and great community. We also collected a lot of data about the Cons and identified lots of places to work on for 2015 and beyond. (We promise we heard you about the food in Amsterdam!)
  • The marketing team is creating lots of technical marketing and other branded content that is starting to get great traction in the field. Resources like “Managing Media in Drupal” allow us to showcase the best that Drupal has to offer, regardless of version.
  • The launch of Drupal Jobs was a big milestone for us. We had not launched a product before, and were thrilled to get something out there that the community has repeatedly asked for. It’s still new, and we’re still learning, but we are overall very excited about the steady growth that we have seen.
  • Testbots is an area I have heard about on a weekly basis since I started at the Association. In 2014 we were able to forge a great partnership with the testbed volunteers. The Association is now managing the ongoing operation of the existing testbed infrastructure while the volunteers get to work on the next generation. We’ve seen massive improvements in performance as a result - wait times have dropped from almost 120 minutes to about 20 minutes on average. During the recent Global Sprint Weekend, we went from our usual 4 AWS instances to 20!
  • Drupal.org profiles have also seen a tremendous change in 2014. Again, thanks to the work of some amazing volunteers, we were able to introduce small targeted changes frequently, beginning with profile pictures. The work is not done and there are more changes to come, but profiles are becoming better and better online resumes and community connectors for the community.
  • We managed to be our projected deficit spend for the year. This sets us up well for 2015

I would like to point out that I am extremely proud of the Association staff who endured a lot of growing pains while churning out really good, quality work. In addition to being awesome at what they do, they are hilarious and smart. I owe the a huge debt of gratitude. HOWEVER, all of the bullet points above represent a significant contribution from the volunteers in the community as well. We don’t do our work alone, and we are so grateful to the hundreds of you who have prototyped, tested, coded, documented, trained, mentored, and made puns. Your leadership in the community is noticed and appreciated. Our greatest hope is that we are making your Drupal life a little better.

Marketing Team 2015 Update

The marketing team built a very solid base in 2014 and is prepared to declare 2015 the year of content. Here are a few key initiatives that you can expect this year:

  • More branded content, better presentation. We’re going to turn Drupal.org into the best site out there to discover all you can do with Drupal. We’re currently developing a content strategy that will help us discover all the great content that already exists, but gets lost in the one million+ nodes on the site. Then we can combine that with the great technical content we are also crafting to create more resource centers covering everything from media to search in Drupal.
  • A Drupal.org blog. We are in the middle of a content strategy process led by staff with the Content Working Group and Forum One Communications. It’s clear that we need a better channel to expose the folks who want Drupal news, but who aren’t ready to drink from the firehose that is Drupal Planet. The blog will allow us to reach those folks, and we hope we can use it to highlight the best writing about Drupal that is already being produced.
  • Drupal newsletter. In 2008, we stopped sending a regular Drupal newsletter to the tens of thousands of subscribers on Drupal.org. We’re bringing that back in 2015, with a model similar to that of the blog - the best community content. This newsletter will differ from the Association newsletter in that all the content will be focused on Drupal itself.
  • A challenge will be localization - translating content for our global audience. With the release of Drupal 8 nearing, and its emphasis on localization, we want to meet this need. We’ll be working on strategies to make translation happen on key content.

Of course, there is more to the update than this summary, so I encourage you to check out the presentation.

And then we ran out of time

We were also scheduled to vote on a slate of candidates for the newly formed Licensing Working Group. Unfortunately, we ran out of time. The Executive Committee of the board will be discussing next week to see if we can vote electronically on this topic.

Thanks for a great 2014. Here’s to an even better 2015

Again, thank you for the support, the work, the encouragement, the ideas, and even the complaints. All of it makes us better as an organization, and we hope that when we’re better, Drupal is better. 


 

Flickr Photo: DianaConnolly101

Categories: FLOSS Project Planets

Disabling downloadable fonts

Planet KDE - Wed, 2015-01-28 14:13

We have a nice new style for planet.kde.org. I think it is generally an improvement over what we had, but sadly it decides to force the oxygen font over my browser selected font.

If you're like me and can stand the oxygen font being forced over the font you chose on your configuration have a look at this article to see how to disable downloadable fonts.

Update: Unfortunately if you do that you'll lose the K-logo on the left because instead of an icon we're using a font to render it. So now I have to decide between unreadable (for me) oxygen font a having the broken K-logo on the top.

Categories: FLOSS Project Planets

Shomeya: 7 Things for Troubleshooting Drupal 7 Theming

Planet Drupal - Wed, 2015-01-28 14:05

When I worked in Reality TV Post Production I always had a troubleshooting guide. Most of the time I was working the night shift, and trust me no matter how many times you've done something sometimes your brain just breaks at 2am.

In case you haven't done this before a troubleshooting guide is basically just a list of the steps you take when things break, it helps you avoid that moment of exasperation 3 hours later when you realize how simple the solution really was.

Read more
Categories: FLOSS Project Planets

Planet KDE Theme from Season of KDE

Planet KDE - Wed, 2015-01-28 13:57

Season KDE is KDE’s annual project to give helpers a more structured way to take part in KDE.  It’s inspired by Summer of Code of course.

Today I had the pleasure of launching the new Planet KDE website theme done by Ranveer Aggarwal.  It looks very lovely and importantly makes the site a pleasure to browse on your phone.  Everyone hug him and do report any bugs to bugzilla.

.

by
Categories: FLOSS Project Planets

Marble experience in GCI-2014

Planet KDE - Wed, 2015-01-28 12:49

Hello, guys!

Last post was about my Google Code-in experience in general. This time I want to tell you about my work with Marble.

First of all, what is Marble? Marble is a virtual globe application which allows the user to choose among the Earth, the Moon, Venus, Mars and other planets to display as a 3-D model. It is free software under the terms of the GNU LGPL, developed by KDE for use on personal computers  and smart phones.

(here is a screenshot of Marble)

So, what did I do for Marble during GCI-2014?

There were different kinds of tasks such as porting different widgets and plugins, I did two such tasks. The tasks I liked most were about creating my own game based on MarbleWidget.

(here is a screenshot of my Marble game)

One task, which I liked, too, was about creating my own historical map for Marble(in mercator projection). It is based on Baur map from 1870. 

(here is a screenshot of my map run in Marble)

And the last three tasks were about creating my tour, which can take you to places all over the world. You can watch one here:

Last things I want to say are: special thanks to Torsten Rahn, Abhinav Gangwar and Jonathan Riddell(not from Marble team). These people are the best mentors ever!

 Thanks for attention, use Qt and love KDE!

Categories: FLOSS Project Planets

Andrea Veri: The GNOME Infrastructure Apprentice Program

Planet Debian - Wed, 2015-01-28 11:59

Many times it happened seeing someone joining the #sysadmin IRC channel requesting participation to the team after having spent around 5 minutes trying to explain what the skills and the knowledge were and why this person felt it was the right figure for the position. And it was always very disappointing for me having to reject all these requests as we just didn’t have the infrastructure in place to let new people join the rest of the team with limited privileges.

With the introduction of FreeIPA, more fine-grained ACLs (and hiera-eyaml-gpg for securing tokens, secrets, passwords out of Puppet itself) we are so glad to announce the launch of the “GNOME Infrastructure Apprentice Program” (from now till the end of the post just “Program”). If you are familiar with the Fedora Infrastructure and how it works you might know what this is about already. If you don’t please read further ahead.

The Program will allow apprentices to join the Sysadmin Team with a limited set of privileges which mainly consist in being able to access the Puppet repository and all the stored configuration files that run the machines powering the GNOME Infrastructure every day. Once approved to the Program apprentices will be able to submit patches for review to the team and finally see their work merged on the production environment if the proposed changes matched the expectations and addressed comments.

While the Program is open to everyone to join, we have some prerequisites in place. The interested person should be:

  1. Part of an existing FOSS community
  2. Familiar with how a FOSS Project works behind the scenes
  3. Familiar with popular tools like Puppet, Git
  4. Familiar with RHEL as the OS of choice
  5. Familiar with popular Sysadmin tools, softwares and procedures
  6. Eager to learn new things, make constructive discussions with a team, provide feedback and new ideas

If you feel like having all the needed prerequisites and would be willing to join follow these steps:

  1. Subscribe to the gnome-infrastructure and infrastructure-announce mailing lists
  2. Join the #sysadmin IRC channel on irc.gnome.org
  3. Send a presentation e-mail to the gnome-infrastructure mailing list stating who you are, what your past experiences and plans are as an Apprentice
  4. Once the presentation has been sent an existing Sysadmin Team member will evaluate your application and follow-up with you introducing you to the Program

More information about the Program is available here.

Categories: FLOSS Project Planets

Colm O hEigeartaigh: LDAP support in Apache Camel

Planet Apache - Wed, 2015-01-28 11:29
Apache Camel allows you to add LDAP queries to your Camel routes via the camel-ldap and camel-spring-ldap components. The camel-ldap component allows you to perform an LDAP query using a filter as the message payload. The spring-ldap component is a wrapper for Spring LDAP, and is a bit more advanced than the camel-ldap component, in that it also supports the "bind" and "unbind" operations, in addition to "search".

I've created two test-cases that show how to use each of these components. Both test-cases use the Camel file component to read in files that contain LDAP queries. These queries are then dispatched to an Apache DS server that is configured via annotations in the test code, using an LDIF file containing some test data. The results are then processed and written out in the target directory. The test-cases are available here.
Categories: FLOSS Project Planets

Andre Roberge: Scratching an itch: improving pydoc

Planet Python - Wed, 2015-01-28 11:20
Pydoc is great - no make that fantastic.  However, I was never fond of the look of help pages displayed when pydoc is used in webserver mode.    Pydoc uses hard-coded styling options (including font and colors) based on deprecated html 4 syntax.

I decided to see if I could make it more customizable and, after a half-day coding sprint, I offer you mod_pydoc, which is somewhat more easily customizable using css.  The new version has a simplified styling as default.

mod_pydoc is only available from github (for now); I'm hoping that people with better designing skills will contribute some code to make the output look better than my feeble attempt.  Eventually, my intention would be to file a feature request to python.org and submit it as a possible improvement on the current module.
Categories: FLOSS Project Planets

CivicActions: Dockerizing Drupal for Project Development and Testing

Planet Drupal - Wed, 2015-01-28 11:05

Docker has quickly become the favorite virtualization tool for many people including myself. A few months ago we were discussing various technical goals across our project and things started to come together pointing to a basic docker framework to facilitate our development processes. This basically sums up our wish list:

Our Goals
  • Faster developer sandbox set up to get started on projects sooner.
  • Consistent software stack across developers, testing infrastructure, and production.
  • Ideally, a basic tool set that would work for both our new projects as well as our maintenance sites.
  • Start using the cool new trendy docker.
Container configuration with fig

One challenge is to have portable configuration for the building, starting, and stopping of a project's containers. The fig project provides an elegant solution and the configuration is in YAML files, which we in the Drupal community should be getting used to now with Drupal 8. The fig.yml defines your containers, ports, mount point, and how they link together. Maintaining a fig.yml file in our project repositories allows us to do things like add an Apache Solr container with ease.

I was working on a collection of bash scripts and docker files and a fig.yml for one project and at some point it became stable enough to extract for general use. I brought these files together and made them available on github.

Introducing Bowline

Following the nautical and shipping metaphor, I chose the name bowline because it's a simple and basic knot with multiple uses. The idea is that Bowline ties it all together. Plus it reminds me of my sailing days when I could tie a bowline in less than 3 seconds, which is slightly faster than it takes to start the docker containers.

Code and instructions found at the git repo: https://github.com/davenuman/bowline

I have now had success with Bowline on both new project and on existing Drupal 6 and 7 projects. Just last week I also tried it out with Drupal 8 and I'm happy to report that it works just fine on Bowline as well.

Dockerfile flexibility

Out of the box, Bowline ships with two containers. One for mysql 5.5 which is simply the default image from Docker Hub. The second is the web container providing apache, php 5.4, and related software. The web container is defined within the .docker/web-5.4 directory and the Dockerfile with supporting config files are based on the awesome work of the new Drupal testbot project.

Automation, running tests

Imagine your developers getting their local sandboxes up and running in a matter of minutes. This is now possible, facilitated by a few simple bash scripts. Bowline provides a template document intended for instructing your team on how to get set up: https://github.com/davenuman/bowline/blob/master/sandbox.md

Basically, they run build sync-db to get a copy of the database, build sync-files to get the site's uploaded files, then build import which does all the work of building the docker containers and importing the database. There is also a backup script which will save a snapshot of your database named after your current git branch which is handy for switching to another task while preserving your work. The run command is intended for running your automated tests. It assumes behat but you can modify it to run whatever testing software you use. The nice thing is that our developers are all running local behat tests on the exact same software stack as each other and as the test server. We have a Jenkins server with docker and have jobs configured to execute the build and run commands just like we do on our own machines.

Slaying File Permission Dragons Anyone who has worked with a LAMP stack has bumped into file permission issues with uploaded files. Add a docker container to the mix which is mounting your project files and serving them up as the apache user withing the container and there is lots of ways to mess things up. This dragon gave us some grief early on when starting to use docker in this way. We won the day by setting the apapache user to run with the same uid as the docker host user. This way each developer will have ownership to their own file uploads on their system. Here's the simple bash code that makes it possible: # Set the apache user and group to match the host user. OWNER=$(stat -c '%u' /var/www) GROUP=$(stat -c '%g' /var/www) usermod -o -u $OWNER www-data groupmod -o -g $GROUP www-data (source) Room for improvement

One tricky thing we found using docker containers is using drush in a complete way, particularly using drush site aliases. For now we have "crush" which is a temporary work around but not too bad of a work around actually. Crush is a simple bash function that calls drush as a command on the docker web container. We use crush to clear cache manage features and such, and it is working well. However it's not ideal and I'd like to add ssh server to the stack to allow for proper drush site alias usage.

There's always room for improvement. I'd like to find an elegant way to incorporate more developer tools such as sass, compass and debugging tools. Every project is different but it would be nice for Bowline to have some basic Behat smoke tests build in. These things will hopefully be added to the Bowline project as we use it and add things to our drupal project. And yes, pull requests are welcome.

Topics
Categories: FLOSS Project Planets

Amazee Labs: Amazee Labs launches first customer website on Drupal 8

Planet Drupal - Wed, 2015-01-28 10:41
Amazee Labs launches first customer website on Drupal 8

We just completed our third Drupal 8 project: SGG - Schweizer Gemeinnützige Gesellschaft after relaunching our own website, helping out with Drupal.com we are now excited to launch our first client website fully on the upcoming major release of our favorite open source CMS.

Having built the community site Intergeneration and voting platform CHymne using Drupal 7, we now chose Drupal 8 for the relaunch of the presentation website of SGG. The compact feature of the site allowed us to apply today's strenghts Drupal 8 and so we recreated the associations website relying entirely on Drupal 8 core functionality.

Building the SGG relaunch was a team effort, read on to find about the findings of each of us for building the relaunch on the latest beta release of Drupal 8.

Boris was involved with site building, these are his thoughts:

Drupal 8 in terms of sitebuilding is awesome. After a short time you are able to build almost everything out of the box. Sometimes you have to think around the corner to get your result. And sometimes you get stuck because of some nasty bugs.

But with a great Backend-Developer on Hand (Alex) we could also solve some issues during creation of our project.

  • Building content types is much more powerful with Drupal 8 core: you can define view modes, form modes and many field types like e-mail, entity reference etc have been integrated
  • Full translation capabilities: thanks to #d8mi no dozen of i18n modules are required but Drupal 8 core ships with configuration, content & interface translation
  • WYSIWYG editing functionality is part of core and just works
  • Views in Core: we can create dynamic listings  
  • Enhanced block system: we can even reference blocks using entity reference now

Alex did backend development for the SGG relaunch, his feedback on the project:

  1. A lot of things in D8 are plugins and the new plugin system is really cool: to extend a plugin, all you need is to extend its class and place your new class in the proper namespace.
  2. Even if core still uses some PHP magic, everything is documented well with PHPDoc, and the IDEs help a lot to write code.
  3. Tip: while Drupal 8 is in the beta stage, use core dev releases only for core development. I tried dev releases two times, in both cases a lot of functionality was broken. If you need D8 in production: use beta releases, they are much more stable.
  4. Every piece of PHP code is covered with tests. That's super cool: if you want to understand how the thing works or what its purpose: read its tests, you will learn a lot from there.
  5. Sad: there is no core stuff for testing JavaScript code. There are some contrib modules for that, but, anyway, it's not in the core, so JavaScript tests are not mandatory.
  6. Sad: beta-to-beta updates are not ready. That makes core updates really hard. The good thing is that it's the target number one.
  7. The translation system is really good. All translation cases are handled right in the core.

Overall, I have really really good feeling about D8. Previously we said "Drupal way" about many coding stuff. Now it's the "right way"! Drupal core now uses bleeding edge technologies, and that makes work really interesting.

Kathryn did front-end development, this is what she would like to share:

Building a custom theme for Drupal 8 is almost an entirely different process than building one for Drupal 7. I think this is especially true for Amazee Labs since historically, we are "Panels people." Because the Panels module isn’t ready for Drupal 8, we're forced to make heavy use of template files. 

In my experience with Drupal 8 (and on this project in particular), working with Twig templates is much more concise and straightforward to code than a D7 .tpl file. As a developer with only basic PHP skills, the Twig syntax is easier to grasp. 

For the SGG theme, there are over ten custom Twig templates, most of which extend upon another.

Even though the design of the SGG theme appears simple, there were many instances where the content display required use of the Twig {{ dump() }} function to drill into variables. 

One thing I found frustrating during this process was sifting through the output of the dump’s results. Krumo formatting in D7 is so nice and tidy, while the D8 output is a jumbled mess, even after wrapping it in a <pre> tag. 

To work around this, Kint is your new best friend. You’ll need to download the 8.x version of the Devel module, enable it, along with Devel Kint. Include {{ kint() }} in your template file and voilà - nested arrays that won’t make your head spin around. 

I could go on, but the gist of it is: mastering Twig continues to be my number one priority for Drupal 8. The SGG Drupal 8 project was no exception.

And this is the result: http://sgg-ssup.ch

Creating web sites with Drupal 8 is possible today. You certainly have to be aware of constraints regarding not-yet-upgraded modules and account for some core bugs along the way. On the other hand, working with Drupal 8 just feels right: best practices from back-end to front-end development have been incorporated and the site building experience is really solid.

Step by step we will approach bigger client projects with Drupal 8. Interested in a future proof website? - let's start a project together.

Categories: FLOSS Project Planets

Dirk Eddelbuettel: RInside 0.2.12

Planet Debian - Wed, 2015-01-28 09:24

A new release 0.2.12 of RInside is now on CRAN. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp integration package.

This release adds new examples which were contributed by Christian Authmann, plus some updates and fixes including one requested by the CRAN maintainers regarding GNU extensions to Makefile. The NEWS extract below has more details.

Changes in RInside version 0.2.12 (2015-01-27)
  • Several new examples have been added (with most of the work done by Christian Authmann):

    • standard/rinside_sample15.cpp shows how to create a lattice plot (following a StackOverflow question)

    • standard/rinside_sample16.cpp shows object wrapping, and exposing of C++ functions

    • standard/rinside_sample17.cpp does the same via C++11

    • sandboxed_servers/ adds an entire framework of client/server communication outside the main process (but using a subset of supported types)

  • standard/rinside_module_sample9.cpp was repaired following a fix to InternalFunction in Rcpp

  • For the seven example directories which contain a Makefile, the Makefile was renamed GNUmakefile to please R CMD check as well as the CRAN Maintainers.

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: FLOSS Project Planets

Mike Driscoll: Machine vision with Python Kickstarter

Planet Python - Wed, 2015-01-28 09:05

Yesterday I posted about PyImageSearch Gurus computer vision Kickstarter and then I came across another semi-related Kickstarter. This one is for Machine vision with Python using an OpenMV Cam. It uses MicroPython (Python for microcontrollers) to control a camera on a circuit board. This project can be used with an Arduino, mbed or other microcontroller over I2C, Serial, or SPI protocols. I believe the Raspberry Pi falls into one or more of the latter categories.

They haven’t reached their goal yet, but they have almost a month left to raise the funds. You can check our their project here.

Categories: FLOSS Project Planets

Annertech: Check out my website - it's responsive! Yawn!

Planet Drupal - Wed, 2015-01-28 09:00
Check out my website - it's responsive! Yawn! //--> "OMG! You've got a responsive website!"

Once something to brag about, this is now old news.

Categories: FLOSS Project Planets

Ortwin Glück: [Code] Recent Gentoo is safe from GHOST

Planet Apache - Wed, 2015-01-28 08:09
I ain't afraid of no GHOST.

According to Heise the GHOST vulnerability only affects glibc before 2.18. Uptodate Gentoo installations run 2.19 and are not affected.
# equery l glibc * Searching for glibc ... [IP-] [ ] sys-libs/glibc-2.19-r1:2.2
Categories: FLOSS Project Planets

Russell Coker: SE Linux Play Machine Over Tor

Planet Debian - Wed, 2015-01-28 02:44

I work on SE Linux to improve security for all computer users. I think that my work has gone reasonably well in that regard in terms of directly improving security of computers and helping developers find and fix certain types of security flaws in apps. But a large part of the security problems we have at the moment are related to subversion of Internet infrastructure. The Tor project is a significant step towards addressing such problems. So to achieve my goals in improving computer security I have to support the Tor project. So I decided to put my latest SE Linux Play Machine online as a Tor hidden service. There is no real need for it to be hidden (for the record it’s in my bedroom), but it’s a learning experience for me and for everyone who logs in.

A Play Machine is what I call a system with root as the guest account with only SE Linux to restrict access.

Running a Hidden Service

A Hidden Service in TOR is just a cryptographically protected address that forwards to a regular TCP port. It’s not difficult to setup and the Tor project has good documentation [1]. For Debian the file to edit is /etc/tor/torrc.

I added the following 3 lines to my torrc to create a hidden service for SSH. I forwarded port 80 for test purposes because web browsers are easier to configure for SOCKS proxying than ssh.

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 22 192.168.0.2:22
HiddenServicePort 80 192.168.0.2:22

Generally when setting up a hidden service you want to avoid using an IP address that gives anything away. So it’s a good idea to run a hidden service on a virtual machine that is well isolated from any public network. My Play machine is hidden in that manner not for secrecy but to prevent it being used for attacking other systems.

SSH over Tor

Howtoforge has a good article on setting up SSH with Tor [2]. That has everything you need for setting up Tor for a regular ssh connection, but the tor-resolve program only works for connecting to services on the public Internet. By design the .onion addresses used by Hidden Services have no mapping to anything that reswemble IP addresses and tor-resolve breaks it. I believe that the fact that tor-resolve breaks thins in this situation is a bug, I have filed Debian bug report #776454 requesting that tor-resolve allow such things to just work [3].

Host *.onion
ProxyCommand connect -5 -S localhost:9050 %h %p

I use the above ssh configuration (which can go in ~/.ssh/config or /etc/ssh/ssh_config) to tell the ssh client how to deal with .onion addresses. I also had to install the connect-proxy package which provides the connect program.

ssh root@zp7zwyd5t3aju57m.onion
The authenticity of host ‘zp7zwyd5t3aju57m.onion ()
ECDSA key fingerprint is 3c:17:2f:7b:e2:f6:c0:c2:66:f5:c9:ab:4e:02:45:74.
Are you sure you want to continue connecting (yes/no)?

I now get the above message when I connect, the ssh developers have dealt with connecting via a proxy that doesn’t have an IP address.

Also see the general information page about my Play Machine, that information page has the root password [4].

Related posts:

  1. Trust and My SE Linux Play Machine When discussing the machine there are two common comments I...
  2. New SE Linux Play Machine Online After over a year I have finally got a SE...
  3. Play Machine Online Again I have returned from the US and my SE Linux...
Categories: FLOSS Project Planets

Zato Blog: Zato 2.0 released - ESB, SOA, REST, APIs and Cloud Integrations in Python

Planet Python - Wed, 2015-01-28 00:01

The new version of Zato - the open-source middleware platform and backend application server - has just been released.

https://zato.io/docs

Release 2.0 brings dozens of interesting features building on and greatly enriching already existing capabilities.

Major features include:

The changelog lists all the updates that are in addition to what Zato has had since the initial release: clustering, scheduling, hot-deployment, GUI, CLI, statistics, Plain HTTP, SOAP, AMQP, FTP(S), JMS WebSphere MQ, ZeroMQ and more.

Check out the no-nonsense introduction to ESB/SOA for an introduction to the philosophy behind the project and just have a look at the following sample screenshots depicting but a small part of the platform in action:

Categories: FLOSS Project Planets

Doug Hellmann: virtualenvwrapper.django 0.4.1

Planet Python - Wed, 2015-01-28 00:00
virtualenvwrapper.django 0.4.1 What is virtualenvwrapper.django?

virtualenvwrapper.django is a template plugin for virtualenvwrapper to create new Django projects automatically. When used with mkproject, it installs Django into the new virtualenv then runs django-admin.py to create a new project skeleton.

What’s New?

This release replaces the use of distribute with setuptools (contributed by Sascha Peilicke).

Categories: FLOSS Project Planets

Vasudev Ram: HTML text to PDF with Beautiful Soup and xtopdf

Planet Python - Tue, 2015-01-27 22:18
By Vasudev Ram



Recently, I thought of getting the text from HTML documents and putting that text to PDF. So I did it :)

Here's how:
"""
HTMLTextToPDF.py
A demo program to show how to convert the text extracted from HTML
content, to PDF. It uses the Beautiful Soup library, v4, to
parse the HTML, and the xtopdf library to generate the PDF output.
Beautiful Soup is at: http://www.crummy.com/software/BeautifulSoup/
xtopdf is at: https://bitbucket.org/vasudevram/xtopdf
Guide to using and installing xtopdf: http://jugad2.blogspot.in/2012/07/guide-to-installing-and-using-xtopdf.html
Author: Vasudev Ram - http://www.dancingbison.com
Copyright 2015 Vasudev Ram
"""

import sys
from bs4 import BeautifulSoup
from PDFWriter import PDFWriter

def usage():
sys.stderr.write("Usage: python " + sys.argv[0] + " html_file pdf_file\n")
sys.stderr.write("which will extract only the text from html_file and\n")
sys.stderr.write("write it to pdf_file\n")

def main():

# Create some HTML for testing conversion of its text to PDF.
html_doc = """
<html>
<head>
<title>
Test file for HTMLTextToPDF
</title>
</head>
<body>
This is text within the body element but outside any paragraph.
<p>
This is a paragraph of text. Hey there, how do you do?
The quick red fox jumped over the slow blue cow.
</p>
<p>
This is another paragraph of text.
Don't mind what it contains.
What is mind? Not matter.
What is matter? Never mind.
</p>
This is also text within the body element but not within any paragraph.
</body>
</html>
"""

pw = PDFWriter("HTMLTextTo.pdf")
pw.setFont("Courier", 10)
pw.setHeader("Conversion of HTML text to PDF")
pw.setFooter("Generated by xtopdf: http://slid.es/vasudevram/xtopdf")

# Use method chaining this time.
for line in BeautifulSoup(html_doc).get_text().split("\n"):
pw.writeLine(line)
pw.savePage()
pw.close()

if __name__ == '__main__':
main()


The program uses the Beautiful Soup library for parsing and extracting information from HTML, and xtopdf, my Python library for PDF generation.
Run it with:
python HTMLTextToPDF.py
and the output will be in the file HTMLTextTo.pdf.
Screenshot below:


- Vasudev Ram - Python training and programming - Dancing Bison Enterprises

Read more of my posts about Python or read posts about xtopdf (latter is subset of former)
Signup to hear about my new software products or services.

Contact Page
Share | Vasudev Ram
Categories: FLOSS Project Planets
Syndicate content