tools/xenstore: move xenstored sources into dedicated directory

In tools/xenstore there are living xenstored and xenstore clients.
They are no longer sharing anything apart from the "xenstore" in their
names.

Move the xenstored sources into a new directory tools/xenstored while
dropping the "xenstored_" prefix from their names. This will make it
clearer that xenstore clients and xenstored are independent from each
other.

In order to avoid two very similar named directories below tools,
rename tools/xenstore to tools/xs-clients.

Drop the make targets [un]install-clients as those are not used in
the Xen tree.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Juergen Gross authored and Andrew Cooper committed 2023-08-23 19:10:37 +01:00
1 parent 981b18c07d
commit 5c293058b1
38 files changed
+110 -93

No files matched your search

-11
View File
@@ -237,17 +237,6 @@ tools/xenmon/xentrace_setmask
tools/xenmon/xenbaked
tools/xenpaging/xenpaging
tools/xenpmd/xenpmd
tools/xenstore/xenstore
tools/xenstore/xenstore-chmod
tools/xenstore/xenstore-control
tools/xenstore/xenstore-exists
tools/xenstore/xenstore-list
tools/xenstore/xenstore-ls
tools/xenstore/xenstore-read
tools/xenstore/xenstore-rm
tools/xenstore/xenstore-watch
tools/xenstore/xenstore-write
tools/xenstore/xenstored
tools/xentop/xentop
tools/xentrace/xentrace_setsize
tools/xentrace/tbctl
+2 -1
View File
@@ -669,7 +669,8 @@ F: tools/include/xenstore.h
F: tools/include/xenstore_lib.h
F: tools/include/xen-tools/xenstore-common.h
F: tools/libs/store/
F: tools/xenstore/
F: tools/xenstored/
F: tools/xs-clients/
XENTRACE
M: George Dunlap <george.dunlap@citrix.com>
+2 -2
View File
@@ -371,10 +371,10 @@ endef
$(foreach lib,$(STUB_LIBS),$(eval $(call BUILD_lib,$(lib))))
xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile.common
xenstore/stamp: $(XEN_ROOT)/tools/xenstored/Makefile.common
$(do_links)
xenstorepvh/stamp: $(XEN_ROOT)/tools/xenstore/Makefile.common
xenstorepvh/stamp: $(XEN_ROOT)/tools/xenstored/Makefile.common
$(do_links)
LINK_DIRS := xenstore xenstorepvh $(foreach dir,$(STUB_LIBS),libs-$(XEN_TARGET_ARCH)/$(dir))
+2 -1
View File
@@ -8,7 +8,8 @@ SUBDIRS-y :=
SUBDIRS-y += libs
SUBDIRS-y += flask
SUBDIRS-y += fuzz
SUBDIRS-y += xenstore
SUBDIRS-y += xs-clients
SUBDIRS-$(XENSTORE_XENSTORED) += xenstored
SUBDIRS-y += misc
SUBDIRS-y += examples
SUBDIRS-y += hotplug
+1
View File
@@ -0,0 +1 @@
/xenstored
+48
View File
@@ -0,0 +1,48 @@
XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
include Makefile.common
xenstored: LDLIBS += $(LDLIBS_libxenevtchn)
xenstored: LDLIBS += $(LDLIBS_libxengnttab)
xenstored: LDLIBS += $(LDLIBS_libxenctrl)
xenstored: LDLIBS += -lrt
xenstored: LDLIBS += $(SOCKET_LIBS)
ifeq ($(CONFIG_SYSTEMD),y)
$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS)
xenstored: LDLIBS += $(SYSTEMD_LIBS)
endif
TARGETS := xenstored
.PHONY: all
all: $(TARGETS)
xenstored: $(XENSTORED_OBJS-y)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS)
.PHONY: clean
clean::
$(RM) $(TARGETS) $(DEPS_RM)
.PHONY: distclean
distclean: clean
.PHONY: TAGS
TAGS:
etags `find . -name '*.[ch]'`
.PHONY: install
install: all
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
$(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir)
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(sbindir)/xenstored
if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat; \
fi
-include $(DEPS_INCLUDE)
@@ -1,17 +1,16 @@
# Makefile shared with stubdom
XENSTORED_OBJS-y := xenstored_core.o xenstored_watch.o xenstored_domain.o
XENSTORED_OBJS-y += xenstored_transaction.o xenstored_control.o xenstored_lu.o
XENSTORED_OBJS-y := core.o watch.o domain.o
XENSTORED_OBJS-y += transaction.o control.o lu.o
XENSTORED_OBJS-y += talloc.o utils.o hashtable.o
XENSTORED_OBJS-$(CONFIG_Linux) += xenstored_posix.o xenstored_lu_daemon.o
XENSTORED_OBJS-$(CONFIG_NetBSD) += xenstored_posix.o xenstored_lu_daemon.o
XENSTORED_OBJS-$(CONFIG_FreeBSD) += xenstored_posix.o xenstored_lu_daemon.o
XENSTORED_OBJS-$(CONFIG_MiniOS) += xenstored_minios.o xenstored_lu_minios.o
XENSTORED_OBJS-$(CONFIG_Linux) += posix.o lu_daemon.o
XENSTORED_OBJS-$(CONFIG_NetBSD) += posix.o lu_daemon.o
XENSTORED_OBJS-$(CONFIG_FreeBSD) += posix.o lu_daemon.o
XENSTORED_OBJS-$(CONFIG_MiniOS) += minios.o lu_minios.o
# Include configure output (config.h)
CFLAGS += -include $(XEN_ROOT)/tools/config.h
CFLAGS += -I./include
CFLAGS += $(CFLAGS_libxenevtchn)
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_libxenguest)
File renamed without changes.
@@ -27,10 +27,10 @@
#include "utils.h"
#include "talloc.h"
#include "xenstored_core.h"
#include "xenstored_control.h"
#include "xenstored_domain.h"
#include "xenstored_lu.h"
#include "core.h"
#include "control.h"
#include "domain.h"
#include "lu.h"
struct cmd_s {
char *cmd;
File renamed without changes.
@@ -47,12 +47,12 @@
#include "utils.h"
#include "list.h"
#include "talloc.h"
#include "xenstored_core.h"
#include "xenstored_watch.h"
#include "xenstored_transaction.h"
#include "xenstored_domain.h"
#include "xenstored_control.h"
#include "xenstored_lu.h"
#include "core.h"
#include "watch.h"
#include "transaction.h"
#include "domain.h"
#include "control.h"
#include "lu.h"
#ifndef NO_SOCKETS
#if defined(HAVE_SYSTEMD)
@@ -64,7 +64,7 @@
#include <systemd/sd-daemon.h>
#endif
extern xenevtchn_handle *xce_handle; /* in xenstored_domain.c */
extern xenevtchn_handle *xce_handle; /* in domain.c */
static int xce_pollfd_idx = -1;
static struct pollfd *fds;
static unsigned int current_array_size;
File renamed without changes.
@@ -27,11 +27,11 @@
#include "utils.h"
#include "talloc.h"
#include "xenstored_core.h"
#include "xenstored_domain.h"
#include "xenstored_transaction.h"
#include "xenstored_watch.h"
#include "xenstored_control.h"
#include "core.h"
#include "domain.h"
#include "transaction.h"
#include "watch.h"
#include "control.h"
#include <xenevtchn.h>
#include <xenctrl.h>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -13,10 +13,10 @@
#include <time.h>
#include "talloc.h"
#include "xenstored_core.h"
#include "xenstored_domain.h"
#include "xenstored_lu.h"
#include "xenstored_watch.h"
#include "core.h"
#include "domain.h"
#include "lu.h"
#include "watch.h"
#ifndef NO_LIVE_UPDATE
struct live_update *lu_status;
File renamed without changes.
@@ -13,8 +13,8 @@
#include <xen-tools/xenstore-common.h>
#include "talloc.h"
#include "xenstored_core.h"
#include "xenstored_lu.h"
#include "core.h"
#include "lu.h"
#ifndef NO_LIVE_UPDATE
void lu_get_dump_state(struct lu_dump_state *state)
@@ -14,7 +14,7 @@
#include <xen-tools/common-macros.h>
#include "talloc.h"
#include "xenstored_lu.h"
#include "lu.h"
/* Mini-OS only knows about MAP_ANON. */
#ifndef MAP_ANONYMOUS
@@ -17,7 +17,7 @@
*/
#include <sys/types.h>
#include <sys/mman.h>
#include "xenstored_core.h"
#include "core.h"
#include <xen/grant_table.h>
void write_pidfile(const char *pidfile)
File renamed without changes.
@@ -24,8 +24,8 @@
#include <sys/mman.h>
#include "utils.h"
#include "xenstored_core.h"
#include "xenstored_osdep.h"
#include "core.h"
#include "osdep.h"
void write_pidfile(const char *pidfile)
{
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -30,9 +30,9 @@
#include <unistd.h>
#include "talloc.h"
#include "list.h"
#include "xenstored_transaction.h"
#include "xenstored_watch.h"
#include "xenstored_domain.h"
#include "transaction.h"
#include "watch.h"
#include "domain.h"
#include "xenstore_lib.h"
#include "utils.h"
@@ -17,7 +17,7 @@
*/
#ifndef _XENSTORED_TRANSACTION_H
#define _XENSTORED_TRANSACTION_H
#include "xenstored_core.h"
#include "core.h"
enum node_access_type {
NODE_ACCESS_READ,
File renamed without changes.
File renamed without changes.
@@ -25,11 +25,11 @@
#include <assert.h>
#include "talloc.h"
#include "list.h"
#include "xenstored_watch.h"
#include "watch.h"
#include "xenstore_lib.h"
#include "utils.h"
#include "xenstored_domain.h"
#include "xenstored_transaction.h"
#include "domain.h"
#include "transaction.h"
struct watch
{
@@ -19,7 +19,7 @@
#ifndef _XENSTORED_WATCH_H
#define _XENSTORED_WATCH_H
#include "xenstored_core.h"
#include "core.h"
int do_watch(const void *ctx, struct connection *conn,
struct buffered_data *in);
File renamed without changes.
+10
View File
@@ -0,0 +1,10 @@
/xenstore
/xenstore-chmod
/xenstore-control
/xenstore-exists
/xenstore-list
/xenstore-ls
/xenstore-read
/xenstore-rm
/xenstore-watch
/xenstore-write
@@ -1,18 +1,11 @@
XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
include Makefile.common
xenstored: LDLIBS += $(LDLIBS_libxenevtchn)
xenstored: LDLIBS += $(LDLIBS_libxengnttab)
xenstored: LDLIBS += $(LDLIBS_libxenctrl)
xenstored: LDLIBS += -lrt
xenstored: LDLIBS += $(SOCKET_LIBS)
ifeq ($(CONFIG_SYSTEMD),y)
$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS)
xenstored: LDLIBS += $(SYSTEMD_LIBS)
endif
CFLAGS += -include $(XEN_ROOT)/tools/config.h
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_libxenguest)
CFLAGS += $(CFLAGS_libxentoolcore)
CFLAGS += $(CFLAGS_libxenstore)
xenstore: LDLIBS += $(LDLIBS_libxenstore)
xenstore: LDLIBS += $(LDLIBS_libxentoolcore)
@@ -28,9 +21,6 @@ CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmo
CLIENTS += xenstore-write xenstore-ls xenstore-watch
TARGETS := xenstore $(CLIENTS) xenstore-control
ifeq ($(XENSTORE_XENSTORED),y)
TARGETS += xenstored
endif
.PHONY: all
all: $(TARGETS)
@@ -38,9 +28,6 @@ all: $(TARGETS)
.PHONY: clients
clients: xenstore $(CLIENTS) xenstore-control
xenstored: $(XENSTORED_OBJS-y)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS)
$(CLIENTS): xenstore
ln -f xenstore $@
@@ -64,10 +51,6 @@ TAGS:
.PHONY: install
install: all
$(INSTALL_DIR) $(DESTDIR)$(bindir)
ifeq ($(XENSTORE_XENSTORED),y)
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
$(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir)
endif
$(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir)
$(INSTALL_PROG) xenstore $(DESTDIR)$(bindir)
set -e ; for c in $(CLIENTS) ; do \
@@ -79,23 +62,8 @@ uninstall:
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(CLIENTS))
rm -f $(DESTDIR)$(bindir)/xenstore
rm -f $(DESTDIR)$(bindir)/xenstore-control
ifeq ($(XENSTORE_XENSTORED),y)
rm -f $(DESTDIR)$(sbindir)/xenstored
endif
if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat; \
fi
.PHONY: clients-uninstall
clients-uninstall:
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(CLIENTS))
.PHONY: clients-install
clients-install: clients
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROG) xenstore $(DESTDIR)$(bindir)
set -e ; for c in $(CLIENTS) ; do \
ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \
done
-include $(DEPS_INCLUDE)
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.