Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 07a1841eb6 Set libpsl-native configuration to release
This disables asserts.
2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer e630c6f79c Fix GetCurrentThreadId 2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer 24d0ce36e6 Fix SetDate
And use a bunch of unsafe code because of concerns about stack size.
2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer cdcd2c25c8 Remove Windows ERROR codes from pal.h 2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer 011d947fd5 Clean up GetFileOwner 2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer 4038cd61f2 Clean up IsExecutable 2016-10-14 15:42:59 -07:00
Andrew Schwartzmeyer 8b3e8be1bc Clean up IsDirectory 2016-10-14 15:42:59 -07:00
Andrew Schwartzmeyer 2a6b84ed1b Clean up IsHardLink 2016-10-14 15:42:59 -07:00
Andrew Schwartzmeyer e343e8ec60 Clean up GetUserFromPid 2016-10-14 15:42:59 -07:00
Andrew Schwartzmeyer 14e2389e71 Clean up GetComputerName 2016-10-14 15:42:59 -07:00
Andrew Schwartzmeyer 1d240ef3e4 Remove GetLStat 2016-10-14 15:42:59 -07:00
Andrew Schwartzmeyer b4b2278571 Clean up CreateHardLink 2016-10-14 15:42:58 -07:00
Andrew Schwartzmeyer 0ce5575f57 Clean up CreateSymLink 2016-10-14 15:42:58 -07:00
Andrew Schwartzmeyer bdfe69355f Clean up GetComputerName 2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer 82867a5c12 Clean up FollowSymLink 2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer fc5a1ae6aa Clean up SetDate
Remove pass-by-reference from C API
2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer 196a37b118 Add native errno to ErrorCategory mapper 2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer e1aeeaa9c2 Switch to Win32Exception(GetLastWin32Error)
This is verified to work "correctly" on Linux in that it gets the
`perror` for the last set value of errno in native code.

No extra mapping or handling needs to be done on our part.

Keeping the strerror_r implementation in the history for the valuable
implementation of config.h.in in the library.
2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer 6c3e536ca8 Add configure to CMake to detect GNU strerror_r
* Add getstrerror to libpsl-native
* Add Unix.GetLastPerror to CorePsPlatform
2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer b0cd7ba3dc Clean up libpsl-native headers 2016-10-14 15:30:19 -07:00
Andrew Schwartzmeyer a66e8f3602 Rename "stable unstable" containers to "release nightly"
This change is made at the request of the PowerShell committee,
as the use of "stable" implied more stability than available with alpha
releases. This also changes the images from existing under one repo to
two: powershell/powershell and powershell/powershell-nightly.

The documentation and script have been updated.
2016-10-11 11:13:48 -07:00
Andrew Schwartzmeyer f4b565161e Remove bundler v1.13.1
The new version of bundler is buggy and causing installation of fpm to
fail, which causes builds to fail.
2016-09-26 14:51:54 -07:00
Andrew Schwartzmeyer 8a24d26e8d Patch System.Net.Http.Native.dylib
Again, .NET Core expects users to forcibly link the third party OpenSSL
libraries into system directories, which the Homebrew team advises
strongly against (and attempts to prevent). This also affects the
System.Net.Http library, and results in runtime errors during SSL
certificate validation. So instead, we patch what we can, when we can.
2016-09-20 14:34:32 -07:00
Andrew Schwartzmeyer 1b0a99fc13 Add one-line installation instruction 2016-09-20 14:10:40 -07:00
Andrew Schwartzmeyer 153ff43b50 Update Linux installation docs to resolve dependencies
Use `dpkg -i` followed by `apt-get install -f`. Alternatives considered
included using `apt install`, which does not work, and copying the
PowerShell package to `/var/cache/apt/archives` which is just as messy
as this. At least this follows the same steps as `download.sh`.
2016-09-20 14:02:16 -07:00
Andrew Schwartzmeyer e5d35807bb Update download.sh to install all dependencies 2016-09-20 13:57:36 -07:00
Andrew Schwartzmeyer 5439d50710 Add all dependencies to New-UnixPackage
Now that I finally have a decent list of dependencies (though it may
still be too many), I have expanded the dependencies of the package so
that users get better error messages.

