[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nmap-dev
Subject:    Re: Issues with the macosx/Makefile
From:       Daniel Miller <bonsaiviking () gmail ! com>
Date:       2016-02-22 17:02:55
Message-ID: CABmvJnPNvS9+t4+A=5+M9xvG_gnRQR5iYs=i4s=dc2BOjkf+UA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Vincent,

Thanks for looking into these issues. The .dmg build environment on OS X
has changed a bit, and I'm not sure it's entirely documented, so I'll do my
best to describe it here.

The previous build used py2app and Macports and is described in
zenmap/install_scripts/macosx/README . We had repeated problems with this
system due to the need to maintain patches to remove troublesome
dependencies (iconv) that made it hard to build a cross-version package. It
seems like every release had at least a couple of bugs due to hard-coded
paths, changing directory structure, or dependency issues.

For the 7.01 release, I made this changelog entry:

> Switch to using gtk-mac-bundler and jhbuild for building the OS X
installer. This promises to reduce a lot of the problems we've had with
local paths and dependencies using the py2app and macports build system.
[Daniel Miller]

The files involved in this build system are:

* macosx/openssl.modules - a jhbuild moduleset defining how to fetch and
build OpenSSL.
* zenmap/install_scripts/macosx/zenmap.bundle - the gtk-mac-bundler
definition file for the Zenmap bundle.
* zenmap/install_scripts/macosx/launcher.sh - The launcher script that sets
up the environment for the Zenmap app
* zenmap/install_scripts/macosx/make-bundle.sh - the script called by the
macosx/Makefile to build the zenmap App bundle.

We still have to use Macports for libapr and libsvn used for nmap-update,
but since nobody uses or can use that system in its current state, it's not
really a problem.

Now we come to the part that I didn't document well. I think this is the
basic sequence:

curl https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh | sh
~/.local/bin/jhbuild shell
jhbuild build python
jhbuild bootstrap
jhbuild build meta-gtk-osx-bootstrap
jhbuild build meta-gtk-osx-core
jhbuild build meta-gtk-osx-python
jhbuild -m macosx/openssl.modules build openssl
cd macosx
make

The Macports process in the README file is still needed to build libapr and
libsvn, but you have to be sure that macports is *not* in your path when
you go to build the package with "make."

References:

* https://wiki.gnome.org/Projects/GTK%2B/OSX/Building
* https://wiki.gnome.org/Projects/GTK%2B/OSX/Bundling



On Sun, Feb 21, 2016 at 7:36 AM, Vincent Dumont <contact@vincentdumont.com>
wrote:

> Dear Daniel Miller,
>
> Due to the fact that openssl have installation issues on my mac, I am now
> configuring nmap to compile without openssl (I will work on it later).
> So I am now working on the PackageMaker feature of the makefile so it
> could produce the correct .mpkg package.
> But since PackageMaker is deprecated by Apple, I try to replace it with
> the three new tools provided (pkgbuild, productbuild and pkgutil).
>
> After digging into the Nmap suite, I was impressed to see that the
> Makefiles have issues with openssl (on mac), some paths are not good
> anymore (like python or gtk…), the architecture was not the right one for
> the macosx folder (should be determined automatically by the system) and so
> on…
> I have a lot of ideas to improve and update the mac os x version of Nmap,
> and I would be really glad to contribute to the community!
>
> I am having difficulties to compile the binaries and to produce the
> packages (.pkg and .mpkg).
>
> I am writing to you in the hope that you could help me to build the
> packages and correct the makefiles/scripts, so we can adapt a more
> customised designed user-interface to the Nmap Mac installer (.DMG).
> In fact, I would like to port the script into the Makefile located in the
> macosx/ folder so it will automatically generate the DMG via the Makefile.
>
> In the hope that you will like it, I have attached the script to create
> the .DMG.
> It requires a ‘build/‘ folder (with the final DMG content) and the
> ‘nmap.png' background image.
>
>
> It would be a great honour for me to work with you on this project.
> For more information, please feel free to contact me again and I would be
> glad to push the discussion further.
>
> Thank you in advance for your time and consideration,
>
> Sincerely yours,
>
> Vincent Dumont
> contact@vincentdumont.com
> http://www.vincentdumont.com
>
>
>
> Le 13 févr. 2016 à 06:45, Daniel Miller <bonsaiviking@gmail.com> a écrit :
>
> Vincent,
>
> See the info in zenmap/install_scripts/macosx/ for instructions. I can
> send more info soon.
>
> Dan
> On Feb 12, 2016 3:35 PM, "Vincent Dumont" <contact@vincentdumont.com>
> wrote:
>
>> Dear Nmap Developers,
>>
>> I am writing to you because I am having some difficulties during the
>> execution of the Makefile located in macosx/ . In fact, my OS is the OSX
>> 10.11.3 and I can't even run the Makefile from the root of nmap7.01…
>> To dig a little bit more, I ran it under Ubuntu 14.04 in a VM (works fine
>> for configuring, making and making install nmap).
>> But the thing is, I am trying to produce a .dmg (a mac installer to be
>> short) via the macosx/Makefile, without success.
>>
>> After spending few hours on it, I am asking for your advice. If you
>> succeed in launching it and producing a .dmg file, I really would like to
>> know how you did it!
>> Having a functional Makefile on my machine would let me bring a new
>> interface into nmap installer (the .dmg) as show in that post :
>> https://github.com/nmap/nmap/issues/299
>>
>> Thank you in advance for your time,
>> Sincerely yours,
>>
>> Vincent Dumont
>> contact@vincentdumont.com
>> http://www.vincentdumont.com
>>
>> <small-logo.png>
>>
>>
>> _______________________________________________
>> Sent through the dev mailing list
>> https://nmap.org/mailman/listinfo/dev
>> Archived at http://seclists.org/nmap-dev/
>>
>
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div><div><div><div><div><div>Vincent,<br><br></div>Thanks \
for looking into these issues. The .dmg build environment on OS X has changed a bit, \
and I&#39;m not sure it&#39;s entirely documented, so I&#39;ll do my best to describe \
it here.<br><br>The previous build used py2app and Macports and is described in \
zenmap/install_scripts/macosx/README . We had repeated problems with this system due \
to the need to maintain patches to remove troublesome dependencies (iconv) that made \
it hard to build a cross-version package. It seems like every release had at least a \
couple of bugs due to hard-coded paths, changing directory structure, or dependency \
issues.<br><br></div>For the 7.01 release, I made this changelog entry:<br><br>&gt; \
Switch to using gtk-mac-bundler and jhbuild for building the OS X installer.  This \
promises to reduce a lot of the problems we&#39;ve had with local paths and  \
dependencies using the py2app and macports build system. [Daniel \
Miller]<br><br></div>The files involved in this build system are:<br><br></div>* \
macosx/openssl.modules - a jhbuild moduleset defining how to fetch and build \
OpenSSL.<br></div><div>* zenmap/install_scripts/macosx/zenmap.bundle - the \
gtk-mac-bundler definition file for the Zenmap bundle.<br>* \
zenmap/install_scripts/macosx/launcher.sh - The launcher script that sets up the \
environment for the Zenmap app<br></div>* \
zenmap/install_scripts/macosx/make-bundle.sh - the script called by the \
macosx/Makefile to build the zenmap App bundle.<br><br></div>We still have to use \
Macports for libapr and libsvn used for nmap-update, but since nobody uses or can use \
that system in its current state, it&#39;s not really a problem.<br><br></div>Now we \
come to the part that I didn&#39;t document well. I think this is the basic \
sequence:<br><br>curl <a \
href="https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh" \
target="_blank">https://git.gnome.org/browse/gtk-osx/plain/gtk-osx-build-setup.sh</a> \
| sh<br>~/.local/bin/jhbuild shell<br></div><div>jhbuild build python<br>jhbuild \
bootstrap<br>jhbuild build meta-gtk-osx-bootstrap<br>jhbuild build \
meta-gtk-osx-core<br>jhbuild build meta-gtk-osx-python<br>jhbuild -m \
macosx/openssl.modules build openssl<br></div><div>cd \
macosx<br></div><div>make<br><br></div><div>The Macports process in the README file \
is still needed to build libapr and libsvn, but you have to be sure that macports is \
*not* in your path when you go to build the package with \
&quot;make.&quot;</div><div><br></div>References:<br><br>* <a \
href="https://wiki.gnome.org/Projects/GTK%2B/OSX/Building" \
target="_blank">https://wiki.gnome.org/Projects/GTK%2B/OSX/Building</a><br>* <a \
href="https://wiki.gnome.org/Projects/GTK%2B/OSX/Bundling" \
target="_blank">https://wiki.gnome.org/Projects/GTK%2B/OSX/Bundling</a><br><div><div>< \
div><div><div><div><div><div><div><br><br></div></div></div></div></div></div></div></div></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 21, 2016 at 7:36 AM, \
Vincent Dumont <span dir="ltr">&lt;<a href="mailto:contact@vincentdumont.com" \
target="_blank">contact@vincentdumont.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word">Dear Daniel \
Miller,<div><br></div><div>Due to the fact that openssl have installation issues on \
my mac, I am now configuring nmap to compile without openssl (I will work on it \
later).  </div><div>So I am now working on the  PackageMaker  feature of the makefile \
so it could produce the correct .mpkg package.</div><div>But since PackageMaker is \
deprecated by Apple, I try to replace it with the three new tools provided (pkgbuild, \
productbuild and  pkgutil).</div><div><br></div><div><div>After digging into the Nmap \
suite, I was impressed to see that the Makefiles have issues with openssl (on mac), \
some paths are not good anymore (like python or gtk…), the architecture was not the \
right one for the macosx folder (should be determined automatically by the system) \
and so on…</div><div>I have a lot of ideas to improve and update the mac os x \
version of Nmap, and I would be really glad to contribute to the \
community!</div><div><br></div><div>I am having difficulties to compile the binaries \
and to produce the packages (.pkg and .mpkg).</div><div><br></div><div>I am writing \
to you in the hope that you could help me to build the packages and correct the \
makefiles/scripts, so we can adapt a more customised designed user-interface to the \
Nmap Mac installer (.DMG).</div><div>In fact, I would like to port the script into \
the Makefile located in the macosx/ folder so it will automatically generate the DMG \
via the Makefile.</div><div><br></div><div>In the hope that you will like it, I have \
attached the script to create the .DMG.</div><div>It requires a ‘build/‘ folder \
(with the final DMG content) and the ‘nmap.png&#39; background \
image.</div><div></div></div></div><br><div \
style="word-wrap:break-word"><div><div></div><div><br></div><div>It would be a great \
honour for me to work with you on this project.</div><div>For more information, \
please feel free to contact me again and I would be glad to push the discussion \
further.  </div><div><br></div><div>Thank you in advance for your time and \
consideration,</div><div><br></div><div>Sincerely yours,</div></div><div><br><div> \
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div \
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-va \
riant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Vincent \
Dumont</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-sty \
le:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a \
href="mailto:contact@vincentdumont.com" \
target="_blank">contact@vincentdumont.com</a></div><div \
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-va \
riant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a \
href="http://www.vincentdumont.com" \
target="_blank">http://www.vincentdumont.com</a></div><br><span></span></div></div></div></div><br><div \
style="word-wrap:break-word"><div><div><div \
style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-tr \
ansform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span></span> \
</div> </div><br><div><blockquote type="cite"><div>Le 13 févr. 2016 à 06:45, Daniel \
Miller &lt;<a href="mailto:bonsaiviking@gmail.com" \
target="_blank">bonsaiviking@gmail.com</a>&gt; a écrit :</div><br><div><p \
dir="ltr">Vincent,</p><p dir="ltr">See the info in zenmap/install_scripts/macosx/ for \
instructions. I can send more info soon.</p><p dir="ltr">Dan</p> <div \
class="gmail_quote">On Feb 12, 2016 3:35 PM, &quot;Vincent Dumont&quot; &lt;<a \
href="mailto:contact@vincentdumont.com" \
target="_blank">contact@vincentdumont.com</a>&gt; wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
style="word-wrap:break-word"><div>Dear Nmap Developers,</div><div><br></div><div>I am \
writing to you because I am having some difficulties during the execution of the \
Makefile located in macosx/ . In fact, my OS is the OSX 10.11.3 and I can't even run \
the Makefile from the root of nmap7.01…</div><div>To dig a little bit more, I ran \
it under Ubuntu 14.04 in a VM (works fine for configuring, making and making install \
nmap).  </div><div>But the thing is, I am trying to produce a .dmg (a mac installer \
to be short) via the macosx/Makefile, without success.  \
</div><div><br></div><div>After spending few hours on it, I am asking for your \
advice. If you succeed in launching it and producing a .dmg file, I really would like \
to know how you did it!</div><div>Having a functional Makefile on my machine would \
let me bring a new interface into nmap installer (the .dmg) as show in that post :  \
<a href="https://github.com/nmap/nmap/issues/299" \
target="_blank">https://github.com/nmap/nmap/issues/299</a></div><div><br></div><div>Thank \
you in advance for your time,</div><div>Sincerely yours,</div><br><div> <div \
style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div \
style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font \
-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Vincent \
Dumont</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-va \
riant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a \
href="mailto:contact@vincentdumont.com" \
target="_blank">contact@vincentdumont.com</a></div><div \
style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font \
-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a \
href="http://www.vincentdumont.com/" \
target="_blank">http://www.vincentdumont.com</a></div><br><span><span>&lt;small-logo.png&gt;</span></span>
 </div>
</div><br></div><br>_______________________________________________<br>
Sent through the dev mailing list<br>
<a href="https://nmap.org/mailman/listinfo/dev" rel="noreferrer" \
target="_blank">https://nmap.org/mailman/listinfo/dev</a><br> Archived at <a \
href="http://seclists.org/nmap-dev/" rel="noreferrer" \
target="_blank">http://seclists.org/nmap-dev/</a><br></blockquote></div> \
</div></blockquote></div><br></div></div><br></blockquote></div><br></div>



_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic