swiched to xmonad w/o gnome from gnome3
Jan. 15th, 2012 | 02:42 pm
I upgraded my vaio-p from fedora 14 to 16 a while back as X finally became working w/o any closed blobs, only w/ kernel built-in psb_gfx (thanks a lot alan cox for creating this!) + X fbdev.
In Fedora 16, gnome-shell is the default desktop. Unfortunately, 3D acceleration required for gnome-shell is not available in vaio-p: fbdev + psb_gfx do not support 3D acceleration yet and gnome-shell does not work in native mode (run in fallback mode) until Features/Gnome shell software rendering is implemented in Fedora 17.
Gnome-shell fallback mode works fine but it has some features I don't like, so I finally decided to switched to xmonad w/o gnome env. from gnome + xmonad. To accompllish this, I made ~/.Xmodmap, ~/.Xresources for urxvt (rxvt-unicode), ~/.xmonad/session to start {gnome-keyring-daemon, tayer, nm-applet, ibus-daemon}, ~xmobarrc and rpm specs for tayer and yeganesh (tayer.spec, yeganesh.spec and yeganesh-2.4-build-wo-xdg.patch to build yeganesh w/o ghc-xdg-basedir-devel). And I also updated ~/.xmonad/xmonad.hs works w/o gnome:
Now almost all work fine and I quite pleased with this my new lightweight and very efficient desktop env.
Link | Leave a comment | Add to Memories | Share
longest common prefix in python
Aug. 14th, 2011 | 11:34 pm
from all_eq and longest_common_prefix in rpmkit/swapi.py:
# import itertools
def all_eq(xs):
"""Whether all items in xs (list or generator) equals each other.
>>> all_eq(c for c in "")
False
>>> all_eq(c for c in "aaba")
False
>>> all_eq(c for c in "aaaa")
True
>>> all_eq([c for c in "aaaa"])
True
"""
if not isinstance(xs, list):
xs = list(xs) # xs may be a generator...
return xs and all(x == xs[0] for x in xs[1:]) or False
def longest_common_prefix(*args):
"""Variant of LCS = Longest Common Sub-sequence.
>>> longest_common_prefix("abc", "ab", "abcd")
'ab'
>>> longest_common_prefix("abc", "bc")
''
"""
return "".join(x[0] for x in itertools.takewhile(all_eq, itertools.izip(*args)))
Link | Leave a comment {1} | Add to Memories | Share
xpack-0.2+
Apr. 13th, 2011 | 01:54 am
I've just released xpack-0.2. Now it looks working on debian system as far as tested in chroot-ed debian system built with debootstrap.
root@gescom:~# ./xpack.py --build-self --format=deb
16:35:38 [WARNING] get_email: 'module' object has no attribute 'check_output'
16:35:38 [WARNING] get_fullname: 'module' object has no attribute 'check_output'
16:35:38 [WARNING] get_email: 'module' object has no attribute 'check_output'
16:35:38 [WARNING] get_fullname: 'module' object has no attribute 'check_output'
configure.ac:2: installing `./install-sh'
configure.ac:2: installing `./missing'
dh binary
dh_testdir
dh_auto_configure
configure: WARNING: unrecognized options: --disable-maintainer-mode, --disable-dependency-tracking
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
configure: creating ./config.status
config.status: creating Makefile
configure: WARNING: unrecognized options: --disable-maintainer-mode, --disable-dependency-tracking
dh_auto_build
make[1]: Entering directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
dh_auto_test
dh_testroot
dh_prep
dh_installdirs
dh_auto_install
make[1]: Entering directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
make[2]: Entering directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/bin" || /bin/mkdir -p "/tmp/xpack-build-ZG7uDg/xpack-0.2/debian/xpack/usr/bin"
/usr/bin/install -c -m 644 src/usr/bin/xpack '/tmp/xpack-build-ZG7uDg/xpack-0.2/debian/xpack/usr/bin'
make[2]: Leaving directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
make[1]: Leaving directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
dh_install
dh_installdocs
dh_installchangelogs
dh_installexamples
dh_installman
dh_installcatalogs
dh_installcron
dh_installdebconf
dh_installemacsen
dh_installifupdown
dh_installinfo
dh_pysupport
dh_installinit
dh_installmenu
dh_installmime
dh_installmodules
dh_installlogcheck
dh_installlogrotate
dh_installpam
dh_installppp
dh_installudev
dh_installwm
dh_installxfonts
dh_bugfiles
dh_lintian
dh_gconf
dh_icons
dh_perl
dh_usrlocal
dh_link
dh_compress
dh_fixperms
dh_strip
dh_makeshlibs
dh_shlibdeps
dh_installdeb
dh_gencontrol
dpkg-gencontrol: warning: Depends field of package xpack: unknown substitution variable ${shlibs:Depends}
dh_md5sums
debian/rules override_dh_builddeb
make[1]: Entering directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
dh_builddeb -- -Zbzip2
dpkg-deb: building package `xpack' in `../xpack_0.2_all.deb'.
make[1]: Leaving directory `/tmp/xpack-build-ZG7uDg/xpack-0.2'
root@gescom:~# ls /tmp/xpack-build-ZG7uDg/
usr xpack-0.2 xpack_0.2_all.deb
root@gescom:~# dpkg -i /tmp/xpack-build-ZG7uDg/xpack_0.2_all.deb
Selecting previously deselected package xpack.
(Reading database ... 20120 files and directories currently installed.)
Unpacking xpack (from .../xpack_0.2_all.deb) ...
Setting up xpack (0.2) ...
root@gescom:~# dpkg -l xpack
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
ii xpack 0.2 A python script to build packages from existing files on your system
root@gescom:~# dpkg -L xpack
/.
/usr
/usr/bin
/usr/bin/xpack
/usr/share
/usr/share/doc
/usr/share/doc/xpack
/usr/share/doc/xpack/changelog.gz
/usr/share/doc/xpack/copyright
root@gescom:~#
# echo /etc/resolv.conf | ./xpack.py -n resolvconf -w w --format deb -
13:11:59 [WARNING] get_email: 'module' object has no attribute 'check_output'
13:11:59 [WARNING] get_fullname: 'module' object has no attribute 'check_output'
configure.ac:2: installing `./install-sh'
configure.ac:2: installing `./missing'
dh binary
dh_testdir
dh_auto_configure
configure: WARNING: unrecognized options: --disable-maintainer-mode, --disable-dependency-tracking
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
configure: creating ./config.status
config.status: creating Makefile
configure: WARNING: unrecognized options: --disable-maintainer-mode, --disable-dependency-tracking
dh_auto_build
make[1]: Entering directory `/root/w/resolvconf-0.1'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/w/resolvconf-0.1'
dh_auto_test
dh_testroot
dh_prep
dh_installdirs
dh_auto_install
make[1]: Entering directory `/root/w/resolvconf-0.1'
... (snip) ...
dpkg-gencontrol: warning: Depends field of package resolvconf: unknown substitution variable ${shlibs:Depends}
dh_md5sums
debian/rules override_dh_builddeb
make[1]: Entering directory `/root/w/resolvconf-0.1'
dh_builddeb -- -Zbzip2
dpkg-deb: building package `resolvconf' in `../resolvconf_0.1_all.deb'.
make[1]: Leaving directory `/root/w/resolvconf-0.1'
#
(xpack is an automatic package building tool just from file list, available from https://github.com/ssato/rpmkit )
Link | Leave a comment | Add to Memories | Share
東京電力: 計画停電エリアリスト
Mar. 16th, 2011 | 02:03 am
東京電力の計画停電のリストが PDF (しかもテキストコピー禁止) しかなくていらいらするので全部まとめて、更新があるか手元になければダウンロードし
必ず make -n 等で事前確認を。python-xlrd が必要。やっつけで適当なので Makefile の内容を理解できる方だけ自己責任でどうぞ。なおかつ不正アクセスととられないように
Link | Leave a comment | Add to Memories | Share
xpack.py - cont.
Mar. 10th, 2011 | 01:27 am
I continued working on xpack.py and added some features since its 0.1 release.
As still I don't have a chance to test .deb output and am not sure whether that function works or not in actual. If anyone tried and found any problems on it, please let me know.
Link | Leave a comment | Add to Memories | Share
xpack.py - a "super" packaging tool
Feb. 26th, 2011 | 03:03 am
I wrote a script to make "package" in tgz, rpm or deb (experimental) from given files list. Here is an example session how it works:
$ ls files.list xpack.py $ cat files.list /etc/auto.* /etc/modprobe.d/* /etc/resolv.conf /etc/yum.repos.d/fedora.repo #/etc/aliases.db /etc/system-release /etc/httpd/conf.d $ python xpack.py -n sysdata -w ./0 -q files.list 03:52:50 [WARNING] /etc/auto.master is owned by autofs and it (sysdata) will conflict with autofs 03:52:50 [WARNING] /etc/auto.misc is owned by autofs and it (sysdata) will conflict with autofs 03:52:51 [WARNING] /etc/auto.net is owned by autofs and it (sysdata) will conflict with autofs 03:52:51 [WARNING] /etc/auto.smb is owned by autofs and it (sysdata) will conflict with autofs 03:52:51 [WARNING] /etc/httpd/conf.d is owned by httpd and it (sysdata) will conflict with httpd 03:52:51 [WARNING] /etc/modprobe.d/blacklist-visor.conf is owned by pilot-link and it (sysdata) will conflict with pilot-link 03:52:51 [WARNING] /etc/modprobe.d/blacklist.conf is owned by hwdata and it (sysdata) will conflict with hwdata 03:52:51 [WARNING] /etc/modprobe.d/dist-alsa.conf is owned by module-init-tools and it (sysdata) will conflict with module-init-tools 03:52:52 [WARNING] /etc/modprobe.d/dist-oss.conf is owned by module-init-tools and it (sysdata) will conflict with module-init-tools 03:52:52 [WARNING] /etc/modprobe.d/dist.conf is owned by module-init-tools and it (sysdata) will conflict with module-init-tools 03:52:52 [WARNING] /etc/modprobe.d/libmlx4.conf is owned by libmlx4 and it (sysdata) will conflict with libmlx4 03:52:52 [WARNING] /etc/modprobe.d/poulsbo.conf is owned by xorg-x11-drv-psb and it (sysdata) will conflict with xorg-x11-drv-psb 03:52:52 [WARNING] /etc/system-release is owned by fedora-release and it (sysdata) will conflict with fedora-release 03:52:53 [WARNING] /etc/yum.repos.d/fedora.repo is owned by fedora-release and it (sysdata) will conflict with fedora-release 03:52:53 [WARNING] [Errno 1] Operation not permitted: '/tmp/t/0/sysdata-0.1/src/etc/httpd/conf.d' $ ls 0 files.list xpack.py $ ls 0 sysdata-0.1 $ ls 0/sysdata-0.1/ MANIFEST README configure rpm.mk sysdata-0.1.tar.gz xpack-package-filelist.pkl MANIFEST.overrides aclocal.m4 configure.ac src sysdata-overrides-0.1-1.fc14.noarch.rpm xpack-sbuild.stamp Makefile autom4te.cache install-sh sysdata-0.1-1.fc14.noarch.rpm sysdata.spec xpack-setup.stamp Makefile.am config.log missing sysdata-0.1-1.fc14.src.rpm xpack-build.stamp Makefile.in config.status rpm sysdata-0.1.tar.bz2 xpack-configure.stamp $ rpm -qlp 0/sysdata-0.1/sysdata-0.1-1.fc14.noarch.rpm /etc/resolv.conf /usr/share/doc/sysdata-0.1 /usr/share/doc/sysdata-0.1/MANIFEST /usr/share/doc/sysdata-0.1/README $ rpm -qlp 0/sysdata-0.1/sysdata-overrides-0.1-1.fc14.noarch.rpm /etc/auto.master /etc/auto.misc /etc/auto.net /etc/auto.smb /etc/httpd/conf.d /etc/modprobe.d/blacklist-visor.conf /etc/modprobe.d/blacklist.conf /etc/modprobe.d/dist-alsa.conf /etc/modprobe.d/dist-oss.conf /etc/modprobe.d/dist.conf /etc/modprobe.d/libmlx4.conf /etc/modprobe.d/poulsbo.conf /etc/system-release /etc/yum.repos.d/fedora.repo /usr/share/doc/sysdata-overrides-0.1 /usr/share/doc/sysdata-overrides-0.1/MANIFEST.overrides $
If you're interested in it and want to see how it works and what can be done with it, take a look at the output of `xpack.py --show-examples` also.
The idea behind this script is that the system should be consist of static data ('packages') and 'procedual' setup process (such as creating and editing /etc/httpd/conf.d/foo.conf, recovering dot files in users' dirs from backup data, etc.) be removed at a maximum.
What is more, I want to remove most manual and 'procedual' configuration steps need human interaction except for installation of some additional packages to setup our systems.
This script will help packaging configuration files modified by users manually and user data, so to install these packages finishes the system setup almost.
Link | Leave a comment | Add to Memories | Share
custom rpm specs for fedora/rhel/etc.
Dec. 30th, 2010 | 01:46 am
I don't have time to become a package maintainer of fedora project for a while but have some rpm specs for fedora in several git repositories: https://github.com/ssato/misc, https://github.com/ssato/misc/tree/maste
Link | Leave a comment | Add to Memories | Share
Our second daughter was born
Dec. 2nd, 2010 | 05:42 am
A little bit late but ...
Our second daughter, Asuka, was born on 2010.11.29, 14:11. She was 3055g at birth and looks a lot like her elder sister, Karen. My wife and she are both OK and I can't wait that they leaves the hospital and come home.
Link | Leave a comment {3} | Add to Memories | Share
C++ in gcc
Jun. 2nd, 2010 | 02:42 am
At last: Using C++ in GCC is OK
Link | Leave a comment {3} | Add to Memories | Share
packagedvm ...
May. 26th, 2010 | 03:29 am
The article about packaged vm is out: Software Design 2010年6月号 but miniascape is not in usable state yet and I keep hacking on it.

