Re: [oe] [meta-oe][PATCH] vlock: add new recipe

2017-08-09 Thread Huang, Jie (Jackie)
I will fix and re-send.

Thanks,
Jackie

From: Martin Jansa [mailto:martin.ja...@gmail.com]
Sent: Thursday, August 10, 2017 00:54
To: Huang, Jie (Jackie)
Cc: openembedded-devel
Subject: Re: [oe] [meta-oe][PATCH] vlock: add new recipe

Fails to build:
http://errors.yoctoproject.org/Errors/Details/150177/

On Tue, Jul 25, 2017 at 2:59 AM, 
<jackie.hu...@windriver.com<mailto:jackie.hu...@windriver.com>> wrote:
From: Jackie Huang 
<jackie.hu...@windriver.com<mailto:jackie.hu...@windriver.com>>

vlock is a program to lock one or more
sessions on the Linux console.

Signed-off-by: Jackie Huang 
<jackie.hu...@windriver.com<mailto:jackie.hu...@windriver.com>>
---
 .../vlock/vlock-2.2.3/disable_vlockrc.patch|  37 +++
 .../vlock/vlock-2.2.3/vlock-no_tally.patch | 107 +
 .../recipes-extended/vlock/vlock-2.2.3/vlock_pam   |   3 +
 .../vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch |  19 
 meta-oe/recipes-extended/vlock/vlock_2.2.3.bb<http://vlock_2.2.3.bb>  |  
53 ++
 5 files changed, 219 insertions(+)
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
 create mode 100644 meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock_2.2.3.bb<http://vlock_2.2.3.bb>

diff --git a/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch 
b/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
new file mode 100644
index 0..ee0d074de
--- /dev/null
+++ b/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [configuration]
+
+written by: Jeff Polk <jeff.p...@windriver.com<mailto:jeff.p...@windriver.com>>
+Signed-off-by: Jackie Huang 
<jackie.hu...@windriver.com<mailto:jackie.hu...@windriver.com>>
+
+Index: vlock-2.2.2/man/vlock.1
+===
+--- vlock-2.2.2.orig/man/vlock.1   2010-07-26 14:12:42.0 -0400
 vlock-2.2.2/man/vlock.12010-07-26 14:13:06.0 -0400
+@@ -111,11 +111,6 @@
+ to an invalid value or 0 no timeout is used.  \fBWarning\fR: If this value is
+ too low, you may not be able to unlock your session.
+ .PP
+-.SH FILES
+-.B ~/.vlockrc
+-.IP
+-This file is read by \fBvlock\fR on startup if it exists.  All the variables
+-mentioned above can be set here.
+ .SH SECURITY
+ See the SECURITY file in the \fBvlock\fR distribution for more information.
+ .PP
+Index: vlock-2.2.2/src/vlock.sh
+===
+--- vlock-2.2.2.orig/src/vlock.sh  2010-07-26 14:12:32.0 -0400
 vlock-2.2.2/src/vlock.sh   2010-07-26 14:13:33.0 -0400
+@@ -35,11 +35,6 @@
+
+ ${VLOCK_ENTER_PROMPT}"
+
+-# Read user settings.
+-if [ -r "${HOME}/.vlockrc" ] ; then
+-  . "${HOME}/.vlockrc"
+-fi
+-
+ # "Compile" time variables.
+ VLOCK_MAIN="%PREFIX%/sbin/vlock-main"
+ VLOCK_VERSION="%VLOCK_VERSION%"
diff --git a/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch 
b/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
new file mode 100644
index 0..6e8a6a9fd
--- /dev/null
+++ b/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
@@ -0,0 +1,107 @@
+Upstream-Status: Pending
+
+written by: Jeff Polk <jeff.p...@windriver.com<mailto:jeff.p...@windriver.com>>
+Signed-off-by: Jackie Huang 
<jackie.hu...@windriver.com<mailto:jackie.hu...@windriver.com>>
+
+--- a/Makefile
 b/Makefile
