Mostrar mensagens com a etiqueta repackaging. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta repackaging. Mostrar todas as mensagens

sexta-feira, 25 de novembro de 2011

Sony Vaio Z21X9E/B (CEP) and Fedora 15 (x86_64)

Well, I'm one of the recent owners of a Sony Vaio VPC Z21X9E - who the heck is giving these brand model names at Sony?? - so, as everyone does when they get a new computer, I went to install my operating system - Linux. And, despite having said that it would probably not be Fedora again, well..... it was. And, yes, I was still using a 2-year-old distribution...

Installation


It worths mentioning that this laptop does not have a CD-ROM drive, so you either plug in an external one, use an USB pen or just kickstart it.

You might want to pass the following options on installation if you're getting a blank screen:

i915.modesetting=0


If you want to preserve the Windows installation you will probably have to resize the "big" partition manually: I couldn't get anaconda, nor Ubuntu installer, nor SuSE's, so in the end, I gave up and went using the resizentfs tools.

Also, if you plan to wipe off the Windows partitions completely, you might want to try to tune the disk first by aligning the SSD. I didn't: I was hungry for having it installed, and I already spent much time trying to install Linux without blowing Windows (it may become handy to debug some USB... :-)

Hardware


Networking


Ethernet (Wired)


Although the Ethernet NIC was correctly detected, the base kernel driver r8169 had some stability problems. My first yum update brought kernel 2.6.41.1 with the problem fixed. But it worths mentioning that first I had installed the Realtek's official driver (donwload link) and it performed pretty well.

If you're dealing with recent kernels, you may have noticed about Consistent Network Device Naming. Well, in short, I don't like it :) So I told udev to get my 'eth0' back - can you imagine? It was called p3p1! :)


cat > /etc/udev/rules.d/80-compatibility-net.rules << EOF
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:42:49:97:75:22", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
EOF

This is a two line file (first line is a comment), but Wordpress breaks it.

Wireless


