Skip to content

Commit 658ce33

Browse files
committed
Move all binaries from /usr/sbin to /usr/bin
In practice only qubesdb-daemon remained in /usr/sbin. Since Fedora 42 merged those two, it ends up in /usr/bin anyway, and since its harmless on other distros, move it everywhere. This simplifies for example systemd unit handling (which otherwise would sometimes need /usr/bin and sometimes /usr/sbin path). But keep /usr/sbin/qubesdb-daemon compatibility symlink in RPM distros that don't merge sbin with bin yet. This especially applies to F41-based dom0, where qubesd referrs to /usr/sbin/qubesdb-daemon. QubesOS/qubes-issues#9807
1 parent 4474065 commit 658ce33

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

daemon/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ LIBS += -L$(QUBES_LIBS) -lvchan
2424
endif
2525
CFLAGS += -DBACKEND_VMM_$(BACKEND_VMM)
2626

27-
SBINDIR ?= /usr/sbin
27+
BINDIR ?= /usr/bin
2828

2929
all: qubesdb-daemon$(EXEEXT)
3030

3131
install:
32-
install -d $(DESTDIR)$(SBINDIR)
33-
install qubesdb-daemon$(EXEEXT) $(DESTDIR)$(SBINDIR)/
32+
install -d $(DESTDIR)$(BINDIR)
33+
install qubesdb-daemon$(EXEEXT) $(DESTDIR)$(BINDIR)/
3434

3535
qubesdb-daemon$(EXEEXT): db-cmds.o db-daemon.o db-core.o buffer.o
3636
$(CC) $(LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS) $(LIBS)

daemon/qubes-db-dom0.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ After=systemd-tmpfiles-setup.service
44

55
[Service]
66
# Both agent and daemon for dom0
7-
ExecStart=/usr/sbin/qubesdb-daemon 0 dom0
7+
ExecStart=/usr/bin/qubesdb-daemon 0 dom0
88
Type=notify
99
StandardOutput=syslog
1010

daemon/qubes-db.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DefaultDependencies=no
55

66
[Service]
77
# Remote Dom ID as an argument
8-
ExecStart=/usr/sbin/qubesdb-daemon 0
8+
ExecStart=/usr/bin/qubesdb-daemon 0
99
Type=notify
1010
Group=qubes
1111

debian/qubesdb.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ usr/bin/qubesdb-rm
55
usr/bin/qubesdb-multiread
66
usr/bin/qubesdb-list
77
usr/bin/qubesdb-watch
8-
usr/sbin/qubesdb-daemon
8+
usr/bin/qubesdb-daemon

rpm_spec/qubes-db.spec.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ make install \
7878
LIBDIR=%{_libdir} \
7979
BINDIR=%{_bindir} \
8080
SBINDIR=%{_sbindir}
81+
%if "%{_sbindir}" != "%{_bindir}"
82+
mkdir -p %{buildroot}%{_sbindir}
83+
ln -s ../bin/qubesdb-daemon %{buildroot}%{_sbindir}/qubesdb-daemon
84+
%endif
8185

8286
%files
8387
%doc
@@ -89,7 +93,10 @@ make install \
8993
%{_bindir}/qubesdb-multiread
9094
%{_bindir}/qubesdb-list
9195
%{_bindir}/qubesdb-watch
96+
%{_bindir}/qubesdb-daemon
97+
%if "%{_sbindir}" != "%{_bindir}"
9298
%{_sbindir}/qubesdb-daemon
99+
%endif
93100

94101
%files libs
95102
%{_libdir}/libqubesdb.so

selinux/qubes-core-qubesdb.fc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/usr/sbin/qubesdb-daemon -- gen_context(system_u:object_r:qubes_qubesdb_daemon_exec_t,s0)
21
/usr/bin/qubesdb-daemon -- gen_context(system_u:object_r:qubes_qubesdb_daemon_exec_t,s0)
32
/run/qubes/qubesdb\.sock -s gen_context(system_u:object_r:qubes_qubesdb_socket_t,s0)
43
/var/run/qubes/qubesdb\.sock -s gen_context(system_u:object_r:qubes_qubesdb_socket_t,s0)

0 commit comments

Comments
 (0)