windows: Remove BuildRoot from all configs, add a short tmp path.

Closes #3562.
This commit is contained in:
Chris Johns 2018-10-22 11:59:10 +11:00
parent f07d2b6e9a
commit 96c414c8ff
39 changed files with 19 additions and 57 deletions

View File

@ -17,7 +17,6 @@ Summary: ST-Link v%{stlink_version} for host %{_host}
Version: %{stlink_version}
Release: %{release}
URL: https://github.com/texane/stlink/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -18,7 +18,6 @@ Summary: RTEMS v%{rtems_kernel_version} for target %{_target} on host %{_host}
Version: %{rtems_kernel_version}
Release: %{release}
URL: http://www.rtems.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Build if the RSB is released or optionally enable/disable building the RTEMS

View File

@ -28,7 +28,6 @@ Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_targe
Version: %{gcc_version}
Release: %{release}
URL: http://gcc.gnu.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Supports Candian Cross (Cxc).

View File

@ -9,7 +9,6 @@ Summary: RTEMS Tools %{rtems_tools_version} for host %{_host}
Version: %{rtems_tools_version}
Release: %{release}
URL: http://www.rtems.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
License: BSD-2-Clause + GPL-2.0
#

View File

@ -9,7 +9,6 @@ Summary: RTEMS Tools %{rtems_tools_version} for host %{_host}
Version: %{rtems_tools_version}
Release: %{release}
URL: http://www.rtems.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Prepare the source code.

View File

@ -16,7 +16,6 @@ Summary: Autoconf v%{autoconf_version} for host %{_host}
Version: %{autoconf_version}
Release: %{release}
URL: http://www.gnu.org/software/autoconf/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -16,7 +16,6 @@ Summary: Automake v%{automake_version} for host %{_host}
Version: %{automake_version}
Release: %{release}
URL: http://www.gnu.org/software/automake/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -19,7 +19,6 @@ Summary: Binutils v%{binutils_version} for target %{_target} on host %{_host}
Version: %{binutils_version}
Release: %{release}
URL: http://sources.redhat.com/binutils
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Supports Candian Cross (Cxc).

View File

