A Chef cookbook to manage MSYS2.
To install an MSYS2 package:
poise_msys2_package 'mutt'
poise-msys2::default
– Install core MSYS2 system.
node['poise-msys2']['default_recipe']
– Recipe used by some resources to install MSYS2 if not already available. (default: poise-msys2::default)node['poise-msys2']['install_url']
– URL template to download the MSYS2 installer archive. Must point at the tar.xz archive, not the executable installer. (default: https://downloads.sourceforge.net/project/msys2/Base/%{arch}/msys2-base-%{arch}-%{version}.tar.xz)node['poise-msys2']['install_version']
– Version of the MSYS2 installer to use. (default: 20161025)node['poise-msys2']['root']
– Root folder for the MSYS2 installation. (default: $SYSTEMDRIVE\msys2)
The poise_msys2
resource installs MSYS2. This is normally handled via the
poise-msys2::default
recipe but a customized recipe can be used instead.
poise_msys2 'C:/msys' do
install_url 'https://mymirror.local/msys2-base-x86_64-20161025.tar.xz'
end
:install
– Install MSYS2. (default):upgrade
– Upgrade all MSYS2 system packages.:uninstall
– Remove MSYS2.
path
– Root folder for the MSYS2 installation. (name attribute)install_url
– RL template to download the MSYS2 installer archive. Must point at the tar.xz archive, not the executable installer. (required)install_version
– Version of the MSYS2 installer to use. (default: '')
The poise_msys2_execute
resource is like the core execute
resource but runs
the command in the MSYS2 environment.
poise_msys2_execute 'make' do
cwd '/c/myapp'
end
:run
– Run the command. (default)
The poise_msys2_execute
resource supports all the same properties as the
core execute
resource, which can be found in the
Chef documentation.
The poise_msys2_package
resource manages packages in the MSYS2 environment
using the included pacman
package manager system.
poise_msys2_package 'nano' do
action :upgrade
end
:install
– Install the package. (default):upgrade
– Upgrade the package.:remove
– Uninstall the package.
The poise_msys2_package
resource supports all the same properties as the
core package
resource, which can be found in the
Chef documentation.
Upgrading from the mingw
cookbook
is relatively straightforward. Replace all usage of msys2_package
resources
with poise_msys2_package
.
Development sponsored by SAP.
The Poise test server infrastructure is sponsored by Rackspace.
Copyright 2015-2017, Noah Kantrowitz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.