From 4eb1494442c9d0c4da4356c85f7daefa642f4c1f Mon Sep 17 00:00:00 2001 From: Mike Richmond Date: Fri, 6 Jan 2017 13:09:40 -0800 Subject: [PATCH] Revert "Initial Support for Fedora 24" (#2970) --- build.psm1 | 50 ++++------------- docker/nightly/fedora24/Dockerfile | 17 ------ docker/release/fedora24/Dockerfile | 64 ---------------------- src/ResGen/project.json | 1 - src/TypeCatalogGen/project.json | 1 - src/TypeCatalogParser/project.json | 1 - src/powershell-unix/project.json | 1 - test/PSReadLine/project.json | 1 - test/csharp/project.json | 1 - test/tools/CreateChildProcess/project.json | 1 - test/tools/EchoArgs/project.json | 1 - 11 files changed, 10 insertions(+), 129 deletions(-) delete mode 100644 docker/nightly/fedora24/Dockerfile delete mode 100644 docker/release/fedora24/Dockerfile diff --git a/build.psm1 b/build.psm1 index be53b93df0..e1850ad8f2 100644 --- a/build.psm1 +++ b/build.psm1 @@ -31,14 +31,6 @@ if ($IsLinux) { $IsUbuntu14 = $IsUbuntu -and $LinuxInfo.VERSION_ID -match '14.04' $IsUbuntu16 = $IsUbuntu -and $LinuxInfo.VERSION_ID -match '16.04' $IsCentOS = $LinuxInfo.ID -match 'centos' -and $LinuxInfo.VERSION_ID -match '7' - $IsFedora = $LinuxInfo.ID -match 'fedora' -and $LinuxInfo.VERSION_ID -ge 24 - $IsRedHatFamily = $IsCentOS -or $IsFedora - - # Workaround for temporary LD_LIBRARY_PATH hack for Fedora 24 - if (Test-Path ENV:\LD_LIBRARY_PATH) { - Remove-Item -Force ENV:\LD_LIBRARY_PATH - Get-ChildItem ENV: - } } # @@ -83,7 +75,6 @@ function Start-PSBuild { "ubuntu.16.04-x64", "debian.8-x64", "centos.7-x64", - "fedora.24-x64", "win7-x64", "win7-x86", "win81-x64", @@ -448,7 +439,6 @@ function New-PSOptions { "ubuntu.16.04-x64", "debian.8-x64", "centos.7-x64", - "fedora.24-x64", "win7-x86", "win7-x64", "win81-x64", @@ -954,15 +944,6 @@ function Install-Dotnet { } } -function Get-RedHatPackageManager { - if ($IsRedHatFamily -and $IsCentOS) { - "yum" - } elseif ($IsRedHatFamily -and $IsFedora) { - "dnf" - } else { - throw "Error determining package manager for this distribution." - } -} function Start-PSBootstrap { [CmdletBinding( @@ -1019,7 +1000,7 @@ function Start-PSBootstrap { Invoke-Expression "$sudo apt-get update" Invoke-Expression "$sudo apt-get install -y -qq $Deps" } - } elseif ($IsRedHatFamily) { + } elseif ($IsCentOS) { # Build tools $Deps += "which", "curl", "gcc-c++", "cmake", "make" @@ -1029,11 +1010,9 @@ function Start-PSBootstrap { # Packaging tools if ($Package) { $Deps += "ruby-devel", "rpm-build", "groff" } - $PackageManager = Get-RedHatPackageManager - # Install dependencies Start-NativeExecution { - Invoke-Expression "$sudo $PackageManager install -y -q $Deps" + Invoke-Expression "$sudo yum install -y -q $Deps" } } elseif ($IsOSX) { precheck 'brew' "Bootstrap dependency 'brew' not found, must install Homebrew! See http://brew.sh/" @@ -1213,7 +1192,7 @@ function Start-PSPackage { [ValidatePattern("^powershell")] [string]$Name = "powershell", - # Ubuntu, CentOS, Fedora, OS X, and Windows packages are supported + # Ubuntu, CentOS, and OS X, and Windows packages are supported [ValidateSet("deb", "osxpkg", "rpm", "msi", "appx", "zip")] [string[]]$Type, @@ -1267,7 +1246,7 @@ function Start-PSPackage { $Type = if ($IsLinux) { if ($LinuxInfo.ID -match "ubuntu") { "deb" - } elseif ($IsRedHatFamily) { + } elseif ($LinuxInfo.ID -match "centos") { "rpm" } else { throw "Building packages for $($LinuxInfo.PRETTY_NAME) is unsupported!" @@ -1378,8 +1357,8 @@ function New-UnixPackage { } } "rpm" { - if (!$IsRedHatFamily) { - throw ($ErrorMessage -f "Redhat Family") + if (!$IsCentOS) { + throw ($ErrorMessage -f "CentOS") } } "osxpkg" { @@ -1443,7 +1422,7 @@ It consists of a cross-platform command-line shell and associated scripting lang New-Item -Force -ItemType SymbolicLink -Path "/tmp/$Name" -Target "$Destination/$Name" >$null - if ($IsRedHatFamily) { + if ($IsCentos) { $AfterInstallScript = [io.path]::GetTempFileName() $AfterRemoveScript = [io.path]::GetTempFileName() @' @@ -1560,7 +1539,7 @@ esac } elseif ($IsUbuntu16) { $Dependencies += "libicu55" } - } elseif ($IsRedHatFamily) { + } elseif ($IsCentOS) { $Dependencies = @( "glibc", "libcurl", @@ -1583,15 +1562,9 @@ esac $Iteration += "ubuntu1.16.04.1" } - # We currently only support CentOS 7 and Fedora 24+ + # We currently only support CentOS 7 # https://fedoraproject.org/wiki/Packaging:DistTag - if ($IsCentOS) { - $rpm_dist = "el7.centos" - } elseif ($IsFedora) { - $version_id = $LinuxInfo.VERSION_ID - $rpm_dist = "fedora.$version_id" - } - + $rpm_dist = "el7.centos" $Arguments = @( "--force", "--verbose", @@ -2597,7 +2570,6 @@ function Start-CrossGen { "ubuntu.16.04-x64", "debian.8-x64", "centos.7-x64", - "fedora.24-x64", "win7-x86", "win7-x64", "win81-x64", @@ -2668,8 +2640,6 @@ function Start-CrossGen { "ubuntu.14.04-x64" } elseif ($IsCentOS) { "rhel.7-x64" - } elseif ($IsFedora) { - "fedora.24-x64" } } elseif ($IsOSX) { "osx.10.10-x64" diff --git a/docker/nightly/fedora24/Dockerfile b/docker/nightly/fedora24/Dockerfile deleted file mode 100644 index 726065312c..0000000000 --- a/docker/nightly/fedora24/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM microsoft/powershell:fedora24 -MAINTAINER Andrew Schwartzmeyer -LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" -LABEL Description="This Dockerfile will install and build the latest release of PS." - -ARG fork=PowerShell -ARG branch=master -SHELL ["powershell", "-command"] -RUN git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch; \ - Set-Location PowerShell; \ - Import-Module ./build.psm1; \ - Start-PSBootstrap -Package -NoSudo; \ - Start-PSBuild -Crossgen -PSModuleRestore; \ - Start-PSPackage; - -SHELL ["/bin/sh", "-c"] -RUN dnf install -y PowerShell/powershell*.rpm diff --git a/docker/release/fedora24/Dockerfile b/docker/release/fedora24/Dockerfile deleted file mode 100644 index 4899be1da2..0000000000 --- a/docker/release/fedora24/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM fedora:24 -MAINTAINER Andrew Schwartzmeyer - -# This release Dockerfile uses the CentOS 7 build for the purposes of enabling -# nightlies - -ARG POWERSHELL_VERSION=6.0.0-alpha.13 -ARG POWERSHELL_RELEASE=v6.0.0-alpha.13 -ARG POWERSHELL_PACKAGE=powershell-6.0.0_alpha.13-1.el7.centos.x86_64.rpm - -# The CentOS 7 release relies on an older version of libicu, so we'll be downloading it -# from the University of Kent (GB) mirror service. -ARG LIBICU50_SOURCE=https://www.mirrorservice.org/sites/mirror.centos.org/7.2.1511/os/x86_64/Packages -ARG LIBICU50_PACKAGE=libicu-50.1.2-15.el7.x86_64.rpm -ARG LIBICU50_PACKAGE_MD5=c3c1ebaabc8d1619377d535698784953 - -# Install the English language pack first - -RUN dnf install -y glibc glibc-langpack-en glibc-locale-source - -ENV LANG en_US.UTF-8 -ENV LC_ALL $LANG -RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG - -# Disable Delta RPMS -RUN echo "deltarpm=False" >> /etc/dnf/dnf.conf - -# Install dependencies and clean up -RUN dnf install -y \ - libcurl \ - ca-certificates \ - libgcc \ - libicu \ - openssl \ - libstdc++ \ - ncurses-base \ - libunwind \ - uuid \ - zlib \ - which \ - curl \ - git \ - cpio \ - && dnf update -y \ - && dnf clean all - -# Install PowerShell package -RUN curl -SLO https://github.com/PowerShell/PowerShell/releases/download/$POWERSHELL_RELEASE/$POWERSHELL_PACKAGE \ - && dnf install -y $POWERSHELL_PACKAGE \ - && rm $POWERSHELL_PACKAGE - -# Once the next release of PowerShell is done, this libicu50 & LD_LIBRARY_PATH hackery can be dropped. -RUN curl -SLO ${LIBICU50_SOURCE}/${LIBICU50_PACKAGE} \ - && md5sum $LIBICU50_PACKAGE | grep $LIBICU50_PACKAGE_MD5 \ - && cd /opt/microsoft/powershell/$POWERSHELL_VERSION \ - && rpm2cpio /$LIBICU50_PACKAGE | cpio -idmv \ - && rm /$LIBICU50_PACKAGE - -# Append the old library to LD_LIBRARY_PATH - -ENV LD_LIBRARY_PATH /opt/microsoft/powershell/$POWERSHELL_VERSION/usr/lib64 - -# Use array to avoid Docker prepending /bin/sh -c -ENTRYPOINT [ "powershell" ] diff --git a/src/ResGen/project.json b/src/ResGen/project.json index 6ad96f2c74..92410e028d 100644 --- a/src/ResGen/project.json +++ b/src/ResGen/project.json @@ -22,7 +22,6 @@ "ubuntu.14.04-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win81-x64": { }, diff --git a/src/TypeCatalogGen/project.json b/src/TypeCatalogGen/project.json index ba658a7f93..18b73d036a 100644 --- a/src/TypeCatalogGen/project.json +++ b/src/TypeCatalogGen/project.json @@ -47,7 +47,6 @@ "ubuntu.16.10-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win81-x64": { }, diff --git a/src/TypeCatalogParser/project.json b/src/TypeCatalogParser/project.json index e385685ba4..6eef8fd7d2 100644 --- a/src/TypeCatalogParser/project.json +++ b/src/TypeCatalogParser/project.json @@ -45,7 +45,6 @@ "ubuntu.16.04-x64": { }, "ubuntu.16.10-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win10-x64": { }, diff --git a/src/powershell-unix/project.json b/src/powershell-unix/project.json index 511f8f7740..f63c3b96c1 100644 --- a/src/powershell-unix/project.json +++ b/src/powershell-unix/project.json @@ -102,7 +102,6 @@ "ubuntu.16.10-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "osx.10.11-x64": { } } } diff --git a/test/PSReadLine/project.json b/test/PSReadLine/project.json index 741ab1e38a..7e9acb4e06 100644 --- a/test/PSReadLine/project.json +++ b/test/PSReadLine/project.json @@ -25,7 +25,6 @@ "ubuntu.14.04-x64": { }, "ubuntu.16.04-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win10-x64": { }, diff --git a/test/csharp/project.json b/test/csharp/project.json index 16930621b2..9dead4604c 100644 --- a/test/csharp/project.json +++ b/test/csharp/project.json @@ -30,7 +30,6 @@ "ubuntu.16.04-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win81-x64": { }, diff --git a/test/tools/CreateChildProcess/project.json b/test/tools/CreateChildProcess/project.json index 90dc5ed0e6..156487aaa4 100644 --- a/test/tools/CreateChildProcess/project.json +++ b/test/tools/CreateChildProcess/project.json @@ -20,7 +20,6 @@ "ubuntu.14.04-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win81-x64": { }, diff --git a/test/tools/EchoArgs/project.json b/test/tools/EchoArgs/project.json index 8273c36659..cf4de148d4 100644 --- a/test/tools/EchoArgs/project.json +++ b/test/tools/EchoArgs/project.json @@ -20,7 +20,6 @@ "ubuntu.14.04-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, - "fedora.24-x64": { }, "win7-x86": { }, "win7-x64": { }, "win81-x64": { },