Setting optimizations for rpmbuild in Fedora 12 i686
Note to self:
Fedora 12 Koji settings for i686 builds are:
CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables}"
CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables}"
FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables}"
export CFLAGS CXXFLAGS FFLAGS
using bash.
In order to set this up for a rpmdev/rpmbuild local environment, one must add this to .bashrc or the initialization file of one’s preferred shell, whatever that is, adjusting the syntax as needed.
And to have binary rpms with the correct arch settings, add this to ~/.rpmrc:
%_target_platform i686-redhat-linux %_build_arch i686
Although _target_platform is redundant it is better to be safe than sorry,,, CAVEAT LECTOR: I’m certain this is not the way to do it, cleanly at least. RPM is… Well… Complicated. We go a long way and I still can’t stomach the thing.
Installing and dual-booting Debian GNU/kFreeBSD
Now that Debian GNU/kFreeBSD is an official part of Debian, it is time to play around with the new toy. But in order to do such feat there are several issues that have to be resolved on the path to success. Assuming you use Debian GNU/Linux with GRUB2 (as seen in testing and unstable these days) and have a spare partition or two you can try it out on live hardware instead of an emulator.
Installing Debian GNU/kFreeBSD
- Use the Debian-Installer (D-I) monolithic images available at http://d-i.debian.org/daily-images/, and make a network install.
- The installer image uses GRUB2 instead of syslinux (for obvious reasons), thus you cannot set debconf priority before booting into D-I.
- Because Debian GNU/kFreeBSD is broken in testing as of this writing, you’ll need necessarily to set debconf priority to medium in D-I in order to install unstable a.k.a. Sid.
- Setting debconf priority is easy. The first installer prompt will ask for the language you want to use for installation. Don’t select a language, instead tab to the “Go Back” button, exit to D-I’s main menu, set debconf priority to medium and start again from the top.
- When selecting a mirror, select unstable as the distribution to install.
- When partitioning, you may create or use an already existing primary or logical partition, but the FreeBSD kernel will be happier if you use a primary partition.
- Do not, I repeat, do not install software. Skip this step. Aptitude is foobar today and perhaps for sometime yet. Read the report to learn how a bug report is written. Use
apt-getby hand instead. - Finish the install without installing GRUB2, The package in Sid is somewhat broken (or bug fixed, whichever you choose to believe) and refuses to install on UFS filesystems and will insist on installing on the MBR. Skip it. We will be using the GUB2 installed in the MBR by our Debian GNU/Linux install.
Dual booting Debian GNU/kFreeBSD
This is where all the advice on creating a boot entry for GRUB2 out there in the intarwebs is wrong. Why? Because kFreeBSD has been repackaged to match the packaging of Linux. So in order to boot Debian GNU/kFreeBSD from our main GRUB2 install, we need to add the following to /etc/grub.d/40_custom:
menuentry "Debian GNU/kFreeBSD" {
insmod ufs2
set root=(hd0,3)
kfreebsd /boot/kfreebsd-8-0-1-686.gz
#kfreebsd_module_elf /lib/modules/8.0-1-686/acpi.ko #not necessary, statically linked
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ad0s3
set kFreeBSD.vfs.root.mountfrom.options=rw
}
And run update-grub. Obviously that’s the set up in my box and it won’t work as is in yours. If you can’t find that information on your own, oh well.
What are Debian devs smoking? I want some, yeah!
This is just too good even for the The Daily WTF
# aptitude install -R devscripts Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information... Done Initializing package states... Done Reading task descriptions... Done The following NEW packages will be installed: devscripts The following packages are RECOMMENDED but will NOT be installed: at bsd-mailx bzr chimera2 conkeror cvs cvsnt dctrl-tools debian-keyring debian-maintainers dillo dput dupload edbrowse elinks elinks-lite elvis elvis-console epiphany-browser equivs galeon git-core heirloom-mailx iceape-browser iceweasel kazehakase konqueror libauthen-sasl-perl libcrypt-ssleay-perl libparse-debcontrol-perl libsoap-lite-perl libterm-size-perl liburi-perl libwww-perl libyaml-syck-perl links links2 lintian lsb-release lynx-cur mailutils mercurial midori netrik netsurf netsurf-gtk netsurf-linuxfb netsurf-sdl netsurf-vnc openssh-client patchutils strace subversion svk tla unzip w3m wdiff xemacs21-mule xemacs21-mule-canna-wnn xemacs21-nomule 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 593kB of archives. After unpacking 1745kB will be used. Writing extended state information... Done Get:1 http://ftp.us.debian.org sid/main devscripts 2.10.59 [593kB]
WTF?
Evolution, Google Calendar and CalDAV
I dunno what’s wrong with GNOME Evolution’s native Google Calendar support, but for me it hasn’t been nothing but a disappointment. A while ago during an speleological expedition in Google’s Help site, I found how to use CalDAV instead of the Google connector. In order to access the main calendar one uses the address:
caldav://www.google.com/calendar/dav/LUSER@gmail.com/events
Unfortunately this doesn’t give access to other calendars one may have in the account. If using Apple’s iCal or Mozilla’s Sunbird/Lightning, or whatever name their calendar has these days, you can use the address:
caldav://www.google.com/calendar/dav/LUSER@gmail.com/user
to retrieve a list of calendars, pick and choose.
Disabling IPv6 in Debian Sid
Note to self: since the Debian Kernel Team in all their infinite wisdom decided to compile statically the IPv6 modules, all the alias-meh and blacklist tricks to disable it are useless. What the pundits out there have missed since the beginning of time (or close to it: the inclusion of the IPv6 code in Linux 2.5/2.6) is the sysctl magic thingy to disable it.
Open /etc/sysctl.conf in your favorite editor and type the dark rune:
net.ipv6.conf.all.disable_ipv6 = 1
save and reboot. (I don’t recommend changing this setting on a running system, it can have unexpected side effects).
CAVEAT LUSER: Yes Joe, this works in Ubuntu as well as any GNU/Linux® distro that integrates sysctl in its init system.
Bye, bye The Inq
I’ve been a fan of Mad Mike Magee for a long time and always followed his site The Inquirer with a knack to keep in touch with technology and have a good laugh at the same time. But in the last months (since the “relaunch” on 1st of January this year) the site has become more and more drooling to the point of being intellectually unsavory. I was wondering why until last night while keeping up with two weeks of unread cruft in my RSS aggregator, a piece of news caught my eye: one of the old-time hacks, Paul Hales, retired. Off I went and discovered several things:
- Mad Mike sold The Inq two years ago and I didn’t notice. Jeez, my brains have been on vacation for too long!
- Mad Mike is a fan of Inspector Morse. (I’m a fan of Inspector Lewis too, FWIW).
- Mad Mike is writing at TG Daily.
- Charlie Demerjian is writing at SemiAccurate.
And last but not least, I agree with Mad Mike: He sold a house and the new owners have turned it into a brothel.
Wine and µTorrent can rot an Ext3 filesystem
Note to self: All bittorrent clients are horrid. Some have a bearable stench, others haven’t. And for some reason these days I find all POSIXy clients are despicable to me.
Thus enter µTorrent running under wine. And I start getting these weird filesystem errors that could eventually eat the whole filesystem where there are some really rare and valuable files. I started poking at the problem and discovered that uTorrent has its own disk-cache manager that of course enters in conflict with the Linux one. There you have a testament to the design flaws of the Windows NT VM and the NTFS filesystem. Fortunately you can turn it off.
So I’ve settled on this configuration:
- Linux: 2.6.30 (yeah, a release candite for now), makes Ext filesystems work in writeback journaling mode with write safety.
- Filesystem: Ext3 with write barriers enabled to cover your backside against hardware write cache idiocy.
- wine: A very recent vintage
- uTorrent: The latest wit all disk cache settings disabled.
Courier 15 CPI crawls back from the woodwork
Earlier this week I was contacted by Alan G. Isaac asking me about the whereabouts of the Courier 15 CPU aka Courier Dot 15 fonts I made several years back. The old website at Tripod is gone and I’ve redirected my energies to other interests in the meantime.
I’ve digged up the fonts from old backups and I’ll repost them all in this blog. Let’s see if I’m game to start hacking fonts again.
How to fix the new MS fonts in POSIXy systems
OK, you’ve got your new computer preinstalled with MS Vista and/or MS Office 2007. You didn’t waste time to install your favorite GNU/Linux distribution or BSD flavor and took the time to comb down that Windows partition for goodies the license and Title 17 of the US Copyright law may warrant you to use. That is, unless George of the Bush hasn’t killed it already with the help of his friends in the US Congress, each and every one of whom make Sarah Palin look like a Nobel Prize Winner, ten years in a row.
You find those nice fonts with names starting with “C”, Calibri, Cambria, Candara, Consolas, Constantia and Corbel. Diligently you copy them into your $HOME/.fonts directory and run the magic command fc-cache -r -v in a terminal emulator window, go to the font settings application for your preferred desktop environment and change the monospaced font to Consolas (new font from MS, several years in development, it has to be the ultimate coding font, right?). Open a new terminal or a text editor and you discover it is hideous! Blocky, blurry and bold although you made a point of not using bold in the settings, Something you learned the hard way after having written The Great American Novel, a thousand pages worth, printed it in Comic Sans Bold 10 points to save paper and sent it to your prospective editor, who answered back thanking you heartily for all the toilet paper supplies you sent along the other day.
The problem is that the MS “C” fonts are hinted in such way that they don’t work well if you don’t use subpixel rendering and as far as I can see there is no real traditional hinting in them worth a cent. Even after you fiddle with the LCD-type settings there is no improvement, because most GNU/Linux distros default to use the patented bytecode interpreter, which works just fine with traditional truetype hints, instead of the patent unencumbered autohinter (in typical “Bite me!” attitude). Even those distros that give you the choice to use one or the other, such as Debian, have for the most part managed to bastardize the code resulting in Freetype working as it shouldn’t. And all downstream distributions, including Ubuntu, receive the same turd.
But don’t fret! There are ways to work around the ugliness. We can create a $HOME/.fonts.conf like this:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Use the Autohinter -->
<match target="font">
<test name="family">
<string>Calibri</string>
<string>Cambria</string>
<string>Cambria Math</string>
<string>Candara</string>
;<string>Consolas</string>
<string>Constantia</string>
<string>Corbel</string>
</test>
<edit name="autohint" mode="assign"><bool>true</bool></edit>
</match>
</fontconfig>
That ought to fix the ugliness, although results will vary depending on how bastardized is the Freetype library in your system. Of course you can add more configurations to the file as long as you respect the XML syntax. Do be careful if using KDE(3/4) because the KDE font configuration tools love to eat users .fonts.conf files raw and spit them out in pieces.
Using a desktop client with a Tripod Blog
It is a thing of finding the darned URI:
http://blog.tripod.lycos.com/bin/blog/control.rpc
and using the MetaWeblog protocol to login.