@ -13,7 +13,6 @@ Summary: Device Tree Compiler v%{dtc_version} for target %{_target} on host %{
Version: %{dtc_version}
Release: %{release}
URL: http://www.jdl.com/software/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -13,7 +13,6 @@ Summary: Expat XML Parser v%{expat_version} for target %{_target} on host %{_h
Version: %{expat_version}
Release: %{release}
URL: http://expat.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -13,7 +13,6 @@ Summary: freetype is for producing high-quality output (glyph images) of most
Version: %{freetype_version}
Release: %{release}
URL: http://www.freetype.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# freetype Source

View File

@ -19,7 +19,6 @@ Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_targe
Version: %{gcc_version}
Release: %{release}
URL: http://gcc.gnu.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Supports Candian Cross (Cxc).

View File

@ -29,7 +29,6 @@ Summary: GDB v%{gdb_version} for target %{_target} on host %{_host}
Version: %{gdb_version}
Release: %{release}
URL: http://www.gnu.org/software/gdb/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -139,7 +139,6 @@ Summary: GDB v%{gdb_version} for target %{_target} on host %{_host}
Version: %{gdb_version}
Release: %{release}
URL: http://www.gnu.org/software/gdb/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# GDB has changed it default extension.

View File

@ -14,7 +14,6 @@ Summary: GetText offers to programmers, translators, and even users, a well
Version: %{gettext_version}
Release: %{release}
URL: http://www.gnu.org/software/gettext/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -14,7 +14,6 @@ Summary: GLib provides the core application building blocks for
Version: %{glib_version}
Release: %{release}
URL: https://developer.gnome.org/glib/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -14,7 +14,6 @@ Summary: LibFFI provides a portable, high level programming interface to
Version: %{libffi_version}
Release: %{release}
URL: https://sourceware.org/libffi/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -15,7 +15,6 @@ Summary: Provides an iconv() implementation, for use on systems which
Version: %{libiconv_version}
Release: %{release}
URL: http://www.gnu.org/software/libiconv/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -9,11 +9,10 @@
%endif
Name: libjpeg-v%{libjpeg_version}-%{_host}-%{release}
Summary: libjpeg is the Independent JPEG Group jpeg library
Summary: libjpeg is the Independent JPEG Group jpeg library
Version: %{libjpeg_version}
Release: %{release}
URL: http://www.ijg.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# NTP Source

View File

@ -13,7 +13,6 @@ Summary: libpng is the official PNG reference library
Version: %{libpng_version}
Release: %{release}
URL: http://www.libpng.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# libpng Source

View File

@ -13,7 +13,6 @@ Summary: libtiff provides support for the Tag Image File Format (TIFF), a wide
Version: %{tiff_version}
Release: %{release}
URL: http://www.libtiff.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# libtiff Source

View File

@ -16,7 +16,6 @@ Summary: Libtool v%{libtool_version} for host %{_host}
Version: %{libtool_version}
Release: %{release}
URL: http://www.gnu.org/software/libtool/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -12,7 +12,6 @@ Summary: LibUSB v%{libusb_version} for target %{_target} on host %{_host}
Version: %{libusb_version}
Release: %{release}
URL: http://libusb.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -13,7 +13,6 @@ Summary: Light weight TCP/IP stack
Version: %{lwip_version}
Release: %{release}
URL: http://git.savannah.gnu.org/cgit/lwip.git
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# LWIP Source

View File

@ -12,7 +12,6 @@ Summary: M4 v%{m4_version} for host %{_host}
Version: %{m4_version}
Release: %{release}
URL: http://www.gnu.org/software/m4/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -13,7 +13,6 @@ Summary: microwindows is an Open Source Window System
Version: %{microwindows_version}
Release: %{release}
URL: http://www.microwindows.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# microwindows Source

View File

@ -13,7 +13,6 @@ Summary: NetSNMP is a SNMP v1, v2c and v3 Management Agent with MIB-II support
Version: %{net_snmp_version}
Release: %{release}
URL: http://www.net-snmp.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# NetSNMP Source

View File

@ -13,7 +13,6 @@ Summary: NTP is the Network Time Protocol.
Version: %{ntp_version}
Release: %{release}
URL: http://www.ntp.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# NTP Source

View File

@ -13,7 +13,6 @@ Summary: nxlib is a wrapper library that provides closer compatibility to the
Version: %{nxlib_version}
Release: %{release}
URL: http://www.microwindows.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# nxlib Source

View File

@ -13,7 +13,6 @@ Summary: or1ksim-github
Version: %{or1ksim_version}
Release: %{release}
URL: https://github.com/openrisc/or1ksim
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -15,7 +15,6 @@ Summary: Pixman is a low-level software library for pixel manipulation,
Version: %{pixman_version}
Release: %{release}
URL: http://www.pixman.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -15,7 +15,6 @@ Summary: Protocol buffers are Googles language-neutral,
Version: %{protobuf_version}
Release: %{release}
URL: https://developers.google.com/protocol-buffers/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Protocol Buffers Source

View File

@ -21,7 +21,6 @@ Summary: Qemu is a simulator of various processors.
Version: %{qemu_version}
Release: %{release}
URL: http://www.qemu.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -13,7 +13,6 @@ Summary: spike-github
Version: %{spike_version}
Release: %{release}
URL: https://github.com/riscv/riscv-isa-sim/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source

View File

@ -15,7 +15,6 @@ Summary: SQLite is an in-process library that implements a
Version: %{sqlite_version}
Release: %{release}
URL: http://www.sqlite.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Sqlite Source

View File

@ -13,7 +13,6 @@ Summary: t1lib is the official PNG reference library
Version: %{t1lib_version}
Release: %{release}
URL: http://www.t1lib.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# t1lib Source

View File

@ -40,6 +40,7 @@ nil: none, none, ''
# Set to invalid values.
_bset: none, none, ''
_bset_tmp: none, none, ''
name: none, none, ''
version: none, none, ''
release: none, none, ''
@ -91,8 +92,8 @@ _buildcxcdir: dir, optional, '%{_topdir}/build/%{buildname}-cxc'
_buildxcdir: dir, optional, '%{_topdir}/build/%{buildname}-xc'
_docdir: dir, none, '%{_defaultdocdir}'
_tmppath: dir, none, '%{_topdir}/build/tmp'
_tmproot: dir, none, '%{_tmppath}/sb-%{_uid}/%{_bset}'
_tmpcxcroot: dir, none, '%{_tmppath}/sb-%{_uid}-cxc/%{_bset}'
_tmproot: dir, none, '%{_tmppath}/sb-%{_uid}/%{_bset_tmp}'
_tmpcxcroot: dir, none, '%{_tmppath}/sb-%{_uid}-cxc/%{_bset_tmp}'
buildroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}'
buildcxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-cxc'
buildxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-xx'

View File

@ -58,6 +58,19 @@ def humanize_number(num, suffix):
num /= 1024.0
return "%.3f%s%s" % (size, 'Y', suffix)
def short_name(name):
#
# If on Windows use short names to keep the build paths as short as possible.
#
if options.host_windows:
buildname = ''
add = True
for n in name.split('-'):
buildname += n[0]
return buildname
else:
return name
class script:
"""Create and manage a shell script."""
@ -108,23 +121,6 @@ class script:
class build:
"""Build a package given a config file."""
def _name_(self, name):
#
# If on Windows use shorter names to keep the build paths.
#
if options.host_windows:
buildname = ''
add = True
for c in name:
if c == '-':
add = True
elif add:
buildname += c
add = False
return buildname
else:
return name
def _generate_report_(self, header, footer = None):
ereport.generate('rsb-report-%s.txt' % self.macros['name'],
self.opts, header, footer)
@ -141,7 +137,7 @@ class build:
self.config = config.file(name, opts, self.macros)
self.script_build = script()
self.script_clean = script()
self.macros['buildname'] = self._name_(self.macros['name'])
self.macros['buildname'] = short_name(self.macros['name'])
except error.general as gerr:
log.notice(str(gerr))
log.stderr('Build FAILED')

View File

@ -322,6 +322,7 @@ class buildset:
else:
exbset = self.macros.expand(self.bset)
self.macros['_bset'] = exbset
self.macros['_bset_tmp'] = build.short_name(exbset)
root, ext = path.splitext(exbset)
if exbset.endswith('.bset'):
bset = exbset