Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: ci

jobs:
lint-unit:
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@5.0.8
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@6.0.0
permissions:
actions: write
checks: write
Expand All @@ -23,16 +23,23 @@ jobs:
strategy:
matrix:
os:
- "centos-7"
- "centos-8"
- "debian-9"
- "debian-10"
- "fedora-latest"
- "opensuse-leap-15"
- "oraclelinux-7"
- "ubuntu-1604"
- "ubuntu-1804"
- "ubuntu-2004"
- "almalinux-8"
- "almalinux-9"
- "almalinux-10"
- "amazonlinux-2023"
- "centos-stream-9"
- "centos-stream-10"
- "debian-12"
- "debian-13"
- "fedora-43"
- "opensuse-leap-160"
- "oraclelinux-8"
- "oraclelinux-9"
- "rockylinux-8"
- "rockylinux-9"
- "rockylinux-10"
- "ubuntu-2204"
- "ubuntu-2404"
suite:
- "default"
fail-fast: false
Expand All @@ -41,7 +48,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v6
- name: Install Chef
uses: actionshub/chef-install@6.0.0
uses: sous-chefs/.github/.github/actions/install-workstation@6.0.0
- name: Dokken
uses: actionshub/test-kitchen@3.0.0
env:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ permissions:

jobs:
release:
uses: sous-chefs/.github/.github/workflows/release-cookbook.yml@5.0.8
uses: sous-chefs/.github/.github/workflows/release-cookbook.yml@6.0.0
secrets:
token: ${{ secrets.PORTER_GITHUB_TOKEN }}
supermarket_user: ${{ secrets.CHEF_SUPERMARKET_USER }}
supermarket_key: ${{ secrets.CHEF_SUPERMARKET_KEY }}
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_id: ${{ secrets.SLACK_CHANNEL_ID }}
2 changes: 1 addition & 1 deletion Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ source 'https://supermarket.chef.io'
metadata

group :integration do
cookbook 'firefox_test', path: 'test/fixtures/cookbooks/firefox_test'
cookbook 'test', path: 'test/cookbooks/test'
end
48 changes: 48 additions & 0 deletions LIMITATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Limitations

## Package Availability

### APT (Debian/Ubuntu)

* Mozilla publishes an APT repository at `https://packages.mozilla.org/apt` for Debian, Ubuntu, and Debian-based distributions.
* The Mozilla APT repository provides `firefox`, `firefox-esr`, beta, nightly, developer edition, and language pack packages.
* Debian 12 and 13 and Ubuntu 22.04 and 24.04 are current targets for this cookbook.

### DNF/YUM (RHEL family, Fedora, Amazon Linux)

* Mozilla publishes an RPM repository at `https://packages.mozilla.org/rpm/firefox` for Fedora and RPM-based distributions.
* The Mozilla RPM repository provides `firefox` and `firefox-l10n-*` packages, but its signing key fails under the default crypto policy on some current EL-family platforms because SHA1 signatures are disabled.
* The cookbook therefore uses distribution package repositories by default on RPM platforms.
* AlmaLinux 8, 9, and 10; Amazon Linux 2023; CentOS Stream 9 and 10; Fedora 43; Oracle Linux 8 and 9; and Rocky Linux 8, 9, and 10 are current Dokken targets where distribution repositories provide Firefox unless noted otherwise by Kitchen.
* Oracle Linux 10 is not included in Kitchen/CI because no `dokken/oraclelinux-10` image was identified during migration.

### Zypper (openSUSE)

* Mozilla documents the same RPM repository for zypper-based installation.
* The cookbook uses openSUSE distribution packages by default and installs `MozillaFirefox`.
* openSUSE Leap 16.0 is the current tested openSUSE target.

### Windows and macOS

* Current Firefox system requirements list Windows 10 or later.
* Current Firefox system requirements list macOS 10.15 or later.
* Windows and macOS installation uses Mozilla's download redirect service, not a package repository.

## Architecture Limitations

* Mozilla publishes Linux downloads for 32-bit, 64-bit, and ARM64/AArch64 builds.
* The current Kitchen and CI matrix verifies Linux `amd64` Dokken images only.
* Firefox on Linux requires glibc 2.17 or newer on x86_64 and glibc 2.28 or newer on arm64.

## Source/Compiled Installation

This cookbook does not build Firefox from source. It installs Firefox through Mozilla package repositories, distribution package managers, or Mozilla's Windows/macOS download redirect service.

## Removed EOL Targets

* CentOS Linux 7 and 8 are EOL.
* CentOS Stream 8 is EOL.
* Debian 9, 10, and 11 are EOL for standard support.
* Ubuntu 16.04, 18.04, 20.04, and 23.04 are EOL for standard support.
* Oracle Linux 7 is EOL for Premier Support.
* Scientific Linux is no longer supported by this cookbook.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)

This cookbook provides a resource (firefox_install) for installing firefox via package manager or downloading the binary directory from Mozilla. The resource allows specifying the version, language, and the desired action (install vs. upgrade) to perform during the install. The cookbook also ships with a default recipe that utilizes the resource in order to provide backwards compatibility with the previous cookbook releases.
This cookbook provides a `firefox_install` resource for installing Firefox via Mozilla package repositories, platform package managers, or Mozilla downloads on Windows and macOS. The resource allows specifying the version, language, repository behavior, and desired action.

See [migration.md](migration.md) for migration guidance from the removed default recipe and node attributes.

## Maintainers

Expand All @@ -16,18 +18,26 @@ This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of

### Platforms

- CentOS/RHEL
- macOS
- Ubuntu
- Windows
* AlmaLinux
* Amazon Linux
* CentOS Stream
* Debian
* Fedora
* macOS
* openSUSE Leap
* Oracle Linux
* Red Hat Enterprise Linux
* Rocky Linux
* Ubuntu
* Windows

### Chef

- Chef 14+
* Chef 15.3+

### Cookbooks

- none
* none

## Resources

Expand All @@ -37,26 +47,17 @@ Installs the Firefox web browser. With no properties provided the latest version

#### Actions

- :install - install the package (default)
- :upgrade - upgrade the package if a previous version already exists
* `:install` - install Firefox (default)
* `:upgrade` - upgrade Firefox if a previous version already exists

#### Properties

- `lang` - Language of firefox to install. Windows and macOS only. Default is `en-US`.
- `version` - Version of firefox to download. Default is `latest`.
- `package_name` - Package name to install. Default is `firefox_package_name` helper method.

## Recipes

### default

The default recipe exists for backwards compatibility reasons and simply calls the firefox_install resource but passes in values specified by Chef node attributes.

#### Attributes
* `lang` - Language of Firefox to install. Windows and macOS only. Default is `en-US`.
* `manage_repository` - Configure Mozilla APT repositories on Debian-family Linux. Default is `true`.
* `package_name` - Package name to install on Linux. Default is computed by platform and repository mode.
* `version` - Version of Firefox to install. Default is `latest`.

- `version` - Version of firefox to download. Default is `latest`.
- `lang` - Language of firefox to install. Windows and macOS only. Default is `en-US`.
- `install_action` - The installation action to take (:install or :upgrade). Default is `:install`
Full resource documentation is available in [documentation/firefox_install.md](documentation/firefox_install.md).

## Contributors

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ branches:
# Do not build on tags (GitHub only)
skip_tags: true

#faster cloning
# Faster cloning
clone_depth: 1

# Install the latest nightly of ChefDK
Expand All @@ -35,4 +35,4 @@ test_script:
- c:\opscode\chefdk\bin\chef.bat exec delivery local all
- c:\opscode\chefdk\bin\chef.bat exec kitchen verify

deploy: off
deploy: false
23 changes: 0 additions & 23 deletions attributes/default.rb

This file was deleted.

51 changes: 51 additions & 0 deletions documentation/firefox_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# firefox_install

Installs Mozilla Firefox.

## Actions

| Action | Description |
| --- | --- |
| `:install` | Installs Firefox. This is the default action. |
| `:upgrade` | Upgrades Firefox when a previous version is already installed. |

## Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `version` | String | `'latest'` | Firefox version to install. On Linux, non-latest values are passed to the package manager. |
| `lang` | String | `'en-US'` | Firefox language to install. This applies to Windows and macOS downloads. |
| `package_name` | String | computed | Package name to install on Linux. Defaults to `firefox` except openSUSE without Mozilla repositories, where it defaults to `MozillaFirefox`. |
| `manage_repository` | true, false | `true` | Configures Mozilla APT repositories on Debian-family Linux before installing Firefox. RPM and SUSE platforms use distribution packages by default. |

## Examples

### Install Firefox

```ruby
firefox_install 'firefox'
```

### Install a specific package version

```ruby
firefox_install 'firefox' do
version '140.0.2'
end
```

### Use the distribution package repository

```ruby
firefox_install 'firefox' do
manage_repository false
end
```

### Upgrade Firefox

```ruby
firefox_install 'firefox' do
action :upgrade
end
```
Loading
Loading