2014年11月22日 星期六

GNOME 3 and FreeBSD

GNOME 3.14 is merged into the official FreeBSD ports collection at FreeBSD ports revision 372768, replacing the old GNOME 2.32. It is an late but exciting change after GNOME 3.0 is released three and a half years ago.

The LiveCD

Before the merge made in this week, some people may find there is a new project called freebsd-gnome-livecd on sourceforge.net. I started this project to let people know that GNOME 3 still works on non-Linux platforms, including FreeBSD.

These LiveCDs are used as a preview to the latest version of GNOME. It is not a general-purpose LiveCDs, and I don't expect someone will use them as daily computing platforms or system rescue CDs.

These LiveCDs are built the marcuscom ports, the FreeBSD GNOME development ports. It seems most people download the regular version although the debug version of LiveCDs which include most debug symbols, editors, and debuggers are also available to ease bug reporting.

I hope we can expect  regular updates of GNOME in the official FreeBSD ports after the merge.

JHBuild and Issues

Keeping GNOME portable requires continuous work. As there are few people working on the FreeBSD GNOME project, they don't have enough manpower to track every unstable release. In order to catch build issues, we have setup several daily builders using JHBuild.

Making JHBuild work on FreeBSD also enables other GNOME developers or newcomers to develop GNOME on FreeBSD. However, there are still several known problems.

GNOME Shell crashes too often

GNOME Shell crashes when any desktop files are added, removed, or modified. We discovered there is a bug in GLib file monitoring backends. This bugs is not specific to *BSD, but it causes problems less frequently on Linux. The bug report is filed here: https://bugzilla.gnome.org/show_bug.cgi?id=739424. I hope it can be fixed before GNOME 3.16 is released.

 

Wrong memory values reported by libgtop

GNOME System Monitor shows many processes use several EiBs of memory, which is obviously incorrect. I have not dug into this bug, but I hope it can also be fixed before GNOME 3.16.

Symbol conflict with libgeom(3)

Both GLib and libgeom in FreeBSD have a function called g_close, which causes hard-to-debug problem: https://bugzilla.gnome.org/show_bug.cgi?id=723685. As both libraries are not going to break their API and ABI, the only thing we can do is to temporarily disable all codes related to libgeom in libgtop. I hope we can find an alternative way to do the same thing.

WebKit problems

Although we have daily builders, we don't know whether the latest WebKit works because JHBuild uses the unstable release tarballs instead of the svn trunk. WebKit is a large C++ project which has thousands of source files and requires 30 GiB of disk spaces and 16 GiB of memory to be built with debug symbols.  Therefore, finding the cause of WebKit bugs usually takes more time than other modules, and the number of issues in WebKit is also higher than other modules. There is a list on our wiki page.

A jhbuildrc file is still required to build GNOME on FreeBSD

We have make JHBuild work on FreeBSD with almost no patch, but we have some required configurations which should be added to jhbuildrc by users.


Thanks

Thank everyone who makes this work possible, including
   Koop Mast (FreeBSD GNOME ports maintainer),
   Gustau Perez (FreeBSD GNOME ports maintainer),
   Ryan Lortie (GNOME developer),
   Antoine Jacoutot (OpenBSD GNOME ports maintainer),
   and everyone who helps us resolve problems and accepts our patches.



GNOME 3.14 已經在 svn revision 372768 取代 FreeBSD ports 中老舊的 GNOME 2.32 了!雖然 GNOME 3.0 是在三年半前發布的,但我想這仍是個令人興奮的消息。

LiveCD

在這星期 GNOME 3.14 進入官方 ports 之前,有些人可能已經發現 sourceforge.net 上有個叫做 freebsd-gnome-livecd 的新專案。當初開這專案的目的是讓大家知道 GNOME 3 確實可以在 FreeBSD 這類不使用 Linux 作為核心的系統上執行。

不過就像前面所說的,製作這個 LiveCD 的主要目的是讓大家看看最新版的 GNOME 在 FreeBSD 上執行起來是什麼樣子。我並不期待有人拿這些 LiveCD 當作日常使用的作業系統或是當成系統救援工具,畢竟這本來就和一般 LiveCD 的目標有些不同。

