************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-17297080
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
FileRepo:
Fixed crashing issue for unmounting.
iconutils:
removed unused import
Repo:
Simplified plugins selection based on plugins option.
Couldn’t reproduce the case where pkginfo failed to open in the textEditor. For me, the pkginfo always opened up in sublime (my pref setting for textedit or) Could you check to see if it is still happening with your repo? Thanks.
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-17297080
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
FileRepo:
Move FileRepo to munkilib/plugins/
Repo:
Change plugins location for FileRepo
munkiimport:
Change plugins location for FileRepo in configure.
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-17297080
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
FileRepo:
Changed FileRepo class definition to not be old-style class
iconutils:
Deleted pkg_path join since passing in file anyways
munkiimport:
for --configure option, changed for relative paths support from same directory
Repo:
Changed for relative paths support from same directory
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-16492427
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
makecatalogs:
removed debugging print statements
manifestutil:
check if repo is initialized before checking if it is mounted
munkiimport:
check if repo is initialized before checking if it is mounted
for def add_icon_hash_to_pkginfo(pkginfo):, not opening file (icon_path) anymore
WE_MOUNTED_THE_REPO is a repo attribute now, instead of a global variable
FileRepo:
removed duplicate/unused imports
changed class to not be old-style
updated glob method since pkgs was uninitialized
made WE_MOUNTED_THE_REPO from global variable to FileRepo attribute variable initialized to False
iconimporter:
updated Repo call to include 3 parameters now..
changed old find_items_to_check calls to new call: findItemsToCheck
Repo.py
Added support for relative paths for importing plugins
************************************************************************************************************************************************************************************
Commit based on comments by Greg Neagle on what to fix: munki#685 (master...ryanyu91:master)
IconImporter:
Not opening DMG and then mounting it anymore, directly mounting like how it was before
ManifestUtil:
Checking if the repo is mounted as well as if we (munki) mounted it. Only this will display prompt whether we want to unmount or not
FileRepo.py, Repo.py:
not hardcoding import path anymore
FileRepo - added 10.12 mounting fileshares code
************************************************************************************************************************************************************************************
Changed Files:
code/client/munkiimport
code/client/iconimporter
code/client/makecatalogs
code/client/manifestutil
code/client/munkilib/iconutils.py
Added Files:
code/client/munkilib/FileRepo.py
code/client/munkilib/Repo.py
Reason For Changes:
The purpose for this change is to enable plugins to munki that will allow writes to the munki repo to be customized.
Changes:
The methods used to write to the munki repo are the target of this modification. A plugin can create new methods for overwriting the default behavior of writing to the munki repo.
The default behavior is retained in the absence of a plugin. This is accomplished via the introduction of FileRepo.py which continues to simply write changes to the munki repo. A plugin can be introduced to change this default behavior and allow munki repo writes to be redirected as desired by the plugin author.
In order to accomplish this we have refactored all of the os.path.* methods, as well as the mount, unmount and available methods from the following tools: (iconimporter, makecatalogs, munkiimport, manifestutil, iconutils), and put them into a different python script to be used as a library or common code module. By default, these are now in the FileRepo.py module. The plugin can be used to overwrite this common code module.
In addition to the above described changes, we also made the following changes to support this plugin
concept:
• Added the ability to add a plugin either via the command line or via munkiimport –configure
• The code will look for custom plugins in the /usr/local/munki/munkilib/plugins/ directory
• If plugin is found in the plugins directory, munkiimport --configure will give the option to type in the plugin name. For example, if you plugin is Foo.py, you could specify a plugin name of Foo in munkiimport --configure
• If no plugin is found the FileRepo.py module will be used as the default common code module for writing to the munki repo
• Add the ability to set the plugin via the --plugin option for the following tools (makecatalogs, munkiimport, manifestutil)
Testing
Tested with munkiimport on local filesystem/network shares/our own custom plugins
Tested manifestutil on local filesystem/network
Verified through regression testing, all features of munkiimport, makecatalogs, iconimporter, manifestutil from before all still work (local filesystem/network shares)
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-17297080
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
FileRepo:
Move FileRepo to munkilib/plugins/
Repo:
Change plugins location for FileRepo
munkiimport:
Change plugins location for FileRepo in configure.
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-17297080
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
FileRepo:
Changed FileRepo class definition to not be old-style class
iconutils:
Deleted pkg_path join since passing in file anyways
munkiimport:
for --configure option, changed for relative paths support from same directory
Repo:
Changed for relative paths support from same directory
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-16492427
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
makecatalogs:
removed debugging print statements
manifestutil:
check if repo is initialized before checking if it is mounted
munkiimport:
check if repo is initialized before checking if it is mounted
for def add_icon_hash_to_pkginfo(pkginfo):, not opening file (icon_path) anymore
WE_MOUNTED_THE_REPO is a repo attribute now, instead of a global variable
FileRepo:
removed duplicate/unused imports
changed class to not be old-style
updated glob method since pkgs was uninitialized
made WE_MOUNTED_THE_REPO from global variable to FileRepo attribute variable initialized to False
iconimporter:
updated Repo call to include 3 parameters now..
changed old find_items_to_check calls to new call: findItemsToCheck
Repo.py
Added support for relative paths for importing plugins
************************************************************************************************************************************************************************************
Commit based on comments by Greg Neagle on what to fix: munki#685 (master...ryanyu91:master)
IconImporter:
Not opening DMG and then mounting it anymore, directly mounting like how it was before
ManifestUtil:
Checking if the repo is mounted as well as if we (munki) mounted it. Only this will display prompt whether we want to unmount or not
FileRepo.py, Repo.py:
not hardcoding import path anymore
FileRepo - added 10.12 mounting fileshares code
************************************************************************************************************************************************************************************
Changed Files:
code/client/munkiimport
code/client/iconimporter
code/client/makecatalogs
code/client/manifestutil
code/client/munkilib/iconutils.py
Added Files:
code/client/munkilib/FileRepo.py
code/client/munkilib/Repo.py
Reason For Changes:
The purpose for this change is to enable plugins to munki that will allow writes to the munki repo to be customized.
Changes:
The methods used to write to the munki repo are the target of this modification. A plugin can create new methods for overwriting the default behavior of writing to the munki repo.
The default behavior is retained in the absence of a plugin. This is accomplished via the introduction of FileRepo.py which continues to simply write changes to the munki repo. A plugin can be introduced to change this default behavior and allow munki repo writes to be redirected as desired by the plugin author.
In order to accomplish this we have refactored all of the os.path.* methods, as well as the mount, unmount and available methods from the following tools: (iconimporter, makecatalogs, munkiimport, manifestutil, iconutils), and put them into a different python script to be used as a library or common code module. By default, these are now in the FileRepo.py module. The plugin can be used to overwrite this common code module.
In addition to the above described changes, we also made the following changes to support this plugin
concept:
• Added the ability to add a plugin either via the command line or via munkiimport –configure
• The code will look for custom plugins in the /usr/local/munki/munkilib/plugins/ directory
• If plugin is found in the plugins directory, munkiimport --configure will give the option to type in the plugin name. For example, if you plugin is Foo.py, you could specify a plugin name of Foo in munkiimport --configure
• If no plugin is found the FileRepo.py module will be used as the default common code module for writing to the munki repo
• Add the ability to set the plugin via the --plugin option for the following tools (makecatalogs, munkiimport, manifestutil)
Testing
Tested with munkiimport on local filesystem/network shares/our own custom plugins
Tested manifestutil on local filesystem/network
Verified through regression testing, all features of munkiimport, makecatalogs, iconimporter, manifestutil from before all still work (local filesystem/network shares)
NEW CHANGES
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-17297080
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
FileRepo:
Changed FileRepo class definition to not be old-style class
iconutils:
Deleted pkg_path join since passing in file anyways
munkiimport:
for --configure option, changed for relative paths support from same directory
Repo:
Changed for relative paths support from same directory
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-16492427
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
makecatalogs:
removed debugging print statements
manifestutil:
check if repo is initialized before checking if it is mounted
munkiimport:
check if repo is initialized before checking if it is mounted
for def add_icon_hash_to_pkginfo(pkginfo):, not opening file (icon_path) anymore
WE_MOUNTED_THE_REPO is a repo attribute now, instead of a global variable
FileRepo:
removed duplicate/unused imports
changed class to not be old-style
updated glob method since pkgs was uninitialized
made WE_MOUNTED_THE_REPO from global variable to FileRepo attribute variable initialized to False
iconimporter:
updated Repo call to include 3 parameters now..
changed old find_items_to_check calls to new call: findItemsToCheck
Repo.py
Added support for relative paths for importing plugins
************************************************************************************************************************************************************************************
Commit based on comments by Greg Neagle on what to fix: munki#685 (master...ryanyu91:master)
IconImporter:
Not opening DMG and then mounting it anymore, directly mounting like how it was before
ManifestUtil:
Checking if the repo is mounted as well as if we (munki) mounted it. Only this will display prompt whether we want to unmount or not
FileRepo.py, Repo.py:
not hardcoding import path anymore
FileRepo - added 10.12 mounting fileshares code
************************************************************************************************************************************************************************************
Changed Files:
code/client/munkiimport
code/client/iconimporter
code/client/makecatalogs
code/client/manifestutil
code/client/munkilib/iconutils.py
Added Files:
code/client/munkilib/FileRepo.py
code/client/munkilib/Repo.py
Reason For Changes:
The purpose for this change is to enable plugins to munki that will allow writes to the munki repo to be customized.
Changes:
The methods used to write to the munki repo are the target of this modification. A plugin can create new methods for overwriting the default behavior of writing to the munki repo.
The default behavior is retained in the absence of a plugin. This is accomplished via the introduction of FileRepo.py which continues to simply write changes to the munki repo. A plugin can be introduced to change this default behavior and allow munki repo writes to be redirected as desired by the plugin author.
In order to accomplish this we have refactored all of the os.path.* methods, as well as the mount, unmount and available methods from the following tools: (iconimporter, makecatalogs, munkiimport, manifestutil, iconutils), and put them into a different python script to be used as a library or common code module. By default, these are now in the FileRepo.py module. The plugin can be used to overwrite this common code module.
In addition to the above described changes, we also made the following changes to support this plugin
concept:
• Added the ability to add a plugin either via the command line or via munkiimport –configure
• The code will look for custom plugins in the /usr/local/munki/munkilib/plugins/ directory
• If plugin is found in the plugins directory, munkiimport --configure will give the option to type in the plugin name. For example, if you plugin is Foo.py, you could specify a plugin name of Foo in munkiimport --configure
• If no plugin is found the FileRepo.py module will be used as the default common code module for writing to the munki repo
• Add the ability to set the plugin via the --plugin option for the following tools (makecatalogs, munkiimport, manifestutil)
Testing
Tested with munkiimport on local filesystem/network shares/our own custom plugins
Tested manifestutil on local filesystem/network
Verified through regression testing, all features of munkiimport, makecatalogs, iconimporter, manifestutil from before all still work (local filesystem/network shares)
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-16492427
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
makecatalogs:
removed debugging print statements
manifestutil:
check if repo is initialized before checking if it is mounted
munkiimport:
check if repo is initialized before checking if it is mounted
for def add_icon_hash_to_pkginfo(pkginfo):, not opening file (icon_path) anymore
WE_MOUNTED_THE_REPO is a repo attribute now, instead of a global variable
FileRepo:
removed duplicate/unused imports
changed class to not be old-style
updated glob method since pkgs was uninitialized
made WE_MOUNTED_THE_REPO from global variable to FileRepo attribute variable initialized to False
iconimporter:
updated Repo call to include 3 parameters now..
changed old find_items_to_check calls to new call: findItemsToCheck
Repo.py
Added support for relative paths for importing plugins
************************************************************************************************************************************************************************************
Commit based on comments by Greg Neagle on what to fix: munki#685 (master...ryanyu91:master)
IconImporter:
Not opening DMG and then mounting it anymore, directly mounting like how it was before
ManifestUtil:
Checking if the repo is mounted as well as if we (munki) mounted it. Only this will display prompt whether we want to unmount or not
FileRepo.py, Repo.py:
not hardcoding import path anymore
FileRepo - added 10.12 mounting fileshares code
************************************************************************************************************************************************************************************
Changed Files:
code/client/munkiimport
code/client/iconimporter
code/client/makecatalogs
code/client/manifestutil
code/client/munkilib/iconutils.py
Added Files:
code/client/munkilib/FileRepo.py
code/client/munkilib/Repo.py
Reason For Changes:
The purpose for this change is to enable plugins to munki that will allow writes to the munki repo to be customized.
Changes:
The methods used to write to the munki repo are the target of this modification. A plugin can create new methods for overwriting the default behavior of writing to the munki repo.
The default behavior is retained in the absence of a plugin. This is accomplished via the introduction of FileRepo.py which continues to simply write changes to the munki repo. A plugin can be introduced to change this default behavior and allow munki repo writes to be redirected as desired by the plugin author.
In order to accomplish this we have refactored all of the os.path.* methods, as well as the mount, unmount and available methods from the following tools: (iconimporter, makecatalogs, munkiimport, manifestutil, iconutils), and put them into a different python script to be used as a library or common code module. By default, these are now in the FileRepo.py module. The plugin can be used to overwrite this common code module.
In addition to the above described changes, we also made the following changes to support this plugin
concept:
• Added the ability to add a plugin either via the command line or via munkiimport –configure
• The code will look for custom plugins in the /usr/local/munki/munkilib/plugins/ directory
• If plugin is found in the plugins directory, munkiimport --configure will give the option to type in the plugin name. For example, if you plugin is Foo.py, you could specify a plugin name of Foo in munkiimport --configure
• If no plugin is found the FileRepo.py module will be used as the default common code module for writing to the munki repo
• Add the ability to set the plugin via the --plugin option for the following tools (makecatalogs, munkiimport, manifestutil)
Testing
Tested with munkiimport on local filesystem/network shares/our own custom plugins
Tested manifestutil on local filesystem/network
Verified through regression testing, all features of munkiimport, makecatalogs, iconimporter, manifestutil from before all still work (local filesystem/network shares)
************************************************************************************************************************************************************************************
https://github.com/munki/munki/pull/689#pullrequestreview-16492427
Commit based on comments by Greg Neagle on what to fix: munki#689 (master...ryanyu91:master)
makecatalogs:
removed debugging print statements
manifestutil:
check if repo is initialized before checking if it is mounted
munkiimport:
check if repo is initialized before checking if it is mounted
for def add_icon_hash_to_pkginfo(pkginfo):, not opening file (icon_path) anymore
WE_MOUNTED_THE_REPO is a repo attribute now, instead of a global variable
FileRepo:
removed duplicate/unused imports
changed class to not be old-style
updated glob method since pkgs was uninitialized
made WE_MOUNTED_THE_REPO from global variable to FileRepo attribute variable initialized to False
iconimporter:
updated Repo call to include 3 parameters now..
changed old find_items_to_check calls to new call: findItemsToCheck
Repo.py
Added support for relative paths for importing plugins
************************************************************************************************************************************************************************************
Commit based on comments by Greg Neagle on what to fix: munki#685 (master...ryanyu91:master)
IconImporter:
Not opening DMG and then mounting it anymore, directly mounting like how it was before
ManifestUtil:
Checking if the repo is mounted as well as if we (munki) mounted it. Only this will display prompt whether we want to unmount or not
FileRepo.py, Repo.py:
not hardcoding import path anymore
FileRepo - added 10.12 mounting fileshares code
************************************************************************************************************************************************************************************
Changed Files:
code/client/munkiimport
code/client/iconimporter
code/client/makecatalogs
code/client/manifestutil
code/client/munkilib/iconutils.py
Added Files:
code/client/munkilib/FileRepo.py
code/client/munkilib/Repo.py
Reason For Changes:
The purpose for this change is to enable plugins to munki that will allow writes to the munki repo to be customized.
Changes:
The methods used to write to the munki repo are the target of this modification. A plugin can create new methods for overwriting the default behavior of writing to the munki repo.
The default behavior is retained in the absence of a plugin. This is accomplished via the introduction of FileRepo.py which continues to simply write changes to the munki repo. A plugin can be introduced to change this default behavior and allow munki repo writes to be redirected as desired by the plugin author.
In order to accomplish this we have refactored all of the os.path.* methods, as well as the mount, unmount and available methods from the following tools: (iconimporter, makecatalogs, munkiimport, manifestutil, iconutils), and put them into a different python script to be used as a library or common code module. By default, these are now in the FileRepo.py module. The plugin can be used to overwrite this common code module.
In addition to the above described changes, we also made the following changes to support this plugin
concept:
• Added the ability to add a plugin either via the command line or via munkiimport –configure
• The code will look for custom plugins in the /usr/local/munki/munkilib/plugins/ directory
• If plugin is found in the plugins directory, munkiimport --configure will give the option to type in the plugin name. For example, if you plugin is Foo.py, you could specify a plugin name of Foo in munkiimport --configure
• If no plugin is found the FileRepo.py module will be used as the default common code module for writing to the munki repo
• Add the ability to set the plugin via the --plugin option for the following tools (makecatalogs, munkiimport, manifestutil)
Testing
Tested with munkiimport on local filesystem/network shares/our own custom plugins
Tested manifestutil on local filesystem/network
Verified through regression testing, all features of munkiimport, makecatalogs, iconimporter, manifestutil from before all still work (local filesystem/network shares)