Enzolutions: A week in Paris

Planet Drupal - Mon, 10/10/2016 - 02:00

Last week I had the opportunity of visit Paris, France for a week as para of my tour Around the Drupal world in 140+ days.

Sadly for me, I got a #drupalflu in Drupal Con, Dublin; So I wasn't in the best shape to enjoy the city.

I want to say thank you to Sebastien Lissarrague and his family for allowing me to stay with them in their home.

During my visit, I had the opportunity to participate in the local Drupal Meetup of Paris community.

Also, I visited some companies like Koriolis, Sensio Labs and Platform.sh.

At Koriolis I have the opportunity to show the owner and developers the Drupal Console project to accelerate the Drupal 8 adoption in their projects.

During my visit to Sensio Labs I had a session with part the Symfony Core development team, to show them how we have been using the Symfony Console in Drupal Console project.

During my visit at Platform.sh I learn I little bit how they enable to their Drupal 8 user the usage of Drupal Console project. Next week I will write an articule about that.

About the city, I think anything that I could say about Paris will be nothing compare how beautiful it's; I just could recommend you to visit three mandatory places in you visit.

Eiffel Tower

Louvre Museum


Airplane Distance (Kilometers) Dublin , Ireland → Paris, France → San Jose, Costa Rica 9.957 Previously 96,604 Total 106.561 Walking Distance (steps) Dublin 116.133 Previously 1.780.955 Total 1.897.088 Train Distance (Kilometers) Today 0 Previously 528 Total 528 Bus/Car Distance (Kilometers) Today 0 Previously 2.944 Total 2.944
Categories: Elsewhere

Hideki Yamane: Simplest debian/watch file GNOME packages

Planet Debian - Mon, 10/10/2016 - 01:03
Simplest (two lines) debian/watch file GNOME-related packages, you can just copy&paste it.version=4

Categories: Elsewhere

Bits from Debian: Debian is participating in the next round of Outreachy!

Planet Debian - Sun, 09/10/2016 - 19:50

Following the success of the last round of Outreachy, we are glad to announce that Debian will take part in the program for the next round, with internships lasting from the 6th of December 2016 to the 6th of March 2017.

From the official website: Outreachy helps people from groups underrepresented in free and open source software get involved. We provide a supportive community for beginning to contribute any time throughout the year and offer focused internship opportunities twice a year with a number of free software organizations.

Currently, internships are open internationally to women (cis and trans), trans men, and genderqueer people. Additionally, they are open to residents and nationals of the United States of any gender who are Black/African American, Hispanic/Latin@, American Indian, Alaska Native, Native Hawaiian, or Pacific Islander.

If you want to apply to an internship in Debian, you should take a look at the wiki page, and contact the mentors for the projects listed, or seek more information on the (public) debian-outreach mailing-list. You can also contact the Outreach Team directly. If you have a project idea and are willing to mentor an intern, you can submit a project idea on the Outreachy wiki page.

Here's a few words on what the interns for the last round achieved within Outreachy:

  • Tatiana Malygina worked on Continuous Integration for Bioinformatics applications; She has pushed more than a hundred commits to the Debian Med SVN repository over the last months, and has been sponsored for more than 20 package uploads.

  • Valerie Young worked on Reproducible Builds infrastructure, driving a complete overhaul of the database and software behind the tests.reproducible-builds.org website. Her blog contains regular updates throughout the program.

  • ceridwen worked on creating reprotest, an all-in-one tool allowing anyone to check whether a build is reproducible or not, replacing the string of ad-hoc scripts the reproducible builds team used so far. She posted regular updates on the Reproducible Builds team blog.

  • While Scarlett Clark did not complete the internship (as she found a full-time job by the mid-term evaluation!), she spent the four weeks she participated in the program providing patches for reproducible builds in Debian and KDE upstream.

Debian would not be able to participate in Outreachy without the help of the Software Freedom Conservancy, who provides administrative support for Outreachy, as well as the continued support of Debian's donors, who provide funding for the internships. If you want to donate, please get in touch with one of our trusted organizations.

Debian is looking forward to welcoming new interns for the next few months, come join us!

Categories: Elsewhere

Guido Günther: Debian Fun in September 2016

Planet Debian - Sun, 09/10/2016 - 16:59
Debian LTS

September marked the seventeenth month I contributed to Debian LTS under the Freexian umbrella. I spent 6 hours (out of 7) working on

  • updating Icedove to 45.3 resulting in DLA-640-1
  • finishing my work on bringing rails into shape security wise resulting in DLA-641-1 for ruby-activesupport-3.2 and DLA-642-1 for ruby-activerecord-3.2.
  • enhancing the autopkgtests for qemu a bit
Other Debian stuff
  • Uploaded libvirt 2.3.0~rc1 to experimental
  • Uploaded whatmaps to 0.0.12 in unstable.
  • Uploaded git-buildpackage 0.8.4 to unstable.
Other Free Software activities
  • Ansible: got the foreman callback plugin needed for foreman_ansible merged upstream.
  • Made several improvements to foreman_ansible_inventory (a ansible dynamic inventory querying Foreman): Fixing an endless loop when Foreman would miscalculate the number of hosts to process, flake8 cleaniness and some work on python3 support
  • ansible-module-foreman:
    • unbreak defining subnets by setting the default boot mode.
    • add support for configuring realms
  • Foreman: add some robustness to the nice rebuild host feature when DNS entries are already there
  • Released whatmaps 0.0.12.
    • Errors related to a single package don't abort the whole program but rather skip over it now.
    • Systemd user sessions are filtered out
    • The codebase is now checked with flake8.
Categories: Elsewhere

Steve Purkiss: Leapfrog the Drupal Learning Curve & Architect the Perfect Solution in 3 Simple Steps

Planet Drupal - Sun, 09/10/2016 - 15:06
Leapfrog the Drupal Learning Curve & Architect the Perfect Solution in 3 Simple Steps Steve Purkiss Sun, 10/09/2016 - 14:06

"Drupal has a steep learning curve" is something I hear time and again, however I feel this is a misguided perception and something we need to work towards changing - especially now focus is on the adoption journey. Learning how to 'Drupal' is actually incredibly easy - the trick is to understand exactly what Drupal is and how to mould it to your needs - this is what I'm going to show you how to do in three simple steps.

Step 1: Discover what Drupal doesn't know

This is by far the most important step of the process, hence why I go into much further detail than the other two - skim if you so wish but I assure you the story is there for a reason!

We've been here before

As of writing, Drupal has been around for 15 years and has solved many problems associated with building a wide range of web sites and applications, embedding this knowledge in either the core Drupal distribution or one of the 35,000+ modules available on the drupal.org site. Drupal's decision to only provide backwards-compatibility for content and not functionality means this functionality has had the ability to improve over time and make the most of innovation in technology, for example the recent big jump from mostly procedural programming to object-oriented.

A note about the jump from procedural to object orientation

This latest jump was a big one - Drupal was developed before object orientation was available in PHP (the language Drupal is written in), and so developed its own system of 'hooks'. You use hooks to interact with Drupal core to override functionality in order to make Drupal do what you want it to do for you. You can think of hooks like the ones on a coat stand - the trouble here was as different modules and themes overrode hooks, like an overloaded coat stand with many different coats on each hook, it became increasingly harder to work out what hook was changing what and when in the process it was changing it.

There are still hooks in Drupal 8, but these may disappear in future versions of Drupal as the migration to object-orientation continues. An added benefit is more backwards compatibility than before for future versions, so the change between versions 8 and 9 shouldn't be as pronounced as the change from 7 to 8 as we don't have to perform again such a big move as changing the fundamental way the entire code works. I believe there's plans to support backwards compatibility over two major versions from now on, so 9 will be backwards compatible with 8, 10 with 9, but not 10 with 8 - YMMV, etc.!

Knowledge carried throughout generations Courtesy @sgrame: https://twitter.com/sgrame/status/774232084231680000

The key point to understand here is what Drupal brings along with it as it progresses from version to version. Whilst the underlying code may change in order to improve and make the most of the latest innovation in programming languages, the knowledge, experience, and best practices gained and shared from its deployment to millions of sites is maintained in the API and module layer. It is unlikely what you are trying to build is unknown to Drupal in some way or another, it has dealt with everything from simple brochureware sites which look the same to everyone to sites such as weather.com where everyone who visits sees a personalised version of the site. As I often like to quip, I've never been asked for Rocket Science and even if I was, NASA uses Drupal ;)

This development process is fundamentally different to how other systems on the market work, with many other popular ones focusing on ease of use at the expense of progressive innovation, and is why you see Drupal have a larger share of the market on sites with complex requirements. The adoption of semantic versioning means there are now minor releases which include bug fixes along with both new and experimental functionality, and a new version of Drupal is released every six months. We are already up to version 8.2, and with current focus on 'outside-in' it is becoming easier for people used to systems other than Drupal - or none at all - to use Drupal, however it is not easy to visualise your end goal and know how to get there, or there is a module or modules already out there which could help you along the way to achieve your desired outcome without having to code anew.

To help overcome this out-of-the-box experience there are many ongoing initiatives to provide default content, make module discovery easier, build focused distributions, etc. but they will all take time. There is a way to approach development which means you don't end up going down the wrong path or developing functionality which already exists, it is to discover what exactly it is you want to build Drupal doesn't already know about and focus only on functionality required which is specific to your situation and no other.

What makes you different?

I recently provided the architecture for a high-profile specialist travel site - a six-figure project which unfortunately as with many projects I'm involved in I'm under non-disclosure agreements, doesn't mean I can't talk about the approach I took though, and this is a particularly good example.

As they were merging a number of existing systems I could've just looked at the existing data, however there is nothing to say those systems were designed well and we don't want to fall into the trap which I see many times where people re-create bad systems. Drupal is a very flexible system, many others require you to fit your data into how they work. So by asking the client to explain how their organisation worked and what was different about themselves as opposed to other similar organisations I discovered there were six distinct areas:

  1. Activity - their offerings were split into distinct activity types
  2. Resorts - they operate their own resorts
  3. Accommodation - each resort contains one or more different types of accommodation
  4. Region - the organisation had their own definition of a region, some spanning more than one country
  5. Departure Gateways - they fly out from a limited number of airports
  6. Arrival Gateways - resorts are serviced by one or more local airports

Everything else on the system was something Drupal would have dealt with before in one way or another - number of rooms, features of accommodation and resorts, and so on. These could easily be achieved using fields, taxonomy terms, and everything else Drupal provides out-of-the-box.

Design with the future in mind

I also took the time to observe the operations of the organisation as I walked around their office. I noticed the majority of people were answering calls, so I asked what exactly they had to deal with on the phone - people wanting more information on particular deals, issues with accommodation crop up from time to time - all the usual a travel company would have to deal with but more so here as they owned and operated the resorts. The point here is there's a whole wealth of user requirements contained here which although weren't in the scope of this current phase of development, by having them in mind when designing a system it should make it easier to extend to accommodate their needs as and when budgets and time allow.

If you only design a system for buying via the web you may find when a member of staff is trying to help a customer on the phone the process is unnecessarily complicated, or extending the system to cope with this new use case is particularly hard if you haven't taken this scenario into consideration to start with. Not to say it can't be done, and is easier to adapt now Drupal 8 is more object-oriented, but it's always good to have the future in mind - some of this you will be able to see, some you'll need to extract from key stakeholders, you'll be surprised sometimes with what you find out which you'll then be glad you asked. Here I knew the latest version of Commerce for Drupal 8 has the ability to set up different buying processes so it would be able to cope easily with phone orders if it were ever a requirement.

Design for different rates of change

It is feasible I could've used Drupal's built-in content types to build the system, but this would've limited the system to this particular use-case, making it harder to cope with different buying processes like the one mentioned above. It also did not sound right - an "airport" isn't a content type, it's an entity. It has content - facilities etc. but the thing itself is an entity. So I created six custom entities, and it sounded much better especially when you went to create a view - "list accommodation in resort". By simply teaching Drupal what was different about this particular organisation, we extended Drupal's "knowledge" and leveraged everything else it had to offer to deal with the functionality it does know about, like date ranges, durations, prices, and so on.

Whilst the front-end of a website may go through many enhancements and refreshes, the core business model of an organisation - especially one such as this which is well-established and operated for many years, does not change as much, if at all. In this example they mentioned they may add new activities, and they offered packages which covered more than one activity but their current system couldn't cope with this, which is why activity was treated as a separate entity.

By encoding the core business model of an organisation as high up the chain as you can with Drupal, you end up with a far more flexible system to cope with the faster-moving changes such as views to list out particular promotions, plus ensure longevity by enabling future development of those core parts of the system. I also wanted to make it a little more difficult for them to change any of this as this is critical to the operation of the organisation, so if changes were needed they would have to go through a harder process than changing a view, but there should be a good reason for any changes needed to the core business model so happy with the custom entity approach taken.

Seeing the wood for the trees

It's not only when architecting systems you need to take this approach to Drupal - another small example is when I helped someone out a couple of weeks back who was having problems getting a product listing displaying exactly how he wanted it to using Drupal 7. He had tried a number of different types of views (Drupal's user interface for manipulating database queries) but none of them would do what he wanted, which was to provide a faceted search facility, listing the results grouped by category. You'll see this functionality on most e-commerce sites these days, for example click on Televisions and it'll provide you a list grouped by manufacturer, or perhaps size - the point is it's not Rocket Science, it's been done before, it shouldn't be hard to do, so something else was causing the issue here. Sometimes it's hard to see the wood for the trees, so you need to take a step back and take a logical think about the situation.

We delved into the problem and through a series of questions worked out the thing he wanted to do which was different was he wanted a number of fields to be displayed at the group level - the name of the group, an image, and a description. None of the various combinations of views he had tried provided the ability to display more than one field, and rewriting the field output in the view did not apply to group by fields. Although there are a number of ways to achieve this from different parts of Drupal, I implemented the simplest way I knew which was to output the taxonomy term ID as the field to group by, and overwrite the template in order to load the details of the taxonomy term so we could easily grab the fields we needed.

I can almost hear others screaming at me to use display modes or some other functionality available as I'm sure there's other ways this can be achieved which are 'better', however as I spend most of my time dealing with back-end issues and not front-end and as we only had limited time and budget to solve the issue, this worked as a solution for the situation at hand so we went with it.

The take-away here is to go with what solves the majority of the problem, the thing you see or can imagine seeing other people using, and focus on what is specific to your needs. Faceted searching, listing products, grouping products by category - all standard functionality and should be simple to achieve in Drupal. Outputting multiple fields for a grouping category title? Not so much.

Step 2: Modularise Your Requirements

Drupal is a modular system, so you need to modularise your requirements by breaking them down as much as you can. Yes, what you're wanting to do has more than likely been done before, but maybe not in your exact combination - if it has then cool, you don't have to do anything as there's already a module/distribution/theme/etc. out there for you! Many times there isn't though, and every organisation has their differences, so you need to break your requirements down in order to deal with them successfully.

In our example above where we have a faceted search listing out products grouped by category, by splitting it up into "faceted search", "list products", and "group a view by category" we are going to get much better results when searching for answers than if we search for "faceted search grouped by taxonomy", which is more specific to our use-case than the majority of uses. You're more likely to end up with someone else's specific situation who also has had issues solving it and may forever skip past the actual solutions you are looking for. Be as generic as you can with generic requirements, then be as specific as you can with the ones you identified as particular to your situation, in this example we could've searched for "override view field output" and it would've brought us results for how to override using views templates, which is how we solved the problem there.

Once you align your vocabulary more closely with Drupal's generic, modular functionality, you'll enjoy much more success with your searches - it takes a little logical thought and remembering it's not Rocket Science! Far too many times I've seen sites where little or no research has been done as to what's already out there and people have essentially forked Drupal, creating their own monster significantly increasing the amount of work it takes to maintain and extend the site when it's not necessary.

Every line of code you produce is technical debt - even if you decide not to use the module you find which does what you need or part of what you need, you can study the tried-and-tested code, copy it into your module and use as a base for your work. A good example is detailed in my previous blog post about creating a Drupal Console command where I found code which did some of what I wanted so I based my work on it because I knew what had already been written worked and there was no point in me writing it again.

Step 3: Only Develop Specifics, Share Where Possible & Grow Drupal!

If you find you have to develop specific functionality for your site, have a think about if it would be of use to anyone else, or whether you're going to be the only person in the world doing this specific thing. As mentioned above, every line of code you write is something you or your client is going to need to support your/themselves. If you publish a module to the drupal.org module repository you not only have the possibility of others sharing the maintenance of the code but they may also provide enhancements, and stable module releases are covered by the security advisory policy which doesn't mean they secure your module, but if an exploit is found and reported the 40+ strong Drupal Security Team are there to help. Even if you just create a sandbox project you may discover others find the code useful and provide feedback.

If you're working for a client and they are worried about sharing code, or you're the end client and worry about losing competitive advantage, remember software is easy to copy and it's the rest of what you do which sets you apart from your competition. In our travel example above, it's the resorts they own which provide the value to the customer, not the software code which enables people to book a stay in them.

Currently there is a lack of sharing code on the implementation side - there's a lot of factors for this including competition between suppliers, infrastructure ease of use or lack thereof, and a general lack of co-operation in some industries. The result is many people end up writing similar code when they could be starting at a higher level, collaborating with industry peers, sharing development and maintenance costs, and going towards pushing the Drupal project forward. The more we can do out-of-the-box, the better it gets for all concerned as projects cost less, launch quicker, and we can focus on code which isn't out there already which is specific to the organisation itself, so spending the development budget on genuinely useful code instead of code which could be freely available to us in the first instance. Remembering how much we started with for free may be of help creating impetus to share any code we develop.

Although my site here doesn't do much functionally I haven't had to write a single line of code to be able to use the web to communicate my message to you, something I believe is amazeballs! Drupal can and does provide code for generic websites, however it's up to industries to collaborate and build their modules and distributions, and/or some enterprising people to build code and distributions for them, as we see in some areas such as e-learning and government.

I'm honestly shocked when I hear projects haven't contributed any code back, especially larger projects lasting longer than a year - I worry about how much technical debt they've incurred and feel sorry they haven't helped Drupal to grow, it's only by contributing code the Drupal product itself has reached this amazing level of innovation. I understand there are reasons, however I never see it as "contribution", more akin to riding a bicycle - I can stare at it as long as I like but until I push my feet down on the pedal it's not going to take me anywhere, I don't call it "contribution", just how the bike works!

I hope this post has been of help, do feel free to comment below, or get in touch with me if I can be of help with anything specific.

Happy Drupaling!

Main Drupal 8 Learning Curve image courtesy @sgrame. Other images attributed inline, the rest are public domain, found on pixabay.

Category Tutorials Tags Add new comment
Categories: Elsewhere

Ben Armstrong: Annual Hike with Ryan: Salt Marsh Trail, 2016

Planet Debian - Sun, 09/10/2016 - 14:20

Once again, Ryan Neily and I met last month for our annual hike. This year, to give our aging knees a break, we visited the Salt Marsh Trail for the first time. For an added level of challenge and to access the trail by public transit, we started with the Shearwater Flyer Trail and finished with the Heritage Trail. It was a perfect day both for hiking and photography: cool with cloud cover and a refreshing coastal breeze. The entire hike was over 25 km and took the better part of the day to complete. Good times, great conversations, and I look forward to visiting these beautiful trails again!

Salt Marsh trail hike, 2016. Click to start the slideshow. We start here, on the Shearwater flyer trail. Couldn’t ID this bush. The berries are spectacular! A pond to the side of the trail. Different angle for dramatic lighting effect. Rail bridge converted to foot bridge. Cranberries! Reviewing our progress. From the start … Map of the Salt Marsh trail ahead. Off we go again! First glimpse through the trees. Appreciating the cloud cover today. Salt-marshy grasses. Never far from rocks in NS. Rocks all laid out in stripes. Lunch & selfie time. Ryan attacking his salad. Vantage point. A bit of causeway coast. Plenty of eel grass. Costal flora. We head for the bridge next. Impressed by the power of the flow beneath. Snapping more marsh shots. Ripples. Gulls, and if you squint, a copter. More ripples. Swift current along this channel. Until it broadens out and slows down. Nearly across. Heron! Sorry it’s so tiny. Heron again, before I lost it. Ducks at the head of the Atlantic View trail where we rested and then turned back. Attempt at artsy. Nodding ladies tresses on the way back. Several of them. Sky darkening, but we still have time. A lonely wild rose. The last gasp of late summer. Back across the marshes. A short breather on the Heritage Trail.

Here’s the Strava record of our hike:

Categories: Elsewhere

Norbert Preining: Reload: Android 7.0 Nougat – Root – Pokemon Go

Planet Debian - Sun, 09/10/2016 - 13:01

Ok, it turned out that a combinations of updates has broken my previous guide on playing Pokemon GO on a rooted Android device. What has happened that the October security update of the Android Nougat has changed the SecurityNet that is used for checking for rooted devices, and at the same time the Magisk rooting system as catapulted itself (hopefully temporarily) into the complete irrelevance by removing the working version and providing an “improved” version that does neither have SuperSU installed, nor the ability to hide root – well done, congratulations.

But there is a way around, and I am now back at the latest security patch level, rooted, and playing Pokemon GO (not very often, no time, though!).

My previous guide used Magisk Version 6 to root and hide root. But the recent security updated of Andorid Nougat (October 2016) has rendered Magisk-v6 non-working. I first thought that Magisk-v7 could solve the problem, but I was badly disappointed: After reflashing my device to pristine state, installing Magisk-v7, I suddenly was left with: no SuperSU (that means, X-plore, Titanium Backup etc do not work anymore), nor the ability to hide root for Pokemon Go or banking apps. Great update.

Thus, I have decided to remove Magisk completely and make a clean start with SuperSU and suhide (and a GUI for suhide). And it turned out to be more convenient and more standard than Magisk, may it rest in peace (until they fix their stuff together).

In the following I assume you have a clean slate Android Nougat device, if not, please see one of the previous guides for hints how to flash back without loosing your user data.


One need the following few items:


Unzip the CF-Auto-Root-angler-angler-nexus6p.zip and either use the included programs (root-linux.sh, root-mac.sh, root-windows.bat) to root your device, or simply connect your device to your computer, and run (assuming you have adb and fastboot installed):

adb reboot bootloader sleep 10 fastboot boot image/CF-Auto-Root-angler-angler-nexus6p.img

After that your device will reboot a few times, and you will finally land in your normal Android screen and a new program SuperSU will be available. At this stage you will not be able to play Pokemon GO anymore.

Updating SuperSU

The version of SuperSU packaged with the CF-AutoRoot is unfortunately too old, so one needs to update using the zip file SR1-SuperSU-v2.78-SR1-20160915123031.zip (or later). Here are two options: Either you use TWRP recovery system, or you install FlashFire (main page, app store page) which allows you to flash zip/ota directly from your Android screen. This time I used for the first time the FlashFire method, and it worked without any problem.

Just press the “+” button in FlashFire, than the “Flash zip/ota” button, select the SR1-SuperSU-v2.78-SR1-20160915123031.zip, click two times yes, and then wait a bit and a few black screens (don’t do anything!) later you will be back in your Nougat environment. Opening the SuperSU app should show you on the Settings tag that the version has been updated to 2.78-SR1.

Installing suhide

As with the update of SuperSU, install the suhide zip file, smae procedure, nothing special.

After this you will be able to add an application (like Pokemon GO) from the command line (shell), but this is not very convenient. Better is to install the suhide GUI from the app store, start it, scroll for Pokemnon GO, add a tick, and you are settled.

After that you are free to play Pokemon GO again. At least until the next security update brings again problems. In the long run this is a loosing game, anyway. Enjoy it while you can.

Categories: Elsewhere

Craig Sanders: Converting to a ZFS rootfs

Planet Debian - Sun, 09/10/2016 - 07:57

My main desktop/server machine (running Debian sid) at home has been running XFS on mdadm raid-1 on a pair of SSDs for the last few years. A few days ago, one of the SSDs died.

I’ve been planning to switch to ZFS as the root filesystem for a while now, so instead of just replacing the failed drive, I took the opportunity to convert it.

NOTE: at this point in time, ZFS On Linux does NOT support TRIM for either datasets or zvols on SSD. There’s a patch almost ready (TRIM/Discard support from Nexenta #3656), so I’m betting on that getting merged before it becomes an issue for me.

Here’s the procedure I came up with:

1. Buy new disks, shutdown machine, install new disks, reboot.

The details of this stage are unimportant, and the only thing to note is that I’m switching from mdadm RAID-1 with two SSDs to ZFS with two mirrored pairs (RAID-10) on four SSDs (Crucial MX300 275G – at around $100 AUD each, they’re hard to resist). Buying four 275G SSDs is slightly more expensive than buying two of the 525G models, but will perform a lot better.

When installed in the machine, they ended up as /dev/sdp, /dev/sdq, /dev/sdr, and /dev/sds. I’ll be using the symlinks in /dev/disk/by-id/ for the zpool, but for partition and setup, it’s easiest to use the /dev/sd? device nodes.

2. Partition the disks identically with gpt partition tables, using gdisk and sgdisk.

I need:

  • A small partition (type EF02, 1MB) for grub to install itself in. Needed on gpt.
  • A small partition (type EF00, 1MB) for EFI System. I’m not currently booting with UEFI but I want the option to move to it later.
  • A small partition (type 8300, 2GB) for /boot.

    I want /boot on a separate partition to make it easier to recover from problems that might occur with future upgrades. 2GB might seem excessive, but as this is my tftp & dhcp server I can’t rely on network boot for rescues, so I want to be able to put rescue ISO images in there and boot them with grub and memdisk.

    This will be mdadm RAID-1, with 4 copies.

  • A larger partition (type 8200, 4GB) for swap. With 4 identically partitioned SSDs, I’ll end up with 16GB swap (using zswap for block-device backed compressed RAM swap)

  • A large partition (type bf07, 210GB) for my rootfs

  • A small partition (type bf08, 2GBB) to provide ZIL for my HDD zpools

  • A larger partition (type bf09, 32GB) to provide L2ARC for my HDD zpools

ZFS On Linux uses partition type bf08 (“Solaris Reserved 1”) natively, but doesn’t seem to care what the partition types are for ZIL and L2ARC. I arbitrarily used bf08 (“Solaris Reserved 2”) and bf09 (“Solaris Reserved 3”) for easy identification. I’ll set these up later, once I’ve got the system booted – I don’t want to risk breaking my existing zpools by taking away their ZIL and L2ARC (and forgetting to zpool remove them, which I might possibly have done once) if I have to repartition.

I used gdisk to interactively set up the partitions:

# gdisk -l /dev/sdp GPT fdisk (gdisk) version 1.0.1 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sdp: 537234768 sectors, 256.2 GiB Logical sector size: 512 bytes Disk identifier (GUID): 4234FE49-FCF0-48AE-828B-3C52448E8CBD Partition table holds up to 128 entries First usable sector is 34, last usable sector is 537234734 Partitions will be aligned on 8-sector boundaries Total free space is 6 sectors (3.0 KiB) Number Start (sector) End (sector) Size Code Name 1 40 2047 1004.0 KiB EF02 BIOS boot partition 2 2048 2099199 1024.0 MiB EF00 EFI System 3 2099200 6293503 2.0 GiB 8300 Linux filesystem 4 6293504 14682111 4.0 GiB 8200 Linux swap 5 14682112 455084031 210.0 GiB BF07 Solaris Reserved 1 6 455084032 459278335 2.0 GiB BF08 Solaris Reserved 2 7 459278336 537234734 37.2 GiB BF09 Solaris Reserved 3

I then cloned the partition table to the other three SSDs with this little script:


#! /bin/bash src='sdp' targets=( 'sdq' 'sdr' 'sds' ) for tgt in "${targets[@]}"; do sgdisk --replicate="/dev/$tgt" /dev/"$src" sgdisk --randomize-guids "/dev/$tgt" done 3. Create the mdadm for /boot, the zpool, and and the root filesystem.

Most rootfs on ZFS guides that I’ve seen say to call the pool rpool, then create a dataset called "$(hostname)-1" and then create a ROOT dataset under that. so on my machine, that would be rpool/ganesh-1/ROOT. Some reverse the order of hostname and the rootfs dataset, for rpool/ROOT/ganesh-1.

There might be uses for this naming scheme in other environments but not in mine. And, to me, it looks ugly. So I’ll use just $(hostname)/root for the rootfs. i.e. ganesh/root

I wrote a script to automate it, figuring I’d probably have to do it several times in order to optimise performance. Also, I wanted to document the procedure for future reference, and have scripts that would be trivial to modify for other machines.


#! /bin/bash exec &> ./create.log hn="$(hostname -s)" base='ata-Crucial_CT275MX300SSD1_' md='/dev/md0' md_part=3 md_parts=( $(/bin/ls -1 /dev/disk/by-id/${base}*-part${md_part}) ) zfs_part=5 # 4 disks, so use the top half and bottom half for the two mirrors. zmirror1=( $(/bin/ls -1 /dev/disk/by-id/${base}*-part${zfs_part} | head -n 2) ) zmirror2=( $(/bin/ls -1 /dev/disk/by-id/${base}*-part${zfs_part} | tail -n 2) ) # create /boot raid array mdadm "$md" --create \ --bitmap=internal \ --raid-devices=4 \ --level 1 \ --metadata=0.90 \ "${md_parts[@]}" mkfs.ext4 "$md" # create zpool zpool create -o ashift=12 "$hn" \ mirror "${zmirror1[@]}" \ mirror "${zmirror2[@]}" # create zfs rootfs zfs set compression=on "$hn" zfs set atime=off "$hn" zfs create "$hn/root" zpool set bootfs="$hn/root" # mount the new /boot under the zfs root mount "$md" "/$hn/root/boot"

If you want or need other ZFS datasets (e.g. for /home, /var etc) then create them here in this script. Or you can do that later after you’ve got the system up and running on ZFS.

If you run mysql or postgresql, read the various tuning guides for how to get best performance for databases on ZFS (they both need their own datasets with particular recordsize and other settings). If you download Linux ISOs or anything with bit-torrent, avoid COW fragmentation by setting up a dataset to download into with recordsize=16K and configure your BT client to move the downloads to another directory on completion.

I did this after I got my system booted on ZFS. For my db, I stoppped the postgres service, renamed /var/lib/postgresql to /var/lib/p, created the new datasets with:

zfs create -o recordsize=8K -o logbias=throughput -o mountpoint=/var/lib/postgresql \ -o primarycache=metadata ganesh/postgres zfs create -o recordsize=128k -o logbias=latency -o mountpoint=/var/lib/postgresql/9.6/main/pg_xlog \ -o primarycache=metadata ganesh/pg-xlog

followed by rsync and then started postgres again.

4. rsync my current system to it.

Logout all user sessions, shut down all services that write to the disk (postfix, postgresql, mysql, apache, asterisk, docker, etc). If you haven’t booted into recovery/rescue/single-user mode, then you should be as close to it as possible – everything non-esssential should be stopped. I chose not to boot to single-user in case I needed access to the web to look things up while I did all this (this machine is my internet gateway).


hn="$(hostname -s)" time rsync -avxHAXS -h -h --progress --stats --delete / /boot/ "/$hn/root/"

After the rsync, my 130GB of data from XFS was compressed to 91GB on ZFS with transparent lz4 compression.

Run the rsync again if (as I did), you realise you forgot to shut down postfix (causing newly arrived mail to not be on the new setup) or something.

You can do a (very quick & dirty) performance test now, by running zpool scrub "$hn". Then run watch zpool status "$hn". As there should be no errorss to correct, you should get scrub speeds approximating the combined sequential read speed of all vdevs in the pool. In my case, I got around 500-600M/s – I was kind of expecting closer to 800M/s but that’s good enough….the Crucial MX300s aren’t the fastest drive available (but they’re great for the price), and ZFS is optimised for reliability more than speed. The scrub took about 3 minutes to scan all 91GB. My HDD zpools get around 150 to 250M/s, depending on whether they have mirror or RAID-Z vdevs and on what kind of drives they have.

For real benchmarking, use bonnie++ or fio.

5. Prepare the new rootfs for chroot, chroot into it, edit /etc/fstab and /etc/default/grub.

This script bind mounts /proc, /sys, /dev, and /dev/pts before chrooting:


#! /bin/sh hn="$(hostname -s)" for i in proc sys dev dev/pts ; do mount -o bind "/$i" "/${hn}/root/$i" done chroot "/${hn}/root"

Change /etc/fstab (on the new zfs root to) have the zfs root and ext4 on raid-1 /boot:

/ganesh/root / zfs defaults 0 0 /dev/md0 /boot ext4 defaults,relatime,nodiratime,errors=remount-ro 0 2

I haven’t bothered with setting up the swap at this point. That’s trivial and I can do it after I’ve got the system rebooted with its new ZFS rootfs (which reminds me, I still haven’t done that :).

add boot=zfs to the GRUB_CMDLINE_LINUX variable in /etc/default/grub. On my system, that’s:

GRUB_CMDLINE_LINUX="iommu=noagp usbhid.quirks=0x1B1C:0x1B20:0x408 boot=zfs"

NOTE: If you end up needing to run rsync again as in step 4. above copy /etc/fstab and /etc/default/grub to the old root filesystem first. I suggest to /etc/fstab.zfs and /etc/default/grub.zfs

6. Install grub

Here’s where things get a little complicated. Running install-grub on /dev/sd[pqrs] is fine, we created the type ef02 partition for it to install itself into.

But running update-grub to generate the new /boot/grub/grub.cfg will fail with an error like this:

/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/ata-Crucial_CT275MX300SSD1_163313AADD8A-part5'.

IMO, that’s a bug in grub-probe – it should look in /dev/disk/by-id/ if it can’t find what it’s looking for in /dev/

I fixed that problem with this script:


#! /bin/sh cd /dev ln -s /dev/disk/by-id/ata-Crucial* .

After that, update-grub works fine.

NOTE: you will have to add udev rules to create these symlinks, or run this script on every boot otherwise you’ll get that error every time you run update-grub in future.

7. Prepare to reboot

Unmount proc, sys, dev/pts, dev, the new raid /boot, and the new zfs filesystems. Set the mount point for the new rootfs to /


#! /bin/sh hn="$(hostname -s)" md="/dev/md0" for i in dev/pts dev sys proc ; do umount "/${hn}/root/$i" done umount "$md" zfs umount "${hn}/root" zfs umount "${hn}" zfs set mountpoint=/ "${hn}/root" zfs set canmount=off "${hn}" 8. Reboot

Remember to configure the BIOS to boot from your new disks.

The system should boot up with the new rootfs, no rescue disk required as in some other guides – the rsync and chroot stuff has already been done.

9. Other notes
  • If you’re adding partition(s) to a zpool for ZIL, remember that ashift is per vdev, not per zpool. So remember to specify ashift=12 when adding them. e.g.

    zpool add -o ashift=12 export log \ mirror ata-Crucial_CT275MX300SSD1_163313AAEE5F-part6 \ ata-Crucial_CT275MX300SSD1_163313AB002C-part6

    Check that all vdevs in all pools have the correct ashift value with:

    zdb | grep -E 'ashift|vdev|type' | grep -v disk
10. Useful references

Reading these made it much easier to come up with my own method. Highly recommended.

Converting to a ZFS rootfs is a post from: Errata

Categories: Elsewhere

Nathan Handler: Ohio Linux Fest

Planet Debian - Sun, 09/10/2016 - 02:00

This weekend, I traveled to Columbus, Ohio to attend Ohio Linux Fest. I departed San Francisco early on Thursday. It was interesting getting to experience the luxurious side of flying as I enjoyed a mimosa in the American Express Centurion lounge for the first time. I even happend to cross paths with Corey Quinn, who was on his way to [DevOpsDays Boise].

While connecting in Houston, I met up with the always awesome José Antonio Rey, who was to be my travel companion for this trip. The long day of travel took its toll on us, so we had a lazy Friday morning before checking in for the conference around lunch time. I was not that interested in the afternoon sessions, so I spent the majority of the first day helping out at the Ubuntu booth and catching up with friends and colleagues. The day ended with a nice Happy Hour sponsored by Oracle.

Saturday was the main day for the conference. Ethan Galstad, Founder and CEO of Nagios, started the day with a Keynote about Becoming the Next Tech Entrepreneur. Next up was Elizabeth K. Joseph with A Tour of OpenStack Deployment Scenarios. While I’ve read plenty about OpenStack, I’ve never actually used it before. As a result, this demo and introduction was great to watch. It was entertaining to watch her login to CirrOS with the default password of cubswin:), as the Chicago Cubs are currently playing the San Francisco Giants in the National League Divisional Series (and winning). Unfortunately, I was not able to win a copy of her new Common OpenStack Deployments book, but it was great getting to watch her signing copies for other attendees after all of the hard work that went into writing the book.

For lunch, José, Elizabeth, and Svetlana Belkin all gathered together for an informal Ubuntu lunch.

Finally, it was time for me to give my talk. This was the same talk I gave at FOSSCON, but this time, I had a significantly larger audience. Practice definitely makes perfect, as my delivery was a lot better the second time giving this talk. Afterwards, I had a number of people come up to me to let me know that they really enjoyed the presentation. Pro Tip: If you ever attend a talk, the speaker will really appreciate any feedback you send their way. Even if it is a simple, “Thank You”, it really means a lot. One of the people who came up to me after the talk was Unit193. We have known each other through Ubuntu for years, but there has never been an opportunity to meet in person. I am proud to be able to say with 99% confidence that he is not a robot, and is in fact a real person.

Next up was a lesson about the /proc filesystem. While I’ve explored it a bit on my own before, I still learned a few tips and tricks about information that can be gained from the files in this magical directory.

Following this was a talk about Leading When You’re Not the Boss. It was even partially taught by a dummy (the speaker was a ventriloquist). The last regular talk of the day was one of the more interesting ones I attended. It was a talk by Patrick Shuff from Facebook about how they have built a load balancer than can handle a billion users. The slide deck was well-made with very clear diagrams. The speaker was also very knowledgeable and dealt with the plethora of questions he received.

Prior to the closing keynote was a series of lightning talks. These served as a great means to get people laughing after a long day of talks. The closing keynote was given by father and daughter Joe and Lilly Born about The Democratization of Invention. Both of them had very interesting stories, and Lily was quite impressive given her age.

We skipped the Nagios After Party in favor of a more casual pizza dinner.

Overall, it was a great conference, and I am very glad to have had the opportunity to attend. A big thanks to Canonical and the Ubuntu Community for fudning my travel through the Ubuntu Community Fund and to the Ohio Linux Fest staff for allowing me the opportunity to speak at such a great conference.

Categories: Elsewhere

Norbert Tretkowski: Gajim plugins packaged for Debian

Planet Debian - Sun, 09/10/2016 - 00:00

Wolfgang Borgert started to package some of the available Gajim plugins for Debian. At the time of writing, the OMEMO, HTTP Upload and URL Image Preview plugins are available in testing and unstable.

More plugins will follow.

Categories: Elsewhere

Joachim Breitner: T430s → T460s

Planet Debian - Sat, 08/10/2016 - 23:22

Earlier this week, I finally got my new machine that came with my new position at the University of Pennsylvania: A shiny Thinkpad T460s that now replaces my T430s. (Yes, there is a pattern. It continues with T400 and T41p.) I decided to re-install my Debian system from scratch and copy over only the home directory – a bit of purification does not hurt. This blog post contains some random notes that might be useful to someone or alternative where I hope someone can tell me how to fix and improve things.


The installation (using debian-installer from a USB drive) went mostly smooth, including LVM on an encrypted partition. Unfortunately, it did not set up grub correctly for the UEFI system to boot, so I had to jump through some hoops (using the grub on the USB drive to manually boot into the installed system, and installing grub-efi from there) until the system actually came up.

High-resolution display

This laptop has a 2560×1440 high resolution display. Modern desktop environments like GNOME supposedly handle that quite nicely, but for reasons explained in an earlier post, I do not use a desktop envrionment but have a minimalistic setup based on Xmonad. I managed to get a decent setup now, by turning lots of manual knobs:

  • For the linux console, setting

    FONTFACE="Terminus" FONTSIZE="12x24"

    in /etc/default/console-setup yielded good results.

  • For the few GTK-2 applications that I am still running, I set

    gtk-font-name="Sans 16"

    in ~/.gtkrc-2.0. Similarly, for GTK-3 I have

    [Settings] gtk-font-name = Sans 16

    in ~/.config/gtk-3.0/settings.ini.

  • Programs like gnome-terminal, Evolution and hexchat refer to the “System default document font” and “System default monospace font”. I remember that it was possible to configure these in the GNOME control center, but I could not find any way of configuring these using command line tools, so I resorted to manually setting the font for these. With the help from Alexandre Franke I figured out that the magic incarnation here is:

    gsettings set org.gnome.desktop.interface monospace-font-name 'Monospace 16' gsettings set org.gnome.desktop.interface document-font-name 'Serif 16' gsettings set org.gnome.desktop.interface font-name 'Sans 16'
  • Firefox seemed to have picked up these settings for the UI, so that was good. To make web pages readable, I set layout.css.devPixelsPerPx to 1.5 in about:config.

  • GVim has set guifont=Monospace\ 16 in ~/.vimrc. The toolbar is tiny, but I hardly use it anyways.

  • Setting the font of Xmonad prompts requires the sytax

    , font = "xft:Sans:size=16"

    Speaking about Xmonad prompts: Check out the XMonad.Prompt.Unicode module that I have been using for years and recently submitted upstream.

  • I launch Chromium (or rather the desktop applications that I use that happen to be Chrome apps) with the parameter --force-device-scale-factor=1.5.

  • Libreoffice seems to be best configured by running xrandr --dpi 194 before hand. This seems also to be read by Firefox, doubling the effect of the font size in the gtk settings, which is annoying. Luckily I do not work with Libreoffice often, so for now I’ll just set that manually when needed.

I am not quite satisfied. I have the impression that the 16 point size font, e.g. in Evolution, is not really pretty, so I am happy to take suggestions here.

I found the ArchWiki page on HiDPI very useful here.

Trackpoint and Touchpad

One reason for me to sticking with Thinkpads is their trackpoint, which I use exclusively. In previous models, I disabled the touchpad in the BIOS, but this did not seem to have an effect here, so I added the following section to /etc/X11/xorg.conf.d/30-touchpad.conf

Section "InputClass" Identifier "SynPS/2 Synaptics TouchPad" MatchProduct "SynPS/2 Synaptics TouchPad" Option "ignore" "on" EndSection

At one point I left out the MatchProduct line, disabling all input in the X server. Had to boot into recovery mode to fix that.

Unfortunately, there is something wrong with the trackpoint and the buttons: When I am moving the trackpoint (and maybe if there is actual load on the machine), mouse button press and release events sometimes get lost. This is quite annoying – I try to open a folder in Evolution and accidentially move it.

I installed the latest Kernel from Debian experimental (4.8.0-rc8), but it did not help.

I filed a bug report against libinput although I am not fully sure that that’s the culprit.

Update: According to Benjamin Tissoires it is a known firmware bug and the appropriate people are working on a work-around. Until then I am advised to keep my palm of the touchpad.

Also, I found the trackpoint too slow. I am not sure if it is simply because of the large resolution of the screen, or because some movement events are also swallowed. For now, I simply changed the speed by writing

SUBSYSTEM=="serio", DRIVERS=="psmouse", ATTRS{speed}="120"

to /etc/udev/rules.d/10-trackpoint.rules.

Brightness control

The system would not automatically react to pressing Fn-F5 and Fn-F6, which are the keys to adjust the brightness. I am unsure about how and by what software component it “should” be handled, but the solution that I found was to set

Section "Device" Identifier "card0" Driver "intel" Option "Backlight" "intel_backlight" BusID "PCI:0:2:0" EndSection

so that the command line tool xbacklight would work, and then use Xmonad keybinds to perform the action, just as I already do for sound control:

, ((0, xF86XK_Sleep), spawn "dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend") , ((0, xF86XK_AudioMute), spawn "ponymix toggle") , ((0, 0x1008ffb2 {- xF86XK_AudioMicMute -}), spawn "ponymix --source toggle") , ((0, xF86XK_AudioRaiseVolume), spawn "ponymix increase 5") , ((0, xF86XK_AudioLowerVolume), spawn "ponymix decrease 5") , ((shiftMask, xF86XK_AudioRaiseVolume), spawn "ponymix increase 5 --max-volume 200") , ((shiftMask, xF86XK_AudioLowerVolume), spawn "ponymix decrease 5") , ((0, xF86XK_MonBrightnessUp), spawn "xbacklight +10") , ((0, xF86XK_MonBrightnessDown), spawn "xbacklight -10")

The T460s does not actually have a sleep button, that line is a reminiscence from my T430s. I suspend the machine by pressing the power button now, thanks to HandlePowerKey=suspend in /etc/systemd/logind.conf.

Profile Weirdness

Something strange happend to my environment variables after the move. It is clearly not hardware related, but I simply cannot explain what has changed: All relevant files in /etc look similar enough.

I use ~/.profile to extend the PATH and set some other variables. Previously, these settings were in effect in my whole X session, which is started by lightdm with auto-login, followed by xmonad-session. I could find no better way to fix that than stating . ~/.profile early in my ~/.xmonad/xmonad-session-rc. Very strange.

