svn commit: r368754 - head/tools/tools/locale
Author: yuripv Date: Fri Dec 18 08:43:06 2020 New Revision: 368754 URL: https://svnweb.freebsd.org/changeset/base/368754 Log: tools/tools/locale: fix static-colldef Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile == --- head/tools/tools/locale/MakefileFri Dec 18 08:40:33 2020 (r368753) +++ head/tools/tools/locale/MakefileFri Dec 18 08:43:06 2020 (r368754) @@ -126,9 +126,8 @@ build-colldef: static-colldef static-colldef: .for area enc in ${COLLATION_SPECIAL} -colldef.draft/${area}.${enc}.src: posix/${area}.${enc}.src awk -f ${TOOLSDIR}/extract-colldef.awk \ - ${.ALLSRC} > ${.TARGET} || (rm -f ${.TARGET} && false) + posix/${area}.${enc}.src > colldef.draft/${area}.${enc}.src .endfor BASE_LOCALES_OF_INTEREST?= \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368750 - head/tools/tools/locale
Author: yuripv Date: Fri Dec 18 04:01:05 2020 New Revision: 368750 URL: https://svnweb.freebsd.org/changeset/base/368750 Log: tools/tools/locale: install generated files in current src checkout Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile == --- head/tools/tools/locale/MakefileFri Dec 18 03:46:50 2020 (r368749) +++ head/tools/tools/locale/MakefileFri Dec 18 04:01:05 2020 (r368750) @@ -11,7 +11,7 @@ .error Do make obj first. .endif -LOCALESRCDIR?= ${DESTDIR}/usr/src/share +LOCALESRCDIR?= ${SRCTOP}/share TMPDIR?= /tmp BASEDIR= ${.CURDIR} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368711 - head/lib/libc/locale
Author: yuripv Date: Thu Dec 17 02:33:52 2020 New Revision: 368711 URL: https://svnweb.freebsd.org/changeset/base/368711 Log: nl_langinfo(3): document recognized item names While here, remove .Tn macro usage (prompted by mandoc lint). PR: 251468 Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D27606 Modified: head/lib/libc/locale/nl_langinfo.3 Modified: head/lib/libc/locale/nl_langinfo.3 == --- head/lib/libc/locale/nl_langinfo.3 Thu Dec 17 00:20:57 2020 (r368710) +++ head/lib/libc/locale/nl_langinfo.3 Thu Dec 17 02:33:52 2020 (r368711) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2012 +.Dd December 14, 2020 .Dt NL_LANGINFO 3 .Os .Sh NAME @@ -46,10 +46,6 @@ the particular language or cultural area defined in th locale, or in the case of .Fn nl_langinfo_l , the locale passed as the second argument. -The manifest constant names and values of -.Fa item -are defined in -.In langinfo.h . .Pp Calls to .Fn setlocale @@ -59,12 +55,102 @@ or to the category .Dv LC_ALL , may overwrite the buffer pointed to by the return value. +.Pp +The manifest constant names and values of +.Fa item +are defined in +.In langinfo.h . +.Pp +The following standard constants are recognized: +.Bl -column "Constant" "Category" +.It Sy Constant Ta Sy Category Ta Sy Description +.It Dv CODESET Ta Dv LC_CTYPE Ta codeset name +.It Dv D_T_FMT Ta Dv LC_TIME Ta string for formatting date and time +.It Dv D_FMT Ta Dv LC_TIME Ta date format string +.It Dv T_FMT Ta Dv LC_TIME Ta time format string +.It Dv T_FMT_AMPM Ta Dv LC_TIME Ta a.m. or p.m. time format string +.It Dv AM_STR Ta Dv LC_TIME Ta ante-meridiem affix +.It Dv PM_STR Ta Dv LC_TIME Ta post-meridiem affix +.It Dv DAY_1 Ta Dv LC_TIME Ta name of the first day of the week +.It Dv DAY_2 Ta Dv LC_TIME Ta name of the second day of the week +.It Dv DAY_3 Ta Dv LC_TIME Ta name of the third day of the week +.It Dv DAY_4 Ta Dv LC_TIME Ta name of the fourth day of the week +.It Dv DAY_5 Ta Dv LC_TIME Ta name of the fifth day of the week +.It Dv DAY_6 Ta Dv LC_TIME Ta name of the sixth day of the week +.It Dv DAY_7 Ta Dv LC_TIME Ta name of the seventh day of the week +.It Dv ABDAY_1 Ta Dv LC_TIME Ta abbreviated name of the first day of the week +.It Dv ABDAY_2 Ta Dv LC_TIME Ta abbreviated name of the second day of the week +.It Dv ABDAY_3 Ta Dv LC_TIME Ta abbreviated name of the third day of the week +.It Dv ABDAY_4 Ta Dv LC_TIME Ta abbreviated name of the fourth day of the week +.It Dv ABDAY_5 Ta Dv LC_TIME Ta abbreviated name of the fifth day of the week +.It Dv ABDAY_6 Ta Dv LC_TIME Ta abbreviated name of the sixth day of the week +.It Dv ABDAY_7 Ta Dv LC_TIME Ta abbreviated name of the seventh day of the week +.It Dv MON_1 Ta Dv LC_TIME Ta name of the first month of the year +.It Dv MON_2 Ta Dv LC_TIME Ta name of the second month +.It Dv MON_3 Ta Dv LC_TIME Ta name of the third month +.It Dv MON_4 Ta Dv LC_TIME Ta name of the fourth month +.It Dv MON_5 Ta Dv LC_TIME Ta name of the fifth month +.It Dv MON_6 Ta Dv LC_TIME Ta name of the sixth month +.It Dv MON_7 Ta Dv LC_TIME Ta name of the seventh month +.It Dv MON_8 Ta Dv LC_TIME Ta name of the eighth month +.It Dv MON_9 Ta Dv LC_TIME Ta name of the ninth month +.It Dv MON_10 Ta Dv LC_TIME Ta name of the tenth month +.It Dv MON_11 Ta Dv LC_TIME Ta name of the eleventh month +.It Dv MON_12 Ta Dv LC_TIME Ta name of the twelfth month +.It Dv ABMON_1 Ta Dv LC_TIME Ta abbreviated name of the first month +.It Dv ABMON_2 Ta Dv LC_TIME Ta abbreviated name of the second month +.It Dv ABMON_3 Ta Dv LC_TIME Ta abbreviated name of the third month +.It Dv ABMON_4 Ta Dv LC_TIME Ta abbreviated name of the fourth month +.It Dv ABMON_5 Ta Dv LC_TIME Ta abbreviated name of the fifth month +.It Dv ABMON_6 Ta Dv LC_TIME Ta abbreviated name of the sixth month +.It Dv ABMON_7 Ta Dv LC_TIME Ta abbreviated name of the seventh month +.It Dv ABMON_8 Ta Dv LC_TIME Ta abbreviated name of the eighth month +.It Dv ABMON_9 Ta Dv LC_TIME Ta abbreviated name of the ninth month +.It Dv ABMON_10 Ta Dv LC_TIME Ta abbreviated name of the tenth month +.It Dv ABMON_11 Ta Dv LC_TIME Ta abbreviated name of the eleventh month +.It Dv ABMON_12 Ta Dv LC_TIME Ta abbreviated name of the twelfth month +.It Dv ERA Ta Dv LC_TIME Ta era description segments +.It Dv ERA_D_FMT Ta Dv LC_TIME Ta era date format string +.It Dv ERA_D_T_FMT Ta Dv LC_TIME Ta era date and time format string +.It Dv ERA_T_FMT Ta Dv LC_TIME Ta era time format string +.It Dv ALT_DIGITS Ta Dv LC_TIME Ta alternative symbols for digits +.It Dv RADIXCHAR Ta Dv LC_NUMERIC Ta radix character +.It Dv THOUSEP Ta Dv LC_NUMERIC Ta separator for thousands +.It Dv YESEXPR Ta Dv LC_MESSAGES Ta affirmative response extended regular +expression +.It Dv NOEXPR Ta Dv LC_MESSAGES Ta negative response extended regular expression +.It Dv CRNCYSTR Ta Dv LC_MONETARY
svn commit: r368619 - in stable/12/tools/tools/locale: . etc/final-maps tools
Author: yuripv Date: Sun Dec 13 22:25:54 2020 New Revision: 368619 URL: https://svnweb.freebsd.org/changeset/base/368619 Log: MFC r368390: update wcwidth data from utf8proc Character width data being out of date is a constant source of weird rendering issues and wasted time trying to diagnose those, e.g. as reported by Jeremy Chadwick: https://gitlab.com/muttmua/mutt/-/issues/67 Sadly, there is no real ("standard") wcwidth data source, so this tries to rectify the problem using the utf8proc one (through its C API) which would hopefully benefeat both FreeBSD and utf8proc through bug reports (if any). PR: 251767 Added: stable/12/tools/tools/locale/tools/getwidths.c - copied unchanged from r368390, head/tools/tools/locale/tools/getwidths.c stable/12/tools/tools/locale/tools/mkwidths.pl - copied unchanged from r368390, head/tools/tools/locale/tools/mkwidths.pl Modified: stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/README stable/12/tools/tools/locale/etc/final-maps/widths.txt (contents, props changed) Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/locale/Makefile == --- stable/12/tools/tools/locale/Makefile Sun Dec 13 21:32:20 2020 (r368618) +++ stable/12/tools/tools/locale/Makefile Sun Dec 13 22:25:54 2020 (r368619) @@ -224,7 +224,7 @@ posix/${enc}.cm: .for area in ${BASE_LOCALES_OF_INTEREST} posixsrc: build-tools posix/${area}.UTF-8.src .ORDER: build-tools posix/${area}.UTF-8.src -posix/${area}.UTF-8.src: +posix/${area}.UTF-8.src: mkdir -p posix && \ ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ -d posix -m ${area} -c UTF-8 @@ -237,5 +237,21 @@ posix/${area}.${encoding}.src: ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ -d posix -m ${area} -c ${encoding} .endfor + +# generate widths.txt using the data from libut8proc +GETWIDTHS=${TOOLSDIR}/getwidths +MKWIDTHS=${TOOLSDIR}/mkwidths.pl +WIDTHS=${ETCDIR}/final-maps/widths.txt + +U8CFLAGS!=pkgconf --cflags libutf8proc +U8LIBS!=pkgconf --libs libutf8proc +CFLAGS+=${U8CFLAGS} +LDFLAGS+=${U8LIBS} + +CLEANFILES+=${TOOLSDIR}/getwidths + +widths:${WIDTHS} +${WIDTHS}: posixcm ${GETWIDTHS} + ${GETWIDTHS} | ${MKWIDTHS} ${.OBJDIR}/posix/UTF-8.cm ${.TARGET} .include Modified: stable/12/tools/tools/locale/README == --- stable/12/tools/tools/locale/README Sun Dec 13 21:32:20 2020 (r368618) +++ stable/12/tools/tools/locale/README Sun Dec 13 22:25:54 2020 (r368619) @@ -55,4 +55,8 @@ Targets: make install Install the build results into $LOCALESRCDIR. + + make widths + Generate widths.txt. Requires pkgconf and utf8proc + packages to be installed. [EOF] Modified: stable/12/tools/tools/locale/etc/final-maps/widths.txt == --- stable/12/tools/tools/locale/etc/final-maps/widths.txt Sun Dec 13 21:32:20 2020(r368618) +++ stable/12/tools/tools/locale/etc/final-maps/widths.txt Sun Dec 13 22:25:54 2020(r368619) @@ -1,26 +1,73 @@ -# -# Width Table. Credit for the input into this table, which is derived from -# the Unicode standards, is due to Markus Kuhn's implementation of wcwidth -# which can be found at http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c -# -# Some key differences: The numbers here are translated to the values found -# in the UTF-8 character map, and where symbolic names are missing for -# values from that table, we have omitted the values here. This means that -# characters which lack a symbolic name but are not 1 screen column wide -# are going to be mis-handled. This emphasizes the importance of having -# symbolic names for all characters that are to be handled properly. -# -# Also, to support use with different encodings, we avoid the use of ranges -# as some encodings may not have the same contiguous ranges as stock Unicode. -# -# This table must be processed *after* the charmap, as the symbolic names -# need to be defined there. -# -# Everything after this comment was generated automatically using the -# the mkwidths.py python script. To make corrections, fix the widths-0.txt -# or widths-2.txt files, and re-run mkwidths.py. But preserve this header. -# +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# utf8proc 2.5.0. +# - WIDTH + 0 + 0 +0 + 0 + 0 + 0 + 0 +0 +0 + 0 + 0 + 0 +0 + 0 +0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +0 + 0 +0
Re: svn commit: r368606 - head/usr.bin/calendar
Stefan Eßer wrote: Author: se Date: Sun Dec 13 09:38:50 2020 New Revision: 368606 URL: https://svnweb.freebsd.org/changeset/base/368606 Log: Fix WITHOUT_ICONV build There was an unprotected use of nl_langinfo() to determine the order of day vs. month in the generated output. That's strange, nl_langinfo() is standard and its visibility should not (and does not?) depend on WITH/WITHOUT_ICONV. May be just move langinfo.h include outside of "#ifdef WITH_ICONV" block? When building without ICONV support, the order will be: month, day. Modified: head/usr.bin/calendar/events.c Modified: head/usr.bin/calendar/events.c == --- head/usr.bin/calendar/events.c Sun Dec 13 05:34:14 2020 (r368605) +++ head/usr.bin/calendar/events.c Sun Dec 13 09:38:50 2020 (r368606) @@ -202,9 +202,13 @@ event_print_all(FILE *fp) struct event *e; struct tm tm; char dbuf[80]; +#ifdef WITH_ICONV static int d_first; d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); +#else +#defined_first 0 +#endif while (walkthrough_dates() != 0) { if (e) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368601 - in stable/12/tools/tools/locale: . etc/final-maps patch tools
Author: yuripv Date: Sun Dec 13 01:44:52 2020 New Revision: 368601 URL: https://svnweb.freebsd.org/changeset/base/368601 Log: MFC r353491 by eugen: Add missing port to the list of needed tools in the README file describing locale rebuild process: devel/apache-ant MFC r353791: tools/tools/locale: allow POSIX target to be built in parallel While it's rarely used target, more so a one not used during the buildworld, it helps when it's not taking hours (literally). MFC r364245 by hrs: - Update to Unicode CLDR v35 (Unicode 12.0). - Update tools/tools/locale to add make targets to automatically generate locale source files. With this change, just typing "make obj && make -j4" will rebuild them. Check README for more details. - Fix issues in ja_JP ctypedef and range specification support in utf8-rollup.pl. - Add a temporary patch for UnicodeData.txt to fix code ranges of CJK Ideograph Extension A and Extension B. - tools/cldr2def.pl: Use eucJP for ja_JP ctypedef because eucJP is not compatible with UTF-8. - tools/convert_map.pl: Add a verbose error message. - tools/utf8-rollup.pl: Normalize entries to use Unicode, not UTF-8. MFC r368404 by hrs: Fix the source directory when installing the results. The install target did not install them actually. Added: stable/12/tools/tools/locale/patch/ - copied from r364245, head/tools/tools/locale/patch/ Modified: stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/README stable/12/tools/tools/locale/etc/final-maps/map.UTF-8 stable/12/tools/tools/locale/tools/cldr2def.pl stable/12/tools/tools/locale/tools/convert_map.pl stable/12/tools/tools/locale/tools/finalize stable/12/tools/tools/locale/tools/utf8-rollup.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/locale/Makefile == --- stable/12/tools/tools/locale/Makefile Sun Dec 13 00:04:30 2020 (r368600) +++ stable/12/tools/tools/locale/Makefile Sun Dec 13 01:44:52 2020 (r368601) @@ -7,19 +7,30 @@ # # Modified by John Marino to suit DragonFly needs # +.if ${.CURDIR} == ${.OBJDIR} +.error Do make obj first. +.endif -.OBJDIR: . +LOCALESRCDIR?= ${DESTDIR}/usr/src/share +TMPDIR?= /tmp -.if !defined(UNIDIR) -.error UNIDIR is not set -.endif -PASSON=UNIDIR="${UNIDIR}" +BASEDIR= ${.CURDIR} +ETCDIR=${BASEDIR}/etc +TOOLSDIR= ${BASEDIR}/tools +PATCHDIR= ${BASEDIR}/patch +UNIDIR=${.OBJDIR:tA}/unicode -ETCDIR=${.CURDIR}/etc +PKGS= openjdk8 \ + apache-ant \ + p5-XML-Parser \ + p5-Tie-IxHash \ + p5-Text-Iconv +tools-test: + pkg info -e ${PKGS} + @echo tools ok. KNOWN= monetdef numericdef msgdef colldef ctypedef # timedef TYPES?=${KNOWN} -LOCALE_DESTDIR?= /tmp/generated-locales/ COLLATION_SPECIAL?= \ cs_CZ ISO8859-2 \ @@ -44,67 +55,82 @@ COLLATION_SPECIAL?= \ .for area enc in ${COLLATION_SPECIAL} COLLATIONS_SPECIAL_ENV+= ${area}.${enc} .endfor -PASSON+= COLLATIONS_SPECIAL="${COLLATIONS_SPECIAL_ENV}" +SETENV=env -i \ + PATH="${PATH}" \ + TMPDIR="${TMPDIR}" \ + COLLATIONS_SPECIAL="${COLLATIONS_SPECIAL_ENV}" \ + UNIDIR="${UNIDIR}" \ + BASEDIR="${BASEDIR}" \ + TOOLSDIR="${TOOLSDIR}" \ + ETCDIR="${ETCDIR}" -all: +all: posix build afterbuild +.ORDER: posix build afterbuild + +afterbuild: build + @echo "" + @find . -name *failed + .for t in ${TYPES} . if ${KNOWN:M${t}} - test -d ${t} || mkdir ${t} - make build-${t} +build: build-${t} +.ORDER: build-${t} afterbuild . endif .endfor - @echo "" - @find . -name *failed +diff: .for t in ${TYPES} +. if ${KNOWN:M${t}} +diff: diff-${t} +diff-${t}: + -/usr/bin/diff -ruN -x Makefile -x Makefile.depend \ + ${LOCALESRCDIR}/${t} ${t} +. endif +.endfor + +install: +.for t in ${TYPES} +. if ${KNOWN:M${t}} install: install-${t} install-${t}: -. if ${KNOWN:M${t}} - rm -rf ${.CURDIR}/${t}.draft - rm -f ${.CURDIR}/../../../share/${t}/Makefile - rm -f ${.CURDIR}/../../../share/${t}/*.src - mv ${.CURDIR}/${t}/* ${.CURDIR}/../../../share/${t}/ + cd ${LOCALESRCDIR}/${t} && \ + rm -f Makefile *.src && \ + cd ${.OBJDIR} && \ + install -c ${t}/* ${LOCALESRCDIR}/${t} . endif .endfor post-install: .for t in ${TYPES} . if ${KNOWN:M${t}} - (cd ${.CURDIR}/../../../share/${t} && \ - make && make install && make clean) + cd ${LOCALSRCDIR}/${t} && \ + make && make install && make clean . endif .endfor .for t in ${TYPES} -gen-${t}: - mkdir -p ${t} ${t}.draft - perl -I tools tools/cldr2def.pl \ -
svn commit: r368598 - head/tools/tools/locale
Author: yuripv Date: Sat Dec 12 23:41:47 2020 New Revision: 368598 URL: https://svnweb.freebsd.org/changeset/base/368598 Log: locale: fix mode for installed files to be 644, not 755 While here, drop '-c' flag to install as it's default and provided for backward compatibility only. Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile == --- head/tools/tools/locale/MakefileSat Dec 12 23:01:11 2020 (r368597) +++ head/tools/tools/locale/MakefileSat Dec 12 23:41:47 2020 (r368598) @@ -96,7 +96,7 @@ install-${t}: cd ${LOCALESRCDIR}/${t} && \ rm -f Makefile *.src && \ cd ${.OBJDIR} && \ - install -c ${t}/* ${LOCALESRCDIR}/${t} + install -m 644 ${t}/* ${LOCALESRCDIR}/${t} . endif .endfor ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368594 - in stable/12: etc/mtree share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale tools/tools/locale/etc
Author: yuripv Date: Sat Dec 12 22:47:57 2020 New Revision: 368594 URL: https://svnweb.freebsd.org/changeset/base/368594 Log: MFC r340992: Add ga_IE.UTF-8 locale. PR: 228587 Submitted by: Micil (LC_TIME) Added: stable/12/share/monetdef/ga_IE.UTF-8.src - copied unchanged from r340992, head/share/monetdef/ga_IE.UTF-8.src stable/12/share/msgdef/ga_IE.UTF-8.src - copied unchanged from r340992, head/share/msgdef/ga_IE.UTF-8.src stable/12/share/timedef/ga_IE.UTF-8.src - copied unchanged from r340992, head/share/timedef/ga_IE.UTF-8.src Deleted: stable/12/share/monetdef/en_IE.UTF-8.src Modified: stable/12/etc/mtree/BSD.usr.dist stable/12/share/colldef/Makefile stable/12/share/ctypedef/Makefile stable/12/share/monetdef/Makefile stable/12/share/msgdef/Makefile stable/12/share/numericdef/Makefile stable/12/share/timedef/Makefile stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/etc/charmaps.xml Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.usr.dist == --- stable/12/etc/mtree/BSD.usr.distSat Dec 12 22:23:45 2020 (r368593) +++ stable/12/etc/mtree/BSD.usr.distSat Dec 12 22:47:57 2020 (r368594) @@ -665,6 +665,8 @@ .. fr_FR.UTF-8 .. +ga_IE.UTF-8 +.. he_IL.UTF-8 .. hi_IN.ISCII-DEV Modified: stable/12/share/colldef/Makefile == --- stable/12/share/colldef/MakefileSat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/colldef/MakefileSat Dec 12 22:47:57 2020 (r368594) @@ -184,6 +184,7 @@ SAME+= en_US.UTF-8 nl_NL.UTF-8 SAME+= en_US.UTF-8 nl_BE.UTF-8 SAME+= en_US.UTF-8 it_IT.UTF-8 SAME+= en_US.UTF-8 it_CH.UTF-8 +SAME+= en_US.UTF-8 ga_IE.UTF-8 SAME+= en_US.UTF-8 fr_FR.UTF-8 SAME+= en_US.UTF-8 fr_CH.UTF-8 SAME+= en_US.UTF-8 fr_BE.UTF-8 Modified: stable/12/share/ctypedef/Makefile == --- stable/12/share/ctypedef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/ctypedef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -82,6 +82,7 @@ SAME+=C.UTF-8 hu_HU.UTF-8 SAME+= C.UTF-8 hr_HR.UTF-8 SAME+= C.UTF-8 hi_IN.UTF-8 SAME+= C.UTF-8 he_IL.UTF-8 +SAME+= C.UTF-8 ga_IE.UTF-8 SAME+= C.UTF-8 fr_FR.UTF-8 SAME+= C.UTF-8 fr_CH.UTF-8 SAME+= C.UTF-8 fr_CA.UTF-8 Modified: stable/12/share/monetdef/Makefile == --- stable/12/share/monetdef/Makefile Sat Dec 12 22:23:45 2020 (r368593) +++ stable/12/share/monetdef/Makefile Sat Dec 12 22:47:57 2020 (r368594) @@ -31,7 +31,6 @@ LOCALES+= en_GB.US-ASCII LOCALES+= en_GB.UTF-8 LOCALES+= en_IE.ISO8859-1 LOCALES+= en_IE.ISO8859-15 -LOCALES+= en_IE.UTF-8 LOCALES+= en_NZ.UTF-8 LOCALES+= en_PH.UTF-8 LOCALES+= en_SG.UTF-8 @@ -47,6 +46,7 @@ LOCALES+= fr_CA.UTF-8 LOCALES+= fr_CH.ISO8859-15 LOCALES+= fr_CH.UTF-8 LOCALES+= fr_FR.UTF-8 +LOCALES+= ga_IE.UTF-8 LOCALES+= he_IL.UTF-8 LOCALES+= hi_IN.ISCII-DEV LOCALES+= hi_IN.UTF-8 @@ -156,6 +156,7 @@ SAME+= en_CA.UTF-8 en_CA.ISO8859-1 SAME+= en_GB.ISO8859-15 en_GB.ISO8859-1 SAME+= zh_HK.UTF-8 en_HK.UTF-8 SAME+= zh_HK.UTF-8 en_HK.ISO8859-1 +SAME+= ga_IE.UTF-8 en_IE.UTF-8 SAME+= en_NZ.UTF-8 en_NZ.US-ASCII SAME+= en_NZ.UTF-8 en_NZ.ISO8859-15 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-1 Copied: stable/12/share/monetdef/ga_IE.UTF-8.src (from r340992, head/share/monetdef/ga_IE.UTF-8.src) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/monetdef/ga_IE.UTF-8.srcSat Dec 12 22:47:57 2020 (r368594, copy of r340992, head/share/monetdef/ga_IE.UTF-8.src) @@ -0,0 +1,50 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# - +# +# int_curr_symbol (last character always SPACE) +EUR +# +# currency_symbol +€ +# +# mon_decimal_point +. +# +# mon_thousands_sep +, +# +# mon_grouping +3 +# +# positive_sign + +# +# negative_sign +- +# +# int_frac_digits +2 +# +# frac_digits +2 +# +# p_cs_precedes +1 +# +# p_sep_by_space +0 +# +# n_cs_precedes +1 +# +# n_sep_by_space +0 +# +# p_sign_posn +1 +# +# n_sign_posn +1 +# EOF
svn commit: r368580 - head/usr.bin/xargs
Author: yuripv Date: Sat Dec 12 15:38:32 2020 New Revision: 368580 URL: https://svnweb.freebsd.org/changeset/base/368580 Log: xargs: compile yesexpr as ERE yesexpr is an extended regular expression for quite some time now, use appropriate flag when compiling it. PR: 238762 Reviewed by: kevans Differential Revision:https://reviews.freebsd.org/D27509 Modified: head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.c == --- head/usr.bin/xargs/xargs.c Sat Dec 12 14:53:34 2020(r368579) +++ head/usr.bin/xargs/xargs.c Sat Dec 12 15:38:32 2020(r368580) @@ -782,7 +782,7 @@ prompt(void) (void)fprintf(stderr, "?..."); (void)fflush(stderr); if ((response = fgetln(ttyfp, )) == NULL || - regcomp(, nl_langinfo(YESEXPR), REG_BASIC) != 0) { + regcomp(, nl_langinfo(YESEXPR), REG_EXTENDED) != 0) { (void)fclose(ttyfp); return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368438 - stable/12/usr.bin/awk
Author: yuripv Date: Tue Dec 8 08:20:30 2020 New Revision: 368438 URL: https://svnweb.freebsd.org/changeset/base/368438 Log: MFC r362147: awk(1): use -version instead of -V -V is OpenBSD specific, use -version instead. While here, fix issue reported by mandoc lint and drop nonexistent script(7) reference. PR: 247004 Modified: stable/12/usr.bin/awk/awk.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/awk/awk.1 == --- stable/12/usr.bin/awk/awk.1 Tue Dec 8 07:47:29 2020(r368437) +++ stable/12/usr.bin/awk/awk.1 Tue Dec 8 08:20:30 2020(r368438) @@ -23,7 +23,7 @@ .\" THIS SOFTWARE. .\" .\"$FreeBSD$ -.Dd $Mdocdate: September 14 2015 $ +.Dd $Mdocdate: June 6 2020 $ .Dt AWK 1 .Os .Sh NAME @@ -32,7 +32,7 @@ .Sh SYNOPSIS .Nm awk .Op Fl safe -.Op Fl V +.Op Fl version .Op Fl d Ns Op Ar n .Op Fl F Ar fs .Op Fl v Ar var Ns = Ns Ar value @@ -101,7 +101,7 @@ approximation to a .Dq safe version of .Nm . -.It Fl V +.It Fl version Print the version number of .Nm to standard output and exit. @@ -265,7 +265,7 @@ and concatenation .Pq indicated by whitespace . The operators .Ic \&! ++ \-\- += \-= *= /= %= ^= -.Ic > >= < <= == != ?: +.Ic > >= < <= == != ?\&: are also available in expressions. Variables may be scalars, array elements (denoted @@ -752,8 +752,7 @@ Print an error message to standard error: .Xr lex 1 , .Xr printf 1 , .Xr sed 1 , -.Xr re_format 7 , -.Xr script 7 +.Xr re_format 7 .Rs .%A A. V. Aho .%A B. W. Kernighan @@ -774,9 +773,10 @@ except does not support {n,m} pattern matching. .Pp The flags -.Op Fl \ +.Fl d , +.Fl safe , and -.Op Fl safe , +.Fl version as well as the commands .Cm fflush , compl , and , or , .Cm xor , lshift , rshift , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368437 - stable/12/share/timedef
Author: yuripv Date: Tue Dec 8 07:47:29 2020 New Revision: 368437 URL: https://svnweb.freebsd.org/changeset/base/368437 Log: MFC r340354: Use blank am_pm and t_fmt_ampm for de_AT and de_DE locales as apparently they use 24-hour clock notation. The visible change is that w(1) now uses 24-hour clock format as it checks for t_fmt_ampm presence. PR: 231771 Submitted by: Christoph Schönweiler Modified: stable/12/share/timedef/de_AT.ISO8859-15.src stable/12/share/timedef/de_AT.UTF-8.src stable/12/share/timedef/de_DE.ISO8859-15.src stable/12/share/timedef/de_DE.UTF-8.src Directory Properties: stable/12/ (props changed) Modified: stable/12/share/timedef/de_AT.ISO8859-15.src == --- stable/12/share/timedef/de_AT.ISO8859-15.srcTue Dec 8 04:18:16 2020(r368436) +++ stable/12/share/timedef/de_AT.ISO8859-15.srcTue Dec 8 07:47:29 2020(r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names J�n. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: stable/12/share/timedef/de_AT.UTF-8.src == --- stable/12/share/timedef/de_AT.UTF-8.src Tue Dec 8 04:18:16 2020 (r368436) +++ stable/12/share/timedef/de_AT.UTF-8.src Tue Dec 8 07:47:29 2020 (r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names Jän. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: stable/12/share/timedef/de_DE.ISO8859-15.src == --- stable/12/share/timedef/de_DE.ISO8859-15.srcTue Dec 8 04:18:16 2020(r368436) +++ stable/12/share/timedef/de_DE.ISO8859-15.srcTue Dec 8 07:47:29 2020(r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names Jan. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: stable/12/share/timedef/de_DE.UTF-8.src == --- stable/12/share/timedef/de_DE.UTF-8.src Tue Dec 8 04:18:16 2020 (r368436) +++ stable/12/share/timedef/de_DE.UTF-8.src Tue Dec 8 07:47:29 2020 (r368437) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names Jan. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368390 - in head/tools/tools/locale: . etc/final-maps tools
Author: yuripv Date: Sun Dec 6 16:44:41 2020 New Revision: 368390 URL: https://svnweb.freebsd.org/changeset/base/368390 Log: update wcwidth data from utf8proc Character width data being out of date is a constant source of weird rendering issues and wasted time trying to diagnose those, e.g. as reported by Jeremy Chadwick: https://gitlab.com/muttmua/mutt/-/issues/67 Sadly, there is no real ("standard") wcwidth data source, so this tries to rectify the problem using the utf8proc one (through its C API) which would hopefully benefeat both FreeBSD and utf8proc through bug reports (if any). Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D27259 Added: head/tools/tools/locale/tools/getwidths.c (contents, props changed) head/tools/tools/locale/tools/mkwidths.pl (contents, props changed) Modified: head/tools/tools/locale/Makefile head/tools/tools/locale/README head/tools/tools/locale/etc/final-maps/widths.txt (contents, props changed) Modified: head/tools/tools/locale/Makefile == --- head/tools/tools/locale/MakefileSun Dec 6 16:22:26 2020 (r368389) +++ head/tools/tools/locale/MakefileSun Dec 6 16:44:41 2020 (r368390) @@ -225,7 +225,7 @@ posix/${enc}.cm: .for area in ${BASE_LOCALES_OF_INTEREST} posixsrc: build-tools posix/${area}.UTF-8.src .ORDER: build-tools posix/${area}.UTF-8.src -posix/${area}.UTF-8.src: +posix/${area}.UTF-8.src: mkdir -p posix && \ ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ -d posix -m ${area} -c UTF-8 @@ -238,5 +238,21 @@ posix/${area}.${encoding}.src: ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ -d posix -m ${area} -c ${encoding} .endfor + +# generate widths.txt using the data from libut8proc +GETWIDTHS=${TOOLSDIR}/getwidths +MKWIDTHS=${TOOLSDIR}/mkwidths.pl +WIDTHS=${ETCDIR}/final-maps/widths.txt + +U8CFLAGS!=pkgconf --cflags libutf8proc +U8LIBS!=pkgconf --libs libutf8proc +CFLAGS+=${U8CFLAGS} +LDFLAGS+=${U8LIBS} + +CLEANFILES+=${TOOLSDIR}/getwidths + +widths:${WIDTHS} +${WIDTHS}: posixcm ${GETWIDTHS} + ${GETWIDTHS} | ${MKWIDTHS} ${.OBJDIR}/posix/UTF-8.cm ${.TARGET} .include Modified: head/tools/tools/locale/README == --- head/tools/tools/locale/README Sun Dec 6 16:22:26 2020 (r368389) +++ head/tools/tools/locale/README Sun Dec 6 16:44:41 2020 (r368390) @@ -55,4 +55,8 @@ Targets: make install Install the build results into $LOCALESRCDIR. + + make widths + Generate widths.txt. Requires pkgconf and utf8proc + packages to be installed. [EOF] Modified: head/tools/tools/locale/etc/final-maps/widths.txt == --- head/tools/tools/locale/etc/final-maps/widths.txt Sun Dec 6 16:22:26 2020(r368389) +++ head/tools/tools/locale/etc/final-maps/widths.txt Sun Dec 6 16:44:41 2020(r368390) @@ -1,26 +1,73 @@ -# -# Width Table. Credit for the input into this table, which is derived from -# the Unicode standards, is due to Markus Kuhn's implementation of wcwidth -# which can be found at http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c -# -# Some key differences: The numbers here are translated to the values found -# in the UTF-8 character map, and where symbolic names are missing for -# values from that table, we have omitted the values here. This means that -# characters which lack a symbolic name but are not 1 screen column wide -# are going to be mis-handled. This emphasizes the importance of having -# symbolic names for all characters that are to be handled properly. -# -# Also, to support use with different encodings, we avoid the use of ranges -# as some encodings may not have the same contiguous ranges as stock Unicode. -# -# This table must be processed *after* the charmap, as the symbolic names -# need to be defined there. -# -# Everything after this comment was generated automatically using the -# the mkwidths.py python script. To make corrections, fix the widths-0.txt -# or widths-2.txt files, and re-run mkwidths.py. But preserve this header. -# +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# utf8proc 2.5.0. +# - WIDTH + 0 + 0 +0 + 0 + 0 + 0 + 0 +0 +0 + 0 + 0 + 0 +0 + 0 +0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 +0 + 0 +0 + 0 + 0 + 0 + 0 +0 +0 + 0 + 0 + 0 + 0 +0 + 0 +0 + 0 + 0 + 0 + 0 + 0 + 0 +0 +0 + 0 + 0 +0 + 0 +
svn commit: r368288 - in stable/12: share/ctypedef tools/tools/locale/tools
Author: yuripv Date: Wed Dec 2 22:44:40 2020 New Revision: 368288 URL: https://svnweb.freebsd.org/changeset/base/368288 Log: MFC r353130: Mark "private use area" characters as printable. At least some of the characters in E000-F8FF range are used by Powerline fonts, and having no attributes for these ranges in UnicodeData.txt other than "Other, Private Use" it should be safe to mark all of them as printable. Some actually were before r340491, so this fixes the regression introduced there as well. PR: 240911 Reviewed by: bapt Tested by:Daniel Ponte Differential Revision:https://reviews.freebsd.org/D21850 Modified: stable/12/share/ctypedef/C.UTF-8.src stable/12/tools/tools/locale/tools/utf8-rollup.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/share/ctypedef/C.UTF-8.src == --- stable/12/share/ctypedef/C.UTF-8.srcWed Dec 2 21:53:28 2020 (r368287) +++ stable/12/share/ctypedef/C.UTF-8.srcWed Dec 2 22:44:40 2020 (r368288) @@ -16434,7 +16434,6 @@ cntrl ;/ ;/ ;/ ;/ - ;...;;/ ;/ ;/ ;/ @@ -16549,9 +16548,7 @@ cntrl ;/ ;/ ;/ ;/ - ;/ - ;...;;/ - ;...; + digit ;/ ;/ ;/ @@ -22555,6 +22552,7 @@ graph ;/ ;/ ;/ ;/ + ;...;;/ ;/ ;/ ;/ @@ -27547,7 +27545,9 @@ graph ;/ ;/ ;/ ;/ - + ;/ + ;...;;/ + ;...; lower ;/ ;/ ;/ Modified: stable/12/tools/tools/locale/tools/utf8-rollup.pl == --- stable/12/tools/tools/locale/tools/utf8-rollup.pl Wed Dec 2 21:53:28 2020(r368287) +++ stable/12/tools/tools/locale/tools/utf8-rollup.pl Wed Dec 2 22:44:40 2020(r368288) @@ -161,7 +161,8 @@ sub parse_unidata { $cat = "alpha"; } elsif ($d[2] =~ /^P/) { $cat = "punct"; - } elsif ($d[2] =~ /^M/ || $d[2] =~ /^N/ || $d[2] =~ /^S/) { + } elsif ($d[2] =~ /^Co/ || $d[2] =~ /^M/ || $d[2] =~ /^N/ || + $d[2] =~ /^S/) { $cat = "graph"; } elsif ($d[2] =~ /^C/) { $cat = "cntrl"; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368157 - head/share/man/man7
Author: yuripv Date: Sun Nov 29 16:29:40 2020 New Revision: 368157 URL: https://svnweb.freebsd.org/changeset/base/368157 Log: security(7): fix copy/paste error and correct aslr oids Submitted by: Mina Galić Differential Revision:https://reviews.freebsd.org/D27408 Modified: head/share/man/man7/security.7 Modified: head/share/man/man7/security.7 == --- head/share/man/man7/security.7 Sun Nov 29 16:22:33 2020 (r368156) +++ head/share/man/man7/security.7 Sun Nov 29 16:29:40 2020 (r368157) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2020 +.Dd November 28, 2020 .Dt SECURITY 7 .Os .Sh NAME @@ -1061,7 +1061,7 @@ position-independent (PIE) 32bit binaries. .It Dv kern.elf32.aslr.honor_sbrk Makes ASLR less aggressive and more compatible with old binaries relying on the sbrk area. -.It Dv kern.elf32.aslr.aslr_stack_gap +.It Dv kern.elf32.aslr.stack_gap If ASLR is enabled for a binary, a non-zero value creates a randomized stack gap between strings and the end of the aux vector. The value is the maximum percentage of main stack to waste on the gap. @@ -1072,7 +1072,7 @@ Cannot be greater than 50, i.e., at most half of the s 64bit PIE binaries ASLR control. .It Dv kern.elf64.aslr.honor_sbrk 64bit binaries ASLR sbrk compatibility control. -.It Dv kern.elf32.aslr.aslr_stack_gap +.It Dv kern.elf64.aslr.stack_gap Controls stack gap for 64bit binaries. .It Dv kern.elf32.nxstack Enables non-executable stack for 32bit processes. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r368140 - head/sys/x86/cpufreq
Author: yuripv Date: Sun Nov 29 01:43:04 2020 New Revision: 368140 URL: https://svnweb.freebsd.org/changeset/base/368140 Log: hwpstate_intel: don't unconditionally print the error message Actually check the wrmsr_safe() return value when setting autonomous HWP for package. PR: 245582 Differential Revision:https://reviews.freebsd.org/D24744 Modified: head/sys/x86/cpufreq/hwpstate_intel.c Modified: head/sys/x86/cpufreq/hwpstate_intel.c == --- head/sys/x86/cpufreq/hwpstate_intel.c Sun Nov 29 01:32:53 2020 (r368139) +++ head/sys/x86/cpufreq/hwpstate_intel.c Sun Nov 29 01:43:04 2020 (r368140) @@ -461,8 +461,10 @@ set_autonomous_hwp(struct hwp_softc *sc) * not exist." (Intel SDM §14.4.4) */ ret = wrmsr_safe(MSR_IA32_HWP_REQUEST_PKG, sc->req); - device_printf(dev, - "Failed to set autonomous HWP for package\n"); + if (ret) { + device_printf(dev, + "Failed to set autonomous HWP for package\n"); + } } out: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r363577 - in stable/12/usr.bin/locale: . tests
Author: yuripv Date: Sun Jul 26 19:18:55 2020 New Revision: 363577 URL: https://svnweb.freebsd.org/changeset/base/363577 Log: MFC r362146: locale: exit 1 if unknown keyword was specified PR: 241906 Submitted by: Akos Somfai Modified: stable/12/usr.bin/locale/locale.c stable/12/usr.bin/locale/tests/locale_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/locale/locale.c == --- stable/12/usr.bin/locale/locale.c Sun Jul 26 18:33:29 2020 (r363576) +++ stable/12/usr.bin/locale/locale.c Sun Jul 26 19:18:55 2020 (r363577) @@ -61,7 +61,7 @@ void list_locales(void); const char *lookup_localecat(int); char *kwval_lconv(int); intkwval_lookup(const char *, char **, int *, int *, int *); -void showdetails(const char *); +intshowdetails(const char *); void showkeywordslist(char *substring); void showlocale(void); void usage(void); @@ -414,7 +414,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); if (argc > 0) { while (argc > 0) { - showdetails(*argv); + if (showdetails(*argv) != 0) + exit(EXIT_FAILURE); argv++; argc--; } @@ -837,19 +838,16 @@ kwval_lookup(const char *kwname, char **kwval, int *ca * Show details about requested keyword according to '-k' and/or '-c' * command line options specified. */ -void +int showdetails(const char *kw) { int type, cat, tmpval, alloc; char*kwval; if (kwval_lookup(kw, , , , ) == 0) { - /* -* invalid keyword specified. -* XXX: any actions? -*/ + /* Invalid keyword specified */ fprintf(stderr, "Unknown keyword: `%s'\n", kw); - return; + return (1); } if (prt_categories) { @@ -889,6 +887,8 @@ showdetails(const char *kw) if (alloc) free(kwval); + + return (0); } /* Modified: stable/12/usr.bin/locale/tests/locale_test.sh == --- stable/12/usr.bin/locale/tests/locale_test.sh Sun Jul 26 18:33:29 2020(r363576) +++ stable/12/usr.bin/locale/tests/locale_test.sh Sun Jul 26 19:18:55 2020(r363577) @@ -160,8 +160,24 @@ no_flags_posix_body() noexpr } +atf_test_case k_flag_unknown_kw +k_flag_unknown_kw_head() +{ + atf_set "descr" \ + "Verify 'locale -k' exit status is '1' for unknown keywords" +} +k_flag_unknown_kw_body() +{ + export LC_ALL="C" + + # Hopefully the keyword will stay nonexistent + atf_check -s exit:1 -o empty -e ignore locale -k nonexistent +} + + atf_init_test_cases() { atf_add_test_case k_flag_posix atf_add_test_case no_flags_posix + atf_add_test_case k_flag_unknown_kw } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r363543 - in head/usr.bin/sed: . tests
Author: yuripv Date: Sun Jul 26 09:15:05 2020 New Revision: 363543 URL: https://svnweb.freebsd.org/changeset/base/363543 Log: sed: treat '[' as ordinary character in 'y' command 'y' does not handle bracket expressions, treat '[' as ordinary character and do not apply bracket expression checks (GNU sed agrees). PR: 247931 Reviewed by: pfg, kevans Tested by:antoine (exp-run), Quentin L'Hours Differential Revision:https://reviews.freebsd.org/D25640 Modified: head/usr.bin/sed/compile.c head/usr.bin/sed/tests/sed2_test.sh Modified: head/usr.bin/sed/compile.c == --- head/usr.bin/sed/compile.c Sun Jul 26 02:51:00 2020(r363542) +++ head/usr.bin/sed/compile.c Sun Jul 26 09:15:05 2020(r363543) @@ -437,11 +437,19 @@ compile_delimited(char *p, char *d, int is_tr) linenum, fname); while (*p) { if (*p == '[' && *p != c) { - if ((d = compile_ccl(, d)) == NULL) - errx(1, "%lu: %s: unbalanced brackets ([])", linenum, fname); - continue; + if (!is_tr) { + if ((d = compile_ccl(, d)) == NULL) { + errx(1, + "%lu: %s: unbalanced brackets ([])", + linenum, fname); + } + continue; + } } else if (*p == '\\' && p[1] == '[') { - *d++ = *p++; + if (is_tr) + p++; + else + *d++ = *p++; } else if (*p == '\\' && p[1] == c) { p++; } else if (*p == '\\' && Modified: head/usr.bin/sed/tests/sed2_test.sh == --- head/usr.bin/sed/tests/sed2_test.sh Sun Jul 26 02:51:00 2020 (r363542) +++ head/usr.bin/sed/tests/sed2_test.sh Sun Jul 26 09:15:05 2020 (r363543) @@ -134,6 +134,22 @@ commands_on_stdin_body() atf_check -o 'empty' sed -f - < insert_x } +atf_test_case bracket_y +bracket_y_head() +{ + atf_set "descr" "Verify '[' is ordinary character for 'y' command" +} +bracket_y_body() +{ + atf_check -e empty -o ignore echo | sed 'y/[/x/' + atf_check -e empty -o ignore echo | sed 'y/[]/xy/' + atf_check -e empty -o ignore echo | sed 'y/[a]/xyz/' + atf_check -e empty -o "inline:zyx" echo '][a' | sed 'y/[a]/xyz/' + atf_check -e empty -o "inline:bracket\n" echo 'bra[ke]' | sed 'y/[]/ct/' + atf_check -e empty -o "inline:bracket\n" \ + echo 'bra[ke]' | sed 'y[\[][ct[' +} + atf_init_test_cases() { atf_add_test_case inplace_command_q @@ -142,4 +158,5 @@ atf_init_test_cases() atf_add_test_case escape_subst atf_add_test_case commands_on_stdin atf_add_test_case hex_subst + atf_add_test_case bracket_y } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r363207 - head/usr.bin/top
Author: yuripv Date: Tue Jul 14 22:43:40 2020 New Revision: 363207 URL: https://svnweb.freebsd.org/changeset/base/363207 Log: top: VIS_SAFE turned out to be unsafe Unset VIS_SAFE flag as it turned out to be actually unsafe for continuos top display as it's passing through sequences resulting cursor movement (backspace, tab, carriage-return), and explicitly set VIS_TAB for the same reason. Reported by: Mark Millard , swills Tested by:Mark Millard , swills Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Tue Jul 14 22:25:06 2020(r363206) +++ head/usr.bin/top/machine.c Tue Jul 14 22:43:40 2020(r363207) @@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*g len = (argbuflen - (dst - argbuf) - 1) / 4; strvisx(dst, src, MIN(strlen(src), len), - VIS_NL | VIS_CSTYLE | VIS_OCTAL | VIS_SAFE); + VIS_NL | VIS_TAB | VIS_CSTYLE | VIS_OCTAL); while (*dst != '\0') dst++; if ((argbuflen - (dst - argbuf) - 1) / 4 > 0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r363176 - head/usr.sbin
Adrian Chadd wrote: Author: adrian Date: Tue Jul 14 05:33:23 2020 New Revision: 363176 URL: https://svnweb.freebsd.org/changeset/base/363176 Log: [pmc] whoops, remove spurious #'s pointed out by gonzo@, thanks! Modified: head/usr.sbin/Makefile Now after r363174 and r363176: $ svn diff -r 363173:363176 usr.sbin/Makefile (empty) Did you mean to do something else here? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r363138 - head/usr.bin/sed/tests
Author: yuripv Date: Mon Jul 13 01:32:37 2020 New Revision: 363138 URL: https://svnweb.freebsd.org/changeset/base/363138 Log: sed/multi_test: print comment for current test, not next one This is visible when e.g. 8.20 is failing: not ok 96 8.20 # \ in y command 8.20's comment should be '[ as an s delimiter and its escapes'. Modified: head/usr.bin/sed/tests/multi_test.sh Modified: head/usr.bin/sed/tests/multi_test.sh == --- head/usr.bin/sed/tests/multi_test.shMon Jul 13 01:28:45 2020 (r363137) +++ head/usr.bin/sed/tests/multi_test.shMon Jul 13 01:32:37 2020 (r363138) @@ -92,9 +92,9 @@ result() cp current.out $REGRESS/${TESTNAME} fi if diff -c $REGRESS/${TESTNAME} current.out ; then - echo "ok $MARK $TESTNAME # $TODO$COMMENT" + echo "ok $MARK $TESTNAME # $TODO$OCOMMENT" else - echo "not ok $MARK $TESTNAME # $TODO$COMMENT" + echo "not ok $MARK $TESTNAME # $TODO$OCOMMENT" fi 1>&4 2>&5 } @@ -102,6 +102,7 @@ result() mark() { [ $MARK -gt 0 ] && result + OCOMMENT=$COMMENT MARK=`expr $MARK + 1` TESTNAME=$1 exec 1>&4 2>&5 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r362515 - head/contrib/nvi/common
Author: yuripv Date: Mon Jun 22 22:59:03 2020 New Revision: 362515 URL: https://svnweb.freebsd.org/changeset/base/362515 Log: Revert r362148. Breaks UTF-8 input for new or having only 7bit characters present files. Reported by: glebius Modified: head/contrib/nvi/common/exf.c Modified: head/contrib/nvi/common/exf.c == --- head/contrib/nvi/common/exf.c Mon Jun 22 22:43:09 2020 (r362514) +++ head/contrib/nvi/common/exf.c Mon Jun 22 22:59:03 2020 (r362515) @@ -1237,10 +1237,7 @@ file_encinit(SCR *sp) } /* -* 1. Check for valid UTF-8. -* 2. Check if fallback fileencoding is set and is NOT UTF-8. -* 3. Check if user locale's encoding is NOT UTF-8. -* 4. Use ISO8859-1 as last resort. +* Detect UTF-8 and fallback to the locale/preset encoding. * * XXX * A manually set O_FILEENCODING indicates the "fallback @@ -1249,13 +1246,9 @@ file_encinit(SCR *sp) */ if (looks_utf8(buf, blen) > 1) o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); - else if (O_ISSET(sp, O_FILEENCODING) && - strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) - /* Use fileencoding as is */ ; - else if (strcasecmp(codeset(), "utf-8") != 0) + else if (!O_ISSET(sp, O_FILEENCODING) || + !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); - else - o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); conv_enc(sp, O_FILEENCODING, 0); #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r362148 - head/contrib/nvi/common
Gleb Smirnoff wrote: Yuri, Zhihao, this commit totally broke Russian input for me in nvi. After exiting edit mode, nvi immediately converts all text to ???. I don't have any special settings in my environment. All I have is "russian" class for my user which yields in these environment variables: declare -x LANG="ru_RU.UTF-8" declare -x MM_CHARSET="UTF-8" declare -x XTERM_LOCALE="ru_RU.UTF-8" I'm already digging into that problem, but may be you have a clue immediately. My bad, yes, I see the problem, looking into it. On Sat, Jun 13, 2020 at 02:11:02PM +, Yuri Pankov wrote: Y> Author: yuripv Y> Date: Sat Jun 13 14:11:02 2020 Y> New Revision: 362148 Y> URL: https://svnweb.freebsd.org/changeset/base/362148 Y> Y> Log: Y> nvi: fallback to ISO8859-1 as last resort Y> Y> Current logic of using user's locale encoding that is UTF-8 doesn't make Y> much sense if we already failed the looks_utf8() check and skipped Y> encoding set using "fileencoding" as being UTF-8 as well; fallback to Y> ISO8859-1 in that case. Y> Y> Reviewed by:Zhihao Yuan Y> Differential Revision: https://reviews.freebsd.org/D24919 Y> Y> Modified: Y> head/contrib/nvi/common/exf.c Y> Y> Modified: head/contrib/nvi/common/exf.c Y> == Y> --- head/contrib/nvi/common/exf.c Sat Jun 13 09:16:07 2020(r362147) Y> +++ head/contrib/nvi/common/exf.c Sat Jun 13 14:11:02 2020(r362148) Y> @@ -1237,7 +1237,10 @@ file_encinit(SCR *sp) Y> } Y> Y> /* Y> - * Detect UTF-8 and fallback to the locale/preset encoding. Y> + * 1. Check for valid UTF-8. Y> + * 2. Check if fallback fileencoding is set and is NOT UTF-8. Y> + * 3. Check if user locale's encoding is NOT UTF-8. Y> + * 4. Use ISO8859-1 as last resort. Y>* Y>* XXX Y>* A manually set O_FILEENCODING indicates the "fallback Y> @@ -1246,9 +1249,13 @@ file_encinit(SCR *sp) Y>*/ Y> if (looks_utf8(buf, blen) > 1) Y> o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); Y> - else if (!O_ISSET(sp, O_FILEENCODING) || Y> - !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) Y> + else if (O_ISSET(sp, O_FILEENCODING) && Y> + strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) Y> + /* Use fileencoding as is */ ; Y> + else if (strcasecmp(codeset(), "utf-8") != 0) Y> o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); Y> + else Y> + o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); Y> Y> conv_enc(sp, O_FILEENCODING, 0); Y> #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r362452 - in head: contrib/xz/src/liblzma/check lib/liblzma share/mk
Ruslan Garipov wrote: On 6/21/2020 2:32 AM, Xin LI wrote: Author: delphij Date: Sat Jun 20 21:32:07 2020 New Revision: 362452 URL: https://svnweb.freebsd.org/changeset/base/362452 Log: liblzma: Make liblzma use libmd implementation of SHA256. I'm trying to update from r362172 (GENERIC-NODEBUG) to r362468 (a custom KERNCONF), and failing on buildworld: [...] I think kevans took care of it in r362478. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r362464 - head/usr.bin/w
Author: yuripv Date: Sun Jun 21 11:42:49 2020 New Revision: 362464 URL: https://svnweb.freebsd.org/changeset/base/362464 Log: w: use locale-based string format specifiers Use locale-based string format specifiers when printing the process names/arguments. Reviewed by: pstef Differential Revision:https://reviews.freebsd.org/D25174 Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c == --- head/usr.bin/w/w.c Sun Jun 21 10:09:34 2020(r362463) +++ head/usr.bin/w/w.c Sun Jun 21 11:42:49 2020(r362464) @@ -438,8 +438,8 @@ main(int argc, char *argv[]) if (ptr == NULL) ptr = "-"; xo_open_instance("process-entry"); - xo_emit("\t\t{:process-id/%-9d/%d} {:command/%s}\n", - dkp->ki_pid, ptr); + xo_emit("\t\t{:process-id/%-9d/%d} " + "{:command/%hs}\n", dkp->ki_pid, ptr); xo_close_instance("process-entry"); } xo_close_list("process-entry"); @@ -460,7 +460,7 @@ main(int argc, char *argv[]) t = ep->utmp.ut_tv.tv_sec; longattime = pr_attime(, ); longidle = pr_idle(ep->idle); - xo_emit("{:command/%.*s/%@*@s}\n", + xo_emit("{:command/%.*hs/%@*@hs}\n", argwidth - longidle - longattime, ep->args); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r362318 - head/usr.bin/tee
Fernando Apesteguía wrote: Author: fernape (ports committer) Date: Thu Jun 18 10:48:37 2020 New Revision: 362318 URL: https://svnweb.freebsd.org/changeset/base/362318 Log: tee(1): Add EXAMPLES section Probably the simplest one ever. Approved by: gbe@, 0mp@ Differential Revision: https://reviews.freebsd.org/D25206 Modified: head/usr.bin/tee/tee.1 Modified: head/usr.bin/tee/tee.1 == --- head/usr.bin/tee/tee.1 Thu Jun 18 10:47:30 2020(r362317) +++ head/usr.bin/tee/tee.1 Thu Jun 18 10:48:37 2020(r362318) @@ -31,7 +31,7 @@ .\" @(#)tee.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 13, 2007 +.Dd June 18, 2020 .Dt TEE 1 .Os .Sh NAME @@ -74,6 +74,12 @@ except in the event of the option. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Send echoed message both to stdout and to the greetings file: Should this be like the following, at least to get the filename right? Send echoed message both to stdout and to the file .Pa greetings.txt : +.Bd -literal -offset indent +$ echo "Hello" | tee greetings.txt +Hello +.Ed .Sh STANDARDS The .Nm ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r362200 - in stable/12/tools/tools/locale: etc/final-maps tools
Author: yuripv Date: Mon Jun 15 15:59:44 2020 New Revision: 362200 URL: https://svnweb.freebsd.org/changeset/base/362200 Log: MFC r353127: Pre-generate Big5 charmap from CLDR data. The one used previously was missing the characters in 0-127 range, making various tools try to escape them in output. PR: 235100 Reviewed by: bapt Tested by:Ting-Wei Lan Differential Revision:https://reviews.freebsd.org/D21794 Modified: stable/12/tools/tools/locale/etc/final-maps/map.Big5 (contents, props changed) stable/12/tools/tools/locale/tools/finalize Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/locale/etc/final-maps/map.Big5 == --- stable/12/tools/tools/locale/etc/final-maps/map.Big5Mon Jun 15 14:58:40 2020(r362199) +++ stable/12/tools/tools/locale/etc/final-maps/map.Big5Mon Jun 15 15:59:44 2020(r362200) @@ -1,13708 +1,13968 @@ +## +# POSIX charmap +# Generated automatically from the Unicode Character Database and Common Locale Data Repository +# see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html +# charset: Big5 +## +# +# Copyright 1991-2011 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in # +# http://www.unicode.org/copyright.html. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode # +# data files and any associated documentation (the "Data Files") or Unicode software and any# +# associated documentation (the "Software") to deal in the Data Files or Software without # +# restriction, including without limitation the rights to use, copy, modify, merge, publish,# +# distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom # +# the Data Files or Software are furnished to do so, provided that (a) the above copyright # +# notice(s) and this permission notice appear with all copies of the Data Files or Software,# +# (b) both the above copyright notice(s) and this permission notice appear in associated# +# documentation, and (c) there is clear notice in each modified Data File or in the Software as # +# well as in the documentation associated with the Data File(s) or Software that the data or# +# software has been modified. # +# # +# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR# +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A# +# PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT # +# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR # +# CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # +# CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. # +# + "Big5" - 1 - 2 +1 +2 + CHARMAP - \xa1\x40 - \xa1\x41 - \xa1\x42 - \xa1\x43 - \xa1\x44 - \xa1\x45 - \xa1\x46 - \xa1\x47 - \xa1\x48 - \xa1\x49 - \xa1\x4a - \xa1\x4b - \xa1\x4c - \xa1\x4d - \xa1\x4e - \xa1\x4f - \xa1\x50 - \xa1\x51 - \xa1\x52 - \xa1\x53 - \xa1\x54 - \xa1\x55 - \xa1\x56 - \xa1\x57 - \xa1\x58 - \xa1\x59 - \xa1\x5b - \xa1\x5c - \xa1\x5d - \xa1\x5e - \xa1\x5f - \xa1\x60 - \xa1\x61 - \xa1\x62 - \xa1\x63 - \xa1\x64 - \xa1\x65 - \xa1\x66 - \xa1\x67 - \xa1\x68 - \xa1\x69 - \xa1\x6a - \xa1\x6b - \xa1\x6c - \xa1\x6d - \xa1\x6e - \xa1\x6f - \xa1\x70 - \xa1\x71 - \xa1\x72 - \xa1\x73 - \xa1\x74 - \xa1\x75 - \xa1\x76 - \xa1\x77 - \xa1\x78 - \xa1\x79 - \xa1\x7a - \xa1\x7b - \xa1\x7c - \xa1\x7d - \xa1\x7e - \xa1\xa1 - \xa1\xa2 - \xa1\xa3 - \xa1\xa4 - \xa1\xa5 - \xa1\xa6 - \xa1\xa7 - \xa1\xa8 - \xa1\xa9 - \xa1\xaa - \xa1\xab - \xa1\xac - \xa1\xad - \xa1\xae - \xa1\xaf - \xa1\xb0 - \xa1\xb1 - \xa1\xb2 - \xa1\xb3 - \xa1\xb4 - \xa1\xb5 - \xa1\xb6 - \xa1\xb7 - \xa1\xb8 - \xa1\xb9 - \xa1\xba - \xa1\xbb - \xa1\xbc - \xa1\xbd - \xa1\xbe - \xa1\xbf - \xa1\xc0 - \xa1\xc1 - \xa1\xc2 - \xa1\xc4 - \xa1\xc6 - \xa1\xc7 - \xa1\xc8 - \xa1\xc9 - \xa1\xca - \xa1\xcb - \xa1\xcc - \xa1\xcd - \xa1\xce - \xa1\xcf - \xa1\xd0 - \xa1\xd1 - \xa1\xd2 - \xa1\xd3 - \xa1\xd4 - \xa1\xd5 - \xa1\xd6 -
Re: svn commit: r362191 - head/sbin/md5
Mateusz Piotrowski wrote: Hi, On 6/15/20 2:33 PM, Rodney W. Grimes wrote: [ Charset UTF-8 unsupported, converting... ] Author: fernape (ports committer) Date: Mon Jun 15 10:08:02 2020 New Revision: 362191 URL: https://svnweb.freebsd.org/changeset/base/362191 Log: md5(1): fix style in man page Mandoc is fine to ignore this, but it is wrong to call it useless. I really wish that this stop. .Tn might be useless to mandoc, but it is a very usable thing if your formatting to something other than txt, as in a ps or pdf. In that case I would consider patching our in-tree mandoc to not warn about Tn. Or request support for Tn or a well-defined replacement upstream. I can see the benefit of keeping Tn around, as it /might/ potentially create nice formatting for HTML. On the other hand, I don't like the idea of not following the linter. It's marked as obsolete exactly because it's misused, quoting mdoc(7): Even though the macro name (“tradename”) suggests a semantic function, historic usage is inconsistent, mostly using it as a presentation-level macro to request a small caps font. If we want to somehow emphasize the text, .Sy, .Em, or similar macros should be used instead, I don't see why though, it certainly doesn't help the readability (IMO, of coursE). ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r362191 - head/sbin/md5
Fernando Apesteguía wrote: Author: fernape (ports committer) Date: Mon Jun 15 10:08:02 2020 New Revision: 362191 URL: https://svnweb.freebsd.org/changeset/base/362191 Log: md5(1): fix style in man page Fix a bunch of style problems reported by mandoc(1) and igor: mandoc: ./md5.1:19:71: STYLE: no blank before trailing delimiter: Nm ... rmd160, mandoc: ./md5.1:20:23: STYLE: no blank before trailing delimiter: Nm ... skein512, mandoc: ./md5.1:33:2: STYLE: useless macro: Tn mandoc: ./md5.1:33:2: STYLE: useless macro: Tn mandoc: ./md5.1:33:2: STYLE: useless macro: Tn mandoc: ./md5.1:33:2: STYLE: useless macro: Tn mandoc: ./md5.1:35:2: STYLE: useless macro: Tn mandoc: ./md5.1:42:2: STYLE: useless macro: Tn mandoc: ./md5.1:45:2: STYLE: useless macro: Tn mandoc: ./md5.1:47:2: STYLE: useless macro: Tn mandoc: ./md5.1:56:2: STYLE: useless macro: Tn mandoc: ./md5.1:58:2: STYLE: useless macro: Tn mandoc: ./md5.1:61:2: STYLE: useless macro: Tn mandoc: ./md5.1:66:2: STYLE: useless macro: Tn mandoc: ./md5.1:68:2: STYLE: useless macro: Tn mandoc: ./md5.1:104:24: STYLE: no blank before trailing delimiter: Nm skein512, mandoc: ./md5.1:117:6: STYLE: referenced manual not found: Xr sha224 3 igor: md5.1:46:no comma after "i.e.":either algorithm, [i.e.] to find an input that produces a specific Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25277 Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 == --- head/sbin/md5/md5.1 Mon Jun 15 03:10:53 2020(r362190) +++ head/sbin/md5/md5.1 Mon Jun 15 10:08:02 2020(r362191) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd July 9, 2018 +.Dd June 15, 2020 .Dt MD5 1 .Os .Sh NAME @@ -16,8 +16,8 @@ (All other hashes have the same options and usage.) .Sh DESCRIPTION The -.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512, sha512t256, rmd160, -.Nm skein256, skein512, +.Nm md5 , sha1 , sha224 , sha256 , sha384 , sha512 , sha512t256 , rmd160 , +.Nm skein256 , skein512 , and .Nm skein1024 utilities take as input a message of arbitrary length and produce as @@ -29,43 +29,29 @@ of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. -The -.Tn SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160, -and -.Tn SKEIN +The SHA-224 , SHA-256 , SHA-384 , SHA-512, RIPEMD-160, +and SKEIN algorithms are intended for digital signature applications, where a large file must be .Dq compressed in a secure manner before being encrypted with a private (secret) -key under a public-key cryptosystem such as -.Tn RSA . +key under a public-key cryptosystem such as RSA. .Pp -The -.Tn MD5 -and -.Tn SHA-1 -algorithms have been proven to be vulnerable to practical collision -attacks and should not be relied upon to produce unique outputs, +The MD5 and SHA-1 algorithms have been proven to be vulnerable to practical +collision attacks and should not be relied upon to produce unique outputs, .Em nor should they be used as part of a cryptographic signature scheme. As of 2017-03-02, there is no publicly known method to .Em reverse -either algorithm, i.e. to find an input that produces a specific +either algorithm, i.e., to find an input that produces a specific output. .Pp -.Tn SHA-512t256 -is a version of -.Tn SHA-512 -truncated to only 256 bits. -On 64-bit hardware, this algorithm is approximately 50% faster than -.Tn SHA-256 -but with the same level of security. +SHA-512t256 is a version of SHA-512 truncated to only 256 bits. +On 64-bit hardware, this algorithm is approximately 50% faster than SHA-256 but +with the same level of security. The hashes are not interchangeable. .Pp -It is recommended that all new applications use -.Tn SHA-512 -or -.Tn SKEIN-512 +It is recommended that all new applications use SHA-512 or SKEIN-512 instead of one of the other hash functions. .Pp The following options may be used in any combination and must @@ -101,7 +87,7 @@ Run a built-in test script. .Sh EXIT STATUS The .Nm md5 , sha1 , sha224 , sha256 , sha512 , sha512t256 , rmd160 , -.Nm skein256 , skein512, +.Nm skein256 , skein512 , and .Nm skein1024 utilities exit 0 on success, @@ -114,7 +100,6 @@ option. .Xr md5 3 , .Xr ripemd 3 , .Xr sha 3 , -.Xr sha224 3 , .Xr sha256 3 , .Xr sha384 3 , .Xr sha512 3 , I think we should create sha256.3 -> sha224.3 instead of removing the reference, as done for sha512.3 -> sha384.3 -- if you look at the sha256.3 man page, it documents all of the SHA224_* functions; i.e.,: Index: Makefile === --- Makefile(revision 362145) +++ Makefile(working copy) @@ -40,7 +40,7 @@ MLINKS+=sha256.3 SHA224_Init.3 sha256.3
svn commit: r362148 - head/contrib/nvi/common
Author: yuripv Date: Sat Jun 13 14:11:02 2020 New Revision: 362148 URL: https://svnweb.freebsd.org/changeset/base/362148 Log: nvi: fallback to ISO8859-1 as last resort Current logic of using user's locale encoding that is UTF-8 doesn't make much sense if we already failed the looks_utf8() check and skipped encoding set using "fileencoding" as being UTF-8 as well; fallback to ISO8859-1 in that case. Reviewed by: Zhihao Yuan Differential Revision:https://reviews.freebsd.org/D24919 Modified: head/contrib/nvi/common/exf.c Modified: head/contrib/nvi/common/exf.c == --- head/contrib/nvi/common/exf.c Sat Jun 13 09:16:07 2020 (r362147) +++ head/contrib/nvi/common/exf.c Sat Jun 13 14:11:02 2020 (r362148) @@ -1237,7 +1237,10 @@ file_encinit(SCR *sp) } /* -* Detect UTF-8 and fallback to the locale/preset encoding. +* 1. Check for valid UTF-8. +* 2. Check if fallback fileencoding is set and is NOT UTF-8. +* 3. Check if user locale's encoding is NOT UTF-8. +* 4. Use ISO8859-1 as last resort. * * XXX * A manually set O_FILEENCODING indicates the "fallback @@ -1246,9 +1249,13 @@ file_encinit(SCR *sp) */ if (looks_utf8(buf, blen) > 1) o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-8", 0); - else if (!O_ISSET(sp, O_FILEENCODING) || - !strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8")) + else if (O_ISSET(sp, O_FILEENCODING) && + strcasecmp(O_STR(sp, O_FILEENCODING), "utf-8") != 0) + /* Use fileencoding as is */ ; + else if (strcasecmp(codeset(), "utf-8") != 0) o_set(sp, O_FILEENCODING, OS_STRDUP, codeset(), 0); + else + o_set(sp, O_FILEENCODING, OS_STRDUP, "iso8859-1", 0); conv_enc(sp, O_FILEENCODING, 0); #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r362147 - head/usr.bin/awk
Author: yuripv Date: Sat Jun 13 09:16:07 2020 New Revision: 362147 URL: https://svnweb.freebsd.org/changeset/base/362147 Log: awk(1): use -version instead of -V -V is OpenBSD specific, use -version instead. While here, fix issue reported by mandoc lint and drop nonexistent script(7) reference. PR: 247004 Reviewed by: 0mp, markj Differential Revision:https://reviews.freebsd.org/D25164 Modified: head/usr.bin/awk/awk.1 Modified: head/usr.bin/awk/awk.1 == --- head/usr.bin/awk/awk.1 Sat Jun 13 08:37:24 2020(r362146) +++ head/usr.bin/awk/awk.1 Sat Jun 13 09:16:07 2020(r362147) @@ -23,7 +23,7 @@ .\" THIS SOFTWARE. .\" .\"$FreeBSD$ -.Dd $Mdocdate: September 14 2015 $ +.Dd $Mdocdate: June 6 2020 $ .Dt AWK 1 .Os .Sh NAME @@ -32,7 +32,7 @@ .Sh SYNOPSIS .Nm awk .Op Fl safe -.Op Fl V +.Op Fl version .Op Fl d Ns Op Ar n .Op Fl F Ar fs .Op Fl v Ar var Ns = Ns Ar value @@ -101,7 +101,7 @@ approximation to a .Dq safe version of .Nm . -.It Fl V +.It Fl version Print the version number of .Nm to standard output and exit. @@ -265,7 +265,7 @@ and concatenation .Pq indicated by whitespace . The operators .Ic \&! ++ \-\- += \-= *= /= %= ^= -.Ic > >= < <= == != ?: +.Ic > >= < <= == != ?\&: are also available in expressions. Variables may be scalars, array elements (denoted @@ -752,8 +752,7 @@ Print an error message to standard error: .Xr lex 1 , .Xr printf 1 , .Xr sed 1 , -.Xr re_format 7 , -.Xr script 7 +.Xr re_format 7 .Rs .%A A. V. Aho .%A B. W. Kernighan @@ -774,9 +773,10 @@ except does not support {n,m} pattern matching. .Pp The flags -.Op Fl \ +.Fl d , +.Fl safe , and -.Op Fl safe , +.Fl version as well as the commands .Cm fflush , compl , and , or , .Cm xor , lshift , rshift , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r362146 - in head/usr.bin/locale: . tests
Author: yuripv Date: Sat Jun 13 08:37:24 2020 New Revision: 362146 URL: https://svnweb.freebsd.org/changeset/base/362146 Log: locale: exit 1 if unknown keyword was specified PR: 241906 Submitted by: Akos Somfai Modified: head/usr.bin/locale/locale.c head/usr.bin/locale/tests/locale_test.sh Modified: head/usr.bin/locale/locale.c == --- head/usr.bin/locale/locale.cSat Jun 13 04:47:59 2020 (r362145) +++ head/usr.bin/locale/locale.cSat Jun 13 08:37:24 2020 (r362146) @@ -61,7 +61,7 @@ void list_locales(void); const char *lookup_localecat(int); char *kwval_lconv(int); intkwval_lookup(const char *, char **, int *, int *, int *); -void showdetails(const char *); +intshowdetails(const char *); void showkeywordslist(char *substring); void showlocale(void); void usage(void); @@ -414,7 +414,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); if (argc > 0) { while (argc > 0) { - showdetails(*argv); + if (showdetails(*argv) != 0) + exit(EXIT_FAILURE); argv++; argc--; } @@ -837,19 +838,16 @@ kwval_lookup(const char *kwname, char **kwval, int *ca * Show details about requested keyword according to '-k' and/or '-c' * command line options specified. */ -void +int showdetails(const char *kw) { int type, cat, tmpval, alloc; char*kwval; if (kwval_lookup(kw, , , , ) == 0) { - /* -* invalid keyword specified. -* XXX: any actions? -*/ + /* Invalid keyword specified */ fprintf(stderr, "Unknown keyword: `%s'\n", kw); - return; + return (1); } if (prt_categories) { @@ -889,6 +887,8 @@ showdetails(const char *kw) if (alloc) free(kwval); + + return (0); } /* Modified: head/usr.bin/locale/tests/locale_test.sh == --- head/usr.bin/locale/tests/locale_test.shSat Jun 13 04:47:59 2020 (r362145) +++ head/usr.bin/locale/tests/locale_test.shSat Jun 13 08:37:24 2020 (r362146) @@ -160,8 +160,24 @@ no_flags_posix_body() noexpr } +atf_test_case k_flag_unknown_kw +k_flag_unknown_kw_head() +{ + atf_set "descr" \ + "Verify 'locale -k' exit status is '1' for unknown keywords" +} +k_flag_unknown_kw_body() +{ + export LC_ALL="C" + + # Hopefully the keyword will stay nonexistent + atf_check -s exit:1 -o empty -e ignore locale -k nonexistent +} + + atf_init_test_cases() { atf_add_test_case k_flag_posix atf_add_test_case no_flags_posix + atf_add_test_case k_flag_unknown_kw } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r362017 - in head/usr.bin/sed: . tests
Mateusz Piotrowski wrote: Author: 0mp (doc,ports committer) Date: Wed Jun 10 19:23:58 2020 New Revision: 362017 URL: https://svnweb.freebsd.org/changeset/base/362017 Log: Read commands from stdin when -f - is passed to sed(1) This patch teaches sed to interpret a "-" in a special way when given as an argument to the -f flag. This behavior is also present in GNU sed. PR: 244872 Tested by: antoine (exp-run) Reviewed by: pfg, tobik (older version) Approved by: pfg (src) Relnotes:yes MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24079 Modified: head/usr.bin/sed/main.c head/usr.bin/sed/sed.1 head/usr.bin/sed/tests/sed2_test.sh [...] Modified: head/usr.bin/sed/tests/sed2_test.sh == --- head/usr.bin/sed/tests/sed2_test.sh Wed Jun 10 18:59:46 2020 (r362016) +++ head/usr.bin/sed/tests/sed2_test.sh Wed Jun 10 19:23:58 2020 (r362017) @@ -116,11 +116,68 @@ hex_subst_body() atf_check -o "inline:" sed 's/\xx//' d } +atf_test_case commands_on_stdin +commands_on_stdin_head() +{ + atf_set "descr" "Verify -f -" +} +commands_on_stdin_body() +{ + printf "a\n" > a + printf "s/a/b/\n" > a_to_b + printf "s/b/c/\n" > b_to_c + printf "s/c/d/\n" > ./- + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c + + # Verify that nothing is printed if there are no input files provided. + printf 'i\\\nx' > insert_x + atf_check -o 'empty' sed -f - < insert_x +} + +atf_test_case commands_on_stdin +commands_on_stdin_head() +{ + atf_set "descr" "Verify -f -" +} +commands_on_stdin_body() +{ + printf "a\n" > a + printf "s/a/b/\n" > a_to_b + printf "s/b/c/\n" > b_to_c + printf "s/c/d/\n" > ./- + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c + + # Verify that nothing is printed if there are no input files provided. + printf 'i\\\nx' > insert_x + atf_check -o 'empty' sed -f - < insert_x +} + +atf_test_case commands_on_stdin +commands_on_stdin_head() +{ + atf_set "descr" "Verify -f -" +} +commands_on_stdin_body() +{ + printf "a\n" > a + printf "s/a/b/\n" > a_to_b + printf "s/b/c/\n" > b_to_c + printf "s/c/d/\n" > ./- + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c + + # Verify that nothing is printed if there are no input files provided. + printf 'i\\\nx' > insert_x + atf_check -o 'empty' sed -f - < insert_x +} + atf_init_test_cases() { atf_add_test_case inplace_command_q atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src atf_add_test_case escape_subst + atf_add_test_case commands_on_stdin + atf_add_test_case commands_on_stdin + atf_add_test_case commands_on_stdin atf_add_test_case hex_subst } Am I reading it wrong, or is it the same test case added 3 times? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361962 - head/bin/ps
Author: yuripv Date: Tue Jun 9 07:07:29 2020 New Revision: 361962 URL: https://svnweb.freebsd.org/changeset/base/361962 Log: ps: remove xo_no_setlocale() call Apparently libxo was fixed to do the right thing on FreeBSD, and calling xo_no_setlocale() is no longer needed. Reported by: phil Modified: head/bin/ps/ps.c Modified: head/bin/ps/ps.c == --- head/bin/ps/ps.cTue Jun 9 06:48:25 2020(r361961) +++ head/bin/ps/ps.cTue Jun 9 07:07:29 2020(r361962) @@ -192,7 +192,6 @@ main(int argc, char *argv[]) char fmtbuf[_POSIX2_LINE_MAX]; (void) setlocale(LC_ALL, ""); - xo_no_setlocale(); time(); /* Used by routines in print.c. */ /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361888 - head/share/man/man9
Author: yuripv Date: Sun Jun 7 09:17:57 2020 New Revision: 361888 URL: https://svnweb.freebsd.org/changeset/base/361888 Log: taskqueue(9): reference callout(9) instead of timeout(9) As timeout(9) was removed and all consumers were converted to callout(9), reference it instead for the description of sbt, pr, and flags arguments. Reviewed by: trasz Differential Revision:https://reviews.freebsd.org/D25165 Modified: head/share/man/man9/taskqueue.9 Modified: head/share/man/man9/taskqueue.9 == --- head/share/man/man9/taskqueue.9 Sun Jun 7 08:21:19 2020 (r361887) +++ head/share/man/man9/taskqueue.9 Sun Jun 7 09:17:57 2020 (r361888) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2019 +.Dd June 6, 2020 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -236,7 +236,7 @@ function provides finer control over the scheduling ba and .Va flags , as detailed in -.Xr timeout 9 . +.Xr callout 9 . Only non-fast task queues can be used for .Va timeout_task scheduling. @@ -510,10 +510,10 @@ may be delayed an indeterminate amount of time before If queueing delays cannot be tolerated then a private taskqueue should be created with a dedicated processing thread. .Sh SEE ALSO +.Xr callout 9 , .Xr ithread 9 , .Xr kthread 9 , .Xr swi 9 -.Xr timeout 9 .Sh HISTORY This interface first appeared in .Fx 5.0 . ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361887 - head/bin/ps
Author: yuripv Date: Sun Jun 7 08:21:19 2020 New Revision: 361887 URL: https://svnweb.freebsd.org/changeset/base/361887 Log: ps: use %hs instead of %s format specifiers Use %hs (locale-based encoding) instead of %s (UTF-8) format for strings that are expected to be in current locale encoding (date/time, process names/argument list). PR: 241491 Reviewed by: phil Differential Revision:https://reviews.freebsd.org/D22160 Modified: head/bin/ps/keyword.c head/bin/ps/print.c head/bin/ps/ps.c Modified: head/bin/ps/keyword.c == --- head/bin/ps/keyword.c Sun Jun 7 05:08:44 2020(r361886) +++ head/bin/ps/keyword.c Sun Jun 7 08:21:19 2020(r361887) @@ -254,7 +254,7 @@ showkey(void) i = len; sep = "\n"; } - xo_emit("{P:/%s}{l:key/%s}", sep, p); + xo_emit("{P:/%hs}{l:key/%hs}", sep, p); sep = " "; } xo_emit("\n"); Modified: head/bin/ps/print.c == --- head/bin/ps/print.c Sun Jun 7 05:08:44 2020(r361886) +++ head/bin/ps/print.c Sun Jun 7 08:21:19 2020(r361887) @@ -89,11 +89,11 @@ printheader(void) v = vent->var; if (v->flag & LJUST) { if (STAILQ_NEXT(vent, next_ve) == NULL) /* last one */ - xo_emit("{T:/%s}", vent->header); + xo_emit("{T:/%hs}", vent->header); else - xo_emit("{T:/%-*s}", v->width, vent->header); + xo_emit("{T:/%-*hs}", v->width, vent->header); } else - xo_emit("{T:/%*s}", v->width, vent->header); + xo_emit("{T:/%*hs}", v->width, vent->header); if (STAILQ_NEXT(vent, next_ve) != NULL) xo_emit("{P: }"); } Modified: head/bin/ps/ps.c == --- head/bin/ps/ps.cSun Jun 7 05:08:44 2020(r361886) +++ head/bin/ps/ps.cSun Jun 7 08:21:19 2020(r361887) @@ -192,6 +192,7 @@ main(int argc, char *argv[]) char fmtbuf[_POSIX2_LINE_MAX]; (void) setlocale(LC_ALL, ""); + xo_no_setlocale(); time(); /* Used by routines in print.c. */ /* @@ -696,7 +697,7 @@ main(int argc, char *argv[]) fwidthmin = (xo_get_style(NULL) != XO_STYLE_TEXT || (STAILQ_NEXT(vent, next_ve) == NULL && (vent->var->flag & LJUST))) ? 0 : vent->var->width; - snprintf(fmtbuf, sizeof(fmtbuf), "{:%s/%%%s%d..%ds}", + snprintf(fmtbuf, sizeof(fmtbuf), "{:%s/%%%s%d..%dhs}", vent->var->field ? vent->var->field : vent->var->name, (vent->var->flag & LJUST) ? "-" : "", fwidthmin, fwidthmax); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r361871 - head/share/man/man7
Author: yuripv Date: Sat Jun 6 17:48:55 2020 New Revision: 361871 URL: https://svnweb.freebsd.org/changeset/base/361871 Log: stats(7): fix bad Xr references and lint noise Reviewed by: bjk, debdrup Differential Revision:https://reviews.freebsd.org/D25166 Modified: head/share/man/man7/stats.7 Modified: head/share/man/man7/stats.7 == --- head/share/man/man7/stats.7 Sat Jun 6 14:19:16 2020(r361870) +++ head/share/man/man7/stats.7 Sat Jun 6 17:48:55 2020(r361871) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 2020 +.Dd June 6, 2020 .Dt STATS 7 .Os .Sh NAME @@ -86,31 +86,32 @@ Display system statistics Report virtual memory statistics .It Nm zpool iostat Report ZFS I/O statistics +.El .Sh SEE ALSO +.Xr btsockstat 1 , +.Xr fstat 1 , .Xr intro 1 , +.Xr lockstat 1 , +.Xr netstat 1 , +.Xr plockstat 1 , +.Xr procstat 1 , +.Xr sockstat 1 , +.Xr stat 1 , +.Xr systat 1 , .Xr intro 7 , -.Xr intro 8 , -.Xr btsockstat 1 , .Xr ctlstat 8 , -.Xr fstat 1 , .Xr gstat 8 , .Xr ibstat 8 , .Xr ifmcstat 8 , +.Xr intro 8 , .Xr iostat 8 , .Xr ipfstat 8 , .Xr kldstat 8 , -.Xr lockstat 1 , .Xr mailstats 8 , -.Xr netstat 1 , -.Xr plockstat 1 , .Xr pmcstat 8 , -.Xr procstat 1 , .Xr pstat 8 , -.Xr sockstat 1, -.Xr stat 1 , -.Xr systat 1 , .Xr vmstat 8 , -.Xr zpool-iostat 8 , +.Xr zpool 8 .Sh HISTORY The .Nm ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r361867 - head/share/man/man4
Warner Losh wrote: Author: imp Date: Sat Jun 6 06:21:20 2020 New Revision: 361867 URL: https://svnweb.freebsd.org/changeset/base/361867 Log: Document all the sysctl values for the nda devices. Include some minimal documentation on namespace support for nda devices. Fix a few typos and formatting nits to apease igor. Modified: head/share/man/man4/nda.4 Modified: head/share/man/man4/nda.4 == --- head/share/man/man4/nda.4 Sat Jun 6 06:21:15 2020(r361866) +++ head/share/man/man4/nda.4 Sat Jun 6 06:21:20 2020(r361867) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2017 +.Dd June 6, 2020 .Dt NDA 4 .Os .Sh NAME @@ -48,37 +48,156 @@ variables and .Xr loader 8 tunables: .Bl -tag -width 12 +.It Va hw.nvme.use_nvd +The +.Xr nvme 4 +driver will create +.Nm +device nodes for block storage when set to 0. +Create +.Xr nvd 4 +device nodes for block storage when set to 1. +See +.Xr nvd 4 +when set to 1. +.It Va kern.cam.nda.nvd_compat +When set to 1, +.Xr nvd 4 +aliases will be created for all +.Nm +devices, including partitions and other +.Xr goem 4 A typo in the link. +providers that take their names from the disk's name. +.Xr nvd +devices will not, however, be reported in the +.Va kern.disks +.Xr sysctl 8 . .It Va kern.cam.nda.sort_io_queue -.Pp This variable determines whether the software queued entries are sorted in LBA order or not. Sorting is almost always a waste of time. The default is to not sort. +.It Va kern.cam.nda.enable_biospeedup +This variable determines if the +.Nm +devices participate in the speedup protocol. +When the device participates in the speedup, then when the upper layers +send a +.Va BIO_SPEEDUP , +all current +.Va BIO_DELETE +requests not yet sent to the hardware are completed successfully immediate +without sending them to the hardware. +Used in low disk space scenarios when the filesystem encounters +a critical shortage and needs blocks immediately. +Since trims have maximum benefit when the LBA is unused for a long time, +skipping the trim when space is needed for immediate writes results in little to +no excess wear. +When participation is disabled, +.Va BIO_SPEEDUP +requests are ignored. +.It Va kern.cam.nda.max_trim +The maximum number of LBA ranges to be collected together for each DSM trims +send to the hardware. +Defaults to 256, which is the maximum number of ranges the protocol supports. +Sometimes poor trim performance can be mitigated by limiting the number of +ranges sent to the device. +This value must be between 1 and 256 inclusive. .El .Pp The following report per-device settings, and are read-only unless -otherwise indicated. Replace +otherwise indicated. +Replace .Va N with the device unit number. .Bl -tag -width 12 .It Va kern.cam.nda.N.rotating -.Pp This variable reports whether the storage volume is spinning or flash. -It's value is hard coded to 0 indicating flash. +Its value is hard coded to 0 indicating flash. .It Va kern.cam.nda.N.unmapped_io This variable reports whether the .Nm driver accepts unmapped I/O for this unit. +.It Va kern.cam.nda.N.flags +This variable reports the current flags. +.Bl -tag -width 12 +.It Va OPEN +The device is open. +.It Va DIRTY +Set when a write to the drive is scheduled. +Cleared after flush commands. +.It Va SCTX_INIT +Internal flag set after +.Xr sysctl 8 +nodes have been created. .El +.It Va kern.cam.nda.N.sort_io_queue +Same as the +.Va kern.cam.nda.sort_io_queue +tunable. +.It Va kern.cam.nda.N.trim_ticks +Writable. +When greater than zero, hold trims for up to this many ticks before sending +to the drive. +Sometimes waiting a little bit to collect more trims to send at one time +improves trim performance. +When 0, no delaying of trims are done. +.It Va kern.cam.nda.N.trim_goal +Writable. +When delaying a bit to collect multiple trims, send the accumulated DSM TRIM to +the drive. +.It Va kern.cam.nda.N.trim_lbas +Total number of LBAs that have been trimmed. +.It Va kern.cam.nda.N.trim_ranges +Total number of LBA ranges that have been trimmed. +.It Va kern.cam.nda.N.trim_count +Total number of trims sent to the hardware. +.It Va kern.cam.nda.N.deletes +Total number of +.Va BIO_DELETE +requests queued to the device. +.El +.Sh NAMESPACE MAPPING +Each +.Xr nvme 4 +drive has one or more namespaces associated with it. +One instance of the +.Nm +driver will be created for each of the namespaces on +the drive. +All the +.Nm +nodes for a +.Xr nvme 4 +device are at target 0. +However, the namespace ID maps to the CAM lun, as reported +in kernel messages and in the +.Va devlist +sub command of +.Xr camcontrol 8 . +.Pp +Namespaces are managed with the +.Va ns +sub command of +.Xr nvmecontrol 8 . +Not all drives support namespace management, +but all drives support at least one namespace. +Device nodes for +.Nm +will be created and destroyed dynamically as
Re: svn commit: r360956 - head/cddl/contrib/opensolaris/cmd/zfs
Andriy Gapon wrote: Author: avg Date: Tue May 12 09:04:57 2020 New Revision: 360956 URL: https://svnweb.freebsd.org/changeset/base/360956 Log: zfs allow/unallow should work with numeric uid/gid And that should work even (especially) if there is no matching user or group name. This change allows to see and modify delegations for deleted groups and users. The change is originally by Xin Li. illumos report: https://www.illumos.org/issues/6037 OpenZFS (ZoL) PR: https://github.com/openzfs/zfs/pull/10280 Obtained from: delphij MFC after: 2 weeks Also, PR: 200663. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r359950 - head/usr.sbin/bhyve
Shawn Webb wrote: This is the full output from bhyve: fbuf frame buffer base: 0x69191a0 [sz 16777216] bhyve: bootrom_alloc: vm_mmap_mapseg: No space left on device bhyve: vmgenc_init: bootrom_alloc I wonder if it's coincidence, and you really didn't have 16G to wire at that moment, and after reverting the commit it was there (reboot?) -- I was getting the same error well before this change when I had almost all of the memory eaten by ZFS ARC, I was looking at r359949 as possible candidate, but limiting that memory hog did make the issue disappear. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r360078 - in head: sbin/bectl share/man/man8
Mateusz Piotrowski wrote: On 4/18/20 11:11 PM, Yuri Pankov wrote: We don't have the man style guide (that I know of, at least) We have style.mdoc(5)! Now I know, thanks. May be it would make sense to reference it from style(9) as it's where I was looking, and SEE ALSO already lists style.Makefile and style.lua? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r360078 - in head: sbin/bectl share/man/man8
Alan Somers wrote: Author: asomers Date: Sat Apr 18 19:53:47 2020 New Revision: 360078 URL: https://svnweb.freebsd.org/changeset/base/360078 Log: bectl.8, beinstall.sh.8: fix man page section of beinstall.sh Reported by: phk MFC after: 2 weeks Modified: head/sbin/bectl/bectl.8 head/share/man/man8/beinstall.8 Modified: head/sbin/bectl/bectl.8 == --- head/sbin/bectl/bectl.8 Sat Apr 18 19:47:38 2020(r360077) +++ head/sbin/bectl/bectl.8 Sat Apr 18 19:53:47 2020(r360078) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2019 +.Dd April 18, 2020 .Dt BECTL 8 .Os .Sh NAME @@ -343,7 +343,7 @@ is specified. To fill in with jail upgrade example when behavior is firm. .El .Sh SEE ALSO -.Xr beinstall.sh 1 , +.Xr beinstall.sh 8 , .Xr libbe 3 , .Xr jail 8 , .Xr zfs 8 , This breaks the sorting used in SEE ALSO: $ mandoc -Tlint -Wwarning sbin/bectl/bectl.8 mandoc: sbin/bectl/bectl.8:347:2: WARNING: unusual Xr order: libbe(3) after beinstall.sh(8) We don't have the man style guide (that I know of, at least), but keeping it consistent would be nice. Modified: head/share/man/man8/beinstall.8 == --- head/share/man/man8/beinstall.8 Sat Apr 18 19:47:38 2020 (r360077) +++ head/share/man/man8/beinstall.8 Sat Apr 18 19:53:47 2020 (r360078) @@ -25,8 +25,8 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 20, 2018 -.Dt BEINSTALL.SH 1 +.Dd April 18, 2020 +.Dt BEINSTALL.SH 8 .Os .Sh NAME .Nm beinstall.sh ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358483 - head/sys/compat/linux
Tijl Coosemans wrote: Author: tijl Date: Sun Mar 1 13:12:04 2020 New Revision: 358483 URL: https://svnweb.freebsd.org/changeset/base/358483 Log: linuxulator: Map scheduler priorities to Linux priorities. On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to query the valid range using sched_get_priority_(min|max), but of course some programs assume the Linux values are valid. This commit adds a tunable compat.linux.map_sched_prio. When enabled sched_get_priority_(min|max) return the Linux values and sched_setscheduler and sched_(get|set)param translate between FreeBSD and Linux values. Because there are more Linux levels than FreeBSD levels, multiple Linux levels map to a single FreeBSD level, which means pre-emption might not happen as it does on Linux, so the tunable allows to disable this behaviour. It is enabled by default because I think it is unlikely that anyone runs real-time software under Linux emulation on FreeBSD that critically relies on correct pre-emption. This fixes FMOD, a commercial sound library used by several games. PR: 240043 Tested by: Alex S Reviewed by: dchagin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23790 Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h Modified: head/sys/compat/linux/linux_misc.c == --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) @@ -144,6 +144,11 @@ struct l_pselect6arg { l_size_tss_len; }; +static bool map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, +_sched_prio, 0, "Map scheduler priorities to Linux priorities " +"(not POSIX compliant)"); I'm seeing the following in the log: sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)! Should this be done for both linux and linux32 (when one exists) or made to install one time only? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358153 - head/usr.sbin/services_mkdb
On 20 Feb 2020, at 06:54, Pedro F. Giffuni wrote: > > Author: pfg > Date: Thu Feb 20 03:54:07 2020 > New Revision: 358153 > URL: https://svnweb.freebsd.org/changeset/base/358153 > > Log: > /etc/services: attempt bring the database to this century. > > Document better this file, updating the URL to the IANA registry and closely > match the official services. > > For system ports (0 to 1023) we now try to follow the registry closely, > noting > some historical differences where applicable. > For the User ports (1024 - 49151) we try to keep some sensible balance only > of services that are likely to be found on FreeBSD/UNIX systems. This > attempts > to strike a balance between complexity and usefulness. > > As a side effect: drop references to unofficial Kerberos IV which was EOL'ed > on Oct 2006[1]. While it is conceivable some people may still use it in some > very old FreeBSD machines that can't be replaced easily, the use of it is > considered a security risk. Also drop the unofficial netatalk, which we > supported long ago in the kernel but was dropped long ago. > > [1] https://web.mit.edu/kerberos/krb4-end-of-life.html > > MFC after: 3 weeks (likely to 12-stable only) > Differential Revision: https://reviews.freebsd.org/D23621 > > Modified: > head/usr.sbin/services_mkdb/services I noticed `mergemaster` failing, and it seems to be not happy with this change: # make installconfig installing DIRS CONFSDIR install -d -m 0755 -o root -g wheel /etc install -C -o root -g wheel -m 644 /usr/src/usr.sbin/services_mkdb/services /etc/services services_mkdb -l -q -o /var/db/services.db /etc/services services_mkdb: Ran out of protocols adding `divert'; recompile with larger PROTOMAX *** Error code 1 Stop. make: stopped in /usr/src/usr.sbin/services_mkdb ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi
On 18 Feb 2020, at 11:11, Baptiste Daroussin wrote: > > Author: bapt > Date: Tue Feb 18 08:11:52 2020 > New Revision: 358062 > URL: https://svnweb.freebsd.org/changeset/base/358062 > > Log: > Update ncurses to 20200118 > > Among the changes from before: > - Add support for extended colors on widechar version > - Enable ncurses extended functions > - Enable version 2 of the extended mouse support > - Enable SCREEN extensions > > Modification that differs from upstream: > - _nc_delink_entries used to be exposed and was turn static, >turn it back as dynamic to not break abi > - Adapt our old termcap.c to modern ncurses > > MFC after: 3 weeks Somewhat confusingly, I had to rebuild e.g. dialog4ports after this change as it was displaying garbage. May be a brief headsup is in order (or am I the only one seeing it)? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r353791 - head/tools/tools/locale
Author: yuripv Date: Mon Oct 21 03:01:05 2019 New Revision: 353791 URL: https://svnweb.freebsd.org/changeset/base/353791 Log: tools/tools/locale: allow POSIX target to be built in parallel While it's rarely used target, more so a one not used during the buildworld, it helps when it's not taking hours (literally). Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile == --- head/tools/tools/locale/MakefileMon Oct 21 01:27:01 2019 (r353790) +++ head/tools/tools/locale/MakefileMon Oct 21 03:01:05 2019 (r353791) @@ -143,37 +143,33 @@ ENCODINGS=Big5 \ KOI8-U \ SJIS \ US-ASCII \ - UTF-8 \ + UTF-8 - -POSIX: -.if exists (${UNIDIR}/tools/java/cldr.jar) - mkdir -p ${UNIDIR}/posix -. for area in ${BASE_LOCALES_OF_INTEREST} -.if !exists(${UNIDIR}/posix/${area}.UTF-8.src) +POSIX: posixsrc posixcol posixcm +.if !exists(${UNIDIR}/tools/java/cldr.jar) +.error check README about building cldr.jar +.endif +.for area in ${BASE_LOCALES_OF_INTEREST} +posixsrc: ${UNIDIR}/posix/${area}.UTF-8.src +${UNIDIR}/posix/${area}.UTF-8.src: java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \ org.unicode.cldr.posix.GeneratePOSIX \ -d ${UNIDIR}/posix -m ${area} -c UTF-8 -.endif -. endfor -. for area encoding in ${COLLATION_SPECIAL} -.if !exists(${UNIDIR}/posix/${area}.${encoding}.src) +.endfor +.for area encoding in ${COLLATION_SPECIAL} +posixcol: ${UNIDIR}/posix/${area}.${encoding}.src +${UNIDIR}/posix/${area}.${encoding}.src: java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \ org.unicode.cldr.posix.GeneratePOSIX \ -d ${UNIDIR}/posix -m ${area} -c ${encoding} -.endif -. endfor -. for enc in ${ENCODINGS} -. if !exists(${UNIDIR}/posix/${enc}.cm) +.endfor +.for enc in ${ENCODINGS} +posixcm: ${UNIDIR}/posix/${enc}.cm +${UNIDIR}/posix/${enc}.cm: java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \ org.unicode.cldr.posix.GenerateCharmap \ -d ${UNIDIR}/posix -c ${enc} -. endif -. endfor -.else - @echo "Please install CLDR toolset for the desired release" - @echo "It should go at ${UNIDIR}/tools" -.endif +.endfor clean-POSIX: rm -f ${UNIDIR}/posix/* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r353725 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux
Author: yuripv Date: Fri Oct 18 12:25:33 2019 New Revision: 353725 URL: https://svnweb.freebsd.org/changeset/base/353725 Log: linux: futex_mtx should follow futex_list Move futex_mtx to linux_common.ko for amd64 and aarch64 along with respective list/mutex init/destroy. PR: 240989 Reported by: Alex S Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/arm64/linux/linux_sysvec.c head/sys/compat/linux/linux.c head/sys/compat/linux/linux.h head/sys/compat/linux/linux_common.c head/sys/compat/linux/linux_futex.c head/sys/compat/linux/linux_futex.h head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c == --- head/sys/amd64/linux/linux_sysvec.c Fri Oct 18 10:28:08 2019 (r353724) +++ head/sys/amd64/linux/linux_sysvec.c Fri Oct 18 12:25:33 2019 (r353725) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -865,8 +864,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_register_handler(*lihp); - LIST_INIT(_list); - mtx_init(_mtx, "ftllk64", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux x86-64 ELF exec handler installed\n"); @@ -887,7 +884,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_unregister_handler(*lihp); - mtx_destroy(_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else Modified: head/sys/amd64/linux32/linux32_sysvec.c == --- head/sys/amd64/linux32/linux32_sysvec.c Fri Oct 18 10:28:08 2019 (r353724) +++ head/sys/amd64/linux32/linux32_sysvec.c Fri Oct 18 12:25:33 2019 (r353725) @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1023,8 +1022,6 @@ linux_elf_modevent(module_t mod, int type, void *data) if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux32_ioctl_register_handler(*lihp); - LIST_INIT(_list); - mtx_init(_mtx, "ftllk", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux ELF exec handler installed\n"); @@ -1045,7 +1042,6 @@ linux_elf_modevent(module_t mod, int type, void *data) if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux32_ioctl_unregister_handler(*lihp); - mtx_destroy(_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else Modified: head/sys/arm64/linux/linux_sysvec.c == --- head/sys/arm64/linux/linux_sysvec.c Fri Oct 18 10:28:08 2019 (r353724) +++ head/sys/arm64/linux/linux_sysvec.c Fri Oct 18 12:25:33 2019 (r353725) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -494,8 +493,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_register_handler(*lihp); - LIST_INIT(_list); - mtx_init(_mtx, "ftllk64", NULL, MTX_DEF); stclohz = (stathz ? stathz : hz); if (bootverbose) printf("Linux arm64 ELF exec handler installed\n"); @@ -515,7 +512,6 @@ linux64_elf_modevent(module_t mod, int type, void *dat if (error == 0) { SET_FOREACH(lihp, linux_ioctl_handler_set) linux_ioctl_unregister_handler(*lihp); - mtx_destroy(_mtx); if (bootverbose) printf("Linux ELF exec handler removed\n"); } else Modified: head/sys/compat/linux/linux.c == --- head/sys/compat/linux/linux.c Fri Oct 18
svn commit: r353724 - head/sys/compat/linux
Author: yuripv Date: Fri Oct 18 10:28:08 2019 New Revision: 353724 URL: https://svnweb.freebsd.org/changeset/base/353724 Log: linux: provide just one instance of futex_list Move futex_list definition to linux.c which is included once in linux.ko (i386) and in linux_common.ko (amd64 and aarch64) allowing 32/64 bit linux programs to access the same futexes in the latter case. PR: 240989 Reviewed by: dchagin Differential Revision:https://reviews.freebsd.org/D22073 Modified: head/sys/compat/linux/linux.c head/sys/compat/linux/linux.h head/sys/compat/linux/linux_futex.c head/sys/compat/linux/linux_futex.h Modified: head/sys/compat/linux/linux.c == --- head/sys/compat/linux/linux.c Fri Oct 18 09:09:32 2019 (r353723) +++ head/sys/compat/linux/linux.c Fri Oct 18 10:28:08 2019 (r353724) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +struct futex_list futex_list; + CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = { Modified: head/sys/compat/linux/linux.h == --- head/sys/compat/linux/linux.h Fri Oct 18 09:09:32 2019 (r353723) +++ head/sys/compat/linux/linux.h Fri Oct 18 10:28:08 2019 (r353724) @@ -140,4 +140,6 @@ void bsd_to_linux_sigset(sigset_t *, l_sigset_t *); int linux_to_bsd_signal(int sig); int bsd_to_linux_signal(int sig); +extern LIST_HEAD(futex_list, futex) futex_list; + #endif /* _LINUX_MI_H_ */ Modified: head/sys/compat/linux/linux_futex.c == --- head/sys/compat/linux/linux_futex.c Fri Oct 18 09:09:32 2019 (r353723) +++ head/sys/compat/linux/linux_futex.c Fri Oct 18 10:28:08 2019 (r353724) @@ -207,8 +207,6 @@ struct futex { TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; }; -struct futex_list futex_list; - #define FUTEX_LOCK(f) mtx_lock(&(f)->f_lck) #define FUTEX_LOCKED(f)mtx_owned(&(f)->f_lck) #define FUTEX_UNLOCK(f)mtx_unlock(&(f)->f_lck) Modified: head/sys/compat/linux/linux_futex.h == --- head/sys/compat/linux/linux_futex.h Fri Oct 18 09:09:32 2019 (r353723) +++ head/sys/compat/linux/linux_futex.h Fri Oct 18 10:28:08 2019 (r353724) @@ -38,7 +38,6 @@ #ifndef _LINUX_FUTEX_H #define _LINUX_FUTEX_H -extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; #define LINUX_FUTEX_WAIT0 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r353335 - head/usr.sbin/bsdinstall/scripts
Author: yuripv Date: Wed Oct 9 05:28:10 2019 New Revision: 353335 URL: https://svnweb.freebsd.org/changeset/base/353335 Log: bsdinstall: fix ESP detection for auto ZFS layout Pass the list of user selected disks from zfsboot to bootconfig so that the latter doesn't rely on ESP autodetection that apparently fails for some cases, e.g. memstick installation with nvme (boot) and sata drives. While here, fix printing of debug messages in bootconfig. Reviewed by: bcran, imp, tsoome Differential Revision:https://reviews.freebsd.org/D21930 Modified: head/usr.sbin/bsdinstall/scripts/bootconfig head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/bootconfig == --- head/usr.sbin/bsdinstall/scripts/bootconfig Wed Oct 9 02:02:22 2019 (r353334) +++ head/usr.sbin/bsdinstall/scripts/bootconfig Wed Oct 9 05:28:10 2019 (r353335) @@ -27,6 +27,9 @@ # # $FreeBSD$ +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + die() { echo $* exit 1 @@ -47,7 +50,8 @@ if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "i fi if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then - UFSBOOT_ESPS=$(cat /tmp/bsdinstall-esps) + UFSBOOT_ESPS=$(cat /tmp/bsdinstall-esps 2>/dev/null) + ZFSBOOT_DISKS=$(cat /tmp/bsdinstall-zfsboot 2>/dev/null) num_esps=0 if [ -n "$ZFSBOOT_DISKS" ]; then @@ -119,20 +123,20 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" fi for esp in $ESPS; do - echo "Formatting /dev/${esp} as FAT32" + f_dprintf "Formatting /dev/${esp} as FAT32" newfs_msdos -F 32 -c 1 -L EFISYS "/dev/$esp" > /dev/null 2>&1 if [ $? -ne 0 ]; then die "Failed to format ESP $esp as FAT32" fi mntpt=$(mktemp -d /tmp/stand-test.XX) - echo "Mounting ESP /dev/${esp}" + f_dprintf "Mounting ESP /dev/${esp}" mount -t msdosfs "/dev/${esp}" "${mntpt}" if [ $? -ne 0 ]; then die "Failed to mount ESP ${dev} on ${mntpt}" fi - echo "Installing loader.efi onto ESP" + f_dprintf "Installing loader.efi onto ESP" mkdir -p "$mntpt/EFI/freebsd" cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/EFI/freebsd/loader.efi" @@ -142,14 +146,14 @@ if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" bootlabel="FreeBSD" fi - echo "Creating UEFI boot entry" + f_dprintf "Creating UEFI boot entry" efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/EFI/freebsd/loader.efi" > /dev/null - echo "Unmounting ESP" + f_dprintf "Unmounting ESP" umount "${mntpt}" rmdir "${mntpt}" - echo "Finished configuring /dev/${esp} as ESP" + f_dprintf "Finished configuring /dev/${esp} as ESP" done fi Modified: head/usr.sbin/bsdinstall/scripts/zfsboot == --- head/usr.sbin/bsdinstall/scripts/zfsbootWed Oct 9 02:02:22 2019 (r353334) +++ head/usr.sbin/bsdinstall/scripts/zfsbootWed Oct 9 05:28:10 2019 (r353335) @@ -1656,6 +1656,9 @@ while :; do zfs_create_boot "$ZFSBOOT_POOL_NAME" \ "$vdev_type" $ZFSBOOT_DISKS || continue + # To be reused by bootconfig + echo "$ZFSBOOT_DISKS" > /tmp/bsdinstall-zfsboot + break # to success ;; ?" $msg_pool_type_disks") ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r353130 - in head: share/ctypedef tools/tools/locale/tools
Author: yuripv Date: Sat Oct 5 22:17:54 2019 New Revision: 353130 URL: https://svnweb.freebsd.org/changeset/base/353130 Log: Mark "private use area" characters as printable. At least some of the characters in E000-F8FF range are used by Powerline fonts, and having no attributes for these ranges in UnicodeData.txt other than "Other, Private Use" it should be safe to mark all of them as printable. Some actually were before r340491, so this fixes the regression introduced there as well. PR: 240911 Reviewed by: bapt Tested by:Daniel Ponte Differential Revision:https://reviews.freebsd.org/D21850 Modified: head/share/ctypedef/C.UTF-8.src head/tools/tools/locale/tools/utf8-rollup.pl Modified: head/share/ctypedef/C.UTF-8.src == --- head/share/ctypedef/C.UTF-8.src Sat Oct 5 21:52:06 2019 (r353129) +++ head/share/ctypedef/C.UTF-8.src Sat Oct 5 22:17:54 2019 (r353130) @@ -16434,7 +16434,6 @@ cntrl ;/ ;/ ;/ ;/ - ;...;;/ ;/ ;/ ;/ @@ -16549,9 +16548,7 @@ cntrl ;/ ;/ ;/ ;/ - ;/ - ;...;;/ - ;...; + digit ;/ ;/ ;/ @@ -22555,6 +22552,7 @@ graph ;/ ;/ ;/ ;/ + ;...;;/ ;/ ;/ ;/ @@ -27547,7 +27545,9 @@ graph ;/ ;/ ;/ ;/ - + ;/ + ;...;;/ + ;...; lower ;/ ;/ ;/ Modified: head/tools/tools/locale/tools/utf8-rollup.pl == --- head/tools/tools/locale/tools/utf8-rollup.plSat Oct 5 21:52:06 2019(r353129) +++ head/tools/tools/locale/tools/utf8-rollup.plSat Oct 5 22:17:54 2019(r353130) @@ -161,7 +161,8 @@ sub parse_unidata { $cat = "alpha"; } elsif ($d[2] =~ /^P/) { $cat = "punct"; - } elsif ($d[2] =~ /^M/ || $d[2] =~ /^N/ || $d[2] =~ /^S/) { + } elsif ($d[2] =~ /^Co/ || $d[2] =~ /^M/ || $d[2] =~ /^N/ || + $d[2] =~ /^S/) { $cat = "graph"; } elsif ($d[2] =~ /^C/) { $cat = "cntrl"; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r353127 - in head/tools/tools/locale: etc/final-maps tools
Author: yuripv Date: Sat Oct 5 21:28:46 2019 New Revision: 353127 URL: https://svnweb.freebsd.org/changeset/base/353127 Log: Pre-generate Big5 charmap from CLDR data. The one used previously was missing the characters in 0-127 range, making various tools try to escape them in output. PR: 235100 Reviewed by: bapt Tested by:Ting-Wei Lan Differential Revision:https://reviews.freebsd.org/D21794 Modified: head/tools/tools/locale/etc/final-maps/map.Big5 (contents, props changed) head/tools/tools/locale/tools/finalize Modified: head/tools/tools/locale/etc/final-maps/map.Big5 == --- head/tools/tools/locale/etc/final-maps/map.Big5 Sat Oct 5 17:44:33 2019(r353126) +++ head/tools/tools/locale/etc/final-maps/map.Big5 Sat Oct 5 21:28:46 2019(r353127) @@ -1,13708 +1,13968 @@ +## +# POSIX charmap +# Generated automatically from the Unicode Character Database and Common Locale Data Repository +# see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html +# charset: Big5 +## +# +# Copyright 1991-2011 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in # +# http://www.unicode.org/copyright.html. # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode # +# data files and any associated documentation (the "Data Files") or Unicode software and any# +# associated documentation (the "Software") to deal in the Data Files or Software without # +# restriction, including without limitation the rights to use, copy, modify, merge, publish,# +# distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom # +# the Data Files or Software are furnished to do so, provided that (a) the above copyright # +# notice(s) and this permission notice appear with all copies of the Data Files or Software,# +# (b) both the above copyright notice(s) and this permission notice appear in associated# +# documentation, and (c) there is clear notice in each modified Data File or in the Software as # +# well as in the documentation associated with the Data File(s) or Software that the data or# +# software has been modified. # +# # +# THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR# +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A# +# PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT # +# HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR # +# CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # +# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # +# CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. # +# + "Big5" - 1 - 2 +1 +2 + CHARMAP - \xa1\x40 - \xa1\x41 - \xa1\x42 - \xa1\x43 - \xa1\x44 - \xa1\x45 - \xa1\x46 - \xa1\x47 - \xa1\x48 - \xa1\x49 - \xa1\x4a - \xa1\x4b - \xa1\x4c - \xa1\x4d - \xa1\x4e - \xa1\x4f - \xa1\x50 - \xa1\x51 - \xa1\x52 - \xa1\x53 - \xa1\x54 - \xa1\x55 - \xa1\x56 - \xa1\x57 - \xa1\x58 - \xa1\x59 - \xa1\x5b - \xa1\x5c - \xa1\x5d - \xa1\x5e - \xa1\x5f - \xa1\x60 - \xa1\x61 - \xa1\x62 - \xa1\x63 - \xa1\x64 - \xa1\x65 - \xa1\x66 - \xa1\x67 - \xa1\x68 - \xa1\x69 - \xa1\x6a - \xa1\x6b - \xa1\x6c - \xa1\x6d - \xa1\x6e - \xa1\x6f - \xa1\x70 - \xa1\x71 - \xa1\x72 - \xa1\x73 - \xa1\x74 - \xa1\x75 - \xa1\x76 - \xa1\x77 - \xa1\x78 - \xa1\x79 - \xa1\x7a - \xa1\x7b - \xa1\x7c - \xa1\x7d - \xa1\x7e - \xa1\xa1 - \xa1\xa2 - \xa1\xa3 - \xa1\xa4 - \xa1\xa5 - \xa1\xa6 - \xa1\xa7 - \xa1\xa8 - \xa1\xa9 - \xa1\xaa - \xa1\xab - \xa1\xac - \xa1\xad - \xa1\xae - \xa1\xaf - \xa1\xb0 - \xa1\xb1 - \xa1\xb2 - \xa1\xb3 - \xa1\xb4 - \xa1\xb5 - \xa1\xb6 - \xa1\xb7 - \xa1\xb8 - \xa1\xb9 - \xa1\xba - \xa1\xbb - \xa1\xbc - \xa1\xbd - \xa1\xbe - \xa1\xbf - \xa1\xc0 - \xa1\xc1 - \xa1\xc2 - \xa1\xc4 - \xa1\xc6 - \xa1\xc7 - \xa1\xc8 - \xa1\xc9 - \xa1\xca - \xa1\xcb - \xa1\xcc - \xa1\xcd - \xa1\xce - \xa1\xcf - \xa1\xd0 - \xa1\xd1 - \xa1\xd2 - \xa1\xd3 - \xa1\xd4 - \xa1\xd5 - \xa1\xd6 - \xa1\xd7 - \xa1\xd8 - \xa1\xd9 - \xa1\xda - \xa1\xdb - \xa1\xdc - \xa1\xdd - \xa1\xde - \xa1\xdf - \xa1\xe0
svn commit: r352726 - head/usr.sbin/efibootmgr
Author: yuripv Date: Wed Sep 25 21:23:30 2019 New Revision: 352726 URL: https://svnweb.freebsd.org/changeset/base/352726 Log: efibootmgr(8): fix markup and style issues - split synopsis into separate options that can't be used together - sort options - fix (style) issues reported by mandoc lint Reviewed by: imp Differential Revision:https://reviews.freebsd.org/D21710 Modified: head/usr.sbin/efibootmgr/efibootmgr.8 Modified: head/usr.sbin/efibootmgr/efibootmgr.8 == --- head/usr.sbin/efibootmgr/efibootmgr.8 Wed Sep 25 20:46:09 2019 (r352725) +++ head/usr.sbin/efibootmgr/efibootmgr.8 Wed Sep 25 21:23:30 2019 (r352726) @@ -24,20 +24,42 @@ .\" .\" $FreeBSD$ .\" -.Dd December 28, 2018 +.Dd September 24, 2019 .Dt EFIBOOTMGR 8 .Os .Sh NAME -.Nm efibootmgr +.Nm efibootmgr .Nd manipulate the EFI Boot Manager .Sh SYNOPSIS -.Op Fl aAnNB -.Op Fl b Ar bootnum -.Op Fl t Ar timeout -.Op Fl T -.Op Fl o Ar bootorder +.Nm .Op Fl v -.Op Fl c l Ar loader [ Fl k Ar kernel ] [ Fl L Ar label ] [ Fl -dry-run ] +.Nm +.Fl a +.Fl b Ar bootnum +.Nm +.Fl A +.Fl b Ar bootnum +.Nm +.Fl B +.Fl b Ar bootnum +.Nm +.Fl c +.Fl l Ar loader +.Op Fl aD +.Op Fl b Ar bootnum +.Op Fl k Ar kernel +.Op Fl L Ar label +.Nm +.Fl n +.Fl b Ar bootnum +.Nm +.Fl N +.Nm +.Fl o Ar bootorder +.Nm +.Fl t Ar timeout +.Nm +.Fl T .Sh "DESCRIPTION" .Nm manipulates how UEFI Boot Managers boot the system. @@ -50,13 +72,13 @@ The UEFI standard defines how hosts may control what i bootstrap the system. Each method is encapsulated within a persistent UEFI variable, stored by the UEFI BIOS of the form -.Va Boot . +.Cm Boot Ns Em . These variables are numbered, describe where to load the bootstrap program from, and whether or not the method is active. The boot order of these methods is controlled by another variable -.Va BootOrder . -The currently booting method is communicated using -.Va BootCurrent . +.Cm BootOrder . +The currently booting method is communicated using +.Cm BootCurrent . A global timeout can also be set. .Pp .Nm @@ -64,91 +86,133 @@ requires that the kernel efirt module be loaded to get non-volatile variables. .Pp The following options are available: -.Bl -tag -width 28m -.It Fl c Fl -create -Create a new Boot Variable -.It Fl l -loader Ar loader -The path to and name of the loader. -.It Fl k -kernel Ar kernel -The path to and name of the kernel. +.Bl -tag -width Ds +.It Fl a -activate +Activate the given +.Ar bootnum +boot entry, or the new entry when used with +.Fl c . +.It Fl A -deactivate +Deactivate the given +.Ar bootnum +boot entry. .It Fl b -bootnum Ar bootnum -When creating or modifying an entry, use bootnum as the index. +When creating or modifying an entry, use +.Ar bootnum +as the index. When creating a new entry, fail if it already exists. -.It Fl L -label Ar label -An optional description for the entry. +.It Fl B -delete +Delete the given +.Ar bootnum +boot entry. +.It Fl c -create +Create a new +.Cm Boot +variable. .It Fl D -dry-run Process but do not change any variables. -.It Fl B -delete -Delete the given bootnum boot entry. -.It Fl a -activate -Activate the given bootnum boot entry, or the new entry when used with -c. -.It Fl A -deactivate -Deactivate the given bootnum boot entry. +.It Fl k -kernel Ar kernel +The path to and name of the kernel. +.It Fl l -loader Ar loader +The path to and name of the loader. +.It Fl L -label Ar label +An optional description for the entry. .It Fl n -bootnext -Set bootnum boot entry as the BootNext variable. -.It Fl N -delete-bootnext -Delete the BootNext optional variable. +Set +.Ar bootnum +boot entry as the +.Cm BootNext +variable. +.It Fl N -delete-bootnext +Delete the +.Cm BootNext +optional variable. .It Fl o -bootorder Ar bootorder -Set BootOrder variable to the given comma delimited set of bootnums. -The numbers are in hex to match Boot, but may omit leading zeros. +Set +.Cm BootOrder +variable to the given comma delimited set of +.Ar bootnum Ns s . +The numbers are in hex to match +.Cm Boot Ns Em , +but may omit leading zeros. .It Fl t -set-timeout Ar timeout Set the bootmenu timeout value. .It Fl T -del-timeout -Delete the BootTimeout variable. +Delete the +.Cm BootTimeout +variable. .It Fl v -verbose Display the device path of boot entries in the output. .El -.Pp .Sh Examples +To display the current +.Cm Boot +related variables in the system: .Pp -To display the current Boot related variables in the system: -.Pp .Dl efibootmgr [-v] .Pp -This will display the optional BootNext bootnum, BootCurrent, -or currently booted bootnum, followed by the optional Timeout value, any -BootOrder that may be set, followed finally by all currently defined Boot -variables, active or not. The verbose flag will augment this output with -the disk partition uuids, size/offset and device-path of the -variable. +This will
svn commit: r352651 - head/lib/libc/regex
Author: yuripv Date: Tue Sep 24 12:21:01 2019 New Revision: 352651 URL: https://svnweb.freebsd.org/changeset/base/352651 Log: lib/libc/regex: fix build with REDEBUG defined Reviewed by: kevans Differential Revision:https://reviews.freebsd.org/D21760 Modified: head/lib/libc/regex/engine.c head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/engine.c == --- head/lib/libc/regex/engine.cTue Sep 24 06:37:01 2019 (r352650) +++ head/lib/libc/regex/engine.cTue Sep 24 12:21:01 2019 (r352651) @@ -1068,7 +1068,7 @@ print(struct match *m, fprintf(d, " %s", pchar(ch)); for (i = 0; i < g->nstates; i++) if (ISSET(st, i)) { - fprintf(d, "%s%d", (first) ? "\t" : ", ", i); + fprintf(d, "%s%lu", (first) ? "\t" : ", ", i); first = 0; } fprintf(d, "\n"); Modified: head/lib/libc/regex/regcomp.c == --- head/lib/libc/regex/regcomp.c Tue Sep 24 06:37:01 2019 (r352650) +++ head/lib/libc/regex/regcomp.c Tue Sep 24 12:21:01 2019 (r352651) @@ -196,12 +196,6 @@ static char nuls[10]; /* place to point scanner in ev #defineTHERETHERE()(p->slen - 2) #defineDROP(n) (p->slen -= (n)) -#ifndef NDEBUG -static int never = 0; /* for use in asserts; shuts lint up */ -#else -#definenever 0 /* some s have bugs too */ -#endif - /* Macro used by computejump()/computematchjump() */ #define MIN(a,b) ((a)<(b)?(a):(b)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r352416 - in stable/12: etc/mtree usr.bin/locale usr.bin/locale/tests
Author: yuripv Date: Mon Sep 16 16:17:29 2019 New Revision: 352416 URL: https://svnweb.freebsd.org/changeset/base/352416 Log: MFC r352138, r352214, r352216: locale: handle day, abday, mon, abmon, am_pm keywords All of these are defined as mandatory by POSIX. While here, mark all non-standard ones as FreeBSD-only as other systems (at least, GNU/Linux and illumos) do not handle them, so we should not encourage their use. - make abday, day, abmon, mon, am_pm output quoting match linux - workaround localeconv() issue for mon_grouping and grouping (PR172215) - for other values not available in default locale, output -1 instead of 127 (CHAR_MAX) as returned by localeconv() PR: 237752 Added: stable/12/usr.bin/locale/tests/ - copied from r352138, head/usr.bin/locale/tests/ stable/12/usr.bin/locale/tests/no_flags_posix_messages.out - copied unchanged from r352214, head/usr.bin/locale/tests/no_flags_posix_messages.out stable/12/usr.bin/locale/tests/no_flags_posix_monetary.out - copied unchanged from r352214, head/usr.bin/locale/tests/no_flags_posix_monetary.out stable/12/usr.bin/locale/tests/no_flags_posix_numeric.out - copied unchanged from r352214, head/usr.bin/locale/tests/no_flags_posix_numeric.out stable/12/usr.bin/locale/tests/no_flags_posix_time.out - copied unchanged from r352214, head/usr.bin/locale/tests/no_flags_posix_time.out Modified: stable/12/etc/mtree/BSD.tests.dist stable/12/usr.bin/locale/Makefile stable/12/usr.bin/locale/locale.c stable/12/usr.bin/locale/tests/Makefile stable/12/usr.bin/locale/tests/k_flag_posix_monetary.out stable/12/usr.bin/locale/tests/k_flag_posix_numeric.out stable/12/usr.bin/locale/tests/k_flag_posix_time.out stable/12/usr.bin/locale/tests/locale_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.tests.dist == --- stable/12/etc/mtree/BSD.tests.dist Mon Sep 16 16:10:44 2019 (r352415) +++ stable/12/etc/mtree/BSD.tests.dist Mon Sep 16 16:17:29 2019 (r352416) @@ -1000,6 +1000,8 @@ .. limits .. +locale +.. m4 .. mkimg Modified: stable/12/usr.bin/locale/Makefile == --- stable/12/usr.bin/locale/Makefile Mon Sep 16 16:10:44 2019 (r352415) +++ stable/12/usr.bin/locale/Makefile Mon Sep 16 16:17:29 2019 (r352416) @@ -1,6 +1,12 @@ # $FreeBSD$ +.include + PROG= locale CFLAGS+= -I${SRCTOP}/lib/libc/locale +LIBADD+= sbuf + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Modified: stable/12/usr.bin/locale/locale.c == --- stable/12/usr.bin/locale/locale.c Mon Sep 16 16:10:44 2019 (r352415) +++ stable/12/usr.bin/locale/locale.c Mon Sep 16 16:17:29 2019 (r352416) @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -53,13 +54,13 @@ #include "setlocale.h" /* Local prototypes */ -char *format_grouping(const char *); +char *format_grouping(char *); void init_locales_list(void); void list_charmaps(void); void list_locales(void); const char *lookup_localecat(int); char *kwval_lconv(int); -intkwval_lookup(const char *, char **, int *, int *); +intkwval_lookup(const char *, char **, int *, int *, int *); void showdetails(const char *); void showkeywordslist(char *substring); void showlocale(void); @@ -87,141 +88,264 @@ static const struct _lcinfo { #defineNLCINFO nitems(lcinfo) /* ids for values not referenced by nl_langinfo() */ -#defineKW_ZERO 1 -#defineKW_GROUPING (KW_ZERO+1) -#defineKW_INT_CURR_SYMBOL (KW_ZERO+2) -#defineKW_CURRENCY_SYMBOL (KW_ZERO+3) -#defineKW_MON_DECIMAL_POINT(KW_ZERO+4) -#defineKW_MON_THOUSANDS_SEP(KW_ZERO+5) -#defineKW_MON_GROUPING (KW_ZERO+6) -#defineKW_POSITIVE_SIGN(KW_ZERO+7) -#defineKW_NEGATIVE_SIGN(KW_ZERO+8) -#defineKW_INT_FRAC_DIGITS (KW_ZERO+9) -#defineKW_FRAC_DIGITS (KW_ZERO+10) -#defineKW_P_CS_PRECEDES(KW_ZERO+11) -#defineKW_P_SEP_BY_SPACE (KW_ZERO+12) -#defineKW_N_CS_PRECEDES(KW_ZERO+13) -#defineKW_N_SEP_BY_SPACE (KW_ZERO+14) -#defineKW_P_SIGN_POSN (KW_ZERO+15) -#defineKW_N_SIGN_POSN (KW_ZERO+16) -#defineKW_INT_P_CS_PRECEDES(KW_ZERO+17) -#defineKW_INT_P_SEP_BY_SPACE (KW_ZERO+18) -#defineKW_INT_N_CS_PRECEDES(KW_ZERO+19) -#defineKW_INT_N_SEP_BY_SPACE (KW_ZERO+20) -#defineKW_INT_P_SIGN_POSN (KW_ZERO+21) -#defineKW_INT_N_SIGN_POSN (KW_ZERO+22)
svn commit: r352415 - stable/12/sys/dev/ichsmb
Author: yuripv Date: Mon Sep 16 16:10:44 2019 New Revision: 352415 URL: https://svnweb.freebsd.org/changeset/base/352415 Log: MFC r351604: ichsmb: defer smbus attach until interrupts are available This fixes a "timed sleep before timers are working" panic seen while attaching jedec_dimm(4) instances too early in the boot. Submitted by: ian Reviewed by: hselasky Differential Revision:https://reviews.freebsd.org/D21452 Modified: stable/12/sys/dev/ichsmb/ichsmb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ichsmb/ichsmb.c == --- stable/12/sys/dev/ichsmb/ichsmb.c Mon Sep 16 15:56:21 2019 (r352414) +++ stable/12/sys/dev/ichsmb/ichsmb.c Mon Sep 16 16:10:44 2019 (r352415) @@ -131,11 +131,8 @@ ichsmb_attach(device_t dev) goto fail; } - /* Attach "smbus" child */ - if ((error = bus_generic_attach(dev)) != 0) { - device_printf(dev, "failed to attach child: %d\n", error); - goto fail; - } + /* Probe and attach the smbus when interrupts are available */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); return (0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r352391 - head/share/man/man9
Author: yuripv Date: Mon Sep 16 13:10:03 2019 New Revision: 352391 URL: https://svnweb.freebsd.org/changeset/base/352391 Log: sbuf(9): fix sbuf_drain_func typedef markup Reviewed by: 0mp (previous version) Differential Revision:https://reviews.freebsd.org/D21569 Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 == --- head/share/man/man9/sbuf.9 Mon Sep 16 12:54:44 2019(r352390) +++ head/share/man/man9/sbuf.9 Mon Sep 16 13:10:03 2019(r352391) @@ -65,7 +65,12 @@ .Sh SYNOPSIS .In sys/types.h .In sys/sbuf.h -.Ft typedef\ int ( sbuf_drain_func ) ( void\ *arg, const\ char\ *data, int\ len ) ; +.Ft typedef int +.Fo (sbuf_drain_func) +.Fa "void *arg" +.Fa "const char *data" +.Fa "int len" +.Fc .Pp .Ft struct sbuf * .Fo sbuf_new ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r352216 - head/usr.bin/locale
Author: yuripv Date: Wed Sep 11 16:00:03 2019 New Revision: 352216 URL: https://svnweb.freebsd.org/changeset/base/352216 Log: locale: initialize variables to make gcc happy Reported by: jenkins Modified: head/usr.bin/locale/locale.c Modified: head/usr.bin/locale/locale.c == --- head/usr.bin/locale/locale.cWed Sep 11 15:41:36 2019 (r352215) +++ head/usr.bin/locale/locale.cWed Sep 11 16:00:03 2019 (r352216) @@ -745,7 +745,7 @@ kwval_ltime(int id) { char *rval; struct sbuf *kwsbuf; - nl_item i, s_item, e_item; + nl_item i, s_item = 0, e_item = 0; switch (id) { case KW_TIME_DAY: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r352214 - in head/usr.bin/locale: . tests
Author: yuripv Date: Wed Sep 11 15:39:28 2019 New Revision: 352214 URL: https://svnweb.freebsd.org/changeset/base/352214 Log: locale: more output fixes - make abday, day, abmon, mon, am_pm output quoting match linux - workaround localeconv() issue for mon_grouping and grouping (PR172215) - for other values not available in default locale, output -1 instead of 127 (CHAR_MAX) as returned by localeconv() With these changes, output of `locale` and `locale -k` for all keywords specified by POSIX exactly matches the linux one. PR: 237752 Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D21599 Added: head/usr.bin/locale/tests/no_flags_posix_messages.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_monetary.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_numeric.out (contents, props changed) head/usr.bin/locale/tests/no_flags_posix_time.out (contents, props changed) Modified: head/usr.bin/locale/locale.c head/usr.bin/locale/tests/Makefile head/usr.bin/locale/tests/k_flag_posix_monetary.out head/usr.bin/locale/tests/k_flag_posix_numeric.out head/usr.bin/locale/tests/k_flag_posix_time.out head/usr.bin/locale/tests/locale_test.sh Modified: head/usr.bin/locale/locale.c == --- head/usr.bin/locale/locale.cWed Sep 11 13:35:22 2019 (r352213) +++ head/usr.bin/locale/locale.cWed Sep 11 15:39:28 2019 (r352214) @@ -54,7 +54,7 @@ #include "setlocale.h" /* Local prototypes */ -char *format_grouping(const char *); +char *format_grouping(char *); void init_locales_list(void); void list_charmaps(void); void list_locales(void); @@ -119,6 +119,12 @@ enum { }; enum { + TYPE_NUM, + TYPE_STR, + TYPE_UNQ +}; + +enum { SRC_LINFO, SRC_LCONV, SRC_LTIME @@ -126,218 +132,218 @@ enum { static const struct _kwinfo { const char *name; - int isstr; /* true - string, false - number */ + int type; int catid; /* LC_* */ int source; int value_ref; const char *comment; } kwinfo [] = { - { "charmap",1, LC_CTYPE,SRC_LINFO, + { "charmap",TYPE_STR, LC_CTYPE, SRC_LINFO, CODESET, "" },/* hack */ /* LC_MONETARY - POSIX */ - { "int_curr_symbol",1, LC_MONETARY, SRC_LCONV, + { "int_curr_symbol",TYPE_STR, LC_MONETARY, SRC_LCONV, KW_INT_CURR_SYMBOL, "" }, - { "currency_symbol",1, LC_MONETARY, SRC_LCONV, + { "currency_symbol",TYPE_STR, LC_MONETARY, SRC_LCONV, KW_CURRENCY_SYMBOL, "" }, - { "mon_decimal_point", 1, LC_MONETARY, SRC_LCONV, + { "mon_decimal_point", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_MON_DECIMAL_POINT, "" }, - { "mon_thousands_sep", 1, LC_MONETARY, SRC_LCONV, + { "mon_thousands_sep", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_MON_THOUSANDS_SEP, "" }, - { "mon_grouping", 1, LC_MONETARY, SRC_LCONV, + { "mon_grouping", TYPE_UNQ, LC_MONETARY, SRC_LCONV, KW_MON_GROUPING, "" }, - { "positive_sign", 1, LC_MONETARY, SRC_LCONV, + { "positive_sign", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_POSITIVE_SIGN, "" }, - { "negative_sign", 1, LC_MONETARY, SRC_LCONV, + { "negative_sign", TYPE_STR, LC_MONETARY, SRC_LCONV, KW_NEGATIVE_SIGN, "" }, - { "int_frac_digits",0, LC_MONETARY, SRC_LCONV, + { "int_frac_digits",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_INT_FRAC_DIGITS, "" }, - { "frac_digits",0, LC_MONETARY, SRC_LCONV, + { "frac_digits",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_FRAC_DIGITS, "" }, - { "p_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "p_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_CS_PRECEDES, "" }, - { "p_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "p_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_SEP_BY_SPACE, "" }, - { "n_cs_precedes", 0, LC_MONETARY, SRC_LCONV, + { "n_cs_precedes", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_CS_PRECEDES, "" }, - { "n_sep_by_space", 0, LC_MONETARY, SRC_LCONV, + { "n_sep_by_space", TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_SEP_BY_SPACE, "" }, - { "p_sign_posn",0, LC_MONETARY, SRC_LCONV, + { "p_sign_posn",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_P_SIGN_POSN, "" }, - { "n_sign_posn",0, LC_MONETARY, SRC_LCONV, + { "n_sign_posn",TYPE_NUM, LC_MONETARY, SRC_LCONV, KW_N_SIGN_POSN, "" }, - {
svn commit: r352138 - in head: etc/mtree usr.bin/locale usr.bin/locale/tests
mpat */ - { "yesexpr",1, LC_MESSAGES, YESEXPR, "" }, - { "noexpr", 1, LC_MESSAGES, NOEXPR, "" }, - { "yesstr", 1, LC_MESSAGES, YESSTR, - "(POSIX legacy)" }, /* compat */ - { "nostr", 1, LC_MESSAGES, NOSTR, - "(POSIX legacy)" }/* compat */ - }; #defineNKWINFO (nitems(kwinfo)) @@ -522,7 +640,7 @@ format_grouping(const char *binary) } /* - * keyword value lookup helper (via localeconv()) + * keyword value lookup helper for values accessible via localeconv() */ char * kwval_lconv(int id) @@ -606,24 +724,86 @@ kwval_lconv(int id) } /* + * keyword value lookup helper for LC_TIME keywords not accessible + * via nl_langinfo() or localeconv() + */ +static char * +kwval_ltime(int id) +{ + char *rval; + struct sbuf *kwsbuf; + nl_item i, s_item, e_item; + + switch (id) { + case KW_TIME_DAY: + s_item = DAY_1; + e_item = DAY_7; + break; + case KW_TIME_ABDAY: + s_item = ABDAY_1; + e_item = ABDAY_7; + break; + case KW_TIME_MON: + s_item = MON_1; + e_item = MON_12; + break; + case KW_TIME_ABMON: + s_item = ABMON_1; + e_item = ABMON_12; + break; + case KW_TIME_AM_PM: + if (asprintf(, "%s\";\"%s", + nl_langinfo(AM_STR), + nl_langinfo(PM_STR)) == -1) + err(1, "asprintf"); + return (rval); + } + + kwsbuf = sbuf_new_auto(); + if (kwsbuf == NULL) + err(1, "sbuf"); + for (i = s_item; i <= e_item; i++) { + if (i != s_item) + (void) sbuf_cat(kwsbuf, "\""); + (void) sbuf_cat(kwsbuf, nl_langinfo(i)); + if (i != e_item) + (void) sbuf_cat(kwsbuf, "\";"); + } + (void) sbuf_finish(kwsbuf); + rval = strdup(sbuf_data(kwsbuf)); + if (rval == NULL) + err(1, "strdup"); + sbuf_delete(kwsbuf); + return (rval); +} + +/* * keyword value and properties lookup */ int -kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr) +kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr, int *alloc) { int rval; size_t i; rval = 0; + *alloc = 0; for (i = 0; i < NKWINFO; i++) { if (strcasecmp(kwname, kwinfo[i].name) == 0) { rval = 1; *cat = kwinfo[i].catid; *isstr = kwinfo[i].isstr; - if (kwinfo[i].value_ref < KW_ZERO) { + switch (kwinfo[i].source) { + case SRC_LINFO: *kwval = nl_langinfo(kwinfo[i].value_ref); - } else { + break; + case SRC_LCONV: *kwval = kwval_lconv(kwinfo[i].value_ref); + break; + case SRC_LTIME: + *kwval = kwval_ltime(kwinfo[i].value_ref); + *alloc = 1; + break; } break; } @@ -639,10 +819,10 @@ kwval_lookup(const char *kwname, char **kwval, int *ca void showdetails(const char *kw) { - int isstr, cat, tmpval; + int isstr, cat, tmpval, alloc; char*kwval; - if (kwval_lookup(kw, , , ) == 0) { + if (kwval_lookup(kw, , , , ) == 0) { /* * invalid keyword specified. * XXX: any actions? @@ -675,6 +855,9 @@ showdetails(const char *kw) printf("%d\n", tmpval); } } + + if (alloc) + free(kwval); } /* Added: head/usr.bin/locale/tests/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/locale/tests/Makefile Tue Sep 10 15:09:46 2019 (r352138) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= locale_test + +${PACKAGE}FILES+= k_flag_posix_monetary.out +${PACKAGE}FILES+= k_flag_posix_numeric.out +${PACKAGE}FILES+= k_flag_posix_time.out +${PACKAGE}FILES+= k_flag_posix_messages.out + +.include Added: head/usr.bin/locale/tests/k_flag_posix_messages.out
svn commit: r351604 - head/sys/dev/ichsmb
Author: yuripv Date: Thu Aug 29 12:49:21 2019 New Revision: 351604 URL: https://svnweb.freebsd.org/changeset/base/351604 Log: ichsmb: defer smbus attach until interrupts are available This fixes a "timed sleep before timers are working" panic seen while attaching jedec_dimm(4) instances too early in the boot. Submitted by: ian Reviewed by: hselasky Differential Revision:https://reviews.freebsd.org/D21452 Modified: head/sys/dev/ichsmb/ichsmb.c Modified: head/sys/dev/ichsmb/ichsmb.c == --- head/sys/dev/ichsmb/ichsmb.cThu Aug 29 12:05:06 2019 (r351603) +++ head/sys/dev/ichsmb/ichsmb.cThu Aug 29 12:49:21 2019 (r351604) @@ -131,11 +131,8 @@ ichsmb_attach(device_t dev) goto fail; } - /* Attach "smbus" child */ - if ((error = bus_generic_attach(dev)) != 0) { - device_printf(dev, "failed to attach child: %d\n", error); - goto fail; - } + /* Probe and attach the smbus when interrupts are available */ + config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev); return (0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r343826 - head/usr.sbin/pwm
Author: yuripv Date: Wed Feb 6 04:00:37 2019 New Revision: 343826 URL: https://svnweb.freebsd.org/changeset/base/343826 Log: pwm.8: fix markup in synopsis, add -f description Reviewed by: bcr, manu Differential revision:https://reviews.freebsd.org/D18829 Modified: head/usr.sbin/pwm/pwm.8 Modified: head/usr.sbin/pwm/pwm.8 == --- head/usr.sbin/pwm/pwm.8 Wed Feb 6 03:57:51 2019(r343825) +++ head/usr.sbin/pwm/pwm.8 Wed Feb 6 04:00:37 2019(r343826) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd January 12, 2019 .Dt PWM 8 .Os .Sh NAME @@ -44,20 +44,25 @@ .Nm .Op Fl f Ar device .Fl c Ar channel -.Fl p period +.Fl p Ar period .Nm .Op Fl f Ar device .Fl c Ar channel -.Fl d duty +.Fl d Ar duty .Sh DESCRIPTION The .Nm utility can be used to configure pwm controllers. .Pp The options are as follow: -.Bl -tag -width ".Fl f Ar device" +.Bl -tag -width "-c channel" .It Fl c Ar channel Channel number to operate on +.It Fl f Ar device +Device to operate on. +If not specified, +.Pa /dev/pwmc0 +is used. .It Fl E Enable the pwm channel .It Fl D @@ -73,16 +78,19 @@ Configure the duty (in nanoseconds or percentage) of t .Bl -bullet .It Show the configuration of the pwm channel: -.Pp +.Bd -literal pwm -f /dev/pwmc0 -C +.Ed .It Configure a 5 ns period and a 25000 duty cycle: -.Pp +.Bd -literal pwm -f /dev/pwmc0 -p 5 -d 25000 +.Ed .It Configure a 50% duty cycle: -.Pp +.Bd -literal pwm -f /dev/pwmc0 -d 50% +.Ed .El .Sh SEE ALSO .Xr pwm 9 , ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r343825 - head/share/man/man9
Author: yuripv Date: Wed Feb 6 03:57:51 2019 New Revision: 343825 URL: https://svnweb.freebsd.org/changeset/base/343825 Log: pwm.9: fix markup in interfaces description Reviewed by: manu Differential revision:https://reviews.freebsd.org/D18830 Modified: head/share/man/man9/pwm.9 Modified: head/share/man/man9/pwm.9 == --- head/share/man/man9/pwm.9 Wed Feb 6 03:52:14 2019(r343824) +++ head/share/man/man9/pwm.9 Wed Feb 6 03:57:51 2019(r343825) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd January 12, 2019 .Dt PWM 9 .Os .Sh NAME @@ -79,7 +79,7 @@ Get the current flags for the channel. Enable the PWM channel. .It Fn PWM_CHANNEL_ISENABLED "device_t dev" "int channel" "bool *enable" Test if the PWM channel is enabled. -.It PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" +.It Fn PWM_CHANNEL_MAX "device_t dev" "int channel" "int *nchannel" Get the maximum number of channels supported by the controller. .El .Sh HISTORY ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r343291 - in head/sys: dev/vmware/vmxnet3 net
Patrick Kelsey wrote: > Author: pkelsey > Date: Tue Jan 22 01:11:17 2019 > New Revision: 343291 > URL: https://svnweb.freebsd.org/changeset/base/343291 > > Log: > onvert vmx(4) to being an iflib driver. > > Also, expose IFLIB_MAX_RX_SEGS to iflib drivers and add > iflib_dma_alloc_align() to the iflib API. > > Performance is generally better with the tunable/sysctl > dev.vmx..iflib.tx_abdicate=1. > > Reviewed by:shurd > MFC after: 1 week > Relnotes: yes > Sponsored by: RG Nets > Differential Revision: https://reviews.freebsd.org/D18761 This breaks vmx interfaces for me in ESXi 6.7 (output below). The review mentions setting hw.pci.honor_msi_blacklist="0" and it helps indeed -- worth mentioning in UPDATING? vmx0: port 0x3000-0x300f mem 0xfe903000-0xfe903fff,0xfe902000-0xfe902fff,0xfe90-0xfe901fff at device 0.0 on pci3 vmx0: Using 512 tx descriptors and 256 rx descriptors vmx0: msix_init qsets capped at 8 vmx0: intr CPUs: 20 queue msgs: 24 admincnt: 1 vmx0: Using 8 rx queues 8 tx queues vmx0: attempting to allocate 9 MSI-X vectors (25 supported) vmx0: failed to allocate 9 MSI-X vectors, err: 6 - using MSI vmx0: attempting to allocate 1 MSI vectors (1 supported) msi: routing MSI IRQ 25 to local APIC 6 vector 48 vmx0: using IRQ 25 for MSI vmx0: Using an MSI interrupt msi: Assigning MSI IRQ 25 to local APIC 25 vector 48 msi: Assigning MSI IRQ 25 to local APIC 24 vector 48 vmx0: bpf attached vmx0: Ethernet address: 00:00:00:00:00:33 vmx0: netmap queues/slots: TX 1/512, RX 1/512 vmx0: device enable command failed! vmx0: link state changed to UP vmx0: device enable command failed! signature.asc Description: OpenPGP digital signature
Re: svn commit: r342576 - head/share/skel
Rodney W. Grimes wrote: >> Author: trasz >> Date: Fri Dec 28 17:50:40 2018 >> New Revision: 342576 >> URL: https://svnweb.freebsd.org/changeset/base/342576 >> >> Log: >> Simplify the way we set the default sh(1) PS1. No functional changes. >> >> Reviewed by: jilles >> MFC after: 2 weeks >> Sponsored by: DARPA, AFRL >> Differential Revision: https://reviews.freebsd.org/D18662 >> >> Modified: >> head/share/skel/dot.shrc >> >> Modified: head/share/skel/dot.shrc >> == >> --- head/share/skel/dot.shrc Fri Dec 28 17:00:12 2018(r342575) >> +++ head/share/skel/dot.shrc Fri Dec 28 17:50:40 2018(r342576) >> @@ -33,11 +33,7 @@ alias g='egrep -i' >> >> >> # # set prompt: ``username@hostname$ '' >> -# PS1="`whoami`@`hostname | sed 's/\..*//'`" >> -# case `id -u` in >> -# 0) PS1="${PS1}# ";; >> -# *) PS1="${PS1}$ ";; >> -# esac >> +# PS1="`whoami`@\h\\$ " > > You lost the fact that for root the prompt ends in # Note that '$' is not literal here. '\$' is expanded to '$' for normal users, and to '#' for superusers. >> >> # search path for cd(1) >> # CDPATH=:$HOME >> >> > signature.asc Description: OpenPGP digital signature
svn commit: r342265 - head/lib/libc/regex
Author: yuripv Date: Wed Dec 19 23:28:56 2018 New Revision: 342265 URL: https://svnweb.freebsd.org/changeset/base/342265 Log: regcomp: revert part of r341838 which turned out to be unrelated and caused issues with search in less. PR: 234066 Reviewed by: pfg Differential revision:https://reviews.freebsd.org/D18611 Modified: head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/regcomp.c == --- head/lib/libc/regex/regcomp.c Wed Dec 19 23:28:29 2018 (r342264) +++ head/lib/libc/regex/regcomp.c Wed Dec 19 23:28:56 2018 (r342265) @@ -1841,29 +1841,21 @@ computejumps(struct parse *p, struct re_guts *g) { int ch; int mindex; - int cmin, cmax; - /* -* For UTF-8 we process only the first 128 characters corresponding to -* the POSIX locale. -*/ - cmin = MB_CUR_MAX == 1 ? CHAR_MIN : 0; - cmax = MB_CUR_MAX == 1 ? CHAR_MAX : 127; - /* Avoid making errors worse */ if (p->error != 0) return; - g->charjump = (int *)malloc((cmax - cmin + 1) * sizeof(int)); + g->charjump = (int *)malloc((NC_MAX + 1) * sizeof(int)); if (g->charjump == NULL)/* Not a fatal error */ return; /* Adjust for signed chars, if necessary */ - g->charjump = >charjump[-(cmin)]; + g->charjump = >charjump[-(CHAR_MIN)]; /* If the character does not exist in the pattern, the jump * is equal to the number of characters in the pattern. */ - for (ch = cmin; ch < cmax + 1; ch++) + for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++) g->charjump[ch] = g->mlen; /* If the character does exist, compute the jump that would ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r342009 - head/secure/lib/libcrypto
Jung-uk Kim wrote: Author: jkim Date: Wed Dec 12 21:56:47 2018 New Revision: 342009 URL: https://svnweb.freebsd.org/changeset/base/342009 Log: Enable devcryptoeng for OpenSSL. Since OpenSSL 1.1.1, the good old BSD-specific cryptodev engine has been deprecated in favor of this new engine. However, this engine is not throughly tested on FreeBSD because it was originally written for Linux. http://cryptodev-linux.org/ Also, the author actually meant to enable it by default on BSD platforms but he failed to do so because there was a bug in the Configure script. https://github.com/openssl/openssl/pull/7882 Now they found that it was more generic issue. https://github.com/openssl/openssl/pull/7885 Therefore, we need to enable this engine on head to give it more exposure. Modified: head/secure/lib/libcrypto/Makefile head/secure/lib/libcrypto/opensslconf.h.in Modified: head/secure/lib/libcrypto/Makefile == --- head/secure/lib/libcrypto/Makefile Wed Dec 12 21:56:45 2018 (r342008) +++ head/secure/lib/libcrypto/Makefile Wed Dec 12 21:56:47 2018 (r342009) @@ -192,8 +192,8 @@ SRCS+= ecp_nistz256-x86.S ecp_nistz256.c .endif # engine -SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c eng_fat.c -SRCS+= eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c +SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_devcrypto.c eng_dyn.c eng_err.c +SRCS+= eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c SRCS+=eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c SRCS+=tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c Modified: head/secure/lib/libcrypto/opensslconf.h.in == --- head/secure/lib/libcrypto/opensslconf.h.in Wed Dec 12 21:56:45 2018 (r342008) +++ head/secure/lib/libcrypto/opensslconf.h.in Wed Dec 12 21:56:47 2018 (r342009) @@ -46,9 +46,6 @@ extern "C" { #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE #endif -#ifndef OPENSSL_NO_DEVCRYPTOENG -# define OPENSSL_NO_DEVCRYPTOENG -#endif #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 #endif I'm now getting "Could not open /dev/crypto: No such file or directory" from every other utility unless cryptodev is loaded; given that it's not in GENERIC, this is somewhat unexpected change in behavior. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341838 - in head/lib/libc: regex tests/regex
Author: yuripv Date: Wed Dec 12 04:23:00 2018 New Revision: 341838 URL: https://svnweb.freebsd.org/changeset/base/341838 Log: regcomp: reduce size of bitmap for multibyte locales This fixes the obscure endless loop seen with case-insensitive patterns containing characters in 128-255 range; originally found running GNU grep test suite. Our regex implementation being kludgy translates the characters in case-insensitive pattern to bracket expression containing both cases for the character and doesn't correctly handle the case when original character is in bitmap and the other case is not, falling into the endless loop going through in p_bracket(), ordinary(), and bothcases(). Reducing the bitmap to 0-127 range for multibyte locales solves this as none of these characters have other case mapping outside of bitmap. We are also safe in the case when the original character outside of bitmap has other case mapping in the bitmap (there are several of those in our current ctype maps having unidirectional mapping into bitmap). Reviewed by: bapt, kevans, pfg Differential revision:https://reviews.freebsd.org/D18302 Modified: head/lib/libc/regex/regcomp.c head/lib/libc/regex/regex2.h head/lib/libc/regex/utils.h head/lib/libc/tests/regex/multibyte.sh Modified: head/lib/libc/regex/regcomp.c == --- head/lib/libc/regex/regcomp.c Wed Dec 12 02:33:01 2018 (r341837) +++ head/lib/libc/regex/regcomp.c Wed Dec 12 04:23:00 2018 (r341838) @@ -1841,21 +1841,29 @@ computejumps(struct parse *p, struct re_guts *g) { int ch; int mindex; + int cmin, cmax; + /* +* For UTF-8 we process only the first 128 characters corresponding to +* the POSIX locale. +*/ + cmin = MB_CUR_MAX == 1 ? CHAR_MIN : 0; + cmax = MB_CUR_MAX == 1 ? CHAR_MAX : 127; + /* Avoid making errors worse */ if (p->error != 0) return; - g->charjump = (int*) malloc((NC + 1) * sizeof(int)); + g->charjump = (int *)malloc((cmax - cmin + 1) * sizeof(int)); if (g->charjump == NULL)/* Not a fatal error */ return; /* Adjust for signed chars, if necessary */ - g->charjump = >charjump[-(CHAR_MIN)]; + g->charjump = >charjump[-(cmin)]; /* If the character does not exist in the pattern, the jump * is equal to the number of characters in the pattern. */ - for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++) + for (ch = cmin; ch < cmax + 1; ch++) g->charjump[ch] = g->mlen; /* If the character does exist, compute the jump that would Modified: head/lib/libc/regex/regex2.h == --- head/lib/libc/regex/regex2.hWed Dec 12 02:33:01 2018 (r341837) +++ head/lib/libc/regex/regex2.hWed Dec 12 04:23:00 2018 (r341838) @@ -113,7 +113,7 @@ typedef struct { wint_t max; } crange; typedef struct { - unsigned char bmp[NC / 8]; + unsigned char bmp[NC_MAX / 8]; wctype_t*types; unsigned intntypes; wint_t *wides; @@ -133,9 +133,14 @@ CHIN1(cset *cs, wint_t ch) if (ch < NC) return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^ cs->invert); - for (i = 0; i < cs->nwides; i++) - if (ch == cs->wides[i]) + for (i = 0; i < cs->nwides; i++) { + if (cs->icase) { + if (ch == towlower(cs->wides[i]) || + ch == towupper(cs->wides[i])) + return (!cs->invert); + } else if (ch == cs->wides[i]) return (!cs->invert); + } for (i = 0; i < cs->nranges; i++) if (cs->ranges[i].min <= ch && ch <= cs->ranges[i].max) return (!cs->invert); Modified: head/lib/libc/regex/utils.h == --- head/lib/libc/regex/utils.h Wed Dec 12 02:33:01 2018(r341837) +++ head/lib/libc/regex/utils.h Wed Dec 12 04:23:00 2018(r341838) @@ -39,7 +39,9 @@ /* utility definitions */ #defineDUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ #defineINFINITY(DUPMAX + 1) -#defineNC (CHAR_MAX - CHAR_MIN + 1) + +#defineNC_MAX (CHAR_MAX - CHAR_MIN + 1) +#defineNC ((MB_CUR_MAX) == 1 ? (NC_MAX) : (128)) typedef unsigned char uch; /* switch off assertions (if not already off) if no REDEBUG */ Modified: head/lib/libc/tests/regex/multibyte.sh == --- head/lib/libc/tests/regex/multibyte.sh
svn commit: r341745 - in stable/12/lib/libc: regex tests/regex
Author: yuripv Date: Sat Dec 8 19:45:05 2018 New Revision: 341745 URL: https://svnweb.freebsd.org/changeset/base/341745 Log: MFC r340835: regexec: fix processing multibyte strings. Matcher function incorrectly assumed that moffset that we get from findmust is in bytes. Fix this by introducing a stepback function, taking short path if MB_CUR_MAX is 1, and going back byte-by-byte, checking if we have a legal character sequence otherwise. PR: 153502 Reviewed by: pfg, kevans Differential revision:https://reviews.freebsd.org/D18297 Added: stable/12/lib/libc/tests/regex/multibyte.sh - copied unchanged from r340835, head/lib/libc/tests/regex/multibyte.sh Modified: stable/12/lib/libc/regex/engine.c stable/12/lib/libc/tests/regex/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/regex/engine.c == --- stable/12/lib/libc/regex/engine.c Sat Dec 8 19:42:01 2018 (r341744) +++ stable/12/lib/libc/regex/engine.c Sat Dec 8 19:45:05 2018 (r341745) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); */ #ifdef SNAMES +#definestepback sstepback #definematcher smatcher #definewalkswalk #definedissect sdissect @@ -58,6 +59,7 @@ __FBSDID("$FreeBSD$"); #definematch smat #endif #ifdef LNAMES +#definestepback lstepback #definematcher lmatcher #definewalklwalk #definedissect ldissect @@ -68,6 +70,7 @@ __FBSDID("$FreeBSD$"); #definematch lmat #endif #ifdef MNAMES +#definestepback mstepback #definematcher mmatcher #definewalkmwalk #definedissect mdissect @@ -142,6 +145,39 @@ static const char *pchar(int ch); #endif /* + * Given a multibyte string pointed to by start, step back nchar characters + * from current position pointed to by cur. + */ +static const char * +stepback(const char *start, const char *cur, int nchar) +{ + const char *ret; + int wc, mbc; + mbstate_t mbs; + size_t clen; + + if (MB_CUR_MAX == 1) + return ((cur - nchar) > start ? cur - nchar : NULL); + + ret = cur; + for (wc = nchar; wc > 0; wc--) { + for (mbc = 1; mbc <= MB_CUR_MAX; mbc++) { + if ((ret - mbc) < start) + return (NULL); + memset(, 0, sizeof(mbs)); + clen = mbrtowc(NULL, ret - mbc, mbc, ); + if (clen != (size_t)-1 && clen != (size_t)-2) + break; + } + if (mbc > MB_CUR_MAX) + return (NULL); + ret -= mbc; + } + + return (ret); +} + +/* - matcher - the actual matching engine == static int matcher(struct re_guts *g, const char *string, \ ==size_t nmatch, regmatch_t pmatch[], int eflags); @@ -244,9 +280,14 @@ matcher(struct re_guts *g, ZAPSTATE(>mbs); /* Adjust start according to moffset, to speed things up */ - if (dp != NULL && g->moffset > -1) - start = ((dp - g->moffset) < start) ? start : dp - g->moffset; + if (dp != NULL && g->moffset > -1) { + const char *nstart; + nstart = stepback(start, dp, g->moffset); + if (nstart != NULL) + start = nstart; + } + SP("mloop", m->st, *start); /* this loop does only one repetition except for backrefs */ @@ -1083,6 +1124,7 @@ pchar(int ch) #endif #endif +#undef stepback #undef matcher #undef walk #undef dissect Modified: stable/12/lib/libc/tests/regex/Makefile == --- stable/12/lib/libc/tests/regex/Makefile Sat Dec 8 19:42:01 2018 (r341744) +++ stable/12/lib/libc/tests/regex/Makefile Sat Dec 8 19:45:05 2018 (r341745) @@ -2,6 +2,9 @@ PACKAGE= tests +# local test cases +ATF_TESTS_SH+= multibyte + .include "Makefile.inc" .include "${.CURDIR:H}/Makefile.netbsd-tests" .include Copied: stable/12/lib/libc/tests/regex/multibyte.sh (from r340835, head/lib/libc/tests/regex/multibyte.sh) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/tests/regex/multibyte.sh Sat Dec 8 19:45:05 2018 (r341745, copy of r340835, head/lib/libc/tests/regex/multibyte.sh) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +atf_test_case multibyte +multibyte_head() +{ + atf_set "descr" "Check matching multibyte characters (PR153502)" +} +multibyte_body() +{ + export LC_CTYPE="C.UTF-8" + + printf 'é' | atf_check -o "inline:é" \ + sed -ne '/^.$/p' + printf 'éé' | atf_check -o "inline:éé" \ + sed -ne '/^..$/p' +
svn commit: r341639 - head/lib/libc/gen
Author: yuripv Date: Thu Dec 6 18:03:18 2018 New Revision: 341639 URL: https://svnweb.freebsd.org/changeset/base/341639 Log: syslog(3): stdarg.h is needed only for vsyslog() Reported by: Brian Wood Reviewed by: asomers, ngie Differential revision:https://reviews.freebsd.org/D18334 Modified: head/lib/libc/gen/syslog.3 Modified: head/lib/libc/gen/syslog.3 == --- head/lib/libc/gen/syslog.3 Thu Dec 6 17:29:37 2018(r341638) +++ head/lib/libc/gen/syslog.3 Thu Dec 6 18:03:18 2018(r341639) @@ -28,7 +28,7 @@ .\" @(#)syslog.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 12, 2018 +.Dd November 25, 2018 .Dt SYSLOG 3 .Os .Sh NAME @@ -42,17 +42,18 @@ .Lb libc .Sh SYNOPSIS .In syslog.h -.In stdarg.h .Ft void .Fn syslog "int priority" "const char *message" "..." .Ft void -.Fn vsyslog "int priority" "const char *message" "va_list args" -.Ft void .Fn openlog "const char *ident" "int logopt" "int facility" .Ft void .Fn closelog void .Ft int .Fn setlogmask "int maskpri" +.In syslog.h +.In stdarg.h +.Ft void +.Fn vsyslog "int priority" "const char *message" "va_list args" .Sh DESCRIPTION The .Fn syslog ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341634 - head/share/termcap
Author: yuripv Date: Thu Dec 6 13:46:18 2018 New Revision: 341634 URL: https://svnweb.freebsd.org/changeset/base/341634 Log: termcap: add italics and tmux entries - add "ecma+italics" cap - use it in "xterm-basic" - add "tmux"/"tmux-256color" caps, fixing "so" and "se" caps, and sourcing "ecma+italics" and "screen"/"screen-256color" Reviewed by: bapt Differential revision:https://reviews.freebsd.org/D18363 Modified: head/share/termcap/termcap Modified: head/share/termcap/termcap == --- head/share/termcap/termcap Thu Dec 6 13:32:51 2018(r341633) +++ head/share/termcap/termcap Thu Dec 6 13:46:18 2018(r341634) @@ -2787,6 +2787,17 @@ SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 13 screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\ :Co#256:pa#32767:\ :AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen: + +ecma+italics|ECMA-48 italics:\ + :ZH=\E[3m:ZR=\E[23m: + +tmux|tmux terminal multiplexer:\ + :so=\E[7m:se=\E[27m:\ + :tc=ecma+italics:tc=screen: +tmux-256color|tmux with 256 colors:\ + :so=\E[7m:se=\E[27m:\ + :tc=ecma+italics:tc=screen-256color: + # $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $ # # Note: @@ -2829,7 +2840,8 @@ xterm-basic|modern xterm common:\ :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\ :rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\ :so=\E[7m:sr=\EM:st=\EH:\ - :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h: + :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:\ + :tc=ecma+italics: # The xterm-new description has all of the features, but is not completely # compatible with vt220. If you are using a Sun or PC keyboard, set the ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341631 - stable/11/usr.bin/localedef
Author: yuripv Date: Thu Dec 6 11:52:07 2018 New Revision: 341631 URL: https://svnweb.freebsd.org/changeset/base/341631 Log: MFC r339827: localedef: define characters in "space" class also as "print", except for the known conflicts ("control" characters can't be "print"able). POSIX doesn't explicitly forbid this, and actually includes character in "print". PR: 225692 Reviewed by: bapt, cem (previous version), pfg (previous version) Differential Revision:https://reviews.freebsd.org/D17467 Modified: stable/11/usr.bin/localedef/ctype.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/localedef/ctype.c == --- stable/11/usr.bin/localedef/ctype.c Thu Dec 6 11:49:52 2018 (r341630) +++ stable/11/usr.bin/localedef/ctype.c Thu Dec 6 11:52:07 2018 (r341631) @@ -120,7 +120,13 @@ add_ctype_impl(ctype_node_t *ctn) ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT | _E4); break; case T_ISSPACE: - ctn->ctype |= _ISSPACE; + /* +* This can be troublesome as , , +* , , and are defined both +* as space and cntrl, and POSIX doesn't allow cntrl/print +* combination. We will take care of this in dump_ctype(). +*/ + ctn->ctype |= (_ISSPACE | _ISPRINT); break; case T_ISCNTRL: ctn->ctype |= _ISCNTRL; @@ -372,9 +378,15 @@ dump_ctype(void) ctn->ctype |= _ISPRINT; /* -* Finally, POSIX requires that certain combinations -* are invalid. We don't flag this as a fatal error, -* but we will warn about. +* POSIX requires that certain combinations are invalid. +* Try fixing the cases we know about (see add_ctype_impl()). +*/ + if ((ctn->ctype & (_ISSPACE|_ISCNTRL)) == (_ISSPACE|_ISCNTRL)) + ctn->ctype &= ~_ISPRINT; + + /* +* Finally, don't flag remaining cases as a fatal error, +* and just warn about them. */ if ((ctn->ctype & _ISALPHA) && (ctn->ctype & (_ISPUNCT|_ISDIGIT))) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341630 - in stable/11: share/ctypedef tools/tools/locale tools/tools/locale/etc
Author: yuripv Date: Thu Dec 6 11:49:52 2018 New Revision: 341630 URL: https://svnweb.freebsd.org/changeset/base/341630 Log: MFC r339311, r339313: Restore some of the ctype definitions reported in the PR from pre-CLDR data, namely 0xE000-0xF8FF private use area, and 0xFF00-0xFFF half- and fullwidth punctuation. While here, update tools/tools/locale/README based on my experience rebuilding the locale data. PR: 225692 Reviewed by: bapt, cem (previous version) Differential Revision:https://reviews.freebsd.org/D17471 Modified: stable/11/share/ctypedef/en_US.UTF-8.src stable/11/tools/tools/locale/README stable/11/tools/tools/locale/etc/common.UTF-8.src stable/11/tools/tools/locale/etc/manual-input.UTF-8 (contents, props changed) Directory Properties: stable/11/ (props changed) Modified: stable/11/share/ctypedef/en_US.UTF-8.src == --- stable/11/share/ctypedef/en_US.UTF-8.srcThu Dec 6 10:53:11 2018 (r341629) +++ stable/11/share/ctypedef/en_US.UTF-8.srcThu Dec 6 11:49:52 2018 (r341630) @@ -6241,6 +6241,12 @@ graph;...;;...; ** +* 0xE000 - 0xF8FF Private Use Area (from pre-CLDR data) +** + +graph ;...; + +** * 0xFB50 - 0xFDFF Arabic Presentation Forms (differential) ** @@ -6277,6 +6283,17 @@ punct;...; ** blank + +** +* 0xFF00 - 0x Half- and Fullwidth Punctuation (from pre-CLDR data) +** + +punct ;...;;/ + ;...;;/ + ;...;;/ + ;...;;/ + ;...;;/ + ;...; ** * 0x10300 - 0x1032F Old Italic Modified: stable/11/tools/tools/locale/README == --- stable/11/tools/tools/locale/README Thu Dec 6 10:53:11 2018 (r341629) +++ stable/11/tools/tools/locale/README Thu Dec 6 11:49:52 2018 (r341630) @@ -2,17 +2,37 @@ To generate the locales: -Tools needed: java, perl and devel/p5-Tie-IxHash +Tools needed: + java (openjdk >= 8) + perl + converters/p5-Text-Iconv + devel/p5-Tie-IxHash + textproc/p5-XML-Parser -fetch cldr data from: http://cldr.unicode.org -extract in a directory ~/unicode/cldr/v27.0.1 for example -fetch unidata from http://www.unicode.org/Public/zipped/ (latest version) -extract in a directory ~/unicode/UNIDATA/8.0.0 for example +Fetch CLDR data from: http://unicode.org/Public/cldr/. You need all of the +core.zip, keyboards.zip, and tools.zip. -either modify tools/tools/locales/etc/unicode.conf or export variables: -CLDRDIR="~/unicode/cldr/v27.0.1" -UNIDATADIR="~/unicode/UNIDATA/8.0.0" +Extract: + mkdir -p ~/unicode/cldr/v33.0 + cd ~/unicode/cldr/v33.0 + unzip ~/core.zip ~/keyboards.zip ~/tools.zip -run: -make POSIX -make install +Fetch unidata (UCD.zip) from http://www.unicode.org/Public/zipped/latest. + +Extract: + mkdir -p ~/unicode/UNIDATA/11.0.0 + cd ~/unicode/UNIDATA/11.0.0 + unzip ~/UCD.zip + +Either modify tools/tools/locales/etc/unicode.conf or export variables: + CLDRDIR=~/unicode/cldr/v33.0; export CLDRDIR + UNIDATADIR=~/unicode/UNIDATA/9.0.0; export UNIDATADIR + +Build the CLDR tools: + cd $CLDRDIR/tools/java + ant jar + +Run: + make POSIX + make + make install Modified: stable/11/tools/tools/locale/etc/common.UTF-8.src == --- stable/11/tools/tools/locale/etc/common.UTF-8.src Thu Dec 6 10:53:11 2018(r341629) +++ stable/11/tools/tools/locale/etc/common.UTF-8.src Thu Dec 6 11:49:52 2018(r341630) @@ -6241,6 +6241,12 @@ graph;...;;...; ** +* 0xE000 - 0xF8FF Private Use Area (from pre-CLDR data) +** + +graph ;...; + +** * 0xFB50 - 0xFDFF Arabic Presentation Forms (differential) ** @@ -6277,6 +6283,17 @@ punct;...; ** blank + +** +* 0xFF00 - 0x Half- and Fullwidth Punctuation (from pre-CLDR data)
svn commit: r341629 - in stable/12: contrib/netbsd-tests/lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/etc tools/tools/locale/tools
Author: yuripv Date: Thu Dec 6 10:53:11 2018 New Revision: 341629 URL: https://svnweb.freebsd.org/changeset/base/341629 Log: MFC r340491, r340492: Use UnicodeData.txt to create UTF-8 ctype map. This should provide more complete coverage of currently defined Unicode characters as compared to manually assembled one we use currently. Comparison of original and new UTF-8 ctype maps by character class: TYPEORIGNEW alnum 94229 126029 alpha 93557 125419 blank 4 2 cntrl 73 137685 digit 469 622 graph 109615 137203 lower 14782145 print 109641 137222 punct 3428797 rune110481 274907 space 33 24 upper 983 1781 xdigit 469 622 Large number of added cntrl definitions is due to the fact that private-use planes are currently defined as such, this can change in the future. Discussed with: bapt Differential revision:https://reviews.freebsd.org/D17842 Deleted: stable/12/tools/tools/locale/etc/common.UTF-8.src stable/12/tools/tools/locale/etc/manual-input.UTF-8 Modified: stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c stable/12/share/ctypedef/C.UTF-8.src stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/tools/utf8-rollup.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c == --- stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Thu Dec 6 10:48:46 2018(r341628) +++ stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Thu Dec 6 10:53:11 2018(r341629) @@ -88,7 +88,7 @@ static struct test { 0x, 0x5D, 0x5B, 0x1, 0x10, 0x5D, 0x0A }, #ifdef __FreeBSD__ - {1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, + {1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, #else {1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, #endif Modified: stable/12/share/ctypedef/C.UTF-8.src == --- stable/12/share/ctypedef/C.UTF-8.srcThu Dec 6 10:48:46 2018 (r341628) +++ stable/12/share/ctypedef/C.UTF-8.srcThu Dec 6 10:53:11 2018 (r341629) @@ -7,386 +7,27606 @@ comment_char * escape_char / LC_CTYPE - -** -* 0x - 0x007F Basic Latin -* 0x0080 - 0x00FF Latin-1 Supplement -* 0x0100 - 0x017F Latin Extended-A -* 0x0180 - 0x024F Latin Extended-B -* 0x0250 - 0x02AF IPA Extensions -* 0x1D00 - 0x1D7F Phonetic Extensions -* 0x1D80 - 0x1DBF Phonetic Extensions Supplement -* 0x1E00 - 0x1EFF Latin Extended Additional -* 0x2150 - 0x218F Number Forms (partial - Roman Numerals) -* 0x2C60 - 0x2C7F Latin Extended-C -* 0xA720 - 0xA7FF Latin Extended-D -* 0xAB30 - 0xAB6F Latin Extended-E -* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial) -* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial) -** -upper ;...;;/ - ;...;;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;...;;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ -
svn commit: r341628 - in stable/12/tools/tools/locale: . etc tools
Author: yuripv Date: Thu Dec 6 10:48:46 2018 New Revision: 341628 URL: https://svnweb.freebsd.org/changeset/base/341628 Log: MFC r340204: Cleanup locale tools: - Simplify the source dir specification, and update README appropriately - Drop the LC (doonly) processing, it's broken, and even if fixed, not really useful - Don't remove the target directories while installing new data as it removes Makefile.depend which we don't manage; only rm the files we are going to add/replace/delete instead - Restrict adding bsd.endian.mk to colldef and ctypedef Makefiles, it's not needed in other (text-only) categories - GC unused scripts; they don't seem to be particularly helpful standalone as well Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D17858 Deleted: stable/12/tools/tools/locale/etc/unicode.conf stable/12/tools/tools/locale/tools/UTF82encoding.pl stable/12/tools/tools/locale/tools/changeoffset.pl stable/12/tools/tools/locale/tools/unicode2src.pl stable/12/tools/tools/locale/tools/whatis.pl Modified: stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/README stable/12/tools/tools/locale/tools/cldr2def.pl stable/12/tools/tools/locale/tools/finalize stable/12/tools/tools/locale/tools/utf8-rollup.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/locale/Makefile == --- stable/12/tools/tools/locale/Makefile Thu Dec 6 10:41:22 2018 (r341627) +++ stable/12/tools/tools/locale/Makefile Thu Dec 6 10:48:46 2018 (r341628) @@ -10,13 +10,10 @@ .OBJDIR: . -.if !defined(CLDRDIR) -CLDRDIR!= grep ^cldr etc/unicode.conf | cut -f 2 -d " " +.if !defined(UNIDIR) +.error UNIDIR is not set .endif -.if !defined(UNIDATADIR) -UNIDATADIR!= grep ^unidata etc/unicode.conf | cut -f 2 -d " " -.endif -PASSON=CLDRDIR="${CLDRDIR}" UNIDATADIR="${UNIDATADIR}" +PASSON=UNIDIR="${UNIDIR}" ETCDIR=${.CURDIR}/etc @@ -49,12 +46,8 @@ COLLATIONS_SPECIAL_ENV+= ${area}.${enc} .endfor PASSON+= COLLATIONS_SPECIAL="${COLLATIONS_SPECIAL_ENV}" -.if defined(LC) -LC:= --lc=${LC} -.endif - all: - cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src + cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src .for t in ${TYPES} . if ${KNOWN:M${t}} test -d ${t} || mkdir ${t} @@ -69,8 +62,9 @@ install: install-${t} install-${t}: . if ${KNOWN:M${t}} rm -rf ${.CURDIR}/${t}.draft - rm -rf ${.CURDIR}/../../../share/${t} - mv ${.CURDIR}/${t} ${.CURDIR}/../../../share/${t} + rm -f ${.CURDIR}/../../../share/${t}/Makefile + rm -f ${.CURDIR}/../../../share/${t}/*.src + mv ${.CURDIR}/${t}/* ${.CURDIR}/../../../share/${t}/ . endif .endfor @@ -86,10 +80,9 @@ post-install: gen-${t}: mkdir -p ${t} ${t}.draft perl -I tools tools/cldr2def.pl \ - --cldr=$$(realpath ${CLDRDIR}) \ - --unidata=$$(realpath ${UNIDATADIR}) \ + --unidir=$$(realpath ${UNIDIR}) \ --etc=$$(realpath ${ETCDIR}) \ - --type=${t} ${LC} + --type=${t} build-${t}: gen-${t} env ${PASSON} tools/finalize ${t} @@ -101,15 +94,16 @@ build-colldef: static-colldef static-colldef: .for area enc in ${COLLATION_SPECIAL} - awk -f tools/extract-colldef.awk ${CLDRDIR}/posix/${area}.${enc}.src > colldef.draft/${area}.${enc}.src + awk -f tools/extract-colldef.awk ${UNIDIR}/posix/${area}.${enc}.src > \ + colldef.draft/${area}.${enc}.src .endfor transfer-rollup: - cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src + cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src rollup: perl -I tools tools/utf8-rollup.pl \ - --cldr=$$(realpath ${CLDRDIR}) \ + --unidir=$$(realpath ${UNIDIR}) \ --etc=$$(realpath ${ETCDIR}) clean: @@ -159,33 +153,33 @@ ENCODINGS=Big5 \ POSIX: -.if exists (${CLDRDIR}/tools/java/cldr.jar) - mkdir -p ${CLDRDIR}/posix +.if exists (${UNIDIR}/tools/java/cldr.jar) + mkdir -p ${UNIDIR}/posix . for area in ${BASE_LOCALES_OF_INTEREST} -.if !exists(${CLDRDIR}/posix/${area}.UTF-8.src) - java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \ +.if !exists(${UNIDIR}/posix/${area}.UTF-8.src) + java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \ org.unicode.cldr.posix.GeneratePOSIX \ - -d ${CLDRDIR}/posix -m ${area} -c UTF-8 + -d ${UNIDIR}/posix -m ${area} -c UTF-8 .endif . endfor . for area encoding in ${COLLATION_SPECIAL} -.if !exists(${CLDRDIR}/posix/${area}.${encoding}.src) - java -DCLDR_DIR=${CLDRDIR:Q} -jar
svn commit: r341627 - in stable/12: lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/tools
Author: yuripv Date: Thu Dec 6 10:41:22 2018 New Revision: 341627 URL: https://svnweb.freebsd.org/changeset/base/341627 Log: MFC r340144: Add hybrid C.UTF-8 locale being identical to default C locale except that it uses the same ctype maps and functions as other UTF-8 locales. Reviewed by: bapt, cem, eadler Differential Revision:https://reviews.freebsd.org/D17833 Added: stable/12/share/ctypedef/C.UTF-8.src - copied unchanged from r340144, head/share/ctypedef/C.UTF-8.src Deleted: stable/12/share/ctypedef/en_US.UTF-8.src Modified: stable/12/lib/libc/locale/collate.c stable/12/lib/libc/locale/ldpart.c stable/12/share/ctypedef/Makefile stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/tools/cldr2def.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/locale/collate.c == --- stable/12/lib/libc/locale/collate.c Thu Dec 6 09:51:51 2018 (r341626) +++ stable/12/lib/libc/locale/collate.c Thu Dec 6 10:41:22 2018 (r341627) @@ -84,7 +84,8 @@ destruct_collate(void *t) void * __collate_load(const char *encoding, __unused locale_t unused) { - if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { + if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 || + strncmp(encoding, "C.", 2) == 0) { return &__xlocale_C_collate; } struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 1); @@ -122,7 +123,8 @@ __collate_load_tables_l(const char *encoding, struct x table->__collate_load_error = 1; /* 'encoding' must be already checked. */ - if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { + if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 || + strncmp(encoding, "C.", 2) == 0) { return (_LDP_CACHE); } Modified: stable/12/lib/libc/locale/ldpart.c == --- stable/12/lib/libc/locale/ldpart.c Thu Dec 6 09:51:51 2018 (r341626) +++ stable/12/lib/libc/locale/ldpart.c Thu Dec 6 10:41:22 2018 (r341627) @@ -63,7 +63,8 @@ __part_load_locale(const char *name, size_t namesize, bufsize; /* 'name' must be already checked. */ - if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) { + if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0 || + strncmp(name, "C.", 2) == 0) { *using_locale = 0; return (_LDP_CACHE); } Copied: stable/12/share/ctypedef/C.UTF-8.src (from r340144, head/share/ctypedef/C.UTF-8.src) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/ctypedef/C.UTF-8.srcThu Dec 6 10:41:22 2018 (r341627, copy of r340144, head/share/ctypedef/C.UTF-8.src) @@ -0,0 +1,6372 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# - + +comment_char * +escape_char / + +LC_CTYPE + +** +* 0x - 0x007F Basic Latin +* 0x0080 - 0x00FF Latin-1 Supplement +* 0x0100 - 0x017F Latin Extended-A +* 0x0180 - 0x024F Latin Extended-B +* 0x0250 - 0x02AF IPA Extensions +* 0x1D00 - 0x1D7F Phonetic Extensions +* 0x1D80 - 0x1DBF Phonetic Extensions Supplement +* 0x1E00 - 0x1EFF Latin Extended Additional +* 0x2150 - 0x218F Number Forms (partial - Roman Numerals) +* 0x2C60 - 0x2C7F Latin Extended-C +* 0xA720 - 0xA7FF Latin Extended-D +* 0xAB30 - 0xAB6F Latin Extended-E +* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial) +* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial) +** +upper ;...;;/ + ;...;;/ + ;...;;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;...;;/ + ;...;;/ + ;/ +
svn commit: r341626 - stable/12/usr.bin/man
Author: yuripv Date: Thu Dec 6 09:51:51 2018 New Revision: 341626 URL: https://svnweb.freebsd.org/changeset/base/341626 Log: MFC r340128: Teach man(1) about C.UTF-8. While here, use LANG as the proper source to select man pages language/encoding, falling back to LC_CTYPE. Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D17835 Modified: stable/12/usr.bin/man/man.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/man/man.sh == --- stable/12/usr.bin/man/man.shThu Dec 6 09:47:23 2018 (r341625) +++ stable/12/usr.bin/man/man.shThu Dec 6 09:51:51 2018 (r341626) @@ -662,6 +662,7 @@ man_setup_width() { # Setup necessary locale variables. man_setup_locale() { local lang_cc + local locstr locpaths='.' man_charset='US-ASCII' @@ -670,18 +671,25 @@ man_setup_locale() { if [ -n "$oflag" ]; then decho 'Using non-localized manpages' else - # Use the locale tool to give us the proper LC_CTYPE + # Use the locale tool to give us proper locale information eval $( $LOCALE ) - case "$LC_CTYPE" in + if [ -n "$LANG" ]; then + locstr=$LANG + else + locstr=$LC_CTYPE + fi + + case "$locstr" in C) ;; + C.UTF-8);; POSIX) ;; [a-z][a-z]_[A-Z][A-Z]\.*) - lang_cc="${LC_CTYPE%.*}" - man_lang="${LC_CTYPE%_*}" + lang_cc="${locstr%.*}" + man_lang="${locstr%_*}" man_country="${lang_cc#*_}" - man_charset="${LC_CTYPE#*.}" - locpaths="$LC_CTYPE" + man_charset="${locstr#*.}" + locpaths="$locstr" locpaths="$locpaths:$man_lang.$man_charset" if [ "$man_lang" != "en" ]; then locpaths="$locpaths:en.$man_charset" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341625 - in stable/12: share/colldef share/ctypedef share/monetdef share/numericdef tools/tools/locale tools/tools/locale/etc tools/tools/locale/etc/final-maps
Author: yuripv Date: Thu Dec 6 09:47:23 2018 New Revision: 341625 URL: https://svnweb.freebsd.org/changeset/base/341625 Log: MFC r340104: Update to CLDR 34 and UNICODE 11. Discussed with: bapt Added: stable/12/share/monetdef/fr_FR.UTF-8.src - copied unchanged from r340104, head/share/monetdef/fr_FR.UTF-8.src stable/12/share/monetdef/it_IT.ISO8859-15.src - copied unchanged from r340104, head/share/monetdef/it_IT.ISO8859-15.src stable/12/share/monetdef/it_IT.UTF-8.src - copied unchanged from r340104, head/share/monetdef/it_IT.UTF-8.src stable/12/share/monetdef/nl_BE.ISO8859-1.src - copied unchanged from r340104, head/share/monetdef/nl_BE.ISO8859-1.src stable/12/share/numericdef/fr_FR.UTF-8.src - copied unchanged from r340104, head/share/numericdef/fr_FR.UTF-8.src Deleted: stable/12/share/monetdef/de_AT.ISO8859-1.src stable/12/share/monetdef/de_AT.ISO8859-15.src stable/12/share/monetdef/de_AT.UTF-8.src Modified: stable/12/share/colldef/af_ZA.UTF-8.src stable/12/share/colldef/am_ET.UTF-8.src stable/12/share/colldef/ar_SA.UTF-8.src stable/12/share/colldef/be_BY.UTF-8.src stable/12/share/colldef/ca_AD.UTF-8.src stable/12/share/colldef/cs_CZ.ISO8859-2.src stable/12/share/colldef/cs_CZ.UTF-8.src stable/12/share/colldef/da_DK.ISO8859-1.src stable/12/share/colldef/da_DK.ISO8859-15.src stable/12/share/colldef/da_DK.UTF-8.src stable/12/share/colldef/el_GR.UTF-8.src stable/12/share/colldef/en_US.UTF-8.src stable/12/share/colldef/es_MX.UTF-8.src stable/12/share/colldef/et_EE.UTF-8.src stable/12/share/colldef/fi_FI.UTF-8.src stable/12/share/colldef/fr_CA.UTF-8.src stable/12/share/colldef/he_IL.UTF-8.src stable/12/share/colldef/hi_IN.UTF-8.src stable/12/share/colldef/hr_HR.ISO8859-2.src stable/12/share/colldef/hu_HU.ISO8859-2.src stable/12/share/colldef/hu_HU.UTF-8.src stable/12/share/colldef/hy_AM.UTF-8.src stable/12/share/colldef/is_IS.UTF-8.src stable/12/share/colldef/ja_JP.UTF-8.src stable/12/share/colldef/ja_JP.eucJP.src stable/12/share/colldef/kk_KZ.UTF-8.src stable/12/share/colldef/ko_KR.UTF-8.src stable/12/share/colldef/lt_LT.UTF-8.src stable/12/share/colldef/lv_LV.UTF-8.src stable/12/share/colldef/nb_NO.ISO8859-1.src stable/12/share/colldef/nb_NO.ISO8859-15.src stable/12/share/colldef/nn_NO.ISO8859-1.src stable/12/share/colldef/nn_NO.ISO8859-15.src stable/12/share/colldef/nn_NO.UTF-8.src stable/12/share/colldef/pl_PL.UTF-8.src stable/12/share/colldef/ro_RO.UTF-8.src stable/12/share/colldef/ru_RU.UTF-8.src stable/12/share/colldef/se_NO.UTF-8.src stable/12/share/colldef/sk_SK.ISO8859-2.src stable/12/share/colldef/sk_SK.UTF-8.src stable/12/share/colldef/sl_SI.UTF-8.src stable/12/share/colldef/sr_RS.ISO8859-2.src stable/12/share/colldef/sr_RS.ISO8859-5.src stable/12/share/colldef/sr_RS.UTF-8.src stable/12/share/colldef/sr_rs.ut...@latin.src stable/12/share/colldef/sv_SE.UTF-8.src stable/12/share/colldef/tr_TR.UTF-8.src stable/12/share/colldef/uk_UA.UTF-8.src stable/12/share/colldef/zh_CN.GB18030.src stable/12/share/colldef/zh_CN.GB2312.src stable/12/share/colldef/zh_CN.GBK.src stable/12/share/colldef/zh_CN.UTF-8.src stable/12/share/colldef/zh_CN.eucCN.src stable/12/share/colldef/zh_TW.Big5.src stable/12/share/colldef/zh_TW.UTF-8.src stable/12/share/ctypedef/Makefile stable/12/share/ctypedef/ca_IT.ISO8859-1.src stable/12/share/ctypedef/en_US.ISO8859-1.src stable/12/share/ctypedef/hi_IN.ISCII-DEV.src stable/12/share/ctypedef/hy_AM.ARMSCII-8.src stable/12/share/ctypedef/ja_JP.eucJP.src stable/12/share/ctypedef/zh_CN.eucCN.src stable/12/share/monetdef/Makefile stable/12/share/monetdef/fr_CH.UTF-8.src stable/12/share/monetdef/hy_AM.ARMSCII-8.src stable/12/share/monetdef/hy_AM.UTF-8.src stable/12/share/monetdef/mn_MN.UTF-8.src stable/12/share/monetdef/nl_BE.ISO8859-15.src stable/12/share/monetdef/nl_BE.UTF-8.src stable/12/share/numericdef/Makefile stable/12/tools/tools/locale/Makefile stable/12/tools/tools/locale/etc/charmaps.xml stable/12/tools/tools/locale/etc/final-maps/map.UTF-8 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/colldef/af_ZA.UTF-8.src == --- stable/12/share/colldef/af_ZA.UTF-8.src Thu Dec 6 09:45:25 2018 (r341624) +++ stable/12/share/colldef/af_ZA.UTF-8.src Thu Dec 6 09:47:23 2018 (r341625) @@ -60,6 +60,7 @@ collating-symbol collating-symbol collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol @@ -70,431 +71,433 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol
svn commit: r341597 - stable/12
Author: yuripv Date: Wed Dec 5 17:13:33 2018 New Revision: 341597 URL: https://svnweb.freebsd.org/changeset/base/341597 Log: Actually mark r341596 as MFC. Modified: Directory Properties: stable/12/ (props changed) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341596 - stable/12/usr.bin/localedef
Author: yuripv Date: Wed Dec 5 17:10:06 2018 New Revision: 341596 URL: https://svnweb.freebsd.org/changeset/base/341596 Log: MFC r339827: localedef: define characters in "space" class also as "print", except for the known conflicts ("control" characters can't be "print"able). POSIX doesn't explicitly forbid this, and actually includes character in "print". PR: 225692 Reviewed by: bapt, cem (previous version), pfg (previous version) Differential Revision:https://reviews.freebsd.org/D17467 Modified: stable/12/usr.bin/localedef/ctype.c Modified: stable/12/usr.bin/localedef/ctype.c == --- stable/12/usr.bin/localedef/ctype.c Wed Dec 5 17:06:00 2018 (r341595) +++ stable/12/usr.bin/localedef/ctype.c Wed Dec 5 17:10:06 2018 (r341596) @@ -120,7 +120,13 @@ add_ctype_impl(ctype_node_t *ctn) ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT | _E4); break; case T_ISSPACE: - ctn->ctype |= _ISSPACE; + /* +* This can be troublesome as , , +* , , and are defined both +* as space and cntrl, and POSIX doesn't allow cntrl/print +* combination. We will take care of this in dump_ctype(). +*/ + ctn->ctype |= (_ISSPACE | _ISPRINT); break; case T_ISCNTRL: ctn->ctype |= _ISCNTRL; @@ -378,9 +384,15 @@ dump_ctype(void) ctn->ctype |= _ISPRINT; /* -* Finally, POSIX requires that certain combinations -* are invalid. We don't flag this as a fatal error, -* but we will warn about. +* POSIX requires that certain combinations are invalid. +* Try fixing the cases we know about (see add_ctype_impl()). +*/ + if ((ctn->ctype & (_ISSPACE|_ISCNTRL)) == (_ISSPACE|_ISCNTRL)) + ctn->ctype &= ~_ISPRINT; + + /* +* Finally, don't flag remaining cases as a fatal error, +* and just warn about them. */ if ((ctn->ctype & _ISALPHA) && (ctn->ctype & (_ISPUNCT|_ISDIGIT))) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r341446 - head/release/amd64
Alexey Dokuchaev wrote: > On Mon, Dec 03, 2018 at 10:31:57PM +0000, Yuri Pankov wrote: >> New Revision: 341446 >> URL: https://svnweb.freebsd.org/changeset/base/341446 >> >> Log: >> mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs. >> >> This fixes 'cdrom' target in the case when world was built by user, >> and not root. > > Could you please explain why -p should not have been used here? I fail > to understand this from the commit log. I've always considered preserving > various file metadata as a good thing to do, and this commit puzzles me. Because the target is on msdosfs, and the only metadata that can be preserved is modification time which isn't that useful with the file being hidden in ESP. OTOH, 'cp -p' fails trying to preserve owner/group if source is not owned by root (as commit message says). Additional 'chmod' call done in HBSD doesn't do much as well -- it seems we can only set/unset owner's 'write' flag which corresponds to DOS 'readonly' attribute. signature.asc Description: OpenPGP digital signature
Re: svn commit: r341446 - head/release/amd64
Oliver Pinter wrote: > > > On Monday, December 3, 2018, Yuri Pankov <mailto:yur...@freebsd.org>> wrote: > > Author: yuripv > Date: Mon Dec 3 22:31:57 2018 > New Revision: 341446 > URL: https://svnweb.freebsd.org/changeset/base/341446 > <https://svnweb.freebsd.org/changeset/base/341446> > > Log: > mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs. > > This fixes 'cdrom' target in the case when world was built by user, > and not root. > > Reviewed by: imp > Differential revision: https://reviews.freebsd.org/D18414 > <https://reviews.freebsd.org/D18414> > > > This was a known issue > : https://lists.freebsd.org/pipermail/svn-src-head/2018-November/119689.html Sorry, I missed that. Looking at the HBSD change, does chmod step have any significance? > Modified: > head/release/amd64/mkisoimages.sh > > Modified: head/release/amd64/mkisoimages.sh > > == > --- head/release/amd64/mkisoimages.sh Mon Dec 3 22:09:23 2018 > (r341445) > +++ head/release/amd64/mkisoimages.sh Mon Dec 3 22:31:57 2018 > (r341446) > @@ -49,7 +49,7 @@ if [ "$1" = "-b" ]; then > mkdir efi > mount -t msdosfs /dev/$device efi > mkdir -p efi/efi/boot > - cp -p "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi > + cp "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi > umount efi > rmdir efi > mdconfig -d -u $device > ___ > svn-src-h...@freebsd.org <mailto:svn-src-h...@freebsd.org> mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > <https://lists.freebsd.org/mailman/listinfo/svn-src-head> > To unsubscribe, send any mail to > "svn-src-head-unsubscr...@freebsd.org > <mailto:svn-src-head-unsubscr...@freebsd.org>" > signature.asc Description: OpenPGP digital signature
svn commit: r341446 - head/release/amd64
Author: yuripv Date: Mon Dec 3 22:31:57 2018 New Revision: 341446 URL: https://svnweb.freebsd.org/changeset/base/341446 Log: mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs. This fixes 'cdrom' target in the case when world was built by user, and not root. Reviewed by: imp Differential revision:https://reviews.freebsd.org/D18414 Modified: head/release/amd64/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh == --- head/release/amd64/mkisoimages.sh Mon Dec 3 22:09:23 2018 (r341445) +++ head/release/amd64/mkisoimages.sh Mon Dec 3 22:31:57 2018 (r341446) @@ -49,7 +49,7 @@ if [ "$1" = "-b" ]; then mkdir efi mount -t msdosfs /dev/$device efi mkdir -p efi/efi/boot - cp -p "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi + cp "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootx64.efi umount efi rmdir efi mdconfig -d -u $device ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341235 - stable/11/contrib/nvi/common
Author: yuripv Date: Thu Nov 29 15:07:59 2018 New Revision: 341235 URL: https://svnweb.freebsd.org/changeset/base/341235 Log: MFC r340976: vi: fix UTF-8 detection. PR: 202290 Submitted by: la...@fit.vutbr.cz Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D17950 Modified: stable/11/contrib/nvi/common/encoding.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/nvi/common/encoding.c == --- stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:05:47 2018 (r341234) +++ stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:07:59 2018 (r341235) @@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes) if (i >= nbytes) goto done; - if (buf[i] & 0x40) /* 10xx */ + if ((buf[i] & 0xc0) != 0x80)/* 10xx */ return -1; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341234 - stable/12/contrib/nvi/common
Author: yuripv Date: Thu Nov 29 15:05:47 2018 New Revision: 341234 URL: https://svnweb.freebsd.org/changeset/base/341234 Log: MFC r340976: vi: fix UTF-8 detection. PR: 202290 Submitted by: la...@fit.vutbr.cz Reviewed by: bapt Differential Revision:https://reviews.freebsd.org/D17950 Modified: stable/12/contrib/nvi/common/encoding.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/nvi/common/encoding.c == --- stable/12/contrib/nvi/common/encoding.c Thu Nov 29 14:49:33 2018 (r341233) +++ stable/12/contrib/nvi/common/encoding.c Thu Nov 29 15:05:47 2018 (r341234) @@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes) if (i >= nbytes) goto done; - if (buf[i] & 0x40) /* 10xx */ + if ((buf[i] & 0xc0) != 0x80)/* 10xx */ return -1; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341175 - releng/12.0/sbin/bectl
Author: yuripv Date: Thu Nov 29 01:31:12 2018 New Revision: 341175 URL: https://svnweb.freebsd.org/changeset/base/341175 Log: MFS12 r341168: MFC r340974: bectl: sync usage with man page, removing stray multibyte characters in the process. PR: 233526 Submitted by: tigersha...@gmail.com (original version) Reviewed by:kevans Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D18335 Modified: releng/12.0/sbin/bectl/bectl.c Directory Properties: releng/12.0/ (props changed) Modified: releng/12.0/sbin/bectl/bectl.c == --- releng/12.0/sbin/bectl/bectl.c Thu Nov 29 01:28:13 2018 (r341174) +++ releng/12.0/sbin/bectl/bectl.c Thu Nov 29 01:31:12 2018 (r341175) @@ -66,22 +66,24 @@ usage(bool explicit) FILE *fp; fp = explicit ? stdout : stderr; - fprintf(fp, + fprintf(fp, "%s", "usage:\tbectl {-h | -? | subcommand [args...]}\n" +#if SOON + "\tbectl add (path)*\n" +#endif "\tbectl activate [-t] beName\n" - "\tbectl create [-e {nonActiveBe | -e beName@snapshot}] beName\n" - "\tbectl create beName@snapshot\n" + "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" + "\tbectl create [-r] beName@snapshot\n" "\tbectl destroy [-F] {beName | beName@snapshot}\n" "\tbectl export sourceBe\n" "\tbectl import targetBe\n" -#if SOON - "\tbectl add (path)*\n" -#endif - "\tbectl jail [{-b | -U}] [{-o key=value | -u key}]... bootenv [utility [argument ...]]\n" - "\tbectl list [-a] [-D] [-H] [-s]\n" + "\tbectl jail {-b | -U} [{-o key=value | -u key}]... " + "{jailID | jailName}\n" + "\t bootenv [utility [argument ...]]\n" + "\tbectl list [-DHas]\n" "\tbectl mount beName [mountpoint]\n" "\tbectl rename origBeName newBeName\n" - "\tbectl {ujail | unjail} ⟨jailID | jailName | bootenv)\n" + "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n" "\tbectl {umount | unmount} [-f] beName\n"); return (explicit ? 0 : EX_USAGE); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r341168 - stable/12/sbin/bectl
Author: yuripv Date: Thu Nov 29 00:34:55 2018 New Revision: 341168 URL: https://svnweb.freebsd.org/changeset/base/341168 Log: MFC r340974: bectl: sync usage with man page, removing stray multibyte characters in the process. PR: 233526 Submitted by: tigersha...@gmail.com (original version) Reviewed by:kevans Differential revision: https://reviews.freebsd.org/D18335 Modified: stable/12/sbin/bectl/bectl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/bectl/bectl.c == --- stable/12/sbin/bectl/bectl.cThu Nov 29 00:28:08 2018 (r341167) +++ stable/12/sbin/bectl/bectl.cThu Nov 29 00:34:55 2018 (r341168) @@ -66,22 +66,24 @@ usage(bool explicit) FILE *fp; fp = explicit ? stdout : stderr; - fprintf(fp, + fprintf(fp, "%s", "usage:\tbectl {-h | -? | subcommand [args...]}\n" +#if SOON + "\tbectl add (path)*\n" +#endif "\tbectl activate [-t] beName\n" - "\tbectl create [-e {nonActiveBe | -e beName@snapshot}] beName\n" - "\tbectl create beName@snapshot\n" + "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" + "\tbectl create [-r] beName@snapshot\n" "\tbectl destroy [-F] {beName | beName@snapshot}\n" "\tbectl export sourceBe\n" "\tbectl import targetBe\n" -#if SOON - "\tbectl add (path)*\n" -#endif - "\tbectl jail [{-b | -U}] [{-o key=value | -u key}]... bootenv [utility [argument ...]]\n" - "\tbectl list [-a] [-D] [-H] [-s]\n" + "\tbectl jail {-b | -U} [{-o key=value | -u key}]... " + "{jailID | jailName}\n" + "\t bootenv [utility [argument ...]]\n" + "\tbectl list [-DHas]\n" "\tbectl mount beName [mountpoint]\n" "\tbectl rename origBeName newBeName\n" - "\tbectl {ujail | unjail} ⟨jailID | jailName | bootenv)\n" + "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n" "\tbectl {umount | unmount} [-f] beName\n"); return (explicit ? 0 : EX_USAGE); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340992 - in head: etc/mtree share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale tools/tools/locale/etc
Author: yuripv Date: Mon Nov 26 19:39:49 2018 New Revision: 340992 URL: https://svnweb.freebsd.org/changeset/base/340992 Log: Add ga_IE.UTF-8 locale. PR: 228587 Submitted by: Micil (LC_TIME) Reviewed by: bapt Approved by: kib (mentor, implicit) MFC after:3 days Differential revision:https://reviews.freebsd.org/D17997 Added: head/share/monetdef/ga_IE.UTF-8.src - copied unchanged from r340991, head/share/monetdef/en_IE.UTF-8.src head/share/msgdef/ga_IE.UTF-8.src (contents, props changed) head/share/timedef/ga_IE.UTF-8.src (contents, props changed) Deleted: head/share/monetdef/en_IE.UTF-8.src Modified: head/etc/mtree/BSD.usr.dist head/share/colldef/Makefile head/share/ctypedef/Makefile head/share/monetdef/Makefile head/share/msgdef/Makefile head/share/numericdef/Makefile head/share/timedef/Makefile head/tools/tools/locale/Makefile head/tools/tools/locale/etc/charmaps.xml Modified: head/etc/mtree/BSD.usr.dist == --- head/etc/mtree/BSD.usr.dist Mon Nov 26 19:29:18 2018(r340991) +++ head/etc/mtree/BSD.usr.dist Mon Nov 26 19:39:49 2018(r340992) @@ -635,6 +635,8 @@ .. fr_FR.UTF-8 .. +ga_IE.UTF-8 +.. he_IL.UTF-8 .. hi_IN.ISCII-DEV Modified: head/share/colldef/Makefile == --- head/share/colldef/Makefile Mon Nov 26 19:29:18 2018(r340991) +++ head/share/colldef/Makefile Mon Nov 26 19:39:49 2018(r340992) @@ -184,6 +184,7 @@ SAME+= en_US.UTF-8 nl_NL.UTF-8 SAME+= en_US.UTF-8 nl_BE.UTF-8 SAME+= en_US.UTF-8 it_IT.UTF-8 SAME+= en_US.UTF-8 it_CH.UTF-8 +SAME+= en_US.UTF-8 ga_IE.UTF-8 SAME+= en_US.UTF-8 fr_FR.UTF-8 SAME+= en_US.UTF-8 fr_CH.UTF-8 SAME+= en_US.UTF-8 fr_BE.UTF-8 Modified: head/share/ctypedef/Makefile == --- head/share/ctypedef/MakefileMon Nov 26 19:29:18 2018 (r340991) +++ head/share/ctypedef/MakefileMon Nov 26 19:39:49 2018 (r340992) @@ -82,6 +82,7 @@ SAME+=C.UTF-8 hu_HU.UTF-8 SAME+= C.UTF-8 hr_HR.UTF-8 SAME+= C.UTF-8 hi_IN.UTF-8 SAME+= C.UTF-8 he_IL.UTF-8 +SAME+= C.UTF-8 ga_IE.UTF-8 SAME+= C.UTF-8 fr_FR.UTF-8 SAME+= C.UTF-8 fr_CH.UTF-8 SAME+= C.UTF-8 fr_CA.UTF-8 Modified: head/share/monetdef/Makefile == --- head/share/monetdef/MakefileMon Nov 26 19:29:18 2018 (r340991) +++ head/share/monetdef/MakefileMon Nov 26 19:39:49 2018 (r340992) @@ -31,7 +31,6 @@ LOCALES+= en_GB.US-ASCII LOCALES+= en_GB.UTF-8 LOCALES+= en_IE.ISO8859-1 LOCALES+= en_IE.ISO8859-15 -LOCALES+= en_IE.UTF-8 LOCALES+= en_NZ.UTF-8 LOCALES+= en_PH.UTF-8 LOCALES+= en_SG.UTF-8 @@ -47,6 +46,7 @@ LOCALES+= fr_CA.UTF-8 LOCALES+= fr_CH.ISO8859-15 LOCALES+= fr_CH.UTF-8 LOCALES+= fr_FR.UTF-8 +LOCALES+= ga_IE.UTF-8 LOCALES+= he_IL.UTF-8 LOCALES+= hi_IN.ISCII-DEV LOCALES+= hi_IN.UTF-8 @@ -156,6 +156,7 @@ SAME+= en_CA.UTF-8 en_CA.ISO8859-1 SAME+= en_GB.ISO8859-15 en_GB.ISO8859-1 SAME+= zh_HK.UTF-8 en_HK.UTF-8 SAME+= zh_HK.UTF-8 en_HK.ISO8859-1 +SAME+= ga_IE.UTF-8 en_IE.UTF-8 SAME+= en_NZ.UTF-8 en_NZ.US-ASCII SAME+= en_NZ.UTF-8 en_NZ.ISO8859-15 SAME+= en_NZ.UTF-8 en_NZ.ISO8859-1 Copied: head/share/monetdef/ga_IE.UTF-8.src (from r340991, head/share/monetdef/en_IE.UTF-8.src) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/monetdef/ga_IE.UTF-8.src Mon Nov 26 19:39:49 2018 (r340992, copy of r340991, head/share/monetdef/en_IE.UTF-8.src) @@ -0,0 +1,50 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# - +# +# int_curr_symbol (last character always SPACE) +EUR +# +# currency_symbol +€ +# +# mon_decimal_point +. +# +# mon_thousands_sep +, +# +# mon_grouping +3 +# +# positive_sign + +# +# negative_sign +- +# +# int_frac_digits +2 +# +# frac_digits +2 +# +# p_cs_precedes +1 +# +# p_sep_by_space +0 +# +# n_cs_precedes +1 +# +# n_sep_by_space +0 +# +# p_sign_posn +1 +# +# n_sign_posn +1 +# EOF Modified: head/share/msgdef/Makefile == ---
svn commit: r340976 - head/contrib/nvi/common
Author: yuripv Date: Mon Nov 26 15:33:55 2018 New Revision: 340976 URL: https://svnweb.freebsd.org/changeset/base/340976 Log: vi: fix UTF-8 detection. PR: 202290 Submitted by: la...@fit.vutbr.cz Reviewed by: bapt Approved by: kib (mentor, implicit) MFC after:3 days Differential Revision:https://reviews.freebsd.org/D17950 Modified: head/contrib/nvi/common/encoding.c Modified: head/contrib/nvi/common/encoding.c == --- head/contrib/nvi/common/encoding.c Mon Nov 26 15:12:58 2018 (r340975) +++ head/contrib/nvi/common/encoding.c Mon Nov 26 15:33:55 2018 (r340976) @@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes) if (i >= nbytes) goto done; - if (buf[i] & 0x40) /* 10xx */ + if ((buf[i] & 0xc0) != 0x80)/* 10xx */ return -1; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340974 - head/sbin/bectl
Author: yuripv Date: Mon Nov 26 15:11:32 2018 New Revision: 340974 URL: https://svnweb.freebsd.org/changeset/base/340974 Log: bectl: sync usage with man page, removing stray multibyte characters in the process. PR: 233526 Submitted by: tigersha...@gmail.com (original version) Reviewed by: kevans Approved by: kib (mentor, implicit) MFC after:3 days Differential revision:https://reviews.freebsd.org/D18335 Modified: head/sbin/bectl/bectl.c Modified: head/sbin/bectl/bectl.c == --- head/sbin/bectl/bectl.c Mon Nov 26 14:45:58 2018(r340973) +++ head/sbin/bectl/bectl.c Mon Nov 26 15:11:32 2018(r340974) @@ -66,22 +66,24 @@ usage(bool explicit) FILE *fp; fp = explicit ? stdout : stderr; - fprintf(fp, + fprintf(fp, "%s", "usage:\tbectl {-h | -? | subcommand [args...]}\n" +#if SOON + "\tbectl add (path)*\n" +#endif "\tbectl activate [-t] beName\n" - "\tbectl create [-e {nonActiveBe | -e beName@snapshot}] beName\n" - "\tbectl create beName@snapshot\n" + "\tbectl create [-r] [-e {nonActiveBe | beName@snapshot}] beName\n" + "\tbectl create [-r] beName@snapshot\n" "\tbectl destroy [-F] {beName | beName@snapshot}\n" "\tbectl export sourceBe\n" "\tbectl import targetBe\n" -#if SOON - "\tbectl add (path)*\n" -#endif - "\tbectl jail [{-b | -U}] [{-o key=value | -u key}]... bootenv [utility [argument ...]]\n" - "\tbectl list [-a] [-D] [-H] [-s]\n" + "\tbectl jail {-b | -U} [{-o key=value | -u key}]... " + "{jailID | jailName}\n" + "\t bootenv [utility [argument ...]]\n" + "\tbectl list [-DHas]\n" "\tbectl mount beName [mountpoint]\n" "\tbectl rename origBeName newBeName\n" - "\tbectl {ujail | unjail} ⟨jailID | jailName | bootenv)\n" + "\tbectl {ujail | unjail} {jailID | jailName} bootenv\n" "\tbectl {umount | unmount} [-f] beName\n"); return (explicit ? 0 : EX_USAGE); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340835 - in head/lib/libc: regex tests/regex
Author: yuripv Date: Fri Nov 23 15:49:18 2018 New Revision: 340835 URL: https://svnweb.freebsd.org/changeset/base/340835 Log: regexec: fix processing multibyte strings. Matcher function incorrectly assumed that moffset that we get from findmust is in bytes. Fix this by introducing a stepback function, taking short path if MB_CUR_MAX is 1, and going back byte-by-byte, checking if we have a legal character sequence otherwise. PR: 153502 Reviewed by: pfg, kevans Approved by: kib (mentor, implicit) Differential revision:https://reviews.freebsd.org/D18297 Added: head/lib/libc/tests/regex/multibyte.sh (contents, props changed) Modified: head/lib/libc/regex/engine.c head/lib/libc/tests/regex/Makefile Modified: head/lib/libc/regex/engine.c == --- head/lib/libc/regex/engine.cFri Nov 23 13:50:18 2018 (r340834) +++ head/lib/libc/regex/engine.cFri Nov 23 15:49:18 2018 (r340835) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); */ #ifdef SNAMES +#definestepback sstepback #definematcher smatcher #definewalkswalk #definedissect sdissect @@ -58,6 +59,7 @@ __FBSDID("$FreeBSD$"); #definematch smat #endif #ifdef LNAMES +#definestepback lstepback #definematcher lmatcher #definewalklwalk #definedissect ldissect @@ -68,6 +70,7 @@ __FBSDID("$FreeBSD$"); #definematch lmat #endif #ifdef MNAMES +#definestepback mstepback #definematcher mmatcher #definewalkmwalk #definedissect mdissect @@ -142,6 +145,39 @@ static const char *pchar(int ch); #endif /* + * Given a multibyte string pointed to by start, step back nchar characters + * from current position pointed to by cur. + */ +static const char * +stepback(const char *start, const char *cur, int nchar) +{ + const char *ret; + int wc, mbc; + mbstate_t mbs; + size_t clen; + + if (MB_CUR_MAX == 1) + return ((cur - nchar) > start ? cur - nchar : NULL); + + ret = cur; + for (wc = nchar; wc > 0; wc--) { + for (mbc = 1; mbc <= MB_CUR_MAX; mbc++) { + if ((ret - mbc) < start) + return (NULL); + memset(, 0, sizeof(mbs)); + clen = mbrtowc(NULL, ret - mbc, mbc, ); + if (clen != (size_t)-1 && clen != (size_t)-2) + break; + } + if (mbc > MB_CUR_MAX) + return (NULL); + ret -= mbc; + } + + return (ret); +} + +/* - matcher - the actual matching engine == static int matcher(struct re_guts *g, const char *string, \ ==size_t nmatch, regmatch_t pmatch[], int eflags); @@ -244,9 +280,14 @@ matcher(struct re_guts *g, ZAPSTATE(>mbs); /* Adjust start according to moffset, to speed things up */ - if (dp != NULL && g->moffset > -1) - start = ((dp - g->moffset) < start) ? start : dp - g->moffset; + if (dp != NULL && g->moffset > -1) { + const char *nstart; + nstart = stepback(start, dp, g->moffset); + if (nstart != NULL) + start = nstart; + } + SP("mloop", m->st, *start); /* this loop does only one repetition except for backrefs */ @@ -1083,6 +1124,7 @@ pchar(int ch) #endif #endif +#undef stepback #undef matcher #undef walk #undef dissect Modified: head/lib/libc/tests/regex/Makefile == --- head/lib/libc/tests/regex/Makefile Fri Nov 23 13:50:18 2018 (r340834) +++ head/lib/libc/tests/regex/Makefile Fri Nov 23 15:49:18 2018 (r340835) @@ -2,6 +2,9 @@ PACKAGE= tests +# local test cases +ATF_TESTS_SH+= multibyte + .include "Makefile.inc" .include "${.CURDIR:H}/Makefile.netbsd-tests" .include Added: head/lib/libc/tests/regex/multibyte.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/tests/regex/multibyte.sh Fri Nov 23 15:49:18 2018 (r340835) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +atf_test_case multibyte +multibyte_head() +{ + atf_set "descr" "Check matching multibyte characters (PR153502)" +} +multibyte_body() +{ + export LC_CTYPE="C.UTF-8" + + printf 'é' | atf_check -o "inline:é" \ + sed -ne '/^.$/p' + printf 'éé' | atf_check -o "inline:éé" \ + sed -ne '/^..$/p' + printf 'aéa' | atf_check -o "inline:aéa" \ + sed -ne '/a.a/p' + printf 'aéa'| atf_check -o "inline:aéa" \ + sed -ne '/a.*a/p' + printf 'aaéaa' | atf_check -o "inline:aaéaa" \ + sed -ne '/aa.aa/p' +
svn commit: r340492 - head/contrib/netbsd-tests/lib/libc/locale
Author: yuripv Date: Sat Nov 17 12:59:59 2018 New Revision: 340492 URL: https://svnweb.freebsd.org/changeset/base/340492 Log: Make mbstowcs_basic test pass, now that we have more ctype definitions. Reported by: jenkins Approved by: kib (mentor, implicit) Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c == --- head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Sat Nov 17 10:36:00 2018(r340491) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Sat Nov 17 12:59:59 2018(r340492) @@ -88,7 +88,7 @@ static struct test { 0x, 0x5D, 0x5B, 0x1, 0x10, 0x5D, 0x0A }, #ifdef __FreeBSD__ - {1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, + {1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, #else {1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340491 - in head: share/ctypedef tools/tools/locale tools/tools/locale/etc tools/tools/locale/tools
Author: yuripv Date: Sat Nov 17 10:36:00 2018 New Revision: 340491 URL: https://svnweb.freebsd.org/changeset/base/340491 Log: Use UnicodeData.txt to create UTF-8 ctype map. This should provide more complete coverage of currently defined Unicode characters as compared to manually assembled one we use currently. Comparison of original and new UTF-8 ctype maps by character class: TYPEORIGNEW alnum 94229 126029 alpha 93557 125419 blank 4 2 cntrl 73 137685 digit 469 622 graph 109615 137203 lower 14782145 print 109641 137222 punct 3428797 rune110481 274907 space 33 24 upper 983 1781 xdigit 469 622 Large number of added cntrl definitions is due to the fact that private-use planes are currently defined as such, this can change in the future. Discussed with: bapt Approved by: kib (mentor, implicit) MFC after:1 month Differential revision:https://reviews.freebsd.org/D17842 Deleted: head/tools/tools/locale/etc/common.UTF-8.src head/tools/tools/locale/etc/manual-input.UTF-8 Modified: head/share/ctypedef/C.UTF-8.src head/tools/tools/locale/Makefile head/tools/tools/locale/tools/utf8-rollup.pl Modified: head/share/ctypedef/C.UTF-8.src == --- head/share/ctypedef/C.UTF-8.src Sat Nov 17 00:03:04 2018 (r340490) +++ head/share/ctypedef/C.UTF-8.src Sat Nov 17 10:36:00 2018 (r340491) @@ -7,386 +7,27606 @@ comment_char * escape_char / LC_CTYPE - -** -* 0x - 0x007F Basic Latin -* 0x0080 - 0x00FF Latin-1 Supplement -* 0x0100 - 0x017F Latin Extended-A -* 0x0180 - 0x024F Latin Extended-B -* 0x0250 - 0x02AF IPA Extensions -* 0x1D00 - 0x1D7F Phonetic Extensions -* 0x1D80 - 0x1DBF Phonetic Extensions Supplement -* 0x1E00 - 0x1EFF Latin Extended Additional -* 0x2150 - 0x218F Number Forms (partial - Roman Numerals) -* 0x2C60 - 0x2C7F Latin Extended-C -* 0xA720 - 0xA7FF Latin Extended-D -* 0xAB30 - 0xAB6F Latin Extended-E -* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial) -* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial) -** -upper ;...;;/ - ;...;;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;...;;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;...;;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ -
svn commit: r340429 - head/lib/libc/locale
Author: yuripv Date: Wed Nov 14 09:06:15 2018 New Revision: 340429 URL: https://svnweb.freebsd.org/changeset/base/340429 Log: Fix WITHOUT_ICONV build after r340276. Reported by: olivier Approved by: kib (mentor, implicit) Modified: head/lib/libc/locale/c16rtomb.c head/lib/libc/locale/c32rtomb.c head/lib/libc/locale/mbrtoc16.c head/lib/libc/locale/mbrtoc32.c Modified: head/lib/libc/locale/c16rtomb.c == --- head/lib/libc/locale/c16rtomb.c Wed Nov 14 08:45:48 2018 (r340428) +++ head/lib/libc/locale/c16rtomb.c Wed Nov 14 09:06:15 2018 (r340429) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "xlocale_private.h" +#include "mblocal.h" typedef struct { char16_tlead_surrogate; @@ -47,7 +47,7 @@ c16rtomb_l(char * __restrict s, char16_t c16, mbstate_ FIX_LOCALE(locale); if (ps == NULL) - ps = >c16rtomb; + ps = &(XLOCALE_CTYPE(locale)->c16rtomb); cs = (_Char16State *)ps; /* If s is a null pointer, the value of parameter c16 is ignored. */ Modified: head/lib/libc/locale/c32rtomb.c == --- head/lib/libc/locale/c32rtomb.c Wed Nov 14 08:45:48 2018 (r340428) +++ head/lib/libc/locale/c32rtomb.c Wed Nov 14 09:06:15 2018 (r340429) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include "xlocale_private.h" +#include "mblocal.h" size_t c32rtomb_l(char * __restrict s, char32_t c32, mbstate_t * __restrict ps, @@ -47,7 +47,7 @@ c32rtomb_l(char * __restrict s, char32_t c32, mbstate_ FIX_LOCALE(locale); if (ps == NULL) - ps = >c32rtomb; + ps = &(XLOCALE_CTYPE(locale)->c32rtomb); /* Assume wchar_t uses UTF-32. */ return (wcrtomb_l(s, c32, ps, locale)); Modified: head/lib/libc/locale/mbrtoc16.c == --- head/lib/libc/locale/mbrtoc16.c Wed Nov 14 08:45:48 2018 (r340428) +++ head/lib/libc/locale/mbrtoc16.c Wed Nov 14 09:06:15 2018 (r340429) @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); #include -#include "xlocale_private.h" +#include "mblocal.h" typedef struct { char16_ttrail_surrogate; @@ -47,7 +47,7 @@ mbrtoc16_l(char16_t * __restrict pc16, const char * __ FIX_LOCALE(locale); if (ps == NULL) - ps = >mbrtoc16; + ps = &(XLOCALE_CTYPE(locale)->mbrtoc16); cs = (_Char16State *)ps; /* Modified: head/lib/libc/locale/mbrtoc32.c == --- head/lib/libc/locale/mbrtoc32.c Wed Nov 14 08:45:48 2018 (r340428) +++ head/lib/libc/locale/mbrtoc32.c Wed Nov 14 09:06:15 2018 (r340429) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "xlocale_private.h" +#include "mblocal.h" size_t mbrtoc32_l(char32_t * __restrict pc32, const char * __restrict s, size_t n, @@ -40,7 +40,7 @@ mbrtoc32_l(char32_t * __restrict pc32, const char * __ FIX_LOCALE(locale); if (ps == NULL) - ps = >mbrtoc32; + ps = &(XLOCALE_CTYPE(locale)->mbrtoc32); /* Assume wchar_t uses UTF-32. */ return (mbrtowc_l(pc32, s, n, ps, locale)); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340354 - head/share/timedef
Author: yuripv Date: Sun Nov 11 13:41:32 2018 New Revision: 340354 URL: https://svnweb.freebsd.org/changeset/base/340354 Log: Use blank am_pm and t_fmt_ampm for de_AT and de_DE locales as apparently they use 24-hour clock notation. The visible change is that w(1) now uses 24-hour clock format as it checks for t_fmt_ampm presence. PR: 231771 Submitted by: Christoph Schönweiler Reviewed by: bapt Approved by: kib (mentor, implicit) MFC after:1 month Differential Revision:https://reviews.freebsd.org/D17945 Modified: head/share/timedef/de_AT.ISO8859-15.src head/share/timedef/de_AT.UTF-8.src head/share/timedef/de_DE.ISO8859-15.src head/share/timedef/de_DE.UTF-8.src Modified: head/share/timedef/de_AT.ISO8859-15.src == --- head/share/timedef/de_AT.ISO8859-15.src Sun Nov 11 12:35:30 2018 (r340353) +++ head/share/timedef/de_AT.ISO8859-15.src Sun Nov 11 13:41:32 2018 (r340354) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names J�n. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: head/share/timedef/de_AT.UTF-8.src == --- head/share/timedef/de_AT.UTF-8.src Sun Nov 11 12:35:30 2018 (r340353) +++ head/share/timedef/de_AT.UTF-8.src Sun Nov 11 13:41:32 2018 (r340354) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names Jän. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: head/share/timedef/de_DE.ISO8859-15.src == --- head/share/timedef/de_DE.ISO8859-15.src Sun Nov 11 12:35:30 2018 (r340353) +++ head/share/timedef/de_DE.ISO8859-15.src Sun Nov 11 13:41:32 2018 (r340354) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names Jan. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF Modified: head/share/timedef/de_DE.UTF-8.src == --- head/share/timedef/de_DE.UTF-8.src Sun Nov 11 12:35:30 2018 (r340353) +++ head/share/timedef/de_DE.UTF-8.src Sun Nov 11 13:41:32 2018 (r340354) @@ -1,7 +1,3 @@ -# Warning: Do not edit. This file is automatically generated from the -# tools in /usr/src/tools/tools/locale. The data is obtained from the -# CLDR project, obtained from http://cldr.unicode.org/ -# - # # Short month names Jan. @@ -59,8 +55,8 @@ Samstag %a %e %b %X %Y # # AM/PM -vorm. -nachm. + + # # date_fmt %a %e %b %Y %X %Z @@ -83,5 +79,5 @@ Dezember dm # # ampm_fmt -%I:%M:%S %p + # EOF ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340276 - in head: contrib/netbsd-tests/lib/libc/locale lib/libc/locale
Author: yuripv Date: Fri Nov 9 03:32:53 2018 New Revision: 340276 URL: https://svnweb.freebsd.org/changeset/base/340276 Log: Reset persistent mbstates when rune locale encoding changes. This was shown to be a problem by side effect of now-enabled test case, which was going through C, en_US.UTF-8, ja_JP.SJIS, and ja_JP.eucJP, and failing eventually as data in mbrtowc's mbstate, that was perfectly correct for en_US.UTF-8 was treated as incorrect for ja_JP.SJIS, failing the entire test case. This makes the persistent mbstates to be per ctype-component, and not per-locale so we could easily reset the mbstates when only LC_CTYPE is changed. Reviewed by: bapt, pfg Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17796 Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c head/lib/libc/locale/cXXrtomb_iconv.h head/lib/libc/locale/mblen.c head/lib/libc/locale/mblocal.h head/lib/libc/locale/mbrlen.c head/lib/libc/locale/mbrtocXX_iconv.h head/lib/libc/locale/mbrtowc.c head/lib/libc/locale/mbsnrtowcs.c head/lib/libc/locale/mbsrtowcs.c head/lib/libc/locale/mbtowc.c head/lib/libc/locale/setrunelocale.c head/lib/libc/locale/wcrtomb.c head/lib/libc/locale/wcsnrtombs.c head/lib/libc/locale/wcsrtombs.c head/lib/libc/locale/wctomb.c head/lib/libc/locale/xlocale_private.h Modified: head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c == --- head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Fri Nov 9 00:46:50 2018(r340275) +++ head/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Fri Nov 9 03:32:53 2018(r340276) @@ -243,9 +243,6 @@ ATF_TC_BODY(mbrtowc_internal, tc) { struct test *t; -#ifdef __FreeBSD__ - atf_tc_expect_fail("ja_* locale fails"); -#endif for (t = [0]; t->data != NULL; ++t) h_ctype2(t, false); } Modified: head/lib/libc/locale/cXXrtomb_iconv.h == --- head/lib/libc/locale/cXXrtomb_iconv.h Fri Nov 9 00:46:50 2018 (r340275) +++ head/lib/libc/locale/cXXrtomb_iconv.h Fri Nov 9 03:32:53 2018 (r340276) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include "../iconv/citrus_hash.h" #include "../iconv/citrus_module.h" #include "../iconv/citrus_iconv.h" -#include "xlocale_private.h" +#include "mblocal.h" typedef struct { boolinitialized; @@ -65,7 +65,7 @@ cXXrtomb_l(char * __restrict s, charXX_t c, mbstate_t FIX_LOCALE(locale); if (ps == NULL) - ps = >cXXrtomb; + ps = &(XLOCALE_CTYPE(locale)->cXXrtomb); cs = (_ConversionState *)ps; handle = >iconv; Modified: head/lib/libc/locale/mblen.c == --- head/lib/libc/locale/mblen.cFri Nov 9 00:46:50 2018 (r340275) +++ head/lib/libc/locale/mblen.cFri Nov 9 03:32:53 2018 (r340276) @@ -47,10 +47,11 @@ mblen_l(const char *s, size_t n, locale_t locale) if (s == NULL) { /* No support for state dependent encodings. */ - locale->mblen = initial; + XLOCALE_CTYPE(locale)->mblen = initial; return (0); } - rval = XLOCALE_CTYPE(locale)->__mbrtowc(NULL, s, n, >mblen); + rval = XLOCALE_CTYPE(locale)->__mbrtowc(NULL, s, n, + &(XLOCALE_CTYPE(locale)->mblen)); if (rval == (size_t)-1 || rval == (size_t)-2) return (-1); return ((int)rval); Modified: head/lib/libc/locale/mblocal.h == --- head/lib/libc/locale/mblocal.h Fri Nov 9 00:46:50 2018 (r340275) +++ head/lib/libc/locale/mblocal.h Fri Nov 9 03:32:53 2018 (r340276) @@ -60,6 +60,34 @@ struct xlocale_ctype { size_t, size_t, mbstate_t * __restrict); int __mb_cur_max; int __mb_sb_limit; + /** Persistent state used by mblen() calls. */ + __mbstate_t mblen; + /** Persistent state used by mbrlen() calls. */ + __mbstate_t mbrlen; + /** Persistent state used by mbrtoc16() calls. */ + __mbstate_t mbrtoc16; + /** Persistent state used by mbrtoc32() calls. */ + __mbstate_t mbrtoc32; + /** Persistent state used by mbrtowc() calls. */ + __mbstate_t mbrtowc; + /** Persistent state used by mbsnrtowcs() calls. */ + __mbstate_t mbsnrtowcs; + /** Persistent state used by mbsrtowcs() calls. */ + __mbstate_t mbsrtowcs; + /** Persistent state used by mbtowc() calls. */ + __mbstate_t mbtowc; + /** Persistent state used by c16rtomb() calls. */ + __mbstate_t c16rtomb; + /** Persistent state used by c32rtomb()
svn commit: r340204 - in head/tools/tools/locale: . etc tools
Author: yuripv Date: Tue Nov 6 21:49:50 2018 New Revision: 340204 URL: https://svnweb.freebsd.org/changeset/base/340204 Log: Cleanup locale tools: - Simplify the source dir specification, and update README appropriately - Drop the LC (doonly) processing, it's broken, and even if fixed, not really useful - Don't remove the target directories while installing new data as it removes Makefile.depend which we don't manage; only rm the files we are going to add/replace/delete instead - Restrict adding bsd.endian.mk to colldef and ctypedef Makefiles, it's not needed in other (text-only) categories - GC unused scripts; they don't seem to be particularly helpful standalone as well Reviewed by: bapt Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17858 Deleted: head/tools/tools/locale/etc/unicode.conf head/tools/tools/locale/tools/UTF82encoding.pl head/tools/tools/locale/tools/changeoffset.pl head/tools/tools/locale/tools/unicode2src.pl head/tools/tools/locale/tools/whatis.pl Modified: head/tools/tools/locale/Makefile head/tools/tools/locale/README head/tools/tools/locale/tools/cldr2def.pl head/tools/tools/locale/tools/finalize head/tools/tools/locale/tools/utf8-rollup.pl Modified: head/tools/tools/locale/Makefile == --- head/tools/tools/locale/MakefileTue Nov 6 21:47:22 2018 (r340203) +++ head/tools/tools/locale/MakefileTue Nov 6 21:49:50 2018 (r340204) @@ -10,13 +10,10 @@ .OBJDIR: . -.if !defined(CLDRDIR) -CLDRDIR!= grep ^cldr etc/unicode.conf | cut -f 2 -d " " +.if !defined(UNIDIR) +.error UNIDIR is not set .endif -.if !defined(UNIDATADIR) -UNIDATADIR!= grep ^unidata etc/unicode.conf | cut -f 2 -d " " -.endif -PASSON=CLDRDIR="${CLDRDIR}" UNIDATADIR="${UNIDATADIR}" +PASSON=UNIDIR="${UNIDIR}" ETCDIR=${.CURDIR}/etc @@ -49,12 +46,8 @@ COLLATIONS_SPECIAL_ENV+= ${area}.${enc} .endfor PASSON+= COLLATIONS_SPECIAL="${COLLATIONS_SPECIAL_ENV}" -.if defined(LC) -LC:= --lc=${LC} -.endif - all: - cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src + cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src .for t in ${TYPES} . if ${KNOWN:M${t}} test -d ${t} || mkdir ${t} @@ -69,8 +62,9 @@ install: install-${t} install-${t}: . if ${KNOWN:M${t}} rm -rf ${.CURDIR}/${t}.draft - rm -rf ${.CURDIR}/../../../share/${t} - mv ${.CURDIR}/${t} ${.CURDIR}/../../../share/${t} + rm -f ${.CURDIR}/../../../share/${t}/Makefile + rm -f ${.CURDIR}/../../../share/${t}/*.src + mv ${.CURDIR}/${t}/* ${.CURDIR}/../../../share/${t}/ . endif .endfor @@ -86,10 +80,9 @@ post-install: gen-${t}: mkdir -p ${t} ${t}.draft perl -I tools tools/cldr2def.pl \ - --cldr=$$(realpath ${CLDRDIR}) \ - --unidata=$$(realpath ${UNIDATADIR}) \ + --unidir=$$(realpath ${UNIDIR}) \ --etc=$$(realpath ${ETCDIR}) \ - --type=${t} ${LC} + --type=${t} build-${t}: gen-${t} env ${PASSON} tools/finalize ${t} @@ -101,15 +94,16 @@ build-colldef: static-colldef static-colldef: .for area enc in ${COLLATION_SPECIAL} - awk -f tools/extract-colldef.awk ${CLDRDIR}/posix/${area}.${enc}.src > colldef.draft/${area}.${enc}.src + awk -f tools/extract-colldef.awk ${UNIDIR}/posix/${area}.${enc}.src > \ + colldef.draft/${area}.${enc}.src .endfor transfer-rollup: - cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src + cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src rollup: perl -I tools tools/utf8-rollup.pl \ - --cldr=$$(realpath ${CLDRDIR}) \ + --unidir=$$(realpath ${UNIDIR}) \ --etc=$$(realpath ${ETCDIR}) clean: @@ -159,33 +153,33 @@ ENCODINGS=Big5 \ POSIX: -.if exists (${CLDRDIR}/tools/java/cldr.jar) - mkdir -p ${CLDRDIR}/posix +.if exists (${UNIDIR}/tools/java/cldr.jar) + mkdir -p ${UNIDIR}/posix . for area in ${BASE_LOCALES_OF_INTEREST} -.if !exists(${CLDRDIR}/posix/${area}.UTF-8.src) - java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \ +.if !exists(${UNIDIR}/posix/${area}.UTF-8.src) + java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \ org.unicode.cldr.posix.GeneratePOSIX \ - -d ${CLDRDIR}/posix -m ${area} -c UTF-8 + -d ${UNIDIR}/posix -m ${area} -c UTF-8 .endif . endfor . for area encoding in ${COLLATION_SPECIAL} -.if !exists(${CLDRDIR}/posix/${area}.${encoding}.src) - java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \ +.if !exists(${UNIDIR}/posix/${area}.${encoding}.src) + java
Re: svn commit: r340144 - in head: lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/tools
Baptiste Daroussin wrote: > On Sun, Nov 04, 2018 at 10:13:22PM +0000, Yuri Pankov wrote: >> Author: yuripv >> Date: Sun Nov 4 22:13:22 2018 >> New Revision: 340144 >> URL: https://svnweb.freebsd.org/changeset/base/340144 >> >> Log: >> Add hybrid C.UTF-8 locale being identical to default C locale except >> that it uses the same ctype maps and functions as other UTF-8 locales. >> >> Reviewed by: bapt, cem, eadler >> Approved by: kib (mentor, implicit) >> Differential Revision: https://reviews.freebsd.org/D17833 >> > Excellent, do you plan to MFC that so freebsd 12.1 and freebsd 11.3 can > benefit > it? Yes, will do along with CLDR 34 data (MFC period specified as 1 month there). signature.asc Description: OpenPGP digital signature
svn commit: r340144 - in head: lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/tools
Author: yuripv Date: Sun Nov 4 22:13:22 2018 New Revision: 340144 URL: https://svnweb.freebsd.org/changeset/base/340144 Log: Add hybrid C.UTF-8 locale being identical to default C locale except that it uses the same ctype maps and functions as other UTF-8 locales. Reviewed by: bapt, cem, eadler Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17833 Added: head/share/ctypedef/C.UTF-8.src - copied unchanged from r340143, head/share/ctypedef/en_US.UTF-8.src Deleted: head/share/ctypedef/en_US.UTF-8.src Modified: head/lib/libc/locale/collate.c head/lib/libc/locale/ldpart.c head/share/ctypedef/Makefile head/tools/tools/locale/Makefile head/tools/tools/locale/tools/cldr2def.pl Modified: head/lib/libc/locale/collate.c == --- head/lib/libc/locale/collate.c Sun Nov 4 20:26:29 2018 (r340143) +++ head/lib/libc/locale/collate.c Sun Nov 4 22:13:22 2018 (r340144) @@ -84,7 +84,8 @@ destruct_collate(void *t) void * __collate_load(const char *encoding, __unused locale_t unused) { - if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { + if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 || + strncmp(encoding, "C.", 2) == 0) { return &__xlocale_C_collate; } struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 1); @@ -122,7 +123,8 @@ __collate_load_tables_l(const char *encoding, struct x table->__collate_load_error = 1; /* 'encoding' must be already checked. */ - if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) { + if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 || + strncmp(encoding, "C.", 2) == 0) { return (_LDP_CACHE); } Modified: head/lib/libc/locale/ldpart.c == --- head/lib/libc/locale/ldpart.c Sun Nov 4 20:26:29 2018 (r340143) +++ head/lib/libc/locale/ldpart.c Sun Nov 4 22:13:22 2018 (r340144) @@ -63,7 +63,8 @@ __part_load_locale(const char *name, size_t namesize, bufsize; /* 'name' must be already checked. */ - if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) { + if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0 || + strncmp(name, "C.", 2) == 0) { *using_locale = 0; return (_LDP_CACHE); } Copied: head/share/ctypedef/C.UTF-8.src (from r340143, head/share/ctypedef/en_US.UTF-8.src) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/ctypedef/C.UTF-8.src Sun Nov 4 22:13:22 2018 (r340144, copy of r340143, head/share/ctypedef/en_US.UTF-8.src) @@ -0,0 +1,6372 @@ +# Warning: Do not edit. This file is automatically generated from the +# tools in /usr/src/tools/tools/locale. The data is obtained from the +# CLDR project, obtained from http://cldr.unicode.org/ +# - + +comment_char * +escape_char / + +LC_CTYPE + +** +* 0x - 0x007F Basic Latin +* 0x0080 - 0x00FF Latin-1 Supplement +* 0x0100 - 0x017F Latin Extended-A +* 0x0180 - 0x024F Latin Extended-B +* 0x0250 - 0x02AF IPA Extensions +* 0x1D00 - 0x1D7F Phonetic Extensions +* 0x1D80 - 0x1DBF Phonetic Extensions Supplement +* 0x1E00 - 0x1EFF Latin Extended Additional +* 0x2150 - 0x218F Number Forms (partial - Roman Numerals) +* 0x2C60 - 0x2C7F Latin Extended-C +* 0xA720 - 0xA7FF Latin Extended-D +* 0xAB30 - 0xAB6F Latin Extended-E +* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial) +* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial) +** +upper ;...;;/ + ;...;;/ + ;...;;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;...;;/ + ;...;;/ + ;/ + ;/ + ;...;;/ + ;/ + ;/ + ;/ + ;/ +
svn commit: r340128 - head/usr.bin/man
Author: yuripv Date: Sun Nov 4 16:58:55 2018 New Revision: 340128 URL: https://svnweb.freebsd.org/changeset/base/340128 Log: Teach man(1) about C.UTF-8. While here, use LANG as the proper source to select man pages language/encoding, falling back to LC_CTYPE. Reviewed by: bapt Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17835 Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh == --- head/usr.bin/man/man.sh Sun Nov 4 16:08:59 2018(r340127) +++ head/usr.bin/man/man.sh Sun Nov 4 16:58:55 2018(r340128) @@ -662,6 +662,7 @@ man_setup_width() { # Setup necessary locale variables. man_setup_locale() { local lang_cc + local locstr locpaths='.' man_charset='US-ASCII' @@ -670,18 +671,25 @@ man_setup_locale() { if [ -n "$oflag" ]; then decho 'Using non-localized manpages' else - # Use the locale tool to give us the proper LC_CTYPE + # Use the locale tool to give us proper locale information eval $( $LOCALE ) - case "$LC_CTYPE" in + if [ -n "$LANG" ]; then + locstr=$LANG + else + locstr=$LC_CTYPE + fi + + case "$locstr" in C) ;; + C.UTF-8);; POSIX) ;; [a-z][a-z]_[A-Z][A-Z]\.*) - lang_cc="${LC_CTYPE%.*}" - man_lang="${LC_CTYPE%_*}" + lang_cc="${locstr%.*}" + man_lang="${locstr%_*}" man_country="${lang_cc#*_}" - man_charset="${LC_CTYPE#*.}" - locpaths="$LC_CTYPE" + man_charset="${locstr#*.}" + locpaths="$locstr" locpaths="$locpaths:$man_lang.$man_charset" if [ "$man_lang" != "en" ]; then locpaths="$locpaths:en.$man_charset" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340106 - in head: contrib/netbsd-tests/lib/libc/time lib/libc/stdtime
Author: yuripv Date: Sat Nov 3 23:37:13 2018 New Revision: 340106 URL: https://svnweb.freebsd.org/changeset/base/340106 Log: strptime: make %k and %l specifiers match their description in strftime(3), and allow them to process space-padded input. PR: 230720 Submitted by: rlit...@inetco.com (original version) Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17761 Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c head/lib/libc/stdtime/strptime.c Modified: head/contrib/netbsd-tests/lib/libc/time/t_strptime.c == --- head/contrib/netbsd-tests/lib/libc/time/t_strptime.cSat Nov 3 22:12:21 2018(r340105) +++ head/contrib/netbsd-tests/lib/libc/time/t_strptime.cSat Nov 3 23:37:13 2018(r340106) @@ -331,8 +331,19 @@ ATF_TC_BODY(hour, tc) h_fail("00", "%I"); h_fail("13", "%I"); + #ifdef __FreeBSD__ - h_fail("00", "%l"); + h_pass("0", "%k", 1, -1, -1, 0, -1, -1, -1, -1, -1); + h_pass("04", "%k", 2, -1, -1, 4, -1, -1, -1, -1, -1); + h_pass(" 8", "%k", 2, -1, -1, 8, -1, -1, -1, -1, -1); + h_pass("23", "%k", 2, -1, -1, 23, -1, -1, -1, -1, -1); + h_fail("24", "%k"); + + h_fail("0", "%l"); + h_pass("1", "%l", 1, -1, -1, 1, -1, -1, -1, -1, -1); + h_pass("05", "%l", 2, -1, -1, 5, -1, -1, -1, -1, -1); + h_pass(" 9", "%l", 2, -1, -1, 9, -1, -1, -1, -1, -1); + h_pass("12", "%l", 2, -1, -1, 12, -1, -1, -1, -1, -1); h_fail("13", "%l"); #endif Modified: head/lib/libc/stdtime/strptime.c == --- head/lib/libc/stdtime/strptime.cSat Nov 3 22:12:21 2018 (r340105) +++ head/lib/libc/stdtime/strptime.cSat Nov 3 23:37:13 2018 (r340106) @@ -272,17 +272,24 @@ label: case 'k': case 'l': /* -* Of these, %l is the only specifier explicitly -* documented as not being zero-padded. However, -* there is no harm in allowing zero-padding. +* %k and %l specifiers are documented as being +* blank-padded. However, there is no harm in +* allowing zero-padding. * -* XXX The %l specifier may gobble one too many +* XXX %k and %l specifiers may gobble one too many * digits if used incorrectly. */ + + len = 2; + if ((c == 'k' || c == 'l') && + isblank_l((unsigned char)*buf, locale)) { + buf++; + len = 1; + } + if (!isdigit_l((unsigned char)*buf, locale)) return (NULL); - len = 2; for (i = 0; len && *buf != 0 && isdigit_l((unsigned char)*buf, locale); buf++) { i *= 10; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r340105 - svnadmin/conf
Author: yuripv Date: Sat Nov 3 22:12:21 2018 New Revision: 340105 URL: https://svnweb.freebsd.org/changeset/base/340105 Log: Remove myself. Approved by: kib (mentor, implicit) Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf == --- svnadmin/conf/sizelimit.confSat Nov 3 22:02:10 2018 (r340104) +++ svnadmin/conf/sizelimit.confSat Nov 3 22:12:21 2018 (r340105) @@ -27,4 +27,3 @@ np obrien peter rwatson -yuripv ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"