Portfolio | Contact

My D6 module usage stats

I'm reviewing my modules to determine each of their popularity for #D7CX. I also use this window before a major release to decide if any of my modules should just shrivel up and blow away into the dust of history.

The following table is the list of modules where I am the node author, or lead maintainer simpler terms.

Project Users
node privacy byrole 2373
Similar Entries 1889
Countdown 1015
Atom 712
URL List 473
Troll 344
User Read-Only 268
Field Actions 223
Jammer 199
Session Limit 141
Anti Existing Field 77
Workflow Named Transitions 74
.mobi loader 69
.mobi 53
Workflow Private Comments 49
Log Search 41
Bookmarks with login reminders 31
Randomizer 9
State Reference 5
Advogato Import 0

Project Users
Masquerade 2924
DB Maintenance 2892
SaveGuard 1866
Submit Again 723
Redirect 403 to User Login 445
Inactive User 393
Login Security 308
Password policy 295
Frameprevention 111
Google Pagerank 87
Arooga 29

Submitted by deekayen on Fri, 08/21/2009 - 11:13pm

deekayen's blog

Draft: How to create a pifr 6.x-2 client

I moved the maintenance of this to http://qa.drupal.org/node/44. This is only here anymore to point you over there.

As root, execute the following on commandline for a fresh install of Debian 5.0 Lenny. You can copy/paste most right to your terminal except in cases where you might get prompted for input (i.e. apt-get install, mysqladmin, vi, crontab).

Known bug: the php5-suhosin deb module for PHP will cause ~31 failures and ~11 exceptions.
Known bug: all three opcode caching extensions APC, eAccelerator, and xcache have a history of instability with PIFR clients.

Server configuration

apt-get update
apt-get upgrade
apt-get install build-essential mysql-server-5.0 apache2 apache2-threaded-dev php5 php5-cgi php5-cli php5-gd php5-common php-pear php5-curl php5-mysql cvs curl php5-dev libapache2-mod-php5 gawk patch htop rsync cron wget
apt-get purge mailx exim4 exim4-base exim4-config exim4-daemon-light postfix
a2enmod rewrite
a2enmod expires
perl -pi -e 's/(\s+AllowOverride)\s+None$/\1 All/g' /etc/apache2/sites-available/default
perl -pi -e 's/(\s+CustomLog \/var\/log\/apache2\/access\.log combined)$/#\1/g' /etc/apache2/sites-available/default
perl -pi -e 's/(memory_limit =)\s+\d+M(.*?)$/\1 384M\2/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(short_open_tag =)\s+On$/\1 Off/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(expose_php =)\s+On$/\1 Off/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(mysql\.allow_persistent =)\s+On$/\1 Off/g' /etc/php5/apache2/php.ini
perl -pi -e 's/(memory_limit =)\s+\d+M(.*?)$/\1 384M\2/g' /etc/php5/cli/php.ini
perl -pi -e 's/(short_open_tag =)\s+On$/\1 Off/g' /etc/php5/cli/php.ini
perl -pi -e 's/(expose_php =)\s+On$/\1 Off/g' /etc/php5/cli/php.ini
perl -pi -e 's/(mysql\.allow_persistent =)\s+On$/\1 Off/g' /etc/php5/cli/php.ini
perl -pi -e 's/#(skip-innodb)$/\1/g' /etc/mysql/my.cnf
/etc/init.d/apache2 force-reload
mysqladmin -u root -p create drupal
mysqladmin -u root -p create drupal_checkout
crontab -e

*/5 * * * * /usr/bin/wget -O - -q -t 1 http://localhost/cron.php

Drupal PIFR installation

cd /var/www
rm index.html
cvs -z6 -d :pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-6-14 drupal
cd drupal
mv * ..
mv .htaccess ..
cd ..
rmdir drupal
cd sites/all
mkdir modules
cd modules
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-6--1 -d cvs_deploy contributions/modules/cvs_deploy
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d project_issue_file_review contributions/modules/project_issue_file_review
cd ../../default
cp default.settings.php settings.php
vi settings.php

