2.0b3
版本发布时间: 2019-11-26 01:05:37
autopkg/autopkg最新发布版本:v3.0.0RC2(2023-09-26 00:05:31)
PYTHON 3 ONLY RELEASE
This is the second beta release of a Python 3-only version of AutoPkg. It is no longer compatible with Python 2, and will encounter syntax errors and failures if run with Python 2.
The release package has an included Python 3 framework that includes all necessary modules to run everything in AutoPkg core, and all of the recipes in autopkg-recipes.
This release also coincides with the most recent commit to autopkg/recipes, so both change notes will be provided here.
CHANGES FROM BETA 2:
- Thanks to @MichalMMac's heroic efforts, URLGetter is now much easier for other processors to use. There are now two ways a custom processor can download things without needing to write any
urllib
logic:-
URLGetter.download_with_curl(curl_command, text=True)
takes a curl command as an argument (a list of strings that is passed to subprocess). You can use this along with the other helper functions to arrange your own curl command with custom headers and arguments, and parse the output. -
URLGetter.download(url, headers=None, text=False)
takes a URL (and optional headers) and returns the output of the curl command. You can use this to simply retrieve the results of requesting a web page (such as for URLTextSearcher). *In both cases, you can passtext
mode to determine if you get straight text output.
-
- All custom processors that need to make a web request of any kind in autopkg/recipes have been switched to using URLGetter's methods. No more urllib in processors!
- Some minor formatting changes in the code itself
CHANGES FROM BETA 1:
- The new URLGetter base Processor class has been merged in. It provides a new centralized way to handle fetching and downloading things from the web. In the future, more convenience functions will be added to allow any custom processor to easily fetch web resources without having to write their own urllib/web-handling code.
- Failing to import a processor due to a Python syntax error (such as due to py2 vs. py3 imports) now has a more specific and clear error message (e52ae69)
- Many, many, many bytes vs. string issues resolved in core processors
- Copier now has a unit test, and produces some more useful output
- autopkgserver shouldn't complain about socket descriptors anymore
- isort now has a seed config that explicitly lists certain third party modules so that they're sorted at the top or bottom of import blocks correctly
- All custom processors in autopkg-recipes now use certifi to set the base SSL certs so that urllib web requests work; this will be removed in the future once URLGetter's convenience functions are written
CHANGES IN INITIAL 2.0 RELEASE:
- FoundationPlist has been retired. plistlib in Python 3 should be used to handle all plist parsing.
- All Python string interpolation should prefer the use of f-strings (formatted string literals).
- All references to unicode vs. string types have been refactored to use Python 3's native byte strings whenever possible.
- All unit tests were updated to Python 3.
- All Python code now use a hardcoded path to the embedded Python framework. This path may change at a later time to incorporate a symlink, for easier cross-platform compatibility.
KNOWN ISSUES:
- There are likely still edge cases in the autopkg/recipes that slipped through testing, so please file issues if you find recipes that don't work as intended.
HOW TO USE THIS BETA RELEASE:
Installing the release package will get you everything you need to run AutoPkg 2.0.
As of this release, all recipes in autopkg/recipes work directly (with commit https://github.com/autopkg/recipes/commit/25518b9b761f943d4c567fcb0944561b32ca3b89).
You will need to update your trust info as many custom processors have changed:
autopkg update-trust-info Firefox.munki
autopkg update-trust-info MakeCatalogs.munki
autopkg run -vv Firefox.munki MakeCatalogs.munki
HOW TO REPORT ISSUES: Use the "Beta Bug report" GitHub issue template to specifically label the issue as being beta only. Please make use of the template to convey all information possible in order to reproduce or diagnose the issue as clearly as possible.
SETTING UP AUTOPKG MANUALLY: If you do not want to use the AutoPkg release installer, you can manually set up an AutoPkg 2.0 environment. Setup and place the AutoPkg files as you normally would:
- Create /Library/AutoPkg/
- Copy the contents of Code into /Library/AutoPkg/
- Ensure correct file modes for the autopkgserver components:
sudo chmod -R 755 /Library/AutoPkg/autopkgserver/
Build a relocatable python bundle:
- Use the CONTRIBUTING guide's instructions on building a relocatable python bundle that uses the requirements.txt file for pip
- Move/copy the bundle into /Library/AutoPkg/Python3/Python.framework
1、 autopkg-2.0b3.pkg 28.32MB