It’s all in a day’s work

If only a day had 48 hours…
  • rss
  • Home
  • About DelGurth
  • About Wilco

Broken Wordpress: debian unstable is called unstable for a reason

DelGurth | Sunday, September 7, 2008

Update: The maintainer of the wordpress package released “my” bugfix. It’s available now for those using unstable (sid). I guess it will be available in testing (lenny) soon, since the bug is listed in the release critical bugs list. To bad he credited me with the name Del Gurt, but well… The only thing I did was finding the missing methods in Wordpress 2.6. But it’s my first fix in Debian, yeh.

I just ran an apt-get update + apt-get upgrade and after that my Wordpress homepage was broken when I’m logged in, it gives a nice "Fatal error: Call to undefined function admin_url() in /usr/share/wordpress/wp-includes/link-template.php on line 470". And so is it for all people using the debian unstable package for Wordpress, for example this guy.

I quickly searched what functions where missing and created a patch and submitted it to the related debian bug. I hope they will accept it soon, but well. My Wordpress works fine again now.

Creating a patch took me a while, since I never created a patch for a debian package before. Lucky me, there are tutorials on how to create patches for debian packages, so I just had to read up on that. I read about how to submit the patch in the tutorial on how to help squashing Release-Critial bugs.

And I had to read up on dpatch, because the other patches on Wordpress where created using that. Lucky me, someone has created a nice short tutorial on how to use dpatch already. Dpatch seems like a good way to keep your patches separated from the original code, so when the original code is updated, you can determine easily if that conflicts with your patches or not.

And then I had to create a GPG key to sign my patch. Since dpkg-buildpackage complains about it otherwise.

So in the end, what I had to do to patch my Wordpress and submit the patch (besides generating the GPG key):

Install the required tools
sudo apt-get install build-essential devscripts lintian linda diff patch patchutils dpatch
Get the Wordpress package source
apt-get source wordpress
Enter the root directory of the extracted source
cd wordpress-2.5.1
Let the package know I’m making the changes
dch -i
Start the dpatch process
dpatch-edit-patch 009CVE2008-3747.addendum
Make the changes
Exit dpatch process
exit
The wordpress patches are all called .patch so rename it
mv debian/patches/009CVE2008-3747.addendum.dpatch debian/patches/009CVE2008-3747.addendum.patch
Change the e-mail address in the patch
EDIT debian/patches/009CVE2008-3747.addendum.patch
Add the patch to the list of patches
echo "009CVE2008-3747.addendum.patch" >> debian/patches/00list
Test the patch
fakeroot debian/rules binary && sudo dpkg -i ../wordpress_2.5.1-6.1_all.deb
Build the source package
dpkg-buildpackage -kMYKEY -rfakeroot
Create the patch
interdiff -z ../wordpress_2.5.1-6.diff.gz ../wordpress_2.5.1-6.1.diff.gz > ../bug_497524.patch
Email the bugs list with the patch
Email bug control to inform them that a patch has been made for the bug

That was it. Not that hard, if you know the commands + procedure. Now wait and see what the package maintainer is going to do with the patch I created.

Update: seems I forgot to check the edit link itself after the fatal error was gone… It didn’t work anymore. Fixed that as well now.

Update2: for those who find my post and do not want to wait on the maintainer to release the patch, I’ve “released” it. The MD5 of wordpress_2.5.1-6.1_all.deb is: dc46d35743122d933def7db431c8f49e.

Categories
Debian, Packages
Tags
bug, debian unstable, dpatch, patch, Wordpress
Comments rss
Comments rss
Trackback
Trackback

« Eclipse Subversive SVN+SSH and Putty Agent (pageant) Posting in the future… »

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">


Categories

  • Debian (7)
  • Debian/Ubuntu (7)
  • Dell D830 (2)
  • Development (1)
  • E65 (1)
  • Eclipse (4)
  • Etch (3)
  • Feisty (2)
  • General (6)
  • Hardy (3)
  • Internet Explorer (1)
  • Java (1)
  • JSP (1)
  • JSTL (1)
  • Lenny (1)
  • Misc (5)
  • Nokia (1)
  • one-liners (2)
  • Optimizing performance (1)
  • Packages (4)
  • Phones (2)
  • PHP (3)
  • Postfix (1)
  • Shell Scripting (1)
  • SQL Injection (1)
  • SVN (3)
  • Testing (3)
  • Ubuntu (9)
  • Ubuntu x86_64 (2)
  • VOIP (1)
  • Wordpress (7)

Friend blogs

  • AgileMore
  • Borselaer.org
  • Gerbrand on ICT
  • Schapendonk.org

Sites I like

  • Joel on Software
  • The Tom Kyte Blog
  • Windows Keyboard Shortcut of the Day

Archives

  • March 2009 (1)
  • February 2009 (1)
  • January 2009 (2)
  • December 2008 (1)
  • November 2008 (1)
  • October 2008 (4)
  • September 2008 (1)
  • August 2008 (6)
  • May 2008 (4)
  • April 2008 (1)
  • March 2008 (1)
  • February 2008 (2)
  • December 2007 (1)
  • November 2007 (3)
  • October 2007 (2)
  • September 2007 (3)
  • August 2007 (1)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox