uscan for GitHub as of January 2013

You should write “watch line” in debian/watch if upstream is hosted on GitHub as of January 2013.

version=3
https://github.com/<user>/<project>/tags .*/v(\d[\d\.]+)\.tar\.gz

It was missing “v” in Debian Wiki, so I have fixed up.

Comparison OpenBlockS A6 and OpenBlockS AX3

I rented OpenBlockS A6 and OpenBlockS AX3 from Plat’Home Co., Ltd.(Thanks!) last early summer. I will write blog post about A6 and AX3 several times. I wrote blog post about comparison of A6 and AX3 at this entry.

../../../_images/obsa6_ax3_0.jpg

Opening ceremony of OpenBlockS A6 and AX3

ES version of A6

OpenBlockS A6 I rented the first was ES(engineering sample) version. It was exchanged to the product version on the way. The difference of both on the appearance was screws of body. The diameter of the screw hole of product version is smaller than ES version. The storage installed of ES version was ADATA’s 2.5 inch SSD 396 30GB, that of product version was HalfSlim SSD 16GB MLC.

../../../_images/obsa6_ax3_1.jpg

Left is OpenBlockS AX3, right is OpenBlockS A3 (ES version)

../../../_images/obsa6_ax3_2.jpg

Bottom view

../../../_images/obsa6_ax3_3.jpg

Another angle

Comaprison v.s. OpenBlockS 600

I compare their bodies against OpenBlockS 600. OpenBlockS A3 is slightly larger than OpenBlockS 600.

../../../_images/obsa6_ax3_4.jpg

Side view of OpenBlockS 600, OpenBlockS A3, OpenBlockS AX3

../../../_images/obsa6_ax3_5.jpg

Bird view of OpenBlockS 600, OpenBlockS A3, OpenBlockS AX3

Filesystem

I was formatted storage because The storage of ES version was not formatted. It is the same that case I bought OpenBlockS AX3 J. The storatge of product version was already mounted with UnionFS. It was the same that case I had rented OpenBlockS AX3.

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/ram0 124M 92M 27M 78% /
udev 10M 88K 10M 1% /dev
tmpfs 64M 4.0K 64M 1% /dev/shm
/dev/sda1 14G 618M 13G 5% /.rw
unionfs 14G 618M 13G 5% /etc
unionfs 14G 618M 13G 5% /bin
unionfs 14G 618M 13G 5% /home
unionfs 14G 618M 13G 5% /lib
unionfs 14G 618M 13G 5% /sbin
unionfs 14G 618M 13G 5% /usr
unionfs 14G 618M 13G 5% /var
unionfs 14G 618M 13G 5% /root
unionfs 14G 618M 13G 5% /opt
unionfs 14G 618M 13G 5% /srv
unionfs 14G 618M 13G 5% /media

It is /etc/mtab as folloing.

$ cat /etc/mtab
/dev/ram0 / ext2 rw 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,size=64m 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/sda1 /.rw ext4 rw,relatime,barrier=1,data=ordered 0 0
unionfs /etc unionfs rw,relatime,dirs=/.rw/etc=rw:/etc=ro 0 0
unionfs /bin unionfs rw,relatime,dirs=/.rw/bin=rw:/bin=ro 0 0
unionfs /home unionfs rw,relatime,dirs=/.rw/home=rw:/home=ro 0 0
unionfs /lib unionfs rw,relatime,dirs=/.rw/lib=rw:/lib=ro 0 0
unionfs /sbin unionfs rw,relatime,dirs=/.rw/sbin=rw:/sbin=ro 0 0
unionfs /usr unionfs rw,relatime,dirs=/.rw/usr=rw:/usr=ro 0 0
unionfs /var unionfs rw,relatime,dirs=/.rw/var=rw:/var=ro 0 0
unionfs /root unionfs rw,relatime,dirs=/.rw/root=rw:/root=ro 0 0
unionfs /opt unionfs rw,relatime,dirs=/.rw/opt=rw:/opt=ro 0 0
unionfs /srv unionfs rw,relatime,dirs=/.rw/srv=rw:/srv=ro 0 0
unionfs /media unionfs rw,relatime,dirs=/.rw/media=rw:/media=ro 0 0

This UnionFS is controlled by “/etc/init.d/openblocks-setup” and “/etc/default/openblocks”. This init script also controls hardware specific to OpenBlockS. Other are the same as a normal Debian system.

OpenBlockS 600

OpenBlockS 600 with CF boot is invisible the storage device.

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 507M     0  507M   0% /lib/init/rw
udev                   10M   48K   10M   1% /dev
tmpfs                 507M     0  507M   0% /dev/shm
rootfs                7.4G  869M  6.2G  13% /

“/etc/mtab” is as following.

$ cat /etc/mtab
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
rootfs / rootfs rw 0 0

I think OpenBlockS A series are easier to manage than OpenBlockS 600, because storage device of A series is visible.

Rewrite history with git-filter-branch

I rewrote the history of Git repository that I developped a software when I would upload the software to GitHub. The history of repository has my some different COMMITER & AUTHOR NAME and EMAIL, and configurations for testing environments. So I wanted to change NAME and EMAIL to one is used for publish, and wanted to change to sample configurations.

My repository has two branches as master, devel, and has some tags. I took mainly three step .

  1. Change the NAME and MAIL

  2. Rewrite commit messeages and contents

  3. re-tags

$ git remote
origin
$ git remote rm origin

Change the NAME and MAIL

Filtering with “git filter-branch –commit-filter” and execute ‘git commit-tree “$@”’, a new commit tree is generated. Original tree is taken a backup to “original/refs/heads”.

$ git filter-branch --commit-filter  '
GIT_AUTHOR_NAME="Kouhei Maeda";
GIT_AUTHOR_EMAIL=mkouhei@palmtb.net;
GIT_COMMITTER_NAME="Kouhei Maeda";
GIT_COMMITTER_EMAIL=mkouhei@palmtb.net;
git commit-tree "$@"
' -- --all
Rewrite 97d9b7d1899f7e6b08d91f5e606c8521f907b01c (43/43)
Ref 'refs/heads/devel' was rewritten
Ref 'refs/heads/master' was rewritten
Ref 'refs/tags/v0.1' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.
Ref 'refs/tags/v0.1.1' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.
Ref 'refs/tags/v0.1.2' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.

It is easy to understand with “gitk –all”.

Rewrite commit messages and contents

Rewrite commit messages

Use “–msg-filter” option to rewrite Sigined-off-by of commit message.

$ git filter-branch -f --msg-filter '
sed -e "s/\(Signed-off-by: \).*/\1Kouhei Maeda <mkouhei@palmtb.net>/g"
' -- --all
Rewrite 13cfa3ac719e507168822783822fa2480018a5ec (82/82)
Ref 'refs/heads/devel' was rewritten
Ref 'refs/heads/master' was rewritten
Ref 'refs/tags/v0.1' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.
Ref 'refs/tags/v0.1.1' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.
Ref 'refs/tags/v0.1.2' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.

Rewrite contents with “–tree-filter”

If you specify target files with postfix as ‘find ./ -name “*.py”’, you must specify files that are always present. Because you will fail if you specify a file that does not exist on any commit. You must specify multiple postfixt with “-o” options as following.

$ git filter-branch -f --tree-filter '
find ./ -name "*.py" -o -name "*.rst" -o -name "*.html" -o -name "*.1"| xargs sed -i "
s/mkouhei@workstation.example.com/mkouhei@palmtb.net/g
s/Kohei Maeda/Kouhei Maeda/g
s/http:\/\/scm.example.com/https:\/\/github.com\/mkouhei/g
s/Kohei Maeda <mkouhei@workstation>/Kouhei Maeda <mkouhei@palmtb.net>/g
s/mkouhei/testuser/g
s/test.example.com/ldap.example.org/g
s/dc=example,dc=com/dc=example,dc=org/g
"' -- --all
Rewrite 05db18486e3285bb6178d8da0c8952e63542ec80 (82/82)
Ref 'refs/heads/devel' was rewritten
Ref 'refs/heads/master' was rewritten
Ref 'refs/tags/v0.1' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.
Ref 'refs/tags/v0.1.1' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.
Ref 'refs/tags/v0.1.2' was rewritten
WARNING: You said to rewrite tagged commits, but not the corresponding tag.
WARNING: Perhaps use '--tag-name-filter cat' to rewrite the tag.

re-tags

I used a signed tag, so replace the same name tag with “-f” option. Firstly I confirmed date of original tag.

$ git show v0.1
tag v0.1
Tagger: Kouhei Maeda <mkouhei@palmtb.net>
Date:   Wed Dec 19 01:42:35 2012 +0900

release 0.1
(snip)

commit 795897ff28cea6512c457de02a1d6043236c685b
Merge: c4bc5bf a90fa12
Author: Kouhei Maeda <mkouhei@palmtb.net>
Date:   Wed Dec 19 01:39:02 2012 +0900

Merge branch 'devel'

Confirm commit hash of the same commit in a new tree.

$ git log --oneline :/Merge branch 'devel'
(snip)
1f1a023 Merge branch 'devel'
7e2682a closed #19 packaging Debian package
89a35fe Fix fail to execute console script

Replace tag.

$ GIT_COMMITER_DATE="2012-12-19 01:42:35+0900" git tag -f -s -m "release 0.1" -u 7E37CE41 v0.1 1f1a023

次のユーザーの秘密鍵のロックを解除するには
パスフレーズがいります:“Kouhei Maeda <mkouhei@palmtb.net>”
4096ビットRSA鍵, ID 7E37CE41作成日付は2009-06-19

Updated tag 'v0.1' (was 83cb501)

Repeat as many as numbers of tags. You should confirm commit messages and contents before you will push new remote repository.

See also

Open multiple channels on pidgin

This is a short story.

pidgin is a chat GUI client. I usually use it for office only IRC, public IRC, and Skype. I open multiple channels with canma at the same server.

For example is following.

Input “#python,#haskell,#couchdb,#couchdeb-dev” for “irc.freenode.org”.

../../../_images/pidgin.png

Debian package of Tinkerer 1.0.2

Tinkerer 1.0 was released last December 16. Tinkerer is supported both python2 and python3, so I have packaged Debian package of python2 and python3, and uploaded to mentors.debian.net.

It does not become the official package, why it is not yet able to resolve the issue of the license.