Categories: Elsewhere

Rob Bayliss: A Scalable Pattern for Displaying Simple Remote Data in Drupal 8

Planet Drupal - Sat, 08/10/2016 - 22:19

Let's imagine a scenario where you need to display some data from a remote service to the user. Instagram, for example. You want to grab the 6 most recent posts, pass them through some theming, then output them into a block. How would you go about doing that? In Drupal 7, one possible approach might look like this.

Categories: Elsewhere

Charles Plessy: I just finished to read the Imperial Radch trilogy.

Planet Debian - Sat, 08/10/2016 - 17:29

I liked it a lot. There are already many comments on Internet (thanks Russ for making me discover these novels), so I will not go into details. And it is hard to summarise without spoiling. In brief:

The first tome, Ancillary Justice, makes us visit various worlds and cultures, and give us an impression of what it feels to be a demigod. The main culture does not make a difference between the two sexes, and the grammar of its language does not have genders. This gives an original taste to the story, for instance when the hero speaks a foreign language, he has difficulties to correctly address people without risking to frown them. Unfortunately the English language itself does not use gender very much, so the literary effect is a bit weakened. Perhaps the French translation (which I have not read) could be more interesting in that respect?

The second tome, Ancillary Sword, shows us how one can communicate things in a surveillance society without privacy, by subtle variations on how to serve tea. Gallons of tea are drunk in this tome, of which the main interest is the relation between the characters and heir conversations.

In the third tome, Ancillary Mercy, asks the question of what makes us human. Among the most interesting characters, there is a kind of synthetic human, who acts as ambassador for an alien race. At first, he indeed behaves completely alien, but in the end, he is not very different from a newborn who would happen by miracle to know how to speak: in the beginning the World makes no sense, but step by step and by experimenting, he deduces how it works. This is how this character ends up understanding that what is called "war" is a complex phenomenon where one of the consequences is a shortage of fish sauce.

I was a bit surprised that no book lead us at the heart of the Radch empire, but I just see on Wikipedia that one more novel is in preparation... One can speculate that central Radch resembles to a future dystopian West, in which surveillance of everybody is total and constant, but where people think they are happy, and peace and well-being inside are kept possible thanks to military operations outside, mostly performed by killer robots controlled by artificial intelligences. A not so distant future ?

It is a matter of course that there does not seem to by any Free software in the Radch empire. That reminds me that I did not contribute much to Debian while I was reading...

Categories: Elsewhere

Norbert Preining: Debian/TeX update October 2016: all of TeX Live and Biber 2.6

Planet Debian - Sat, 08/10/2016 - 06:45

Finally a new update of many TeX related packages: all the texlive-* including the binary packages, and biber have been updated to the latest release. This upload was delayed by my travels around the world, as well as the necessity to package a new Perl module (libdatetime-calendar-julian-perl) as required by new Biber. Also, my new job leaves me only the weekends for packaging. Anyway, the packages are now uploaded and should appear soon on your friendly local server.

There are several highlights: The binaries have been patched with several upstream fixes (tex4ht and XeTeX compatibility, as well as various Japanese TeX engine fixes), updated biber and biblatex, and as usual loads of new and updated packages.

Last but not least I want to thank one particular author: His package was removed from TeX Live due to the addition of a rather unusual clause in the license. Instead of simply uploading new packages to Debian with the rather important removed, I contacted the author and asked for clarification. And to my great pleasure he immediately answered with an update of the package with fixed license.

All of us user of these many packages should be grateful to the authors of the packages who invest loads of their free time into supporting our community. Thanks!

Enough now, here as usual the list of new and updated packages with links to their respective CTAN pages. Enjoy.

New packages

addfont, apalike-german, autoaligne, baekmuk, beamerswitch, beamertheme-cuerna, beuron, biblatex-claves, biolett-bst, cooking-units, cstypo, emf, eulerpx, filecontentsdef, frederika2016, grant, latexgit, listofitems, overlays, phonenumbers, pst-arrow, quicktype, revquantum, richtext, semantic-markup, spalign, texproposal, tikz-page, unfonts-core, unfonts-extra, uspace.

Updated packages

achemso, acmart, acro, adobemapping, alegreya, allrunes, animate, arabluatex, archaeologie, asymptote, attachfile, babel-greek, bangorcsthesis, beebe, biblatex, biblatex-anonymous, biblatex-apa, biblatex-bookinother, biblatex-chem, biblatex-fiwi, biblatex-gost, biblatex-ieee, biblatex-manuscripts-philology, biblatex-morenames, biblatex-nature, biblatex-opcit-booktitle, biblatex-phys, biblatex-realauthor, biblatex-science, biblatex-true-citepages-omit, bibleref, bidi, chemformula, circuitikz, cochineal, colorspace, comment, covington, cquthesis, ctex, drawmatrix, ejpecp, erewhon, etoc, exsheets, fancyhdr, fei, fithesis, footnotehyper, fvextra, geschichtsfrkl, gnuplottex, gost, gregoriotex, hausarbeit-jura, ijsra, ipaex, jfontmaps, jsclasses, jslectureplanner, latexdiff, leadsheets, libertinust1math, luatexja, markdown, mcf2graph, minutes, multirow, mynsfc, nameauth, newpx, newtxsf, notespages, optidef, pas-cours, platex, prftree, pst-bezier, pst-circ, pst-eucl, pst-optic, pstricks, pstricks-add, refenums, reledmac, rsc, shdoc, siunitx, stackengine, tabstackengine, tagpair, tetex, texlive-es, texlive-scripts, ticket, translation-biblatex-de, tudscr, turabian-formatting, updmap-map, uplatex, xebaposter, xecjk, xepersian, xpinyin.


Categories: Elsewhere

Phponwebsites: Disable future dates in date popup - Drupal 7

Planet Drupal - Fri, 07/10/2016 - 20:15
     This blog describes how to disable future dates in the Drupal 7. One of the features in the date  module is displayed the date in the pop-up.

The use case is if you want to display only past & current date rather than all the dates in the pop-up, then how to do it in Drupal 7. Actually, the date module provides API called hook_date_popup_process_alter to alter the date_popup widget elements.

Example for disabling future dates in Drupal 7:
   For instance, I am going to disable future dates in the article content type. Please consider the following code snippet.

 * Implement hook_date_popup_process_alter().
