Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (199a099969d512e5e3e7f1dc1279a7118befe1f7)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (199a099969d512e5e3e7f1dc1279a7118befe1f7)
  • Date: Wed, 14 Dec 2022 21:11:39 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog | 3
disk/efivar/HISTORY | 4
disk/efivar/patches/0001-efisecdb-fix-build-with-musl-libc.patch | 231
++++++++++
libs/libdeflate/BUILD | 2
libs/libdeflate/CONFIGURE | 1
libs/libdeflate/DEPENDS | 1
libs/libdeflate/DETAILS | 40 +
libs/libdeflate/HISTORY | 2
net/iperf/DETAILS | 4
net/iperf/HISTORY | 3
10 files changed, 289 insertions(+), 2 deletions(-)

New commits:
commit 199a099969d512e5e3e7f1dc1279a7118befe1f7
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

iperf 3.12

commit 03f145c0545ea9f6113c4ececbcab0e99bd820cc
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

efivar: Fix build against musl

commit 80ce5629b075c7ae966446053dab3fc9385726e6
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libdeflate: new spell, Heavily optimized DEFLATE implementation

diff --git a/ChangeLog b/ChangeLog
index 4613ff9..2502aed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2022-12-14 Ismael Luceno <ismael AT sourcemage.org>
+ * libs/libdeflate: new spell, Heavily optimized DEFLATE implementation
+
2022-12-13 Conner Clere <connerclere AT gmail.com>
* devel/gulrak-filesystem: new spell, An implementation of C++17
std::filesystem for C++11/C++14/C++17/C++20
diff --git a/disk/efivar/HISTORY b/disk/efivar/HISTORY
index a97384e..80bd5d7 100644
--- a/disk/efivar/HISTORY
+++ b/disk/efivar/HISTORY
@@ -1,3 +1,7 @@
+2022-12-14 Ismael Luceno <ismael AT sourcemage.org>
+ * patches/0001-efisecdb-fix-build-with-musl-libc.patch:
+ fixed build against musl
+
2022-09-10 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 38
* PRE_BUILD, patches/{glibc-2.36,no-mandoc-use}.patch: adapted file
location
diff --git a/disk/efivar/patches/0001-efisecdb-fix-build-with-musl-libc.patch
b/disk/efivar/patches/0001-efisecdb-fix-build-with-musl-libc.patch
new file mode 100644
index 0000000..00229be
--- /dev/null
+++ b/disk/efivar/patches/0001-efisecdb-fix-build-with-musl-libc.patch
@@ -0,0 +1,231 @@
+From cece3ffd5be2f8641eb694513f2b73e5eb97ffd3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa AT alpinelinux.org>
+Date: Fri, 28 Jan 2022 12:13:30 +0100
+Subject: [PATCH 1/2] efisecdb: fix build with musl libc
+
+Refactor code to use POSIX atexit(3) instead of the GNU specific
+on_exit(3).
+
+Resolves: #197
+Resolves: #202
+Signed-off-by: Natanael Copa <ncopa AT alpinelinux.org>
+---
+ src/compiler.h | 2 --
+ src/efisecdb.c | 68 +++++++++++++++++++-------------------------------
+ 2 files changed, 26 insertions(+), 44 deletions(-)
+
+diff --git a/src/compiler.h b/src/compiler.h
+index e2f18f0b..d95fb014 100644
+--- a/src/compiler.h
++++ b/src/compiler.h
+@@ -7,8 +7,6 @@
+ #ifndef COMPILER_H_
+ #define COMPILER_H_
+
+-#include <sys/cdefs.h>
+-
+ /* GCC version checking borrowed from glibc. */
+ #if defined(__GNUC__) && defined(__GNUC_MINOR__)
+ # define GNUC_PREREQ(maj,min) \
+diff --git a/src/efisecdb.c b/src/efisecdb.c
+index f8823737..6bd5ad90 100644
+--- a/src/efisecdb.c
++++ b/src/efisecdb.c
+@@ -25,6 +25,10 @@
+ extern char *optarg;
+ extern int optind, opterr, optopt;
+
++static efi_secdb_t *secdb = NULL;
++static list_t infiles;
++static list_t actions;
++
+ struct hash_param {
+ char *name;
+ efi_secdb_type_t algorithm;
+@@ -187,12 +191,11 @@ add_action(list_t *list, action_type_t action_type,
const efi_guid_t *owner,
+ }
+
+ static void
+-free_actions(int status UNUSED, void *actionsp)
++free_actions(void)
+ {
+- list_t *actions = (list_t *)actionsp;
+ list_t *pos, *tmp;
+
+- for_each_action_safe(pos, tmp, actions) {
++ for_each_action_safe(pos, tmp, &actions) {
+ action_t *action = list_entry(pos, action_t, list);
+
+ list_del(&action->list);
+@@ -202,12 +205,11 @@ free_actions(int status UNUSED, void *actionsp)
+ }
+
+ static void
+-free_infiles(int status UNUSED, void *infilesp)
++free_infiles(void)
+ {
+- list_t *infiles = (list_t *)infilesp;
+ list_t *pos, *tmp;
+
+- for_each_ptr_safe(pos, tmp, infiles) {
++ for_each_ptr_safe(pos, tmp, &infiles) {
+ ptrlist_t *entry = list_entry(pos, ptrlist_t, list);
+
+ list_del(&entry->list);
+@@ -216,27 +218,12 @@ free_infiles(int status UNUSED, void *infilesp)
+ }
+
+ static void
+-maybe_free_secdb(int status UNUSED, void *voidp)
++maybe_free_secdb(void)
+ {
+- efi_secdb_t **secdbp = (efi_secdb_t **)voidp;
+-
+- if (secdbp == NULL || *secdbp == NULL)
++ if (secdb == NULL)
+ return;
+
+- efi_secdb_free(*secdbp);
+-}
+-
+-static void
+-maybe_do_unlink(int status, void *filep)
+-{
+- char **file = (char **)filep;
+-
+- if (status == 0)
+- return;
+- if (file == NULL || *file == NULL)
+- return;
+-
+- unlink(*file);
++ efi_secdb_free(secdb);
+ }
+
+ static void
+@@ -323,15 +310,6 @@ parse_input_files(list_t *infiles, char **outfile,
efi_secdb_t **secdb,
+ return status;
+ }
+
+-/*
+- * These need to be static globals so that they're not on main's stack when
+- * on_exit() fires.
+- */
+-static efi_secdb_t *secdb = NULL;
+-static list_t infiles;
+-static list_t actions;
+-static char *outfile = NULL;
+-
+ int
+ main(int argc, char *argv[])
+ {
+@@ -351,6 +329,7 @@ main(int argc, char *argv[])
+ bool do_sort_data = false;
+ bool sort_descending = false;
+ int status = 0;
++ char *outfile = NULL;
+
+ const char sopts[] = ":aAc:dfg:h:i:Lo:rs:t:v?";
+ const struct option lopts[] = {
+@@ -376,10 +355,9 @@ main(int argc, char *argv[])
+ INIT_LIST_HEAD(&infiles);
+ INIT_LIST_HEAD(&actions);
+
+- on_exit(free_actions, &actions);
+- on_exit(free_infiles, &infiles);
+- on_exit(maybe_free_secdb, &secdb);
+- on_exit(maybe_do_unlink, &outfile);
++ atexit(free_actions);
++ atexit(free_infiles);
++ atexit(maybe_free_secdb);
+
+ /*
+ * parse the command line.
+@@ -587,24 +565,30 @@ main(int argc, char *argv[])
+ outfd = open(outfile, flags, 0600);
+ if (outfd < 0) {
+ char *tmpoutfile = outfile;
+- if (errno == EEXIST)
+- outfile = NULL;
++ if (errno != EEXIST)
++ unlink(outfile);
+ err(1, "could not open \"%s\"", tmpoutfile);
+ }
+
+ rc = ftruncate(outfd, 0);
+- if (rc < 0)
++ if (rc < 0) {
++ unlink(outfile);
+ err(1, "could not truncate output file \"%s\"", outfile);
++ }
+
+ void *output;
+ size_t size = 0;
+ rc = efi_secdb_realize(secdb, &output, &size);
+- if (rc < 0)
++ if (rc < 0) {
++ unlink(outfile);
+ secdb_err(1, "could not realize signature list");
++ }
+
+ rc = write(outfd, output, size);
+- if (rc < 0)
++ if (rc < 0) {
++ unlink(outfile);
+ err(1, "could not write signature list");
++ }
+
+ close(outfd);
+ xfree(output);
+
+From df09b472419466987f2f30176dd00937e640aa9a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa AT alpinelinux.org>
+Date: Fri, 28 Jan 2022 12:29:00 +0100
+Subject: [PATCH 2/2] efisecdb: do not free optarg
+
+The *outfile passed to parse_input_files can only be either set to
+optarg or be NULL. optarg should not be free'd and NULL does not need
+to.
+
+Since we no longer use on_exit to unlink outfile we also don't need to
+set *outfile to NULL.
+
+Fixes commit d91787035bc1 (efisecdb: add efisecdb)
+
+Signed-off-by: Natanael Copa <ncopa AT alpinelinux.org>
+---
+ src/efisecdb.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/src/efisecdb.c b/src/efisecdb.c
+index 6bd5ad90..70fa1847 100644
+--- a/src/efisecdb.c
++++ b/src/efisecdb.c
+@@ -255,8 +255,7 @@ list_guids(void)
+ * failure.
+ */
+ static int
+-parse_input_files(list_t *infiles, char **outfile, efi_secdb_t **secdb,
+- bool dump)
++parse_input_files(list_t *infiles, efi_secdb_t **secdb, bool dump)
+ {
+ int status = 0;
+ list_t *pos, *tmp;
+@@ -297,8 +296,6 @@ parse_input_files(list_t *infiles, char **outfile,
efi_secdb_t **secdb,
+ if (!dump)
+ exit(1);
+ status = 1;
+- xfree(*outfile);
+- *outfile = NULL;
+ break;
+ }
+ }
+@@ -528,7 +525,7 @@ main(int argc, char *argv[])
+ efi_secdb_set_bool(secdb, EFI_SECDB_SORT_DATA, do_sort_data);
+ efi_secdb_set_bool(secdb, EFI_SECDB_SORT_DESCENDING, sort_descending);
+
+- status = parse_input_files(&infiles, &outfile, &secdb, dump);
++ status = parse_input_files(&infiles, &secdb, dump);
+ if (status == 0) {
+ for_each_action_safe(pos, tmp, &actions) {
+ action_t *action = list_entry(pos, action_t, list);
diff --git a/libs/libdeflate/BUILD b/libs/libdeflate/BUILD
new file mode 100755
index 0000000..9c2ea88
--- /dev/null
+++ b/libs/libdeflate/BUILD
@@ -0,0 +1,2 @@
+OPTS+=\ -DLIBDEFLATE_BUILD_STATIC_LIB=0
+default_build
\ No newline at end of file
diff --git a/libs/libdeflate/CONFIGURE b/libs/libdeflate/CONFIGURE
new file mode 100755
index 0000000..5bb7db9
--- /dev/null
+++ b/libs/libdeflate/CONFIGURE
@@ -0,0 +1 @@
+. "$GRIMOIRE"/CMAKE_CONFIGURE
\ No newline at end of file
diff --git a/libs/libdeflate/DEPENDS b/libs/libdeflate/DEPENDS
new file mode 100755
index 0000000..bd2c258
--- /dev/null
+++ b/libs/libdeflate/DEPENDS
@@ -0,0 +1 @@
+. "$GRIMOIRE"/CMAKE_DEPENDS
diff --git a/libs/libdeflate/DETAILS b/libs/libdeflate/DETAILS
new file mode 100755
index 0000000..d7f9335
--- /dev/null
+++ b/libs/libdeflate/DETAILS
@@ -0,0 +1,40 @@
+. "$GRIMOIRE"/CMAKE_FUNCTIONS
+ SPELL=libdeflate
+ VERSION=1.15
+ SOURCE="$SPELL-$VERSION.tar.gz"
+
SOURCE_URL[0]=https://github.com/ebiggers/$SPELL/archive/refs/tags/v$VERSION.tar.gz
+
SOURCE_HASH=sha512:6503844eb113518610294c64fc0b24cbd93f58f654568f6f287c4a6549540c1044ea2123a453166ef78621ee20ef7bb8a3891a398eac1b950fdfef70236121fd
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ WEB_SITE="https://github.com/ebiggers/libdeflate/";
+ LICENSE[0]="MIT"
+ ENTERED=20221214
+ KEYWORDS=""
+ SHORT="Heavily optimized DEFLATE implementation"
+cat << EOF
+libdeflate is a library for fast, whole-buffer DEFLATE-based compression and
+decompression.
+
+The supported formats are:
+
+* DEFLATE (raw)
+* zlib (a.k.a. DEFLATE with a zlib wrapper)
+* gzip (a.k.a. DEFLATE with a gzip wrapper)
+
+libdeflate is heavily optimized. It is significantly faster than the zlib
+library, both for compression and decompression, and especially on x86
+processors. In addition, libdeflate provides optional high compression modes
+that provide a better compression ratio than the zlib's "level 9".
+
+* libdeflate itself is a library. The following command-line programs which
+ use this library are also included:
+* libdeflate-gzip, a program which can be a drop-in replacement for standard
+ gzip under some circumstances. Note that libdeflate-gzip has some
+ limitations; it is provided for convenience and is not meant to be the main
+ use case of libdeflate. It needs a lot of memory to process large files,
and
+ it omits support for some infrequently-used options of GNU gzip.
+* benchmark, a test program that does round-trip compression and
decompression
+ of the provided data, and measures the compression and decompression speed.
+ It can use libdeflate, zlib, or a combination of the two.
+* checksum, a test program that checksums the provided data with Adler-32
+ or CRC-32, and optionally measures the speed. It can use libdeflate or
zlib.
+EOF
diff --git a/libs/libdeflate/HISTORY b/libs/libdeflate/HISTORY
new file mode 100644
index 0000000..4c984a7
--- /dev/null
+++ b/libs/libdeflate/HISTORY
@@ -0,0 +1,2 @@
+2022-12-14 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, CONFIGURE, DEPENDS, DETAILS: spell created
diff --git a/net/iperf/DETAILS b/net/iperf/DETAILS
index 01a630d..a708ade 100755
--- a/net/iperf/DETAILS
+++ b/net/iperf/DETAILS
@@ -1,9 +1,9 @@
SPELL=iperf
- VERSION=3.11
+ VERSION=3.12
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
SOURCE_URL[0]=https://github.com/esnet/iperf/archive/${VERSION}.tar.gz
-
SOURCE_HASH=sha512:4be3e407f77a083d826bddc5ce2939047c85f5b816a6aeb3293eacabf2ea23bf13df4226e629ade3bf390c2eb08d6a1cb96f8cdb0fefb290a0fa4c8331d11a17
+
SOURCE_HASH=sha512:9b0600a19750311557833b32ca5c4be809ab98643522f125645dd8f83c482017e42fbe5fc9484624731176a59b67203a468eb81eebf1a37b9c1b3eff818857ba
WEB_SITE=https://github.com/esnet/iperf
ENTERED=20060309
LICENSE[0]=BSD
diff --git a/net/iperf/HISTORY b/net/iperf/HISTORY
index 1febf9d..1b14b41 100644
--- a/net/iperf/HISTORY
+++ b/net/iperf/HISTORY
@@ -1,3 +1,6 @@
+2022-12-14 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 3.12
+
2022-02-05 Florian Franzmann <bwlf AT bandrate.org>
* DETAILS: version 3.11




  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (199a099969d512e5e3e7f1dc1279a7118befe1f7), Ismael Luceno, 12/14/2022

Archive powered by MHonArc 2.6.24.

Top of Page