From f2e641dd9db56610825f7238ccafe4c5fab41b36 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 00:46:41 +0200 Subject: [PATCH 01/24] Update .travis.yml --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9c69806a692..bb6ae2110fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,9 @@ dist: trusty addons: artifacts: - paths: $(ls powershell*{deb,pkg} | tr "\n" ":") + paths: + - $(ls PowerShell*{AppImage} | tr "\n" ":") + - $(ls powershell*{deb,pkg} | tr "\n" ":") install: - (cd tools && ./download.sh) From 38e461d9ae0bc18bfb46fd142e0efe802b7b2ab2 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 00:59:01 +0200 Subject: [PATCH 02/24] Create appimage.sh [ci skip] --- tools/appimage.sh | 148 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 tools/appimage.sh diff --git a/tools/appimage.sh b/tools/appimage.sh new file mode 100644 index 00000000000..19ca8e0b98f --- /dev/null +++ b/tools/appimage.sh @@ -0,0 +1,148 @@ +#!/bin/bash + +# Generate AppImage, http://appimage.org + +# Known to run on +# CentOS-7.0-1406-x86_64-GnomeLive.iso +# CentOS-7-x86_64-LiveGNOME-1511.iso +# Chromixium-1.5-amd64.iso +# Fedora-Live-Workstation-x86_64-22-3.iso +# Fedora-Live-Workstation-x86_64-23-10.iso +# SL-72-x86_64-2016-02-03-LiveDVDgnome.iso +# debian-live-8.0.0-amd64-xfce-desktop+nonfree.iso +# debian-live-8.4.0-amd64-gnome-desktop.iso +# elementary_OS_0.3_freya_amd64.iso +# kali-linux-2.0-amd64.iso +# kali-linux-2016.1-amd64.iso +# kubuntu-14.04.4-desktop-amd64.iso +# kubuntu-15.04-desktop-amd64.iso +# kubuntu-16.04-desktop-amd64.iso +# linuxmint-17.3-cinnamon-64bit.iso +# neon-devedition-gitunstable-20160814-0806-amd64.iso +# netrunner-17-64bit.iso +# ubuntu-14.04.1-desktop-amd64.iso +# ubuntu-16.04-desktop-amd64.iso +# ubuntu-gnome-16.04-desktop-amd64.iso +# ubuntu-mate-16.04-desktop-amd64.iso +# xubuntu-16.04-desktop-amd64.iso + +APP=PowerShell +LOWERAPP=${APP,,} + +mkdir -p ./$APP/$APP.AppDir/usr/lib + +cd ./$APP/ + +wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh +. ./functions.sh + +# We get this app and almost all its dependencies via apt-get +# but not using the host system's information about what is +# installed on the system but our own assumptions instead + +mkdir -p ./tmp/archives/ +mkdir -p ./tmp/lists/partial +touch tmp/pkgcache.bin tmp/srcpkgcache.bin + +generate_status + +echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe +" > sources.list + +OPTIONS="-o Debug::NoLocking=1 +-o APT::Cache-Limit=125829120 +-o Dir::Etc::sourcelist=./sources.list +-o Dir::State=./tmp +-o Dir::Cache=./tmp +-o Dir::State::status=./status +-o Dir::Etc::sourceparts=- +-o APT::Get::List-Cleanup=0 +-o APT::Get::AllowUnauthenticated=1 +-o Debug::pkgProblemResolver=true +-o Debug::pkgDepCache::AutoInstall=true +-o APT::Install-Recommends=0 +-o APT::Install-Suggests=0 +" + +# TODO: Use the deb that has been generated in this build run instead +RELEASE=$(wget -q "https://github.com/PowerShell/PowerShell/releases" -O - | grep "releases/tag" | head -n 1 | cut -d '"' -f 2) +DEBS=$(wget -q "https://github.com/$RELEASE" -O - | grep deb | grep 14.04 | grep href | cut -d '"' -f 2) +for DEB in $DEBS ; do + wget -c https://github.com/$DEB +done + +# Add local repository so that we can install deb files +# that were downloaded outside of a repository +dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz +echo "deb file:$(readlink -e $PWD) ./" >> sources.list + +apt-get $OPTIONS update + +URLS=$(apt-get $OPTIONS -y install --print-uris $LOWERAPP | cut -d "'" -f 2 | grep -e "^http") + +wget -c $URLS + +cd ./$APP.AppDir/ + +find ../*.deb -exec dpkg -x {} . \; || true + +rm usr/bin/powershell +mv opt/microsoft/powershell/*/* usr/bin/ + +cat > $LOWERAPP.desktop <<\EOF +[Desktop Entry] +Name=PowerShell +Comment=Microsoft PowerShell +Exec=powershell +Keywords=shell;prompt;command;commandline;cmd; +Icon=powershell +Type=Application +Categories=System;TerminalEmulator; +StartupNotify=true +Terminal=true +EOF + +wget -c "https://github.com/PowerShell/PowerShell/raw/master/assets/Powershell_256.png" -O $LOWERAPP.png + +cat > ./AppRun <<\EOF +#!/bin/sh +HERE=$(dirname $(readlink -f "${0}")) +export PATH="${HERE}/usr/bin/":$PATH +export LD_LIBRARY_PATH="${HERE}/usr/lib/":$LD_LIBRARY_PATH +exec "${HERE}/usr/bin/powershell.wrapper" "$@" +EOF +chmod a+x ./AppRun + +# Copy in the indirect dependencies +# copy_deps # not needed here due to the way we use apt to download everything + +move_lib +mv ./usr/lib/x86_64-linux-gnu/* ./usr/lib/ # AppRun sets Qt env here + +mv ./usr/lib/pulseaudio/*.so usr/lib/ || true + +mv usr/local/share/man usr/share/ + +delete_blacklisted +rm -rf ./etc/ ./home/ ./lib/ || true +rm -r opt/ usr/lib/x86_64-linux-gnu/ usr/lib64 usr/share/ + +# patch_usr +# Patching only the executable files seems not to be enough for some apps +# find usr/ -type f -exec sed -i -e "s|/usr|././|g" {} \; + +VER1=$(find ../*.deb -name $LOWERAPP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1-2 | sed -e 's|1%3a||g' | sed -e 's|-|.|g' ) +# GLIBC_NEEDED=$(glibc_needed) +VERSION=$VER1 +echo $VERSION + +get_desktopintegration $LOWERAPP +sed -i -e 's|^echo|# echo|g' usr/bin/$LOWERAPP.wrapper # Make less verbose + +# Go out of AppImage +cd .. + +ARCH="x86_64" +generate_appimage + +cp ../out/*AppImage .. From 79ace21dc0c94ed85ac1efa31cb64c87b65c4152 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 01:00:16 +0200 Subject: [PATCH 03/24] Update travis.sh --- tools/travis.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/travis.sh b/tools/travis.sh index 016e3787a1a..055165a3eda 100755 --- a/tools/travis.sh +++ b/tools/travis.sh @@ -6,3 +6,4 @@ if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then else powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild -CrossGen; Start-PSPester; Start-PSxUnit" fi +bash -ex ./tools/appimage.sh # TODO: Move to build.psm1 From e8ffe860f4b3e973d8f85b7ecdb24c1938b632ff Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 01:10:10 +0200 Subject: [PATCH 04/24] Use the deb that has been generated in this build --- tools/appimage.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/appimage.sh b/tools/appimage.sh index 19ca8e0b98f..95677b47565 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -64,12 +64,7 @@ OPTIONS="-o Debug::NoLocking=1 -o APT::Install-Suggests=0 " -# TODO: Use the deb that has been generated in this build run instead -RELEASE=$(wget -q "https://github.com/PowerShell/PowerShell/releases" -O - | grep "releases/tag" | head -n 1 | cut -d '"' -f 2) -DEBS=$(wget -q "https://github.com/$RELEASE" -O - | grep deb | grep 14.04 | grep href | cut -d '"' -f 2) -for DEB in $DEBS ; do - wget -c https://github.com/$DEB -done +cp ../powershell_*_amd64.deb . # Add local repository so that we can install deb files # that were downloaded outside of a repository From 366ca5e5e0ff52cd8859066699bc9a013fb04802 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 01:44:55 +0200 Subject: [PATCH 05/24] Set git clone depth to 100 As per https://github.com/PowerShell/PowerShell/issues/2024#issuecomment-241584449 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index bb6ae2110fc..61ae4236f94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +git: + depth: 100 + language: cpp branches: From 0da5206c5122fdcc8f063412ba5abe1f3e1edb8f Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 01:55:39 +0200 Subject: [PATCH 06/24] Fix artifacts search path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 61ae4236f94..a0d96ad4966 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ dist: trusty addons: artifacts: paths: - - $(ls PowerShell*{AppImage} | tr "\n" ":") + - $(ls PowerShell*AppImage | tr "\n" ":") - $(ls powershell*{deb,pkg} | tr "\n" ":") install: From a1d51481897ee80e9359bbf90b6bf48fbd68869e Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 02:24:59 +0200 Subject: [PATCH 07/24] Do not call appimage.sh from travis.sh but from build.psm1 [ci skip] --- tools/travis.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/travis.sh b/tools/travis.sh index 055165a3eda..016e3787a1a 100755 --- a/tools/travis.sh +++ b/tools/travis.sh @@ -6,4 +6,3 @@ if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then else powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild -CrossGen; Start-PSPester; Start-PSxUnit" fi -bash -ex ./tools/appimage.sh # TODO: Move to build.psm1 From 1b9a4376a3753cc38ab7e71216df8adda2482e23 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 02:25:09 +0200 Subject: [PATCH 08/24] Call appimage.sh from build.psm1 --- build.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.psm1 b/build.psm1 index feabb4b75be..d8e9cd17ebd 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1114,6 +1114,8 @@ It consists of a cross-platform command-line shell and associated scripting lang } } + bash -ex ./tools/appimage.sh + # Magic to get path output return Get-Item (Join-Path $PSScriptRoot (($Output[-1] -split ":path=>")[-1] -replace '["{}]')) } From d49c5956fd856d9c41c801df736a55d5a3e36cb5 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 02:37:43 +0200 Subject: [PATCH 09/24] Add AppImage to linux.md --- docs/installation/linux.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 919bcd396c4..368c4efd6e8 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -46,7 +46,6 @@ sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb [Ubuntu 16.04]: http://releases.ubuntu.com/16.04/ - CentOS 7 ======== @@ -64,6 +63,22 @@ sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm [CentOS 7]: https://www.centos.org/download/ +AppImage for Linux +================== + +Using a desktop Linux distribution for the Intel x86_64 architecture that is no older than approximately two years, download the AppImage +`PowerShell-6.0.0.alpha.9-x86_64.AppImage` +from the [releases][] page onto the Linux machine. + +Then execute the following in the terminal: + +``` +chmod a+x PowerShell-6.0.0.alpha.9-x86_64.AppImage +./PowerShell-6.0.0.alpha.9-x86_64.AppImage +``` + +The [AppImage](http://appimage.org/) lets you run PowerShell without installing it. It is a portable application that bundles PowerShell and everything it needs to run that is not part of the default installation of most distributions. + OS X 10.11 ========== From 0c7fe08c2304de51a4faf1df41200f4ed8a46132 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 02:38:13 +0200 Subject: [PATCH 10/24] Add AppImage to linux.md --- docs/installation/linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 368c4efd6e8..7f2cd4266bf 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -63,8 +63,8 @@ sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm [CentOS 7]: https://www.centos.org/download/ -AppImage for Linux -================== +Linux AppImage +============== Using a desktop Linux distribution for the Intel x86_64 architecture that is no older than approximately two years, download the AppImage `PowerShell-6.0.0.alpha.9-x86_64.AppImage` From 4c57d1c6f1957630bddfda7c4167b5b970812332 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 02:40:41 +0200 Subject: [PATCH 11/24] Add AppImage to linux.md --- docs/installation/linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 7f2cd4266bf..154fbab2946 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -2,7 +2,7 @@ Package installation instructions ================================= Supports [Ubuntu 14.04][u14], [Ubuntu 16.04][u16], -[CentOS 7][cos], and [OS X 10.11][osx]. +[CentOS 7][cos], [most Linux distributions (AppImage)][lai], and [OS X 10.11][osx]. All packages are available on our GitHub [releases][] page. Once the package is installed, run `powershell` from a terminal. @@ -10,6 +10,7 @@ Once the package is installed, run `powershell` from a terminal. [u14]: #ubuntu-1404 [u16]: #ubuntu-1604 [cos]: #centos-7 +[lai]: #linux-appimage [osx]: #os-x-1011 Ubuntu 14.04 From d627b6cae2a426aa6ff0b9e0cea9a9abe6dab8c9 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 23 Aug 2016 02:46:07 +0200 Subject: [PATCH 12/24] Add AppImage to README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca7fca0447e..91e72a6d21f 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,16 @@ You can download and install a PowerShell package for any of the following platf | Ubuntu 16.04 | [.deb][rl-ubuntu16] | [Instructions][in-ubuntu16] | | Ubuntu 14.04 | [.deb][rl-ubuntu14] | [Instructions][in-ubuntu14] | | CentOS 7 | [.rpm][rl-centos] | [Instructions][in-centos] | +| Most Linux distributions | [.AppImage][rl-ai] | [Instructions][in-appimage] | | OS X 10.11 | [.pkg][rl-osx] | [Instructions][in-osx] | -| Docker | | [Instructions] [in-docker] | +| Docker | | [Instructions][in-docker] | [rl-windows10]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell_6.0.0.9-alpha.9-win10-x64.msi [rl-windows81]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell_6.0.0.9-alpha.9-win81-x64.msi [rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb [rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb [rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm +[rl-ai]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell-6.0.0.alpha.9-x86_64.AppImage [rl-osx]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9.pkg [installation]: docs/installation @@ -42,6 +44,7 @@ You can download and install a PowerShell package for any of the following platf [in-ubuntu14]: docs/installation/linux.md#ubuntu-1404 [in-ubuntu16]: docs/installation/linux.md#ubuntu-1604 [in-centos]: docs/installation/linux.md#centos-7 +[in-appimage]: docs/installation/linux.md#linux-appimage [in-osx]: docs/installation/linux.md#os-x-1011 [in-docker]: docs/installation/docker.md From abfd1906c845dba81f38ac4f77bf146c50837011 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 00:12:48 +0200 Subject: [PATCH 13/24] "Many" instead of "most", link to AppImage for more info https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960080 --- docs/installation/linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 154fbab2946..bf4d8568a9b 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -2,7 +2,7 @@ Package installation instructions ================================= Supports [Ubuntu 14.04][u14], [Ubuntu 16.04][u16], -[CentOS 7][cos], [most Linux distributions (AppImage)][lai], and [OS X 10.11][osx]. +[CentOS 7][cos], [many Linux distributions (AppImage)][lai], and [OS X 10.11][osx]. All packages are available on our GitHub [releases][] page. Once the package is installed, run `powershell` from a terminal. @@ -78,7 +78,7 @@ chmod a+x PowerShell-6.0.0.alpha.9-x86_64.AppImage ./PowerShell-6.0.0.alpha.9-x86_64.AppImage ``` -The [AppImage](http://appimage.org/) lets you run PowerShell without installing it. It is a portable application that bundles PowerShell and everything it needs to run that is not part of the default installation of most distributions. +The AppImage lets you run PowerShell without installing it. It is a portable application that bundles PowerShell and everything it needs to run that is not part of the default installation of many distributions ([more information](http://appimage.org/)). OS X 10.11 ========== From 0ea30ab41f87ad518fd9df9c2188556d5da663a3 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 00:14:02 +0200 Subject: [PATCH 14/24] "Many" instead of "most" again https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960207 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91e72a6d21f..c35de6a0354 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You can download and install a PowerShell package for any of the following platf | Ubuntu 16.04 | [.deb][rl-ubuntu16] | [Instructions][in-ubuntu16] | | Ubuntu 14.04 | [.deb][rl-ubuntu14] | [Instructions][in-ubuntu14] | | CentOS 7 | [.rpm][rl-centos] | [Instructions][in-centos] | -| Most Linux distributions | [.AppImage][rl-ai] | [Instructions][in-appimage] | +| Many Linux distributions | [.AppImage][rl-ai] | [Instructions][in-appimage] | | OS X 10.11 | [.pkg][rl-osx] | [Instructions][in-osx] | | Docker | | [Instructions][in-docker] | From bb774e24788116c78a094f8bb3d754fce5204b3a Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 00:21:46 +0200 Subject: [PATCH 15/24] Copyright and license https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960505 --- tools/appimage.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/tools/appimage.sh b/tools/appimage.sh index 95677b47565..bd3ebfd5df2 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -1,8 +1,29 @@ #!/bin/bash -# Generate AppImage, http://appimage.org +# The MIT License (MIT) +# Copyright (c) 2016 Simon Peter +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. -# Known to run on +# Generate AppImage, http://appimage.org +# +# The resulting PowerShell AppImage is known to run on # CentOS-7.0-1406-x86_64-GnomeLive.iso # CentOS-7-x86_64-LiveGNOME-1511.iso # Chromixium-1.5-amd64.iso From c9324f7d108357f71b25decb912367fc75edc34c Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 00:26:57 +0200 Subject: [PATCH 16/24] MIT License for appimage.sh https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960505 --- license_thirdparty_proprietary.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/license_thirdparty_proprietary.txt b/license_thirdparty_proprietary.txt index 51cfcfe7ea2..8fc5e7a94b0 100644 --- a/license_thirdparty_proprietary.txt +++ b/license_thirdparty_proprietary.txt @@ -720,4 +720,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas. - +The following components are governed by the MIT license, a copy of which appears +below the list of components: +------------------------------------------------------ +tools/appimage.sh +------------------------------------------------------ +Copyright (c) 2016 Simon Peter +All rights reserved. +MIT License +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following +conditions: +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 6a4958540b945d1acb9bb8b84a600f890ec3ece0 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 00:28:35 +0200 Subject: [PATCH 17/24] Full text of the MIT License is in license_thirdparty_proprietary.txt --- tools/appimage.sh | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tools/appimage.sh b/tools/appimage.sh index bd3ebfd5df2..855bd030157 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -2,24 +2,6 @@ # The MIT License (MIT) # Copyright (c) 2016 Simon Peter -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. # Generate AppImage, http://appimage.org # From bf7cba0b5c2f4b466aba47d95bb3c97e66e8e311 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 00:34:08 +0200 Subject: [PATCH 18/24] Use icon from local repository https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960616 --- tools/appimage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/appimage.sh b/tools/appimage.sh index 855bd030157..6e24b5cf7cc 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -100,7 +100,7 @@ StartupNotify=true Terminal=true EOF -wget -c "https://github.com/PowerShell/PowerShell/raw/master/assets/Powershell_256.png" -O $LOWERAPP.png +cp ../../assets/Powershell_256.png $LOWERAPP.png cat > ./AppRun <<\EOF #!/bin/sh From a18bce7d5a6c0cde876002dfa1aa920fce944eda Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 24 Aug 2016 20:00:51 +0200 Subject: [PATCH 19/24] Clarify license and clean up unused code https://github.com/PowerShell/PowerShell/pull/2027#discussion_r76104601 --- tools/appimage.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tools/appimage.sh b/tools/appimage.sh index 6e24b5cf7cc..f590d6cc638 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -1,8 +1,11 @@ #!/bin/bash -# The MIT License (MIT) +# This code is based on an example recipe from the AppImage project, +# https://github.com/probonopd/AppImages/blob/master/recipes/powershell/Recipe # Copyright (c) 2016 Simon Peter - +# The license of this code and of https://github.com/probonopd/AppImages/raw/master/functions.sh +# is the MIT License, see https://github.com/probonopd/AppImages/blob/master/LICENSE +# # Generate AppImage, http://appimage.org # # The resulting PowerShell AppImage is known to run on @@ -111,9 +114,6 @@ exec "${HERE}/usr/bin/powershell.wrapper" "$@" EOF chmod a+x ./AppRun -# Copy in the indirect dependencies -# copy_deps # not needed here due to the way we use apt to download everything - move_lib mv ./usr/lib/x86_64-linux-gnu/* ./usr/lib/ # AppRun sets Qt env here @@ -125,13 +125,7 @@ delete_blacklisted rm -rf ./etc/ ./home/ ./lib/ || true rm -r opt/ usr/lib/x86_64-linux-gnu/ usr/lib64 usr/share/ -# patch_usr -# Patching only the executable files seems not to be enough for some apps -# find usr/ -type f -exec sed -i -e "s|/usr|././|g" {} \; - -VER1=$(find ../*.deb -name $LOWERAPP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1-2 | sed -e 's|1%3a||g' | sed -e 's|-|.|g' ) -# GLIBC_NEEDED=$(glibc_needed) -VERSION=$VER1 +VERSION=$(find ../*.deb -name $LOWERAPP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1-2 | sed -e 's|1%3a||g' | sed -e 's|-|.|g' ) echo $VERSION get_desktopintegration $LOWERAPP From 7476ad084ad535ae81627deba55efc09c521f54d Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 26 Aug 2016 19:47:59 +0200 Subject: [PATCH 20/24] Update appimage.sh --- tools/appimage.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/appimage.sh b/tools/appimage.sh index f590d6cc638..0770f52ed93 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -138,3 +138,5 @@ ARCH="x86_64" generate_appimage cp ../out/*AppImage .. + +cd .. From e7ca878bc4bac8c271aa5561c945d0960199960c Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 26 Aug 2016 10:49:09 -0700 Subject: [PATCH 21/24] Move AppImage generation to travis.sh As it works independently of New-UnixPackage, I don't think it should be run there. --- build.psm1 | 2 -- tools/travis.sh | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index d8e9cd17ebd..feabb4b75be 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1114,8 +1114,6 @@ It consists of a cross-platform command-line shell and associated scripting lang } } - bash -ex ./tools/appimage.sh - # Magic to get path output return Get-Item (Join-Path $PSScriptRoot (($Output[-1] -split ":path=>")[-1] -replace '["{}]')) } diff --git a/tools/travis.sh b/tools/travis.sh index 016e3787a1a..1e3d3bb3258 100755 --- a/tools/travis.sh +++ b/tools/travis.sh @@ -1,8 +1,10 @@ -set -x +set -ex ulimit -n 4096 # Only build packages for branches, not pull requests if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then powershell -c "Import-Module ./build.psm1; Start-PSBootstrap -Package; Start-PSBuild -CrossGen; Start-PSPackage; Start-PSPester; Start-PSxUnit" + # Generate AppImage + ./tools/appimage.sh else powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild -CrossGen; Start-PSPester; Start-PSxUnit" fi From 6b58119c5a931a1334eedbdb431f6b158c55cfe1 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 26 Aug 2016 10:51:02 -0700 Subject: [PATCH 22/24] Rename AppImage to "powershell" for package consistency Also put version back to 6.0.0-alpha.9 (- instead of .). Removed $LOWERAPP as it was no longer needed. --- .travis.yml | 5 ++--- README.md | 2 +- docs/installation/linux.md | 19 ++++++++++++++----- tools/appimage.sh | 15 +++++++-------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0d96ad4966..418ff8ee436 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,8 @@ dist: trusty addons: artifacts: - paths: - - $(ls PowerShell*AppImage | tr "\n" ":") - - $(ls powershell*{deb,pkg} | tr "\n" ":") + paths: + - $(ls powershell*{deb,pkg,AppImage} | tr "\n" ":") install: - (cd tools && ./download.sh) diff --git a/README.md b/README.md index c35de6a0354..dfa220f15c3 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ You can download and install a PowerShell package for any of the following platf [rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb [rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb [rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm -[rl-ai]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell-6.0.0.alpha.9-x86_64.AppImage +[rl-ai]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9-x86_64.AppImage [rl-osx]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9.pkg [installation]: docs/installation diff --git a/docs/installation/linux.md b/docs/installation/linux.md index bf4d8568a9b..474b848948e 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -67,18 +67,27 @@ sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm Linux AppImage ============== -Using a desktop Linux distribution for the Intel x86_64 architecture that is no older than approximately two years, download the AppImage -`PowerShell-6.0.0.alpha.9-x86_64.AppImage` +> Please note that we do have an alpha.9 AppImage, +> this is preparation for alpha.10! + +Using a recent Linux distribution for the Intel x86_64 architecture, +download the AppImage `powershell-6.0.0-alpha.9-x86_64.AppImage` from the [releases][] page onto the Linux machine. Then execute the following in the terminal: ``` -chmod a+x PowerShell-6.0.0.alpha.9-x86_64.AppImage -./PowerShell-6.0.0.alpha.9-x86_64.AppImage +chmod a+x powershell-6.0.0-alpha.9-x86_64.AppImage +./powershell-6.0.0-alpha.9-x86_64.AppImage ``` -The AppImage lets you run PowerShell without installing it. It is a portable application that bundles PowerShell and everything it needs to run that is not part of the default installation of many distributions ([more information](http://appimage.org/)). +The [AppImage][] lets you run PowerShell without installing it. +It is a portable application that bundles PowerShell and its dependencies +(including .NET Core's system dependencies) into one cohesive package. +This package works independently of the user's Linux distribution, +and is a single binary. + +[appimage]: http://appimage.org/ OS X 10.11 ========== diff --git a/tools/appimage.sh b/tools/appimage.sh index 0770f52ed93..67eb1c95c64 100644 --- a/tools/appimage.sh +++ b/tools/appimage.sh @@ -32,8 +32,7 @@ # ubuntu-mate-16.04-desktop-amd64.iso # xubuntu-16.04-desktop-amd64.iso -APP=PowerShell -LOWERAPP=${APP,,} +APP=powershell mkdir -p ./$APP/$APP.AppDir/usr/lib @@ -79,7 +78,7 @@ echo "deb file:$(readlink -e $PWD) ./" >> sources.list apt-get $OPTIONS update -URLS=$(apt-get $OPTIONS -y install --print-uris $LOWERAPP | cut -d "'" -f 2 | grep -e "^http") +URLS=$(apt-get $OPTIONS -y install --print-uris $APP | cut -d "'" -f 2 | grep -e "^http") wget -c $URLS @@ -90,7 +89,7 @@ find ../*.deb -exec dpkg -x {} . \; || true rm usr/bin/powershell mv opt/microsoft/powershell/*/* usr/bin/ -cat > $LOWERAPP.desktop <<\EOF +cat > $APP.desktop <<\EOF [Desktop Entry] Name=PowerShell Comment=Microsoft PowerShell @@ -103,7 +102,7 @@ StartupNotify=true Terminal=true EOF -cp ../../assets/Powershell_256.png $LOWERAPP.png +cp ../../assets/Powershell_256.png $APP.png cat > ./AppRun <<\EOF #!/bin/sh @@ -125,11 +124,11 @@ delete_blacklisted rm -rf ./etc/ ./home/ ./lib/ || true rm -r opt/ usr/lib/x86_64-linux-gnu/ usr/lib64 usr/share/ -VERSION=$(find ../*.deb -name $LOWERAPP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1-2 | sed -e 's|1%3a||g' | sed -e 's|-|.|g' ) +VERSION=$(find ../*.deb -name $APP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1-2 | sed -e 's|1%3a||g') echo $VERSION -get_desktopintegration $LOWERAPP -sed -i -e 's|^echo|# echo|g' usr/bin/$LOWERAPP.wrapper # Make less verbose +get_desktopintegration $APP +sed -i -e 's|^echo|# echo|g' usr/bin/$APP.wrapper # Make less verbose # Go out of AppImage cd .. From b4e1cd72481073653f053777b205dbc0969a761e Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 26 Aug 2016 10:51:22 -0700 Subject: [PATCH 23/24] Clone 1000 commits on Travis CI The previous failure we saw was because the most recent annotated tag did not exist in the previous 50 commits. In my experience we've gone about ~300 commits between tags, so I believe 1000 to be safe, but know 100 will not be. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 418ff8ee436..58fb2db878e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ git: - depth: 100 - + depth: 1000 + language: cpp branches: From 7dc82b4e8b5fb2c39c3850436ae3d7014e414cd7 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 26 Aug 2016 11:09:38 -0700 Subject: [PATCH 24/24] Mark appimage.sh as executable --- tools/appimage.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/appimage.sh diff --git a/tools/appimage.sh b/tools/appimage.sh old mode 100644 new mode 100755