[Buildroot] [PATCH] Add Netatalk

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Apr 25 08:35:23 UTC 2012


Hello Maxime,

Thanks for your contribution! A few comments below.

Le Wed, 25 Apr 2012 10:24:50 +0200,
Maxime Hadjinlian <maxime.hadjinlian at gmail.com> a écrit :

> This patch add the Netatalk package to Buildroot, it also update the Berkeley
> DB package as it was required by Netatalk.  I did not go extensively through
> the configure option but they works for me.
> 
> Note : I must add that I had a strange problem while building. I have the
> openssl-dev package on my machine (Debian testing) and Buildroot did not
> built openssl package, later the build of Netatalk complained about my
> /usr/include/openssl/ folder (which is obviously, not correct). After moving
> this folder to openssl.old (on my machine not the staging dir), Buildroot
> built openssl and Netatalk was happy. I don't know what happened there but,
> you are informed.

This is not normal, and should be investigated. It is very likely that
Buildroot users will have OpenSSL development files installed on their
host, and this should not conflict with the build. We don't want to
force people to rename /usr/include/openssl to /usr/include/openssl.old.

If you have issues in finding what's going on, please report with more
details, i.e with the config.log generated by netatalk ./configure
script. We can help you investigating this.

>  package/Config.in                |    1 +
>  package/berkeleydb/berkeleydb.mk |    3 +-

The berkeleydb bump should be in a separate patch.

> diff --git a/package/netatalk/Config.in b/package/netatalk/Config.in
> new file mode 100644
> index 0000000..5adbce9
> --- /dev/null
> +++ b/package/netatalk/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_NETATALK
> +	bool "netatalk"
> +    select BR2_PACKAGE_BERKELEYDB
> +    select BR2_PACKAGE_OPENSSL
> +    select BR2_PACKAGE_LIBGCRYPT
> +    select BR2_PACKAGE_LIBGPG_ERROR
> +    help
> +      Netatalk can be used to turn a *NIX machine into an extremely 
> +      high-performance and reliable file server for Macintosh computers.
> +
> +	  http://netatalk.sourceforge.net/

Indentation is wrong here:

 * one tab before "select" and "help"
 * one tab + two spaces before the help text itself

> diff --git a/package/netatalk/S50netatalk b/package/netatalk/S50netatalk
> new file mode 100755
> index 0000000..c46f58f
> --- /dev/null
> +++ b/package/netatalk/S50netatalk

The init script is quite complicated, but I guess it's because netatalk
is complicated :)

> diff --git a/package/netatalk/netatalk.mk b/package/netatalk/netatalk.mk
> new file mode 100644
> index 0000000..f370136
> --- /dev/null
> +++ b/package/netatalk/netatalk.mk
> @@ -0,0 +1,33 @@
> +#############################################################
> +#
> +# netatalk
> +#
> +#############################################################
> +NETATALK_VERSION = 2.2.2
> +NETATALK_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/netatalk/netatalk/$(NETATALK_VERSION)/
> +NETATALK_SOURCE = netatalk-$(NETATALK_VERSION).tar.bz2
> +NETATALK_CFLAGS += -DNO_DEBUG

This line isn't doing anything. Unless I'm wrong, we don't do anything
with the <pkg>_CFLAGS variable.

> +NETALATK_DEPENDENCIES = openssl berkeleydb libgcrypt libgpg-error
> +NETATALK_CONF_OPT += --sysconfdir=/etc \
> +	--with-cnid-cdb-backend \
> +	--disable-cups \
> +	--with-bdb=${STAGING_DIR}/usr \

This should be $(STAGING_DIR)/usr. We use the $() syntax everywhere to
access make variables.

> +	--disable-cups \
> +	--disable-zeroconf \
> +	--with-ssl-dir=$(STAGING_DIR)/usr \
> +	--with-libgcrypt-dir=$(STAGING_DIR)/usr \
> +	--with-shadow \
> +	--disable-shell-check \
> +	--without-pam \
> +	--prefix=$(STAGING_DIR)

No, don't override the prefix, it should remain to its default value
passed by the autotargets infrastructure, which is /usr.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com


More information about the buildroot mailing list