summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Allow system-version-manager to deploy from a rawdisk imagebaserock/james/deploy-from-imageJames Thomas2015-02-131-2/+62
|
* Merge remote-tracking branch 'origin/baserock/james/add_boot_device'Sam Thursfield2014-11-211-20/+49
|\ | | | | | | | | Reviewed-By: Paul Sherwood <paul.sherwood@codethink.co.uk> Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * Check multiple locations for extlinux.confbaserock/james/add_boot_deviceJames Thomas2014-11-201-2/+13
| | | | | | | | | | 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
| * Support booting from a different partition using BOOT_DEVICEJames Thomas2014-11-201-20/+38
|/ | | | | This allows bootloaders without btrfs support (e.g u-boot) to boot from an ext partition
* Merge branch 'sam/allow-file-migrations'Sam Thursfield2014-10-0226-2/+33
|\ | | | | | | | | | | 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>
| * Use = not == with `test` to be POSIX compatibleSam Thursfield2014-09-231-1/+1
| |
| * Allow replacing a file with a compatibility symlinkSam Thursfield2014-09-1926-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'baserock/ps/show-running-and-default'Pedro Alvarez2014-09-251-1/+7
|\ \ | |/ |/| | | | | Reviewed-by: Pedro Alvarez Reviewed-by: Sam Thursfield
| * Make system-version-manager show running and default systemsPaul Sherwood2014-09-251-1/+7
|/
* Merge branch 'baserock/james/jetson_update'James Thomas2014-08-141-4/+30
|\ | | | | | | | | | | 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>
| * Add support for device treesbaserock/james/jetson_updateJames Thomas2014-07-241-0/+19
| |
| * Don't treat the lack of a menu.c32 file as a serious errorJames Thomas2014-07-241-4/+11
|/ | | | We can add a menu entry for this in the extlinux.conf file directly
* Merge branch 'baserock/richardmaw/S11230/initramfs-upgrades'Richard Maw2014-06-181-12/+56
|\ | | | | | | | | | | Reviewed-by: Sam Thursfield Reviewed-by: Emmet Hikory Reviewed-by: Pedro Alvarez
| * Generate extlinux.conf using deployment options from /baserock/deployment.metaRichard Maw2014-06-161-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Actually use atomic_symlink_update for somethingRichard Maw2014-06-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Use fd from mkstemp to create file object, rather than pathRichard Maw2014-06-161-2/+1
| | | | | | | | | | It's a shame to throw away the fd that ensures we aren't hit by a symlink attack.
| * Fix spaces between function name and parametersRichard Maw2014-06-161-2/+2
|/
* Merge branch 'baserock/benbrewer/post-overhaul-v2'Ben Brewer2014-06-0411-407/+418
|\ | | | | | | | | Reviewed-by: Michael Drake Reviewed-by: Richard Maw
| * Print errno when tbdiff-deploy fails to open streambaserock/benbrewer/post-overhaul-v2Ben Brewer2014-06-041-1/+3
| |
| * Print usage in tbdiff-deploy when it's used incorrectlyBen Brewer2014-06-041-1/+8
| |
| * Remove tbd_stat_print since it's unused and unimplementedBen Brewer2014-06-042-7/+0
| |
| * Use POSIX file operations internally in tbdiff-applyBen Brewer2014-06-041-29/+28
| | | | | | | | | | | | 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.
| * Use POSIX file operations for tbdiff-applyBen Brewer2014-06-045-110/+126
| | | | | | | | For the consistency reasons listed in earlier commits.
| * Remove tbd_stat_fopen since it's no longer usedBen Brewer2014-06-042-13/+0
| | | | | | | | | | Since we now use POSIX file functions only in tbdiff-create, we no longer need tbd_stat_fopen, so it's been removed.
| * Use POSIX file operations internally in tbdiff-createBen Brewer2014-06-041-41/+35
| | | | | | | | | | | | | | | | 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.
| * Use POSIX file functions for tbdiff-create streamBen Brewer2014-06-045-79/+88
| | | | | | | | | | | | | | 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.
| * Use quoted includes for local headers in tbdiff source filesBen Brewer2014-06-025-12/+12
| | | | | | | | | | | | | | | | | | 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.
| * Remove use of typedef to avoid naming conflicts with POSIXBen Brewer2014-06-028-138/+142
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Remove extern keyword since it's not neededBen Brewer2014-06-024-32/+32
|/ | | | | | 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.
* Merge branch 'baserock/benbrewer/overhaul-v2'Ben Brewer2014-06-0211-455/+519
|\ | | | | | | | | Reviewed-by: Richard Maw Reviewed-by: Lars Wirzenius
| * Print warning using TBD_WARN when chown failsbaserock/benbrewer/overhaul-v2Ben Brewer2014-06-021-8/+17
| | | | | | | | | | | | 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 TBD_DEBUG macro to print the value of an invalid commandBen Brewer2014-06-021-1/+1
| | | | | | | | | | Use the TBD_DEBUG macro since it will be disabled when debug is disabled, otherwise we'd always print the error message.
| * Use TBD_DEBUG macro instead of fprint for debug messagesBen Brewer2014-06-022-21/+21
| | | | | | | | | | We now use the TBD_DEBUG macro rather than fprintf, this means that debug messages aren't printed when debugging is disabled.
| * Added warning and debug mechanism to tbdiff-common.hBen Brewer2014-06-021-2/+29
| | | | | | | | | | | | | | 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.
| * Cleanup writing of xattr pairs in tbdiff-create.cBen Brewer2014-06-021-11/+14
| |
| * style: Rename fread/fwrite in function names to read and writeBen Brewer2014-06-022-86/+86
| | | | | | | | | | | | | | | | 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.
| * Remove read/write_size from tbdiff-io since they're unusedBen Brewer2014-06-022-14/+0
| | | | | | | | | | Also removed because size_t can vary in size across platforms, which makes it unsuitable for storing in our diff stream.
| * style: Cleanup the names of the tbd read/write wrappersBen Brewer2014-06-024-90/+90
| |
| * Add externs to functions in tbdiff-io.h and cleanupBen Brewer2014-06-021-32/+18
| | | | | | | | | | The externs are not required but it's inkeeping with the other headers which all currently have them.
| * Simplify endian swapping in tbdiff-io.cBen Brewer2014-06-021-65/+51
| | | | | | | | | | | | | | | | 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.
| * Make TB_DIFF_PROTOCOL_ID a static const char for type safetyBen Brewer2014-06-021-2/+2
| |
| * Use correct pointer type for parent member in tbd_stat_tBen Brewer2014-06-021-3/+5
| | | | | | | | | | | | | | 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.
| * Create tbd_cmd_t type to for commands and use sizeof in writeBen Brewer2014-06-023-7/+9
| | | | | | | | | | | | 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.
| * style: Fix whitespace in tbdiff-common.hBen Brewer2014-06-021-27/+27
| |
| * style: Fix alignment and func defs in tbdiff-apply.cBen Brewer2014-06-021-29/+34
| |
| * style: Fix alignment and whitespace issues in tbdiff-createBen Brewer2014-06-021-59/+61
| |
| * style: Fix indentation and whitespace in tbdiff-io.cBen Brewer2014-06-021-80/+80
| |
| * style: Fix alignment of tbd_stat_t struct membersBen Brewer2014-06-021-3/+3
| |
| * style: Convert all cpp style comments to c style commentsBen Brewer2014-06-024-22/+22
| |
| * Fix fp resource leaks in tbdiff-applyBen Brewer2014-06-021-21/+48
| | | | | | | | | | There were a lot of instances where on error the code would fail to close the opened file pointer.