Re: [oe] [meta-oe][PATCH] pam-plugin-ldapdb: add recipe

2018-05-23 Thread Richard Leitner


On 05/22/2018 08:09 PM, Khem Raj wrote:
> On Tue, May 22, 2018 at 7:10 AM, Richard Leitner
>  wrote:
>> Add recipe for version 1.3 of pam-plugin-ldapdb, a PAM module for
>> directly binding a user DN to an LDAP server.
>>
>> Signed-off-by: Richard Leitner 
>> ---
>>  .../recipes-extended/pam/pam-plugin-ldapdb_1.3.bb  | 23 
>> ++
>>  1 file changed, 23 insertions(+)
>>  create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>>
>> diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb 
>> b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>> new file mode 100644
>> index 0..a68d1999f
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>> @@ -0,0 +1,23 @@
>> +SUMMARY = "PAM searchless LDAP authentication module"
>> +HOMEPAGE = "https://github.com/rmbreak/pam_ldapdb;
>> +BUGTRACKER = "https://github.com/rmbreak/pam_ldapdb/issues;
>> +SECTION = "libs"
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=41ab94182d94be9bb35e2a8b933f1e7d"
>> +
>> +DEPENDS += "libpam openldap"
>> +
>> +inherit distro_features_check
>> +REQUIRED_DISTRO_FEATURES = "pam"
>> +
>> +SRC_URI = "https://github.com/rmbreak/pam_ldapdb/archive/v${PV}.tar.gz;
>> +SRC_URI[md5sum] = "2dd4f1370fcfe995ee0ad09611109b87"
>> +SRC_URI[sha256sum] = 
>> "8ed92b36523556bb5d9bf3eb33a1035e46041d4be767c8d62136930c0ca0e45b"
>> +
>> +S = "${WORKDIR}/pam_ldapdb-${PV}"
>> +
>> +do_install () {
>> +oe_runmake install DESTDIR=${D} PAMDIR=${base_libdir}/security
>> +}
> 
> Perhaps using EXTRA_OEMAKE += " PAMDIR=${base_libdir}/security"
> would mean do dont need to define custom do_install()

nope. sadly not. Without the custom do_install nothing gets installed and 
therefore
we get no package...

> 
>> +
>> +FILES_${PN} = "${base_libdir}/security/pam_ldapdb.so"

regards;Richard.L
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-oe][PATCH] pam-plugin-ldapdb: add recipe

2018-05-23 Thread Richard Leitner
Hi Andre,
thank you for your feedback. Please find my comments below.

On 05/23/2018 02:51 AM, Andre McCurdy wrote:
> On Tue, May 22, 2018 at 4:10 AM, Richard Leitner
>  wrote:
>> Add recipe for version 1.3 of pam-plugin-ldapdb, a PAM module for
>> directly binding a user DN to an LDAP server.
>>
>> Signed-off-by: Richard Leitner 
>> ---
>>  .../recipes-extended/pam/pam-plugin-ldapdb_1.3.bb  | 23 
>> ++
>>  1 file changed, 23 insertions(+)
>>  create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>>
>> diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb 
>> b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>> new file mode 100644
>> index 0..a68d1999f
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>> @@ -0,0 +1,23 @@
>> +SUMMARY = "PAM searchless LDAP authentication module"
>> +HOMEPAGE = "https://github.com/rmbreak/pam_ldapdb;
>> +BUGTRACKER = "https://github.com/rmbreak/pam_ldapdb/issues;
>> +SECTION = "libs"
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=41ab94182d94be9bb35e2a8b933f1e7d"
>> +
>> +DEPENDS += "libpam openldap"
> 
> The usual convention is to assign to DEPENDS with = rather than +=

Ok. Thanks for that hint. I'll change that in v2.

> 
>> +inherit distro_features_check
>> +REQUIRED_DISTRO_FEATURES = "pam"
>> +
>> +SRC_URI = "https://github.com/rmbreak/pam_ldapdb/archive/v${PV}.tar.gz;
> 
> To give the local file a meaningful file name, you can have bitbake
> rename it as part of the download process by adding
> ";downloadfilename=${BP}.tar.gz" to the end of SRC_URI.

Thank you. That makes sense. I'll add it in v2.

> 
> Note however that there have recently been a series of patches merged
> to meta-oe which updated recipes to build from git clones rather than
> github tar file archives, so you may want to consider doing that in
> this recipe too.

Why should we change to git clones instead of archives? What's the advantage?

IMHO it only causes more traffic and uses more disk space.
Furthermore if we rely on tags these may be changed without our notice...
And if they are unsigned (like here) we also don't know if something got 
modified unintentionally...
Or should we use revision hashes?

> 
>> +SRC_URI[md5sum] = "2dd4f1370fcfe995ee0ad09611109b87"
>> +SRC_URI[sha256sum] = 
>> "8ed92b36523556bb5d9bf3eb33a1035e46041d4be767c8d62136930c0ca0e45b"
>> +
>> +S = "${WORKDIR}/pam_ldapdb-${PV}"
>> +
>> +do_install () {
>> +oe_runmake install DESTDIR=${D} PAMDIR=${base_libdir}/security
>> +}
>> +
>> +FILES_${PN} = "${base_libdir}/security/pam_ldapdb.so"
> 
> It's conventional to add to the default packaging rules rather than
> over-ride them, ie use += here rather than =
> 

Ok. Thanks.

regards;Richard.L
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-oe][PATCH] pam-plugin-ldapdb: add recipe

2018-05-22 Thread Andre McCurdy
On Tue, May 22, 2018 at 4:10 AM, Richard Leitner
 wrote:
> Add recipe for version 1.3 of pam-plugin-ldapdb, a PAM module for
> directly binding a user DN to an LDAP server.
>
> Signed-off-by: Richard Leitner 
> ---
>  .../recipes-extended/pam/pam-plugin-ldapdb_1.3.bb  | 23 
> ++
>  1 file changed, 23 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>
> diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb 
> b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
> new file mode 100644
> index 0..a68d1999f
> --- /dev/null
> +++ b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
> @@ -0,0 +1,23 @@
> +SUMMARY = "PAM searchless LDAP authentication module"
> +HOMEPAGE = "https://github.com/rmbreak/pam_ldapdb;
> +BUGTRACKER = "https://github.com/rmbreak/pam_ldapdb/issues;
> +SECTION = "libs"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=41ab94182d94be9bb35e2a8b933f1e7d"
> +
> +DEPENDS += "libpam openldap"

The usual convention is to assign to DEPENDS with = rather than +=

> +inherit distro_features_check
> +REQUIRED_DISTRO_FEATURES = "pam"
> +
> +SRC_URI = "https://github.com/rmbreak/pam_ldapdb/archive/v${PV}.tar.gz;

To give the local file a meaningful file name, you can have bitbake
rename it as part of the download process by adding
";downloadfilename=${BP}.tar.gz" to the end of SRC_URI.

Note however that there have recently been a series of patches merged
to meta-oe which updated recipes to build from git clones rather than
github tar file archives, so you may want to consider doing that in
this recipe too.

> +SRC_URI[md5sum] = "2dd4f1370fcfe995ee0ad09611109b87"
> +SRC_URI[sha256sum] = 
> "8ed92b36523556bb5d9bf3eb33a1035e46041d4be767c8d62136930c0ca0e45b"
> +
> +S = "${WORKDIR}/pam_ldapdb-${PV}"
> +
> +do_install () {
> +oe_runmake install DESTDIR=${D} PAMDIR=${base_libdir}/security
> +}
> +
> +FILES_${PN} = "${base_libdir}/security/pam_ldapdb.so"

It's conventional to add to the default packaging rules rather than
over-ride them, ie use += here rather than =
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


Re: [oe] [meta-oe][PATCH] pam-plugin-ldapdb: add recipe

2018-05-22 Thread Khem Raj
On Tue, May 22, 2018 at 7:10 AM, Richard Leitner
 wrote:
> Add recipe for version 1.3 of pam-plugin-ldapdb, a PAM module for
> directly binding a user DN to an LDAP server.
>
> Signed-off-by: Richard Leitner 
> ---
>  .../recipes-extended/pam/pam-plugin-ldapdb_1.3.bb  | 23 
> ++
>  1 file changed, 23 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
>
> diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb 
> b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
> new file mode 100644
> index 0..a68d1999f
> --- /dev/null
> +++ b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
> @@ -0,0 +1,23 @@
> +SUMMARY = "PAM searchless LDAP authentication module"
> +HOMEPAGE = "https://github.com/rmbreak/pam_ldapdb;
> +BUGTRACKER = "https://github.com/rmbreak/pam_ldapdb/issues;
> +SECTION = "libs"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=41ab94182d94be9bb35e2a8b933f1e7d"
> +
> +DEPENDS += "libpam openldap"
> +
> +inherit distro_features_check
> +REQUIRED_DISTRO_FEATURES = "pam"
> +
> +SRC_URI = "https://github.com/rmbreak/pam_ldapdb/archive/v${PV}.tar.gz;
> +SRC_URI[md5sum] = "2dd4f1370fcfe995ee0ad09611109b87"
> +SRC_URI[sha256sum] = 
> "8ed92b36523556bb5d9bf3eb33a1035e46041d4be767c8d62136930c0ca0e45b"
> +
> +S = "${WORKDIR}/pam_ldapdb-${PV}"
> +
> +do_install () {
> +oe_runmake install DESTDIR=${D} PAMDIR=${base_libdir}/security
> +}

Perhaps using EXTRA_OEMAKE += " PAMDIR=${base_libdir}/security"
would mean do dont need to define custom do_install()

> +
> +FILES_${PN} = "${base_libdir}/security/pam_ldapdb.so"
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe][PATCH] pam-plugin-ldapdb: add recipe

2018-05-22 Thread Richard Leitner
Add recipe for version 1.3 of pam-plugin-ldapdb, a PAM module for
directly binding a user DN to an LDAP server.

Signed-off-by: Richard Leitner 
---
 .../recipes-extended/pam/pam-plugin-ldapdb_1.3.bb  | 23 ++
 1 file changed, 23 insertions(+)
 create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb

diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb 
b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
new file mode 100644
index 0..a68d1999f
--- /dev/null
+++ b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
@@ -0,0 +1,23 @@
+SUMMARY = "PAM searchless LDAP authentication module"
+HOMEPAGE = "https://github.com/rmbreak/pam_ldapdb;
+BUGTRACKER = "https://github.com/rmbreak/pam_ldapdb/issues;
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=41ab94182d94be9bb35e2a8b933f1e7d"
+
+DEPENDS += "libpam openldap"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+SRC_URI = "https://github.com/rmbreak/pam_ldapdb/archive/v${PV}.tar.gz;
+SRC_URI[md5sum] = "2dd4f1370fcfe995ee0ad09611109b87"
+SRC_URI[sha256sum] = 
"8ed92b36523556bb5d9bf3eb33a1035e46041d4be767c8d62136930c0ca0e45b"
+
+S = "${WORKDIR}/pam_ldapdb-${PV}"
+
+do_install () {
+oe_runmake install DESTDIR=${D} PAMDIR=${base_libdir}/security
+}
+
+FILES_${PN} = "${base_libdir}/security/pam_ldapdb.so"
-- 
2.11.0

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel