Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    drush pm-update fails: tar hangs when extracting *.tar.gz module archives from drupal.org

    25th August 2014

    Drush is awesome, especially for updating multisite Drupal installations.
    I had only started using it a few days ago, and I’ve immediately hit a problem, to which I did find a workaround.

    Symptoms

    • running drush @sites pm-update results in normal execution up to after answering ‘y[es]‘; then drush seems to hang indefinitely (haven’t waited beyond about 10 minutes, maybe it does produce an error after a long while);
    • running the same command with --debug shows that drush hangs when trying to untar the downloaded module.tar.gz archive; there are no errors/warnings, it just hangs with no CPU usage;
    • trying to untar any of the modules downloaded from drupal.org manually is also unsuccessful: tar -xzvf module.tar.gz seems to do nothing, it also hangs with zero CPU usage/time and no warnings/errors;
    • interestingly, if I create some test.tar.gz locally, tar does happily extract that;
    • finally, running strace tar -xzvf module.tar.gz shows a number of unexpected lines, such as references to NSS and libnss files (I am only showing some of the lines of strace output, including the last line):

      open(“/etc/nsswitch.conf”, O_RDONLY) = 4
      read(4, “# /etc/nsswitch.conf\n#\n# Example”…, 4096) = 683
      open(“/lib/x86_64-linux-gnu/libnss_nis.so.2″, O_RDONLY) = 4
      open(“/lib/x86_64-linux-gnu/libnss_files.so.2″, O_RDONLY) = 4
      open(“/etc/passwd”, O_RDONLY|O_CLOEXEC) = 4
      open(“/usr/lib/x86_64-linux-gnu/libnss_mysql.so.2″, O_RDONLY) = 4
      open(“/etc/group”, O_RDONLY|O_CLOEXEC) = 4
      open(“/etc/libnss-mysql.cfg”, O_RDONLY) = -1 EACCES (Permission denied)
      open(“/etc/libnss-mysql-root.cfg”, O_RDONLY) = -1 EACCES (Permission denied)
      futex(0x7fd0816e8c48, FUTEX_WAIT_PRIVATE, 2, NULL

    Read the rest of this entry »

    Share

    Posted in *nix, Drupal, Notepad, Software | No Comments »

    Fresh install of Debian Etch 4.0r1 hangs/freezes dead after boot: solution

    24th October 2007

    Recently, I installed Debian Etch 4.0r1 onto my laptop. However, after the first boot into plain console, computer was dead-frozen after some console usage. I rebooted using the Power button – this time to gdm; and again, after some keyboard input system was hanging dead.

    I found the reason at debianhelp.org forums. Basically, it’s the PC speaker module (pcspr) not functioning correctly. I suspect this problem manifests itself only on some types of laptops. The solution is either to somehow reconfigure the pcspkr module, or just disable it. More on how to disable the module below.
    Read the rest of this entry »

    Share

    Posted in *nix, Links | 1 Comment »

    Gallery2 AdSense: no module?

    1st October 2006

    If you ever need to add AdSense units to your Gallery2 installation, and find no module for this – try following the text below. I compiled it from several sources (primary menalto.com Gallery2 forum), and did everything written here myself here.

    Primary source of information was this post, but I recommend that you follow instructions here.

    To add AdSense to your Gallery2 sidebar (when using the Matrix theme as a sample): Read the rest of this entry »

    Share

    Posted in CMS, Programming, Web | 3 Comments »

    PHP-Nuke 6.0/6.5 to Drupal 4.7.x/5.x migration (conversion)

    8th September 2006

    Post last updated: April 18, 2010.

    Now there is a Drupal 6.x module available. It is in no way related to the migrate script(s) below.

    The newest script version migrates from PHP-Nuke 6.5 to Drupal 5.x.
    Download the latest version of the migration script.

    In 2002 I set up a PHPNuke-6.0 – based portal. Eventually it died due to the lack of time investments and support from collaborators. Now, when time came to revive the project, I made a search and decided to use Drupal as a base CMS for the portal.
    In order to migrate userbase from an old portal to the new Drupal-powered one, and following the topic at drupal.org, I found a script and its modification.
    I used it to migrate only users, and made some cosmetic changes:

    • added options for custom phpnuke table prefixes
    • default user name is now = uname (login), not ‘temp_name’, as before
    • I replaced hard-coded links to ‘migrate.php’ with links to $_SERVER['PHP_SELF'], so that if you rename the script you don’t have any problems with that :)
    • now forum topics should not be promoted to the main page (changed 1 to 0 as hinted by Alexis)

    Finally, I would like to thank both Karthik Kumar for the original script and Alexis Bellido for the 6.0_to_4.7 modification.
    Read the rest of this entry »

    Share

    Posted in CMS, Drupal, how-to, PHP, Programming, Web | 77 Comments »