public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 34/34] cracklib: update 2.9.11 -> 2.10.2
Date: Tue, 27 Aug 2024 07:23:54 +0200	[thread overview]
Message-ID: <20240827052354.1319810-34-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20240827052354.1319810-1-alex.kanavin@gmail.com>

From: Alexander Kanavin <alex@linutronix.de>

Drop endianness patch; upstream resolved the issue via:
https://github.com/cracklib/cracklib/pull/86
https://github.com/cracklib/cracklib/issues/74

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...port-dictionary-byte-order-dependent.patch | 339 ------------------
 ...{cracklib_2.9.11.bb => cracklib_2.10.2.bb} |   3 +-
 2 files changed, 1 insertion(+), 341 deletions(-)
 delete mode 100644 meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
 rename meta/recipes-extended/cracklib/{cracklib_2.9.11.bb => cracklib_2.10.2.bb} (85%)

diff --git a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
deleted file mode 100644
index 35229ae8900..00000000000
--- a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
+++ /dev/null
@@ -1,339 +0,0 @@
-From aae03b7e626d5f62ab929d51d11352a5a2ff6b2d Mon Sep 17 00:00:00 2001
-From: Lei Maohui <leimaohui@cn.fujitsu.com>
-Date: Tue, 9 Jun 2015 11:11:48 +0900
-Subject: [PATCH 1/2] packlib.c: support dictionary byte order dependent
-
-The previous dict files are NOT byte-order independent, in fact they are
-probably ARCHITECTURE SPECIFIC.
-Create the dict files in big endian, and convert to host endian while
-load them. This could fix the endian issue on multiple platform.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Submitted [https://github.com/cracklib/cracklib/pull/41]
-
-We can't use the endian.h, htobe* and be*toh functions because they are
-not available on older versions of glibc, such as that found in RHEL
-5.9.
-
-Change to checking endian and directly calling bswap_* as defined in
-byteswap.h.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
----
- lib/packlib.c | 214 +++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 210 insertions(+), 4 deletions(-)
-
-diff --git a/lib/packlib.c b/lib/packlib.c
-index 9396e1d..d0bb181 100644
---- a/lib/packlib.c
-+++ b/lib/packlib.c
-@@ -16,6 +16,12 @@
- #ifdef HAVE_STDINT_H
- #include <stdint.h>
- #endif
-+
-+#ifndef _BSD_SOURCE
-+#define _BSD_SOURCE             /* See feature_test_macros(7) */
-+#endif
-+#include <endian.h>
-+#include <byteswap.h>
- #include "packer.h"
- 
- #define DEBUG 0
-@@ -43,6 +49,185 @@ typedef struct
-     char data_get[NUMWORDS][MAXWORDLEN];
- } PWDICT64;
- 
-+enum{
-+    en_is32,
-+    en_is64
-+};
-+
-+static int
-+IheaderHostToBigEndian(char *pHeader, int nBitType)
-+{
-+    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader;
-+
-+        pHeader64->pih_magic = bswap_64(pHeader64->pih_magic);
-+        pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords);
-+        pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen);
-+        pHeader64->pih_pad = bswap_16(pHeader64->pih_pad);
-+
-+#if DEBUG
-+        printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n",
-+          pHeader64->pih_magic, pHeader64->pih_numwords,
-+          pHeader64->pih_blocklen, pHeader64->pih_pad);
-+#endif
-+    }
-+    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        struct pi_header *pHeader32 = (struct pi_header*)pHeader;
-+
-+        pHeader32->pih_magic = bswap_32(pHeader32->pih_magic);
-+        pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords);
-+        pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen);
-+        pHeader32->pih_pad = bswap_16(pHeader32->pih_pad);
-+
-+#if DEBUG
-+        printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n",
-+          pHeader32->pih_magic, pHeader32->pih_numwords,
-+          pHeader32->pih_blocklen, pHeader32->pih_pad);
-+#endif
-+    }
-+    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
-+        return (-1);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+IheaderBigEndianToHost(char *pHeader, int nBitType)
-+{
-+    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader;
-+
-+        pHeader64->pih_magic = bswap_64(pHeader64->pih_magic);
-+        pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords);
-+        pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen);
-+        pHeader64->pih_pad = bswap_16(pHeader64->pih_pad);
-+
-+#if DEBUG
-+        printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n",
-+          pHeader64->pih_magic, pHeader64->pih_numwords,
-+          pHeader64->pih_blocklen, pHeader64->pih_pad);
-+#endif
-+    }
-+    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        struct pi_header *pHeader32 = (struct pi_header*)pHeader;
-+
-+        pHeader32->pih_magic = bswap_32(pHeader32->pih_magic);
-+        pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords);
-+        pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen);
-+        pHeader32->pih_pad = bswap_16(pHeader32->pih_pad);
-+
-+#if DEBUG
-+        printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n",
-+            pHeader32->pih_magic, pHeader32->pih_numwords,
-+            pHeader32->pih_blocklen, pHeader32->pih_pad);
-+#endif
-+    }
-+    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
-+        return (-1);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType)
-+{
-+    int i = 0;
-+
-+    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        uint64_t *pHwms64 = (uint64_t*)pHwms;
-+
-+        for (i = 0; i < nLen / sizeof(uint64_t); i++)
-+        {
-+            *pHwms64 = bswap_64(*pHwms64);
-+            *pHwms64++;
-+        }
-+
-+    }
-+    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        uint32_t *pHwms32 = (uint32_t*)pHwms;
-+
-+        for (i = 0; i < nLen / sizeof(uint32_t); i++)
-+        {
-+            *pHwms32 = bswap_32(*pHwms32);
-+            *pHwms32++;
-+        }
-+
-+    }
-+    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
-+        return (-1);
-+    }
-+
-+#if DEBUG
-+    for (i = 0; i < nLen; i+=8)
-+    {
-+        printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n",
-+            nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF,
-+            pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF,
-+            pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF);
-+    }
-+#endif
-+
-+    return 0;
-+}
-+
-+static int
-+HwmsBigEndianToHost(char *pHwms, int nLen, int nBitType)
-+{
-+    int i = 0;
-+
-+    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        uint64_t *pHwms64 = (uint64_t*)pHwms;
-+
-+        for (i = 0; i < nLen / sizeof(uint64_t); i++)
-+        {
-+            *pHwms64++ = bswap_64(*pHwms64);
-+        }
-+
-+    }
-+    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        uint32_t *pHwms32 = (uint32_t*)pHwms;
-+
-+        for (i = 0; i < nLen / sizeof(uint32_t); i++)
-+        {
-+            *pHwms32 = bswap_32(*pHwms32);
-+            *pHwms32++;
-+        }
-+
-+    }
-+    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+    {
-+        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
-+        return (-1);
-+    }
-+
-+#if DEBUG
-+    for (i = 0; i < nLen; i+=8)
-+    {
-+        printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n",
-+            nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF,
-+            pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF,
-+            pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF);
-+    }
-+#endif
-+
-+    return 0;
-+}
- 
- static int
- _PWIsBroken64(FILE *ifp)
-@@ -55,6 +240,7 @@ _PWIsBroken64(FILE *ifp)
-        return 0;
-     }
- 
-+    IheaderBigEndianToHost((char *) &pdesc64.header, en_is64);
-     return (pdesc64.header.pih_magic == PIH_MAGIC);
- }
- 
-@@ -147,7 +333,11 @@ PWOpen(prefix, mode)
- 	pdesc.header.pih_blocklen = NUMWORDS;
- 	pdesc.header.pih_numwords = 0;
- 
--	fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp);
-+	struct pi_header tmpheader32;
-+
-+	memcpy(&tmpheader32,  &pdesc.header, sizeof(pdesc.header));
-+	IheaderHostToBigEndian((char *) &tmpheader32, en_is32);
-+	fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, ifp);
-     } else
-     {
- 	pdesc.flags &= ~PFOR_WRITE;
-@@ -171,6 +361,7 @@ PWOpen(prefix, mode)
- 	    return NULL;
- 	}
- 
-+        IheaderBigEndianToHost((char *) &pdesc.header, en_is32);
-         if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0))
-         {
-             /* uh-oh. either a broken "64-bit" file or a garbage file. */
-@@ -193,6 +384,7 @@ PWOpen(prefix, mode)
- 		}
-                 return NULL;
-             }
-+            IheaderBigEndianToHost((char *) &pdesc64.header, en_is64);
-             if (pdesc64.header.pih_magic != PIH_MAGIC)
-             {
-                 /* nope, not "64-bit" after all */
-@@ -288,6 +480,7 @@ PWOpen(prefix, mode)
-                 {
-                     pdesc.flags &= ~PFOR_USEHWMS;
-                 }
-+                HwmsBigEndianToHost((char*)pdesc64.hwms, sizeof(pdesc64.hwms), en_is64);
-                 for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++)
-                 {
-                     pdesc.hwms[i] = pdesc64.hwms[i];
-@@ -297,6 +490,7 @@ PWOpen(prefix, mode)
- 	    {
- 		pdesc.flags &= ~PFOR_USEHWMS;
- 	    }
-+	    HwmsBigEndianToHost((char*)pdesc.hwms, sizeof(pdesc.hwms), en_is32);
- #if DEBUG
-             for (i=1; i<=0xff; i++)
-             {
-@@ -330,7 +524,11 @@ PWClose(pwp)
- 	    return (-1);
- 	}
- 
--	if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp))
-+	struct pi_header tmpheader32;
-+
-+	memcpy(&tmpheader32,  &pwp->header, sizeof(pwp->header));
-+	IheaderHostToBigEndian((char *) &tmpheader32, en_is32);
-+	if (!fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, pwp->ifp))
- 	{
- 	    fprintf(stderr, "index magic fwrite failed\n");
- 	    return (-1);
-@@ -349,7 +547,12 @@ PWClose(pwp)
- 	    	printf("hwm[%02x] = %d\n", i, pwp->hwms[i]);
- #endif
- 	    }
--	    fwrite(pwp->hwms, 1, sizeof(pwp->hwms), pwp->wfp);
-+
-+	    PWDICT tmp_pwp;
-+
-+	    memcpy(&tmp_pwp, pwp, sizeof(PWDICT));
-+	    HwmsHostToBigEndian((char *)tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32);
-+	    fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp);
- 	}
-     }
- 
-@@ -403,7 +606,8 @@ PutPW(pwp, string)
- 
- 	datum = (uint32_t) ftell(pwp->dfp);
- 
--	fwrite((char *) &datum, sizeof(datum), 1, pwp->ifp);
-+	uint32_t tmpdatum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum;
-+	fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp);
- 
- 	fputs(pwp->data_put[0], pwp->dfp);
- 	putc(0, (FILE*) pwp->dfp);
-@@ -462,6 +666,7 @@ GetPW(pwp, number)
-            perror("(index fread failed)");
-            return NULL;
-        }
-+       datum64 = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_64(datum64) : datum64;
-        datum = datum64;
-     } else {
-        if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0))
-@@ -475,6 +680,7 @@ GetPW(pwp, number)
-            perror("(index fread failed)");
-            return NULL;
-        }
-+       datum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum;
-     }
- 
- 	int r = 1;
--- 
-2.20.1
-
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.11.bb b/meta/recipes-extended/cracklib/cracklib_2.10.2.bb
similarity index 85%
rename from meta/recipes-extended/cracklib/cracklib_2.9.11.bb
rename to meta/recipes-extended/cracklib/cracklib_2.10.2.bb
index 34ef2b65a11..2c913da1527 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.9.11.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.10.2.bb
@@ -10,10 +10,9 @@ DEPENDS = "cracklib-native zlib"
 EXTRA_OECONF = "--without-python --libdir=${base_libdir}"
 
 SRC_URI = "git://github.com/cracklib/cracklib;protocol=https;branch=main \
-           file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
            "
 
-SRCREV = "4cf5125250c6325ef0a2dc085eabff875227edc3"
+SRCREV = "e5211fc1d2b435884a2bb77001e107489285296d"
 S = "${WORKDIR}/git/src"
 
 inherit autotools gettext
-- 
2.39.2



      parent reply	other threads:[~2024-08-27  5:24 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  5:23 [PATCH 01/34] selftest: always tweak ERROR_QA/WARN_QA per package Alexander Kanavin
2024-08-27  5:23 ` [PATCH 02/34] selftest: use INIT_MANAGER to enable systemd instead of custom settings Alexander Kanavin
2024-08-27  5:23 ` [PATCH 03/34] xmlto: check upstream version tags, not new commits Alexander Kanavin
2024-08-27  5:23 ` [PATCH 04/34] glib-2.0: update 2.80.2 -> 2.80.4 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 05/34] lttng-modules: update 2.13.13 -> 2.13.14 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 06/34] automake: update 1.16.5 -> 1.17 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 07/34] fmt: update 10.2.1 -> 11.0.2 Alexander Kanavin
2024-08-28 18:16   ` [OE-core] " Khem Raj
2024-08-27  5:23 ` [PATCH 08/34] git: 2.45.2 -> 2.46.0 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 09/34] perlcross: update 1.5.2 -> 1.6 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 10/34] perl: update 5.38.2 -> 5.40.0 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 11/34] gnu-config: update to latest revision Alexander Kanavin
2024-08-27  5:23 ` [PATCH 12/34] python3-license-expression: update 30.3.0 -> 30.3.1 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 13/34] python3-pip: 24.0 -> 24.2 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 14/34] python3-pyopenssl: update 24.1.0 -> 24.2.1 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 15/34] python3-pyyaml: update 6.0.1 -> 6.0.2 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 16/34] python3-scons: update 4.7.0 -> 4.8.0 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 17/34] cargo-c-native: update 0.9.30 -> 0.10.3 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 18/34] go-helloworld: update to latest revision Alexander Kanavin
2024-08-27  5:23 ` [PATCH 19/34] vulkan-samples: " Alexander Kanavin
2024-08-27  5:23 ` [PATCH 20/34] ffmpeg: update 6.1.1 -> 7.0.2 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 21/34] libksba: update 1.6.6 -> 1.6.7 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 22/34] p11-kit: update 0.25.3 -> 0.25.5 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 23/34] iproute2: upgrade 6.9.0 -> 6.10.0 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 24/34] ifupdown: upgrade 0.8.41 -> 0.8.43 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 25/34] libdnf: upgrade 0.73.2 -> 0.73.3 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 26/34] mmc-utils: upgrade to latest revision Alexander Kanavin
2024-08-27  5:23 ` [PATCH 27/34] adwaita-icon-theme: upgrade 46.0 -> 46.2 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 28/34] hicolor-icon-theme: upgrade 0.17 -> 0.18 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 29/34] waffle: upgrade 1.8.0 -> 1.8.1 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 30/34] libtraceevent: upgrade 1.8.2 -> 1.8.3 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 31/34] alsa-utils: upgrade 1.2.11 -> 1.2.12 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 32/34] lz4: upgrade 1.9.4 -> 1.10.0 Alexander Kanavin
2024-08-27  5:23 ` [PATCH 33/34] vte: upgrade 0.74.2 -> 0.76.3 Alexander Kanavin
2024-08-27  5:23 ` Alexander Kanavin [this message]

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=20240827052354.1319810-34-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox