rpmdepclean – Uninstalling unnecessary RPMs

I spent a couple of sleepless nights to switch from Gentoo Linux to Fedora Core, since I became a Red Hat employee. Although Fedora Core is really a nice Linux distribution, I still miss the concept of ‘world’ in Gentoo.
When a user installs a Gentoo package, the name of the installed package is appended the ‘world’ file. What’s interesting is that the dependencies of the installed package are not added to the ‘world’ file. What happens when you uninstall the package registered in the world file is that the name of the package is removed. It’s very simple, but it’s powerful when you don’t want unnecessary packages take up disk space. (Yeah, I am a paranoid. 🙂
Now, from the world file, we know what packages were installed by our own request and what were installed just as dependencies, so Gentoo can identify the unnecessary packages that is safe to be removed. Consequently, running ‘emerge --depclean‘ cleans up all the unnecessary packages.
Can’t we do this in Fedora Core or any RPM-based Linux distribution? The answer is yes.
First off, you have to install ‘rpmorphan‘. rpmorphan has the ‘keep’ file which does the same role with the ‘world’ file. It’s located at /var/lib/rpmorphan/keep, which should be empty initially.
Let’s try to find what packages are unnecessary:

$ rpmorphan -all

Unfortunately, you will see so many essential packages that you want to keep. It’s just because you didn’t add them to the ‘keep’ file yet. For example, you can add ‘gnome-terminal’ to the keep file like the following:

$ rpmorphan -add-keep gnome-terminal

Once you finished adding all the packages that you want to keep to the keep file, now you are ready to run the following shell script file (rpmdepclean).

#!/bin/sh
# rpmdepclean
while true; do
    ORPHANS1="`rpmorphan --all | xargs echo`"
    if [ -n "$ORPHANS1" ]; then
        echo -n "$ORPHANS1 "
        yum -q -y remove $ORPHANS1 > /dev/null 2>&1 || exit 1
    fi
    ORPHANS2="`rpmorphan --guess-all | xargs echo`"
    if [ -n "$ORPHANS2" ]; then
        echo -n "$ORPHANS2 "
        yum -q -y remove $ORPHANS2 > /dev/null 2>&1 || exit 1
    fi
    if [ -z "$ORPHANS1" ] && [ -z "$ORPHANS2" ]; then
        echo
        exit 0
    fi
done

Please double-check you added required packages to the keep file. Otherwise, things can go screwed up. You have been warned. If you are in doubt, you can always run yum remove manually, which is safer.

My Favorite Text Editor – SciTE

Finally, I’ve found the text editor that fits exactly to me, highly-customizable, feature-rich and fast-launching. It’s called ‘SciTE‘. Because the command is not so comfortable to type, I created two symbolic links after uninstalling gedit.

$ ln -s /usr/bin/scite notepad
$ ln -s /usr/bin/scite gedit

The following is my ~/.SciTEUser.properties:

code.page=65001
output.code.page=65001
LC_CTYPE=ko_KR.UTF-8
position.width=850
position.height=700
check.if.already.open=1
buffered.draw=1
tabbar.visible=1
tqabbar.multiline=1
toolbar.visible=1
toolbar.usestockicons=1
statusbar.visible=1
caret.fore=#FF0000
caret.width=2
caret.line.back=#00FF00
caret.line.back.alpha=20
line.margin.visible=1
line.margin.width=4
margin.width=16
blank.margin.left=4
blank.margin.right=4
wrap=1
wrap.style=2
cache.layout=3
output.wrap=1
output.cache.layout=3
wrap.visual.flags=1
wrap.visual.flags.location=0
wrap.visual.startindent=0
edge.column=79
edge.mode=1
edge.colour=#C0DCC0
selection.fore=#006000
braces.check=1
braces.sloppy=1
# Brace highlight
style.*.34=fore:#0000FF,back:#C0DCC0,bold
tabsize=4
indent.size=4
use.tabs=0
tab.indents=1
quit.on.close.last=1
default.file.ext=.txt
strip.trailing.spaces=1
ensure.consistent.line.ends=1
find.replace.advanced=1
find.files=*.java *.xml *.txt *.c *.h *.cpp *.hpp
font.base=font:!Liberation Mono,size:11
font.small=${font.base}
font.comment=${font.base}
font.code.comment.box=$(font.comment)
font.code.comment.line=$(font.comment)
font.code.comment.doc=$(font.comment)
font.code.comment.nested=$(font.comment)
font.text=${font.base}
font.text.comment=${font.comment}
font.embedded.base=${font.base}
font.embedded.comment=${font.base}
font.monospace=${font.base}
font.vbs=${font.base}
# Printing
command.print.*=paps --font="Monospace 10" "$(FileNameExt)" | lpr

Please note that I chose Liberation Mono as the default font. You might want to use other alternatives like DejaVu Sans Mono, Monaco, and Consolas.

The Reason Why Time Goes By So Fast Like This

… is probably because I am having really great time in Red Hat. There was a Remoting team meeting in Switzerland last month and I also attended the October new hire orientation in Singapore. Both countries were fantastic to me. People, city … almost everything. Especially, I can’t forget the moment with my wife in Switzerland. I’d love to visit there again whenever there’s a chance.

Working at remote is much more exciting than I expected. People might think working at remote makes one lazy, but it’s exactly opposite. I get to keep watching myself to make sure that I am not wasting time. Although it is not really comfortable that all my teammates and manager are not in a close time zone (two in the US and one in Switzerland), it’s also one of the factors that make me do my best to catch up all the events occurring in the division. I must admit it’s somewhat difficult to catch up everything, but hopefully I will be used to this new world, and moreover, it means that Red Hat / JBoss is a very dynamic workplace that will accelerate my experience.

MINA community is also growing up very nicely. Hopefully we will be able to release the first milestone of 2.0.0 before OSSummit Asia 2007, where I will attend as a speaker. (and that might be why I am working so hard on MINA. 😉

In the middle of the fast-flowing time, I often think about many things I have never thought about before. The thoughts are somewhat fragmented to describe, but it is sure that it’s about ‘growing up’ – becoming a better and more mature person. At least I hope so.

Interesting Search Results Related with Network Application Frameworks (or NIO Frameworks)

Google returns:

People sometimes come to me and say it was pretty difficult for them to discover MINA. Should I learn SEO or something like that? 😀
I believe MINA has the most active community comparing to the other Java network application frameworks though, and that’s what I’m proud of about MINA.

네트워크 어플리케이션 프레임워크 (또는 NIO 프레임워크)와 관련된 흥미로운 검색 결과들

구글 결과를 보면:

  • NIO framework‘에 대해서는 Netty (MINA의 조상)와 Grizzly를 리턴하고,
  • network application framework‘에 대해서는 MINA를 리턴하고,
  • ‘server framework‘나 ‘client framework‘에 대해서는 아무 것도 리턴하질 않네요.

사람들이 가끔 와서 MINA를 발견하는데 꽤 힘들었다고 말하곤 합니다. SEO 같은걸 배워야 하는 걸까요? ㅎㅎ
그럼에도 저는 MINA는 다른 자바 네트워크 어플리케이션 프레임워크들과 비교해서 가장 활발한 커뮤니티를 갖고 있다고 믿고 있습니다. 또 그게 제가 MINA에 대해 자랑스러운 점이죠.

Me as an ASF Member and a JBOSS/RedHat Employee

Two and half years have passed since I started to contribute to the Apache Software Foundation. I couldn’t get involoved many projects due to time constraint, but I improved open source software with many people. I wrote the code of the project I lead. I sent a patch to other project and suggested ideas then. What motivated me in this process is probably the ‘openness’ that open source software aims at.
Everyone can talk about the problem and its solution, and the most appropriate solution is chosen and applied. As long as it doesn’t hurt the open source spirit, there’s no politics there. Somewhat chaotic situation can happen as a project gets bigger, but it also brings more solutions and new ideas that hopefully propel the project. Even if a project starts from an individual’s effort, the project generates a uncontrollable big flow, a unmeasurable social value eventually. This is the ultimate meaning of open source activity; it was the most exciting moment that I couldn’t experience at any company.
On June 8, I became a member of the Apache Software Foundation. I feel indescribible joy that my activity and belief so far have been recognized by someone. I am also very proud that I am the first Korean among about 230 members in the foundation. However, what makes me happiest is the expectation about the new experience what I will have in the foundation. There wouldn’t be any drastic change in what I have been doing, but it makes me throb to learn various insights about open source activity and to help the foundation in a closer place.
On the other hand, my day job always reminds me of my open source software activity. Comparing to the open source software activity, the companies I worked with didn’t seem to succeed to satisfy me from the viewpoint of ‘openness’ and ‘the speed of change’. I’m never denying that I was able to continue my open source software activity all thanks to my day job and employer. NHN Corporation, my current employer, also took considerable amount of concern so I didn’t have any big difficulty in my activity. However, at the same time, it was actually also true that I was envying the full-time open source developers around me.
And the chance came to me finally!
This September, I will start to work with JBOSS/RedHat as a full-time open source developer to spend most time for MINA and JBoss Remoting. I am somewhat worried about the drastic change of the working environment; working remotely, but the fact that I can spend my every single day as an open source software developer is as much exciting as I became a member of the foundation. I’d like to start a new project I have imagined once I’m used to the new life style.
We always encounter unexpected events in our life. I have never thought all these things come to me so fast like this. It is regretful for me that I couldn’t focus on my day job at every moment due to various reasons such as the acquisition and some administration issues. In spite of that, I believe anyone in my situation would have chosen what I chose.

아파치 소프트웨어 재단 멤버이자 JBOSS/RedHat 직원으로서의 나

아파치 소프트웨어 재단에서 활동한 지도 2년 반이라는 시간이 지났다. 시간의 제약으로 많은 프로젝트에 참여하지는 못했지만 그간 많은 사람들과 오픈 소스 소프트웨어를 개선시켜 왔다. 내가 리드하는 프로젝트의 코드를 작성하기도 하고, 그 과정에서 다른 프로젝트에 패치를 보내거나 아이디어를 제시하기도 했다. 이런 과정에서 나에게 가장 큰 동기 부여가 된 것은 아마도 오픈 소스 소프트웨어가 지향하는 ‘개방성’일 것이다.
누구나 문제점과 해결책을 이야기할 수 있고, 다양한 해결책 중 가장 적합한 것을 선택해 적용한다. 오픈 소스의 신념에 반하는 것만 아니라면 그 과정에 정치가 개입되는 일은 없다. 프로젝트가 커질 수록 다소 혼란도 일어나기 마련이지만, 그만큼 더 많은 해결책과 새로운 아이디어가 유입되어 프로젝트는 더 큰 전진의 기회를 얻는다. 프로젝트는 최초에 개인의 노력에서 시작할 지라도 결국에는 한 사람이 제어할 수 없는 큰 흐름, 사회적 가치를 만들어낸다. 이것이 오픈 소스 소프트웨어 활동이 갖는 궁극적인 의의이며, 내가 지금까지 경험한 어떤 기업에서도 겪을 수 없었던 흥분되는 순간이었다.
지난 6월 8일 부로 나는 아파치 소프트웨어 재단의 멤버가 되었다. 지금까지의 내 활동과 믿음이 누군가에 의해 인정받았다는 사실에 기쁨을 감출 길이 없다. 약 230명의 멤버중 내가 최초의 한 한국인이라는 것도 자랑스럽지 않을 수 없다. 그러나 그보다도 더 기쁜 일은 앞으로 겪게 될 새로운 경험에 대한 기대일 것이다. 지금까지 내가 해 온 일에 큰 변화가 생기지는 않겠지만, 오픈 소스 소프트웨어 활동에 대한 다양한 통찰을 좀 더 가까운 곳에서 배우고, 나아가 재단의 발전에 도움이 될 것이라는 사실은 나의 가슴을 두근거리게 하는 일임에 틀림없다.
한편, 오픈 소스 소프트웨어 활동에 푹 빠져 있는 나에게 일반적인 직장 생활은 아쉬움을 가져다 줄 수 밖에 없다. 오픈 소스 소프트웨어 활동과 비교하여, 지금까지 내가 일했던 직장들은 ‘개방성’과 ‘변화의 속도’라는 측면에서 나에게 큰 만족을 주지는 못했던 것 같다. 지금까지의 직장 생활이 있었기에 오픈 소스 소프트웨어 활동도 있을 수 있었다는 사실을 부인할 생각은 추호도 없다. 현 직장인 NHN Corporation에서도 많은 배려를 해 주어 활동에 큰 어려움은 없었다. 하지만 주위의 풀 타임 오픈 소스 개발자들을 보면 부러운 것이 사실이었다.
그런 나에게도 기회가 왔다!
오는 9월이면 JBOSS/RedHat과 함께 풀 타임 오픈 소스 개발자로서 대부분의 시간을 MINAJBoss Remoting에 할애하게 될 것이다. 근무 환경의 급격한 변화 – 재택 근무 – 가 두려운 것도 사실이지만, 하루 하루를 오픈 소스 소프트웨어 개발자로서 떳떳하게 활동할 수 있다는 사실은 재단의 멤버가 되었다는 사실만큼이나 신나는 일이다. 새로운 생활에 익숙해지면 여가를 활용해 평소에 꼭 하고 싶었던 프로젝트도 시작하고 싶다.
삶을 살다 보면 얘기치 않은 일들이 일어나기 마련이다. 이 모든 일들이 이렇게 빨리 찾아오리라고 생각해 본 적은 없다. 기업 인수와 행정상의 이유와 같은 일들로 실제 업무에 충분한 시간을 할애하지 못한 채 현 직장을 떠나게 되어 아쉬움이 크다. 그럼에도 불구하고 내 입장에서라면 누구라도 같은 결정을 내리지 않았겠느냐고 조심스레 변명해 본다.

2007.05.06-11. Honeymoon Hawaii


하와이 신혼여행

Young-hee and I stayed in Hawaii for 4 days; the first 2 days for Maui island and the remainder for Oahu.

영희씨와 저는 마우이섬 이틀 오아우섬 이틀 해서 하와이에 4일 동안 신혼여행을 다녀왔습니다.

Young-hee rented a car in Maui, and it was her first real driving since she obtained her driver’s license. There were not many cars on the road so we didn’t have any problem traveling every place… except that we got a flat tire. We had to wait for about an hour to get a spare tire, returned back to the rent-a-car office, got a new car, and went back to the hotel after another hour of driving.

영희씨가 마우이에서 차를 빌려서 운전 면허 따고 난생 처음 운전을 했습니다. 도로에 차가 별로 없어서 어디든 쉽게 갈 수 있었습니다. 그런데 타이어가 펑크가 나 버리는 바람에 한 시간이나 기다려서 스페어 타이어를 받고, 렌터카 사무실에서 새 차를 받아 한시간 가량을 더 운전해 호텔로 돌아와야 했습니다.

We couldn’t manage to explain where we were located at that moment unless a kind passerby helped us. Her house was very near from where our car stopped, so she came to us every twenty minutes to see if any help is needed. Because of her kindness, we actually enjoyed our time waiting for the spare tire. Most of all, all the scenery we saw while driving was fantastic and made me feel so peaceful.

한 친절한 행인 분의 도움 덕택에 현재 위치를 제대로 설명할 수 있었습니다. 그녀의 집은 차가 멈춘 곳에서 아주 가까워서, 그녀는 20분마다 필요한 게 없는지 보러 나와 주었습니다. 그녀의 친절 덕택에 스페어 타이어를 기다리는 시간은 나름 즐거웠습니다. 무엇보다도 드라이브하면서 우리가 본 경치들은 하나같이 환상적이고 평화로웠습니다.

Oahu island was quite different from Maui. There are numberless luxurious shops and restaurants that are reachable on foot. We spent most of our time shopping and having some good foods. Having dinner in a revolving restaurant at the top of the building watching the landscape of the city was the most impressive experience there, but Keo’s Thai restaurant was much better in taste.

오아후 섬은 마우이 섬과는 사뭇 달랐습니다. 걸어서 갈 수 있는 명품 가게와 레스토랑이 많았습니다. 우리는 쇼핑과 맛난 식사를 하는 데 대부분의 시간을 소비했습니다. 건물 꼭대기의 회전하는 레스토랑에서 도시의 전경을 구경하며 먹는 저녁은 아주 인상적이었습니다. Keo의 태국 레스토랑이 맛 면에서는 훨씬 나았지만요.

Now I’m back from there and writing this post in front of my computer, but I am still missing Hawaii!

이젠 그곳에서 돌아와 컴퓨터 앞에서 이 글을 쓰고 있지만 아직도 하와이가 그립네요!