Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

Migrando Fedora para Opensuse part4

Neste post falarei sobre dois aplicativos que usava bastante no Fedora e continuo usando no OpenSuse. Dropbox e GnoMenu.

Dropbox não é bem um aplicativo, mas um serviço de disco virtual que uso para compartilhar meus documentos entre computadores diferentes. Também pode ser usado para realizar Backups. Para instalá-lo no OpenSuse basta instalar o pacote dropbox disponível no Gerenciador de Software. No fedora eu tinha que baixar o pacote direto do site. Ponto para o OpenSuse. Mais informações sobre o serviço em http://www.dropbox.com

Gnomenu é um menu alternativo para o Gnome, com alto nível de personalização e bem interessante. Uso-o há algum tempo e sempre achei melhor do que os concorrentes. Criei um pacote dele para o OpenSuse. Clique aqui para baixar. Após a instalação, clique com o botão direito na barra de tarefas e clique em "Adicionar ao painel". Procure pelo item GnoMenu. Essa versão é para intel/amd 64 bits (arch x86_64). Em breve disponibilizo a versão para 32 bits.
Mais informações sobre GnoMenu em https://launchpad.net/gnomenu

Por enquanto é só pessoal. Até a próxima.

a silhouette of a person's head and shoulders, used as a default avatar

История одного роутера

Я уже писал на страницах этого блога, что недавно преобрёл роутер D-Link DIR-300/NRU. Мне нужна была недорогая, быстронастраиваемая точка доступа, и хотя я был наслышан о проблемах с устройствами D-Link, привлекательный внешний вид, хороший функционал и цена в 1200 р. сделали своё дело.
Технические характеричтики устройства таковы:
Общие характеристики

  • Тип Wi-Fi точка доступа
  • Стандарт беспроводной связи 802.11n
  • Макс. скорость беспроводного соединения 150 Мбит/с

Прием/передача

  • Защита информации WEP, WPA, WPA2
  • Мощность передатчика 17 dBM
  • Радиус действия внутри помещения 100 м
  • Радиус действия вне помещения 400 м

VPN

  • Поддержка VPN pass through

Мониторинг и конфигурирование

  • Web-интерфейс

Опции точки доступа/моста

  • Коммутатор 4xLAN

Маршрутизатор

  • Маршрутизатор
  • Межсетевой экран (FireWall)
  • NAT
  • SPI
  • DHCP-сервер
  • Поддержка Dynamic DNS
  • Демилитаризованная зона (DMZ)
  • Статическая маршрутизация

Антенна

  • Количество внешних антенн 1 x 2 dBi
  • Тип внешней антенны съемная

Дополнительно

  • Размеры (ШxВxГ) 113x32x148 мм
  • Вес 246 г

Вся эта красота выглядит вот так:


Поставляется в небольшой коробке, куда кроме роутера входят: адаптер питания, подставка, настенное крепление, пачкорд, диск быстрой установки (естественно работающий только в Windows), инструкция, гарантийный талон и... текст лицензии GPL v2 (на английском), по которой распространяется программное обеспечение D-Link.
Web интерфейс роутера находится по адресу 192.168.0.1. Оформлен он довольно мило (:)), ориентирован на широкий круг пользователей - опции удобно разбиты по группам, все настройки обернуты в пошаговые мастера установки, но есть и режим для экспертов, где все можно настроить в одном окне.
С настройкой я справился довольно быстро, но в первые три дня выяснилась одна особенность - роутер раз в 10-15 минут разрывал p2p-соединения. Сначала я грешил на программы, ибо DC++ клиент я собственноручно компилил из GIT-репозитория, а Ktorrent стоит из Unstable, но опытным путём (подключением компьютера напрямую, в обход роутера) выяснилось, что виноват всё-таки роутер.
На форумах у людей наблюдался целый ворох проблем, наличие которых зависело от типа соединения и версии прошивки. У меня стояла прошивка версии 2.0.2, а соединения пробовал как через шлюз со статическим IP, так и через PPTP-туннель (провайдер предоставляет оба варианта). На официальном FTP-сервере D-Link я нашел версии прошивок 2.0.1 и 2.0.5beta - с первой проблема осталась, а со второй интернет вообще не поднялся.
Тогда я начал перерывать интернет на предмет наличия сторонних прошивок и набрел на сайт DD-WRT.
По информации с сайта "DD-WRT — это сторонняя разработка прошивки (микропрограммы) под лицензией GPL для множества ieee802.11a/b/g/h/n беспроводных маршрутизаторов, реализованных на чипах Broadcom и Atheros."
Там же я узнал, что мой роутер "основан на чипе Ralink RT3050 SoC, и по всем отчетам, включая «Dlink's FCC test report», его PCBA (печатная плата) точно такая же, как в DIR-600."
Внимание! Это относится к модели DIR-300/NRU (аппаратная ревизия B1), к модели DIR-300 (ревизия A1) НЕ применимо!
Установка сторонней прошивки идентична установке/обновлению оригинальной, с той лишь разницей, что образ берется не с FTP-сервера D-Link, а отсюда.
Установка проходит автоматически, в конце нее роутер перезагрузится и браузер сообщит, что страница недоступна - ничего страшного, просто адрес роутера поменялся на 192.168.1.1
По умолчанию прошивки dd-wrt используют логин admin c пустым паролем, настраивается все тоже быстро, правда тут нет таких мастеров как у D-Link да и язык интерфейса английский, но если уж у Вас хватило умения перепрошить девайс, то и с настройкой Вы легко справитесь.
При переходе по адресу 192.168.1.1 после настройки отображается подобный экран со статистикой устройства:


