Move ostree-* executables to /usr/lib/ostree
Why not to use libexecdir?
Because this directory does not exist on some distros or paths
between distros varies. There are several reasons why a well
known path is prefered, for example when generating a kernel
command line:
init=${ostree}/usr/lib/ostree-boot/ostree-prepare-root
In addition this saves us some typing in a console when wanting
to access the "ostree" cmd line.
Closes: #449
Approved by: cgwalters
This commit is contained in:
parent
7ed2f1e5af
commit
fd1a044d6e
|
|
@ -53,7 +53,7 @@ grub2configdir = $(sysconfdir)/grub.d
|
||||||
INSTALL_DATA_HOOKS += install-grub2-config-hook
|
INSTALL_DATA_HOOKS += install-grub2-config-hook
|
||||||
else
|
else
|
||||||
# We're using our internal generator
|
# We're using our internal generator
|
||||||
libexec_SCRIPTS = src/boot/grub2/ostree-grub-generator
|
ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST += src/boot/dracut/module-setup.sh \
|
EXTRA_DIST += src/boot/dracut/module-setup.sh \
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@ gir_DATA =
|
||||||
typelibdir = $(libdir)/girepository-1.0
|
typelibdir = $(libdir)/girepository-1.0
|
||||||
typelib_DATA =
|
typelib_DATA =
|
||||||
gsettings_SCHEMAS =
|
gsettings_SCHEMAS =
|
||||||
|
ostree_bootdir = /usr/lib/ostree
|
||||||
|
ostree_boot_PROGRAMS =
|
||||||
|
|
||||||
# This is a special facility to chain together hooks easily
|
# This is a special facility to chain together hooks easily
|
||||||
INSTALL_DATA_HOOKS =
|
INSTALL_DATA_HOOKS =
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,10 @@
|
||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
if BUILDOPT_SYSTEMD
|
if BUILDOPT_SYSTEMD
|
||||||
sbin_PROGRAMS += ostree-prepare-root
|
|
||||||
sbin_PROGRAMS += ostree-remount
|
ostree_boot_PROGRAMS += ostree-prepare-root
|
||||||
|
ostree_boot_PROGRAMS += ostree-remount
|
||||||
|
|
||||||
noinst_LTLIBRARIES += libswitchroot-mountutil.la
|
noinst_LTLIBRARIES += libswitchroot-mountutil.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
if [[ -x $systemdutildir/systemd ]] && [[ -x /usr/sbin/ostree-prepare-root ]]; then
|
if [[ -x $systemdutildir/systemd ]] && [[ -x /usr/lib/ostree/ostree-prepare-root ]]; then
|
||||||
return 255
|
return 255
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ depends() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
dracut_install ostree-prepare-root
|
dracut_install /usr/lib/ostree/ostree-prepare-root
|
||||||
inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service"
|
inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service"
|
||||||
mkdir -p "${initdir}${systemdsystemconfdir}/initrd-switch-root.target.wants"
|
mkdir -p "${initdir}${systemdsystemconfdir}/initrd-switch-root.target.wants"
|
||||||
ln_r "${systemdsystemunitdir}/ostree-prepare-root.service" \
|
ln_r "${systemdsystemunitdir}/ostree-prepare-root.service" \
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
add_binary /usr/sbin/ostree-prepare-root
|
add_binary /usr/lib/ostree/ostree-prepare-root
|
||||||
add_binary /usr/sbin/ostree-remount
|
add_binary /usr/lib/ostree/ostree-remount
|
||||||
|
|
||||||
add_file /usr/lib/systemd/system/ostree-prepare-root.service
|
add_file /usr/lib/systemd/system/ostree-prepare-root.service
|
||||||
add_symlink /usr/lib/systemd/system/initrd-switch-root.target.wants/ostree-prepare-root.service \
|
add_symlink /usr/lib/systemd/system/initrd-switch-root.target.wants/ostree-prepare-root.service \
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ Before=plymouth-switch-root.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/sbin/ostree-prepare-root /sysroot
|
ExecStart=/usr/lib/ostree/ostree-prepare-root /sysroot
|
||||||
StandardInput=null
|
StandardInput=null
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
StandardError=syslog+console
|
StandardError=syslog+console
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Before=systemd-tmpfiles-setup.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/sbin/ostree-remount
|
ExecStart=/usr/lib/ostree/ostree-remount
|
||||||
StandardInput=null
|
StandardInput=null
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
StandardError=syslog+console
|
StandardError=syslog+console
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
|
||||||
use_system_grub2_mkconfig = FALSE;
|
use_system_grub2_mkconfig = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
grub_exec = use_system_grub2_mkconfig ? GRUB2_MKCONFIG_PATH : LIBEXECDIR "/ostree-grub-generator";
|
grub_exec = use_system_grub2_mkconfig ? GRUB2_MKCONFIG_PATH : "/usr/lib/ostree/ostree-grub-generator";
|
||||||
|
|
||||||
if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
|
if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
|
||||||
&& g_file_has_parent (self->sysroot->path, NULL))
|
&& g_file_has_parent (self->sysroot->path, NULL))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue