diff mbox series

[meta-oe] libpwquality: upgrade 1.4.4 -> 1.4.5

Message ID 20231130212143.3192153-1-alperyasinak1@gmail.com
State Accepted, archived
Headers show
Series [meta-oe] libpwquality: upgrade 1.4.4 -> 1.4.5 | expand

Commit Message

Alper Ak Nov. 30, 2023, 9:21 p.m. UTC
* 0001-fix-musl-build.patch removed because fixed in the new version. -> https://github.com/libpwquality/libpwquality/pull/53
* Created ABOUT-NLS file because of following error -> error: required file './ABOUT-NLS' not found

Changelog:

* Translation updates
* Minor bug fixes and documentation enhancements

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
ABOUT-NLS should have installed via gettext.
I couldn't find an answer and asked Ross Burton, he suggested I could solve it this way.

 .../files/0001-fix-musl-build.patch           | 72 -------------------
 ...quality_1.4.4.bb => libpwquality_1.4.5.bb} | 27 ++++---
 2 files changed, 12 insertions(+), 87 deletions(-)
 delete mode 100644 meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
 rename meta-oe/recipes-extended/libpwquality/{libpwquality_1.4.4.bb => libpwquality_1.4.5.bb} (61%)

Comments

Ross Burton Nov. 30, 2023, 11:19 p.m. UTC | #1
On 30 Nov 2023, at 21:21, Alper Ak via lists.openembedded.org <alperyasinak1=gmail.com@lists.openembedded.org> wrote:
> ABOUT-NLS should have installed via gettext.
> I couldn't find an answer and asked Ross Burton, he suggested I could solve it this way.
> 

Ah, so now I’ve seen the whole patch, I understand.

> -SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \
> +SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \

It used to be a tarball, which includes the generated files.  Now it’s a git repository, which does not.

I would suggest that unless you have a good reason to keep this recipe fetching the tarball at https://github.com/libpwquality/libpwquality/releases/download/libpwquality-1.4.5/libpwquality-1.4.5.tar.bz2.

That will let you remove the ABOUT-NLS hack and generally refuse the amount of changes.

Ross
Ross Burton Nov. 30, 2023, 11:20 p.m. UTC | #2
On 30 Nov 2023, at 21:21, Alper Ak via lists.openembedded.org <alperyasinak1=gmail.com@lists.openembedded.org> wrote:
> 
> +inherit autotools-brokensep gettext setuptools3-base

I’d also try without -brokensep and seeing if it works now. If it still doesn’t then filing a bug upstream would be sensible.

Ross
Khem Raj Dec. 1, 2023, 1:05 a.m. UTC | #3
On Thu, Nov 30, 2023 at 1:22 PM Alper Ak <alperyasinak1@gmail.com> wrote:
>
> * 0001-fix-musl-build.patch removed because fixed in the new version. -> https://github.com/libpwquality/libpwquality/pull/53
> * Created ABOUT-NLS file because of following error -> error: required file './ABOUT-NLS' not found
>
> Changelog:
>
> * Translation updates
> * Minor bug fixes and documentation enhancements
>
> Signed-off-by: alperak <alperyasinak1@gmail.com>
> ---
> ABOUT-NLS should have installed via gettext.
> I couldn't find an answer and asked Ross Burton, he suggested I could solve it this way.
>
>  .../files/0001-fix-musl-build.patch           | 72 -------------------
>  ...quality_1.4.4.bb => libpwquality_1.4.5.bb} | 27 ++++---
>  2 files changed, 12 insertions(+), 87 deletions(-)
>  delete mode 100644 meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
>  rename meta-oe/recipes-extended/libpwquality/{libpwquality_1.4.4.bb => libpwquality_1.4.5.bb} (61%)
>
> diff --git a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch b/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
> deleted file mode 100644
> index 2cbdd6c74..000000000
> --- a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -Do not use fgetpwent_r
> -
> -fgetpwent_r does not exist on musl
> -
> -Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch
> -Upstream-Status: Pending
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---- a/src/pam_pwquality.c
> -+++ b/src/pam_pwquality.c
> -@@ -19,6 +19,7 @@
> - #include <stdio.h>
> - #include <pwd.h>
> - #include <errno.h>
> -+#include <security/pam_modutil.h>
> - #include "pwquality.h"
> -
> - /*
> -@@ -43,8 +44,6 @@ struct module_options {
> -
> - #define CO_RETRY_TIMES  1
> -
> --#define PATH_PASSWD "/etc/passwd"
> --
> - static int
> - _pam_parse (pam_handle_t *pamh, struct module_options *opt,
> -             int argc, const char **argv)
> -@@ -98,44 +97,7 @@ static int
> - check_local_user (pam_handle_t *pamh,
> -                   const char *user)
> - {
> --        struct passwd pw, *pwp;
> --        char buf[4096];
> --        int found = 0;
> --        FILE *fp;
> --        int errn;
> --
> --        fp = fopen(PATH_PASSWD, "r");
> --        if (fp == NULL) {
> --                pam_syslog(pamh, LOG_ERR, "unable to open %s: %s",
> --                           PATH_PASSWD, pam_strerror(pamh, errno));
> --                return -1;
> --        }
> --
> --        for (;;) {
> --                errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp);
> --                if (errn == ERANGE) {
> --                        pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?",
> --                                   PATH_PASSWD);
> --                        /* we can continue here as next call will read further */
> --                        continue;
> --                }
> --                if (errn != 0)
> --                        break;
> --                if (strcmp(pwp->pw_name, user) == 0) {
> --                        found = 1;
> --                        break;
> --                }
> --        }
> --
> --        fclose (fp);
> --
> --        if (errn != 0 && errn != ENOENT) {
> --                pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s",
> --                           pam_strerror(pamh, errn));
> --                return -1;
> --        } else {
> --                return found;
> --        }
> -+      return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS;
> - }
> -
> - PAM_EXTERN int
> diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
> similarity index 61%
> rename from meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
> rename to meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
> index b50c0f7de..787543637 100644
> --- a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
> +++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
> @@ -1,27 +1,24 @@
>  DESCRIPTION = "Library for password quality checking and generating random passwords"
>  HOMEPAGE = "https://github.com/libpwquality/libpwquality"
>  SECTION = "devel/lib"
> -LICENSE = "GPL-2.0-only"
> +
> +LICENSE = "GPL-2.0-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2"
>
> -SRCNAME = "libpwquality"
> -SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \
> +DEPENDS = "cracklib"
> +
> +SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \
>             file://add-missing-python-include-dir-for-cross.patch \
>  "
> -SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch "
> -
> -SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3"
> -SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545"
> -
> -UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases"
> -
> -S = "${WORKDIR}/${SRCNAME}-${PV}"
> +SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a"
>
> -DEPENDS = "cracklib virtual/gettext"
> +S = "${WORKDIR}/git"
>
> -inherit autotools setuptools3-base gettext
> +inherit autotools-brokensep gettext setuptools3-base
>
> -B = "${S}"
> +do_configure:prepend() {
> +    touch ${S}/ABOUT-NLS

Building from sources is good old maintainer-mode in autotools speak
and it does need additional steps
gettextize would have produced this file properly. but we do not run
it as part of autotools bbclass's autoreconf step.
instead of creating an empty file maybe copy it from native sysroot's
gettext manually

cp ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${AUTOTOOLS_AUXDIR}/

would be nicer.

> +}
>
>  export PYTHON_DIR
>  export BUILD_SYS
> @@ -35,7 +32,7 @@ EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \
>  "
>
>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
> -PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
> +PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
>
>  FILES:${PN} += "${base_libdir}/security/pam_pwquality.so"
>  FILES:${PN}-dbg += "${base_libdir}/security/.debug"
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#107178): https://lists.openembedded.org/g/openembedded-devel/message/107178
> Mute This Topic: https://lists.openembedded.org/mt/102903271/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alper Ak Dec. 1, 2023, 10:08 a.m. UTC | #4
> I’d also try without -brokensep and seeing if it works now. If it still doesn’t then filing a bug upstream would be sensible.

Tried without -brokensep but it didn't work -> https://pastebin.com/kSpMc1J9
It is looking for the "../src/pwquality.h" file in build directory but
can't find it. "pwquality.h" is located at source directory. B =
"../build", S = "../git" so if we do B = "${S}" (i.e. brokensep), I
interpreted that it solves the problem.


Khem Raj <raj.khem@gmail.com>, 1 Ara 2023 Cum, 04:06 tarihinde şunu yazdı:
>
> On Thu, Nov 30, 2023 at 1:22 PM Alper Ak <alperyasinak1@gmail.com> wrote:
> >
> > * 0001-fix-musl-build.patch removed because fixed in the new version. -> https://github.com/libpwquality/libpwquality/pull/53
> > * Created ABOUT-NLS file because of following error -> error: required file './ABOUT-NLS' not found
> >
> > Changelog:
> >
> > * Translation updates
> > * Minor bug fixes and documentation enhancements
> >
> > Signed-off-by: alperak <alperyasinak1@gmail.com>
> > ---
> > ABOUT-NLS should have installed via gettext.
> > I couldn't find an answer and asked Ross Burton, he suggested I could solve it this way.
> >
> >  .../files/0001-fix-musl-build.patch           | 72 -------------------
> >  ...quality_1.4.4.bb => libpwquality_1.4.5.bb} | 27 ++++---
> >  2 files changed, 12 insertions(+), 87 deletions(-)
> >  delete mode 100644 meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
> >  rename meta-oe/recipes-extended/libpwquality/{libpwquality_1.4.4.bb => libpwquality_1.4.5.bb} (61%)
> >
> > diff --git a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch b/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
> > deleted file mode 100644
> > index 2cbdd6c74..000000000
> > --- a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
> > +++ /dev/null
> > @@ -1,72 +0,0 @@
> > -Do not use fgetpwent_r
> > -
> > -fgetpwent_r does not exist on musl
> > -
> > -Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch
> > -Upstream-Status: Pending
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---- a/src/pam_pwquality.c
> > -+++ b/src/pam_pwquality.c
> > -@@ -19,6 +19,7 @@
> > - #include <stdio.h>
> > - #include <pwd.h>
> > - #include <errno.h>
> > -+#include <security/pam_modutil.h>
> > - #include "pwquality.h"
> > -
> > - /*
> > -@@ -43,8 +44,6 @@ struct module_options {
> > -
> > - #define CO_RETRY_TIMES  1
> > -
> > --#define PATH_PASSWD "/etc/passwd"
> > --
> > - static int
> > - _pam_parse (pam_handle_t *pamh, struct module_options *opt,
> > -             int argc, const char **argv)
> > -@@ -98,44 +97,7 @@ static int
> > - check_local_user (pam_handle_t *pamh,
> > -                   const char *user)
> > - {
> > --        struct passwd pw, *pwp;
> > --        char buf[4096];
> > --        int found = 0;
> > --        FILE *fp;
> > --        int errn;
> > --
> > --        fp = fopen(PATH_PASSWD, "r");
> > --        if (fp == NULL) {
> > --                pam_syslog(pamh, LOG_ERR, "unable to open %s: %s",
> > --                           PATH_PASSWD, pam_strerror(pamh, errno));
> > --                return -1;
> > --        }
> > --
> > --        for (;;) {
> > --                errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp);
> > --                if (errn == ERANGE) {
> > --                        pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?",
> > --                                   PATH_PASSWD);
> > --                        /* we can continue here as next call will read further */
> > --                        continue;
> > --                }
> > --                if (errn != 0)
> > --                        break;
> > --                if (strcmp(pwp->pw_name, user) == 0) {
> > --                        found = 1;
> > --                        break;
> > --                }
> > --        }
> > --
> > --        fclose (fp);
> > --
> > --        if (errn != 0 && errn != ENOENT) {
> > --                pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s",
> > --                           pam_strerror(pamh, errn));
> > --                return -1;
> > --        } else {
> > --                return found;
> > --        }
> > -+      return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS;
> > - }
> > -
> > - PAM_EXTERN int
> > diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
> > similarity index 61%
> > rename from meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
> > rename to meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
> > index b50c0f7de..787543637 100644
> > --- a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
> > +++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
> > @@ -1,27 +1,24 @@
> >  DESCRIPTION = "Library for password quality checking and generating random passwords"
> >  HOMEPAGE = "https://github.com/libpwquality/libpwquality"
> >  SECTION = "devel/lib"
> > -LICENSE = "GPL-2.0-only"
> > +
> > +LICENSE = "GPL-2.0-or-later"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2"
> >
> > -SRCNAME = "libpwquality"
> > -SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \
> > +DEPENDS = "cracklib"
> > +
> > +SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \
> >             file://add-missing-python-include-dir-for-cross.patch \
> >  "
> > -SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch "
> > -
> > -SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3"
> > -SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545"
> > -
> > -UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases"
> > -
> > -S = "${WORKDIR}/${SRCNAME}-${PV}"
> > +SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a"
> >
> > -DEPENDS = "cracklib virtual/gettext"
> > +S = "${WORKDIR}/git"
> >
> > -inherit autotools setuptools3-base gettext
> > +inherit autotools-brokensep gettext setuptools3-base
> >
> > -B = "${S}"
> > +do_configure:prepend() {
> > +    touch ${S}/ABOUT-NLS
>
> Building from sources is good old maintainer-mode in autotools speak
> and it does need additional steps
> gettextize would have produced this file properly. but we do not run
> it as part of autotools bbclass's autoreconf step.
> instead of creating an empty file maybe copy it from native sysroot's
> gettext manually
>
> cp ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${AUTOTOOLS_AUXDIR}/
>
> would be nicer.
>
> > +}
> >
> >  export PYTHON_DIR
> >  export BUILD_SYS
> > @@ -35,7 +32,7 @@ EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \
> >  "
> >
> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
> > -PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
> > +PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
> >
> >  FILES:${PN} += "${base_libdir}/security/pam_pwquality.so"
> >  FILES:${PN}-dbg += "${base_libdir}/security/.debug"
> > --
> > 2.25.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#107178): https://lists.openembedded.org/g/openembedded-devel/message/107178
> > Mute This Topic: https://lists.openembedded.org/mt/102903271/1997914
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Ross Burton Dec. 1, 2023, 1:09 p.m. UTC | #5
> On 1 Dec 2023, at 10:08, Alper Ak via lists.openembedded.org <alperyasinak1=gmail.com@lists.openembedded.org> wrote:
> 
>> I’d also try without -brokensep and seeing if it works now. If it still doesn’t then filing a bug upstream would be sensible.
> 
> Tried without -brokensep but it didn't work -> https://pastebin.com/kSpMc1J9
> It is looking for the "../src/pwquality.h" file in build directory but
> can't find it. "pwquality.h" is located at source directory. B =
> "../build", S = "../git" so if we do B = "${S}" (i.e. brokensep), I
> interpreted that it solves the problem.

Please file a bug upstream, that’s just a silly mistake in their makefile.

Ross
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch b/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
deleted file mode 100644
index 2cbdd6c74..000000000
--- a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
+++ /dev/null
@@ -1,72 +0,0 @@ 
-Do not use fgetpwent_r
-
-fgetpwent_r does not exist on musl
-
-Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/src/pam_pwquality.c
-+++ b/src/pam_pwquality.c
-@@ -19,6 +19,7 @@
- #include <stdio.h>
- #include <pwd.h>
- #include <errno.h>
-+#include <security/pam_modutil.h>
- #include "pwquality.h"
- 
- /*
-@@ -43,8 +44,6 @@ struct module_options {
- 
- #define CO_RETRY_TIMES  1
- 
--#define PATH_PASSWD "/etc/passwd"
--
- static int
- _pam_parse (pam_handle_t *pamh, struct module_options *opt,
-             int argc, const char **argv)
-@@ -98,44 +97,7 @@ static int
- check_local_user (pam_handle_t *pamh,
-                   const char *user)
- {
--        struct passwd pw, *pwp;
--        char buf[4096];
--        int found = 0;
--        FILE *fp;
--        int errn;
--
--        fp = fopen(PATH_PASSWD, "r");
--        if (fp == NULL) {
--                pam_syslog(pamh, LOG_ERR, "unable to open %s: %s",
--                           PATH_PASSWD, pam_strerror(pamh, errno));
--                return -1;
--        }
--
--        for (;;) {
--                errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp);
--                if (errn == ERANGE) {
--                        pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?",
--                                   PATH_PASSWD);
--                        /* we can continue here as next call will read further */
--                        continue;
--                }
--                if (errn != 0)
--                        break;
--                if (strcmp(pwp->pw_name, user) == 0) {
--                        found = 1;
--                        break;
--                }
--        }
--
--        fclose (fp);
--
--        if (errn != 0 && errn != ENOENT) {
--                pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s",
--                           pam_strerror(pamh, errn));
--                return -1;
--        } else {
--                return found;
--        }
-+	return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS;
- }
- 
- PAM_EXTERN int
diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
similarity index 61%
rename from meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
rename to meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
index b50c0f7de..787543637 100644
--- a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
+++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
@@ -1,27 +1,24 @@ 
 DESCRIPTION = "Library for password quality checking and generating random passwords"
 HOMEPAGE = "https://github.com/libpwquality/libpwquality"
 SECTION = "devel/lib"
-LICENSE = "GPL-2.0-only"
+
+LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2"
 
-SRCNAME = "libpwquality"
-SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \
+DEPENDS = "cracklib"
+
+SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \
            file://add-missing-python-include-dir-for-cross.patch \
 "
-SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch "
-
-SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3"
-SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545"
-
-UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
+SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a"
 
-DEPENDS = "cracklib virtual/gettext"
+S = "${WORKDIR}/git"
 
-inherit autotools setuptools3-base gettext
+inherit autotools-brokensep gettext setuptools3-base
 
-B = "${S}"
+do_configure:prepend() {
+    touch ${S}/ABOUT-NLS
+}
 
 export PYTHON_DIR
 export BUILD_SYS
@@ -35,7 +32,7 @@  EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \
 "
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
+PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
 
 FILES:${PN} += "${base_libdir}/security/pam_pwquality.so"
 FILES:${PN}-dbg += "${base_libdir}/security/.debug"