Groesbeek, view of the 'National Liberation Museum 1944-1945' in Groesbeek. © Ton Kersten
Fork me on GitHub
Archive for January 2013

Installing Pandoc

2013-01-26 (132) by Ton Kersten, tagged as linux, pandoc

John Macfarlane released a new version of Pandoc that has a lot of new enhancements. A lot of things have changed in the Markdown input types and it’s now compatible with PHP Markdown. This is very nice, because a lot of implementations use the extensions defined by PHP Markdown.

I downloaded the dmg file to install it on my MacBook Pro and it works like a charm.

So, I decided to install it on my new CentOS 6 server to build documents there. Well, I was in for a nice surprise.

After cloning the source from github I started as documented in the INSTALL file

make prep

and now I get

Resolving dependencies...
cabal: cannot configure directory- It requires old-time ==1.0.*
For the dependency on old-time ==1.0.* there are these packages:
old-time-, old-time-, old-time-, old-time-,
old-time-, old-time- and old-time-
However none of them are available.
old-time- was excluded because pandoc- requires old-time ==1.1.*
old-time- was excluded because pandoc- requires old-time ==1.1.*


I kept tweaking the makefile and tried almost everything possible, but I was caught in a cyclic dependency loop. So, time to rethink and use Google.

I had already figured out it had to do with a cabal and ghc version that are to old, so it’s time to update.

I found newer Cabal versions at JustHub.

I started removing every RPM with haskel or ghc in the name and removed ~/.cabal and ~/.ghc directories to start of fresh. Then:

sudo rpm -Uhv
export PATH=/usr/hs/bin:~/.cabal/bin:$PATH
cabal install cabal-dev
cd ~/pandoc
make prep

Now it compiles but it breaks with:

make install
cabal-0.14.0: Error: some packages failed to install:
pandoc- failed during the tests phase. The exception was:
ExitFailure 1
cabal --config-file=/home/tonk/qq/pandoc/cabal-dev/cabal.config:
/usr/hs/tools/cabal-0.14.0 failure (return code=1)
make: *** [install] Error 1

Some tests fail, but I just removed --enable-tests from the Makefile and I got a working executable. Simply copy it to the ~/.cabal/bin directory, install the man-page and everything is fine.

I think it should be simpler, but for now I’m a happy camper.

rsync on a not standard port

2013-01-21 (131) by Ton Kersten, tagged as linux, sysadm

Today a colleague asked me to sync some files to a server that is not listening on SSH port 22.

I normally create a configuration entry in my ~/.ssh/config file, like

Host tosync
    Port 1234
    User syncuser

and then command

rsync -va --progress --inplace . tosync:

But this time I didn't want to create the entry in my SSH configuration, because I need this trick in a script. So I started to read the rsync manpage and after some experimenting I found

rsync -va --progress --inplace --rsh='ssh -p1234' .

This syncs the current directory to host on port 1234 as user syncuser.