Date: Fri, 31 Dec 2010 07:15:44 +0200 From: "Luchesar V. ILIEV" <luchesar.iliev@gmail.com> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: freebsd-emulation@FreeBSD.org, Atanas Terziyski <atanas@uni-plovdiv.bg>, Vedrin Jeliazkov <vedrin.jeliazkov@gmail.com> Subject: Re: ports/136321: x11-toolkits/linux-pango: please update linux based port of pango Message-ID: <4D1D6700.3090805@gmail.com> In-Reply-To: <20101230075224.00004e5b@unknown> References: <4D1BF086.4020902@gmail.com> <4D1BF4B4.8090403@gmail.com> <20101230075224.00004e5b@unknown>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Alexander, Thanks for the quick reply. On 12/30/10 08:52, Alexander Leidinger wrote: > How much diskspace did you need for this? Can you please give a short > description what you did and how you did it for those people which never > used VirtualBox (links to official HOWTOs are enough)? Please also > describe what you had to install exactly and which commands you used to > generate the linux rpm. > > If your description is good enough to reproduce it, you may be lucky > and a FreeBSD committer gets enough time to reproduce the rpm. Here's a step-by-step description of the process. I apologize if some of the steps seem too trivial to mention to some people -- I hope it's better that way, rather than leaving someone else wonder how A --> B. == Background == Very brief information on the set-up: * kern.version: FreeBSD 8.2-PRERELEASE #7: Tue Dec 28 18:31:25 EET 2010 * hw.machine: amd64 * hw.model: AMD Athlon(tm) 64 X2 Dual Core Processor 6400+ * hw.physmem: 6413586432 * hw.usermem: 3517202432 * 2x SATA 1.5Gb/s: zpool(1m) mirror + UFS2 on geli(8)-over-gmirror(8) * Xorg, nvidia-driver (NV8800GT), GNOME, Compiz from the latest ports. ...and most importantly... * emulators/{virtualbox-ose,virtualbox-ose-kmod}, both version 3.2.12 VirtualBox (VB) has been compiled with the QT4 front-end. While it does support running on headless servers, I've never tried that. If such configuration is desired, please let me know, and I'll see if I can figure out how to deal with it. I also suspect that if VB is run on top of Windows, there wouldn't be much difference. == Intro notes == It's hardly necessary to explain how to install the two VB ports, but here are some things to keep in mind: 1. The VB kernel module must be loaded. I haven't tried kldload(8) on a running system, but using loader.conf works just fine: # echo 'vboxdrv_load="YES"' >> /boot/loader.conf 2. If you want to use bridged networking as opposed to NAT: # echo 'vboxnet_enable="YES"' >> /etc/rc.conf 3. Unless VB is run as root (haven't tried it), you have to add the user who runs it in the "vboxusers" group, eg: # pw groupmod vboxusers -m <username> The port actually reminds of these things on successful installation. One thing that I could add, and that might be IMPORTANT: VB seems to freeze sometimes, with the current window becoming unresponsive, and, eventually, also the main window. Often, but not always, the disk icon stays in permanent "read" or "write" state. I haven't yet had the time to investigate into this, but it seems so far to be related to the ZFS filesystem, possibly when using "dynamically-expanding" virtual disks. I can't say it's conclusive, but again so far I haven't had that type of problems with virtual disks created on UFS2 (even if "dynamic"). Since you asked about the required diskspace, VB suggests 8 GB virtual disk for Fedora installations, and that seems just about the right size, as with the dynamic option it comes to about 6 GB. If anything in the following description concerning VB isn't quite clear, there's excellent online documentation here: http://www.virtualbox.org/manual/ == Setting up the Virtual Machine - Part I == So, the ports are installed and the kernel driver is loaded. On GNOME, VB should be in Applications --> System Tools --> Oracle VM VirtualBox. 1. Select "New" (Ctrl+N). ...the Virtual Machine Wizard opens... 2. Choose a name (VB is smart enough to guess the type from the name ;) 3. The recommended default of 512MB base memory seems to be fine. 4. Leave "Boot Hard Disk" checked and "Create new hard disk" selected. ...the Virtual Disk Wizard opens... 5. Select either dynamically expanding or fixed-size disk. 6. Select a filename and location (again, UFS2 seems preferable to ZFS). NB: As already mentioned, the recommendation of 8GB works fine. 7. Finish both wizards. While there are a lot of settings that could be adjusted, the defaults seem OK for the task. You do however need to load an appropriate boot disk -- most likely a CD/DVD. For my setup, I used the Fedora 10 DVD, but the net-install CD version is likely to save you some time updating, and is also a mere 129 MB, compared to 3.4GB. Choose a mirror: http://mirrors.fedoraproject.org/publiclist/Fedora/10/i386/ And download one of these (again, netinst is probably the best choice): 086fd570518ac58d3966c43c1b6d146e38919d8d *Fedora-10-i386-DVD.iso 8f34cf6b8996c2a49578928aa437244f357ab0c2 *Fedora-10-i386-netinst.iso Quick-link: http://ftp.heanet.ie/pub/fedora-archive/fedora/linux/releases/10/Fedora/i386/iso/Fedora-10-i386-netinst.iso == Setting up the Virtual Machine - Part II == Now let's get back to VB: 1. Select the newly created VM. 2. Choose "Settings" (Ctrl+S). 3. Select "Storage" on the left. 4. To the right, select the empty CD icon under "IDE Controller". 5. Further right, click the folder icon next to "CD/DVD Device". ...Virtual Media Manager opens... 6. Select "Add" and point to the location of the ISO image. 7. Back in the "Virtual Media Manager" select the added image. ...the image filename should now be standing next to the CD icon. Here's possible to decide whether to use the filesystem caching of the host system or not. Sun/Oracle suggest leaving it on for IDE, but it's turned off by default for the virtual SATA controller. I haven't made any tests, but from naive observation the option does seem to have positive effect when turned on -- yet, there are also drawbacks: http://www.virtualbox.org/manual/ch05.html#iocaching If you need to configure your network differently than the standard NAT, you should check also the "Network" options. Otherwise, the VM is ready to have Fedora installed onto it. == Installing Fedora 10 - Base Install == I'll be skipping the most trivial steps like entering hostname, time zone, or root's password. 1. Push start; you should promptly get the Grub installation menu. 2. Select "Install or upgrade an existing system". 3. There's hardly need to check the ISO image, so "Skip" the test. ...you should now get Anaconda's graphical installer screen... NB: At this stage, mouse integration does not work yet; however it's turned on by default. To be able to control the mouse in the guest system, select Machine --> Disable Mouse Integration from VM's menu. Now, when you click in the VM window, it'll capture the mouse. To release it, use the "Host" key, which is displayed at the right end of the status bar; by default, that's the right Ctrl key. 4. You'll be warned (unsurpisingly) that there's no partition table on the virtual drive. Let the installer create it for you. 5. Unless you have reasons to do otherwise, default disk layout works just fine (an ext3 /boot partition, the rest is LVM: ext3 / and swap). 6. If you're using the net-install CD, you'll need to configure the network at this point. DHCP works flawlessly with the default NAT. 7. Deselect "Office and Productivity" and select the "Software Development" software groups. NB: If using the DVD, it would be wise either to select the "Fedora 10" repositories and deselect the "Installation Repo", or to not select "Software Development" at this stage and install the group later. Otherwise, you'll end up with a lot of packages requiring update. NB2: I haven't checked the exact size of the downloaded packages, but it's likely in the range of 1.0-1.5 GB. Obviously, that could take quite a lot of time on a slow Internet connection. 8. After the installation is finished, before you reboot, it would be wise to "remove" the ISO image from the virtual drive. Easiest way to do this is by right clicking on the CD icon in the status bar and deselecting (that is, clicking on) the currently selected image (with a check mark beside it, which should then disappear). == Installing Fedora 10 - Final Setup & Updating == If all went well, you should have the newly installed Fedora boot now. There are a few more bits that need setting up, though. Especially if you installed from the DVD, you'll likely need to update the system. 1. Open a Terminal (hint: Application --> System Tools). 2. Run: # yum check-update # yum update NB: Again, if you installed from the net, that's not exactly necessary. If, however, you did install from DVD and did not select "Software Development" during installation (likewise, if you didn't select it during the net-install), you'll also need to: # yum groupinstall "Development Tools" NB: Not sure if "Development Libraries" need to be installed as well -- the "Software Development" option in Anaconda installs both. == Installing Fedora 10 - Guest Additions == Now you'll likely want to install VB's Guest Additions. http://www.virtualbox.org/manual/ch04.html They'll give you the mouse integration, the full range of (dynamically changed) screen resolutions and other neat features, like shared folders (see the end of this description for more info). 1. Run: # yum install dkms 2. Load the Guest Additions ISO image: easiest is to select Devices --> Install Guest Additions (Ctrl+D) from VB's menu. NB: This really does nothing more than loading the CD image into the virtual CD/DVD drive. 3. The automounter should've mounted the CD for you; otherwise you'll need to mount it yourself manually: # mount -t iso9660 -o ro /dev/sr0 /mnt 4. CWD to CD's root, respectively /media/VBOXADDITIONS_3.2.12_68302/ or /mnt/, depending on how it was mounted. 5. Run VBoxLinuxAdditions-x86.run from there: # sh ./VBoxLinuxAdditions-x86.run NB: This will fail without the development tools installed. 6. Unload the ISO image (you might want to umount it first, if mounted manually) from the virtual drive and reboot. == Setting up for RPM development == If all went well, you should now have larger "screen" and seamless mouse integration (no need to use the "host key" any more). Time to prepare the RPM development environment. 1. Run: # yum install rpmdevtools # yum install libthai-devel NB: This is needed for the Pango build. $ rpmdev-setuptree NB: Note that this is run as non-root user, as indicated by the prompt. 2. Get the latest Pango source: $ wget -P rpmbuild/SOURCES/ \ 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.28/pango-1.28.3.tar.bz2' $ md5sum rpmbuild/SOURCES/pango-1.28.3.tar.bz2 caa74baea47e7e16bc73c89f9089d522 rpmbuild/SOURCES/pango-1.28.3.tar.bz2 3. Get the required Fedora patch: $ wget -O rpmbuild/SOURCES/pango-1.21.4-lib64.patch \ 'http://pkgs.fedoraproject.org/gitweb/?p=pango.git;a=blob_plain;f=pango-1.21.4-lib64.patch;hb=752e09340e088c40f24805ba5c381dbdd71c49f3' 4. Get the spec file. I decided to stay as close as possible to the original build, and therefore used the 1.22.3 version spec file. $ wget -O rpmbuild/SPECS/pango.spec \ 'http://pkgs.fedoraproject.org/gitweb/?p=pango.git;a=blob_plain;f=pango.spec;hb=752e09340e088c40f24805ba5c381dbdd71c49f3' NB: There might be much better way to fetch those files rather than using such cryptic URLs -- this one works too, nevertheless. 5. Patch the spec file to change the file versions: $ patch rpmbuild/SPECS/pango.spec <<EOF - --- pango.spec.orig +++ pango.spec @@ -8,11 +8,11 @@ Summary: System for layout and rendering of internationalized text Name: pango - -Version: 1.22.3 +Version: 1.28.3 Release: 1%{?dist} License: LGPLv2+ Group: System Environment/Libraries - -Source: http://download.gnome.org/sources/pango/1.22/pango-%{version}.tar.bz2 +Source: http://download.gnome.org/sources/pango/1.28/pango-%{version}.tar.bz2 URL: http://www.pango.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) EOF Before the actual RPM build, you might want to set up some variables, e.g. "Vendor" and "Packager" that'll show up in rpm -q -i. $ echo -e \ '%packager yournamehere\n%vendor whateverisappropriate' >> .rpmmacros == Building the RPMs == Finally, to build the RPMs: $ rpmbuild -ba --clean rpmbuild/SPECS/pango.spec You should have now: rpmbuild/SRPMS/pango-1.28.3-1.fc10.src.rpm rpmbuild/RPMS/i386/pango-devel-1.28.3-1.fc10.i386.rpm rpmbuild/RPMS/i386/pango-debuginfo-1.28.3-1.fc10.i386.rpm rpmbuild/RPMS/i386/pango-1.28.3-1.fc10.i386.rpm That should be really all. Just a last hint on how to easily transfer files between the host and the guest: 1. Select Devices --> Shared Folders from the VM's menu. 2. Select either transient or VM-specific shared folder. 3. Click the Add Shared Folder (Ins) icon to the right. 4. Choose a path on the host to share with the guest. 5. Choose a name for the shared folder (for the guest). 6. To mount the folder in Fedora: # mount -t vboxsf [-o options] name_from_step_5 mountpoint For more information: http://www.virtualbox.org/manual/ch04.html#sharedfolders Let me also remind you that there are patches for the port files in my original mail that could possibly save some time with the port update. If there's anything that needs further clarification or you have any other questions, again, please don't hesitate to ask. Hope that really helps. :) Cheers, Luchesar P.S. I wouldn't be surprised if there are much better ways to do some of the things above -- I'll appreciate if you let me know. :) P.P.S. You'll likely get quite a few warnings if running VB for the first time -- they are typically pretty self-explanatory. One thing to note only, is that VB claims mouse integration to be supported before the Guest Additions are installed, but this is not true -- and that is the reason why you need to disable it during the installation of Fedora. - -- Luchesar V. ILIEV Operations & Information Security Officer Ideaconsult Ltd. | www.ideaconsult.net PGP Key ID 0x9A1FEEFF https://cert.acad.bg/pgp-keys/ icq ......... 13261897 skype/yim ... luchesar_iliev jabber ...... luchesariliev@jabber.org gtalk ....... luchesar.iliev@gmail.com msnm ........ l_iliev@hotmail.com aim ......... luchesariliev -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNHWbpAAoJENvaS4iaH+7/kHMH/36T7hiASf7vOIPXvXF4x19N uZTKGQPzDuEwGJ7Luz/ydCa8KKs1vGnjkxpjJ79RNFIdN/dBBrU8J1J02xVEEH2J UQ1oTFCqHC72y3lOm2/DNWgNH3pxwRENxRoemd3Sxk9/LrcwoQ3uQ5CQtzlC/tqI sqiOtycoKfaevhB/yYwOtxEc9dLsF0U4vTsOigR950ABbLfuuSyMXj52Sx1Nm6Uk v+PvoYl8dTKJfD335tEusV/JcG5BtU5GxbyUGrHHeo0YYsl+6tvzqbwfQpKWdEr2 6GF+UF8uEU2x0cbRNsjlgqFwIzu+5wOiGWcvIPHQgAuwhl8SpMZxHXDL/uDtRBo= =sktd -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D1D6700.3090805>