From d81547170496f442be8d1f2761ffcd2781f726b2 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Mon, 10 Dec 2018 11:59:23 +0000 Subject: 10056 9894 broke PYTHON_VERSION Reviewed by: Dan McDonald Reviewed by: Toomas Soome Approved by: Richard Lowe --- usr/src/Makefile.master | 9 +++++++-- usr/src/lib/pylibbe/Makefile.com | 8 ++++---- usr/src/lib/pylibbe/amd64/Makefile | 4 ++++ usr/src/lib/pylibbe/i386/Makefile | 4 ++++ usr/src/lib/pylibbe/py3/Makefile | 7 ++++--- usr/src/lib/pysolaris/Makefile.com | 6 +++--- usr/src/lib/pysolaris/amd64/Makefile | 3 +++ usr/src/lib/pysolaris/i386/Makefile | 3 +++ usr/src/lib/pysolaris/py3/Makefile | 8 ++++---- usr/src/lib/pyzfs/Makefile.com | 6 +++--- usr/src/lib/pyzfs/amd64/Makefile | 3 +++ usr/src/lib/pyzfs/i386/Makefile | 3 +++ usr/src/lib/pyzfs/py3/Makefile | 8 ++++---- 13 files changed, 49 insertions(+), 23 deletions(-) diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 2827914be6..a63c36d53f 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -263,6 +263,11 @@ INSLINKTARGET= $< INS.link= $(RM) $@; $(LN) $(INSLINKTARGET) $@ INS.symlink= $(RM) $@; $(SYMLINK) $(INSLINKTARGET) $@ +# The path to python that will be used for the shebang line when installing +# python scripts to the proto area. This is overridden by makefiles to +# select to the correct version. +PYSHEBANG= $(PYTHON) + # # Python bakes the mtime of the .py file into the compiled .pyc and # rebuilds if the baked-in mtime != the mtime of the source file @@ -270,7 +275,7 @@ INS.symlink= $(RM) $@; $(SYMLINK) $(INSLINKTARGET) $@ # files we must make certain to not adjust the mtime of the source # (.py) file. # -INS.pyfile= $(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!$(PYTHON):" < $< > $@; $(CHMOD) $(FILEMODE) $@; $(TOUCH) -r $< $@ +INS.pyfile= $(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!$(PYSHEBANG):" < $< > $@; $(CHMOD) $(FILEMODE) $@; $(TOUCH) -r $< $@ # MACH must be set in the shell environment per uname -p on the build host # More specific architecture variables should be set in lower makefiles. @@ -1120,7 +1125,7 @@ PKGPUBLISHER_NONREDIST= on-extra $(CHMOD) +x $@ .py: - $(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!$(PYTHON):" < $< > $@; $(CHMOD) +x $@ + $(RM) $@; $(SED) -e "1s:^\#!@PYTHON@:\#!$(PYSHEBANG):" < $< > $@; $(CHMOD) +x $@ .py.pyc: $(RM) $@ diff --git a/usr/src/lib/pylibbe/Makefile.com b/usr/src/lib/pylibbe/Makefile.com index 431bcfea1c..0776d0dea6 100644 --- a/usr/src/lib/pylibbe/Makefile.com +++ b/usr/src/lib/pylibbe/Makefile.com @@ -33,8 +33,8 @@ include ../../Makefile.lib LIBLINKS = SRCDIR = ../common -ROOTLIBDIR= $(ROOT)/usr/lib/python$(PYTHON_VERSION)/vendor-packages -ROOTLIBDIR64= $(ROOT)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/64 +ROOTLIBDIR= $(ROOT)/usr/lib/python$(PYVER)/vendor-packages +ROOTLIBDIR64= $(ROOT)/usr/lib/python$(PYVER)/vendor-packages/64 PYFILES= $(PYSRCS) ROOTPYBEFILES= $(PYFILES:%=$(ROOTLIBDIR)/%) @@ -44,11 +44,11 @@ LIBS = $(DYNLIB) LDLIBS += -lbe -lnvpair -lc CFLAGS += $(CCVERBOSE) CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I../../libbe/common \ - -I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)$(PYTHON_SUFFIX) + -I$(ADJUNCT_PROTO)/usr/include/python$(PYVER)$(PYSUFFIX) .KEEP_STATE: -all install := LDLIBS += -lpython$(PYTHON_VERSION)$(PYTHON_SUFFIX) +all install := LDLIBS += -lpython$(PYVER)$(PYSUFFIX) all: $(PYOBJS) $(LIBS) diff --git a/usr/src/lib/pylibbe/amd64/Makefile b/usr/src/lib/pylibbe/amd64/Makefile index 32e9e54ca4..9209b53492 100644 --- a/usr/src/lib/pylibbe/amd64/Makefile +++ b/usr/src/lib/pylibbe/amd64/Makefile @@ -21,8 +21,12 @@ # # Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved. +# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # +PYVER = $(PYTHON_VERSION) +PYSUFFIX = $(PYTHON_SUFFIX) + include ../Makefile.com include ../../Makefile.lib.64 diff --git a/usr/src/lib/pylibbe/i386/Makefile b/usr/src/lib/pylibbe/i386/Makefile index 5a771c0816..decc45d4f6 100644 --- a/usr/src/lib/pylibbe/i386/Makefile +++ b/usr/src/lib/pylibbe/i386/Makefile @@ -21,8 +21,12 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # +PYVER = $(PYTHON_VERSION) +PYSUFFIX = $(PYTHON_SUFFIX) + include ../Makefile.com install: all $(ROOTLIBS) diff --git a/usr/src/lib/pylibbe/py3/Makefile b/usr/src/lib/pylibbe/py3/Makefile index d146f8c62c..f797ad5dd3 100644 --- a/usr/src/lib/pylibbe/py3/Makefile +++ b/usr/src/lib/pylibbe/py3/Makefile @@ -15,9 +15,10 @@ include ../Makefile.com include ../../Makefile.lib.64 -PYTHON = $(PYTHON3) -PYTHON_VERSION = $(PYTHON3_VERSION) -PYTHON_SUFFIX = $(PYTHON3_SUFFIX) +PYSHEBANG = $(PYTHON3) +PYVER = $(PYTHON3_VERSION) +PYSUFFIX = $(PYTHON3_SUFFIX) + LDLIBS64 += -L$(ADJUNCT_PROTO)/usr/lib/$(MACH64) MAPFILES = $(SRCDIR)/mapfile-py3 $(ROOTLIBDIR)/$(DYNLIB) := FILEMODE= 755 diff --git a/usr/src/lib/pysolaris/Makefile.com b/usr/src/lib/pysolaris/Makefile.com index 69769ae544..31165206c7 100644 --- a/usr/src/lib/pysolaris/Makefile.com +++ b/usr/src/lib/pysolaris/Makefile.com @@ -33,7 +33,7 @@ include ../../Makefile.lib LIBLINKS = SRCDIR = ../common -ROOTLIBDIR= $(ROOT)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/solaris +ROOTLIBDIR= $(ROOT)/usr/lib/python$(PYVER)/vendor-packages/solaris ROOTLIBDIR64= $(ROOTLIBDIR)/64 PYOBJS= $(PYSRCS:%.py=$(SRCDIR)/%.pyc) PYFILES= $(PYSRCS) $(PYSRCS:%.py=%.pyc) @@ -43,11 +43,11 @@ CSTD= $(CSTD_GNU99) C99LMODE= -Xc99=%all LIBS = $(DYNLIB) -LDLIBS += -lc -lsec -lidmap -lpython$(PYTHON_VERSION)$(PYTHON_SUFFIX) +LDLIBS += -lc -lsec -lidmap -lpython$(PYVER)$(PYSUFFIX) CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-variable CPPFLAGS += \ - -I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)$(PYTHON_SUFFIX) + -I$(ADJUNCT_PROTO)/usr/include/python$(PYVER)$(PYSUFFIX) all: diff --git a/usr/src/lib/pysolaris/amd64/Makefile b/usr/src/lib/pysolaris/amd64/Makefile index 4fa33a90bd..91c7fbd58b 100644 --- a/usr/src/lib/pysolaris/amd64/Makefile +++ b/usr/src/lib/pysolaris/amd64/Makefile @@ -16,6 +16,9 @@ # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # +PYVER = $(PYTHON_VERSION) +PYSUFFIX = $(PYTHON_SUFFIX) + include ../Makefile.com include ../../Makefile.lib.64 diff --git a/usr/src/lib/pysolaris/i386/Makefile b/usr/src/lib/pysolaris/i386/Makefile index 926da3004e..c34c0504de 100644 --- a/usr/src/lib/pysolaris/i386/Makefile +++ b/usr/src/lib/pysolaris/i386/Makefile @@ -23,6 +23,9 @@ # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # +PYVER = $(PYTHON_VERSION) +PYSUFFIX = $(PYTHON_SUFFIX) + include ../Makefile.com all: $(PYOBJS) $(LIBS) diff --git a/usr/src/lib/pysolaris/py3/Makefile b/usr/src/lib/pysolaris/py3/Makefile index 700cc16ca5..12abf943c4 100644 --- a/usr/src/lib/pysolaris/py3/Makefile +++ b/usr/src/lib/pysolaris/py3/Makefile @@ -16,9 +16,9 @@ include ../Makefile.com include ../../Makefile.lib.64 -PYTHON = $(PYTHON3) -PYTHON_VERSION = $(PYTHON3_VERSION) -PYTHON_SUFFIX = $(PYTHON3_SUFFIX) +PYSHEBANG = $(PYTHON3) +PYVER = $(PYTHON3_VERSION) +PYSUFFIX = $(PYTHON3_SUFFIX) LDLIBS64 += -L$(ADJUNCT_PROTO)/usr/lib/$(MACH64) MAPFILES= $(SRCDIR)/mapfile-py3 @@ -33,5 +33,5 @@ $(ROOTLIBDIR)/%.so: %.so $(ROOTLIBDIR)/%: ../common/% $(INS.pyfile) - $(PYTHON) -mpy_compile $@ + $(PYTHON3) -mpy_compile $@ diff --git a/usr/src/lib/pyzfs/Makefile.com b/usr/src/lib/pyzfs/Makefile.com index 347b4316eb..fd6218e2c4 100644 --- a/usr/src/lib/pyzfs/Makefile.com +++ b/usr/src/lib/pyzfs/Makefile.com @@ -35,7 +35,7 @@ include ../../Makefile.lib LIBLINKS = SRCDIR = ../common -ROOTLIBDIR= $(ROOT)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/zfs +ROOTLIBDIR= $(ROOT)/usr/lib/python$(PYVER)/vendor-packages/zfs ROOTLIBDIR64= $(ROOTLIBDIR)/64 PYOBJS= $(PYSRCS:%.py=$(SRCDIR)/%.pyc) PYFILES= $(PYSRCS) $(PYSRCS:%.py=%.pyc) @@ -45,11 +45,11 @@ CSTD= $(CSTD_GNU99) C99LMODE= -Xc99=%all LIBS = $(DYNLIB) -LDLIBS += -lc -lnvpair -lpython$(PYTHON_VERSION)$(PYTHON_SUFFIX) -lzfs +LDLIBS += -lc -lnvpair -lpython$(PYVER)$(PYSUFFIX) -lzfs CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-variable CPPFLAGS += \ - -I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)$(PYTHON_SUFFIX) + -I$(ADJUNCT_PROTO)/usr/include/python$(PYVER)$(PYSUFFIX) CPPFLAGS += -I../../../uts/common/fs/zfs CPPFLAGS += -I../../../common/zfs diff --git a/usr/src/lib/pyzfs/amd64/Makefile b/usr/src/lib/pyzfs/amd64/Makefile index f3fde27d22..11141ef969 100644 --- a/usr/src/lib/pyzfs/amd64/Makefile +++ b/usr/src/lib/pyzfs/amd64/Makefile @@ -14,6 +14,9 @@ # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # +PYVER = $(PYTHON_VERSION) +PYSUFFIX = $(PYTHON_SUFFIX) + include ../Makefile.com include ../../Makefile.lib.64 diff --git a/usr/src/lib/pyzfs/i386/Makefile b/usr/src/lib/pyzfs/i386/Makefile index 82d8120e69..3c870131dc 100644 --- a/usr/src/lib/pyzfs/i386/Makefile +++ b/usr/src/lib/pyzfs/i386/Makefile @@ -23,6 +23,9 @@ # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # +PYVER = $(PYTHON_VERSION) +PYSUFFIX = $(PYTHON_SUFFIX) + include ../Makefile.com all: $(PBOJECT) $(LIBS) diff --git a/usr/src/lib/pyzfs/py3/Makefile b/usr/src/lib/pyzfs/py3/Makefile index 27e04f084e..8d9c82dcfb 100644 --- a/usr/src/lib/pyzfs/py3/Makefile +++ b/usr/src/lib/pyzfs/py3/Makefile @@ -18,9 +18,9 @@ include ../Makefile.com include ../../Makefile.lib.64 -PYTHON = $(PYTHON3) -PYTHON_VERSION = $(PYTHON3_VERSION) -PYTHON_SUFFIX = $(PYTHON3_SUFFIX) +PYSHEBANG = $(PYTHON3) +PYVER = $(PYTHON3_VERSION) +PYSUFFIX = $(PYTHON3_SUFFIX) LDLIBS64 += -L$(ADJUNCT_PROTO)/usr/lib/$(MACH64) MAPFILES= $(SRCDIR)/mapfile-py3 @@ -35,5 +35,5 @@ $(ROOTLIBDIR)/%.so: %.so $(ROOTLIBDIR)/%: ../common/% $(INS.pyfile) - $(PYTHON) -mpy_compile $@ + $(PYTHON3) -mpy_compile $@ -- cgit v1.2.3 From ae72ee9643cbd127139a2b6363b3f9c2872a5578 Mon Sep 17 00:00:00 2001 From: Peter Tribble Date: Thu, 13 Dec 2018 21:07:49 +0000 Subject: 10061 usr/src/lib/libc/port/gen/l3.c is unused Reviewed by: Jason King Reviewed by: Toomas Soome Reviewed by: Gergő Mihály Doma Approved by: Richard Lowe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/lib/libc/port/gen/l3.c | 98 ------------------------------------------ 1 file changed, 98 deletions(-) delete mode 100644 usr/src/lib/libc/port/gen/l3.c diff --git a/usr/src/lib/libc/port/gen/l3.c b/usr/src/lib/libc/port/gen/l3.c deleted file mode 100644 index 05a43717cc..0000000000 --- a/usr/src/lib/libc/port/gen/l3.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Convert longs to and from 3-byte disk addresses - */ -#pragma weak _l3tol = l3tol -#pragma weak _ltol3 = ltol3 - -#include "lint.h" - -void -ltol3(char *cp, const long *lp, int n) -{ - register i; - register char *a, *b; - - a = cp; - b = (char *)lp; - for (i = 0; i < n; ++i) { -#if interdata || u370 || u3b || M32 - b++; - *a++ = *b++; - *a++ = *b++; - *a++ = *b++; -#endif -#if vax || i286 || i386 - *a++ = *b++; - *a++ = *b++; - *a++ = *b++; - b++; -#endif -#if pdp11 - *a++ = *b++; - b++; - *a++ = *b++; - *a++ = *b++; -#endif - } -} - -void -l3tol(long *lp, const char *cp, int n) -{ - register i; - register char *a, *b; - - a = (char *)lp; - b = cp; - for (i = 0; i < n; ++i) { -#if interdata || u370 || u3b || M32 - *a++ = 0; - *a++ = *b++; - *a++ = *b++; - *a++ = *b++; -#endif -#if vax || i286 || i386 - *a++ = *b++; - *a++ = *b++; - *a++ = *b++; - *a++ = 0; -#endif -#if pdp11 - *a++ = *b++; - *a++ = 0; - *a++ = *b++; - *a++ = *b++; -#endif - } -} -- cgit v1.2.3 From a22312a2010fbc0fae7e50874e1cc393f1256887 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 14 Dec 2018 11:21:33 +0200 Subject: 10065 exception_lists: remove some loader exceptions Reviewed by: Robert Mustacchi Approved by: Richard Lowe --- exception_lists/cstyle | 1 - exception_lists/hdrchk | 1 - exception_lists/keywords | 1 - 3 files changed, 3 deletions(-) diff --git a/exception_lists/cstyle b/exception_lists/cstyle index b61995ba08..813b4d7fbe 100644 --- a/exception_lists/cstyle +++ b/exception_lists/cstyle @@ -1,4 +1,3 @@ -usr/src/boot/* usr/src/cmd/acpi/acpidump/acpidump.h usr/src/cmd/acpi/acpidump/apdump.c usr/src/cmd/acpi/acpidump/apfiles.c diff --git a/exception_lists/hdrchk b/exception_lists/hdrchk index e2f8e39c6d..43ef6d2e53 100644 --- a/exception_lists/hdrchk +++ b/exception_lists/hdrchk @@ -1,4 +1,3 @@ -usr/src/boot/* usr/src/cmd/acpi/acpidump/acpidump.h usr/src/cmd/acpi/acpixtract/acpixtract.h usr/src/cmd/acpi/acpixtract/axmain.h diff --git a/exception_lists/keywords b/exception_lists/keywords index a8859d25d1..5e60738135 100644 --- a/exception_lists/keywords +++ b/exception_lists/keywords @@ -25,7 +25,6 @@ # syntax: glob -usr/src/boot/* usr/src/cmd/cmd-inet/usr.bin/dns-sd/dns-sd.c usr/src/cmd/boot/common/bblk_einfo.c usr/src/cmd/zonestat/zonestat/zonestat.c -- cgit v1.2.3