Git Product home page Git Product logo

apettinen-recipes's Introduction

AutoPkg

Code style: black Tests passing

Latest release is here.

AutoPkg is an automation framework for macOS software packaging and distribution, oriented towards the tasks one would normally perform manually to prepare third-party software for mass deployment to managed clients.

These tasks typically involve at least several of the following steps:

  • downloading an application and/or updates for it, usually via a web browser
  • extracting them from a multitude of archive formats
  • adding site-specific configuration
  • adding sane versioning information
  • "fixing" poorly-written installer scripts
  • saving these modifications back to a compressed disk image or installer package
  • importing these into a software distribution system like Munki, Jamf Pro, FileWave, etc.
  • customizing the associated metadata for such a system with site-specific data, post-installation scripts, version info or other metadata

Often these tasks follow similar patterns for each individual application, and when managing many applications this becomes a daily task full of sub-tasks that one must remember (and/or maintain documentation for) about exactly what had to be done for a successful deployment of every update for every managed piece of software.

With AutoPkg, we define these steps in a "Recipe" file in plist or yaml format, run automatically instead of by hand, and shared with others.

Installation

Install the latest release.

AutoPkg requires macOS, and Git is highly recommended to have installed so that autopkg can use git to can manage recipe repositories. Knowledge of Git itself is not required.

AutoPkg is tested on the current macOS release. It may work on older releases, but is not actively tested on older releases.

Git can be installed via Apple's command-line developer tools package, which can be prompted for installation by simply typing 'git' in a Terminal window (OS X 10.9 or later).

Since AutoPkg 2.0, Python 2 is no longer supported. The installer linked above contains a bundled version of Python 3 and all needed dependencies.

Usage

A getting started guide is available here.

Frequently Asked Questions (and answers!) are here.

See the wiki for more documentation.

Discussion

Discussion of the use and development of AutoPkg is here.

apettinen-recipes's People

Contributors

apettinen avatar apizz avatar daz-wallace avatar erikng avatar fishd72 avatar gregneagle avatar homebysix avatar macmule avatar mlbz521 avatar rickheil avatar rtrouton avatar rustymyers avatar tim-fitzgerald avatar timsutton avatar xlonil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

apettinen-recipes's Issues

SSL Error with MSTeams.download.recipe

Error in com.github.apettinen.download.MSTeams: Processor: URLDownloader: Error: Curl failure: LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 (exit code 56)

MSTeamsURLProvider
{'Input': {}}
MSTeamsURLProvider: MSTeams URL found: https://statics.teams.microsoft.com/production-osx/1.1.00.5851/Teams_osx.dmg
{'Output': {'url': 'https://statics.teams.microsoft.com/production-osx/1.1.00.5851/Teams_osx.dmg'}}
URLDownloader
{'Input': {'url': 'https://statics.teams.microsoft.com/production-osx/1.1.00.5851/Teams_osx.dmg'}}
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
URLDownloader: No value supplied for CURL_PATH, setting default value of: /usr/bin/curl
Curl failure: LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 (exit code 56)
Failed.

macOS High Sierra 10.13.3
AutoPkg 1.0.4

git-lfs.pkg recipe installs things to "wrong" locations.

Currently the git-lfs.pkg recipe seems to just put the entire unzipped archive into /usr/local/bin:

$ pkgutil --payload-files git-lfs-amd64-3.2.0.pkg 
.
./usr
./usr/local
./usr/local/bin
./usr/local/bin/git-lfs
./usr/local/bin/git-lfs/git-lfs
./usr/local/bin/git-lfs/man
<snip>
./usr/local/bin/git-lfs/README.md

I'd expect the git-lfs binary at

./usr/local/bin/git-lfs

and the then the contents of the man/man1 and man/man5 directories installed under

./usr/local/man/man1
./usr/local/man/man5

etc.
As it is currently, git-lfs doesn't actually work post-install because it's installed to /usr/local/bin/git-lfs/git-lfs. And the man pages don't work, either.

Git LFS recipes broken due to upstream changes to macOS release packaging

As of v2.12.0 of git-lfs the packaging/release format for git-lfs has changed (See: https://github.com/git-lfs/git-lfs/releases/tag/v2.12.0) and this is causing the AutoPkg recipes to silently fail.

Specifically, the git-lfs maintainers have stopped packaging macOS releases as compressed .tar.gz archives and, instead, are now packaging them as .zip files. The reason for this change is due to Apple not allowing tarballs to be signed/notarized (but .zip files are) and more info about this change can be seen in the inciting PR here => git-lfs/git-lfs#4143

As you can see below, the most recent release that the AutoPkg recipe is picking up is the final release of git-lfs which was packaged as a tarball (and newer, more recent releases are being ignored):

$ autopkg run git-lfs.munki
Processing git-lfs.munki...

The following new items were downloaded:
    Download Path
    -------------
    /Users/Shared/autopkg/Cache/local.munki.git-lfs/downloads/git-lfs-amd64-2.11.0.tar.gz

The following packages were built:
    Identifier          Version  Pkg Path
    ----------          -------  --------
    com.github.git-lfs  2.11.0   /Users/Shared/autopkg/Cache/local.munki.git-lfs/git-lfs-amd64-2.11.0.pkg

No JSON object can be decoded

Hi,

I receive this error when I run the hugo.munki recipe after creating an override in Autopkgr

No JSON object can be decoded.

Any thoughts as other munki recipes work fine.

Brave browser GitHub releases broken; but does (now?) support appcast.xml

https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml

I have noted errors lately from AutoPkgr with messages like "Processor: GitHubReleasesInfoProvider: Error: No release assets were found that satisfy the criteria." While I did not got back in versions history of Brave, I do note that at least for v75.0.65.121 on a Mac test box, that it does have an SUFeedURL key in its Info.plist file pointing to the URL at the top of this message.

If I have a chance later today I will see if I can't submit a pull request. However, I am posting this here if anyone else wants to get on that more quickly.

Sparkl feed for Brave, how to verify?

How is it possible to verify that "bravesoftware.com" is actually an official domain associated with "brave.com"? The official download appear to all come from "brave.com".

Brave for ARM ?

Hey,

Is you recipe for Brave Apple Silicon ready ?
I means, is there a way to tell it to download arm dmg with detection of Apple Silicon hardware ?

Thanks :)

Terragrunt.pkg recipe doesn't deliver an executable file

The download from the Terragrunt repository is not set with an executable flag.

I can see the permissions being set on directories within your recipe but this doesn't seem to pass to the file being injected into the package, meaning the resulting file in /usr/local/bin isn't executable.

I'm looking into Jesse Petersons ModeChanger processor to change the permissions on the file, I will submit a PR if I can get it working.

Brave reporting: CodeSignatureVerifier: hdiutil imageinfo error hdiutil: imageinfo failed - image not recognised

The last week Brave.munki has been giving me these errors:

Processing local.munki.Brave...
URLDownloader
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Users/jonasb/Library/AutoPkg/Cache/local.munki.Brave/downloads/Brave.dmg
EndOfCheckPhase
CodeSignatureVerifier
CodeSignatureVerifier: hdiutil imageinfo error hdiutil: imageinfo failed - image not recognised
 with image /Users/jonasb/Library/AutoPkg/Cache/local.munki.Brave/downloads/Brave.dmg.
/Users/jonasb/Library/AutoPkg/Cache/local.munki.Brave/downloads/Brave.dmg is not mounted
Failed.
Receipt written to /Users/jonasb/Library/AutoPkg/Cache/local.munki.Brave/receipts/local.munki-receipt-20200922-131717.plist

The following recipes failed:
    local.munki.Brave
        Error in local.munki.Brave: Processor: CodeSignatureVerifier: Error: /Users/jonasb/Library/AutoPkg/Cache/local.munki.Brave/downloads/Brave.dmg is not mounted

Nothing downloaded, packaged or imported.

MSTeams Error during Run Recipe

Getting this error during Run Recipe

/Users/user/Library/AutoPkg/Cache/local.munki.MSTeams/downloads/Teams_osx.dmg failed: ERROR: hdiutil error nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
nx_kernel_mount:1359: : checkpoint search: largest xid 5, best xid 5 @ 1
with image /Users/user/Library/AutoPkg/Cache/local.munki.MSTeams/downloads/Teams_osx.dmg.
Could not mount /Users/user/Library/AutoPkg/Cache/local.munki.MSTeams/downloads/Teams_osx.dmg!

Any ideas?

URLDownloader: Error: Curl failure: LibreSSL SSL_read

There is something wrong with the MSTeams.download recipe. When i try to autopkg run -v MSTeams.download i get the following error:

The following recipes failed: MSTeams.download Error in com.github.apettinen.download.MSTeams: Processor: URLDownloader: Error: Curl failure: LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 (exit code 56)

1Password_CLI is now .pkg and not .zip

The 1Password_CLI set of recipes are currently broken somewhat - in that they return an out of date version of the tool. This is because when the recipes were written they were matching for .zip downloads, 1PW have changed this to be .pkg for newer releases.

I have made a PR here:

#25

MSTeams recipe to support the new MS Teams

As Microsoft has launched the new, non-electron based Teams.app, the current MSTeams recipe requires some changes. Most notably, the MSTeamsURLProvider.py likely becomes obsolete for Mac, as Microsoft provides a static download URL on their Teams webpage, see https://www.microsoft.com/en-us/microsoft-teams/download-app -> Download new teams.

However, Windows seemingly does not have a static download link. Therefore, removing the MSTeamsURLProvider might be a breaking change.

Thus we have two options:

  1. Make the the current recipe MS Teams Classic (breaking change too) and create a new one
  2. Extend the MSTeamsURLProvider so that it will always offer the static download link for macOS. This is fairly simple change to do, plus additionally the code could be updated a bit (to be more Python3, for example).

Any comments on this, anyone?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.