Although the wireless card (Intel Corporation Centrino Advanced-N 6230) was detected, the driver iwlagn needs firmware (you'll notice that on 'dmesg'):

yum install iwl6000g2b-firmware.noarch


Broadband internal modem (Gobi 3000)



I'm still wandering around on a good approach to this one. Many many info scattered around the web, with different results, with different models. For now, let me just reference to the Gobi drivers project page. I'll get back on this as soon as I have something similar to an understandable approach.

Touchpad / Clickpad



You will quickly notice that the touchpad (actually, a Clickpad, I learned) will misbehave, leading to cursor jumps when you try to click, ignoring drag&drop, etc. It seems the synaptics x.org driver is pending some clickpad awareness changes - for a long time now, I must say - and that's why you will find the problem solved in (and by) many (other) distributions. Not in Fedora, though, at least in this case. In Bugzilla #590835, comment35, thanks to Alexander Gryanko, you will find a source RPM for a workaround. After recompiling and installing over your current xorg-x11-drv-synaptics driver, the clickpad won't perform as well as in Windows, yet, but it will fix the annoying pointer-jump and will allow you to drag&drop and select text, which was impossible.

I've also read about using "i8042.nomux=1" as kernel arguments, or Sony Jogdial overlapping the default touchpad (noticeable on the logs) but didn't go that way. I'd like to hear from your experience about this, though.

Also, installing gpointing-device-settings might become handy later on...

yum install gpointing-device-settings


Keyboard Fn keys


They all seem to perform well, except for brightness control. I've seen many people complaining about this. Loading the sony_laptop module seems to do the trick.

modprobe sony_laptop

Display


While you had to run the installation without modesetting, after the forementioned update (to kernel 2.6.41.1), the system now runs with modesetting, thus giving you the graphical boot.

Other hardware



  • Webcam - out of the box;

  • Audio - out of the box;





Software


Frequently used applications


I found a lot of good suggestions here, although I always go installing the software along the way, as I need it. So this section is mainly targetting some special care needed for specific apps.

Java


I like to (I actually have to) use both a legacy most stable version (1.6x) and a most updated stable version (1.7.x) due to professional reasons, so I like to have alternatives properly setup so I can switch between them easily. This is something that the Java RPM distribution should be doing automatically (for some years now), but they still don't:

alternatives --install /usr/bin/javaws javaws /usr/java/default/bin/javaws 10
alternatives --install /usr/bin/java java /usr/java/default/bin/java 10
alternatives --config java
rm /usr/java/default
ln -s /usr/java/jdk1.6.0_29 /usr/java/default


Tweaking the environment


Fallback mode (ignore gnome-shell)


I hated gnome-shell. I understand the distribution maintainers want to push new stuff into the audience, but I still feel most of the changes happened on Gnome 3 are pretty unfair for a desktop user. My computers are not a tablet, I can't point with the finger, so this gnome-shell thing (Unity in Ubuntu, and alike) is just garbage for me. I don't like them because they make me loose more time to find my things - which I had somehow inconsciently automated. So, obviously, I'm running in the "fallback mode", which you can set using the gnome-control-center, on a unobvious "System Info" icon.

Delete key behaviour


After that, I spent some time trying to get back to the old behaviour, like using the DELETE key for what it used to do: delete stuff. Through the following command, you'll be able to mouseover menu options and set the accelerator (shortcut) by pressing DELETE twice on the option "Move to Trash". Learn more here.

gsettings set org.gnome.desktop.interface can-change-accels true


Desktop area management and icons


I believe this has been forgotten about the fallback mode: we used to have icons and be able to create folders and other nautilus operations, so I want that.... again. You can use dconf-editor to edit the configuration visually or using gsettings, again:

yum install dconf-editor
gsettings set org.gnome.desktop.background show-desktop-icons true


Adding menu entries


Maybe it's just a fallback miss, but it won't originally let you modify the Applications menu. For that, you'll have to install alacarte and run it from console (or ALT+F2):

yum install alacarte

The entries created with alacarte (0.13.2-3) will miss the category no matter if you specify it on item creation. To place the icons where they're due, you'll have to edit the shortcuts, which are placed at ~/.local/share/applications. Just add an entry Categories=Development (example) and wait a couple of seconds so the panel freshens up. If you're wondering about which categories to place, grep through /usr/share/applications/*.desktop for examples.

Tuning


I was reading some of the powertop suggestions and doing some reading in the meanting, so these seemed to be worth considering:

Disable NMI Watchdog (ref):

echo 0 > /proc/sys/kernel/nmi_watchdog


Set wwan0 down if you're not going to use it

ifconfig wwan0 down &


Disable Wake-up On LAN:

ethtool -s eth0 wol d &


Enable laptop mode, I don't know if it's still relevant nowadays (ref):

echo 5 > /proc/sys/vm/laptop_mode


Some interesting stuff I read on LessWatts:
Scheduler tunables for multi-socket systems (ref

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings


Set vm writeback to 10 secs (lose 10 secs on crash):

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs


Disable bluetooth entirey

hciconfig hci0 down


Disable wireless - if you'r not going to use it... maybe this could be integrated with the physical switch of the Vaio...

ifconfig wlan0 down
modprobe -r iwlagn


Enable Audio HD powersave

echo 10 > /sys/module/snd_hda_intel/parameters/power_save &



I will hardly make any kind of power consumption comparison between Windows and Linux - I won't be in Windows that long :-) - but, anyway, it makes sense to not leak power on unused components.

That's all for now.

quarta-feira, 30 de dezembro de 2009

NRPE for Endian Firewall

Finally I had the time to compile NRPE (the nagios addon) for Endian Firewall. If you are in a hurry, look for the download section below.

First of all, an important finding is that Endian Firewall (EFW) seems to be based on Fedora Core 3, so maybe sometimes you can spare some work by installing FC3 RPMs directly. And that's what we'll do right away, so we can move around EFW more easily.

Packaging and installing NRPE




Packaging and installing nagios-plugins




  • Grab the source at: http://sourceforge.net/projects/nagiosplug/files/


    cd /root
    wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.14/nagios-plugins-1.4.14.tar.gz/download



  • Repeat the procedure you did for NRPE: place the tarball on SOURCES and the spec file on SPECS:

    cp nagios-plugins-1.4.14.tar.gz /usr/src/endian/SOURCES/
    cd /usr/src/endian/SOURCES/
    tar xfvz nagios-plugins-1.4.14.tar.gz
    chown -R root:root nagios-plugins-1.4.14
    cp nagios-plugins-1.4.14/nagios-plugins.spec ../SPECS/



  • This bundle of plugins includes the so-called standard plugins for nagios. They are a lot and you maybe can just cut some off so the building is quicker. Also, you may avoid depend on perl(Net::SNMP), perl(Crypt::DES) and perl(Socket6) - which you can grab from DAG's RPM repo (remember the FC3 branching).


  • cd /root
    wget http://dag.wieers.com/rpm/packages/perl-Net-SNMP/perl-Net-SNMP-5.2.0-1.1.fc3.rf.noarch.rpm
    wget http://dag.wieers.com/rpm/packages/perl-Crypt-DES/perl-Crypt-DES-2.05-3.1.fc3.rf.i386.rpm
    wget http://dag.wieers.com/rpm/packages/perl-Socket6/perl-Socket6-0.19-1.1.fc3.rf.i386.rpm


  • Finally, install everything:

    rpm -ivh perl-Net-SNMP-5.2.0-1.1.fc3.rf.noarch.rpm \
    perl-Crypt-DES-2.05-3.1.fc3.rf.i386.rpm \
    perl-Socket6-0.19-1.1.fc3.rf.i386.rpm \
    /usr/src/endian/RPMS/i386/nagios-plugins-1.4.14-1.i386.rpm





Final notes


Be aware that this is a sample demonstration. I was more interested in having it done for my case - since I can fix future problems - rather than doing a proper/full EFW integration. If you think you can contribute with tweaking this build process just drop me a note.

Download


Here are the RPMs which include the supra-mentioned tweaks (this required extra patching on the .spec file and include the patch within the source):

quinta-feira, 27 de agosto de 2009

Update on mysql-query-browser "affected rows"

Yesterday I tried massaging mysql-gui-tools a bit to see if I could make affected rows show up on modification DMLs, sucha as INSERT, DELETE and UPDATE. Here is a briefing about it, along with all the patches I used, some taken from the current Fedora 10 source RPM, along a rude one by myself to show affected rows.

Update

Fixing the problem on the root will take a bit more time. This kind of protocol information, such as affected_rows is lost because the guys at MySQL considered that DML changing data never return usefull results - but actually they do: the response protocol packet comes with logs of info, like if you used an index, if you are in a transaction, etc. It could have been due to the protocol changed over time and the Query Browser didn't catchup.

This translates to a lot of fixes: adapting the methods discarding results only when variable result is NULL for not doing that, and find a way to leave affected_rows set somewhere.

So, for the moment, here is a list of patches I used, the bold are my own. The RPM will have to wait, since I wanted to release mysql-gui-tools-5.0r14 (which are the versions you should apply these patches against) instead of the r12 currently available. In the meantime, if I find more patches to submit, may be I have a real look at it. Here are the patches:

quarta-feira, 26 de agosto de 2009

Compiling mysql-gui-tools

Me and a colleague were missing some features in mysql-query-browser and am trying to have a look at them, since no one at MySQL AB is very interested in supporting it. So I thought I could have a look at it. System is Fedora 10 (still), and I use it mainly because it's small, simple to use, and it's GTK!


Setting up the building (compile) environment

Got the sources from the notes at MySQL Forge: Building MySQL GUI Tools on Linux:

[code]
svn co http://svn.mysql.com/svnpublic/mysql-gui-common/trunk mysql-gui-common
svn co http://svn.mysql.com/svnpublic/mysql-query-browser/trunk mysql-query-browser
[/code]

You'll need a patch from Oden Eriksson attached to Bug #32184, or you can use the one from the RPM - otherwise you'll get the error error: ‘SigC’ has not been declared found on that bug report. I had to cut it for building from the SVN tree, and patched mysql-gui-common and mysql-query-browser independently (split the patch).

Building mysql-gui-common is straightforward:

[code]
./autogen.sh
./configure --prefix=/home/nmct/mysql-query-browser/fake
make -j 2
make install
[/code]

Building mysql-query-browser seems to need explicit pointing to the libgtkhtml besides the packages it mentions on error:

[code]
[root@speedy ~]# rpm -qa | grep gtkhtml | grep devel
gtkhtml3-devel-3.24.5-1.fc10.i386
[root@speedy ~]# rpm -ql gtkhtml3-devel | grep pc
/usr/lib/pkgconfig/gtkhtml-editor.pc
/usr/lib/pkgconfig/libgtkhtml-3.14.pc
[/code]

So it's easy to spot the needed --with switch. I had to apply several other patches that I just took source RPM. Most of them were applied with -p2.

[code]
[nmct@speedy mysql-query-browser]$ patch -p 2 < mysql-gui-tools-5.0_p12-libsigc++-2.2.patch
patching file source/linux/MQResultTab.h
[nmct@speedy mysql-query-browser]$ patch -p2 < mysql-gui-tools-gtksourceview-cflags.patch
patching file source/linux/Makefile.in
Hunk #1 succeeded at 119 (offset 17 lines).
[nmct@speedy mysql-query-browser]$ patch -p2 < gtk_deprecated_typedefs.patch
patching file source/linux/gtksourceview/gtksourceview/Makefile.in
...

...
./configure --with-gtkhtml=libgtkhtml-3.14 --prefix=/home/nmct/mysql-query-browser/fake
make -j 2
make install
[/code]

And that should be it - actually there was a path concatenation issue (looking for ...fake/usr/local/share...) which I quickly fixed with symlinks. After that, we should be ready to rock.


First patch: mysql_affected_rows

One of the features I miss most is the number of affected rows of some DML commands, such as UPDATE and INSERT. This was not easy to do in five minutes because of the UI split: mysql_affected_rows() doesn't seem to reach the GUI. So I've made a simple test, and succeeded.

mysql-query-browser-affected-rows1

This looks promising. I just set a global var, which will do for now. I still have to check for potential race conditions, but expect the polished patch, along with a new RPM for Fedora 10, at least, in the near future.

sábado, 4 de abril de 2009

Monitorização de plataformas com cacti - LVS

Descobri que existe um módulo completo de Net-SNMP para as estatísticas de IPVS, o net-snmp-lvs-module. O ponto de partida é, naturalmente, a FAQ de LVS, que nos leva para o dito cujo. Os gráficos talvez possam ser mais trabalhados, particularmente no que toca ao valor InActConn, mas para já não tenho tempo.