Commit graph

242 commits

Author SHA1 Message Date
Simon J. Gerraty 0a45a7e99f Fix share/zoneinfo for DIRDEPS_BUILD
The tranditional build makes multiple passes through the tree.
The DIRDEPS_BUILD visits each directory only once per architecture,
thus makefiles should be able to everything they need in a single pass.

The use of TZS!= when doing make(*install*)
only works if the directory has previously been visited to do zoneinfo
since before the zoneinfo target is run TZS will be empty.

To fix this, have the zoneinfo target capture the list of files to
zoneinfo, and install-zoneinfo use that list.
Rename that target to zonefiles - since that is now what it does.

This is more efficient - we only gather the list of zones when it is
likely to have changed, and allows the makefile to do everything in a
single pass.

Reviewed by:	stevek
Differential Revision:	https://reviews.freebsd.org/D42624
2023-11-20 12:52:43 -08:00
Stephen J. Kiernan fa08011a52 zoneinfo: fix makefile rules script
In make target rules, one needs to use subshell if there are
change directory commands that should only have an effect on the
other commands in the same line. Otherwise, if make is not running in
compatibility mode (for example, when -j flag is specified), commands
would be executed in a single shell and lines following the "cd" might
not work as expected.

Adjust the target script lines that use "cd" to run in a subshell
by adding appropriate parenthesis.

Reviewed by:	sjg
Differential Revision:        https://reviews.freebsd.org/D42608
2023-11-14 19:51:40 -05:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Yuri Pankov 336c4682b6 tzsetup: add baseline file to control parsed zonetab contents
Introduce undocumented option -d to dump parsed zonetab file contents
and add a "baseline" target along with instructions on updating it.

Reviewed by:	philip
Differential Revision:	https://reviews.freebsd.org/D39634
2023-04-23 10:32:02 +02:00
Simon J. Gerraty 552815b2da zoneinfo get zic from stage tree during DIRDEPS_BUILD 2023-04-20 21:00:32 -07:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Dag-Erling Smørgrav f1021d27f7 zoneinfo: Always produce fat zoneinfo files.
These aren't just needed for compatibility with i386 binaries (which need
the 32-bit section), but potentially also for compatibility with older
binaries on all platforms.

Sponsored by:	Klara, Inc.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38194
2023-01-25 18:03:05 +01:00
Dag-Erling Smørgrav 783c318fd1 zoneinfo: On amd64, include 32-bit data.
While there, drop the unnecessary posixrules option.

Sponsored by:	Klara, Inc.
Reviewed by:	imp, allanjude
Differential Revision:	https://reviews.freebsd.org/D38142
2023-01-25 16:54:52 +01:00
Philip Paeps da038df8c9 share/zoneinfo: don't build obsolete SystemV zones
The /usr/share/zoneinfo/SystemV directory has been empty on FreeBSD
since 2006.  The upstream source file was removed in 2020.  Also stop
passing yearisdate to zic(8).  This has not been necessary for years.
The script has been removed upstream since 2020.

MFC after:	3 days
2022-09-25 13:54:20 +08:00
Ed Maste 6f6fbfa3a8 Remove quotes around Makefile .error/.warn/.info strings
The text after .error et al is emitted verbatim.

Reviewed by:	sjg
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33904
2022-01-22 14:03:07 -05:00
Emmanuel Vadot 6b68fdbbf7 pkgbase: Put zoneinfo file in their own package
Those files take some amount of diskspace and one might not want them
installed on some situation (mfsdisk, small embedded system etc ...)

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D27709
2021-01-04 16:18:36 +01:00
Philip Paeps b6d54565c2 share/zoneinfo: fix minor documentation nit
The `git tag` command wants a tag name.
2020-12-30 21:23:17 +08:00
Philip Paeps 24c7311bff share/zoneinfo: update import documentation for Git
Document the steps needed to import and MFC new versions of tzdata now
that FreeBSD has moved from Subversion to Git.
2020-12-26 10:55:57 +08:00
Xin LI f5b7695d2d Always install backward compatibility timezones, as they are installed
on all major Linux distributions as well as NetBSD and OpenBSD.