$db_url = array();
$db_url['default'] = 'mysqli://username:password@localhost/drupal';
$db_url['pifr_checkout'] = 'mysqli://username:password@localhost/drupal_checkout';

mkdir files
chmod 777 files
cd ../..
ln -s ./sites/default/files/checkout .

The symbolic link will be broken because PIFR should create the checkout directory on its own during the testing process.

Using a RAM disk

Backup then either replace /etc/init.d/mysql with the attached version or use the patch to run the MySQL databases and checkout directory from RAM in tmpfs. Make sure the result init.d mysql script is still chmod 755. As of November 13, 2009, it takes about 71MB of space in /var/lib/mysql to run a basic test of Drupal 7 core, so keep that in mind if you change the tmpfs allocations provided in the setup patches.

Then execute the following so you can keep your Drupal configuration as long as you do clean starts and stops of MySQL.

mkdir /var/lib/.mysql
chown -R mysql:mysql /var/lib/.mysql
mkdir /var/www/sites/default/.files
touch /var/www/sites/default/.files/remove_me_later.txt
chown -R www-data:www-data /var/www/sites/default/.files
/etc/init.d/mysql stop
cd /var/lib/.mysql
rm ib*
cd /var/lib/mysql
rm -r *
cd /var/lib
/etc/init.d/mysql start
rm /var/www/sites/default/.files/remove_me_later.txt

Wrap-up

Reboot.

Interface configuration

  1. Get an account on the master server or have someone add your client test server and provide you an API key.
  2. If you create the account yourself on the master server, in your master server account, at user/#/pifr, add a client of type Test on the master and copy the key to the client at admin/pifr/configuration.
  3. On the client, enable CVS Deploy, PIFR, and PIFR Client modules.
  4. At admin/pifr/configuration on the client, add the API key and master server URL. The other client defaults are OK. For maximum performance, set concurrency to at least the number of CPU cores available for testing on the server. If unsure, check the output of htop, which was installed as part of the recommended deb packages.
  5. Make sure all the command line tools have output at admin/pifr/client on the client.
  6. Toggle the state on the client so it is enabled at admin/pifr.
  7. On the master server at user/#/pifr or admin/pifr/server, enable the client in the operations field.

The next cron on the client should start a self test. If the self test succeeds, it will start testing patches from the project server. The client will list the number of test assertions it has completed for a test at admin/pifr. Note the client will run a complete cycle of patch testing twice before becoming enabled for project patch testing. The first it to make sure the client correctly catches an intentional breakage of the checkout. The second is to make sure a clean checkout has no failures or exceptions.

Debugging

mysqladmin -u root -p drop drupal_checkout
mysqladmin -u root -p create drupal_checkout
rm -r /var/www/sites/default/files/checkout

I occasionally got "When requesting next test, server responded: Invalid server" errors on my client when I did have the right API key, so I altered the client xmlrpc file to include some extra debugging calls to watchdog. After many long tests, I realized my server was going beyond the default 45 minute limit set on the server to timeout a runaway test. I increased it to 200 and finally passed. If your client exceeds 20 minutes per test, it is probably undesirable as a production testing server.

Make sure your php.ini files for cli and apache have the following set, otherwise the client might have fatal errors that prevent it from completing all the tests.

display_errors = On
log_errors = Off
;error_log = syslog

Try mysqlreport from hackmysql.com for diagnosing speed issues with MySQL.

cd ~
wget hackmysql.com/scripts/mysqlreport
chmod +x mysqlreport
./mysqlreport --user=root --password=password

Submitted by deekayen on Fri, 06/26/2009 - 12:31am

deekayen's blog | 2 attachments

New D7 feature: logged module changes

When I saw NancyDru's idea to log who installs and uninstalls a module, I had a "duh!" moment. This to me was like one of those things that should have been done 5 major releases ago. If only I had been smart enough to think of it myself back then, I wouldn't have had to write tests for it :) So naturally, now it is going to be part of Drupal 7.

Submitted by deekayen on Tue, 05/12/2009 - 9:30pm

deekayen's blog | 1 attachment

Updated Drupal 7 node editing form

The new Drupal 7 node editing form has changed the former fieldset formatting for displaying authoring, publishing, revision, and menu settings form fields.

I created a slideshow of the new interface over at Flickr.

Submitted by deekayen on Fri, 05/08/2009 - 5:01pm

deekayen's blog | 4 attachments

Macbook Pro 3,1 Jaunty setup

Setup the mactel-support package source. In System > Administration > Software Sources, on the Third-Party Software tab, add:

deb http://ppa.launchpad.net/mactel-support/ubuntu jaunty main

Then download the software:

sudo apt-get update && sudo apt-get install install xserver-xorg-input-synaptics bcm5974-dkms applesmc-dkms mbp-nvidia-bl-dkms isight-firmware-tools

Install the kernel modules:

sudo modprobe mbp_nvidia_bl
sudo modprobe appletouch
sudo modprobe applesmc
sudo modprobe bcm5974

Then make sure the modules get loaded again after a reboot with a sudo gedit /etc/modules

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

loop
lp
rtc
mbp_nvidia_bl
applesmc
appletouch
bcm5974

Make the mouse go faster and turn on two finger click to right click:

sudo apt-get remove mouseemu
sudo gedit /etc/hal/fdi/policy/appletouch.fdi

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>

    <match key="info.capabilities" contains="input.touchpad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SHMConfig" type="string">1</merge>

        <merge key="input.x11_options.TopEdge" type="string">0</merge>
        <merge key="input.x11_options.LeftEdge" type="string">0</merge>
        <merge key="input.x11_options.RightEdge" type="string">1100</merge>
        <merge key="input.x11_options.BottomEdge" type="string">800</merge>

        <merge key="input.x11_options.FingerLow" type="string">15</merge>
        <merge key="input.x11_options.FingerHigh" type="string">25</merge>
        <merge key="input.x11_options.TapButton1" type="string">0</merge>
        <merge key="input.x11_options.TapButton2" type="string">0</merge>
        <merge key="input.x11_options.TapButton3" type="string">0</merge>
        <merge key="input.x11_options.ClickFinger1" type="string">1</merge>
        <merge key="input.x11_options.ClickFinger2" type="string">3</merge>
        <merge key="input.x11_options.ClickFinger3" type="string">2</merge>
        <merge key="input.x11_options.VertEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.HorizEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>

        <merge key="input.x11_options.MinSpeed" type="string">0.5</merge>
        <merge key="input.x11_options.MaxSpeed" type="string">2.0</merge>
        <merge key="input.x11_options.AccelFactor" type="string">0.15</merge>
        <merge key="input.x11_options.VertScrollDelta" type="string">20</merge>
    </match>
  </device>
</deviceinfo>

Reload the appletouch kernel module to activate the new touchpad settings:

sudo modprobe -r appletouch && sudo modprobe appletouch

Get an updated version of the wifi kernel module for the Atheros AR5008 to improve the problems with a weak signal on the default install: sudo apt-get install linux-backports-modules-jaunty

Make the laptop sleep when the lid is shut in System > Preferences > Power Management.

If you didn't already get the window open on you, System > Administration > Hardware Drivers will help you enable the proprietary Nvidia drivers. Version 180 seems to work for me so far.

Setup Medibuntu.

Switch the boot screen theme from Ubuntu to Xubuntu: sudo apt-get install startupmanager

Helpful doc on setting up Eclipse PDT.

Submitted by deekayen on Sat, 04/25/2009 - 11:32pm

deekayen's blog
Syndicate content

recreation