function phponwebsites_date_popup_process_alter(&$element, &$form_state, &$context) {

  if ($form_state['complete form']['#form_id'] == 'article_node_form' && $element['#field']['field_name'] == 'field_date') {
    $max = 0;

  if (isset($element['#datepicker_options']['maxDate'])) {
    $max = $element['#datepicker_options']['maxDate'];

  if (isset($max)) {
    $element['#datepicker_options'] = array(
      'maxDate' => "+$max D",
  $element['date'] = date_popup_process_date_part($element);
   I've disabled the dates only if the form is article & the field name is field_date. After added the above code to your module, you could see disabled future dates in the date pop up. It looks like the below image:

   Now I've hope you know how to disable the future dates at the date module in Drupal 7.

Related articles:
Remove speical characters from URL alias using pathauto module in Drupal 7
Add new menu item into already created menu in Drupal 7
Add class into menu item in Drupal 7
Create menu tab programmatically in Drupal 7
Add custom fields to search api index in Drupal 7
Clear views cache when insert, update and delete a node in Drupal 7
Create a page without header and footer in Drupal 7
Login using both email and username in Drupal 7
Categories: Elsewhere

FFW Agency: The ABC's of Drupal: Article, Base Theme, Content

Planet Drupal - Fri, 07/10/2016 - 19:51
The ABC's of Drupal: Article, Base Theme, Content Ray Saltini Fri, 10/07/2016 - 17:51

For anyone who's ever looked up a definition of a Drupal term and been left wondering what it all means, here are some practical real world explanations you can use to navigate the Drupalverse. Watch this space and use comments to send us your feedback and requests.

Article: While newspapers and magazines have articles, the term 'Article' in Drupal denotes something more specific. An Article is one of two content types that have come preconfigured with Drupal since Drupal 7. As a content type, an Article is made up of Title, Body, Image, and Tag fields.

All content types are part of Drupal’s core fields system and can be customized with different fields. The output of an Article is usually configured to appear either as a teaser or a full version, which is sometimes referred to as the default or as a node. Unless your home page has been customized, article teasers will appear on your home page as a river of news with older items sinking to the bottom. This makes it easy to begin building a site with time sensitive content such as a blog. Most home pages are even customized so that selecting the ‘promote to front page’ toggle has no visible effect. If this happens to you, don't worry! Your site is not broken. It's just Articles at work.

Base Theme and Themes: A theme in Drupal is a collection of CSS, template files, and javascript that helps determine the look and feel of a Drupal website or application.

A theme typically defines different regions in code which can then be used to place various elements via configuration in a user interface. Base Themes are a common way of standardizing and optimizing Drupal front end development. They enable developers to focus on CSS styling and javascript without having to manipulate Drupal internals. A variety of different methods can be used to essentially copy and customize the styling of a base theme.

Among the advantages of using a base theme are less risk from custom coding and updates often provided by base theme maintainers that enable greater functionality or enhanced security. Some base themes make it easier to build a theme based on a popular published library, such as Twitter Bootstrap. Organizations often develop their own themes and use them internally as a base theme for different projects.

As a note: base themes typically only work with a given Drupal major version. For example, Drupal 7 theme will not work with a Drupal 6 or 8 theme. Major changes have taken place in theme development between Drupal 7 and the current version Drupal 8. But don't worry! Drupal 8 includes a new templating engine called Twig. Twig is a Symfony framework component that eliminates the necessity to write preprocess functions and other code. Generally, that's often not part of a front-end developers skill set, so Twig makes it easier than ever for front-end developers to create responsive and other advanced designs.

Content: The word "Content" can mean different things to different people, especially when Drupal is involved. When speaking to a Drupalist who’s been around for many versions, it may mean only something created by Drupal’s core node module or anything that has been created via a content type form by clicking on an ‘add content’ link. Others will use it to represent anything presented on a webpage.

Depending on who you are talking to and what their role is, this can lead to confusing discussions or debates about whether something is Content or something else. The best way to deal with this on a project is to understand the other definitions and always ask the speaker to please define what Content means to them. 

For example, Content can be structured or unstructured. (The preferred best practice in Drupal is always structured content validated at the field level.) Comments, images, and file attachments may also be considered Content. Images and file attachments are often referred to as assets because they are stored in a file system. In Drupal 8 you are more likely to hear this kind of Content referred to as an Entity, which thankfully simplifies the conversation.

Tagged with Comments
Categories: Elsewhere

Acquia Developer Center Blog: How Indigo Herbs runs its whole business on Drupal!

Planet Drupal - Fri, 07/10/2016 - 19:15

In December 2015, I sat down with Michael Hanby-Director-and Tawney Bartlett-Website Coordinator-from Indigo Herbs in Glastonbury, England and dug into their history with Drupal and just how much of their business they run with it. Tawney is really inspiring: she learned Drupal and its component and supporting technologies--Git, Javascript, PHP, and much more--on the job at Indigo. She says she's fallen in love with Drupal. I say she's become a Drupalist to reckon with and should be a role model for others. Open source, #ftw!

This interview, particularly the last third, is full of some great "Why Drupal?" soundbites from a sensible business perspective. Well worth listening to! A full transcript follows below as well.

"If you are a small business and you want to develop a tech competency, I don’t know why you’ll do anything but Drupal because apart from the fact that it’s free, you’ve got this huge community that’s not just willing to give you the answers but wants to help you. What I think is one of the most awesome things about open source is that by asking a question, you are contributing to the project. It’s so cool. Just by asking the question that no one’s asked, you are contributing to the documentation that’s going to help someone else, it’s such a virtuous cycle." - Michael Hanby, Indigo Herbs

In Drupal "everyone is so accepting and everyone’s so willing to teach people and help people grow within the community. It stands out from the crowd, it’s just a fascinating thing that everyone loves technology and everyone does it because they want to make this amazing thing and if something goes wrong, no one judges them for it. Everyone tries to help to get it working and to me that just sounds absolutely amazing, it’s missing from the world I think. The community of Drupal, if that was applied to everything, then it would be such a better place." - Tawny Bartlett, Indigo Herbs

Mentioned during the conversation
  • Indigo Herbs, according to Michael "Indigo Herbs is a manufacturer of natural health products. We make beautiful things that will make your life better. Come and check out www.indigo-herbs.co.uk and discover the natural lifestyle that we offer."
  • Drupal Somerset
  • Paragraphs module
  • Heath Robinson, according to Wikipedia, "William Heath Robinson (31 May 1872 – 13 September 1944) was an English cartoonist and illustrator best known for drawings of ridiculously complicated machines for achieving simple objectives."
Conversation video

In the Indigo Herbs Common Room ... full transcription starts here.

jam: We established that everybody – that the whole couch is fair game, right?

Tawny Bartlett: Yes.

Michael Hanby: Yes, it does seem to be.

jam: It feels like a lovely Saturday morning and this place really, really feels like a university common room to me. It really – nice cinder block walls, a comfy couch and a warm cup of the brown stuff. It is really, really comfortable. So, please introduce yourself.

Tawny Bartlett: To the camera?

jam: Hello, camera.

Tawny Bartlett: Hello, camera. My name is Tawny Bartlett. I am the Website Coordinator at Indigo Herbs. I do a lot of coding. I do HTML, CSS, PHP, Git, LESS and various other things. I have a growing love of technology and in all honesty I want to be a super hero in technology one day, that is my goal. I want to be an amazing Drupal developer, that is why I’ve made the decision for my life is that I want to be an amazing Drupal developer and I want to – I just want to be an expert and I want to help everyone else. I want to help people that used to be me three years ago to the Drupal.

jam: My impression, having met you before, is that you’re already well down the road to being a Drupal super hero, so thank you.

Tawny Bartlett: Got to be better.

Michael Hanby: I am Michael Hanby and I’m a director at Indigo Herbs, and tech is one of responsibilities. I’ve loved Drupal work long before Indigo Herbs and I’m very lucky because Tawny is on my team.

jam: So I am in Somerset in the southwest of the U.K. and had the wonderful opportunity to reconnect with a bunch of Drupal friends this week for the Drupal Somerset Christmas Meet-Up. I think we ...

Michael Hanby: It was our Christmas do, really.

jam: Right. We had a lovely pub meal and everything and I got to talking with Michael and Tawny about what they do. We met for the first time I guess at Drupal Camp Bristol 2015.

Michael Hanby: That’s right.

How Michael got his start with Drupal

jam: You caught my attention because how you run your business and how your business came about really fascinated me, and there’s this – in your case especially, there’s this chicken-and-egg situation about Drupal and business, right? You were already interested in Drupal before this business came around.

Michael Hanby: Before this business, yes.

jam: So how did you discover Drupal?

Michael Hanby: I discovered Drupal after I’ve been away travelling. I did the corporate thing for a bit, I went away travelling. When I came back we wanted to do – a friend and I wanted to do a website for an idea that we’ve been playing with whilst we were travelling. We have this thing Antiquarian Society, we’ve been looking – we’re into archeo-astronomy, looking for ancient alignments and watching the sun come up and set and all that sort of stuff.

jam: Can I just point out here that you’re from Glastonbury?

Michael Hanby: Well, I wasn’t born in Glastonbury but I do now live in Glastonbury and that’s alright.

jam: This is a very Glastonbury conversation we’re having.

Michael Hanby: This is normal in Glastonbury. It’s probably a bit strange in other parts of the Internet but...

jam: I had to say it ...

Michael Hanby: It’s a slightly niche subject which the Internet’s brilliant for of course, and we wanted a website anyway. I’d done a bit of HTML and I’d got into graphic design, and the guy that I was mucking about with this idea with was like, “Oh, what about Drupal? I’ve heard that Drupal’s quite cool.” This is back in the days of Drupal 5, so we have some web hosting and we have one of those one-click installs for various different packages, and I one-clicked Drupal and started playing with it. That was Drupal 5 and it was quite cool, it was relatively intuitive. I could change the way it looked by playing with the CSS and I could build what I wanted to build with it, and it was great.

jam: I hear that from very few people that, “Oh! Open up Drupal, it’s totally intuitive and I just got straight to work.” What was your background?

Michael Hanby: Well, I had come from a pretty tech background. I was never a developer but I’d been a business analyst and I’d managed tech teams. I was familiar with tech and tech processes, how data works and stuff like that so I guess it was easier – I think if you were a complete newbie, that would be the case more so then than now but back then it was really like, “Oh, there’s a really steep learning curve with Drupal.” I don’t know, I hacked it I guess. It was fine. Also, the other thing that was really cool about it was that it’s really easy to find out. If you don’t know the answer, it’s really easy to find out the answer. Someone’s probably asked the question somewhere and that was the case back in the days of Drupal 5 and now, it’s still the case but it’s way, way more advanced.

jam: Right. So community documentation is pretty good simply because there’s a very large mass of us doing this. Back in Drupal 5 days, there were thousands of our friends that you could ask easily for the answer and now, frankly, there are tens of thousands of people.

Michael Hanby: Exactly.

jam: So why did you stick with Drupal? You must be using for eight, nine years at this point.

Michael Hanby: Well, at some point after that I started working with Indigo Herbs and it was just Steve in his shed in the garden, and it was that kind of business at the time. Almost straight away - because I'd built a community type thing already on Drupal - almost straight away I was thinking I could see how this business could use that community-type platform to create a community, to generate brand awareness and all sorts of different things, and provide a useful function to be totally honest with you. I could see potential applications and we weren't on Drupal and I was itching to move something on to Drupal and start to use Drupal to do some of that stuff, and that’s what happened eventually.

jam: So you were just hooked. There was no question that there was going to be anything else?

Michael Hanby: I did play with WordPress for a bit and our first blog was actually a WordPress, and that was cool because I actually learned – some of my first bits of PHP actually are on WordPress and that gave me enough to get going on some Drupal.

jam: So in a bit, I want to get back to this business and the tie-in between doing good, ethics, community and all of these things that I think are a really good fit between Drupal and what you do. How did you find out about Drupal?

Tawny met Drupal on the job

Tawny Bartlett: Well, I found out Drupal through Indigo Herbs and the weird thing about me working in Indigo Herbs is I actually applied for a dispatch position.

jam: Which would be?

Tawny Bartlett: Just sending orders out.

jam: Taping up boxes?

Tawny Bartlett: Taping up packages and sending them out to customers and I actually said in my interview, “Oh, well if you ever want help for your website, I’d be interested in learning.”

jam: You knew some ... ?

Tawny Bartlett: HTML.

jam: Already.

Tawny Bartlett: So when I was little, I used to make little HTML websites and stuff just for some fun. Back when you had font tags. So that was quite fun. So then yes, I basically said that I could help with the website so when I first started we had a wholesale website on Drupal, so that’s our main distributing to shops and stuff, that’s our wholesale site. My first job was just basically data entry. And basically as it grew, I used to ... We use Git to version control Drupal and I used to have to ask Michael to put modules on Drupal for me because I didn’t know Git. So basically, over time I had to learn more and more because Michael wouldn’t be in some days. I’d be putting a module on Drupal so I just learned Git. I learned Drupal, I learned modules. And like Michael said, the community is just amazing. If you get stuck, there's pretty much an answer for it already and if there isn’t an answer for it, you can just ask a question and someone will answer already. So yes, I just fell in love with Drupal, it’s the best CMS in my opinion. It’s so flexible.

jam: Your leaning strategy was completely pragmatic, whatever you need to do to get your job done as soon as you hit a block then you learn a new thing and you learn new thing.

Tawny Bartlett: Yes, that’s basically what happened. Basically, that’s happened really extremely in Indigo. Firstly it’s Drupal front end stuff, moving blocks around the themes and stuff, then obviously I went to Git – I had to learn Git because we did version control, so I have to do that without Michael. Then CSS, I learned CSS.

jam: Right, and all the site builder stuff.

Tawny Bartlett: All the site – yes, all the site builder stuff but I find it quite easy ...

jam: Well, we’ve put years of effort into trying to make the user interface useful so ...

Tawny Bartlett: Yes, exactly. Views and stuff are just phenomenal, in comparison to any other CMS it’s just so easy to use and literally you can do anything on the front end but as our needs kept getting bigger and bigger, I learned View templates, I learned node templates, I learned – I had to learn PHP to start doing templates. So yes, it’s CSS, PHP then we went and did a custom framework so I learned LESS. So basically over the three years I’ve worked at Indigo, I’ve just learned so many different languages, obviously started to learn Javascript and stuff ... But yes, that is the case, we hit a wall and then we got over it. I’ve actually written a few modules in Drupal as well for Indigo.

jam: Right. When we first met, my strong impression of you was that you’re pretty hardcore tech now.

Tawny Bartlett: Yes, well, I’d like to think so anyway.

jam: What’s your job title, if that matters?

Tawny Bartlett: I’m actually Website Coordinator.

jam: Website Coordinator, which could be almost anything but that’s ...

Michael Hanby: It could be almost anything.

jam: Right. Fantastic. What’s your favorite thing about Drupal?

Tawny Bartlett: I think it’s the fact that literally you can say, “Can I do this to Drupal?” and the answer is pretty much always going to be yes. You can do anything in Drupal, there are no walls, you can just do anything you want and the fact that it’s just so flexible and - to me it’s just so easy, there’s no restrictions. You can just do whatever you want and if I can say two things, the community is amazing.

What how is Drupal community for newbies?

jam: So talk about showing up with relatively little experience and having a lot of questions. How was that experience, going out to events and meeting Drupal people?

Tawny Bartlett: It’s been fantastic, just in terms of the forums and stuff. Obviously, if a module is not working the way want it to be, you’ll find someone’s patched it already and they’re not going to commit it to the newest version but you can just patch it. Then, I’ve asked questions and people have provided patches to me and stuff, so people have been super helpful and they fixed things where I’ve been pulling my hair out and people just fixed it. Just out of the goodness of their hearts, and everyone’s just doing it for the passion of Drupal. Then, when I went to Drupal events, my first time at Drupal Somerset, Stefan helped us with the – we couldn’t get maps we’re working on Drupal, we just couldn’t figure out how to do it and he just instantly showed us how to do it and ever since then we’ve been using maps. The last Drupal Somerset that we had, Chris showed us how to use Paragraphs ...

jam: Which is amazing.

Tawny Bartlett: ...which is absolutely fantastic.

Michael Hanby: We’ve implemented that almost straight away. Partly by luck, we happened to have something on that just fitted perfectly.

jam: You had a use case ready for that.

Michael Hanby: Yes. The case is ready, she just took it away from the little meet-up and...

jam: The day after the meet-up.

Tawny Bartlett: Right.

Michael Hanby: Exactly that.

jam: I love that Drupal community’s completely opene arms approach to new people and to anyone who’s willing to ask respectfully and listen - mentoring, teaching, endless hours of volunteering. There’s a lot of enlightened self-interest in it in that, “Well, hey if I patch something that’s broken for you well then it’s not broken for me either anymore.” But somehow, there’s an incredibly positive energy around this that I find to some degree in the broader PHP communities, but not to the extent somehow. It’s a very happy place.

About Indigo Herbs

jam: We’re at Indigo Herbs in Glastonbury, just so that people not from around here know, pretty much the center of all “hippiedom” in Europe, frankly ...

Michael Hanby: Well, Glastonbury has been a center of pilgrimage probably before history. There’s an abbey here, the monks were really big here. They’ve got that ecclesiastic in the sort of ...

jam: It’s in the part of the country where there’s Stonehenge and there’s the lay lines, and there’s this special hill with the magic path to walk around in Salisbury. It’s not too far away so ...

Michael Hanby: It’s not so far away, no.

jam: Anyway, so it’s a really appropriate place to have herbs, natural remedies nutrition kind of a business.

Michael Hanby: It is. I like to think that the monks were doing it hundreds and hundreds of years ago, exactly the same thing. We’re a bit like that.

jam: I like to think that all the beers that they brewed was also medicinal.

Michael Hanby: Of course.

jam: So I’m holding this package of Ashwagandha powder and I happen to know that – not this very package, but this hundred grams of this stuff is pretty much why we’re sitting here today. How did Indigo Herbs get started?

Michael Hanby: Well, this is an interesting part of – this is I suppose to seed of Indigo herb. So the story is that many years ago, Steve wanted some Ashwagandha powder and he went to find some on the Internet and he couldn’t buy a hundred grams, he could only buy five kilos.

jam: So Steve just wanted a little bit.

Michael Hanby: He wants a bit for himself and he could only buy a lot more than that, so he bought a lot more than that, took what he wanted, and put the rest on eBay.

jam: He packed that up in small packages?

Michael Hanby: I guess, yes. I think that was his lightbulb moment of, "Ooh! Hold on, this is a big one."

jam: There’s a value-add here in delivering manageable quantities. When was that and when did you become part of this?

Michael Hanby: That was about 12 years ago. Nobody did anything like this on the Internet really back then, and then I became part of it probably about two or three years in – Steve needed some graphic design work done and I got involved doing the graphic design work and did a bit more, did a lot of web work, we had to move a lot of stuff around on the website and I thought, “This looks like quite an interesting business.” I’ve got a background – before I left and went travelling, I did an MBA and I’ve got a background in business so I was like, “This is interesting, there’s a nice business idea here and I could see how we could develop this.” It grew from that.

jam: You don’t have a storefront. Has it always been an online business?

Michael Hanby: It’s always been an online business.

jam: What sort of technologies were you using to – I guess you do B2B and B2C ...

Michael Hanby: Well, it’s mainly B2C.

jam: What sort of – how are you online?

Michael Hanby: Back in those days, we used a piece of software called Actinic which is basically a Microsoft Access database with a Windows front end you create your pages and what have you, and then you press a button and it FTP’s it all up server as static HTML with a bit of Perl to do the shopping cart, basically.

jam: Which frankly, in 2015, you’re coming full circle and that doesn’t sound super different to Sculpin or Jekyl, right?

Michael Hanby: Right.

jam: Which are the hip, cool static site generators are great now. So static site generators - totally cool, except that you cannot ...

Michael Hanby: Well, that you can’t really have a lot of rich functionality. Forget user-generated content.

jam: So was that like, “Oh, I want this stuff. Here’s the place where you have to fax your order,” sort of ... ?

Michael Hanby: Well now, it did have a Perl ... It wasn’t quite as bad as that. There was a shopping cart function which was written in Perl and you could download the orders every day, so there was a bit of functionality but it wasn’t very dynamic, it wasn’t very rich.

Tawny Bartlett: Main downfall was that we had to use it for one computer.

Michael Hanby: That’s right. It sat on one computer.

jam: Oh, because that was where the database was.

Michael Hanby: So you couldn’t have somebody over there processing the orders and somebody else over here writing content. This was impossible.

jam: Wow. Okay. So content 10 to 12, orders 12 to 2 ...

Indigo goes Drupal

Michael Hanby: Something like that, yes. It was obviously not going to happen. And I'd used Drupal for really interesting community-base things, and a lot of people that are into Indigo Herbs are practitioners of some sort of natural healing profession and I could see the potential for a community.

jam: Community-minded people anyway, people interested in making a difference, making the world a better place, spreading the message about whatever they do, right?

Michael Hanby: Yes. Actually, it’s a bit more prosaic in that in the final analysis with Indigo because we provide lots of fantastic natural health products. What we don’t provide is advice or medical diagnosis or anything like that. We sell herbs, super foods and great products but we’re not health carers and a lot of customers would come to us saying, “Look, I’ve got this problem. Can you help what shall I do?” We just can’t help.

jam: You probably also don’t want that liability.

Michael Hanby: Well, exactly. We’re not qualified to do it quite frankly, but plenty of people are so that was the idea behind our practitioners’ directory. We’ve got and Internet presence. Lots of people come to it looking for help that we can’t give but there are a load of people who can give it so it seems obvious to create a place where they can create a profile, put themselves on our website and then they can then provide a service that our customers might come to us to look for but which we can’t provide.

jam: So was that the seed of the community site idea and that was the gateway drug to Drupal?

Michael Hanby: It wasn’t actually, no, because prior to that we knew that we wanted to move it a bit more into wholesale and not just do B2C. So we built a Drupal eCommerce site, that was the first bit of Drupal really. We built a Drupal eCommerce site and migrated our blog from WordPress onto Drupal, it seemed obvious not to have too many platforms running at the same time.

jam: You’d think it’s obvious, right? We run into so many--we being all of us who with any clients of any size--run into shops that use five or 20 or 30 different technologies.

Michael Hanby: Well, from the business perspective, the driver for doing is that often the quickest way to get what you want in the moment is just to stick the other bit on, but the danger is you end up with this Heath Robinson of a system and it doesn’t always hold together. There are other benefits of having everything on one platform because you will think--this is my experience--you will think of ideas for doing things that you won’t think of now but you’ll think of them down the road. It’s easier to implement if everything’s all in one place and that’s one of the other great things about Drupal because you can do so much with it, you can make everything in one place and there’s so much benefit to that.

jam: I was telling you the other night that he speaks in perfect sound bites. You’ve just proven me right again. Thank you, thank you. I just have to wind him up and let him go.

Michael Hanby: You do!

jam: So how long have you been with Indigo now?

Tawny Bartlett: Three years in March.

jam: Was the company already on Drupal 7 at that point?

Tawny Bartlett: Yes.

Michael Hanby: Yes, it probably was.

Tawny Bartlett: Our original wholesale site was on Drupal 7. So we have the wholesale site and then we created the practitioners’ directory, which was the map thing. We’ve created maps so they can put their practitioner locations on the map. Then brought the blog over from WordPress, basically we’ve got massive natural health guides being on our Drupal site – Drupal is the content side of our site. We do actually have a multiplatform site. As I mentioned before we got a Magento-Drupal website and so we got two platforms and they ...

jam: That’s a common integration though. Magento does a lot of eCommerce stuff really, really well clearly and it’s PHP ...

Using Drupal for everything

Tawny Bartlett: Basically, over time we just literally started using Drupal for everything, anything you think of a business that we can use Drupal for, we’ll use it. Drupal is actually producing the packaging but not all of it, that’s a lot but basically Drupal produces the content so all of that content on that label is out of Drupal.

jam: So is it a web-to-print setup or is this a content type?

Michael Hanby: Well, we print the labels so that bags are pre-printed. We print the labels.

jam: Oh, I see. Okay. Right.

Tawny Bartlett: Basically, our stock system, our production staff produce jobs to print out labels of products and produce products, and it speaks to Drupal and these are content types which have fields for the title, the Latin name, the bullet points, the organic, the class...

jam: Oh, fantastic. So you really have the platonic ideal of a canonical central content repository for all of your content and anything that changes in one place, it will – if there’s a different regulatory need here, if there’s a whatever, you change it one place and it’s got on your labels, it’s on your site, it’s on your - everywhere in the same thing.

Michael Hanby: Yes, it’s all in Drupal.

Tawny Bartlett: The most exciting thing is – the part of thing I’m most proud of really is that nutritional data tables that should come out of Drupal as well and so with the label data as well, basically at the moment we got nutritional tables on our website. That comes out of Drupal that goes put into Magento, so we then decided to manipulate those tables to work on our labels. So those tables are manipulated from Drupal to working on labels so that people can exclude certain rows from these so that will fit, so the highs and lows you put them in the right place. So basically, that’s one center for all of our nutritional data and it gets put everywhere.

jam: This list is actually a View ... sorted?

Tawny Bartlett: It’s actually the - I think it’s a Table Field module but there’s extra columns to help sort out which bits are bold, help sort out – you’ve got schema on the website as well.

jam: Fantastic. RDFa, schema.org.

Tawny Bartlett: Schema.org, yes. So we’ve got a really good nutritional data schema coming out of our website as well.

jam: Fantastic. You get all of this power to be just as searchable, findable, useable as anyone in the world and you can download it for free.

Michael Hanby: That’s right.

Tawny Bartlett: Yes. It’s just that, “What?!”

jam: The empowerment story of what we do is so incredible today.

Michael Hanby: It really is. In fact, here’s another sound bite for you. If you are a small business and you want to develop a tech competency, I don’t know why you’ll do anything but Drupal because apart from the fact that it’s free, you’ve got this huge community that’s not just willing to give you the answers but wants to help you. What I think is one of the most awesome things about open source is that by asking a question, you are contributing to the project. It’s so cool. Just by asking the question that no one’s asked, you are contributing to the documentation that’s going to help someone else, it’s such a virtuous cycle.

jam: Yes. I haven’t done it in a little while but one of the ways that I like to start the keynote presentations that I do sometimes, especially if they’re open source side of things: "Who’s contributed to open source?" and you get in any given conference room, you get 20-50% of hands go [up]. No! "How many of you have contributed patches or pull request to your open source project?" Those hands stay up and I say, “Okay. How many of you have filed a bug report? How many of you have answered a forum question or been on IRC to help someone?” More and more hands go up and it’s like, “Okay. How many of you have been to an open source event? You’re all in this room, put your hands up. Thank you for contributing.” Every time we exchange information, every time we do anything like this it’s become much, much more than just developers trading code snippets and I really, really like that.

Michael Hanby: That’s right. Even if you’re just contributing use cases, that’s actually valuable.

Doing well and doing good - the idealism connection

jam: So you as a business are concerned with ethics in general. I know that you’re a living wage employer obviously involved in various nutritional, organic, doing things the right way ...

Michael Hanby: Yes. A lot of our products are organic. They’re not all organic, that’s not possible in some products.

jam: I know that you’re looking into Fair Trade certification.

Michael Hanby: We’re looking into Fair Trade certification. We are sponsors of the Veganuary which is a social movement to go vegan in January which Tawny has now pledged to do.

jam: It’s so great you volunteered for that. Big step, big step.

Michael Hanby: We’re about lifestyle and thing with health and nutrition is it’s not like you take a pill now and you sorted for life. It’s about lifestyle, it’s about how you live your life, it’s a long-term something.

jam: There’s this cartoonist called Scott Adams, he does the Dilbert cartoons. I’m reading one of his books right now and he talks about the importance of thinking in systems rather than in goals. If you do as systematic approach to something, even if you’re failing along the way it’s going to get you to where you need to go. So it’s not "I need to lose five pounds," it’s "I need to eat better everyday," kind of thing.

Michael Hanby: Exactly that. Exactly. By getting into some of our products, by getting into it, it starts to shift your thinking about how you’re eating. It makes you take responsibility for what you’re doing and that’s the key because that will have a long-term effect.

jam: So you have this business that is really involved in a lot of ethical activities and a lot of idealism. How do you see the connection between Drupal and open source technologies which are also very idealistic and your day job?

Tawny Bartlett: In terms of ethical ... ?

jam: In terms of the community, in terms of helping people, in terms of making a difference.

Tawny Bartlett: I’ve spent years juggling what I’ve wanted to do. I spent years being confused about what I wanted to do, literally just so confused going back and forth. I want to do this degree, not doing this degree, but Drupal has really taken my heart. It’s slightly corny but it’s just I’ve literally settled. I’ve just love Drupal. It’s amazing how people give and take for free, it’s amazing that when I first started posting on forums I used to say, “I’m really sorry if I sound like a n00b here.” I just always apologize because I was such a newbie to Drupal and I always thought people would be like, “That’s very silly of you. You’re so new, why are you posting on here?” But everyone is so accepting and everyone’s so willing to teach people and help people grow within the community. I’m just learning more and more about how many people contribute to Drupal 8 and I remember watching a video about all the comments and stuff about how – it was just absolutely amazing that everyone does this and most people do it for the passion, for the passion in Drupal. It stands out from the crowd, it’s just a fascinating thing that everyone loves technology and everyone does it because they want to make this amazing thing and if something goes wrong, no one judges them for it. Everyone tries to help to get it working and to me that just sounds absolutely amazing, it’s missing from the world I think. The community of Drupal, if that was applied to everything, then it would be such a better place.

jam: It makes for a nice place to work I think.

Tawny Bartlett: Yes, it’s fantastic. If I get stuck, I know there’s a community out there and I have Drupal developers that are my friends and stuff, I know that they will generally help because they’re passionate and they want to help. Everyone sees the challenge in Drupal and everyone wants to fix it, no one is greedy and no one keeps the code to themselves which is really strange. In terms of other CMSs, they charge for extensions--everyone wants to give and it’s just--to me, I find it really hard to get that in my head that people will just give these great ideas for free.

jam: In that instance, we’re lucky that Drupal is licensed under the GPL because it makes a lot of classic business models really, really hard to do but it makes it really easy to share so we found other ways to use it.

And it makes business sense

jam: Listen, I want to ask you two things to wrap up. As someone concerned about ethical activity and idealism, how do you see Drupal and open source - let me ask that in a better way. How do you see Drupal and open source in terms of the ethics and ideals that you bring to your business?

Michael Hanby: Well, the thing with Drupal and open source is we get more out of our combined efforts if we share, it’s as simple as that. Things are better if we share because then we’re all contributing and we all benefit from it, and that’s really clear in Drupal. If you compare it to other platforms that don’t have such an open sharing community, there are less solutions. Things don’t work as well, there’s less documentation, it’s more difficult to get help and that’s just really. Having worked now with a couple of different platforms, that’s really clear. Like I said before, if you want to build tech competency and you’re a small business, we’ve gone from not knowing a lot to knowing quite a bit, having a quite clever, complex and effective infrastructure and having a really content rich website with all different types of content that interact with each other that we built specifically for ourselves. We could never have achieved any of that without Drupal community, we couldn’t have done it. We could have achieved some of that, we couldn’t have achieved all of it, not on our budget. We’re a small company, we’ve grown it ourselves and Drupal’s made that possible.

jam: So as a hard-nosed MBA businessperson, paying the rent for you and your employees, talk about Drupal.

Michael Hanby: I just think that none of our USP comes from the way that the PHP is written, we’re not going to sell more stuff because logging in to our back end is different to the way everyone else logs in, there’s just no point in reinventing all of that sort of stuff. We can focus on the little bits that really make the difference and everything else there is not so – it’s still really important but it’s like a hygiene factor. That’s cool, that’s already there, why reinvent it? There’s no point and that’s what Drupal offers.

jam: So terrific commodity functionality, flexibility. I think from a business perspective as well, risk mitigation.

Michael Hanby: Totally. We do have applications for other use cases that we’ve not written on Drupal and you can only get onto them if you’re on the IP whitelist because we can’t write the sort of security that you just get out the box with Drupal. It’s things like that, it’s having that framework there which means that you can just focus on the bit that’s important to you. That’s the thing, you don’t have to do all the other stuff because it’s already done.

jam: Fantastic. Last question for the day, Michael. Give us a shameless plug for Indigo Herbs.

Michael Hanby: Indigo Herbs is a manufacturer of natural health products. We make beautiful things that will make your life better. Come and check out www.indigo-herbs.co.uk and discover the natural lifestyle that we offer.

jam: For those of us who speak – I’m not even sure why but I would have said "www.indigo minus herbs.co.uk" but I’m not sure why that is.

Michael Hanby: Well, there is the hyphen/underscore ambiguity.

jam: Right. Okay. Anyway, great people making...

Michael Hanby: Maybe it’s a European thing.

jam: It could be. Great people making great products and also doing really, really interesting things with Drupal. If you have any questions about all the cool Drupal stuff that we’ve touched on in this podcast, I’m absolutely certain that they will be very happy to talk with you. If you want to meet a cool user group, come down the Somerset in the U.K. as well. It’s a good, good bunch of people.

Michael Hanby: Drupal Somerset. Third Thursday of the month in here, in this very room.

jam: Oh, now I know where to come, actually.

Michael Hanby: You know where to come.

jam: The last meet-up I went to was in a pub. Hey, thanks so much for taking the time to chat with me today. Alright.

Michael Hanby: You’re welcome. Thanks for having us. Thank you very much. It’s great. It’s really exciting and it’s a pleasure, an absolute pleasure.

Skill Level: BeginnerIntermediateAdvanced
Categories: Elsewhere

Mediacurrent: Dropcast: Episode 24: Did you miss us?

Planet Drupal - Fri, 07/10/2016 - 16:25

Recorded September 29th, 2016

This episode we are back from our hiatus. We don’t have a guest and we don’t have a Ryan, but we have each other and you fine listeners. We talk a lot about the news we missed while we were out and also preview the talks that Bob and Mario are giving at BADCamp in October.

Categories: Elsewhere

Acquia Developer Center Blog: Add Persistent Storage to Your Docker Containers with REX-Ray and AWS EFS

Planet Drupal - Fri, 07/10/2016 - 15:48

Containers are a new virtualization technology with many advantages over traditional approaches like virtual machines. At Acquia, we use containers across our different teams for a variety of purposes. Some container-related projects that have really worked out well. We'd like to share them with the rest of the world.

Tags: acquia drupal planet
Categories: Elsewhere

Zivtech: Which CMS is More Secure: Drupal or WordPress?

Planet Drupal - Fri, 07/10/2016 - 15:38
A recent report from Sucuri found that the vast majority of hacked websites are hosted on the WordPress CMS (content management system). Nearly 16,000 sites have been hacked in 2016. According to the report, “the three CMS platforms most being affected are WordPress, Joomla! and Magento.” But, the findings go on to say that these platforms are no more or less secure than Drupal, even though Drupal doesn’t even make the list.

That’s because security has more to do with humans than code. “In most instances, the compromises analyzed had little, if anything, to do with the core of the CMS application itself, but more with improper deployment, configuration, and overall maintenance by the webmasters and their hosts,” explains Sucuri.
The Password is...
The ways that people get hacked are, for the most part, straightforward. The worst offender is a bad password. The best passwords can’t be guessed and are a mix of letters, numbers and characters. But people's memory being what it is, most passwords are easy to remember, and as a result, easy to hack. Even if a user has a secure password, he might repeat it on a number of sites. As soon as one site loses its data security, hackers will gain entry all over the web with that one frequently used password.

Another common problem is passwords that are shared across an organization, but remain unchanged when an employee leaves. If the former staffer was fired, or has had a negative experience with the company, there’s a chance that the password will fall into enemy hands.

A site that stores valuable user information (such as credit cards or personal data) is especially at risk. While the employee herself may not pose a security threat, a bad actor such as a relative or neighbor could gain access to credentials and wreak havoc.

Give permissions only to trusted users, and have protocols in place for removing access for ex-employees. It’s a good idea to set up password constraints (must contain certain characters). Some companies set up automatic expiration, in which employees are required to reset their passwords every 60 days, but this is a debated idea. Many argue that forcing password changes is not a great plan since change is hard on the memory, so people tend to use easier passwords when forced to switch frequently. If a password is good, then changing it only mitigates issues but doesn’t completely eliminate them. Plugins, Modules and Hosts
The code underlying WordPress gets a lot of attention and is often fixed so vulnerabilities are more often in plugins. The Slider Revolution (AKA RevSlider) and GravityForms plugins have provided opportunities for hackers to get into a site and facilitate the installation of malware on visitors’ computers. While fixes for these gaps have been put in place, there will always be another vulnerability around the corner. It’s a game of cat and mouse.

Then there are other ways to hack into an account that have nothing to do with the CMS. Was the site’s host account hacked? Historically, it’s been too easy to call a provider’s customer service, provide the bare minimum to the customer service rep, and get into the backend of the site. That’s not technical, and there’s no need to be a skilled hacker. Fortunately, service providers are getting smarter about these schemes. Drupal vs. Wordpress?
Drupal’s security relies upon a strong, coordinated effort. In general, Drupal is more secure overall, with a dedicated security team that operates using a series of protocols and a chain of responsibility for handling issues. As a Drupal shop, Zivtech receives weekly emails with alerts about security updates. Your CMS may do the same. Be sure to check.

Drupal is built upon rigorous coding standards, with tools to ensure that strict security practices are followed. The entire system is designed to make sure that all code that accesses the database is sanitized.
Best Practices for Drupal Security
There are ways that you can audit your site to check that you are being cautious. Drupal has specific protocols, such as ensuring that the files on the file system are safe and set up properly and that an outside system can’t connect to the database.

Certain modules should never be turned on, like the PHP module. The PHP module enables an outsider to hack into your site if you’re not extremely careful. There are a number of security updates incorporated into the latest version, Drupal 8, including the removal of the PHP filter.

First, make sure you have an SSL certificate. You can get them for free at Let’s Encrypt.

Next, if you’ve already taken all the standard steps to secure your site but still want to go a little further, you can also delete all readme text files that come with your CMS. This will reduce the surface area for an attack. By default, the readme files are accessible by anyone who visits your site. This could be a problem if an issue was discovered in a specific version of Drupal or a Drupal module. You can imagine that if there was a hack against Drupal version 7.10, hackers would scan sites for the 7.10 CHANGELOG.txt file to create a list of targets. Reduce that risk by deleting those files, or make them impossible to read over the internet.

Fending off security attacks is like playing hide and seek with frequently shifting rules. The developers behind the most popular CMS platforms work tirelessly to keep up. The primary reason that WordPress sites are attacked more frequently is actually all about the numbers. It's the most popular CMS, and therefore the most vulnerable.
Categories: Elsewhere


Subscribe to jfhovinne aggregator - Elsewhere