Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to the project are documented in this file.
### Changes
- Upgrade Buildroot to 2024.02.3 (LTS)
- Upgrade Linux kernel to 6.6.34 (LTS)
- Upgrade bundled curiOS httpd container to v24.05.0
- Default web landing page refactored into a Buildroot package to make
it possible to overload from customer repos.
- Enable DCB support in aarch64 kernel (for EtherType prio override)
Expand Down Expand Up @@ -60,6 +61,7 @@ All notable changes to the project are documented in this file.
- Issue #478: add operational support for ietf-system.yang, reading
actual hostname and passwords after issue #435
- Merge infix-shell-types.yang with infix-system.yang
- cli: improved error/warning message on missing or incomplete command

[yescrypt]: https://en.wikipedia.org/wiki/Yescrypt)

Expand All @@ -75,17 +77,21 @@ All notable changes to the project are documented in this file.
secure mode, causing the system to end up in an undefined state
- Fix #453: fix inconsistent behavior of custom MAC address (interface
`phys-address` for VETH pairs. Allows fixed MAC in containers
- Fix #462: increase port column width for CLI `show bridge mdb`
- Fix #468: non-admin users can get a POSIX shell as login shell, root
cause was buggy Augeas library, replaced with plain C API.
- Fix #469: non-admin users added to *any* group get administrator
privileges (added to UNIX `wheel` group)
- Fix #473: bridge interface with IPv6 SLAAC never get global prefix
- Fix #476: Custom command for containers not working
- Fix #479: timeout from underlying datastore when disabling containers
in configuration. Only disabling (stopping) container now done in the
configuration change, removal of container done in the background
- Fix locking issue with standard counter groups on `mv88e6xxx`
- Add missing LICENSE hash for factory reset tool
- Fix timeout handling in container restart command
- Fix MDB/ATU synchronization issue from IGMPv3/MLDv2 reports on
`mv88e6xxx` systems
- Fix #476: Custom command for containers not working

[v24.04.2][] - 2024-05-15
-------------------------
Expand Down
4 changes: 2 additions & 2 deletions package/curios-httpd/curios-httpd.hash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Locally computed
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
sha256 b47eac9c7a6a25e0e38e8c993b862b88322ddfb226dba59674ee1c37f9ea4749 curios-httpd-oci-arm64-v24.03.0.tar.gz
sha256 36bf6b27b54b1bccc68fd6156f6d6bb3b7e7851df90d56c614b1e4e056e170d9 curios-httpd-oci-amd64-v24.03.0.tar.gz
sha256 988a523bf4be543cb4ea1d3472ce4720e0b92511546817028b90150a3f054e9f curios-httpd-oci-arm64-v24.05.0.tar.gz
sha256 25f94a7c44cdbbceca3f89382b8bea0dcd8d178032c97a9113bb69bbc1770528 curios-httpd-oci-amd64-v24.05.0.tar.gz
2 changes: 1 addition & 1 deletion package/curios-httpd/curios-httpd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

CURIOS_HTTPD_VERSION = v24.03.0
CURIOS_HTTPD_VERSION = v24.05.0
CURIOS_HTTPD_SOURCE = curios-httpd-oci-$(GO_GOARCH)-$(CURIOS_HTTPD_VERSION).tar.gz
CURIOS_HTTPD_SITE = https://github.com/kernelkit/curiOS/releases/download/$(CURIOS_HTTPD_VERSION)
CURIOS_HTTPD_LICENSE = GPL
Expand Down
2 changes: 1 addition & 1 deletion package/klish/klish.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Locally calculated
sha256 9d9d33b873917ca5d0bdcc47a36d2fd385971ab0c045d1472fcadf95ee5bcf5b LICENCE
sha256 c80c2b7eee248d80989fd6218068fe89457d034e3da6db8f0f18cad509e8d52d klish-4afbb469613071503f38c21d54efde97dec86109-br1.tar.gz
sha256 eca394cd4b0e1d5da583e3dd7f7c7b71350f53c10fe5f208b5d00e34a77ea111 klish-1af2393234d0d73d6cc3bbf2dc028174298f3fec-br1.tar.gz
2 changes: 1 addition & 1 deletion package/klish/klish.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

KLISH_VERSION = 4afbb469613071503f38c21d54efde97dec86109
KLISH_VERSION = 1af2393234d0d73d6cc3bbf2dc028174298f3fec
KLISH_SITE = https://github.com/kernelkit/klish.git
#KLISH_VERSION = tags/3.0.0
#KLISH_SITE = https://src.libcode.org/pkun/klish.git
Expand Down
2 changes: 1 addition & 1 deletion src/confd/src/ietf-system.c
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ static int change_hostname(sr_session_ctx_t *session, uint32_t sub_id, const cha
/* Inform any running lldpd and avahi of the change ... */
systemf("lldpcli configure system hostname %s", hostnm);
systemf("avahi-set-host-name %s", hostnm);
system("initctl -nbq touch netbrowse");
systemf("initctl -nbq touch netbrowse");
err:
if (hostnm)
free(hostnm);
Expand Down
22 changes: 18 additions & 4 deletions src/confd/src/infix-containers.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ static int add(const char *name, struct lyd_node *cif)
struct lyd_node *node, *nets, *caps;
FILE *fp, *ap;

fp = fopenf("w", "%s/%s.sh", INBOX_QUEUE, name);
fp = fopenf("w", "%s/S01-%s.sh", INBOX_QUEUE, name);
if (!fp) {
ERRNO("Failed adding job %s.sh to job queue" INBOX_QUEUE, name);
ERRNO("Failed adding job S01-%s.sh to job queue" INBOX_QUEUE, name);
return SR_ERR_SYS;
}

Expand Down Expand Up @@ -187,6 +187,7 @@ static int del(const char *name)
INBOX_QUEUE,
ACTIVE_QUEUE,
};
FILE *fp;

/* Remove any pending download/create job first */
for (size_t i = 0; i < NELEMS(queue); i++) {
Expand All @@ -196,8 +197,21 @@ static int del(const char *name)
erase(fn);
}

return systemf("container delete %s", name) ||
systemf("initctl -bnq disable container@%s.conf", name);
/* Disable service and schedule for deletion. */
systemf("initctl -bnq disable container@%s.conf", name);

fp = fopenf("w", "%s/K01-%s.sh", INBOX_QUEUE, name);
if (!fp) {
ERRNO("Failed adding job 00-delete-%s.sh to job queue" INBOX_QUEUE, name);
return SR_ERR_SYS;
}

fprintf(fp, "#!/bin/sh\n"
"container delete %s\n", name);
fchmod(fileno(fp), 0700);
fclose(fp);

return SR_ERR_OK;
}

static int change(sr_session_ctx_t *session, uint32_t sub_id, const char *module,
Expand Down
73 changes: 57 additions & 16 deletions src/execd/execd.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: ISC */

#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <getopt.h>
Expand Down Expand Up @@ -31,7 +32,7 @@ static int logmask = LOG_UPTO(LOG_NOTICE);
static char buffer[BUFSIZ];
static char *done;

static void run_job(char *path, char *file)
static void run_job(const char *path, char *file, int archive)
{
char cmd[strlen(path) + strlen(file) + 2];
int rc;
Expand All @@ -57,32 +58,67 @@ static void run_job(char *path, char *file)
}

dbg("job %s in %s done", file, path);
if (done)
if (done && archive)
movefile(cmd, done);
else
erase(cmd);
}

static void run_queue(char *path)
/*
* Allow SNN and KNN style jobs, for inotyify_cb() we also allow
* a type '*' just to figure out if a job should be archived in
* the done directory.
*/
static int check(const char *name, int type, int *archive)
{
if (!name || strlen(name) < 3)
return -1;

if (isdigit(name[1]) && isdigit(name[2])) {
if (type == '*')
type = name[0];

switch (type) {
case 'K':
*archive = 0;
return 0;
case 'S':
*archive = 1;
return 0;
default:
break;
}
}

return 1;
}

static void run_dir(const char *path, int type)
{
struct dirent *d;
DIR *dir;
struct dirent **namelist;
int archive = 0;
int n, i;

dir = opendir(path);
if (!dir) {
err("opendir");
n = scandir(path, &namelist, NULL, alphasort);
if (n < 0) {
err("scandir %s", path);
return;
}

while ((d = readdir(dir))) {
dbg("Running queue %s entry %s", path, d->d_name);
if (d->d_name[0] == '.')
continue;
for (i = 0; i < n; i++) {
if (!check(namelist[i]->d_name, type, &archive))
run_job(path, namelist[i]->d_name, archive);

run_job(path, d->d_name);
free(namelist[i]);
}

closedir(dir);
free(namelist);
}

static void run_queue(char *path)
{
run_dir(path, 'K');
run_dir(path, 'S');
}

static void signal_cb(uev_t *w, void *arg, int _)
Expand Down Expand Up @@ -113,10 +149,15 @@ static void inotify_cb(uev_t *w, void *arg, int _)

for (char *p = buffer; p < buffer + bytes;) {
struct inotify_event *event = (struct inotify_event *)p;
char *name = event->name;
int archive;

if (event->mask & (IN_CLOSE_WRITE | IN_ATTRIB | IN_MOVED_TO)) {
dbg("Got inotify event %s 0x%04x", event->name, event->mask);
run_job(arg, event->name);
dbg("Got inotify event %s 0x%04x", name, event->mask);
if (check(name, '*', &archive))
continue;

run_job(arg, name, archive);
}

p += sizeof(struct inotify_event) + event->len;
Expand Down
2 changes: 1 addition & 1 deletion src/statd/python/cli_pretty/cli_pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PadMdb:
bridge = 7
vlan = 6
group = 20
ports = 20
ports = 45

class PadRoute:
prefix = 30
Expand Down
2 changes: 1 addition & 1 deletion test/case/cli/cli-output/show-bridge-mdb.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BRIDGE VID GROUP PORTS 
BRIDGE VID GROUP PORTS 
br0 230.1.32.100 e0
br0 230.1.2.100 e1
br0 01:01:01:01:01:01 e1
Expand Down
2 changes: 1 addition & 1 deletion test/infamy/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Container:
"""Helper methods"""
IMAGE = "curios-httpd-v24.03.0.tar.gz"
IMAGE = "curios-httpd-v24.05.0.tar.gz"

def __init__(self, target):
self.system = target
Expand Down