summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2019-07-15 17:24:25 -0700
committerGarrett D'Amore <garrett@damore.org>2019-07-18 09:41:16 -0700
commit955eb5e1fb25fc64c2c34501c3d9426057e3b1f8 (patch)
treec5e63f7ed47c76dd9b88e2a5383a26ab0ed9124d
parent4c6a557ef3ee09ce3af0b3773cf03d745a0bdcb6 (diff)
downloadillumos-joyent-955eb5e1fb25fc64c2c34501c3d9426057e3b1f8.tar.gz
10167 unable to check out illumos-gate on Windows
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/mailx/Makefile5
-rw-r--r--usr/src/cmd/mailx/util.c (renamed from usr/src/cmd/mailx/aux.c)0
-rw-r--r--usr/src/cmd/sendmail/Makefile6
-rw-r--r--usr/src/cmd/sendmail/util/Makefile (renamed from usr/src/cmd/sendmail/aux/Makefile)0
-rw-r--r--usr/src/cmd/sendmail/util/editmap.c (renamed from usr/src/cmd/sendmail/aux/editmap.c)0
-rw-r--r--usr/src/cmd/sendmail/util/etrn.pl (renamed from usr/src/cmd/sendmail/aux/etrn.pl)0
-rw-r--r--usr/src/cmd/sendmail/util/mail.local.c (renamed from usr/src/cmd/sendmail/aux/mail.local.c)0
-rw-r--r--usr/src/cmd/sendmail/util/mailcompat.c (renamed from usr/src/cmd/sendmail/aux/mailcompat.c)0
-rw-r--r--usr/src/cmd/sendmail/util/mailq.c (renamed from usr/src/cmd/sendmail/aux/mailq.c)0
-rw-r--r--usr/src/cmd/sendmail/util/mailstats.c (renamed from usr/src/cmd/sendmail/aux/mailstats.c)0
-rw-r--r--usr/src/cmd/sendmail/util/makemap.c (renamed from usr/src/cmd/sendmail/aux/makemap.c)0
-rw-r--r--usr/src/cmd/sendmail/util/mconnect.c (renamed from usr/src/cmd/sendmail/aux/mconnect.c)0
-rw-r--r--usr/src/cmd/sendmail/util/praliases.c (renamed from usr/src/cmd/sendmail/aux/praliases.c)0
-rw-r--r--usr/src/cmd/sendmail/util/rfc2047.c (renamed from usr/src/cmd/sendmail/aux/rfc2047.c)0
-rw-r--r--usr/src/cmd/sendmail/util/smrsh.c (renamed from usr/src/cmd/sendmail/aux/smrsh.c)0
-rw-r--r--usr/src/cmd/sendmail/util/vacation.c (renamed from usr/src/cmd/sendmail/aux/vacation.c)0
-rw-r--r--usr/src/data/locale/Makefile9
l---------usr/src/data/locale/data/zz_AA.UTF-8.src1
-rw-r--r--usr/src/tools/scripts/git-pbchk.py83
19 files changed, 93 insertions, 11 deletions
diff --git a/usr/src/cmd/mailx/Makefile b/usr/src/cmd/mailx/Makefile
index 939ed76141..57bc1bcfe5 100644
--- a/usr/src/cmd/mailx/Makefile
+++ b/usr/src/cmd/mailx/Makefile
@@ -23,18 +23,19 @@
# Use is subject to license terms.
#
# Copyright 2018 Joyent, Inc.
+# Copyright 2019 Garrett D'Amore <garrett@damore.org>
#
# cmd/mailx/Makefile
PROG= mailx
-OBJS= myfopen.o aux.o cmd1.o cmd2.o cmd3.o \
+OBJS= myfopen.o cmd1.o cmd2.o cmd3.o \
cmd4.o cmdtab.o collect.o config.o edit.o \
init.o fio.o getname.o head.o \
hostname.o lex.o list.o lock.o lpaths.o \
main.o names.o optim.o popen.o quit.o \
receipt.o send.o sigretro.o stralloc.o temp.o \
- translate.o tty.o usg.local.o vars.o
+ translate.o tty.o usg.local.o util.o vars.o
SRCS= $(OBJS:.o=.c)
diff --git a/usr/src/cmd/mailx/aux.c b/usr/src/cmd/mailx/util.c
index 09d0b5d018..09d0b5d018 100644
--- a/usr/src/cmd/mailx/aux.c
+++ b/usr/src/cmd/mailx/util.c
diff --git a/usr/src/cmd/sendmail/Makefile b/usr/src/cmd/sendmail/Makefile
index 604b8d2959..ff427c0fde 100644
--- a/usr/src/cmd/sendmail/Makefile
+++ b/usr/src/cmd/sendmail/Makefile
@@ -23,14 +23,16 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2019 Garrett D'Amore <garrett@damore.org>
+#
# cmd/sendmail/Makefile
#
# Makefile for top level sendmail source directory
#
# static libraries (db, libsm, libsmdb, libsmutil) must be built before
-# src and aux
-SUBDIRS= cf lib db libsm libsmdb libsmutil .WAIT src aux
+# src and util
+SUBDIRS= cf lib db libsm libsmdb libsmutil .WAIT src util
include ../Makefile.cmd
diff --git a/usr/src/cmd/sendmail/aux/Makefile b/usr/src/cmd/sendmail/util/Makefile
index 455879af02..455879af02 100644
--- a/usr/src/cmd/sendmail/aux/Makefile
+++ b/usr/src/cmd/sendmail/util/Makefile
diff --git a/usr/src/cmd/sendmail/aux/editmap.c b/usr/src/cmd/sendmail/util/editmap.c
index a86a24d456..a86a24d456 100644
--- a/usr/src/cmd/sendmail/aux/editmap.c
+++ b/usr/src/cmd/sendmail/util/editmap.c
diff --git a/usr/src/cmd/sendmail/aux/etrn.pl b/usr/src/cmd/sendmail/util/etrn.pl
index fc067b1a6a..fc067b1a6a 100644
--- a/usr/src/cmd/sendmail/aux/etrn.pl
+++ b/usr/src/cmd/sendmail/util/etrn.pl
diff --git a/usr/src/cmd/sendmail/aux/mail.local.c b/usr/src/cmd/sendmail/util/mail.local.c
index 0d04d3c58c..0d04d3c58c 100644
--- a/usr/src/cmd/sendmail/aux/mail.local.c
+++ b/usr/src/cmd/sendmail/util/mail.local.c
diff --git a/usr/src/cmd/sendmail/aux/mailcompat.c b/usr/src/cmd/sendmail/util/mailcompat.c
index aefc3dcfe5..aefc3dcfe5 100644
--- a/usr/src/cmd/sendmail/aux/mailcompat.c
+++ b/usr/src/cmd/sendmail/util/mailcompat.c
diff --git a/usr/src/cmd/sendmail/aux/mailq.c b/usr/src/cmd/sendmail/util/mailq.c
index 4fadd88ff0..4fadd88ff0 100644
--- a/usr/src/cmd/sendmail/aux/mailq.c
+++ b/usr/src/cmd/sendmail/util/mailq.c
diff --git a/usr/src/cmd/sendmail/aux/mailstats.c b/usr/src/cmd/sendmail/util/mailstats.c
index 6c5f9a18f8..6c5f9a18f8 100644
--- a/usr/src/cmd/sendmail/aux/mailstats.c
+++ b/usr/src/cmd/sendmail/util/mailstats.c
diff --git a/usr/src/cmd/sendmail/aux/makemap.c b/usr/src/cmd/sendmail/util/makemap.c
index 3b4ab68ba5..3b4ab68ba5 100644
--- a/usr/src/cmd/sendmail/aux/makemap.c
+++ b/usr/src/cmd/sendmail/util/makemap.c
diff --git a/usr/src/cmd/sendmail/aux/mconnect.c b/usr/src/cmd/sendmail/util/mconnect.c
index 3a4f1fa0e1..3a4f1fa0e1 100644
--- a/usr/src/cmd/sendmail/aux/mconnect.c
+++ b/usr/src/cmd/sendmail/util/mconnect.c
diff --git a/usr/src/cmd/sendmail/aux/praliases.c b/usr/src/cmd/sendmail/util/praliases.c
index 8839334286..8839334286 100644
--- a/usr/src/cmd/sendmail/aux/praliases.c
+++ b/usr/src/cmd/sendmail/util/praliases.c
diff --git a/usr/src/cmd/sendmail/aux/rfc2047.c b/usr/src/cmd/sendmail/util/rfc2047.c
index 8092a9a587..8092a9a587 100644
--- a/usr/src/cmd/sendmail/aux/rfc2047.c
+++ b/usr/src/cmd/sendmail/util/rfc2047.c
diff --git a/usr/src/cmd/sendmail/aux/smrsh.c b/usr/src/cmd/sendmail/util/smrsh.c
index 32d9afa8eb..32d9afa8eb 100644
--- a/usr/src/cmd/sendmail/aux/smrsh.c
+++ b/usr/src/cmd/sendmail/util/smrsh.c
diff --git a/usr/src/cmd/sendmail/aux/vacation.c b/usr/src/cmd/sendmail/util/vacation.c
index 5a0f93756d..5a0f93756d 100644
--- a/usr/src/cmd/sendmail/aux/vacation.c
+++ b/usr/src/cmd/sendmail/util/vacation.c
diff --git a/usr/src/data/locale/Makefile b/usr/src/data/locale/Makefile
index 3f3cf0b003..e3313f5f58 100644
--- a/usr/src/data/locale/Makefile
+++ b/usr/src/data/locale/Makefile
@@ -14,6 +14,7 @@
# Copyright 2011 EveryCity Ltd. All rights reserved.
# Copyright 2013 DEY Storage Systems, Inc.
# Copyright 2016 Joyent, Inc.
+# Copyright 2019 Garrett D'Amore <garrett@damore.org>
#
include $(SRC)/data/Makefile.data
@@ -128,6 +129,14 @@ locale/%.UTF-8/stamp: data/%.UTF-8.src data/UTF-8.cm data/common.UTF-8.src
$(LCDEF) -U -w data/widths.txt -f data/UTF-8.cm $(@D)
$(TOUCH) $@
+# Special handling for zz_AA test locale
+locale/zz_AA.UTF-8/stamp: data/en_US.UTF-8.src data/UTF-8.cm data/common.UTF-8.src
+ $(SED) \
+ -e '/^LC_CTYPE/,/^END LC_CTYPE/d' \
+ -e '$$r data/common.UTF-8.src' data/en_US.UTF-8.src | \
+ $(LCDEF) -U -w data/widths.txt -f data/UTF-8.cm $(@D)
+ $(TOUCH) $@
+
locale/%/$(DCOLL): locale/%/stamp
locale/%/$(DCTYPE): locale/%/stamp
locale/%/$(DMSGS): locale/%/stamp
diff --git a/usr/src/data/locale/data/zz_AA.UTF-8.src b/usr/src/data/locale/data/zz_AA.UTF-8.src
deleted file mode 120000
index 8a3463821d..0000000000
--- a/usr/src/data/locale/data/zz_AA.UTF-8.src
+++ /dev/null
@@ -1 +0,0 @@
-en_US.UTF-8.src \ No newline at end of file
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py
index 559cf7e9e5..99bce29087 100644
--- a/usr/src/tools/scripts/git-pbchk.py
+++ b/usr/src/tools/scripts/git-pbchk.py
@@ -17,7 +17,7 @@
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2008, 2012 Richard Lowe
-# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2019 Garrett D'Amore <garrett@damore.org>
# Copyright (c) 2015, 2016 by Delphix. All rights reserved.
# Copyright 2016 Nexenta Systems, Inc.
# Copyright (c) 2019, Joyent, Inc.
@@ -175,11 +175,14 @@ def not_check(root, cmd):
os.path.join(root, "exception_lists", cmd)]))
return Ignore.ignore(root, ignorefiles)
-def gen_files(root, parent, paths, exclude):
+def gen_files(root, parent, paths, exclude, filter=None):
"""Return a function producing file names, relative to the current
directory, of any file changed on this branch (limited to 'paths' if
requested), and excluding files for which exclude returns a true value """
+ if filter is None:
+ filter = lambda x: os.path.isfile(x)
+
# Taken entirely from Python 2.6's os.path.relpath which we would use if we
# could.
def relpath(path, here):
@@ -204,11 +207,18 @@ def gen_files(root, parent, paths, exclude):
# will be caught by other invocations of git().
continue
empty = not res
- if (os.path.isfile(path) and not empty and
+ if (filter(path) and not empty and
select(path) and not exclude(abspath)):
yield path
return ret
+def gen_links(root, parent, paths, exclude):
+ """Return a function producing symbolic link names, relative to the current
+ directory, of any file changed on this branch (limited to 'paths' if
+ requested), and excluding files for which exclude returns a true value """
+
+ return gen_files(root, parent, paths, exclude, lambda x: os.path.islink(x))
+
def comchk(root, parent, flist, output):
output.write("Comments:\n")
@@ -300,7 +310,53 @@ def wscheck(root, parent, flist, output):
ret |= WsCheck.wscheck(fh, output=output)
return ret
-def run_checks(root, parent, cmds, paths='', opts={}):
+def symlinks(root, parent, flist, output):
+ ret = 0
+ output.write("Symbolic links:\n")
+ for f in flist():
+ output.write(" "+f+"\n")
+ ret |= 1
+ return ret
+
+def iswinreserved(name):
+ reserved = [
+ 'con', 'prn', 'aux', 'nul',
+ 'com1', 'com2', 'com3', 'com4', 'com5',
+ 'com6', 'com7', 'com8', 'com9', 'com0',
+ 'lpt1', 'lpt2', 'lpt3', 'lpt4', 'lpt5',
+ 'lpt6', 'lpt7', 'lpt8', 'lpt9', 'lpt0' ]
+ l = name.lower()
+ for r in reserved:
+ if l == r or l.startswith(r+"."):
+ return True
+ return False
+
+def haswinspecial(name):
+ specials = '<>:"\\|?*'
+ for c in name:
+ if c in specials:
+ return True
+ return False
+
+def winnames(root, parent, flist, output):
+ ret = 0
+ output.write("Illegal filenames (Windows):\n")
+ for f in flist():
+ if haswinspecial(f):
+ output.write(" "+f+": invalid character in name\n")
+ ret |= 1
+ continue
+
+ parts = f.split('/')
+ for p in parts:
+ if iswinreserved(p):
+ output.write(" "+f+": reserved file name\n")
+ ret |= 1
+ break
+
+ return ret
+
+def run_checks(root, parent, cmds, scmds, paths='', opts={}):
"""Run the checks given in 'cmds', expected to have well-known signatures,
and report results for any which fail.
@@ -322,6 +378,17 @@ def run_checks(root, parent, cmds, paths='', opts={}):
if result != 0:
print(s.getvalue())
+ for cmd in scmds:
+ s = StringIO()
+
+ exclude = not_check(root, cmd.__name__)
+ result = cmd(root, parent, gen_links(root, parent, paths, exclude),
+ output=s)
+ ret |= result
+
+ if result != 0:
+ print(s.getvalue())
+
return ret
def nits(root, parent, paths):
@@ -332,8 +399,10 @@ def nits(root, parent, paths):
keywords,
manlint,
mapfilechk,
+ winnames,
wscheck]
- run_checks(root, parent, cmds, paths)
+ scmds = [symlinks]
+ run_checks(root, parent, cmds, scmds, paths)
def pbchk(root, parent, paths):
cmds = [comchk,
@@ -344,8 +413,10 @@ def pbchk(root, parent, paths):
keywords,
manlint,
mapfilechk,
+ winnames,
wscheck]
- run_checks(root, parent, cmds)
+ scmds = [symlinks]
+ run_checks(root, parent, cmds, scmds)
def main(cmd, args):
parent_branch = None