May 09

dev-db/sqlite-3.6.14 fails to merge

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --libdir=/usr/lib64 --disable-debug --enable-threadsafe --enable-cross-thread-connections --disable-tcl
configure: error: configure script is out of date:
configure $PACKAGE_VERSION = 3.6.13
top level VERSION file     = 3.6.14
please regen with autoconf

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-db/sqlite-3.6.14/work/sqlite-3.6.14/config.log
*
* ERROR: dev-db/sqlite-3.6.14 failed.
* Call stack:
*               ebuild.sh, line   49:  Called src_compile
*             environment, line 2810:  Called econf '--disable-debug' '--enable-threadsafe' '--enable-cross-thread-connections' '--disable-tcl'
*               ebuild.sh, line  534:  Called die
* The specific snippet of code:
*               die "econf failed"
*  The die message:
*   econf failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/dev-db/sqlite-3.6.14/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-db/sqlite-3.6.14/temp/environment'.
*

>>> Failed to emerge dev-db/sqlite-3.6.14, Log file:
To solve this, we simply do what is suggested, we regen conig with autoconf. To do that we unpack the sources and run the build-process manually:

ebuild /usr/portage/dev-db/sqlite/sqlite-3.6.14.ebuild unpack
cd /var/tmp/portage/dev-db/sqlite-3.6.14/work/sqlite-3.6.14
autoconf

after that we need to finish of the emerge process:

ebuild /usr/portage/dev-db/sqlite/sqlite-3.6.14.ebuild compile
ebuild /usr/portage/dev-db/sqlite/sqlite-3.6.14.ebuild install
ebuild /usr/portage/dev-db/sqlite/sqlite-3.6.14.ebuild qmerge

(I've omitted the output of the commands here...)

After that we're ready to go and can continue updating world ;)
The bug at bugs.gentoo.org: 269075

Share

Apr 05

RSS reader in Ruby which posts to wordpress

I wanted a possibility to automatically create a list of updated photoblogs on pacnews. A bit of search revealed that it should be fairly easy to write something in ruby for that. So I settled for the newest implementation of a RSS-Parser library for ruby: Feedzirra by Paul Dix which can be found over at github.

I created a sqlite database with the following schema (place it in db/schemal.sql):

CREATE TABLE feeds (
id INTEGER PRIMARY KEY NOT NULL,
url VARCHAR(255) DEFAULT NULL,
last_title VARCHAR(255) DEFAULT NULL
);

the database file can be created with the following command:

sqlite db/feeds.db < db/schema.sql

In this database I save a hash of the photoblog's url and a hash of the last post title. In that way I can check if a blog has been updated or added to the list with fairly decent speed (I hope).

A simple text file called feeds within the same directory contains the line separated feedurls.
The program simply checks every feed url it finds in the feeds list for a new post title. New feeds are saved to the Hash new_feeds, feeds with new posts are saved to the Hash updated_feeds.
After the updating a simple unordered list is created out of the new and updated feeds. This list is posted to my wordpress blog via the xml-rpc interface. You might have to enable that in your admin interface under settings->writing.

Now I just put the script the crontable to update regularly. The very first post created by this script can be found here.

The script:
(direct download the rendering seems to be a bit screwed ;) )

 
require 'rubygems'
require 'feedzirra'
require 'sqlite'
require 'atom/entry'
require 'atom/collection'
require "xmlrpc/client"
 
db = SQLite::Database.new( 'db/feeds.db', 0644 )
new_feeds=Hash.new
updated_feeds=Hash.new
 
file=File.open("feeds")
while (line=file.gets)
# fetching a single feed
if line.size>0
if 404!=(feed = Feedzirra::Feed.fetch_and_parse(line)) && feed!=0
puts "updating  "+line
puts feed
last_title = db.get_first_value("select last_title from feeds where url='"
       +feed.url.hash.to_s+"';")
if last_title
  if last_title!=feed.entries.first.title.hash.to_s
   updated_feeds[feed.url]=feed.title
   stmt = db.prepare("update feeds set last_title='"
           +feed.entries.first.title.hash.to_s+"' where  url='"+feed.url.hash.to_s+"';")
   stmt.execute
  end
else
  new_feeds[feed.url]=feed.title
  stmt = db.prepare("insert into feeds (url,last_title) values ('"
            +feed.url.hash.to_s+"','"+feed.entries.first.title.hash.to_s+"');")
  stmt.execute
end
end
end
end
file.close
 
content = ""
if updated_feeds.size>0
  content = "
 
Updated blogs:
<ul>"
  updated_feeds.each do |url, title|
  content+="
<li><a href="+url+">"+title+"</a></li>
 
"
  end
content+="</ul>
 
"
end
if new_feeds.size>0
  content+= "
 
Newly added blogs:
<ul>"
new_feeds.each do |url, title|
  content+="
<li><a href="+url+">"+title+"</a></li>
 
"
end
content+="</ul>
 
"
end
 
if content.size!=0
username = "the_user_name"
password = "a_very_secret_password"  
 
begin
server = XMLRPC::Client.new( "www.urlofyourblog.de", "/xmlrpc.php")
 
newPost = Hash.new
 
newPost['title']="Blog updates"
newPost['description'] = content
newPost['category']= "Blogs"
result = server.call("metaWeblog.newPost",1,username,password,newPost,true)
rescue XMLRPC::FaultException => e
	puts "XMLRPC Error: "
	puts e.faultCode
	puts e.faultString
rescue StandardError => e
	puts e.to_s
end
end
 
Share

Dec 19

Trappywiki

I've now set up a little open wiki to collect some spam data. I need to test some algorithms to detect spam I implemented for my semantic wiki project. So feel free to spam at http://www.marrias-rvr.de ;)

Share

Dec 10

Fedora 10 – Review

So, I recently have installed Fedora 10 on my home computer. Since there are really some quirks that keep on annoying like hell, I'm trying to summarize whats working and what's not:
Pros:

  • My eclipse and my projects all seem to work with the icedtea VM, a bit surprising, but welcome
  • The kde version in the repository comes with a working digikam 0.10.0 nice thing for my photography management. The plugins even work with the 0.10.0 version in this packaging
  • I kinda stumbled upon Rhythmbox, seem nice enoug to be usable. I had tried that ages ago, where it was quite bad. And with the many bugs amarok still has in its new version it is viable alternative for me.

Cons:

  • The licensing issues of Fedora are quite annoying. It takes some work to even get mp3 played. Some more to get dvd-playing and Nvidia hardware acceleration. Major annoyance!! Why not let the user decide which licenses he is willing to accept?
  • Pulseaudio: I honestly do like the basic idea behind it, but it truly still needs some work. Audio has random lags everywhere. Music from rythmbox, amarok, totem, mplayer .... anything. Videos with mplayer lag. After beeing paused once, mplayer doesn't continue to play a movie and can't even play a video without lags. And surely my machinespeed (3.8Ghz+, 4G ram) is not to blame for those errors

Those are just the major annoyance points. And I didn't even give the testing version a try. That was the normal desktop distribution which is supposed to be working and stable (!) .. I think I'm going back to gentoo, at least there I can watch videos without lags. (Not that this is the first time I gave another distribution a try...)

Share