Files
buildroot/package/linenoise/linenoise.mk
Thomas Perale 2668d121e5 package/linenoise: add CPE
The CPE 'cpe:2.3:a:antirez:linenoise:1.0:*:*:*:*:*:*:*' is valid for the
package linenoise [1].

Since the latest version is '1.0' since 2015 the CPE_ID_VERSION is set
to that version.

The CVE that applies on version 1.0 were checked with the 'cve-check'
script:

```
echo '{"components": [{"bom-ref": "linenoise", "name": "linenoise", "version": "1.0", "cpe": "cpe:2.3:a:antirez:linenoise:1.0:-:*:*:*:*:*:*"}]}' | support/scripts/cve-check | jq -r '.vulnerabilities[].id'
```

Only the CVE-2025-9810 exists and that was fixed in [2].

[1] https://nvd.nist.gov/products/cpe/detail/10423C23-6AAA-439E-B723-1FCDEB3A769F
[2] 3c7cbf97d7 package/linenoise: security bump to version e26268de5e

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-12-27 15:51:40 +01:00

36 lines
1.2 KiB
Makefile

################################################################################
#
# linenoise
#
################################################################################
LINENOISE_VERSION = e26268de5e56bfaad773786471844578fe9f7f4b
LINENOISE_SITE = $(call github,antirez,linenoise,$(LINENOISE_VERSION))
LINENOISE_LICENSE = BSD-2-Clause
LINENOISE_LICENSE_FILES = LICENSE
LINENOISE_CPE_ID_VENDOR = antirez
LINENOISE_CPE_ID_VERSION = 1.0
LINENOISE_INSTALL_STAGING = YES
# Static library only, nothing to install on target
LINENOISE_INSTALL_TARGET = NO
# Fixed in https://github.com/antirez/linenoise/commit/880b94130ffa5f8236392392b447ff2234b11983
LINENOISE_IGNORE_CVES += CVE-2025-9810
define LINENOISE_BUILD_CMDS
cd $(@D); $(TARGET_CC) $(TARGET_CFLAGS) -c linenoise.c
cd $(@D); $(TARGET_AR) rcu liblinenoise.a linenoise.o
cd $(@D); $(TARGET_CC) $(TARGET_LDFLAGS) -o linenoise_example example.c -L. -llinenoise
endef
define LINENOISE_INSTALL_STAGING_CMDS
$(INSTALL) -m 644 -D $(@D)/linenoise.h \
$(STAGING_DIR)/usr/include/linenoise.h
$(INSTALL) -m 644 -D $(@D)/liblinenoise.a \
$(STAGING_DIR)/usr/lib/liblinenoise.a
$(INSTALL) -m 755 -D $(@D)/linenoise_example \
$(STAGING_DIR)/usr/bin/linenoise_example
endef
$(eval $(generic-package))