這些 LiveCD 都是用 FreeBSD GNOME 維護團隊用來測試和開發用的 marcuscom ports 打包而成的。就 sourceforge.net 上提供的下載量來看,多數人都是下載預設的普通版本 LiveCD。當初為了 debug 方便,我也放上了包含編輯器和除錯器並且以及保留 debug symbol 的版本,但跟普通版本比起來實在很少人下載。

我想之後 FreeBSD ports 應該可以像其他發行版一樣,能持續收到 GNOME 的更新版本,不再像這次更新差了好幾年。

JHBuild 和各種問題

為了確保將來發行的 GNOME 版本能繼續在 FreeBSD 上使用,我們必須持續測試最新的開發版本。然而 FreeBSD GNOME 團隊中的人並不多,他們也不見得都有時間像其他發行版那樣能為每個不穩定的測試版本打包套件。再加上大部分的 GNOME 開發者都只使用 Linux,為了盡早得知 GNOME 在 FreeBSD 上編譯或執行時可能遇到的問題,我們已經有一些透過 JHBuild 執行的每日自動編譯服務。

當然,可以成功執行 JHBuild 代表著現在可以直接在 FreeBSD 上參與 GNOME 開發!雖然說還是有一些已知的問題還沒解決。


GNOME Shell 常常當掉

如果你有嘗試過在 GNOME Shell 下安裝或更新軟體,就會發現這時候 GNOME Shell 會不太穩定。我們發現只要安裝過程中有新增、刪除、修改啟動應用程式用的 .desktop 檔案,GNOME Shell 就有不小的機會會當掉。雖然說 GNOME Session 會自動重新啟動 GNOME Shell,但如果發生得太頻繁,GNOME Session 會強制要求使用者必須登出,因而使得使用者的觀感不好。有趣的是,雖然這個問題在 Linux 上也會發生,但是在 *BSD 發生的機會比在 Linux 高了許多,因而更容易找到問題所在。我們發現這是 GLib 檔案監控的 bug,而我也已經把我看到的現象回報給 GLib 開發者:https://bugzilla.gnome.org/show_bug.cgi?id=739424 我期待這個問題可以在 GNOME 3.16 正式發布之前解決,雖然我很可能沒有時間貢獻 patch 來修好這個 bug。

 

libgtop 回報錯誤的記憶體用量

「GNOME 系統監控」顯示很多程序的記憶體用量是好幾 EiB。很顯然這是錯的,但我還沒花時間找出這問題發生的原因。我也期待這問題能在 GNOME 3.16 發布前解決。

libgeom(3) symbol 衝突

很不巧的是,GLib 和 FreeBSD 的儲存裝置管理用的函式庫 libgeom 都有個函式叫做 g_close,造成了這個花了我一個月才找出原因的麻煩問題:https://bugzilla.gnome.org/show_bug.cgi?id=723685。 但是為了維持 API 和 ABI,這兩個函式庫都不太可能更改函式名稱,所以我們只好先把 libgtop 中跟 libgeom 有關的程式碼都註解掉了。我希望我們之後能找到避免名稱衝突的方法,或是不透過 libgeom 取得資訊。

各種 WebKit 問題

雖然說我們已經用 JHBuild 跑了每日編譯服務,但由於 GNOME 的 JHBuild 使用的 WebKit 是 unstable release tarball,而非開發中的 svn trunk,因此我們無法在 WebKit 發生問題立刻從 JHBuild 頁面得知。對我們來說 WebKit 是個很大的 C++ 專案,有幾千甚至幾萬個原始碼檔案,而且在 FreeBSD 上要編譯出有含 debug symbol 的 WebKit 需要 30 GiB 的磁碟空間和 16 GiB 的記憶體,因此相較於其他 GNOME 的 module,WebKit 發生的問題更多,且更難找出原因和解決。我們的 wiki 頁面有已經解決和等待解決的 WebKit bug 清單。

我們仍然需要 jhbuildrc

雖然說 JHBuild 現在不用 patch 就能在 FreeBSD 使用,但使用者還是需要手動把一些必要的設定填進 jhbuildrc。

感謝

感謝所有讓 GNOME 3 成功在 FreeBSD 執行的人,包含
   Koop Mast (FreeBSD GNOME ports 維護者),
   Gustau Perez (FreeBSD GNOME ports 維護者),
   Ryan Lortie (GNOME 開發者),
   Antoine Jacoutot (OpenBSD GNOME 維護者),
   和所有幫助我們解決問題,以及願意接受我們的 patch 的人。

2014年6月7日 星期六

GNOME.Asia Summit 2014

This was my first time to attend GNOME.Asia summit and it was very exciting and interesting! I am a user of GNOME and Fedora since GNOME 3.0 and Fedora 15 was released, and I make contribution to GNOME since I started working on Google Summer of Code 2013 project last year. It was a great chance (also my first chance) to meet people who make these great work, know what other people are working on, and share what I have done in the last year.

Keynotes of these two days were great. Both GNOME and Fedora are being improved. There are always interesting things in the new versions. Systemd is also a great work. It eases the work needed to configure and track a GNU/Linux system. We can also expects many useless difference between distributions can finally be eliminated using systemd, which is also a goal of systemd, mentioned in the talk by Lennart. Both GNOME 3 and systemd make a big change to what we originally have, and make things easier to newcomers. I think the only bad thing is that systemd will make GNU/Linux and *BSD become more different. [1]

RMS talked about why we should only use free software. Free software are great. I have modified several free software to meet my personal need, and I also share modification with other people by making packages for those software modified by me. Although it is not possible for me to stop all use of non-free software now, more than 99% packages installed on my system are free. [2]

Input methods and Wayland are great. GNOME on wayland works smoother than X, and software using X works very well. The most surprising thing is that users cannot notice some programs are actually using X. Input methods are essential parts of the system, at least for people who have to input Chinese everyday. [3] Input methods should never crash. They want to move some simple and stable input methods back to the IBus main process in order to make input methods switching faster. I would like to see this feature because the switching is much slower on IBus than on SCIM or Fcitx However, the input method I used, ibus-chewing, is not very simple, and it may not be put back into the main process.

Another interesting thing is that there are other people creating new desktop environments based on GNOME softwares, libraries, and design. BlankOn and Deepin are such projects. Although creating new desktop is not the main goal of these projects, they already create a new and different desktop as the result of work.

Thank GNOME foundation for sponsoring me to attend GNOME.Asia Summit 2014 this year. Thank all volunteers and other speakers for making this great event. Thank people who invited me to attend this event, and I was very surprised when I received the invitation message. Although combining two different topics, archive integration and FreeBSD porting, in one talk causes the talk became too long, knowing that there are people who like my archive integration work was still exciting. However, I don'y have time to complete the work now because I have to finish my final projects and final exams first. I hope I can complete the archive integration work and make it available in core GNOME applications in this summer. [4]


Links:
  1. GNOME.Asia Summit 2014
  2. Speakers Info
  3. Speakers Slides
  4. Pictures on flickr
  5. Day 1 video on youku
  6. Day 2 video on youku

Below are some not-so-related things:
  1. This may make the work of keeping applications work on both GNU/Linux and *BSD more difficult.
  2. I am glad to replace non-free software with a free software if the free software implementation also works well.
  3. This was why the IBus integration is very controversial in when GNOME 3.6 was released. It was also why I temporarily switched to Xfce until I upgraded my system to Fedora 19 with GNOME 3.8.
  4. This was why I didn't apply for Google Summer of Code 2014 this year. I think I should finish existing work first.
  5. This was the first time I met so many people from different countries, and this was also the first time for me to talk and discuss with other people using English. This was the first time that I made an English speech. This was the first time I went to China and the Great Wall.
  6. Although systemd and wayland are great, I still hope systemd and wayland will always be optional dependencies of GNOME. Systemd APIs are currently not implemented on most non-Linux systems. Wayland is also currently not available on non-Linux systems although it is possible to port it to other systems.
  7. Some people wonder why there is a talk related to FreeBSD porting. They think running GNOME on FreeBSD is always an easy task. I guess they didn't know FreeBSD ports still only have GNOME 2.32 before I told them.
  8. No one know when the welcome party in the day 0 started. 
  9. Tea break without tea! Only water.
  10. I still don't know why I cannot connect to http://2014.gnome.asia/. To prevent my connection being refused, I use ssh as a SOCKS proxy server and use proxychains to force the browser using proxy to connect to GNOME.Asia website.

2014年6月6日 星期五

Initial Post

This is my first blog, and this is the first post in this blog!
This blog is still experimental, and it may be moved to other site when needed.