From dfd79297469f05da5f35df0dcf46f7e9ce24a243 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 14 Jun 2017 16:53:06 -0700 Subject: [PATCH] Build RPM installers --- build/repo.targets | 164 ++++++++++++++++++++++++++++++++--- tools/changelog | 2 + tools/docker/rhel/Dockerfile | 27 ++++++ 3 files changed, 179 insertions(+), 14 deletions(-) create mode 100644 tools/changelog create mode 100644 tools/docker/rhel/Dockerfile diff --git a/build/repo.targets b/build/repo.targets index e95b22bd99..0ef94646ec 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -22,6 +22,9 @@ $(VersionPrefix)-$(OriginalVersionSuffix)-$(NoTimestampSuffix) $(VersionPrefix)-$(OriginalVersionSuffix)-$(BuildNumber) + aspnetcore-store-$(TimestampVersion) + aspnetcore-store-$(NoTimestampVersion) + $(RepositoryRoot).rw\ $(RepositoryRoot).ro\ $(RepositoryRoot)artifacts\ @@ -46,11 +49,13 @@ $(ToolsDir)Build.RuntimeStore.References\ $(RuntimeStoreReferenceDirectory)bin\Release\ $(ToolsDir)debian_config.json + $(ToolsDir)changelog $(ToolsDir)dotnet-deb-tool-consumer\ $(ToolsDir)RestoreRuntimeStore\ $(RepositoryRoot).build\ $(BuildDirectory)temp\ $(BuildDirectory)dotnet\ + /opt/code/ $(PrepareDependsOn); @@ -307,10 +312,9 @@ - - - + + @@ -328,12 +332,146 @@ + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + $(RuntimeStoreTimestampInstallerPackageName)-$(InstallerPlatform)-$(PACKAGE_CACHE_PLATFORM).rpm + $(RuntimeStoreNoTimestampInstallerPackageName)-$(InstallerPlatform)-$(PACKAGE_CACHE_PLATFORM).rpm + @(RPMDirectories->' --directories "%(FullPath)"', ' ') + Microsoft ASP.NET Core Runtime Package Store 2.0.0 - Preview 2 + Runtime package store for Microsoft ASP.NET Core. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/home). We happily accept issues and PRs. + Microsoft + nugetaspnet@microsoft.com + .NET Foundation + Apache + 1 + https://www.asp.net/ + /usr/share/dotnet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -357,12 +495,11 @@ + - aspnetcore-store-$(TimestampVersion) - aspnetcore-store-$(NoTimestampVersion) - $(RuntimeStoreTimestampDebianPackageName)-$(InstallerPlatform)-$(PACKAGE_CACHE_PLATFORM).deb - $(RuntimeStoreNoTimestampDebianPackageName)-$(InstallerPlatform)-$(PACKAGE_CACHE_PLATFORM).deb + $(RuntimeStoreTimestampInstallerPackageName)-$(InstallerPlatform)-$(PACKAGE_CACHE_PLATFORM).deb + $(RuntimeStoreNoTimestampInstallerPackageName)-$(InstallerPlatform)-$(PACKAGE_CACHE_PLATFORM).deb @@ -384,21 +521,20 @@ diff --git a/tools/changelog b/tools/changelog new file mode 100644 index 0000000000..51aa8e9e04 --- /dev/null +++ b/tools/changelog @@ -0,0 +1,2 @@ +* DATE Microsoft - PACKAGE_VERSION-1 +- Bootstrap loop package \ No newline at end of file diff --git a/tools/docker/rhel/Dockerfile b/tools/docker/rhel/Dockerfile new file mode 100644 index 0000000000..73247d2809 --- /dev/null +++ b/tools/docker/rhel/Dockerfile @@ -0,0 +1,27 @@ +# +# Copyright (c) .NET Foundation. All rights reserved. +# Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +# + +# Dockerfile that creates a container suitable to build dotnet-cli +FROM microsoft/dotnet-buildtools-prereqs:rhel-7-rpmpkg-c982313-20174116044113 + +# Install from sudo main package TODO This package needs to be mirrored +RUN yum install -y https://www.sudo.ws/sudo/dist/packages/RHEL/7/sudo-1.8.20-3.el7.x86_64.rpm \ + && yum clean all + +# Setup User to match Host User, and give superuser permissions +ARG USER_ID=0 +RUN useradd -m code_executor -u ${USER_ID} -g root +RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# With the User Change, we need to change permssions on these directories +RUN chmod -R a+rwx /usr/local +RUN chmod -R a+rwx /home +RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo + +# Set user to the one we just created +USER ${USER_ID} + +# Set working directory +WORKDIR /opt/code