Compare commits

...

7 Commits

Author SHA1 Message Date
Eduardo Ferreira
3641894849
Merge c9260ffc55 into 8aaea0c65d 2024-12-20 10:32:40 -03:00
Colin Walters
8aaea0c65d
Merge pull request #3361 from cgwalters/release
Release 2024.10
2024-12-19 17:10:40 -05:00
Colin Walters
45ddf3b798
Merge pull request #3351 from cgwalters/fix-transient-root-doc
man: Note semantics combining `root.transient` with `composefs.enabled`
2024-12-19 16:23:48 -05:00
Colin Walters
aca6f17ff8 Post-release version bump
Signed-off-by: Colin Walters <walters@verbum.org>
2024-12-19 15:11:42 -05:00
Colin Walters
66f5a77ae6 Release 2024.10
Signed-off-by: Colin Walters <walters@verbum.org>
2024-12-19 15:10:12 -05:00
Colin Walters
786b38c2cf man: Note semantics combining root.transient with composefs.enabled
It's all quite confusing having to reason about both the pre-composefs
ostree and the composefs version. But hopefully soon we more firmly
leave behind that first legacy.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-12-17 16:04:38 -05:00
Eduardo Ferreira
c9260ffc55 ostree-grub-generator: allow adding custom scripts to grub.cfg
This changes allow us to customize grub.cfg without manually editing it.

Now, whatever files found under /etc/ostree.d are added (in alphabetical
order) between the cfg header and its menuentries, allowing to add
custom logic to the bootloader in a non intrusive way.

Signed-off-by: Eduardo Ferreira <eduardo.barbosa@toradex.com>
2024-02-08 10:31:04 -03:00
3 changed files with 29 additions and 11 deletions

View File

@ -1,7 +1,7 @@
AC_PREREQ([2.63]) AC_PREREQ([2.63])
dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`. dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`.
m4_define([year_version], [2024]) m4_define([year_version], [2024])
m4_define([release_version], [10]) m4_define([release_version], [11])
m4_define([package_version], [year_version.release_version]) m4_define([package_version], [year_version.release_version])
AC_INIT([libostree], [package_version], [walters@verbum.org]) AC_INIT([libostree], [package_version], [walters@verbum.org])
is_release_build=no is_release_build=no

View File

@ -120,20 +120,25 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
<varlistentry> <varlistentry>
<term><varname>root.transient</varname></term> <term><varname>root.transient</varname></term>
<listitem><para>A boolean value; the default is <literal>false</literal>. <listitem><para>A boolean value; the default is <literal>false</literal>.
If this is set to <literal>true</literal>, then the <literal>/</literal> filesystem will be a writable <literal>overlayfs</literal>, Setting this flag to <literal>true</literal> requires composefs (See <literal>composefs.enabled</literal>).
with the upper directory being a hidden directory (in the underlying system root filesystem) that will persist across reboots by default. When enabled, the root mount point <literal>/</literal> will be an overlayfs whose contents will be stored
However, changes will <emphasis>be discarded</emphasis> on OS updates! in a tmpfs, and hence discarded on OS upgrade or reboot.
</para> </para>
<para> <para>
Enabling this option can be very useful for cases such as packages (dpkg/rpm/etc) that write content into <literal>/opt</literal>, This option is independent of <literal>etc.transient</literal> and <literal>sysroot.readonly</literal>;
particularly where they expect the target to be writable at runtime. To make that work, ensure that your <literal>/opt</literal>
directory is *not* a symlink to <literal>/var/opt</literal>, but is just an empty directory.
</para>
<para>
Note the <literal>/usr</literal> mount point remains read-only by default. This option is independent of <literal>etc.transient</literal> and <literal>sysroot.readonly</literal>;
it is supported for example to have <literal>root.transient=true</literal> but <literal>etc.transient=false</literal> in which case changes to <literal>/etc</literal> continue it is supported for example to have <literal>root.transient=true</literal> but <literal>etc.transient=false</literal> in which case changes to <literal>/etc</literal> continue
to persist across updates, with the default OSTree 3-way merge applied. to persist across updates, with the default OSTree 3-way merge applied.
</para></listitem> Also related to persistence it is important to emphasize that <literal>/sysroot</literal> (the physical root filesystem) is still persistent
by default; in-place OS upgrades can be applied.
</para>
<para>
Enabling this option can make it significantly easier to adopt an image-based model in some circumstances.
For example, if you have a configuration management system that is inspecting machine-specific state and
e.g. dynamically installing packages or applying configuration, it can more easily be adapted to
run on each boot, while still shifting a portion (or ideally most) image configuration to build time
as part of the base image/commit.
</para>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>composefs.enabled</varname></term> <term><varname>composefs.enabled</varname></term>

View File

@ -25,6 +25,7 @@ script=$(basename ${0})
# Atomically safe location where to generete grub.cfg when executing system upgrade. # Atomically safe location where to generete grub.cfg when executing system upgrade.
new_grub2_cfg=${2} new_grub2_cfg=${2}
entries_path=$(dirname $new_grub2_cfg)/entries entries_path=$(dirname $new_grub2_cfg)/entries
custom_scripts="/etc/ostree.d"
read_config() read_config()
{ {
@ -105,10 +106,22 @@ timeout=10
EOF EOF
} }
populate_custom_section()
{
if [ -d "$custom_scripts" ]; then
for script in $(ls -v $custom_scripts/*); do
echo -e "\n### BEGIN ${script} ###" >> ${new_grub2_cfg}
cat ${script} >> ${new_grub2_cfg}
echo -e "\n### END ${script} ###\n" >> ${new_grub2_cfg}
done
fi
}
generate_grub2_cfg() generate_grub2_cfg()
{ {
populate_warning populate_warning
populate_header populate_header
populate_custom_section
populate_menu populate_menu
} }