Новая прошивка добавляет ряд новых возможностей: промышленное шифрование Wi-Fi расширенные настройки DNS, блокировка сайтов по маске и расписанию, блокировка p2p трафика, учет трафика, серверы VPN, SSH, Telnet и многое другое. Но главное - стабильность, за месяц постоянного использования не было никаких разрывов и зависаний. Небольшой совет для тех, кто воспользуется этой инструкцией: не стоит забывать, что у машинки не самый мощный процессор, поэтому, нагрузив его кучей сервисов, можно столкнуться с подвисаниями. Кстати, ешё одно преимущество данного устройство - оно абсолютно не шумит и абсолютно не греется, даже после долгой работы под нагрузкой.
В итоге за небольшие деньги я получил стабильный роутер с функционалом старших моделей.
a silhouette of a person's head and shoulders, used as a default avatar

История одного роутера

Я уже писал на страницах этого блога, что недавно преобрёл роутер D-Link DIR-300/NRU. Мне нужна была недорогая, быстронастраиваемая точка доступа, и хотя я был наслышан о проблемах с устройствами D-Link, привлекательный внешний вид, хороший функционал и цена в 1200 р. сделали своё дело.
Технические характеричтики устройства таковы:
Общие характеристики

  • Тип Wi-Fi точка доступа
  • Стандарт беспроводной связи 802.11n
  • Макс. скорость беспроводного соединения 150 Мбит/с

Прием/передача

  • Защита информации WEP, WPA, WPA2
  • Мощность передатчика 17 dBM
  • Радиус действия внутри помещения 100 м
  • Радиус действия вне помещения 400 м

VPN

  • Поддержка VPN pass through

Мониторинг и конфигурирование

  • Web-интерфейс

Опции точки доступа/моста

  • Коммутатор 4xLAN

Маршрутизатор

  • Маршрутизатор
  • Межсетевой экран (FireWall)
  • NAT
  • SPI
  • DHCP-сервер
  • Поддержка Dynamic DNS
  • Демилитаризованная зона (DMZ)
  • Статическая маршрутизация

Антенна

  • Количество внешних антенн 1 x 2 dBi
  • Тип внешней антенны съемная

Дополнительно

  • Размеры (ШxВxГ) 113x32x148 мм
  • Вес 246 г

Вся эта красота выглядит вот так:


Поставляется в небольшой коробке, куда кроме роутера входят: адаптер питания, подставка, настенное крепление, пачкорд, диск быстрой установки (естественно работающий только в Windows), инструкция, гарантийный талон и... текст лицензии GPL v2 (на английском), по которой распространяется программное обеспечение D-Link.
Web интерфейс роутера находится по адресу 192.168.0.1. Оформлен он довольно мило (:)), ориентирован на широкий круг пользователей - опции удобно разбиты по группам, все настройки обернуты в пошаговые мастера установки, но есть и режим для экспертов, где все можно настроить в одном окне.
С настройкой я справился довольно быстро, но в первые три дня выяснилась одна особенность - роутер раз в 10-15 минут разрывал p2p-соединения. Сначала я грешил на программы, ибо DC++ клиент я собственноручно компилил из GIT-репозитория, а Ktorrent стоит из Unstable, но опытным путём (подключением компьютера напрямую, в обход роутера) выяснилось, что виноват всё-таки роутер.
На форумах у людей наблюдался целый ворох проблем, наличие которых зависело от типа соединения и версии прошивки. У меня стояла прошивка версии 2.0.2, а соединения пробовал как через шлюз со статическим IP, так и через PPTP-туннель (провайдер предоставляет оба варианта). На официальном FTP-сервере D-Link я нашел версии прошивок 2.0.1 и 2.0.5beta - с первой проблема осталась, а со второй интернет вообще не поднялся.
Тогда я начал перерывать интернет на предмет наличия сторонних прошивок и набрел на сайт DD-WRT.
По информации с сайта "DD-WRT — это сторонняя разработка прошивки (микропрограммы) под лицензией GPL для множества ieee802.11a/b/g/h/n беспроводных маршрутизаторов, реализованных на чипах Broadcom и Atheros."
Там же я узнал, что мой роутер "основан на чипе Ralink RT3050 SoC, и по всем отчетам, включая «Dlink's FCC test report», его PCBA (печатная плата) точно такая же, как в DIR-600."
Внимание! Это относится к модели DIR-300/NRU (аппаратная ревизия B1), к модели DIR-300 (ревизия A1) НЕ применимо!
Установка сторонней прошивки идентична установке/обновлению оригинальной, с той лишь разницей, что образ берется не с FTP-сервера D-Link, а отсюда.
Установка проходит автоматически, в конце нее роутер перезагрузится и браузер сообщит, что страница недоступна - ничего страшного, просто адрес роутера поменялся на 192.168.1.1
По умолчанию прошивки dd-wrt используют логин admin c пустым паролем, настраивается все тоже быстро, правда тут нет таких мастеров как у D-Link да и язык интерфейса английский, но если уж у Вас хватило умения перепрошить девайс, то и с настройкой Вы легко справитесь.
При переходе по адресу 192.168.1.1 после настройки отображается подобный экран со статистикой устройства:


Новая прошивка добавляет ряд новых возможностей: промышленное шифрование Wi-Fi расширенные настройки DNS, блокировка сайтов по маске и расписанию, блокировка p2p трафика, учет трафика, серверы VPN, SSH, Telnet и многое другое. Но главное - стабильность, за месяц постоянного использования не было никаких разрывов и зависаний. Небольшой совет для тех, кто воспользуется этой инструкцией: не стоит забывать, что у машинки не самый мощный процессор, поэтому, нагрузив его кучей сервисов, можно столкнуться с подвисаниями. Кстати, ешё одно преимущество данного устройство - оно абсолютно не шумит и абсолютно не греется, даже после долгой работы под нагрузкой.
В итоге за небольшие деньги я получил стабильный роутер с функционалом старших моделей.
a silhouette of a person's head and shoulders, used as a default avatar

История одного роутера

Я уже писал на страницах этого блога, что недавно преобрёл роутер D-Link DIR-300/NRU. Мне нужна была недорогая, быстронастраиваемая точка доступа, и хотя я был наслышан о проблемах с устройствами D-Link, привлекательный внешний вид, хороший функционал и цена в 1200 р. сделали своё дело.
Технические характеричтики устройства таковы:
Общие характеристики

  • Тип Wi-Fi точка доступа
  • Стандарт беспроводной связи 802.11n
  • Макс. скорость беспроводного соединения 150 Мбит/с

Прием/передача

  • Защита информации WEP, WPA, WPA2
  • Мощность передатчика 17 dBM
  • Радиус действия внутри помещения 100 м
  • Радиус действия вне помещения 400 м

VPN

  • Поддержка VPN pass through

Мониторинг и конфигурирование

  • Web-интерфейс

Опции точки доступа/моста

  • Коммутатор 4xLAN

Маршрутизатор

  • Маршрутизатор
  • Межсетевой экран (FireWall)
  • NAT
  • SPI
  • DHCP-сервер
  • Поддержка Dynamic DNS
  • Демилитаризованная зона (DMZ)
  • Статическая маршрутизация

Антенна

  • Количество внешних антенн 1 x 2 dBi
  • Тип внешней антенны съемная

Дополнительно

  • Размеры (ШxВxГ) 113x32x148 мм
  • Вес 246 г

Вся эта красота выглядит вот так:


Поставляется в небольшой коробке, куда кроме роутера входят: адаптер питания, подставка, настенное крепление, пачкорд, диск быстрой установки (естественно работающий только в Windows), инструкция, гарантийный талон и... текст лицензии GPL v2 (на английском), по которой распространяется программное обеспечение D-Link.
Web интерфейс роутера находится по адресу 192.168.0.1. Оформлен он довольно мило (:)), ориентирован на широкий круг пользователей - опции удобно разбиты по группам, все настройки обернуты в пошаговые мастера установки, но есть и режим для экспертов, где все можно настроить в одном окне.
С настройкой я справился довольно быстро, но в первые три дня выяснилась одна особенность - роутер раз в 10-15 минут разрывал p2p-соединения. Сначала я грешил на программы, ибо DC++ клиент я собственноручно компилил из GIT-репозитория, а Ktorrent стоит из Unstable, но опытным путём (подключением компьютера напрямую, в обход роутера) выяснилось, что виноват всё-таки роутер.
На форумах у людей наблюдался целый ворох проблем, наличие которых зависело от типа соединения и версии прошивки. У меня стояла прошивка версии 2.0.2, а соединения пробовал как через шлюз со статическим IP, так и через PPTP-туннель (провайдер предоставляет оба варианта). На официальном FTP-сервере D-Link я нашел версии прошивок 2.0.1 и 2.0.5beta - с первой проблема осталась, а со второй интернет вообще не поднялся.
Тогда я начал перерывать интернет на предмет наличия сторонних прошивок и набрел на сайт DD-WRT.
По информации с сайта "DD-WRT — это сторонняя разработка прошивки (микропрограммы) под лицензией GPL для множества ieee802.11a/b/g/h/n беспроводных маршрутизаторов, реализованных на чипах Broadcom и Atheros."
Там же я узнал, что мой роутер "основан на чипе Ralink RT3050 SoC, и по всем отчетам, включая «Dlink's FCC test report», его PCBA (печатная плата) точно такая же, как в DIR-600."
Внимание! Это относится к модели DIR-300/NRU (аппаратная ревизия B1), к модели DIR-300 (ревизия A1) НЕ применимо!
Установка сторонней прошивки идентична установке/обновлению оригинальной, с той лишь разницей, что образ берется не с FTP-сервера D-Link, а отсюда.
Установка проходит автоматически, в конце нее роутер перезагрузится и браузер сообщит, что страница недоступна - ничего страшного, просто адрес роутера поменялся на 192.168.1.1
По умолчанию прошивки dd-wrt используют логин admin c пустым паролем, настраивается все тоже быстро, правда тут нет таких мастеров как у D-Link да и язык интерфейса английский, но если уж у Вас хватило умения перепрошить девайс, то и с настройкой Вы легко справитесь.
При переходе по адресу 192.168.1.1 после настройки отображается подобный экран со статистикой устройства:


Новая прошивка добавляет ряд новых возможностей: промышленное шифрование Wi-Fi расширенные настройки DNS, блокировка сайтов по маске и расписанию, блокировка p2p трафика, учет трафика, серверы VPN, SSH, Telnet и многое другое. Но главное - стабильность, за месяц постоянного использования не было никаких разрывов и зависаний. Небольшой совет для тех, кто воспользуется этой инструкцией: не стоит забывать, что у машинки не самый мощный процессор, поэтому, нагрузив его кучей сервисов, можно столкнуться с подвисаниями. Кстати, ешё одно преимущество данного устройство - оно абсолютно не шумит и абсолютно не греется, даже после долгой работы под нагрузкой.
В итоге за небольшие деньги я получил стабильный роутер с функционалом старших моделей.
a silhouette of a person's head and shoulders, used as a default avatar

Merging SVN Repositories Explained

Adding files to a SVN server is usually a task done in seconds. However, having several independent SVN repositories and wanting to “combine” them, this is not trivial—especially if you want to preserve the history.

The doc team had had three different, independent repositories on BerliOS (opensuse-ha-doc, opensuse-docmaker, and opensuse-lfl) all holding separate information. This was a bit silly, so my task was to consolidate them into opensuse-doc by keeping all history.

A SVN history is nice as you can see what you or others have done with the files. Loosing the history is the same as starting from scratch — which can be sometimes a good idea. In that case, the doc team wanted to preserve the history as we use it very often. So I had to think of a solution how to merge different SVN repositories into one. I came up with a solution containing the following steps:

  1. Create a test repository
  2. Create the dump files
  3. Filter the dump files and extract trunk only
  4. Rename trunk content
  5. Edit the dump files
  6. Load dump files into test repository

Several tools are needed: svnadmin and svndumpfilter are already available from the subversion package. Additionally, Darix recommended the svndumptool from devel:tools:scm:svn (thanks Darix!). A very convenient tool when dealing with SVN dumps.

Apart from this, all three SVN repositories consist of the usual trunk, branches, and a tags directories.

Step 1: Creating Test Repository

Before I got my hands dirty, I needed a test repository. Luckily, the subversion package contains everything what I need.  In my case, I’ve used the hotcopy command to create this test repository. I’ve logged in to BerliOS and made a hotcopy of my target SVN repository:

# ssh svn.berlios.de
# svnadmin hotcopy /svnroot/repos/opensuse-doc opensuse-doc

I did the same for my other repositories as well, just for safety reasons:

# svnadmin hotcopy /svnroot/repos/opensuse-lfl opensuse-lfl
# svnadmin hotcopy /svnroot/repos/opensuse-docmaker opensuse-docmaker
# svnadmin hotcopy /svnroot/repos/opensuse-ha-doc opensuse-ha-doc

Later, I will use the opensuse-doc hotcopy to test my modifications before I apply them to the production SVN repository. With this method, I wanted to make sure everything is correct. Of course, you have to be sure that nobody commits to your repositories, otherwise any later commits won’t be incorporated.

Step 2: Creating Dump Files

Dump files contain everything what’s inside a repository including SVN properties. However, they don’t contain the configuration or repository hooks from the repository. If you want to keep them, you’ll have to save them manually.

It’s very easy to create a dump file. In BerliOS, everything lives under /svnroot/repos/PROJECT:

# svnadmin dump /svnroot/repos/opensuse-lfl > opensuse-lfl.dump
# svnadmin dump /svnroot/repos/opensuse-docmaker > opensuse-docmaker.dump
# svnadmin dump /svnroot/repos/opensuse-ha-doc > opensuse-ha-doc.dump

The above lines create a dump file for each of my SVN repositories. As the BerliOS server doesn’t have the svndumptool command, I have to copy them to my own machine:

toms@earth:~ > scp shell.berlios.de:~/opensuse-*.dump .

Step 3: Extracting trunk

In most SVN repositories, tags and branches contain information which were at some point in time copied (for tags) or copied and modified later (for branches). I haven’t found a satisfying solution to use svndumptool and take into account these two directories. Anyway, I’ve decided to just concentrate on trunk and manually adjust tags and branches later. This makes it easier when dealing with dump files.

To extract only parts of a dump file, the svndumpfilter command is the right tool. Combined with the needed options and subcommands, I’ve used:

toms@earth:~ > svndumpfilter --renumber-revs --drop-empty-revs \
    include trunk < opensuse-docmaker.dump > docmaker-trunk.dump
toms@earth:~ > cat dumps/opensuse-ha-doc.dump | \
    svndumpfilter --renumber-revs --drop-empty-revs  include "trunk" | \
    svndumpfilter exclude trunk/package > ha-doc-trunk.dump
toms@earth:~ > svndumpfilter --renumber-revs --drop-empty-revs \
    include trunk < opensuse-lfl.dump > lfl-trunk.dump

The commands are not exactly the same, as the SVN repositories are slightly different. For example, the opensuse-ha-doc repo contained a trunk/package directory which I don’t want. Therefor you see the exclude command in svndumpfilter. The resulting dump files contain only trunk, nothing else.

Step 4: Renaming trunk Directory

The last step created dump files which contain only the trunk directory. The dump files can already be loaded into the target SVN repository. However, this is only partly successful. After loading you have to rename and move subdirectories around which is unconvenient. To avoid this cumbersome task, I’ve used the svndumptool command which does the job directly on the dump file!

For example, the former docmaker repository has to appear under trunk/tools/docmaker, not directly under trunk. This can be done with the merge subcommand of svndumptool:

toms@earth:~ > svndumptool merge -o docmaker-trunk-rename.dump \
   -i docmaker-trunk.dump \
   -s '^trunk' 'trunk/tools/docmaker' \
   -d trunk/tools/docmaker

The -d option creates the trunk/tools/docmaker directory in case it doesn’t exist in your target. The -i and -o options are the input and output stream of the dump files, -s contains a regular expression how to rename the source (^trunk) into the target (trunk/tools/docmaker). The other repositories are similar:

toms@earth:~ > svndumptool merge -o ha-doc-trunk-rename.dump  \
  -i ha-doc-trunk.dump \
  -d trunk/documents/ha/ \
  -s '^trunk/books/en' 'trunk/documents/ha/en' \
  -s '^trunk/books' 'trunk/documents'
toms@earth:~ > svndumptool merge -o lfl-trunk-rename.dump  \
  -i lfl-trunk.dump \
  -d trunk/documents/lfl/ \
  -s '^trunk/books/en' 'trunk/documents/lfl/en' \
  -s '^trunk/books' 'trunk/documents'

After this step I have three files, named *-trunk-rename.dump which contains the renamed directories.

Step 5: Editing Dump File

This step is a bit tricky and I haven’t found a better solution yet. Probably this can also be done with cat and sed magic, but I preferred vi. The task is to list the content of the dump files and decide which directory entries need to be deleted. This step is absolutely necessary to avoid any SVN error (something like “directory/file already exists”) when trying to load the dump file into the repository.

  1. Get an overview of the contents:
    toms@earth:~ > svndumptool ls ha-doc-trunk-rename.dump
    /trunk
    ...
    toms@earth:~ > svndumptool ls docmaker-trunk-rename.dump
    /trunk
    /trunk/documents

    Usually this is /trunk and probably some other directories (depending on the structure).

  2. Modify the dump file(s) and remove any directories which are available in the target SVN repository.
    The renamed directories from the last step contains a single trunk “node” which has to be removed. The same applies for trunk/documents. Both exist already on the BerliOS server. Manually edit the dump files and remove the following lines:
    Node-path: trunk
    Node-action: add
    Node-kind: dir
    Prop-content-length: 10
    Content-length: 10
    PROPS-END
    ...
    Node-path: trunk/documents
    Node-action: add
    Node-kind: dir
    Prop-content-length: 10
    Content-length: 10
      [[ Some other content could be available here ]]
    PROPS-END
  3. Save the dump file

Be careful! It is very important not to destroy any structure in the dump file!

I’ve checked the result with “svndumptool ls DUMPFILE”. No lonely trunk directory should be shown anymore. To be on the safe side, I’ve checked the two files with svndumptool check -A DUMPFILE, too.

Step 6: Loading Dump Files into Test Repository

The last step created the dump files with the correct structure. As this was done on my own machine, I have to copy the files back to BerliOS (remember to use the shell.berlios.de server):

toms@earth:~ > scp *-rename.dump  shell.berlios.de:

It’s almost done! Logged into BerliOS and loaded the dump files in my hotcopy test repository (see step 1):

# svnadmin load opensuse-doc  < docmaker-trunk-rename.dump
# svnadmin load opensuse-doc  < ha-doc-trunk-rename.dump
# svnadmin load opensuse-doc  < lfl-trunk-rename.dump

After playing around a bit, everything was successful. So I repeated it, but replaced the opensuse-doc hotcopy with the correct path /svnroot/repos/opensuse-doc.

The remaining pieces are the tags and branches directory. As revision numbers have been changed, the revision number in the original repository and the revision number in opensuse-doc are obviously not the same anymore. Creating tags can only be done with a correct date, because dates are preserved. For this reason, it is convenient to still have the original repositories around to look for the exact date and log message:

$ svn copy -r "{2010-10-20T10:00:00}" -m "..." \
   $BERLIOSURL/trunk/tools/docmaker \
   $BERLIOSURL/tags/tools/docmaker/obs

The branches are a bit different. Maybe the history can be preserved with the same method as with trunk, but I haven’t tried it. Our three repositories hadn’t had meaningful information in branch, or it wasn’t worth the effort.

Conclusion

The steps above showed how to merge different SVN repository into one while keeping the history.  Unfortunately, this task could be easier. Although svndumpfilter is very easy, it is also very limited. Especially when you have to modify the dump file itself, svndumpfilter won’t rescue you. It would be very good, if svndumpfilter could be extended to work with dump files in the same way as svndumptool. That would be fun. 🙂

a silhouette of a person's head and shoulders, used as a default avatar

Migrando Fedora para Opensuse part3

De volta ao trabalho, vamos para a terceira parte do nosso artigo. Conforme havia anunciado, vamos falar agora da instalação de alguns pacotes bem comuns, como plugins do java e do flash, codecs de vídeos, Google Chrome e Adobe Reader. Todos esses pacotes estão disponíveis através dos repositórios listados no artigo anterior.

Os codecs de vídeos estão disponíveis através dos pacotes gstreamer disponíveis na distro. O mesmo ocorre com o flash que possui o pacote (flash-player). Existem duas versões de java disponíveis: A versão da sun (java-1_6_0-sun e java-1_6_0-sun-plugin) e a versão do openjdk (java-1_6_0-openjdk e java-1_6_0-openjdk-plugin). Escolha a sua favorita e instale-a. Instale o pacote chromium para navegar pelo Google Chrome e acroreader para usar o Adobe Reader 9.

Nessa questão não vejo muita diferença entre o OpenSuse e as distros Ubuntu e Fedora. Todas disponibilizam esses programas através de seus próprios repositórios ou de repositórios desenvolvidos pela comunidade, enfim, a única preocupação é encontrar o repositório que possui o pacote desejado, que como vimos no capítulo anterior, é uma vantagem do OpenSuse.

Em breve, mais novidades nessa trajetória.

a silhouette of a person's head and shoulders, used as a default avatar

NGit

One of the features we want to include in the next MonoDevelop release is integrated support of Git. I committed a first version of a git add-in some months ago which works by invoking the git command and parsing the results. This solution satisfied some basic needs (Mono was moving to git at that time), but it was done as a short term solution, since parsing git output is not very reliable, and has portability issues.

The next obvious step was to use GitSharp, a fully managed .NET library which implements most of git commands. This library is basically a port of JGit, a Java library for doing the same. I started replacing the git invocations by calls to GitSharp classes, and I could implement the basic functionality, but I found some limitations that were not easy to overcome. On one hand, GitSharp was a bit outdated, lacking some of the recent features and bug fixes done in JGit. Bringing GitSharp up to date with JGit would be a lot of work, since every JGit commit had to be manually translated from Java to C#. On the other hand, GitSharp depends on a set of cryptographic libraries (required for the ssh protocol support) which we can't easily include in MonoDevelop due to export regulations.

I then decided to try a different approach: the idea was to use Sharpen, a free Java to C# translator implemented by db4o, to automatically convert the JGit code to C#.

After some weeks of work, I have been able to generate a C# library (which I call NGit) with all the JGit code. Most of the work went into tunning and fixing Sharpen, and into implementing in C# some core Java classes which didn't have direct replacement in Mono. This was more complex and took more time than I expected, but I think the effort is worth it. The generation of the library is automatic, although not perfect since it requires some patches in the java code and some patches in the generated code, but the patches are small and easy to maintain. Keeping NGit in sync with JGit is very easy, since it is just a matter of pulling the java code and running the conversion (I already have the conversion process automated in a makefile).

I've also been able to convert and run the JGit unit tests, and got 90% of tests working. The failures of the remaining 10% are in general due to different behavior of Java vs C#, or JUnit vs NUnit, and are not real NGit bugs (although I still have to review some of them).

In the process, I also converted Jsch, which is the library used by JGit for the ssh communication. The new NSch library only has Mono.Security as external dependency, so it will be much easier to distribute for us.

So, we now have a fully managed git library with ssh support without any dependency external to Mono. The library has around 56000 lines of generated C# code (including the unit tests). I recently published the source code in github.

I'm now implementing the git add-in using NGit. Most of the commands are already implemented, although I'll have to do some testing before I push it to master. There are still some performance issues I'm tracking down, but things are looking good. I intend to submit my fixes to JGit. My fist patch has already been accepted and pushed, and conveniently ported to NGit.

Update: I'd like to clarify the relation of NGit with GitSharp. GitSharp is composed by two libraries: GitSharp.Core.dll and GitSharp.dll. GitSharp.Core.dll is a manual port of JGit. GitSharp.dll is a more high level and .NET friendly API that wraps GitSharp.Core.dll. NGit can be a replacement for GitSharp.Core.dll, but GitSharp.dll is still useful, since NGit may be a bit too low level and java-ish for some use cases.

a silhouette of a person's head and shoulders, used as a default avatar

Read The Fabulous Manual

We have a new place where we collect static documentation like manuals, user guides, quick start pages, developer documentation … and so on.
This new place is: rtfm.opensuse.org doc.opensuse.org.
Our “fabulous manuals” are also accessible at: doc.opensuse.org (in case you don’t like the word “fabulous”).

A few days ago Thomas Schraitle already wrote about this site before it was in a state that we wanted to announce – so sorry for any confusion this might have created.

This site is not meant to be a competitor to the documentation in the wiki. It was rather born from the need to have a central place to publish generated static documentation. Content on rtfm is not meant to be edited. If you want to contribute documentation we very welcome this in the wiki and encourage  you to link back to rtfm where applicable. The pages on rtfm are static but however they will be updated automatically upon changes (new releases of a project or product).