I've removed ca-certificates as that's not *necessarily* required (but
needed on Docker to download over HTTPS). This may be true of other
packages too.
2016-09-20 13:57:36 -07:00
Andrew Schwartzmeyer d183d7944f Update download.sh and Dockerfile links
This is a breaking change until the release is posted.
2016-09-15 13:59:46 -07:00
Andrew Schwartzmeyer d264501f31 Update documentation names and links for alpha.10 2016-09-15 13:59:46 -07:00
Andrew Schwartzmeyer 832f1a679d Update documentation 2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer fde942f6bb Copy artifacts from containers to docker/packages 2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer f0314cd86e Parallelize Docker builds
Log output to docker/logs.
2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer 002d2a6911 Satisfy shellcheck
Some variables left unquoted because they may be empty.
2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer 4253051421 Add RUNARGS and BUILDARGS for more flexibility
E.g. RUNARGS="--rm" or BUILDARGS="--no-cache".
2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer e1e014295b Add -powershell and -Pester options to Start-PSPester
When testing containers, we want to use the in-box PowerShell.
2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer 03237e91b6 Consolidate test script with launch script 2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer ceed98e33d Enable building arbitrary forks and branches 2016-09-12 15:01:19 -07:00
Andrew Schwartzmeyer d76cc0f600 Add unstable Dockerfile for CentOS 7 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 2c7e687340 Add stable Dockerfile for CentOS 7 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 7ac85f6ce0 Add unstable Dockerfile for Ubuntu 16.04 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer da024ec2ba Add stable Dockerfile for 16.04 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 7375ab58b1 Add Docker scripts
Common bootstrap.ps1 script to run PowerShell builds.
Launch script to build and tag all containers.
Test script to run tests in unstable containers.
2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 6bddaf6534 Add unstable Dockerfile for Ubuntu 14.04 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer cbc658b525 Add stable Dockerfile for Ubuntu 14.04
Dependencies and PowerShell are installed.
2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 3e269103b5 Remove prototype Dockerfile 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 427435c8fd Refactor .NET CLI installation into Install-Dotnet
So that it can be reinstalled separately if desired.

Also removed the set validation as it was now wrong,
and removed the warning about no Invoke-WebRequest on Core PowerShell
(it is ported now).

I don't like the duplicate parameter logic,
especially around -NoSudo.
2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer fc2c1b9f7d Update apt-get repo in Start-PSBootstrap
yum does not need this as yum install does it automatically.

This is needed when running, for example, in a container.
2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 3a66c04f23 Add -NoSudo option to Start-PSBootstrap 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 3687692802 Guard fatal bootstrap steps with Start-NativeExecution 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer bb476d4aef Install groff when bootstrapping for packaging 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer e7537b7ef4 Improve GetFullyQualfiedName() test 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer b86b1f870a Fix memory leak in GetFullyQualifiedName() 2016-09-12 15:01:18 -07:00
Andrew Schwartzmeyer 7c10dac20c Update macOS install docs for OpenSSL 2016-09-04 12:40:57 -07:00
Andrew Schwartzmeyer 27530c403c Use direct download URLs instead of API
GitHub's API is throttled to 60 requests per hour per IP address when
for non-authenticated calls, which was causing severe CI flakiness.
While this adds another set of URLs to update for each release, the
alternative was adding an OAuth token and maintaining its ownership.
Moreover, this code is simpler than the previous API parsing.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 363657717c Handle package download failure 2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer fc2e4e0e23 Revert "Temporarily disable OS X on Travis CI"
This reverts commit bbf64d17ad.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer e337d93720 Install OpenSSL via Homebrew on macOS
Since it is required. Note that we do *not* unsafely link the OpenSSL
libraries into the system folders, as we instead patch .NET Core's
libraries to find OpenSSL in the installed location.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 6b582851d6 Don't download package silently
Otherwise users think it's slow or hung.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 25eab9a2e5 Quote all $variables
For paranoia.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer e3cf257a7d Use hash to check for curl
Our shebang is Bash.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 683e6fbe36 Remove incorrect logic from GetFullyQualifiedName()
I think this logic was originally added with the assumption that any
hostname with a dot in it was an FQDN. I believe this is incorrect. The
hostname is the hostname regardless of included dots, and getting the
FQDN amounts to always querying for the canonical name.
2016-09-02 10:27:11 -07:00
Andrew Schwartzmeyer 72a1ebdcbb Fix error handling in download.sh
This script should be deleted now that we can wget releases.
2016-08-19 11:18:00 -07:00
Andrew Schwartzmeyer 552bf9b50a Fix asset download in download.sh 2016-08-18 08:30:14 -07:00
Andrew Schwartzmeyer cb603b0334 Remove CI images badges until repaired 2016-08-18 07:49:41 -07:00
Andrew Schwartzmeyer 7f63daafd9 Fix AppVeyor for public repo 2016-08-18 00:06:55 -07:00
Andrew Schwartzmeyer 654425059f Fix Travis CI for public repo 2016-08-18 00:05:34 -07:00
Andrew Schwartzmeyer f2275f9a0a Fix download.sh for public repo 2016-08-18 00:05:08 -07:00
Andrew Schwartzmeyer a9e809c18a Fix naming of Unix packages
- .NET Core RID suffixes removed
- `el7.centos` suffix added to RPM
- `1ubuntu1.14.04.1` iteration used for DEB packages

`~` cannot be used after `ubuntu1` because GitHub release renames it to
a `.`; additionally, no packages lack the final suffix `.1`. While my
machine is `.5` I could find no packages that went past `.3`, so let's
use this to indicate that it works for `14.04.1` and forward.

We are *not* recreating the alpha.9 packages, but will we rename them
accordingly. This means that the filenames will be "correct" but the
meta-data will be out-of-date.
2016-08-16 16:07:54 -07:00
Andrew Schwartzmeyer bd31e2ab5c Update changelog 2016-08-16 14:43:34 -07:00
Andrew Schwartzmeyer 1e265e915e Update links for alpha.9
Also adds the Windows 8.1 build to the readme, and bumps the AppVeyor
build number.
2016-08-16 14:43:34 -07:00
Andrew Schwartzmeyer 6b4666ce36 Update AppVeyor build number to 6.0.0-alpha.8 2016-08-11 18:38:45 -07:00
Andrew Schwartzmeyer 3f9b1833ac Fix Start-PSPackage for Release build on Windows 2016-08-11 17:38:45 -07:00
Andrew Schwartzmeyer e89da27994 Update releases on readme 2016-08-11 17:11:50 -07:00
Andrew Schwartzmeyer e142f7c987 Update Linux / OS X installation documentation 2016-08-11 17:11:50 -07:00
Andrew Schwartzmeyer 21a7bd876c Update changelog for v6.0.0-alpha.8 release 2016-08-11 17:11:50 -07:00
Andrew Schwartzmeyer 5b48acb1cb Update releasing documentation 2016-08-11 14:42:37 -07:00
Andrew Schwartzmeyer 349491be84 Support building Ubuntu 16.04 packages 2016-08-11 13:42:02 -07:00
Andrew Schwartzmeyer 39184852d9 Add logic to rename package with runtime suffixed 2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer 49d297c410 Fix permissions of package files
The DLLs should not be marked executable on Unix.

Also remove deb-build-depends as the `dotnet` package is not yet
universally available.
2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer c0aac111d3 Enable side-by-side Unix packages 2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer 5235fed2c7 Refactor Start-PSPackage
Moved Unix package code into New-UnixPackage, switching on $Types to
call the appropriate function given the list of types.

Also fixed bug with chmod on a symlink; it was unnecessary.
2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer a3f3734f09 Include license during build
Rather than including it only at packaging, we should include this
license as part of `dotnet build` and `dotnet publish`.
2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer 1cc454fbd2 Update known issues
The "unavailable cmdlets" section was removed pending a comprehensive
list compiled from the module declarations.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer 5310423678 Remove Windows+Unix-Core
There are no longer module declarations that are identical between Core
PowerShell on Windows and on Unix.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer d59710d310 Remove unimplemented Management cmdlets from Unix
These are not currently implemented and so should not show up as
available.

The *-Computer cmdlets are already not compiled for Unix (and so not
available), so let's not declare them in the manifest.

The Get-ComputerInfo cmdlet does not work on Unix and so should not be
made available.

Test-Connection depends on an unavailable WMI provider.

Get/Set-TimeZone are not yet ported.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer f68cb8c385 Add copy of Management module declaration for Unix
Unmodified so we can track changes.
2016-08-09 18:53:44 -07:00
Andrew Schwartzmeyer e750fb6284 Move Management module declaration to Windows-Core modules
Since we need different versions for Windows and Unix.
2016-08-09 18:53:44 -07:00
Andrew Schwartzmeyer 280bd651c1 Remove unimplemented Utility cmdlets from Unix
ConvertFrom-SddlString and Unblock-File are Windows-specific cmdlets
with no equivalent on Unix.

squash! Remove Unblock-File from Unix
2016-08-09 18:53:43 -07:00
Andrew Schwartzmeyer 9c07b9f29d Add copy of Utility module declaration for Unix
Unmodified so we can track changes.
2016-08-09 17:50:06 -07:00
Andrew Schwartzmeyer c22dd04967 Move Utility module declaration to Windows-Core modules
Since we need different versions for Windows and Unix.
2016-08-09 17:50:06 -07:00
Andrew Schwartzmeyer 528f255dd8 Fix publishOptions for powershell-unix
While Unix builds were given their own module folder,
it was only being copied for build, not for publish,
thus breaking some builds.
2016-08-09 12:39:19 -07:00
Andrew Schwartzmeyer 1576172d23 Add Get/Set ExecutionPolicy cmdlets back to module
Without these declared in the Unix module manifest,
the related tests fail as the cmdlets cannot be found.
This is a regression.
2016-08-09 12:06:05 -07:00
Andrew Schwartzmeyer 0fc21db411 Fix Start-PSPester setup
Start-PSPester must ensure that the environment variable `PSMODULEPATH`
is not set before starting the new PowerShell process.
If it is set, then the tests are not guaranteed to be correct,
as they will be operating with the host process's `PSMODULEPATH`,
thus ignoring their own modules.

I also refactored the Start-PSPester command setup code.
2016-08-09 12:03:30 -07:00
Andrew Schwartzmeyer 4c830d5e32 Add Trace-Commands back to Utility module
This fixes a regression introduced by 0dd425da1.
2016-08-08 12:14:06 -07:00
Andrew Schwartzmeyer 5bc34eb63c Run Trace-Command tests on CI 2016-08-08 12:11:51 -07:00
Andrew Schwartzmeyer 9d164ea972 Move Unix class under Platform
E.g. SMA.Platform.Unix, not just SMA.Unix.
2016-08-08 10:48:59 -07:00
Andrew Schwartzmeyer a8416d7b30 Consolidate GetUserName code
Once .NET Core 1.1 becomes available, we can likely remove the entirety
of CorePsExtensions.cs.
2016-08-08 10:48:59 -07:00
Andrew Schwartzmeyer 3f9889d6da Consolidate InternalGetFolderPath
This logic belongs in one place, not split in two.
2016-08-05 15:34:52 -07:00
Andrew Schwartzmeyer 816dac0a55 Do not throw when getting Unix domain or user name
If the attempt to get the name fails, throwing an exception results in
PowerShell crashing. Instead, we should simply return empty data.

"unknown" is specifically not returned because it would be ambiguous; it
is not impossible to have an actual user or domain named "unknown".
2016-08-05 15:34:43 -07:00
Andrew Schwartzmeyer 09e1683098 Add Ubuntu 16.04 RID 2016-08-05 10:09:40 -07:00