Message ID | 20180529171409.8794-1-fontaine.fabrice@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/1] aircrack-ng: bump to version 1.2 | expand |
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > - Remove patch (already in version) > - Add three patches (first one sent and merged upstream, second and > third patchs retrieved upstream) > - Move to autotools-package > - Remove workaround for static handling of pthread as it isn't needed > anymore > - Remove deactivation of libnl in static build as it isn't needed > anymore > - Update workaround for static handling of libpcap > - Add hash for license file [snip] > +++ b/package/aircrack-ng/Config.in > @@ -3,9 +3,7 @@ config BR2_PACKAGE_AIRCRACK_NG > depends on BR2_USE_MMU # uses fork() > depends on BR2_TOOLCHAIN_HAS_THREADS > depends on BR2_INSTALL_LIBSTDCPP > - # libnl has issues when linking statically > - # they need fixing in libnl itself > - select BR2_PACKAGE_LIBNL if !BR2_STATIC_LIBS > + select BR2_PACKAGE_LIBNL Looking at the m4 files, it looks as if libnl is supposed to be optional. If so, then we shouldn't force it here. > select BR2_PACKAGE_OPENSSL It also looks as if libgcrypt can be used instead of openssl. > select BR2_PACKAGE_ZLIB And zlib looks to be optional as well. > +++ b/package/aircrack-ng/aircrack-ng.mk > @@ -4,69 +4,42 @@ > # > ################################################################################ > -AIRCRACK_NG_VERSION = 1.2-rc4 > +AIRCRACK_NG_VERSION = 1.2 > AIRCRACK_NG_SITE = http://download.aircrack-ng.org > AIRCRACK_NG_LICENSE = GPL-2.0+ > AIRCRACK_NG_LICENSE_FILES = LICENSE > -AIRCRACK_NG_DEPENDENCIES = openssl zlib host-pkgconf > +AIRCRACK_NG_DEPENDENCIES = \ > + libnl \ > + openssl \ > + $(if $(BR2_PACKAGE_PCRE),pcre) \ > + zlib \ > + host-pkgconf > +AIRCRACK_NG_AUTORECONF = YES > # Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng > -AIRCRACK_NG_MAKE_OPTS = unstable=true > - > -# Account for libpthread in static > -AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) \ > - $(if $(BR2_STATIC_LIBS),-lpthread -lz) > - > -# libnl support has issues when building static > -ifeq ($(BR2_STATIC_LIBS),y) > -AIRCRACK_NG_MAKE_OPTS += libnl=false > -else > -AIRCRACK_NG_MAKE_OPTS += libnl=true > -AIRCRACK_NG_DEPENDENCIES += libnl > -endif > +AIRCRACK_NG_CONF_OPTS = --with-experimental Is this the replacement for unstable=true? According to the m4 files, this defaults to off. > ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) > -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=true > +AIRCRACK_NG_CONF_OPTS += --with-opt > else > -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=false > +AIRCRACK_NG_CONF_OPTS += --without-opt Hmm, --with-opt seems to be related to adding -O3 to CFLAGS or not: AC_ARG_WITH(opt, [AS_HELP_STRING([--without-opt], [disable -O3 optimizations])]) AS_IF([test "x$enable_code_coverage" = "xno"], [ case $with_opt in yes | "") AX_CHECK_COMPILE_FLAG([-O3], [ AX_APPEND_FLAG(-O3, [opt_[]_AC_LANG_ABBREV[]flags]) ]) ;; esac ]) There also seems to be a check for ethtool. This by default looks if ethtool is available in the path on the host. We should detect if BR2_PACKAGE_ETHTOOL is enabled and point it to it.
Dear Peter, 2018-05-29 21:34 GMT+02:00 Peter Korsgaard <peter@korsgaard.com>: > >>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > > > - Remove patch (already in version) > > - Add three patches (first one sent and merged upstream, second and > > third patchs retrieved upstream) > > - Move to autotools-package > > - Remove workaround for static handling of pthread as it isn't needed > > anymore > > - Remove deactivation of libnl in static build as it isn't needed > > anymore > > - Update workaround for static handling of libpcap > > - Add hash for license file > > [snip] > > > +++ b/package/aircrack-ng/Config.in > > @@ -3,9 +3,7 @@ config BR2_PACKAGE_AIRCRACK_NG > > depends on BR2_USE_MMU # uses fork() > > depends on BR2_TOOLCHAIN_HAS_THREADS > > depends on BR2_INSTALL_LIBSTDCPP > > - # libnl has issues when linking statically > > - # they need fixing in libnl itself > > - select BR2_PACKAGE_LIBNL if !BR2_STATIC_LIBS > > + select BR2_PACKAGE_LIBNL > > Looking at the m4 files, it looks as if libnl is supposed to be > optional. If so, then we shouldn't force it here. > Indeed, but libnl is set in the Requirements section of the Readme.md (and not in the "Optional stuff" section) and it was selected since version 1.2-rc1 so I didn't know what to do. But you're right, I will make it optional. > > > select BR2_PACKAGE_OPENSSL > > It also looks as if libgcrypt can be used instead of openssl. > > > select BR2_PACKAGE_ZLIB > > And zlib looks to be optional as well. > For libgcrypt and zlib, I have additional patches but I can put everything in a single patch if you prefer. > > > +++ b/package/aircrack-ng/aircrack-ng.mk > > @@ -4,69 +4,42 @@ > > # > > ############################################################ > #################### > > > -AIRCRACK_NG_VERSION = 1.2-rc4 > > +AIRCRACK_NG_VERSION = 1.2 > > AIRCRACK_NG_SITE = http://download.aircrack-ng.org > > AIRCRACK_NG_LICENSE = GPL-2.0+ > > AIRCRACK_NG_LICENSE_FILES = LICENSE > > -AIRCRACK_NG_DEPENDENCIES = openssl zlib host-pkgconf > > +AIRCRACK_NG_DEPENDENCIES = \ > > + libnl \ > > + openssl \ > > + $(if $(BR2_PACKAGE_PCRE),pcre) \ > > + zlib \ > > + host-pkgconf > > +AIRCRACK_NG_AUTORECONF = YES > > # Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng > > -AIRCRACK_NG_MAKE_OPTS = unstable=true > > - > > -# Account for libpthread in static > > -AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) \ > > - $(if $(BR2_STATIC_LIBS),-lpthread -lz) > > - > > -# libnl support has issues when building static > > -ifeq ($(BR2_STATIC_LIBS),y) > > -AIRCRACK_NG_MAKE_OPTS += libnl=false > > -else > > -AIRCRACK_NG_MAKE_OPTS += libnl=true > > -AIRCRACK_NG_DEPENDENCIES += libnl > > -endif > > +AIRCRACK_NG_CONF_OPTS = --with-experimental > > Is this the replacement for unstable=true? According to the m4 files, > this defaults to off. > Yes, this is the replacement for unstable. What do you mean by it defaults to off? Do you want me to disable experimental features? As a side note, unstable has been replaced by experimental since 1.2-rc2 ( https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2) so this is currently "broken". > > > > ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) > > -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=true > > +AIRCRACK_NG_CONF_OPTS += --with-opt > > else > > -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=false > > +AIRCRACK_NG_CONF_OPTS += --without-opt > > Hmm, --with-opt seems to be related to adding -O3 to CFLAGS or not: > > AC_ARG_WITH(opt, > [AS_HELP_STRING([--without-opt], > [disable -O3 optimizations])]) > > AS_IF([test "x$enable_code_coverage" = "xno"], [ > case $with_opt in > yes | "") > AX_CHECK_COMPILE_FLAG([-O3], [ > AX_APPEND_FLAG(-O3, [opt_[]_AC_LANG_ABBREV[]flags]) > ]) > ;; > esac > ]) > Yes, --without-opt will disable O3 but also the stack protector (see Readme.md and second patch). > > There also seems to be a check for ethtool. This by default looks if > ethtool is available in the path on the host. We should detect if > BR2_PACKAGE_ETHTOOL is enabled and point it to it. > Yes, ethtool is needed for airmon-ng, I will update my patch to manage it. > > -- > Bye, Peter Korsgaard > Best Regards, Fabrice <div dir="ltr">Dear Peter,<br><div class="gmail_extra"><br><div class="gmail_quote">2018-05-29 21:34 GMT+02:00 Peter Korsgaard <span dir="ltr"><<a href="mailto:peter@korsgaard.com" target="_blank">peter@korsgaard.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">>>>>> "Fabrice" == Fabrice Fontaine <<a href="mailto:fontaine.fabrice@gmail.com">fontaine.fabrice@gmail.com</a>> writes:<br> <br> > - Remove patch (already in version)<br> > - Add three patches (first one sent and merged upstream, second and<br> > third patchs retrieved upstream)<br> > - Move to autotools-package<br> > - Remove workaround for static handling of pthread as it isn't needed<br> > anymore<br> > - Remove deactivation of libnl in static build as it isn't needed<br> > anymore<br> > - Update workaround for static handling of libpcap<br> > - Add hash for license file<br> <br> </span>[snip]<br> <span class="gmail-"><br> > +++ b/package/aircrack-ng/Config.<wbr>in<br> > @@ -3,9 +3,7 @@ config BR2_PACKAGE_AIRCRACK_NG<br> > depends on BR2_USE_MMU # uses fork()<br> > depends on BR2_TOOLCHAIN_HAS_THREADS<br> > depends on BR2_INSTALL_LIBSTDCPP<br> > - # libnl has issues when linking statically<br> > - # they need fixing in libnl itself<br> > - select BR2_PACKAGE_LIBNL if !BR2_STATIC_LIBS<br> > + select BR2_PACKAGE_LIBNL<br> <br> </span>Looking at the m4 files, it looks as if libnl is supposed to be<br> optional. If so, then we shouldn't force it here.<br></blockquote><div>Indeed, but libnl is set in the Requirements section of the Readme.md (and not in the "Optional stuff" section) and it was selected since version 1.2-rc1 so I didn't know what to do.</div><div>But you're right, I will make it optional.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br> > select BR2_PACKAGE_OPENSSL<br> <br> It also looks as if libgcrypt can be used instead of openssl.<br> <br> > select BR2_PACKAGE_ZLIB<br> <br> And zlib looks to be optional as well.<br></blockquote><div>For libgcrypt and zlib, I have additional patches but I can put everything in a single patch if you prefer.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div><div class="gmail-h5"><br> > +++ b/package/aircrack-ng/<a href="http://aircrack-ng.mk" rel="noreferrer" target="_blank">aircrack<wbr>-ng.mk</a><br> > @@ -4,69 +4,42 @@<br> > #<br> > ##############################<wbr>##############################<wbr>####################<br> <br> > -AIRCRACK_NG_VERSION = 1.2-rc4<br> > +AIRCRACK_NG_VERSION = 1.2<br> > AIRCRACK_NG_SITE = <a href="http://download.aircrack-ng.org" rel="noreferrer" target="_blank">http://download.aircrack-ng.<wbr>org</a><br> > AIRCRACK_NG_LICENSE = GPL-2.0+<br> > AIRCRACK_NG_LICENSE_FILES = LICENSE<br> > -AIRCRACK_NG_DEPENDENCIES = openssl zlib host-pkgconf<br> > +AIRCRACK_NG_DEPENDENCIES = \<br> > + libnl \<br> > + openssl \<br> > + $(if $(BR2_PACKAGE_PCRE),pcre) \<br> > + zlib \<br> > + host-pkgconf<br> > +AIRCRACK_NG_AUTORECONF = YES<br> > # Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng<br> > -AIRCRACK_NG_MAKE_OPTS = unstable=true<br> > -<br> > -# Account for libpthread in static<br> > -AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) \<br> > - $(if $(BR2_STATIC_LIBS),-lpthread -lz)<br> > -<br> > -# libnl support has issues when building static<br> > -ifeq ($(BR2_STATIC_LIBS),y)<br> > -AIRCRACK_NG_MAKE_OPTS += libnl=false<br> > -else<br> > -AIRCRACK_NG_MAKE_OPTS += libnl=true<br> > -AIRCRACK_NG_DEPENDENCIES += libnl<br> > -endif<br> > +AIRCRACK_NG_CONF_OPTS = --with-experimental<br> <br> </div></div>Is this the replacement for unstable=true? According to the m4 files,<br> this defaults to off.<br></blockquote><div>Yes, this is the replacement for unstable. What do you mean by it defaults to off? Do you want me to disable experimental features?</div><div>As a side note, unstable has been replaced by experimental since 1.2-rc2 (<a href="https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2">https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2</a>) so this is currently "broken".<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span class="gmail-"><br> <br> > ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)<br> > -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=true<br> > +AIRCRACK_NG_CONF_OPTS += --with-opt<br> > else<br> > -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=false<br> > +AIRCRACK_NG_CONF_OPTS += --without-opt<br> <br> </span>Hmm, --with-opt seems to be related to adding -O3 to CFLAGS or not:<br> <br> AC_ARG_WITH(opt,<br> [AS_HELP_STRING([--without-<wbr>opt],<br> [disable -O3 optimizations])])<br> <br> AS_IF([test "x$enable_code_coverage" = "xno"], [<br> case $with_opt in<br> yes | "")<br> AX_CHECK_COMPILE_FLAG([-O3], [<br> AX_APPEND_FLAG(-O3, [opt_[]_AC_LANG_ABBREV[]flags]<wbr>)<br> ])<br> ;;<br> esac<br> ])<br></blockquote><div>Yes, --without-opt will disable O3 but also the stack protector (see Readme.md and second patch).<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br> There also seems to be a check for ethtool. This by default looks if<br> ethtool is available in the path on the host. We should detect if<br> BR2_PACKAGE_ETHTOOL is enabled and point it to it.<br></blockquote><div>Yes, ethtool is needed for airmon-ng, I will update my patch to manage it.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span class="gmail-HOEnZb"><font color="#888888"><br> -- <br> Bye, Peter Korsgaard<br> </font></span></blockquote></div>Best Regards,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Fabrice<br></div></div>
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: Hi, >> Looking at the m4 files, it looks as if libnl is supposed to be >> optional. If so, then we shouldn't force it here. >> > Indeed, but libnl is set in the Requirements section of the Readme.md (and > not in the "Optional stuff" section) and it was selected since version > 1.2-rc1 so I didn't know what to do. > But you're right, I will make it optional. Ok, great. >> >> > select BR2_PACKAGE_OPENSSL >> >> It also looks as if libgcrypt can be used instead of openssl. >> >> > select BR2_PACKAGE_ZLIB >> >> And zlib looks to be optional as well. >> > For libgcrypt and zlib, I have additional patches but I can put everything > in a single patch if you prefer. It is OK to handle those in followup patches, they were also unconditional in the earlier version. >> > +AIRCRACK_NG_CONF_OPTS = --with-experimental >> >> Is this the replacement for unstable=true? According to the m4 files, >> this defaults to off. >> > Yes, this is the replacement for unstable. What do you mean by it defaults > to off? Do you want me to disable experimental features? What I mean is that it is off by default if you don't pass --with-experimental: AC_ARG_WITH(experimental, [AS_HELP_STRING([--with-experimental=[[yes|no]]], [use experimental features of Aircrack-ng, [default=no]])]) case $with_experimental in yes) EXPERIMENTAL=yes ;; *) EXPERIMENTAL=no ;; esac > As a side note, unstable has been replaced by experimental since 1.2-rc2 ( > https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2) so this is > currently "broken". Gaah :/ >> Hmm, --with-opt seems to be related to adding -O3 to CFLAGS or not: >> >> AC_ARG_WITH(opt, >> [AS_HELP_STRING([--without-opt], >> [disable -O3 optimizations])]) >> >> AS_IF([test "x$enable_code_coverage" = "xno"], [ >> case $with_opt in >> yes | "") >> AX_CHECK_COMPILE_FLAG([-O3], [ >> AX_APPEND_FLAG(-O3, [opt_[]_AC_LANG_ABBREV[]flags]) >> ]) >> ;; >> esac >> ]) >> > Yes, --without-opt will disable O3 but also the stack protector (see > Readme.md and second patch). Hmm, OK - A bit odd that it is linked to -O3 - But ok. >> There also seems to be a check for ethtool. This by default looks if >> ethtool is available in the path on the host. We should detect if >> BR2_PACKAGE_ETHTOOL is enabled and point it to it. >> > Yes, ethtool is needed for airmon-ng, I will update my patch to manage it. Great, thanks!
Dear Peter, 2018-05-29 23:48 GMT+02:00 Peter Korsgaard <peter@korsgaard.com>: > >>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > > Hi, > > >> Looking at the m4 files, it looks as if libnl is supposed to be > >> optional. If so, then we shouldn't force it here. > >> > > Indeed, but libnl is set in the Requirements section of the Readme.md > (and > > not in the "Optional stuff" section) and it was selected since version > > 1.2-rc1 so I didn't know what to do. > > But you're right, I will make it optional. > > Ok, great. > > >> > >> > select BR2_PACKAGE_OPENSSL > >> > >> It also looks as if libgcrypt can be used instead of openssl. > >> > >> > select BR2_PACKAGE_ZLIB > >> > >> And zlib looks to be optional as well. > >> > > For libgcrypt and zlib, I have additional patches but I can put > everything > > in a single patch if you prefer. > > It is OK to handle those in followup patches, they were also > unconditional in the earlier version. > I already merged them in a single patch, I have also added the duma optional dependency, see v2 but I can split them if you prefer in v3 tomorrow ;-) > > > >> > +AIRCRACK_NG_CONF_OPTS = --with-experimental > >> > >> Is this the replacement for unstable=true? According to the m4 files, > >> this defaults to off. > >> > > Yes, this is the replacement for unstable. What do you mean by it > defaults > > to off? Do you want me to disable experimental features? > > What I mean is that it is off by default if you don't pass > --with-experimental: > > AC_ARG_WITH(experimental, > [AS_HELP_STRING([--with-experimental=[[yes|no]]], [use experimental > features of Aircrack-ng, [default=no]])]) > > case $with_experimental in > yes) > EXPERIMENTAL=yes > ;; > *) > EXPERIMENTAL=no > ;; > esac > OK > > > > As a side note, unstable has been replaced by experimental since 1.2-rc2 > ( > > https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2) so this is > > currently "broken". > > Gaah :/ > Do you want me to send a small patch to fix this on master? > > > >> Hmm, --with-opt seems to be related to adding -O3 to CFLAGS or not: > >> > >> AC_ARG_WITH(opt, > >> [AS_HELP_STRING([--without-opt], > >> [disable -O3 optimizations])]) > >> > >> AS_IF([test "x$enable_code_coverage" = "xno"], [ > >> case $with_opt in > >> yes | "") > >> AX_CHECK_COMPILE_FLAG([-O3], [ > >> AX_APPEND_FLAG(-O3, [opt_[]_AC_LANG_ABBREV[]flags]) > >> ]) > >> ;; > >> esac > >> ]) > >> > > Yes, --without-opt will disable O3 but also the stack protector (see > > Readme.md and second patch). > > Hmm, OK - A bit odd that it is linked to -O3 - But ok. > > >> There also seems to be a check for ethtool. This by default looks if > >> ethtool is available in the path on the host. We should detect if > >> BR2_PACKAGE_ETHTOOL is enabled and point it to it. > >> > > Yes, ethtool is needed for airmon-ng, I will update my patch to manage > it. > > Great, thanks! > After more investigations, it seems that ethtool is only a runtime dependency of airmon-ng script which is always installed on target (ETHTOOL_FOUND is only used in configure.ac). So, we don't have to add a dependency to the ethtool package or to set the ETHTOOL variable except to have the correct display in the configure log. > > -- > Bye, Peter Korsgaard > Best Regards, Fabrice <div dir="ltr">Dear Peter,<br><div class="gmail_extra"><br><div class="gmail_quote">2018-05-29 23:48 GMT+02:00 Peter Korsgaard <span dir="ltr"><<a href="mailto:peter@korsgaard.com" target="_blank">peter@korsgaard.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">>>>>> "Fabrice" == Fabrice Fontaine <<a href="mailto:fontaine.fabrice@gmail.com">fontaine.fabrice@gmail.com</a>> writes:<br> <br> </span>Hi,<br> <span class="gmail-"><br> >> Looking at the m4 files, it looks as if libnl is supposed to be<br> >> optional. If so, then we shouldn't force it here.<br> >> <br> > Indeed, but libnl is set in the Requirements section of the Readme.md (and<br> > not in the "Optional stuff" section) and it was selected since version<br> > 1.2-rc1 so I didn't know what to do.<br> > But you're right, I will make it optional.<br> <br> </span>Ok, great.<br> <span class="gmail-"><br> >> <br> >> > select BR2_PACKAGE_OPENSSL<br> >> <br> >> It also looks as if libgcrypt can be used instead of openssl.<br> >> <br> >> > select BR2_PACKAGE_ZLIB<br> >> <br> >> And zlib looks to be optional as well.<br> >> <br> > For libgcrypt and zlib, I have additional patches but I can put everything<br> > in a single patch if you prefer.<br> <br> </span>It is OK to handle those in followup patches, they were also<br> unconditional in the earlier version.<br></blockquote><div>I already merged them in a single patch, I have also added the duma optional dependency, see v2 but I can split them if you prefer in v3 tomorrow ;-) <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span class="gmail-"><br> <br> >> > +AIRCRACK_NG_CONF_OPTS = --with-experimental<br> >> <br> >> Is this the replacement for unstable=true? According to the m4 files,<br> >> this defaults to off.<br> >> <br> > Yes, this is the replacement for unstable. What do you mean by it defaults<br> > to off? Do you want me to disable experimental features?<br> <br> </span>What I mean is that it is off by default if you don't pass<br> --with-experimental:<br> <br> AC_ARG_WITH(experimental,<br> [AS_HELP_STRING([--with-<wbr>experimental=[[yes|no]]], [use experimental features of Aircrack-ng, [default=no]])])<br> <br> case $with_experimental in<br> yes)<br> EXPERIMENTAL=yes<br> ;;<br> *)<br> EXPERIMENTAL=no<br> ;;<br> esac<br></blockquote><div>OK <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span class="gmail-"><br> <br> > As a side note, unstable has been replaced by experimental since 1.2-rc2 (<br> > <a href="https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2" rel="noreferrer" target="_blank">https://github.com/aircrack-<wbr>ng/aircrack-ng/tree/1.2-rc2</a>) so this is<br> > currently "broken".<br> <br> </span>Gaah :/<br></blockquote><div>Do you want me to send a small patch to fix this on master? <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span class="gmail-"><br> <br> >> Hmm, --with-opt seems to be related to adding -O3 to CFLAGS or not:<br> >> <br> >> AC_ARG_WITH(opt,<br> >> [AS_HELP_STRING([--without-<wbr>opt],<br> >> [disable -O3 optimizations])])<br> >> <br> >> AS_IF([test "x$enable_code_coverage" = "xno"], [<br> >> case $with_opt in<br> >> yes | "")<br> >> AX_CHECK_COMPILE_FLAG([-O3], [<br> >> AX_APPEND_FLAG(-O3, [opt_[]_AC_LANG_ABBREV[]flags]<wbr>)<br> >> ])<br> >> ;;<br> >> esac<br> >> ])<br> >> <br> > Yes, --without-opt will disable O3 but also the stack protector (see<br> > Readme.md and second patch).<br> <br> </span>Hmm, OK - A bit odd that it is linked to -O3 - But ok.<br> <span class="gmail-"><br> >> There also seems to be a check for ethtool. This by default looks if<br> >> ethtool is available in the path on the host. We should detect if<br> >> BR2_PACKAGE_ETHTOOL is enabled and point it to it.<br> >> <br> > Yes, ethtool is needed for airmon-ng, I will update my patch to manage it.<br> <br> </span>Great, thanks!<br></blockquote><div><div>After more investigations, it seems that ethtool is only a runtime dependency of airmon-ng script which is always installed on target (ETHTOOL_FOUND is only used in <a href="http://configure.ac">configure.ac</a>).<br></div><div>So, we don't have to add a dependency to the ethtool package or to set the ETHTOOL variable except to have the correct display in the configure log.<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span class="gmail-HOEnZb"><font color="#888888"><br> -- <br> Bye, Peter Korsgaard<br> </font></span></blockquote></div>Best Regards,<br><br></div><div class="gmail_extra">Fabrice<br></div></div>
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: Hi, >> It is OK to handle those in followup patches, they were also >> unconditional in the earlier version. >> > I already merged them in a single patch, I have also added the duma > optional dependency, see v2 but I can split them if you prefer in v3 > tomorrow ;-) It is probably ok in a single patch, thanks. >> > As a side note, unstable has been replaced by experimental since 1.2-rc2 >> ( >> > https://github.com/aircrack-ng/aircrack-ng/tree/1.2-rc2) so this is >> > currently "broken". >> >> Gaah :/ >> > Do you want me to send a small patch to fix this on master? Hmm, so this means that we have been building without the experimental support for more than 1 year without anybody complaining? Then I would prefer to keep it like that on master and maybe consider if we shouldn't make it a Config.in option to enable or not for next? >> > Yes, ethtool is needed for airmon-ng, I will update my patch to manage >> it. >> >> Great, thanks! >> > After more investigations, it seems that ethtool is only a runtime > dependency of airmon-ng script which is always installed on target > (ETHTOOL_FOUND is only used in configure.ac). > So, we don't have to add a dependency to the ethtool package or to set the > ETHTOOL variable except to have the correct display in the configure log. Ahh, ok.
diff --git a/package/aircrack-ng/0001-Fix-compilation-without-getauxval.patch b/package/aircrack-ng/0001-Fix-compilation-without-getauxval.patch new file mode 100644 index 0000000000..8a291356ca --- /dev/null +++ b/package/aircrack-ng/0001-Fix-compilation-without-getauxval.patch @@ -0,0 +1,81 @@ +From 0017bae95dbcf336495e36ac83c868ca1d7f2846 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Sat, 26 May 2018 22:52:30 +0200 +Subject: [PATCH] Fix compilation without getauxval + +Protect getauxval call and sys/auxv.h include by #ifdef HAS_AUXV in +trampoline_arm.c and trampoline_ppc.c. +Indeed, auxv is not available on some toolchains such as uclibc + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Upstream status: merged (https://github.com/aircrack-ng/aircrack-ng/pull/1896)] +--- + src/trampoline_arm.c | 4 ++++ + src/trampoline_ppc.c | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/src/trampoline_arm.c b/src/trampoline_arm.c +index 45db82db..e653109a 100644 +--- a/src/trampoline_arm.c ++++ b/src/trampoline_arm.c +@@ -17,8 +17,10 @@ + */ + + #if defined(__arm__) || defined(__aarch64__) ++#ifdef HAS_AUXV + #include <sys/auxv.h> + #include <asm/hwcap.h> ++#endif + #else + #error "The wrong CPU architecture file has been included." + #endif +@@ -39,6 +41,7 @@ int + simd_get_supported_features (void) + { + int result = 0; ++#ifdef HAS_AUXV + long hwcaps = getauxval (AT_HWCAP); + + #if defined(HWCAP_ASIMD) +@@ -53,6 +56,7 @@ simd_get_supported_features (void) + { + result |= SIMD_SUPPORTS_NEON; + } ++#endif + #endif + + return (result); +diff --git a/src/trampoline_ppc.c b/src/trampoline_ppc.c +index 0d439776..b5c0cb2b 100644 +--- a/src/trampoline_ppc.c ++++ b/src/trampoline_ppc.c +@@ -17,8 +17,10 @@ + */ + + #if defined(__ppc__) || defined(__PPC__) ++#ifdef HAS_AUXV + #include <sys/auxv.h> + #include <bits/hwcap.h> ++#endif + #else + #error "The wrong CPU architecture file has been included." + #endif +@@ -39,6 +41,7 @@ int + simd_get_supported_features (void) + { + int result = 0; ++#ifdef HAS_AUXV + long hwcaps = getauxval (AT_HWCAP2); + + #if defined(PPC_FEATURE2_ARCH_2_07) +@@ -46,6 +49,7 @@ simd_get_supported_features (void) + { + result |= SIMD_SUPPORTS_POWER8; + } ++#endif + #endif + + return (result); +-- +2.14.1 + diff --git a/package/aircrack-ng/0001-stack-protector.patch b/package/aircrack-ng/0001-stack-protector.patch deleted file mode 100644 index 5f2bd1b18f..0000000000 --- a/package/aircrack-ng/0001-stack-protector.patch +++ /dev/null @@ -1,58 +0,0 @@ -Added option to disable stack-protector support auto-detection in gcc. - -Downloaded from upstream commit: -http://trac.aircrack-ng.org/changeset/2889/ - -Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> - -Index: /trunk/INSTALLING -=================================================================== ---- trunk/INSTALLING (revision 2888) -+++ trunk/INSTALLING (revision 2889) -@@ -83,4 +83,6 @@ - * macport: Set this flag to true to compile on OS X with macports. - -+* stackprotector: Allows to enable/disable auto-detection of stack-protector support in gcc -+ - Example: - -Index: /trunk/common.mak -=================================================================== ---- trunk/common.mak (revision 2888) -+++ trunk/common.mak (revision 2889) -@@ -64,4 +64,13 @@ - ifeq ($(PCRE), true) - COMMON_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpcre) -DHAVE_PCRE -+endif -+ -+STACK_PROTECTOR = true -+ifeq ($(stackprotector), false) -+ STACK_PROTECTOR = false -+endif -+ -+ifeq ($(STACKPROTECTOR), false) -+ STACK_PROTECTOR = false - endif - -@@ -235,12 +244,14 @@ - endif - --ifeq ($(GCC_OVER49), 0) -- ifeq ($(GCC_OVER41), 1) -- COMMON_CFLAGS += -fstack-protector -+ifeq ($(STACK_PROTECTOR), true) -+ ifeq ($(GCC_OVER49), 0) -+ ifeq ($(GCC_OVER41), 1) -+ COMMON_CFLAGS += -fstack-protector -+ endif - endif --endif -- --ifeq ($(GCC_OVER49), 1) -- COMMON_CFLAGS += -fstack-protector-strong -+ -+ ifeq ($(GCC_OVER49), 1) -+ COMMON_CFLAGS += -fstack-protector-strong -+ endif - endif - diff --git a/package/aircrack-ng/0002-autotools-The-flag-without-opt-should-skip-stack-protector.patch b/package/aircrack-ng/0002-autotools-The-flag-without-opt-should-skip-stack-protector.patch new file mode 100644 index 0000000000..8563c78d33 --- /dev/null +++ b/package/aircrack-ng/0002-autotools-The-flag-without-opt-should-skip-stack-protector.patch @@ -0,0 +1,52 @@ +From 58fe40daf3e082d9e63d689d795a3bbecf72fedb Mon Sep 17 00:00:00 2001 +From: Joseph Benden <joe@benden.us> +Date: Mon, 16 Apr 2018 11:26:23 -0700 +Subject: [PATCH] autotools: The flag --without-opt should skip stack protector + flags. (#1864) + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Retrieved from upstream: https://github.com/aircrack-ng/aircrack-ng/commit/58fe40daf3e082d9e63d689d795a3bbecf72fedb] +--- + build/m4/aircrack_ng_compiler.m4 | 28 ++++++++++++++++------------ + 1 file changed, 16 insertions(+), 12 deletions(-) + +diff --git a/build/m4/aircrack_ng_compiler.m4 b/build/m4/aircrack_ng_compiler.m4 +index 0fb19726..8a973dbf 100644 +--- a/build/m4/aircrack_ng_compiler.m4 ++++ b/build/m4/aircrack_ng_compiler.m4 +@@ -108,19 +108,23 @@ case "$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor" in + CYGWIN*|MSYS*|cygwin*|msys*) + ;; + *) +- AS_IF([test "x$gcc_over49" = "xno"], [ +- AS_IF([test "x$gcc_over41" = "xyes"], [ +- AX_CHECK_COMPILE_FLAG([-fstack-protector], [ +- AX_APPEND_FLAG(-fstack-protector, [opt_[]_AC_LANG_ABBREV[]flags]) +- ]) +- ], []) +- ], []) ++ case $with_opt in ++ yes | "") ++ AS_IF([test "x$gcc_over49" = "xno"], [ ++ AS_IF([test "x$gcc_over41" = "xyes"], [ ++ AX_CHECK_COMPILE_FLAG([-fstack-protector], [ ++ AX_APPEND_FLAG(-fstack-protector, [opt_[]_AC_LANG_ABBREV[]flags]) ++ ]) ++ ], []) ++ ], []) + +- AS_IF([test "x$gcc_over49" = "xyes"], [ +- AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [ +- AX_APPEND_FLAG(-fstack-protector-strong, [opt_[]_AC_LANG_ABBREV[]flags]) +- ]) +- ], []) ++ AS_IF([test "x$gcc_over49" = "xyes"], [ ++ AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [ ++ AX_APPEND_FLAG(-fstack-protector-strong, [opt_[]_AC_LANG_ABBREV[]flags]) ++ ]) ++ ], []) ++ ;; ++ esac + ;; + esac + ;; diff --git a/package/aircrack-ng/0003-Autoconf-Added-NEON-intrinsic-support.patch b/package/aircrack-ng/0003-Autoconf-Added-NEON-intrinsic-support.patch new file mode 100644 index 0000000000..59c7ade4e9 --- /dev/null +++ b/package/aircrack-ng/0003-Autoconf-Added-NEON-intrinsic-support.patch @@ -0,0 +1,64 @@ +From 149929109eab1f79c4b90aa423f6d6eb4ee0e882 Mon Sep 17 00:00:00 2001 +From: Joseph Benden <joe@benden.us> +Date: Tue, 8 May 2018 11:49:22 -0700 +Subject: [PATCH] Autoconf: Added NEON intrinsic support. (#1879, #1872) + +Perform NEON intrinsic support using Autoconf, instead of failing to build on older ARM processors without NEON features. + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Retrieved from upstream: https://github.com/aircrack-ng/aircrack-ng/commit/149929109eab1f79c4b90aa423f6d6eb4ee0e882] +--- + build/m4/aircrack_ng_simd.m4 | 16 ++++++++++++++++ + src/Makefile.am | 2 ++ + 2 files changed, 18 insertions(+) + +diff --git a/build/m4/aircrack_ng_simd.m4 b/build/m4/aircrack_ng_simd.m4 +index 9d13031e..74135f32 100644 +--- a/build/m4/aircrack_ng_simd.m4 ++++ b/build/m4/aircrack_ng_simd.m4 +@@ -95,6 +95,21 @@ then + AX_APPEND_FLAG(-mfpu=neon, [arm_neon_[]_AC_LANG_ABBREV[]flags]) + AC_SUBST(arm_neon_[]_AC_LANG_ABBREV[]flags) + ]) ++ ++ AS_VAR_PUSHDEF([CACHEVAR], [ax_cv_neon_[]_AC_LANG_ABBREV[]flags]) ++ AC_CACHE_CHECK([whether _AC_LANG compiler supports NEON instructions], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $arm_neon_[]_AC_LANG_ABBREV[]flags" ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ ++#if !defined(__ARM_NEON) && !defined(__ARM_NEON__) && !defined(__aarch64) && !defined(__aarch64__) ++#error macro not defined ++#endif ++ ]])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags ++ ]) ++ AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [NEON_FOUND=1], [NEON_FOUND=0]) ++ AS_VAR_POPDEF([CACHEVAR]) + fi + + if test $IS_PPC -eq 1 +@@ -185,6 +200,7 @@ fi + AM_CONDITIONAL([X86], [test "$IS_X86" = 1]) + AM_CONDITIONAL([ARM], [test "$IS_ARM" = 1]) + AM_CONDITIONAL([PPC], [test "$IS_PPC" = 1]) ++AM_CONDITIONAL([NEON], [test "$NEON_FOUND" = 1]) + ]) + + AC_DEFUN([AIRCRACK_NG_SIMD_C], [ +diff --git a/src/Makefile.am b/src/Makefile.am +index 3cc8ebdc..beac9dce 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -116,9 +116,11 @@ endif + pkglibexec_PROGRAMS = aircrack-ng--generic + + if ARM ++if NEON + pkglibexec_PROGRAMS += aircrack-ng--neon \ + aircrack-ng--asimd + endif ++endif + + if PPC + pkglibexec_PROGRAMS += aircrack-ng--altivec \ diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in index 12fda1cbf2..8e0a6680df 100644 --- a/package/aircrack-ng/Config.in +++ b/package/aircrack-ng/Config.in @@ -3,9 +3,7 @@ config BR2_PACKAGE_AIRCRACK_NG depends on BR2_USE_MMU # uses fork() depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_INSTALL_LIBSTDCPP - # libnl has issues when linking statically - # they need fixing in libnl itself - select BR2_PACKAGE_LIBNL if !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBNL select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_ZLIB help diff --git a/package/aircrack-ng/aircrack-ng.hash b/package/aircrack-ng/aircrack-ng.hash index e210ad2e4a..a5fbbcfd31 100644 --- a/package/aircrack-ng/aircrack-ng.hash +++ b/package/aircrack-ng/aircrack-ng.hash @@ -1,3 +1,6 @@ # From http://www.aircrack-ng.org/downloads.html -sha1 2b2fbe50fedb606b3bd96a34d49f07760e8e618a aircrack-ng-1.2-rc4.tar.gz -md5 3bbc7d5035a98ec01e78774d05c3fcce aircrack-ng-1.2-rc4.tar.gz +sha1 ccc7a44ad2243c66b9a45fe133514485a72d674f aircrack-ng-1.2.tar.gz +md5 bb11ec14e1fe505d8d0d51cee0c54df9 aircrack-ng-1.2.tar.gz + +# Hash for license file: +sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 LICENSE diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk index 6b384c0720..bb8d1bf671 100644 --- a/package/aircrack-ng/aircrack-ng.mk +++ b/package/aircrack-ng/aircrack-ng.mk @@ -4,69 +4,42 @@ # ################################################################################ -AIRCRACK_NG_VERSION = 1.2-rc4 +AIRCRACK_NG_VERSION = 1.2 AIRCRACK_NG_SITE = http://download.aircrack-ng.org AIRCRACK_NG_LICENSE = GPL-2.0+ AIRCRACK_NG_LICENSE_FILES = LICENSE -AIRCRACK_NG_DEPENDENCIES = openssl zlib host-pkgconf +AIRCRACK_NG_DEPENDENCIES = \ + libnl \ + openssl \ + $(if $(BR2_PACKAGE_PCRE),pcre) \ + zlib \ + host-pkgconf +AIRCRACK_NG_AUTORECONF = YES # Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng -AIRCRACK_NG_MAKE_OPTS = unstable=true - -# Account for libpthread in static -AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) \ - $(if $(BR2_STATIC_LIBS),-lpthread -lz) - -# libnl support has issues when building static -ifeq ($(BR2_STATIC_LIBS),y) -AIRCRACK_NG_MAKE_OPTS += libnl=false -else -AIRCRACK_NG_MAKE_OPTS += libnl=true -AIRCRACK_NG_DEPENDENCIES += libnl -endif +AIRCRACK_NG_CONF_OPTS = --with-experimental ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y) -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=true +AIRCRACK_NG_CONF_OPTS += --with-opt else -AIRCRACK_NG_MAKE_OPTS += STACK_PROTECTOR=false +AIRCRACK_NG_CONF_OPTS += --without-opt endif ifeq ($(BR2_PACKAGE_LIBPCAP),y) AIRCRACK_NG_DEPENDENCIES += libpcap -AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=yes \ - $(if $(BR2_STATIC_LIBS),LIBPCAP="-lpcap `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`") -else -AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=no +AIRCRACK_NG_CONF_OPTS += \ + --with-libpcap-include=$(STAGING_DIR)/usr/include \ + --with-libpcap-lib=$(STAGING_DIR)/usr/lib +ifeq ($(BR2_STATIC_LIBS),y) +AIRCRACK_NG_CONF_ENV += \ + LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" endif - -ifeq ($(BR2_PACKAGE_PCRE),y) -AIRCRACK_NG_DEPENDENCIES += pcre -AIRCRACK_NG_MAKE_OPTS += pcre=true -else -AIRCRACK_NG_MAKE_OPTS += pcre=false endif -# Duplicate -lpthread, because it is also needed by sqlite ifeq ($(BR2_PACKAGE_SQLITE),y) AIRCRACK_NG_DEPENDENCIES += sqlite -AIRCRACK_NG_MAKE_OPTS += sqlite=true LIBSQL="-lsqlite3 $(if $(BR2_STATIC_LIBS),-lpthread)" +AIRCRACK_NG_CONF_OPTS += --with-sqlite3 else -AIRCRACK_NG_MAKE_OPTS += sqlite=false +AIRCRACK_NG_CONF_OPTS += --without-sqlite3 endif -ifeq ($(BR2_X86_CPU_HAS_SSE),y) -AIRCRACK_NG_MAKE_OPTS += NEWSSE=true -else -AIRCRACK_NG_MAKE_OPTS += NEWSSE=false -endif - -define AIRCRACK_NG_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(AIRCRACK_NG_LDFLAGS)" \ - $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) -endef - -define AIRCRACK_NG_INSTALL_TARGET_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \ - prefix=/usr $(AIRCRACK_NG_MAKE_OPTS) install -endef - -$(eval $(generic-package)) +$(eval $(autotools-package))
- Remove patch (already in version) - Add three patches (first one sent and merged upstream, second and third patchs retrieved upstream) - Move to autotools-package - Remove workaround for static handling of pthread as it isn't needed anymore - Remove deactivation of libnl in static build as it isn't needed anymore - Update workaround for static handling of libpcap - Add hash for license file Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- .../0001-Fix-compilation-without-getauxval.patch | 81 ++++++++++++++++++++++ package/aircrack-ng/0001-stack-protector.patch | 58 ---------------- ...g-without-opt-should-skip-stack-protector.patch | 52 ++++++++++++++ ...003-Autoconf-Added-NEON-intrinsic-support.patch | 64 +++++++++++++++++ package/aircrack-ng/Config.in | 4 +- package/aircrack-ng/aircrack-ng.hash | 7 +- package/aircrack-ng/aircrack-ng.mk | 67 ++++++------------ 7 files changed, 223 insertions(+), 110 deletions(-) create mode 100644 package/aircrack-ng/0001-Fix-compilation-without-getauxval.patch delete mode 100644 package/aircrack-ng/0001-stack-protector.patch create mode 100644 package/aircrack-ng/0002-autotools-The-flag-without-opt-should-skip-stack-protector.patch create mode 100644 package/aircrack-ng/0003-Autoconf-Added-NEON-intrinsic-support.patch