Currently we have published some great user guides and quick start pages for openSUSE (KDE, Gnome, Security, …) and SLES (AppArmor, Admin Guide, kvm, Xen, Security, …) as well as a user and vendor guide for WebYaST. There is also developer documentation available for YaST and Zypp (libzypp, satsolver) development.
In the next days or weeks we will add more documentation as soon as it is ready to be published.

Update:
We changed the domain name of that site. To read the fabulous manuals please use and link only to doc.opensuse.org. The domain docs.opensuse.org will be alias for it – please only link to doc and do not use rtfm anymore. Thanks for your appreciation.

a silhouette of a person's head and shoulders, used as a default avatar
a silhouette of a person's head and shoulders, used as a default avatar

Migrando Fedora para Opensuse part2

Reeditando este artigo, seguindo dica de um comentário, resolvi enxugar a lista de repositórios, evitando que problemas com as diferentes versões de pacotes disponíveis em repositórios diversos possam gerar problemas.

Continuando o artigo, seguem alguns mais tópicos

2.1 Yast
Quem já usou o Suse/OpenSuse em algum momento já deve conhecer o Yast, para quem não conhece, ele é uma ferramenta de configuração do sistema, como o Painel de Controle do Windows, sendo ponto único para as ferramentas de configuração de Hardware, instalação de Software, Administração de Serviços e Contas de Usuários etc. Acho esse modelo melhor do que diversas ferramentas soltas, como o system-config-etc do Fedora/RedHat. Suas ferramentas são módulos que podem ser removidos/adicionados/substituidos sem alterar o ponto central de configuração.

2.1 Repositórios
Configuração de Repositórios extras no OpenSuse é muito legal. Ele já traz um serviço de busca por repositórios da comunidade de forma que pelo próprio Yast2 é possível adicionar/remover repositórios. Não é necessário uma única intervenção por linha de comando. Para usuários menos experientes, isso é ótimo.

Segue a lista dos repositórios que adicionei em minha instalação:

name=Repositório principal (NON-OSS)
baseurl=http://download.opensuse.org/distribution/11.3/repo/non-oss/
name=Repositório principal (OSS)
baseurl=http://download.opensuse.org/distribution/11.3/repo/oss/
name=Repositório principal (Contrib)
baseurl=http://download.opensuse.org/repositories/openSUSE:/11.3:/Contrib/standard/
name=Repositório principal de atualização
baseurl=http://download.opensuse.org/update/11.3/
name=Packman Repository
baseurl=http://ftp.uni-erlangen.de/pub/mirrors/packman/suse/11.3/

Instalação de Programas
O módulo do Yast para Gerenciamento de Software é muito semelhante ao Package-Manager do Fedora, sendo que para que já usa não terá nenhum problema para operar essa ferramenta. Uma pequena diferença fica por conta do solver, um script responsável por resolver os problemas de conflitos de dependências de pacotes. Ele permite maior administração por parte do Administrador do Sistema que pode inclusive ignorar os problemas detectados e manter o ambiente inconsistente. Não acho que isso seja bom para usuários menos experientes. Para usuários mais avançados, existem outras formas de fazer isso. Na minha avaliação, ponto para o Fedora nesse aspecto.

CompizFusion / Sax2

Infelizmente nessa versão, 11.3, o Sax2 ficou de fora. Sax2 é uma ferramenta de configuração de vídeo, e eu achava o diferencial do OpenSuse. Sempre senti falta de uma ferramenta a altura nas outras distros. De qualquer forma, não tive nenhum problema com configuração de vídeo em meu desktop. O hardware foi detectado e não precisei configurar nada, da mesma forma foi com Fedora e Ubuntu. Quanto ao CompizFusion, o OpenSuse já vem com um módulo de configuração dos Efeitos da Área de Trabalho com alguns recursos a mais que Fedora e Ubuntu. Ainda assim é menos completo do que o compizconfig-settings. De qualquer forma, gostei dessa ferramenta, que já vem integrada ao sistema, não é necessário instalar pacotes adicionais para configurar alguns efeitos extras. Ponto para o OpenSuse.

Ao final desse artigo, avalio o OpenSuse, até aqui como um Desktop muito bom, com algumas vantagens em relação ao Ubuntu e ao Fedora, e algumas outras, de forma que deixo os 3 num mesmo nível. No próximo artigo falarei sobre a instalação de plugins e codecs (Java, Flash e Vídeos) Google Chromium e Adobe Reader.