All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Add package linux-pam (resending, fixed indentation, mentioned website)
Date: Fri, 20 Jul 2012 22:45:38 +0200	[thread overview]
Message-ID: <20120720224538.189830cc@skate> (raw)
In-Reply-To: <1342647267-20745-1-git-send-email-golubovsky@gmail.com>

Hello Dmitry,

Le Wed, 18 Jul 2012 17:34:27 -0400,
Dmitry <golubovsky@gmail.com> a ?crit :

> 1. Add the linux-pam package building instructions
> 2. If the linux-pam package is selected, make sure it builds before
>    busybox just in case busybox is configured with PAM support
>    (make linux-pam a dependency of busybox)
> 
> Signed-off-by: Dmitry <golubovsky@gmail.com>
> ---
>  package/Config.in              |    1 +
>  package/busybox/busybox.mk     |    3 +++
>  package/linux-pam/Config.in    |   15 +++++++++++++++
>  package/linux-pam/linux-pam.mk |   37 +++++++++++++++++++++++++++++++++++++
>  4 files changed, 56 insertions(+), 0 deletions(-)
>  create mode 100644 package/linux-pam/Config.in
>  create mode 100644 package/linux-pam/linux-pam.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 6aabb8e..4bbb293 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -660,6 +660,7 @@ source "package/bootutils/Config.in"
>  endif
>  source "package/htop/Config.in"
>  source "package/kmod/Config.in"
> +source "package/linux-pam/Config.in"

linux-pam is a library, so it should rather go in Libraries -> Other in
the menuconfig.

>  if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
>  source "package/module-init-tools/Config.in"
>  endif
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index 394a1ae..4a1de33 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -11,6 +11,9 @@ else
>  BUSYBOX_VERSION = $(call qstrip,$(BR2_BUSYBOX_VERSION))
>  BUSYBOX_SITE = http://www.busybox.net/downloads
>  endif
> +ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
> +BUSYBOX_DEPENDENCIES += linux-pam
> +endif
>  BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
>  BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config

This Busybox change should be part of a separate patch (so your patch
series should have two patches: one adding the linux-pam package, one
tweaking Busybox to use linux-pam).

Also, shouldn't you ensure that CONFIG_PAM is enabled in the Busybox
configuration in that case?

>  # Allows the build system to tweak CFLAGS
> diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in
> new file mode 100644
> index 0000000..8a9bbca
> --- /dev/null
> +++ b/package/linux-pam/Config.in
> @@ -0,0 +1,15 @@
> +config BR2_PACKAGE_LINUX_PAM
> +	bool "linux-pam"
> +	select BR2_PACKAGE_LIBINTL
> +	select BR2_PACKAGE_GETTEXT

No, see
http://buildroot.org/downloads/manual/manual.html#_gettext_integration_and_interaction_with_packages.

> diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk
> new file mode 100644
> index 0000000..5024033
> --- /dev/null
> +++ b/package/linux-pam/linux-pam.mk
> @@ -0,0 +1,37 @@
> +############################################
> +#
> +# linux-pam
> +# 
> +############################################
> +
> +LINUX_PAM_VERSION = 1.1.4
> +LINUX_PAM_SOURCE = Linux-PAM-$(LINUX_PAM_VERSION).tar.bz2
> +LINUX_PAM_SITE = http://linux-pam.org/library/
> +LINUX_PAM_INSTALL_STAGING = YES
> +LINUX_PAM_INSTALL_TARGET = YES
> +LINUX_PAM_CONF_OPT = --disable-prelude --disable-isadir --disable-nis --disable-regenerate-docu
> +LINUX_PAM_CONF_OPT += --enable-securedir=/lib/security --libdir=/lib
> +LINUX_PAM_DEPENDENCIES = gettext libintl flex
> +LINUX_PAM_LICENSE = BSD
> +LINUX_PAM_LICENSE_FILES = COPYING
> +
> +define LINUX_PAM_BUILD_CMDS
> +	$(MAKE) CC="$(TARGET_CC) -lintl -lfl" LD="$(TARGET_LD)" -C $(@D) all
> +endef
> +
> +define LINUX_PAM_DISABLE_INNETGR
> +	echo >>$(@D)/config.h
> +	echo "#undef HAVE_RUSEROK">>$(@D)/config.h
> +	echo "#define HAVE_RUSEROK_AF">>$(@D)/config.h
> +	echo "#define ruserok_af(a, b, c, d, e) (-1)" >>$(@D)/config.h
> +	echo "#undef innetgr">>$(@D)/config.h
> +	echo "#define innetgr(a, b, c, d) 0" >>$(@D)/config.h
> +	echo "all:" >$(@D)/doc/Makefile
> +	echo "" >>$(@D)/doc/Makefile
> +	echo "install:" >>$(@D)/doc/Makefile
> +	echo "" >>$(@D)/doc/Makefile
> +endef

Can you add a comment above this justifying why this is needed?

Thanks!

Best regards,

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

  reply	other threads:[~2012-07-20 20:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 21:34 [Buildroot] [PATCH] Add package linux-pam (resending, fixed indentation, mentioned website) Dmitry
2012-07-20 20:45 ` Thomas Petazzoni [this message]
2012-07-20 21:58   ` Thomas Petazzoni
2012-07-21  1:19   ` Dmitry Golubovsky
2012-07-21 12:47     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120720224538.189830cc@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.