From 2c901d2289e7e92a133ba7ebe9d6ab754b9b1a36 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 13 Jun 2026 20:00:09 +0300 Subject: [PATCH] Switch to new package format --- info.yml | 17 +++++++++ pkg.info | 10 ----- source.sh => recipe.sh | 11 ++---- ...0001-fix-werror-discarded-qualifiers.patch | 38 +++++++++++++++++++ 4 files changed, 59 insertions(+), 17 deletions(-) create mode 100644 info.yml delete mode 100644 pkg.info rename source.sh => recipe.sh (76%) create mode 100644 source-files/0001-fix-werror-discarded-qualifiers.patch diff --git a/info.yml b/info.yml new file mode 100644 index 0000000..dcc0e52 --- /dev/null +++ b/info.yml @@ -0,0 +1,17 @@ +name: libxcrypt +description: One-way password hashing library +version: 4.5.2 +revision: 2 +url: https://github.com/besser82/libxcrypt/ +license: LGPL2.1-or-later +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - glibc +downloads: + - url: https://github.com/besser82/libxcrypt/releases/download/v${BPM_PKG_VERSION}/libxcrypt-${BPM_PKG_VERSION}.tar.xz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 71513a31c01a428bccd5367a32fd95f115d6dac50fb5b60c779d5c7942aec071 diff --git a/pkg.info b/pkg.info deleted file mode 100644 index 1ef0ac1..0000000 --- a/pkg.info +++ /dev/null @@ -1,10 +0,0 @@ -name: libxcrypt -description: One-way password hashing library -version: 4.5.2 -revision: 1 -url: https://github.com/besser82/libxcrypt/ -license: LGPL2.1-or-later -architecture: any -type: source -depends: - - glibc diff --git a/source.sh b/recipe.sh similarity index 76% rename from source.sh rename to recipe.sh index 483b98c..5eaf6e6 100644 --- a/source.sh +++ b/recipe.sh @@ -1,15 +1,12 @@ -# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://github.com/besser82/libxcrypt/releases/download/v${BPM_PKG_VERSION}/libxcrypt-${BPM_PKG_VERSION}.tar.xz" -FILENAME="${DOWNLOAD##*/}" - # The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location +# This function is used for putting downloaded files to the correct location or applying patches prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/0001-fix-werror-discarded-qualifiers.patch } # The build function is executed in the source directory diff --git a/source-files/0001-fix-werror-discarded-qualifiers.patch b/source-files/0001-fix-werror-discarded-qualifiers.patch new file mode 100644 index 0000000..15cb405 --- /dev/null +++ b/source-files/0001-fix-werror-discarded-qualifiers.patch @@ -0,0 +1,38 @@ +From 174c24d6e87aeae631bc0a7bb1ba983cf8def4de Mon Sep 17 00:00:00 2001 +From: Stanislav Zidek +Date: Wed, 10 Dec 2025 14:03:54 +0100 +Subject: [PATCH] fix -Werror=discarded-qualifiers + +On Fedora rawhide (to be Fedora 44), gcc became more strict +wrt. const-ness. +--- + lib/crypt-gost-yescrypt.c | 2 +- + lib/crypt-sm3-yescrypt.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/crypt-gost-yescrypt.c b/lib/crypt-gost-yescrypt.c +index 190ae94b..e9dc7e80 100644 +--- a/lib/crypt-gost-yescrypt.c ++++ b/lib/crypt-gost-yescrypt.c +@@ -131,7 +131,7 @@ crypt_gost_yescrypt_rn (const char *phrase, size_t phr_size, + intbuf->outbuf[1] = 'g'; + + /* extract yescrypt output from "$y$param$salt$output" */ +- char *hptr = strchr ((const char *) intbuf->retval + 3, '$'); ++ char *hptr = strchr ((char *) intbuf->retval + 3, '$'); + if (!hptr) + { + errno = EINVAL; +diff --git a/lib/crypt-sm3-yescrypt.c b/lib/crypt-sm3-yescrypt.c +index 4f42aa66..17da83e1 100644 +--- a/lib/crypt-sm3-yescrypt.c ++++ b/lib/crypt-sm3-yescrypt.c +@@ -136,7 +136,7 @@ crypt_sm3_yescrypt_rn (const char *phrase, size_t phr_size, + intbuf->outbuf[3] = '3'; + + /* extract yescrypt output from "$y$param$salt$output" */ +- char *hptr = strchr ((const char *) intbuf->retval + 3, '$'); ++ char *hptr = strchr ((char *) intbuf->retval + 3, '$'); + if (!hptr) + { + errno = EINVAL;