and make sure it would terminate with nul with strlcpy().
Reviewed by: imp (earlier revision)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16595
the previous behavior actually is required for setting up configurations
in which the RTC is using UTC but the timezone is not. Still, besides
uniform error handling, that file should get the same treatment in the
non-interactive variants supported by tzsetup(8).
of the initial UTC dialog to install_zoneinfo() so that file gets the
necessary treatment also when that dialog is skipped via "-s", when
selecting UTC from the time zone menu or on the command-line instead
etc.
- Make the initial UTC dialog actually work by giving the relevant files
the necessary treatment and then exit when choosing "Yes" there instead
of moving on to the time zone menu regardless.
- Since r301131, /etc/localtime is also installed when selecting UTC in
interactive configurations (which previously meant only via the time
zone menu, though). Thus, the code added in r230298 which treats a
NULL zone file name as UTC and removes /etc/localtime in that case can
go again.
- Consistently refer to "could not delete" (as chosen by the oldest such
code in here) when unlink(2) fails instead of a to mixture of "delete"
and "unlink" in error messages.
Hide dialog specific code behind HAVE_DIALOG. It allows to build a stripped
down version (missing the dialog UI) but perfectly function tzsetup when
world is built WITHOUT_DIALOG
Reorganise a bit the code to limit the number of blocks under HAVE_DIALOG
Reviewed by: emaste
Sponsored by: https://reviews.freebsd.org/D8325
If tzsetup UTC is run then it successfully configured the system for UTC
including installing /etc/localtime however if the user ran just tzsetup
for interactive configuration and select UTC no /etc/localtime was installed
which resulted in failures for utilities which require said file.
Change set_zone_utc to call install_zoneinfo("UTC") to ensure that
/etc/localtime is created for interactive UTC selection.
Users who have previously run tzsetup in interactive mode and select UTC
can install the missing /etc/localtime by running tzsetup -r.
Also correct static miss-match for set_zone_utc.
MFC after: 2 weeks
Relnotes: Yes
Sponsored by: Multiplay
fgetln(3) will returns NULL if cannot get a line from a stream.
strsep(3) it will returns NULL if the end of the string was reached.
jemalloc(3) malloc will returns NULL if it cannot allocate memory.
fgetln(3) it will returns NULL if it cannot get a line from a stream.
MFC after: 4 weeks
Previously, the code prefixes the chroot path to actual file paths to
simulate the effect. This, however, will not work for tzset(3) which
expects the current system have a working set of timezone data files,
and that is not always the case.
This changeset simplifies the handling of paths and use an actual
chroot(2) call to implement the effect.
PR: bin/197313
MFC after: 2 weeks
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
commit c1acf022c533c5ae27e0cd556977eafe3f5959eb
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date: Fri Jan 17 21:46:44 2014 +0000
Add an option WITHOUT_NCURSESW to suppress building and linking to
libncursesw. While wide character support it useful we'd like to
only need one ncurses library on embedded systems.
MFC after: 4 weeks
Sponsored by: DARPA, AFRL
- Move the reinstall logic to be before menus are initialised
(menus are not needed when reinstalling a zonefile).
- Remove unnecessary re-initialization of path_db.
- Update variable name and error message because we now use the
zone name relative to /usr/share/zoneinfo, not the full path.
pr: bin/164041
Submitted by: Devin Teske <dteske vicor com>
MFC after: 1 week
Update verbose output to match what actually happens when selecting
the UTC option, and when the -n option is used.
Patch updated slightly for new libdialog.
PR: bin/164042
Submitted by: Devin Teske <dteske vicor com>
MFC after: 2 weeks
If the specified zone file does not exist or the -n flag is specified,
do not update /var/db/zoneinfo.
PR: bin/164039
Submitted by: Devin Teske <dteske vicor com>
MFC after: 1 week
installing zoneinfo. While we're in the vicinity, add some missing
error checking to eliminate an unhelpful error message when unlink()
fails.
/me is embarrassed by the quality of his 16-year-old code.
The whole thing is awful and could stand a complete rewrite.
PR: 164038
Submitted by: Devin Teske (but implemented differently)
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.
__FreeBSD_version is now 900030.
Discussed on: -current
Approved by: core
Obtained from: http://invisible-island.net/dialog