+@@ -126,6 +126,10 @@ ifeq ($(AUTH_METHOD),shadow)
+ vlock-main : override LDLIBS += $(CRYPT_LIB)
+ endif
+
++ifneq ($(ENABLE_FAIL_COUNT),yes)
++vlock-main.o : override CFLAGS += -DNO_FAIL_COUNT
++endif
++
+ ifeq ($(ENABLE_PLUGINS),yes)
+ vlock-main: plugins.o plugin.o module.o process.o script.o tsort.o list.o
+ # -rdynamic is needed so that the all plugin can access the symbols from 
console_switch.o
+--- a/configure
 b/configure
+@@ -44,6 +44,7 @@ Optional Features:
+   --enable-shadow enable shadow authentication [disabled]
+   --enable-root-password  enable unlogging with root password [enabled]
+   --enable-debug  enable debugging
++  --enable-fail-count enable failed login attempt summary [enabled]
+
+ Additional configuration:
+   --with-scripts=SCRIPTS  enable the named scripts []
+@@ -78,6 +79,9 @@ enable_feature() {
+ root-password)
+   ENABLE_ROOT_PASSWORD="$2"
+ ;;
++fail-count)
++  ENABLE_FAIL_COUNT="$2"
++;;
+ pam|shadow)
+   if [ "$2" = "yes" ] ; then
+ if [ -n "$auth_method" ] && [ "

Re: [oe] [meta-oe][PATCH] vlock: add new recipe

2017-08-09 Thread Martin Jansa
Fails to build:
http://errors.yoctoproject.org/Errors/Details/150177/

On Tue, Jul 25, 2017 at 2:59 AM,  wrote:

> From: Jackie Huang 
>
> vlock is a program to lock one or more
> sessions on the Linux console.
>
> Signed-off-by: Jackie Huang 
> ---
>  .../vlock/vlock-2.2.3/disable_vlockrc.patch|  37 +++
>  .../vlock/vlock-2.2.3/vlock-no_tally.patch | 107
> +
>  .../recipes-extended/vlock/vlock-2.2.3/vlock_pam   |   3 +
>  .../vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch |  19 
>  meta-oe/recipes-extended/vlock/vlock_2.2.3.bb  |  53 ++
>  5 files changed, 219 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_
> vlockrc.patch
>  create mode 100644 meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_
> tally.patch
>  create mode 100644 meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam
>  create mode 100644 meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_
> tally2_reset.patch
>  create mode 100644 meta-oe/recipes-extended/vlock/vlock_2.2.3.bb
>
> diff --git a/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
> b/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
> new file mode 100644
> index 0..ee0d074de
> --- /dev/null
> +++ b/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
> @@ -0,0 +1,37 @@
> +Upstream-Status: Inappropriate [configuration]
> +
> +written by: Jeff Polk 
> +Signed-off-by: Jackie Huang 
> +
> +Index: vlock-2.2.2/man/vlock.1
> +===
> +--- vlock-2.2.2.orig/man/vlock.1   2010-07-26 14:12:42.0 -0400
>  vlock-2.2.2/man/vlock.12010-07-26 14:13:06.0 -0400
> +@@ -111,11 +111,6 @@
> + to an invalid value or 0 no timeout is used.  \fBWarning\fR: If this
> value is
> + too low, you may not be able to unlock your session.
> + .PP
> +-.SH FILES
> +-.B ~/.vlockrc
> +-.IP
> +-This file is read by \fBvlock\fR on startup if it exists.  All the
> variables
> +-mentioned above can be set here.
> + .SH SECURITY
> + See the SECURITY file in the \fBvlock\fR distribution for more
> information.
> + .PP
> +Index: vlock-2.2.2/src/vlock.sh
> +===
> +--- vlock-2.2.2.orig/src/vlock.sh  2010-07-26 14:12:32.0 -0400
>  vlock-2.2.2/src/vlock.sh   2010-07-26 14:13:33.0 -0400
> +@@ -35,11 +35,6 @@
> +
> + ${VLOCK_ENTER_PROMPT}"
> +
> +-# Read user settings.
> +-if [ -r "${HOME}/.vlockrc" ] ; then
> +-  . "${HOME}/.vlockrc"
> +-fi
> +-
> + # "Compile" time variables.
> + VLOCK_MAIN="%PREFIX%/sbin/vlock-main"
> + VLOCK_VERSION="%VLOCK_VERSION%"
> diff --git a/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
> b/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
> new file mode 100644
> index 0..6e8a6a9fd
> --- /dev/null
> +++ b/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
> @@ -0,0 +1,107 @@
> +Upstream-Status: Pending
> +
> +written by: Jeff Polk 
> +Signed-off-by: Jackie Huang 
> +
> +--- a/Makefile
>  b/Makefile
> +@@ -126,6 +126,10 @@ ifeq ($(AUTH_METHOD),shadow)
> + vlock-main : override LDLIBS += $(CRYPT_LIB)
> + endif
> +
> ++ifneq ($(ENABLE_FAIL_COUNT),yes)
> ++vlock-main.o : override CFLAGS += -DNO_FAIL_COUNT
> ++endif
> ++
> + ifeq ($(ENABLE_PLUGINS),yes)
> + vlock-main: plugins.o plugin.o module.o process.o script.o tsort.o list.o
> + # -rdynamic is needed so that the all plugin can access the symbols from
> console_switch.o
> +--- a/configure
>  b/configure
> +@@ -44,6 +44,7 @@ Optional Features:
> +   --enable-shadow enable shadow authentication [disabled]
> +   --enable-root-password  enable unlogging with root password [enabled]
> +   --enable-debug  enable debugging
> ++  --enable-fail-count enable failed login attempt summary [enabled]
> +
> + Additional configuration:
> +   --with-scripts=SCRIPTS  enable the named scripts []
> +@@ -78,6 +79,9 @@ enable_feature() {
> + root-password)
> +   ENABLE_ROOT_PASSWORD="$2"
> + ;;
> ++fail-count)
> ++  ENABLE_FAIL_COUNT="$2"
> ++;;
> + pam|shadow)
> +   if [ "$2" = "yes" ] ; then
> + if [ -n "$auth_method" ] && [ "$auth_method" != "$1" ] ; then
> +@@ -232,6 +232,7 @@ set_defaults() {
> +   AUTH_METHOD="pam"
> +   ENABLE_ROOT_PASSWORD="yes"
> +   ENABLE_PLUGINS="yes"
> ++  ENABLE_FAIL_COUNT="yes"
> +   SCRIPTS=""
> +
> +   VLOCK_GROUP="vlock"
> +@@ -356,10 +356,14 @@ ENABLE_PLUGINS = ${ENABLE_PLUGINS}
> + # which plugins should be build
> + MODULES = ${MODULES}
> + # which scripts should be installed
> + SCRIPTS = ${SCRIPTS}
> +
> ++# display a summary of failed authentication attempts after successfully
> ++# unlocking?
> 

[oe] [meta-oe][PATCH] vlock: add new recipe

2017-07-24 Thread jackie.huang
From: Jackie Huang 

vlock is a program to lock one or more
sessions on the Linux console.

Signed-off-by: Jackie Huang 
---
 .../vlock/vlock-2.2.3/disable_vlockrc.patch|  37 +++
 .../vlock/vlock-2.2.3/vlock-no_tally.patch | 107 +
 .../recipes-extended/vlock/vlock-2.2.3/vlock_pam   |   3 +
 .../vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch |  19 
 meta-oe/recipes-extended/vlock/vlock_2.2.3.bb  |  53 ++
 5 files changed, 219 insertions(+)
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
 create mode 100644 meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam
 create mode 100644 
meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock_pam_tally2_reset.patch
 create mode 100644 meta-oe/recipes-extended/vlock/vlock_2.2.3.bb

diff --git a/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch 
b/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
new file mode 100644
index 0..ee0d074de
--- /dev/null
+++ b/meta-oe/recipes-extended/vlock/vlock-2.2.3/disable_vlockrc.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [configuration]
+
+written by: Jeff Polk 
+Signed-off-by: Jackie Huang 
+
+Index: vlock-2.2.2/man/vlock.1
+===
+--- vlock-2.2.2.orig/man/vlock.1   2010-07-26 14:12:42.0 -0400
 vlock-2.2.2/man/vlock.12010-07-26 14:13:06.0 -0400
+@@ -111,11 +111,6 @@
+ to an invalid value or 0 no timeout is used.  \fBWarning\fR: If this value is
+ too low, you may not be able to unlock your session.
+ .PP
+-.SH FILES
+-.B ~/.vlockrc
+-.IP
+-This file is read by \fBvlock\fR on startup if it exists.  All the variables
+-mentioned above can be set here.
+ .SH SECURITY
+ See the SECURITY file in the \fBvlock\fR distribution for more information.
+ .PP
+Index: vlock-2.2.2/src/vlock.sh
+===
+--- vlock-2.2.2.orig/src/vlock.sh  2010-07-26 14:12:32.0 -0400
 vlock-2.2.2/src/vlock.sh   2010-07-26 14:13:33.0 -0400
+@@ -35,11 +35,6 @@
+ 
+ ${VLOCK_ENTER_PROMPT}"
+ 
+-# Read user settings.
+-if [ -r "${HOME}/.vlockrc" ] ; then
+-  . "${HOME}/.vlockrc"
+-fi
+-
+ # "Compile" time variables.
+ VLOCK_MAIN="%PREFIX%/sbin/vlock-main"
+ VLOCK_VERSION="%VLOCK_VERSION%"
diff --git a/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch 
b/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
new file mode 100644
index 0..6e8a6a9fd
--- /dev/null
+++ b/meta-oe/recipes-extended/vlock/vlock-2.2.3/vlock-no_tally.patch
@@ -0,0 +1,107 @@
+Upstream-Status: Pending
+
+written by: Jeff Polk 
+Signed-off-by: Jackie Huang 
+
+--- a/Makefile
 b/Makefile
+@@ -126,6 +126,10 @@ ifeq ($(AUTH_METHOD),shadow)
+ vlock-main : override LDLIBS += $(CRYPT_LIB)
+ endif
+ 
++ifneq ($(ENABLE_FAIL_COUNT),yes)
++vlock-main.o : override CFLAGS += -DNO_FAIL_COUNT
++endif
++
+ ifeq ($(ENABLE_PLUGINS),yes)
+ vlock-main: plugins.o plugin.o module.o process.o script.o tsort.o list.o
+ # -rdynamic is needed so that the all plugin can access the symbols from 
console_switch.o
+--- a/configure
 b/configure
+@@ -44,6 +44,7 @@ Optional Features:
+   --enable-shadow enable shadow authentication [disabled]
+   --enable-root-password  enable unlogging with root password [enabled]
+   --enable-debug  enable debugging
++  --enable-fail-count enable failed login attempt summary [enabled]
+ 
+ Additional configuration:
+   --with-scripts=SCRIPTS  enable the named scripts []
+@@ -78,6 +79,9 @@ enable_feature() {
+ root-password)
+   ENABLE_ROOT_PASSWORD="$2"
+ ;;
++fail-count)
++  ENABLE_FAIL_COUNT="$2"
++;;
+ pam|shadow)
+   if [ "$2" = "yes" ] ; then
+ if [ -n "$auth_method" ] && [ "$auth_method" != "$1" ] ; then
+@@ -232,6 +232,7 @@ set_defaults() {
+   AUTH_METHOD="pam"
+   ENABLE_ROOT_PASSWORD="yes"
+   ENABLE_PLUGINS="yes"
++  ENABLE_FAIL_COUNT="yes"
+   SCRIPTS=""
+ 
+   VLOCK_GROUP="vlock"
+@@ -356,10 +356,14 @@ ENABLE_PLUGINS = ${ENABLE_PLUGINS}
+ # which plugins should be build
+ MODULES = ${MODULES}
+ # which scripts should be installed
+ SCRIPTS = ${SCRIPTS}
+ 
++# display a summary of failed authentication attempts after successfully
++# unlocking?
++ENABLE_FAIL_COUNT = ${ENABLE_FAIL_COUNT}
++
+ # root's group
+ ROOT_GROUP = ${ROOT_GROUP}
+ 
+ # group for privileged plugins
+ VLOCK_GROUP = ${VLOCK_GROUP}
+--- a/src/vlock-main.c
 b/src/vlock-main.c
+@@ -111,7 +111,9 @@ static void restore_terminal(void)
+   (void) tcsetattr(STDIN_FILENO, TCSANOW, );
+ }
+ 
++#ifdef ENABLE_FAIL_COUNT
+ static int auth_tries;
++#endif /* ENABLE_FAIL_COUNT */
+