Feeds:
Posts
Comments

Archive for the ‘mac os x’ Category

finally … the online publication of my diploma thesis (DT) is here, it can be found online [1] including the source at [2].

i hope that the terminology introduced in this DT (chap 9) will be used. this is of course also true for concepts engineered in (chap 7).

candies can be found here:
 - chap 4: components used in a package manager
 - chap 4.6: different integration levels of a package manager
 - chap 5.13: ways to replicate a system
 - chap 5.15 ff
 - chap 6.2: evopedia deployment summary
 - chap 7 (you might want to read this a few times, it is quite complex)
 - chap 9: here i introduce some new terminology in package management
           (probably a _must read_)

see also the README for in [2] for further information.

links

[1] https://github.com/qknight/Multi-PlatformSoftwarePackageManagement/blob/master/Multi-PlatformSoftwarePackageManagement.pdf

[2] https://github.com/qknight/Multi-PlatformSoftwarePackageManagement

Advertisements

Read Full Post »

evopedia is running on mac os x

two weeks ago long time ago i created a build of evopedia 0.4.2 for mac os x [snow leopard].


two ways of deploying to max os x

using homebrew

since executing binaries requires a lot of trust i prefer installing from source (source deployment).

– drawbacks include:

  • installing xcode (requires lots of space)
  • need to compile from source (as homebrew does ‘source deployment’)
  • need to compile and install qt 4.7.1 (takes much time)
  • need to compile and install pbzip2
  • needs to compile and install evopedia 0.4.2

software you have to install manually:

  • install xcode (requires lots of space, requires apple developer id)
  • install homebrew (takes 2minutes) [2]
  • requires the evopedia homebrew formula [4]

in contrast to most evopedia builds i created already, using homebrew’s build makes use of pbzip2 [3]. but evopedia does not benefit much from the parallelization as the archive extraction (when reading an article) only lasts several milliseconds. and less powerful architectures we support, as the nokia n900, do have one processor only anyway.

so how to reproduce?

  • install xcode
  • install homebrew (see manual)
    ruby -e “$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)”
  • type ‘brew edit evopedia‘ and copy’n’paste the contents of [4] into it
  • now in a shell (terminal) type:
    brew install evopedia
  • finally launch evopedia using:
    # evopedia (from a shell)

this installation will take quite some time as it needs to compile qt from source.

using homebrew to create a self contained binary

i’ve not seen this yet but it could be possible. benefits would include:

  • one developer would build a binary as described above in ‘using homebrew’ but then
  • he would collect all libraries needed and bundle the software and
  • finally upload the dmg image so that users can download it easily
  • users could now download the dmg NOT using homebrew: ‘binary deployment’ vs ‘source deployment’

the benefit would be that everyone who wants to do source code modification can setup the build environment easily using homebrew. it would also be easy to create a self contained dmg later on.

using native qt tools

in contrast to the former mentioned homebrew installation you could ‘simply’ download the self-contained evopedia binary runner. therefore we need:

  • qt library with the QTCreator IDE [5]
  • evopedia git version [1]

loading the project into qtcreator

after installing the qt library using the installer start ‘qtcreator’ using the quick starter. then in the main menu select “file – open file or project” and select the evopedia.pro in the git directory.

  • in project settings set a directory where to build, build it outside the source directory, for example: ~/Desktop/evopedia-build-release
  • check that you build a ‘release’ target
  • next hit the play button which will start the build.

NOTE: you might want to edit the src.pri and remove the evopedia.icns line with a # sign if the evopedia.icns is missing in your checkout.  i already uploaded it to my git repository of evopedia.

how to deploy this build

after you checked that the evopedia application was running invoked from qtcreator (after you hit play) we need to bundle it with all the needed libraries to make it run on a computer where no qt framework is installed. therefore [6] comes in handy.

cd ~/Desktop/evopedia-build-release

macdeployqt -dmg evopedia.app/

this will copy all the needed *.dylib files into the bundle, so that it can be executed everywhere

Note: the bundled application has 37mb of binary stuff: 22mb QtGui, 5.6mb QtCore and others

Note: the current configuration should build a universal binary for 32bit x86 and 64bit x86 support

the evopedia.dmg can now be distributed, download it at [7].

installation of the dmg image

download the dmg at [7], load it on mac os x and copy the contents (that is one file) into your application folder. this is probably very easy!

sha256sum evopedia-universal-0.4.2.dmg

4e8e584743bc9d20eb2d1d9773a7395f715f12aa4f832e1dc86f7c780d9f6a35  evopedia-universal-0.4.2.dmg

summary

both ways of doing the deployment actually work. dependent on the trust you can use the ‘fast’ way and download the dmg or build it yourself. whatever suits you.

Note: when having problems, just contact me via mail: js addd lastlog dod de

links

[1] http://evopedia.info/

[2] http://mxcl.github.com/homebrew/

[3] http://compression.ca/pbzip2/

[4] http://lastlog.de/misc/wordpress/evopedia_homebrew_formula

[5] http://qt.nokia.com/products/platform/qt-for-mac

[6] http://doc.qt.nokia.com/latest/deployment-mac.html

[7] http://lastlog.de/misc/wordpress/evopedia-universal-0.4.2.dmg

Read Full Post »

motivation

running mac os x from virtualbox helps to experiment with software deployment for that platform. i’m using gentoo linux as host system with 2.6.34-gentoo-r6 kernel on a 64 bit core 2 duo machine with virtualbox 3.2.10 OSE. there are various blog postings about how to get it running so i won’t repeat this here.

the most important thing is to use the snow leopard retail dvd. as the dvd coming with the mac (a mac book pro in my case) won’t work. you can get the retail dvd on ebay or various other sources. note: the retail dvd is not labeled ‘snow leopard retail dvd’ but something like ‘snow leopard update dvd’ in most auctions (don’t blame me if that is wrong).

how i use it

having snow leopard not only native, but also in a virtualbox image, makes testing of software easier.

hints

disk image size

i use about 40 gb here, and about 25 gb are actually in use with:

  1. latest patch (1 gb)
  2. xcode (6-8 gb)
  3. trolltechs qt sdk (2 gb)
  4. mac os x (8 gb)

i wasted a lot of disk space with a default installation. but i don’t want to spend too much time on that right now so i will leave it that way. i removed the printer drivers later on, saved me 600mb.

when installing software, map the image (dmg) using samba (running on the host machine)

import dmg images, which are used to install software from, using samba from the host. this way you do not have to copy the dmg onto the virtual machine using ssh or by mapping an external harddrive (note: the OSE version i am using, does not support USB host mapping anyway) into the virtual machine.

this also reduces the host image size by a few gigabyte of disk space. initially i was doing it wrong: i copied the file, installed from it and finally removed it. however, removing it did not have much of an effect, as virtualbox does not know about hfs+ partition scheme, therefore the file is only deleted inside the virtualmachine, still the host image uses the diskspace.

example:

my current disk image: mac os x [snow leopard].vdi is at 25Gb. but inside the virtual machine is is only 18gb.

smb.conf

[global]
  workgroup = MYGROUP
  server string = Samba Server
  security = share
   dns proxy = no
[rw-files]
   comment = Temporary rw files
   path = /home/user/smbshare/rw
   read only = no
   writable = yes
   public = yes
[ro-files]
   comment = Temporary ro files
   path = /home/user/smbshare/ro
   read only = no
   writable = no
   public = yes

don’t forget to:

  1. create the paths listed above
  2. secure the network as a rw path might be accessible from your lan

consider using a user/password for that.

downloading xcode

use wget to download it. it is about 3,6gb and it failed several times here. also resuming did not work well. after several attempts downloading it (must be about 12gb i’ve already downloaded) i had a, yet again, broken download at 99%. i thought: “not again”! and as there was no resuming (using a webbrowser) i downloaded a torrent.

next i used the torrent and started the download, which created a file with the same filename. i closed the torrent client (rtorrent) and moved the previously metioned 99% download file, to the place where the torrent expected it’s download. then i restarted the torrent download.

thanks i did not have an offset error (this can happen on wrong resumes, anyway i did not use resume).

finally the torrent checked all chunks and finnaly there was only 1mb left to download. so i repaired my download, using bittorrent.  all i had to do is wait 5minutes.

next thing was file integrity. it seems that apple does encode some individual information into the xcode download. if rumors are true, it is no wonder that users sue apple, see [1]. anyway, this means we can’t create a md5sum. it would be interesting to know what is going on.

what we do know already is that most of the file, apparently 99% of the download is generic. if not, then i would not be able to repair the xcode download with the torrent content of a different user. see discussion at [2] for more input on this.

create snapshots

virtualbox supports snapshots, use them! they are a great way to update various system components as xcode without having to uninstall any components. this results in a cleaner system, saves time & resources as deleted files are only deleted virtually inside the vm.

image growth

every virtually deleted file is not really deleted as virtualbox works on a block device layer. that means: if hfs+ decides to use deleted inode for a newly created file it will be good as vm disk and real disk are in sync. but i guess more often than not this is not the case and the real disk image will grow over time.

links

[1] http://www.heise.de/newsticker/meldung/Apple-wegen-angeblicher-Weitergabe-von-Nutzerdaten-verklagt-Update-1159403.html

[2] http://discussions.apple.com/thread.jspa?messageID=12770938

Read Full Post »