Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#555 closed enhancement (fixed)

Add osx installer and package to the SF downloads

Reported by: Alex Samorukov Owned by: Alex Samorukov
Priority: minor Milestone: Release 6.5
Component: all Version: 6.4
Keywords: darwin Cc:

Description (last modified by Alex Samorukov)

There are number of ways to get recent smartmontools on the OSX. However all of them will require to install many additional tools (xcode, etc.) and result may vary. It should be find to have kind of "reference" build available from the sourceforge download. As far as i could see [1] it should be possible to do such cross-build from the Linux env, however i did not tried yet myself.

Correct resolution of the tickets should include:

  1. Setup and build smartmontools under osxcross, check if autoconf may handle this [done]
  2. Find if it is possible to generate pkg on Linux
  3. Find if it possible to do dmg on Linux [done, using mkisofs + dmg]?
  4. Find if it is possible to run smartd as a daemon with desktop notifications
  5. Make smartctl/smartd universal binaries (32 and 64 bits)
  6. If everything works - add result to the SF downloads :)

[1] https://github.com/tpoechtrager/osxcross
[2] http://vincent.bernat.im/en/blog/2013-autoconf-osx-packaging.html

Change History (13)

comment:1 by Alex Samorukov, 9 years ago

Few comments:

  1. I been able to build working osxcross in 14.04 without using any external repository. Only external part was SDK locally generated on my laptop.
  2. Project compiles fine with

./configure --host x86_64-apple-darwin13 CC=o64-clang CXX=o64-clang++ && make

  1. Smartctl and smartd are working fine on OSX 10.10. Output matching one from homebrew.
  2. Size from homebrew is smaller, 515K with 415K, but after strip size is +- same.
bash-3.2$ ./smartctl --version
smartctl 6.4 2015-06-04 r4109 [x86_64-apple-darwin13] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License; either
version 2, or (at your option) any later version.
See http://www.gnu.org for further details.

smartmontools release 6.4 dated 2015-06-04 at 16:29:41 UTC
smartmontools SVN rev 4109 dated 2015-06-04 at 16:30:15
smartmontools build host: x86_64-apple-darwin13
smartmontools build with: GCC 4.2.1 Compatible Ubuntu Clang 3.4 (tags/RELEASE_34/final)
smartmontools configure arguments:  '--host' 'x86_64-apple-darwin13' 'host_alias=x86_64-apple-darwin13' 'CXX=o64-clang++' 'CC=o64-clang'
Last edited 9 years ago by Alex Samorukov (previous) (diff)

comment:2 by Alex Samorukov, 9 years ago

Description: modified (diff)
Status: newaccepted

comment:5 by Alex Samorukov, 9 years ago

here seems to be good howto about dmg creation with mkisofs https://github.com/DMDirc/Installers/blob/master/makeDMG.sh

Last edited 9 years ago by Alex Samorukov (previous) (diff)

comment:6 by Alex Samorukov, 9 years ago

Description: modified (diff)

dmg compression working with dmglib from the https://github.com/andreas56/libdmg-hfsplus, using /dmg/dmg dmg ~/tmp/smartmontools.dmg test.dmg. Also this adds valid checksum to the image:

bash-3.2$ hdiutil verify test.dmg
Checksumming whole disk (unknown partition : 0)…
......................................................................................................................................................
  whole disk (unknown partition : 0): verified   CRC32 $71CDFD20
......................................................................................................................................................
verified   CRC32 $F1CCA2CE
hdiutil: verify: checksum of "test.dmg" is VALID

comment:7 by Alex Samorukov, 9 years ago

Found very good article about building installed (pkg) w/o osx:

http://hogliux.github.io/bomutils/faq.html

It seems that now we have all the staff:

  1. ossxcross will be used to build smartmontools package on Linux
  2. Bomutils + xar to build pkg file
  3. mkisofs + libdmg - to create compressed dmg file with checksum

Only proprietary component here is OSX SDK required for ossxcross to work.

Things needs to be done:

  1. Docker environment to automatically create Debian with all required staff (svn, ossxcross, Bomutils, dmglib, autoconf, etc.)
  2. Play with Bomutils to create working pkg
  3. Scripts to provide dmg creation in the end of process

comment:8 by Alex Samorukov, 9 years ago

great info about flat package format http://s.sudre.free.fr/Stuff/Ivanhoe/FLAT.html

comment:9 by Alex Samorukov, 9 years ago

Initial import of the files needed to build pkg done in r4123.

TODO:

  • integrate with native build commands (Makefile.am) and remove do_package.sh
  • add instructions about build environment requirements and setup.

comment:10 by Alex Samorukov, 9 years ago

Current pkg do not work with OSX El Capitan because of root-less mode which protects /usr/bin and friends. Need to fix that.

comment:11 by Alex Samorukov, 9 years ago

packages now installed to the /usr/local prefix, because it seems to be only supported way

comment:12 by Alex Samorukov, 9 years ago

Resolution: fixed
Status: acceptedclosed

Package done, daily builds are available from the http://builds.smartmontools.org

comment:13 by Christian Franke, 9 years ago

Milestone: undecidedRelease 6.5
Note: See TracTickets for help on using tickets.