Remove the undocumented ZONEINFO_OLD_TIMEZONES_SUPPORT and the deprecated
OLDTIMEZONES knobs as they are now the default.

Reviewed by:		ngie, rgrimes
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D24306
2020-04-09 05:11:18 +00:00
Thomas Munro 513419f404 tzsetup: upgrade to zone1970.tab
zone.tab is deprecated.  Install zone1970.tab alongside it, and use it
for tzsetup(8).  This is also useful for other applications that need
the modern better maintained file.

Reviewed by: philip
Approved by: allanjude (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20646
2019-07-17 06:17:27 +00:00
Enji Cooper da5069e1f7 Update the spelling of my name
Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji
instead for clarity.

While here, remove "All Rights Reserved" from copyrights I "own".

MFC after:	1 week
2019-04-22 17:52:46 +00:00
Warner Losh 8162ec9b35 We don't actually need env here, so drop it. All shells allow setting
of shell variables for the next command like this.
2018-02-09 15:50:32 +00:00
Warner Losh 3182fd63c4 Avoid find -s, use find | sort instead.
find -s was introduced to make the metalog more
deterministic. However, find -s is not portable. find | sort is
portable and accomplishes the same goals, even if it isn't
pedantically the same. TZS is the same before / after the change so
any fussy differences between the two are moot and there won't be
METALOG churn across this change.

Differential Revision: https://reviews.freebsd.org/D14231
2018-02-06 23:12:16 +00:00
Bryan Drewery 3806950135 DIRDEPS_BUILD: Connect new directories.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:04:07 +00:00
Enji Cooper d511b20a69 Add HAS_TESTS to all Makefiles that are currently using the
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
2017-08-02 08:50:42 +00:00
Enji Cooper 4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Enji Cooper f37852c173 Add tests to help verify Links functionality for .../contrib/tzdata/backwards
MFC after:	1 month
MFC with:	r320702
2017-07-06 04:30:06 +00:00
Enji Cooper c5cba06079 Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as
`MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and
`MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`.

Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility,
but print out a warning notifying users that they should use the new
variables, in an effort to migrate them to the variables. This is being
done mostly for automated build tools, etc, that might rely on these
variables being set. The variables will be removed in the future on
^/head, e.g., after ^/stable/12 is cut.

MFC after:      1 month
Relnotes:       yes
Reviewed by:	bdrewery
Differential Revision:	D11376
2017-07-06 04:19:33 +00:00
Cy Schubert ad6481dddc Allow parallel installworld (-j N) and poudriere installworld
(poudriere jail -c and poudriere jail -u) to proceed.

Reviewed by:	trasz@
Tested by:	trasz@, cy@
MFC after:	1 month
X-MFC-with:	r320362
2017-06-28 19:05:04 +00:00
Edward Tomasz Napierala 1621f5fe16 Provide visual feedback when timezone files are installed.
After r320003 it wasn't being shown in any way.

Submitted by:	bdrewery
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D11154
2017-06-26 15:40:24 +00:00
Edward Tomasz Napierala 05f3dec72e Don't print all timezones during installworld.
Submitted by:	Alex Richardson <alr48@cl.cam.ac.uk>
Reviewed by:	gjb
MFC after:	1 month
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11154
2017-06-16 14:19:23 +00:00
Enji Cooper e44885ac01 share: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-04 11:26:40 +00:00
Julian Elischer 9d7c990f62 If you are going to be run individually to make a new timezone set
then ensure the destination directories exist.
Especially if you define OLDTIMEZONES because the mtree pass
doesn't do it for you.

MFC after:	1 week
Sponsored by:	Panzura
2016-12-22 18:30:29 +00:00
Julian Elischer 06723a8e57 When you select make OLDTIMEZONES=1 then you need a few added directories
to be made or the command fails

Sponsored by:	panzura
2016-11-15 06:37:44 +00:00
Glen Barber 86bd190ce9 Reimplement r301944 using the correct install(1) invocation, which again
fixes packaging tzdata/zoneinfo.

Thank you to hrs for the pointer on what I did incorrectly.

Approved by:	re (blanket, pkgbase)
Sponsored by:	The FreeBSD Foundation
2016-06-16 13:34:20 +00:00
Glen Barber 5647bfaab0 Revert r301944, which apparently broke zoneinfo install during
installworld (although I am not sure why).  I'll revisit this
change after I further understand the cause of the breakage.

Thanks to our secret canary (dhw) for the report.

Approved by:	re (blanket, pkgbase)
Sponsored by:	The FreeBSD Foundation
2016-06-16 11:55:24 +00:00
Glen Barber a71f05bcf0 Fix zoneinfo file packaging.
This change fixes 468 of 488 zoneinfo file packaging issues,
the rest still to be investigated.

Approved by:	re (blanket, pkgbase)
Sponsored by:	The FreeBSD Foundation
2016-06-16 03:00:10 +00:00
Bryan Drewery 94086cea27 Rework META_TARGETS so that it automatically adds META_DEPS to the targets.
This will only be done if the target is defined, so if the target is
defined after bsd.sys.mk is included then it needs to manually add
${META_DEPS} still.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:04:42 +00:00
Bryan Drewery b7d28aff10 META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE.
Extend it to other cases of meta mode cookies so they get the proper rm
cookie behavior when a .meta file detects it needs to rebuild and fails.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:28 +00:00
Bryan Drewery bffd819972 DIRDEPS_BUILD: Reduce restaging here.
This also fixes meta tracking for the beforeinstall since it had been
marked .PHONY before (in bsd.sys.mk).

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:20 +00:00
Bryan Drewery 5e8745cc86 DIRDEPS_BUILD: Fix building during dirdeps.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:17 +00:00
Enji Cooper 9b209ed23e Install share/zoneinfo in a deterministic way by sorting the results from find
This helps produce deterministic METALOG output

PR: 200674
Submitted by: Fabian Keil <fk@fabiankeil.de>
Reviewed by: emaste
MFC after: 1 week
Obtained from: ElectroBSD
2015-10-17 09:26:16 +00:00
Xin LI 1bb0c0bd8d Fix build when LEAPSECONDS is enabled.
MFC after:	2 weeks
2015-08-22 07:41:28 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Ed Maste e527e84592 Avoid ./ in zoneinfo entries in METALOG
Use of "find ." resulted in METALOG entries with an extra ./ -- e.g.,
./usr/share/zoneinfo/./America/Toronto.  Avoid this by using globbing
via "find *" instead.

Reviewed by:	brooks
Sponsored by:	DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D719
2014-09-03 18:51:33 +00:00
Sergey Kandaurov 1a326e5730 Fix comments on updating tzdata releases. 2014-08-27 19:34:49 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Brooks Davis 22c2069fc3 Use find -exec to install zoneinfo instead of requiring xargs to be an
install tool.

Suggested by:	delphij
2013-01-11 18:37:51 +00:00
Brooks Davis 78e832b82d Rather than using zic to both compile and install zoneinfo files,
generate the files during the build and install them with install(1).
This was the one place in installworld where files (vs links) were
installed by a tool other than install.

Reviewed by:	edwin, jilles
2013-01-10 19:46:08 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Edwin Groothuis b92fc60991 Officially speaking, the zoneinfo data files are contributed data.
Therefore treat them as such.
2010-02-25 06:44:16 +00:00
Norikatsu Shigemura 4bca136727 Fix a installation issue with $DESTDIR.
Approved by:	imp (mentor)
2010-02-11 15:34:54 +00:00