Add support for mkinitcpio
https://bugzilla.gnome.org/show_bug.cgi?id=710682
This commit is contained in:
parent
c65923e642
commit
ccb10d592d
|
|
@ -20,18 +20,29 @@
|
||||||
if BUILDOPT_DRACUT
|
if BUILDOPT_DRACUT
|
||||||
# Not using $(libdir) here is intentional, dracut modules go in prefix/lib
|
# Not using $(libdir) here is intentional, dracut modules go in prefix/lib
|
||||||
dracutmoddir = $(prefix)/lib/dracut/modules.d/98ostree
|
dracutmoddir = $(prefix)/lib/dracut/modules.d/98ostree
|
||||||
dracutmod_SCRIPTS = src/dracut/module-setup.sh
|
dracutmod_SCRIPTS = src/boot/dracut/module-setup.sh
|
||||||
dracutmod_DATA = src/dracut/ostree-prepare-root.service
|
|
||||||
|
|
||||||
systemdsystemunit_DATA = src/dracut/ostree-remount.service
|
|
||||||
|
|
||||||
dracutconfdir = $(sysconfdir)/dracut.conf.d
|
dracutconfdir = $(sysconfdir)/dracut.conf.d
|
||||||
dracutconf_DATA = src/dracut/ostree.conf
|
dracutconf_DATA = src/boot/dracut/ostree.conf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST += src/dracut/module-setup.sh \
|
if BUILDOPT_MKINITCPIO
|
||||||
src/dracut/ostree-prepare-root.service \
|
mkinitcpioinstalldir = $(prefix)/lib/initcpio/install
|
||||||
src/dracut/ostree-remount.service \
|
mkinitcpioinstall_SCRIPTS = src/boot/mkinitcpio/ostree
|
||||||
src/dracut/ostree.conf \
|
|
||||||
|
mkinitcpioconfdir = $(sysconfdir)
|
||||||
|
mkinitcpioconf_DATA = src/boot/mkinitcpio/ostree-mkinitcpio.conf
|
||||||
|
endif
|
||||||
|
|
||||||
|
if BUILDOPT_SYSTEMD
|
||||||
|
systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
|
||||||
|
src/boot/ostree-remount.service
|
||||||
|
endif
|
||||||
|
|
||||||
|
EXTRA_DIST += src/boot/dracut/module-setup.sh \
|
||||||
|
src/boot/dracut/ostree.conf \
|
||||||
|
src/boot/mkinitcpio/ostree \
|
||||||
|
src/boot/ostree-prepare-root.service \
|
||||||
|
src/boot/ostree-remount.service \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
if BUILDOPT_DRACUT
|
if BUILDOPT_SYSTEMD
|
||||||
sbin_PROGRAMS += ostree-prepare-root
|
sbin_PROGRAMS += ostree-prepare-root
|
||||||
sbin_PROGRAMS += ostree-remount
|
sbin_PROGRAMS += ostree-remount
|
||||||
noinst_LTLIBRARIES += libswitchroot-mountutil.la
|
noinst_LTLIBRARIES += libswitchroot-mountutil.la
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ include Makefile-libostree.am
|
||||||
include Makefile-ostree.am
|
include Makefile-ostree.am
|
||||||
include Makefile-switchroot.am
|
include Makefile-switchroot.am
|
||||||
include Makefile-tests.am
|
include Makefile-tests.am
|
||||||
include Makefile-dracut.am
|
include Makefile-boot.am
|
||||||
|
|
||||||
install-data-hook: $(INSTALL_DATA_HOOKS)
|
install-data-hook: $(INSTALL_DATA_HOOKS)
|
||||||
|
|
||||||
|
|
|
||||||
15
configure.ac
15
configure.ac
|
|
@ -143,7 +143,14 @@ AC_ARG_WITH(dracut,
|
||||||
[with_dracut=no])
|
[with_dracut=no])
|
||||||
AM_CONDITIONAL(BUILDOPT_DRACUT, test x$with_dracut = xyes)
|
AM_CONDITIONAL(BUILDOPT_DRACUT, test x$with_dracut = xyes)
|
||||||
|
|
||||||
AS_IF([test "x$with_dracut" = "xyes"], [
|
AC_ARG_WITH(mkinitcpio,
|
||||||
|
AS_HELP_STRING([--with-mkinitcpio],
|
||||||
|
[Install mkinitcpio module (default: no)]),,
|
||||||
|
[with_mkinitcpio=no])
|
||||||
|
AM_CONDITIONAL(BUILDOPT_MKINITCPIO, test x$with_mkinitcpio = xyes)
|
||||||
|
|
||||||
|
AS_IF([test "x$with_dracut" = "xyes" || test "x$with_mkinitcpio" = "xyes"], [
|
||||||
|
with_systemd=yes
|
||||||
AC_ARG_WITH([systemdsystemunitdir],
|
AC_ARG_WITH([systemdsystemunitdir],
|
||||||
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
||||||
[],
|
[],
|
||||||
|
|
@ -152,6 +159,7 @@ AS_IF([test "x$with_dracut" = "xyes"], [
|
||||||
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
AM_CONDITIONAL(BUILDOPT_SYSTEMD, test x$with_systemd = xyes)
|
||||||
|
|
||||||
dnl for tests
|
dnl for tests
|
||||||
AS_IF([test "x$found_introspection" = xyes], [
|
AS_IF([test "x$found_introspection" = xyes], [
|
||||||
|
|
@ -184,8 +192,9 @@ echo "
|
||||||
gpgme (sign commits): $with_gpgme
|
gpgme (sign commits): $with_gpgme
|
||||||
documentation: $enable_gtk_doc
|
documentation: $enable_gtk_doc
|
||||||
gjs-based tests: $have_gjs
|
gjs-based tests: $have_gjs
|
||||||
dracut: $with_dracut"
|
dracut: $with_dracut
|
||||||
AS_IF([test "x$with_dracut" = "xyes"], [
|
mkinitcpio: $with_mkinitcpio"
|
||||||
|
AS_IF([test "x$with_systemd" = "xyes"], [
|
||||||
echo " systemd unit dir: $with_systemdsystemunitdir"
|
echo " systemd unit dir: $with_systemdsystemunitdir"
|
||||||
])
|
])
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ depends() {
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
dracut_install ostree-prepare-root
|
dracut_install ostree-prepare-root
|
||||||
inst_simple "$moddir/ostree-prepare-root.service" "${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" \
|
||||||
"${systemdsystemconfdir}/initrd-switch-root.target.wants/ostree-prepare-root.service"
|
"${systemdsystemconfdir}/initrd-switch-root.target.wants/ostree-prepare-root.service"
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
build() {
|
||||||
|
add_binary /usr/sbin/ostree-prepare-root
|
||||||
|
add_binary /usr/sbin/ostree-remount
|
||||||
|
|
||||||
|
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 \
|
||||||
|
/usr/lib/systemd/system/ostree-prepare-root.service
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
HOOKS="base systemd ostree autodetect modconf block filesystems keyboard fsck"
|
||||||
Loading…
Reference in New Issue