2010-07-24

RedisCookbook 日本語訳を(やっと) github に公開しました。

放置されていた RedisCookbook ですが、
先日ひょんなこと(node.js)から触った cygwin 使ったら
うまく リモートサーバに push できたのでご報告。


----
■cygwin に git セットアップ
  • openssh
  • git
設定
git config --global user.name "jasagiri"
git config --global user.email "jasagirixxx at gmail dot com"
git config --global color.ui "auto"

設定確認
git config --global --list


■SSH設定

鍵作成
ssh-keygen -t dsa


 注): ssh-keygen -b 2048 -t rsa -f ~/.ssh/github_rsa だと、「Permission denied (publickey)」と怒られて push できない。
参照):http://help.github.com/troubleshooting-ssh/

パスフレーズ入れる



クリップボードにコピー
cat ~/.ssh/id_dsa.pub | putclip

鍵の保管場所を変更しておく。

github サイトで公開鍵を登録 (最後の改行注意)


■ フォーク
 http://github.com/rediscookbook/rediscookbook からさっくりフォーク

■修正

修正元取得
git clone xxx@xxxx:jasagiri/rediscookbook.translation.git

ごにょごにょ変更

変更点をローカルリポジトリに知らせる
git add .

変更点をローカルリポジトリに登録する

git commit -m 'japanese translation: fixed changeset 04abfa6 (2010/07/01)'

変更点をリモートリポジトリに登録する

git push origin master
Enter passphrase for key 'key path and name': <sshのパスフレーズ>

公開されているか確認
http://github.com/jasagiri/rediscookbook.translation



■メモ
  • フォーク元に迷惑かからないようにできているのか不安。
  • upstream とか基本的なことがわかってないw
  • submodule 化したほうが良かったかもと今更ながら
  • en-US分を翻訳元として追随使用と思うとどうフォークするのが正解?

2010-07-19

Node.js を試してみる

御贔屓の RedisDB のページで気になってた Node.js  を試してみる。
(結論としては、Redis 使うところまで届かず、コンパイルで時間切れという残念な結果。次回期待)


やったこと(残念な流れ):
  1. cygwin ダウンロードする。
  2. cygwin インストールする。
    1. python gcc/c gcc/c++ make を追加で選択
  3. 本家参考にソースをダウンロード/展開する。
  4. cygwin/bash で ./configure 

      => いろいろ not found と出る。

5. libssl-dev 入れると幸せ(via:tricknotes)という情報を入手。
6. cygwin のパッケージ眺めてもそれっぽいのが無いので Devel\openssl-devel を入れてみる。
7. 何個かは not found が消えたがまだコンパイル通らない。(情報と not found の数も合わない)
8. cygwin 用フルパッケージを配っているヒト(via: DTrejo)がいたので拝借。
9. cygwin/bin 配下から現環境とくらべて新しそうなの(や無いの)を持ってくる。(何者なのかは調べてない)

  • cygintl-1
  • cygintl-2
  • cygpcre
  • cygrensvr
  • cygssp
  • cygwap
  • ln.exe
  • nano.exe
10. 3.で展開した最新ソースで ./configure。
11. not found がまだ出るが気にせず、make と make install。

=> 通った!

12. make test

=> module オブジェクトに GuessArchitecture アトリビュートが無いと怒られる。
同じヒトがいた。python のバージョンかもらしい。 (via: vwxyz)

13.  サンプルのチャットアプリ(via: ry)を試す。

=> node server.js
http://127.0.0.1:8001/ にブラウザでアクセス。 => 動いた。

RedisDBまでいかなかった orz。


以下 ./configure と make test のメモ
----
$ ./configure
Checking for program g++ or c++          : /usr/bin/g
Checking for program cpp                 : /usr/bin/c
Checking for program ar                  : /usr/bin/a
Checking for program ranlib              : /usr/bin/r
Checking for g++                         : ok
Checking for program gcc or cc           : /usr/bin/g
Checking for gcc                         : ok
Checking for library dl                  : yes
Checking for library execinfo            : not found
Checking for openssl                     : not found
Checking for function SSL_library_init   : yes
Checking for header openssl/crypto.h     : yes
Checking for library rt                  : yes
--- libeio ---
Checking for library pthread             : yes
Checking for function pthread_create     : yes
Checking for function pthread_atfork     : yes
Checking for futimes(2)                  : yes
Checking for readahead(2)                : no
Checking for fdatasync(2)                : yes
Checking for pread(2) and pwrite(2)      : yes
Checking for sendfile(2)                 : no
Checking for sync_file_range(2)          : no
--- libev ---
Checking for header sys/inotify.h        : not found
Checking for header sys/epoll.h          : not found
Checking for header port.h               : not found
Checking for header poll.h               : yes
Checking for function poll               : yes
Checking for header sys/event.h          : not found
Checking for header sys/queue.h          : yes
Checking for function kqueue             : not found
Checking for header sys/select.h         : yes
Checking for function select             : yes
Checking for header sys/eventfd.h        : not found
Checking for SYS_clock_gettime           : no
Checking for library rt                  : yes
Checking for function clock_gettime      : yes
Checking for function nanosleep          : yes
Checking for function ceil               : yes
Checking for fdatasync(2) with c++       : yes
'configure' finished successfully (53.469s)

----

$ make test
Waf: Entering directory `/cygdrive/d/user/bin/node/build'
DEST_OS: cygwin
DEST_CPU: x86
Parallel Jobs: 2
Waf: Leaving directory `/cygdrive/d/user/bin/node/build'
'build' finished successfully (0.516s)
python tools/test.py --mode=release simple message
Traceback (most recent call last):
  File "tools/test.py", line 1066, in
    ARCH_GUESS = utils.GuessArchitecture()
AttributeError: 'module' object has no attribute 'GuessArchitecture'
make: *** [test] Error 1
----