diff --git a/Makefile b/Makefile index ae7ee8bf..f92f90e2 100644 --- a/Makefile +++ b/Makefile @@ -44,12 +44,13 @@ OS_BUILD_TIME := $(subst :,$e,$(OS_BUILD_TIME)) OS_BUILD_TIME := $(subst T,$e,$(OS_BUILD_TIME)) OS_BUILD_TIME := $(subst Z,$e,$(OS_BUILD_TIME)) OS_BUILD_TIME := $(subst ",$e,$(OS_BUILD_TIME)) +OS_BUILD_TIME := $(subst +,$e,$(OS_BUILD_TIME)) OS_BUILD_HASH := $(subst ",$e,$(VCS_SHORT_HASH)) OS_BUILD_TAG := $(subst ",$e,$(VCS_TAG)) ifeq ($(OS_BUILD_TAG),) -OS_BUILD_TAG := UN-$(OS_BUILD_TIME) +OS_BUILD_TAG := $(OS_BUILD_TIME) endif ifdef DALIY_BUILD_VERSION diff --git a/make/Makefile.9000NPBP01R01 b/make/Makefile.9000NPBP01R01 index 0d629134..1d720389 100644 --- a/make/Makefile.9000NPBP01R01 +++ b/make/Makefile.9000NPBP01R01 @@ -1,18 +1,19 @@ PROFILE_ID := 9000-NPB-P01R01 SUPPORTED_MACHINE_ID := 9000-NPB-P01R01 -CHROOT_PKG := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID}-chroot.tar.bz2 -CHROOT_BIN := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID}-ONIE.bin - -TARGET_BUILD_DIR := $(BUILDDIR_BASE)/$(PROFILE_ID) -TARGET_INSTALLER_DIR := $(TARGET_BUILD_DIR)/installer -TARGET_SYSROOT_DIR := $(TARGET_BUILD_DIR)/sysroot - KERNEL_ARGS := console=ttyS0,115200n8 crashkernel=auto intel_iommu=on iommu=pt pci=realloc,assign-busses isolcpus=1,14-27,42-55 GRUB_SERIAL_COMMAND := SIZE_PART_SYSROOT := 65536M SIZE_PART_DATA := 4096M +PROFILE_ID_IN_SHORT := $(subst -,$e,$(PROFILE_ID)) +CHROOT_PKG := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID_IN_SHORT}-chroot.tar.bz2 +CHROOT_BIN := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID_IN_SHORT}-ONIE.bin + +TARGET_BUILD_DIR := $(BUILDDIR_BASE)/$(PROFILE_ID) +TARGET_INSTALLER_DIR := $(TARGET_BUILD_DIR)/installer +TARGET_SYSROOT_DIR := $(TARGET_BUILD_DIR)/sysroot + .PHONY: all builddir installer sysroot-base sysroot-ansible sysroot-cleanup sysroot-archive sysroot-binary clean all: sysroot-binary @@ -38,7 +39,12 @@ installer: builddir sysroot-base: builddir $(TOOLSDIR)/mk-base-image $(CONFDIR)/yum.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR) -sysroot-ansible: sysroot-base +sysroot-verfile: sysroot-base + sed -i -e "s/^NAME=.*/NAME=\"TSG-OS\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release + sed -i -e "s/^VERSION=.*/VERSION=\"$(OS_RELEASE_VER) ($(PROFILE_ID_IN_SHORT))\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release + sed -i -e "s/^PRETTY_NAME=.*/PRETTY_NAME=\"TSG-OS v$(OS_RELEASE_VER) ($(PROFILE_ID_IN_SHORT))\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release + +sysroot-ansible: sysroot-verfile sysroot-base $(TOOLSDIR)/ansible-stage-one $(PROFILE_ID) $(PROJECTDIR) $(TARGET_SYSROOT_DIR) sysroot-cleanup: diff --git a/tools/mk-base-image b/tools/mk-base-image index 5cd7b66e..9524babb 100755 --- a/tools/mk-base-image +++ b/tools/mk-base-image @@ -21,7 +21,7 @@ locak_package_to_install="$projectdir/package/kernel-lt-$kernel_version.rpm setopt="group_package_types=mandatory,default,optional" yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install -yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $locak_package_to_install +yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt localinstall $locak_package_to_install cat > "$target"/etc/sysconfig/network <