summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Print warning using TBD_WARN when chown failsbaserock/benbrewer/overhaulBen Brewer2014-05-291-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-05-291-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-05-292-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-05-291-2/+23
| | | | | | | | | 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. blah warning log debug
* Cleanup writing of xattr pairs in tbdiff-create.cBen Brewer2014-05-291-11/+14
|
* style: Rename fread/fwrite in function names to read and writeBen Brewer2014-05-292-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-05-292-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-05-294-90/+90
|
* Add externs to functions in tbdiff-io.h and cleanupBen Brewer2014-05-291-32/+18
|
* Simplify endian swapping in tbdiff-io.cBen Brewer2014-05-291-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-05-291-2/+2
|
* Use correct pointer type for parent member in tbd_stat_tBen Brewer2014-05-291-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-05-293-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-05-291-27/+27
|
* style: Fix alignment and func defs in tbdiff-apply.cBen Brewer2014-05-291-29/+34
|
* style: Fix alignment and whitespace issues in tbdiff-createBen Brewer2014-05-291-59/+61
|
* style: Fix indentation and whitespace in tbdiff-io.cBen Brewer2014-05-291-80/+80
|
* style: Fix alignment of tbd_stat_t struct membersBen Brewer2014-05-291-3/+3
|
* style: Convert all cpp style comments to c style commentsBen Brewer2014-05-294-22/+22
|
* Fix fp resource leaks in tbdiff-applyBen Brewer2014-05-291-21/+48
| | | | | There were a lot of instances where on error the code would fail to close the opened file pointer.
* Fix memory leak of name in tbdiff-stat.cBen Brewer2014-05-291-2/+4
| | | | On error the duplicated string in 'name' would have leaked.
* Use ENODATA instead of ENOATTRBen Brewer2014-05-291-1/+1
| | | | | | The man page for lsetxattr says that ENOATTR is a synonym of ENODATA, since ENOATTR is not always available in sys/xattr.h we'll use ENODATA instead.
* Use sys/xattr from libc if attr/xattr is unavailableBen Brewer2014-05-292-2/+15
| | | | | | | | | | | | On my system tbdiff failed to build because attr/xattr doesn't exist, also the attr package was not easy to find. On searching I discovered that the functionality we use in attr.h is provided by modern versions of libc, as shown here: https://bugzilla.kernel.org/show_bug.cgi?id=70141 This patch falls back to using libc sys/xattr.h when attr/xattr.h is unavailable.
* Update gitignore file to ignore autotools generated filesBen Brewer2014-05-291-0/+28
|
* documentation: Remove issues which have already been resolvedBen Brewer2014-05-291-14/+0
| | | | | Some issues in the TODO file have been resolved and no longer apply, these issues have been removed.
* system-version-manager: Allow specifying custom path for ↵baserock/pedroalvarez/trove-upgrades-rebase2Sam Thursfield2014-03-061-1/+5
| | | | | | | baserock-system-config-sync This is helpful when deploying an upgrade to a system that doesn't already have baserock-system-config-sync installed.
* Add script to modify the bootloader and manage different parallel OS.Pedro Alvarez2014-03-064-2/+338
| | | | | | | | | | | | | | | | | | | | This is part of the upgrades work. With this tool you can now switch between versions of the OS, remove a version, list all the versions present in the system, get the default version and the running version, and deploy a new system. All of the above is possible with the following subcommands: - list - deploy - get-default - get-running - remove - set-default It also activates a bootloader menu to choose a version to boot. The menu is important to make sure the user can boot the old OS if the new kernel doesn't work.
* baserock-system-config-sync: Force copy /etc/passwd and /etc/groupPedro Alvarez2014-03-061-0/+8
| | | | | | | | | | | | | | | | | | This change is to ensure the existing users will exist after an upgrade. Otherwise, if there are merge conflicts when upgrading, the users will be lost and the root password will be deactivated. If that happens and the only way to access to the system is through ssh and the system was rebooted after the upgrade (manually or automatically) then the system won't be accessible anymore. This change also means that we can no longer make changes to the base /etc/passwd or /etc/group in the 'fhs-dirs' chunk without adding a manual hook to add the new users/groups when upgrading old systems. In the following link is the email thread where was discussed this issue: http://vlists.pepperfish.net/pipermail/baserock-dev-baserock.org/2014-March/004581.html
* baserock-system-config-sync: Add some logging to the standard output.Pedro Alvarez2014-03-061-0/+15
|
* Modify 'baserock-system-config-sync' to get two arguments using 'merge'Pedro Alvarez2014-03-062-7/+8
| | | | | | | Since with 'system-version-manager' is possible to change the default system, 'baserock-system-config-sync' shouldn't get the default system, and get an extra parameter to choose the system version to merge.
* Fix error in the baserock-system-config-sync behaviour table.Pedro Alvarez2014-03-051-2/+2
| | | | | | | When one file is present in v1 and in vUser, and is not present in v2, baserock-system-config-sync copies vUser version of the file. This was happening before this commit, but it was wrong explained in the behaviour table.
* Fix behaviour in bscs-merge when vUser and v2 don't have a file of v1Pedro Alvarez2014-03-052-4/+3
| | | | | If a file was removed in vUser, and v2 doesn't have a new one, then the file is not longer needed.
* Merge branch 'baserock/pedroalvarez/bscs-wrong-merge2'Pedro Alvarez2014-02-2610-11/+33
|\ | | | | | | Reviewed-by: Richard Maw
| * Prevent patching when 'vu == v2' in 'baserock-system-config-sync'.Pedro Alvarez2014-02-261-6/+15
| | | | | | | | | | | | | | When vu == v2, the script tried to reverse the patch. Now this won't happen again. Also added '-f' flag calling 'patch' to prevent also reverse patching.
| * Fix baserock-system-config-sync tests. Wasn't working as expected.Pedro Alvarez2014-02-261-5/+2
| |
| * Add test case for vu == v2 in 'baserock-system-config-sync'Pedro Alvarez2014-02-248-0/+16
|/ | | | | 'baserock-system-config-sync' is doing reverse patching when that happens. This test is to check the expected behaviour.
* Merge branch 'baserock/pedroalvarez/bscs-upgrade-tests3'Pedro Alvarez2014-02-203-4/+38
|\ | | | | | | | | Reviewed-by: Richard Maw Reviewed-by: Sam Thursfield
| * Modify the way to use 'patch' in 'baserock-system-config-sync'.Pedro Alvarez2014-02-202-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | baserock-sytem-config-sync: Changes here are caused by a bug found in GNU patch managing the permissions of the files when using the patch command like: patch <file_to_apply_patch> -t -o <output_file> To reproduce the bug: echo foo > file1 echo bar > file2 diff -u file1 file2 | patch 1 -t -o file3 ls -l You can check that the permissions of 'file3' are different than the permissions of 'file1' or 'file2'. To avoid the bug, this patch changes the way we are using patch, using it as following: patch <file_to_apply_patch> -t Since the output file is not specified, the output file will be the file in which we want to apply the patch. And due we cannot specify the output file, we are copying the file to the destination directory, and then applying the patch there. As a consequence of changing the way of using patch, now 'patch' generates an extra file when patching fails. This file is added in the test suite also in this commit.
| * Update 'baserock-system-config-sync' tests to check permissionsPedro Alvarez2014-02-201-2/+30
|/
* Merge branch 'benbrown/bscs-non-baserock'Ben Brown2014-01-061-10/+10
|\
| * Add options to diff command to change header content to only include file ↵Ben Brown2014-01-061-2/+2
| | | | | | | | name, and explicitly ask for a unified diff
| * Removed 'local' from variables that are not within functionsBen Brown2014-01-061-8/+8
|/
* Merge branch 'benbrown/S9537/convert-xattribute-tests'Ben Brown2014-01-0621-839/+144
|\
| * Remove old tests and any code specific to those testsBen Brown2013-12-1919-839/+2
| |
| * Scenarios testing extended attributes on file systems that support themBen Brown2013-12-182-0/+83
| |
| * Add newlines to increase readabilityBen Brown2013-12-171-0/+59
|/
* Merge branch 'benbrown/S9482/convert-socket-tests'Ben Brown2013-12-163-4/+88
|\
| * Socket scenarios addedBen Brown2013-12-161-3/+44
| |
| * Add socket creation program to MakefileBen Brown2013-12-161-1/+2
| |
| * Added C program which creates named Unix socketsBen Brown2013-12-161-0/+42
|/