| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| | |
Reviewed-By: Paul Sherwood <paul.sherwood@codethink.co.uk>
Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
|
| |
| |
| |
| |
| | |
U-boot wants the extlinux.conf to be in /extlinux/extlinux.conf, rather
than /, so if we don't find it there, search in /extlinux
|
|/
|
|
|
| |
This allows bootloaders without btrfs support (e.g u-boot) to boot from
an ext partition
|
|\
| |
| |
| |
| |
| | |
Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk>
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
Reviewed-By: Paul Sherwood <paul.sherwood@codethink.co.uk>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This means we can do stuff like moving /etc/os-release into /usr/lib
and leaving a compatibility symlink where the file was.
Previously baserock-system-config-sync would fail with the following:
ERROR: found two different types for 'os-release': regular and
symlink
One of the 'failure' test cases now passes, and I've added a specific
test for our 'os-release' case to the 'symblinks' test case too.
|
|\ \
| |/
|/|
| |
| | |
Reviewed-by: Pedro Alvarez
Reviewed-by: Sam Thursfield
|
|/ |
|
|\
| |
| |
| |
| |
| | |
Reviewed by: Richard Maw <richard.waw@codethink.co.uk>
Reviewed by: Sam Thursfield <sam.thursdfield@codethink.co.uk>
Merged by: James Thomas <james.thomas@codethink.co.uk>
|
| | |
|
|/
|
|
| |
We can add a menu entry for this in the extlinux.conf file directly
|
|\
| |
| |
| |
| |
| | |
Reviewed-by: Sam Thursfield
Reviewed-by: Emmet Hikory
Reviewed-by: Pedro Alvarez
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will add the initramfs to the config and tell it to mount the disk
by UUID if INITRAMFS_PATH was provided in the initial deployment.
It will also include the extra KERNEL_ARGS provided.
This is required to be able to upgrade a system that uses an initramfs
and have it continue to use the initramfs.
The system will continue to work without this patch if the initramfs'
only responsibility was translating a UUID into a disk path, since
system-version-manager would generate an extlinux.conf that boots with
the same disk as it is currently using, but that would break if the
device enumeration order changed e.g. if another disk was inserted
before the rootfs, or the disk is transplanted into another machine.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This function was added to ensure safe, automatic updates of the default
system symlink, but for some reason, was never used.
Instead it open-coded a vulnerable way of doing this, which could fail
if an upgrade was aborted at the wrong time.
So now we use atomic_symlink_update, which won't fail, and the worst
that can happen is a temporary directory gets left around.
|
| |
| |
| |
| |
| | |
It's a shame to throw away the fd that ensures we aren't hit by a
symlink attack.
|
|/ |
|
|\
| |
| |
| |
| | |
Reviewed-by: Michael Drake
Reviewed-by: Richard Maw
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
For consistency reasons and because the POSIX functions are more
consistent and simple, this also allows us to set the mode on file
creation and detect if a file already exists.
|
| |
| |
| |
| | |
For the consistency reasons listed in earlier commits.
|
| |
| |
| |
| |
| | |
Since we now use POSIX file functions only in tbdiff-create, we
no longer need tbd_stat_fopen, so it's been removed.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This keeps the code consistent by using the same file functions
internally as are used when reading from or writing to the stream.
The code is also simplified somewhat since POSIX file operations
are cleaner and more consistent than stdio.
|
| |
| |
| |
| |
| |
| |
| | |
POSIX file functions are more consistent and simple, originally
stdio was used to make the code as portable as possible, however
since it now relies on POSIX functionality anyway there's no need
for the inconsistency.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Quoted includes should be used when including headers which
represent declarations in local source files. The source files have
been modified to reflect this.
This makes it more clear which headers are system headers and which
are part of the tbdiff codebase.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
POSIX reserves the use of the underscore T postfix for types,
since most of the time we don't actually need to typedef the types
and since it's more clear to prefix structs and enums with the
struct and enum keywords, I've removed all uses of typedef and
gone with the more simple approach used in the kernel.
One typedef remains which is tbd_cmd_type, since this should be
a native type of a fixed size. The postfix changed to type to show
that it's a type and to ensure it doesn't collide with POSIX.
|
|/
|
|
|
|
| |
The extern keyword is not needed since it's the default property
for a function, it also takes up extra space on the line which
leads to more wrapping.
|
|\
| |
| |
| |
| | |
Reviewed-by: Richard Maw
Reviewed-by: Lars Wirzenius
|
| |
| |
| |
| |
| |
| | |
The compiler currently warns that the result of chown is ignored,
for now we'll print a warning when the chown operation fails, but
it'll need to be handled as an error eventually.
|
| |
| |
| |
| |
| | |
Use the TBD_DEBUG macro since it will be disabled when debug is
disabled, otherwise we'd always print the error message.
|
| |
| |
| |
| |
| | |
We now use the TBD_DEBUG macro rather than fprintf, this means that
debug messages aren't printed when debugging is disabled.
|
| |
| |
| |
| |
| |
| |
| | |
Added TBD_WARN and TBD_DEBUG macros to allow for warnings and
debug messages to be printed. This will make current debugging
messages cleaner and allow us to warn when the chown operation
fails.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The implementation currently uses fread and fwrite which are
specific functions in stdlib, however this is an implementation
detail and in the future these functions may not be used, so it
doesn't make sense to name the higher level functions based on
the function they use underneath.
|
| |
| |
| |
| |
| | |
Also removed because size_t can vary in size across platforms,
which makes it unsuitable for storing in our diff stream.
|
| | |
|
| |
| |
| |
| |
| | |
The externs are not required but it's inkeeping with the other
headers which all currently have them.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Simplify the endian swapping by always calling the endian macro
and only implementing it when the platform is big-endain.
The endian swapping function has also been made a little more
obvious and now uses a byteswap inline function to swap the bytes.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The parent pointer in tbd_stat_t was void since it pointed to
itself, to make the code more clear I've typedef'd the struct
above so that the pointer can now point to itself as an
incomplete type.
|
| |
| |
| |
| |
| |
| | |
Previously commands were just treated as a uint8_t and given the value of
and enum. This is now made more clear in the code by defining tbd_cmd_t as
a uint8_t below the enum in tbdiff-common.h.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
There were a lot of instances where on error the code would fail
to close the opened file pointer.
|