summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* po: Translation UpdatesSamuel Mendoza-Jonas2015-11-023-19/+21
| | | | | | Abbreviation and help text updates. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* discover/ipmi: Increase IPMI timeout to a reasonable valueJeremy Kerr2015-09-301-1/+1
| | | | | | | | | | | | | | | | | We've seen some IPMI timeouts during testing - meaning that an IPMI bootdev setting will be ignored. This can result in a machine booting from an incorrect boot device, or missing a 'safe mode' indication, or incorrectly proceeding past petitboot. The firmware & kernel has its own timeout & retry mechanism, so we already have a little error-recovery there; the timeout in petitboot is to prevent an indefinite block if the kernel interface isn't behaving correctly. So, this change bumps the timeout to a value that suits BMCs we've seen in the field (specifying a 2 second timeout, with one retry). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/ipmi: Use advisory locking on ipmi deviceJeremy Kerr2015-09-301-4/+22
| | | | | | | | | | | | The ipmi module is shared between pb-config and pb-discover. During system initilisation, we're likely to have a few invocations of pb-config running, as well as pb-discover starting. We may have multiple potential concurrent accesses to the ipmi device node. To avoid problems, this change introduces a fcntl lock on the device node. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/devmapper: Use explicit 64-bit types for sector countsJeremy Kerr2015-09-302-12/+14
| | | | | | | | | We currently have a bug where the return value from get_block_sectors may overflow an unsigned int, so we create a snapshot that is too small. This change uses uint64_t types for the sector counts. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Set default languageJeremy Kerr2015-09-241-1/+11
| | | | | | | Rather than setting NULL, do a setlocale(LC_ALL, NULL) to query the system locale value as our default. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* po: Add missed translations fixesJeremy Kerr2015-09-181-3/+3
| | | | | | We have a few manual fixes missing from the fr.po translation. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: status messages shouldn't have a trailing newlineJeremy Kerr2015-09-1812-23/+23
| | | | | | Fix the status message, and remove the newline from our translations. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* po: Manual translation formatting fixesJeremy Kerr2015-09-1810-58/+58
| | | | | | | We have a few minor issues, mostly formatting, from the latest translation drop. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* po: translation updatesJeremy Kerr2015-09-1810-421/+897
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add translation comments for status messagesJeremy Kerr2015-09-182-1/+33
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* po: Update translation filesSamuel Mendoza-Jonas2015-09-156-113/+219
| | | | | | | Add additional source files to POTFILES.in and update the *.po files where able. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* Fix certain calls to gettextSamuel Mendoza-Jonas2015-09-152-7/+7
| | | | | | | Properly call gettext for strings in discover/device-handler.c that are user-visible, and fix the help string in ui/ncurses/nc-subset.c Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* Merge branch 'pb-plugin' into masterSamuel Mendoza-Jonas2015-09-112-123/+453
|\ | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
| * pb-plugin: Don't execute metadata filesJeremy Kerr2015-09-111-7/+25
| | | | | | | | | | | | | | Rather than sourcing a plugin's metadata file, explicitly parse variables. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Fix invalid command referenceJeremy Kerr2015-09-021-2/+2
| | | | | | | | | | | | | | We had the old code for using 'run'. Also, fix the error we see when issuing an invalid command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-console: Always add plugins directory to PATHJeremy Kerr2015-09-021-1/+2
| | | | | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Add lint commandJeremy Kerr2015-09-021-41/+140
| | | | | | | | | | | | | | This change adds a `lint` command, to do some basic checks on the plugin structure and metadata. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Implement plugin ABI versioningJeremy Kerr2015-09-021-1/+84
| | | | | | | | | | | | | | | | | | | | | | If a future update to plugins is not compatbile with the installed plugin infrastructure, we want to abort the scan / install process. This change adds an ABI version to the script, as well as version (and minimum-supported version) to the plugin metadata. This means we can check before plugin execution. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Only require a fixed plugin extension, instead of full nameJeremy Kerr2015-09-021-51/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the `pb-plugin scan` code requires a fixed archive name at the root of distributed media. This means that vendors need to have a fixed name, and can only ship one plugin per device. This change shifts the requirement to just a filename extension (.pb-plugin) instead. To handle this, we now look for any plugin with a .pb-plugin extension, and so may find multiple plugins on a device. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Move plugin wrappers to a separate dirJeremy Kerr2015-08-272-2/+4
| | | | | | | | | | | | Use /var/lib/pb-plugins/bin, to prevent overwriting system binaries. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Keep chroot persistent, and create wrapper scriptsJeremy Kerr2015-08-211-40/+54
| | | | | | | | | | | | | | | | | | | | | | Rather than having to 'pb-plugin run' multiple times, we want users to be able to execute multiple plugin binaries with more accessible command-line statements. This change reverts to the previous 'install' (rather than 'run') behaviour, and creates wrapper scripts to call into the chroot. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * pb-plugin: Update to chroot-style pluginsJeremy Kerr2015-08-071-93/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change uses a chroot for all plugins, so that plugins have complete flexibility with their libraries, dependencies and configuration. We remove the 'install' action, as we simply run the plugin once. Running involves extracting the archive, setting up a root filesystem, and running a chroot. To simplify plugin discovery behaviour, we standardise the plugin file to be at pb-plugin.conf of attached devices, and read the metadatafile straight out of the archive. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* | ui/ncurses: Improve scrolling behaviourSamuel Mendoza-Jonas2015-09-101-6/+10
| | | | | | | | | | | | | | | | | | | | The nc-config screen now includes several select options with a FIELD height greater than one, but config_screen_widget_focus() will only scroll down enough to see the first line of text. Update config_screen_widget_focus() to try and make as much of the focussed widget visible as possible. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | ui/ncurses: Allow text wrapping in select widgetsSamuel Mendoza-Jonas2015-09-102-17/+68
| | | | | | | | | | | | | | | | | | | | Several string translations used in select widgets are longer than the maximum possible width of the widget. Rather than associating several FIELDs with a select option, use a fold_text callback to pad out substrings of the original string such that the ncurses O_WRAP option properly wraps strings within the field. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover: Allow fs recovery if snapshot availableSamuel Mendoza-Jonas2015-09-101-8/+18
| | | | | | | | | | | | | | | | | | If we have a device-mapper snapshot available we can now guarantee filesystem recovery will not write back to a read-only mounted disk. Allow recovery on those devices with the notable exception of XFS which may fail to mount if the filesystem is the opposite endian of Petitboot. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | ui/ncurses: Improve update handling in nested screensSamuel Mendoza-Jonas2015-09-077-17/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several screens in petitboot-nc require an update if a config or sysinfo update is received. However if those screens exist but are not the current screen they will incorrectly try to draw to the screen. Where the currently active screen is a textscreen (eg. a help screen) the update is delayed until after the screen is exited. In the particular case of nc-config where the current screen can be an nc-subset screen, the nc-subset screen is exited immediately so the update can be performed, since the nc-subset screen depends on the information in the previous screen. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | ui/ncurses: Change arrangement of boot order buttonsSamuel Mendoza-Jonas2015-09-071-6/+11
| | | | | | | | | | | | | | | | | | | | | | The buttons 'Add Device', 'Clear', and 'Clear & Boot Any' are short enough to be positioned horizontally, but several localisations have strings as long as all three buttons combined. Instead arrange the buttons vertically and allow longer strings to resize the width of the button to fit the whole string. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | ui/ncurses: Resize & adjust OK/Help/Cancel buttonsSamuel Mendoza-Jonas2015-09-074-12/+15
| | | | | | | | | | | | | | | | The localisation of 'OK' is cut short in a few languages by a character or two - adjust the buttons in each affected screen slightly to accommodate. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | Consolidate display string for optical devicesSamuel Mendoza-Jonas2015-08-312-3/+1
| | | | | | | | | | | | | | Instead of using 'Optical' in some places and 'CD/DVD' in others, simply use 'CD/DVD' for all cases. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | Recognise storage devices on USB busSamuel Mendoza-Jonas2015-08-317-6/+24
| | | | | | | | | | | | | | | | Users may want to prioritise USB-attached storage devices differently to other devices. Detect if a device is USB-attached and add a new device type to identify it. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | ui/ncurses: Fix positioning of i18n strings in button labelsSamuel Mendoza-Jonas2015-08-311-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | Since the visual length of localised strings is not necessarily equal to the number of chars in the array, button labels could 'finish' early. For example: '[確定] ' and '[ 說明 ] ' vs the correct '[ 確定 ]' and '[ 說明 ]' Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | lib/i18n: Move strncols to i18n.cSamuel Mendoza-Jonas2015-08-314-31/+53
| | | | | | | | | | | | Make the strncols() helper available generally to i18n-concerned code. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | ui/ncurses: Update nc-config help text for Disk R/WSamuel Mendoza-Jonas2015-08-251-1/+5
| | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | lib/fold: Handle extra mbrtowc return caseSamuel Mendoza-Jonas2015-08-251-2/+3
| | | | | | | | | | | | | | | | Commit 9781a370 ("Handle mblen return code when n is zero.") in glibc changes the return value for when the number of bytes ('n') is zero. Add an extra condition to detect if we've reached the end of the buffer. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | po: Translation updates for all languagesSamuel Mendoza-Jonas2015-08-1911-56/+168
| | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover: Add disable param for dm-snapshotsSamuel Mendoza-Jonas2015-08-185-0/+16
| | | | | | | | | | | | | | Add a debug-style nvram parameter to disallow the use of device-mapper snapshots. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover/udev: Additional checks in udev_handle_block_addSamuel Mendoza-Jonas2015-08-181-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | - Several filesystem types can appear that we won't be able to mount. Instead of waiting to fail mounting them in device_handler_discover(), skip processing them at all. - Do not create dm-snapshots on top of raid arrays until we have a reliable way of determining the sector count for a md raid device. - Turn down the verbosity on skipping dm-devices. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover/devmapper: Disable libdm udev sync supportSamuel Mendoza-Jonas2015-08-181-3/+12
| | | | | | | | | | | | | | | | | | | | | | Certain userspace environments that Petitboot is packaged with include a libdm built with udev sync support which hung with the previous approach. Relying on udev to properly process dm device creation makes some assumptions about the flavour of udev available - until that is certain disable udev sync support and have device-mapper control device creation itself. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | Make read-only guarantee user-settableSamuel Mendoza-Jonas2015-08-067-1/+57
| | | | | | | | | | | | | | | | Create a new Petitboot option 'petitboot,write?' that specifies whether the system is allowed to mount devices read-write. The option can be toggled by the user in the nc-config screen. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover: Mount snapshots for all eligible disk devicesSamuel Mendoza-Jonas2015-08-062-21/+80
| | | | | | | | | | | | | | | | Device-mapper snapshots are created for all disk devices prior to being mounted. If explicit writes are made to the snapshot they are merged back to the disk once write access is released. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover: Support creation of device-mapper devicesSamuel Mendoza-Jonas2015-08-063-0/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add discover/dm-snapshot that allows the creation of device-mapper snapshots that support merging changes back to disk. Device-mapper snapshots are a CoW device backed by a ramdisk, mirroring the contents of a source device. No changes are made to the original disk unless an explicit merge action is performed. This guarantees read-only mounting of host disks even when writes could implicitly occur, eg. when performing recovering a journaled filesystem. In the event that writing back to the disk is desired, such as when updating grubenv, the changes made to the snapshot can be merged back to the source disk. This patch adds support but does not change functionality. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover: Keep track of available ramdisk devicesSamuel Mendoza-Jonas2015-08-062-0/+112
| | | | | | | | | | | | | | | | | | | | Store information on available ramdisk devices when they are recognised by udev, and add functions to 'reserve' and 'release' these devices. This will be used to associate device-mapper snapshots with a backing ramdisk in a following patch. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | discover: Ensure destroy_device is called on reinitSamuel Mendoza-Jonas2015-08-061-1/+3
| | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* | po: Translation updates for autoboot/ipmi changesSamuel Mendoza-Jonas2015-08-0411-327/+751
|/ | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* ui/ncurses: Layout tweaks for boot order interfaceJeremy Kerr2015-06-262-16/+16
| | | | | | | | | | | | | | | | | | | | This change implements a few minor tweaks for the bootorder layout interface: - make the verical spacing of widgets more consistent (we have a couple of 3-line gaps) - use a consistent 2-space gap between buttons on the same line - clarify the title text for the subset widget instance, and move the select widget closer to the title - use consistent title-case for widget labels - left-align the select & button widgets on the subset screen, for consistency with other screens Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Fix raw string argument to talloc_asprintf_appendJeremy Kerr2015-06-261-1/+1
| | | | | | | | | | | | | | Current builds give a warning: ../discover/platform-powerpc.c: In function ‘update_bootdev_config’: ../discover/platform-powerpc.c:667:4: warning: format not a string literal and no format arguments [-Wformat-security] tmp = val = talloc_asprintf_append(val, boot_str); ^ This change uses "%s" for the format string. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Merge remote-tracking rbanch sammj/masterJeremy Kerr2015-06-2620-280/+1465
|\ | | | | | | | | | | | | | | Conflicts: discover/platform-powerpc.c discover/ipmi.h Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
| * ui/ncurses: Properly reposition cursor after menu updateSamuel Mendoza-Jonas2015-05-201-2/+28
| | | | | | | | | | | | | | | | | | The currently selected item in the main menu can be set to an item off the visible portion of the menu after the additional or removal of a boot option. Update the currently selected item and/or the current view such that the item remains in the visible area. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
| * ui/ncurses: Toggle visibility of timeout help labelSamuel Mendoza-Jonas2015-05-201-0/+1
| | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
| * discover: Fix whitespace in discover_handler_confSamuel Mendoza-Jonas2015-05-051-8/+8
| | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
OpenPOWER on IntegriCloud