diff options
Diffstat (limited to 'meta-networking/recipes-support/netcf')
| -rw-r--r-- | meta-networking/recipes-support/netcf/netcf/0001-Adopt-to-new-gnulib-read_file-fread_file-signature.patch | 83 | ||||
| -rw-r--r-- | meta-networking/recipes-support/netcf/netcf_0.2.8.bb | 72 |
2 files changed, 0 insertions, 155 deletions
diff --git a/meta-networking/recipes-support/netcf/netcf/0001-Adopt-to-new-gnulib-read_file-fread_file-signature.patch b/meta-networking/recipes-support/netcf/netcf/0001-Adopt-to-new-gnulib-read_file-fread_file-signature.patch deleted file mode 100644 index b188248fff..0000000000 --- a/meta-networking/recipes-support/netcf/netcf/0001-Adopt-to-new-gnulib-read_file-fread_file-signature.patch +++ /dev/null | |||
| @@ -1,83 +0,0 @@ | |||
| 1 | From af256680926e166ac21bc0f11172ea6c077a9b55 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 9 Mar 2024 10:40:48 -0800 | ||
| 4 | Subject: [PATCH] Adopt to new gnulib read_file/fread_file signature | ||
| 5 | |||
| 6 | It now expects a flag parameter in latest gnulib | ||
| 7 | see [1] | ||
| 8 | |||
| 9 | [1] https://public-inbox.org/bug-gnulib/87tv01c1z2.fsf-ueno@gnu.org/ | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | src/dutil_linux.c | 4 ++-- | ||
| 15 | src/dutil_posix.c | 2 +- | ||
| 16 | src/ncftool.c | 2 +- | ||
| 17 | src/ncftransform.c | 2 +- | ||
| 18 | 4 files changed, 5 insertions(+), 5 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/src/dutil_linux.c b/src/dutil_linux.c | ||
| 21 | index 742153a..eb72eb2 100644 | ||
| 22 | --- a/src/dutil_linux.c | ||
| 23 | +++ b/src/dutil_linux.c | ||
| 24 | @@ -1113,7 +1113,7 @@ static void add_link_info(struct netcf *ncf, | ||
| 25 | |||
| 26 | xasprintf(&path, "/sys/class/net/%s/operstate", ifname); | ||
| 27 | ERR_NOMEM(!path, ncf); | ||
| 28 | - state = read_file(path, &length); | ||
| 29 | + state = read_file(path, 0, &length); | ||
| 30 | if (!state) { | ||
| 31 | /* missing operstate is *not* an error. It could be due to an | ||
| 32 | * alias interface, which has no entry in /sys/class/net at | ||
| 33 | @@ -1132,7 +1132,7 @@ static void add_link_info(struct netcf *ncf, | ||
| 34 | FREE(path); | ||
| 35 | xasprintf(&path, "/sys/class/net/%s/speed", ifname); | ||
| 36 | ERR_NOMEM(path == NULL, ncf); | ||
| 37 | - speed = read_file(path, &length); | ||
| 38 | + speed = read_file(path, 0, &length); | ||
| 39 | if (!speed && errno == EINVAL) { | ||
| 40 | /* attempts to read $ifname/speed result in EINVAL if the | ||
| 41 | * interface is ifconfiged down (which isn't exactly the | ||
| 42 | diff --git a/src/dutil_posix.c b/src/dutil_posix.c | ||
| 43 | index 1313514..b9884f0 100644 | ||
| 44 | --- a/src/dutil_posix.c | ||
| 45 | +++ b/src/dutil_posix.c | ||
| 46 | @@ -211,7 +211,7 @@ int run_program(struct netcf *ncf, const char *const *argv, char **output) | ||
| 47 | "Failed to create file stream for output while executing '%s': %s", | ||
| 48 | argv_str, errbuf); | ||
| 49 | |||
| 50 | - *output = fread_file(outfile, &outlen); | ||
| 51 | + *output = fread_file(outfile, 0, &outlen); | ||
| 52 | ERR_THROW_STRERROR(*output == NULL, ncf, EEXEC, | ||
| 53 | "Error while reading output from execution of '%s': %s", | ||
| 54 | argv_str, errbuf); | ||
| 55 | diff --git a/src/ncftool.c b/src/ncftool.c | ||
| 56 | index f1b5642..c878cb0 100644 | ||
| 57 | --- a/src/ncftool.c | ||
| 58 | +++ b/src/ncftool.c | ||
| 59 | @@ -351,7 +351,7 @@ static int cmd_define(const struct command *cmd) { | ||
| 60 | struct netcf_if *nif = NULL; | ||
| 61 | int result = CMD_RES_ERR; | ||
| 62 | |||
| 63 | - xml = read_file(fname, &length); | ||
| 64 | + xml = read_file(fname, 0, &length); | ||
| 65 | if (xml == NULL) { | ||
| 66 | fprintf(stderr, "Failed to read %s\n", fname); | ||
| 67 | goto done; | ||
| 68 | diff --git a/src/ncftransform.c b/src/ncftransform.c | ||
| 69 | index fbabfc3..4c9a56d 100644 | ||
| 70 | --- a/src/ncftransform.c | ||
| 71 | +++ b/src/ncftransform.c | ||
| 72 | @@ -54,7 +54,7 @@ int main(int argc, char **argv) { | ||
| 73 | if (argc != 3 || (STRNEQ(argv[1], "get") && STRNEQ(argv[1], "put"))) | ||
| 74 | die("Usage: ncftransform (put|get) FILE\n"); | ||
| 75 | |||
| 76 | - in_xml = read_file(argv[2], &length); | ||
| 77 | + in_xml = read_file(argv[2], 0, &length); | ||
| 78 | if (in_xml == NULL) | ||
| 79 | die("Failed to read %s\n", argv[2]); | ||
| 80 | |||
| 81 | -- | ||
| 82 | 2.44.0 | ||
| 83 | |||
diff --git a/meta-networking/recipes-support/netcf/netcf_0.2.8.bb b/meta-networking/recipes-support/netcf/netcf_0.2.8.bb deleted file mode 100644 index 4170e9fab0..0000000000 --- a/meta-networking/recipes-support/netcf/netcf_0.2.8.bb +++ /dev/null | |||
| @@ -1,72 +0,0 @@ | |||
| 1 | SUMMARY = "netcf" | ||
| 2 | DESCRIPTION = "netcf is a cross-platform network configuration library." | ||
| 3 | HOMEPAGE = "https://pagure.io/netcf" | ||
| 4 | SECTION = "libs" | ||
| 5 | LICENSE = "LGPL-2.1-only" | ||
| 6 | |||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f" | ||
| 8 | |||
| 9 | SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4" | ||
| 10 | PV .= "+git" | ||
| 11 | |||
| 12 | SRC_URI = "git://pagure.io/netcf.git;protocol=https;branch=master \ | ||
| 13 | file://0001-Adopt-to-new-gnulib-read_file-fread_file-signature.patch" | ||
| 14 | |||
| 15 | UPSTREAM_CHECK_GITTAGREGEX = "release-(?P<pver>(\d+(\.\d+)+))" | ||
| 16 | |||
| 17 | DEPENDS += "augeas libnl libxslt libxml2" | ||
| 18 | |||
| 19 | do_configure[depends] += "${MLPREFIX}gnulib:do_populate_sysroot" | ||
| 20 | |||
| 21 | |||
| 22 | inherit gettext autotools perlnative pkgconfig systemd | ||
| 23 | |||
| 24 | EXTRA_OECONF:append:class-target = " --with-driver=redhat" | ||
| 25 | |||
| 26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
| 27 | PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts," | ||
| 28 | |||
| 29 | do_configure:prepend() { | ||
| 30 | currdir=`pwd` | ||
| 31 | cd ${S} | ||
| 32 | |||
| 33 | # avoid bootstrap cloning gnulib on every configure | ||
| 34 | # the dir starts out empty from the pkg, but unconditionally blow it | ||
| 35 | # away so if we reconfigure due to gnulib sysroot sig changes, we will | ||
| 36 | # get the newer gnulib content into the build here. | ||
| 37 | rm -rf ${S}/.gnulib | ||
| 38 | cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib | ||
| 39 | |||
| 40 | # --force to avoid errors on reconfigure e.g if recipes changed we depend on | ||
| 41 | # | bootstrap: running: libtoolize --quiet | ||
| 42 | # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite | ||
| 43 | # | ... | ||
| 44 | ./bootstrap --force --no-git --gnulib-srcdir=.gnulib | ||
| 45 | |||
| 46 | cd $currdir | ||
| 47 | } | ||
| 48 | |||
| 49 | do_install:append() { | ||
| 50 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 51 | install -d ${D}${systemd_unitdir}/system | ||
| 52 | if [ -d "${D}${libdir}/systemd/system" ]; then | ||
| 53 | if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then | ||
| 54 | mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/ | ||
| 55 | rm -rf ${D}${libdir}/systemd/ | ||
| 56 | fi | ||
| 57 | elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then | ||
| 58 | mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/ | ||
| 59 | rm -rf ${D}${nonarch_libdir}/systemd/ | ||
| 60 | fi | ||
| 61 | else | ||
| 62 | mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir} | ||
| 63 | rm -rf ${D}${sysconfdir}/rc.d/ | ||
| 64 | fi | ||
| 65 | } | ||
| 66 | |||
| 67 | FILES:${PN} += " \ | ||
| 68 | ${libdir} \ | ||
| 69 | ${nonarch_libdir} \ | ||
| 70 | " | ||
| 71 | |||
| 72 | SYSTEMD_SERVICE:${PN} = "netcf-transaction.service" | ||
