Skip to content

Apache Ant & Maven Recipes are failing on PkgCreator recipe #137

@MLBZ521

Description

@MLBZ521

Hey @n8felton, went to use the Ant recipe today and after created a .jss recipe, I realized it didn't work.

After checking, both the Ant and Maven .pkg recipes fail on the PkgCreator step. Seems they're both failing to find the symlinks that are created in the previous steps:

Ant:

PkgCreator
{'Input': {'pkg_request': {'chown': [{'group': 'wheel',
                                      'mode': '0755',
                                      'path': 'usr',
                                      'user': 'root'}],
                           'id': 'org.apache.ant',
                           'pkgdir': '/Users/<user>/Library/AutoPkg/Cache/com.github.n8felton.pkg.Ant',
                           'pkgname': 'Ant-1.10.9',
                           'pkgroot': '/Users/<user>/Library/AutoPkg/Cache/com.github.n8felton.pkg.Ant/payload',
                           'pkgtype': 'flat',
                           'version': '1.10.9'}}}
PkgCreator: Connecting
PkgCreator: Sending packaging request
PkgCreator: Disconnecting
PkgCreator: Failed to close socket: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 658, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 465, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/PkgCreator.py", line 269, in main
    self.package()
  File "/Library/AutoPkg/autopkglib/PkgCreator.py", line 223, in package
    pkg_path = self.send_request(request)
  File "/Library/AutoPkg/autopkglib/PkgCreator.py", line 258, in send_request
    raise ProcessorError(", ".join([s.replace("ERROR:", "") for s in errors]))
autopkglib.ProcessorError: Can't lchown /tmp/tmpvgk040r0/payload/usr/local/ant: [Errno 2] No such file or directory: '/tmp/tmpvgk040r0/payload/usr/local/ant'
  File "/Library/AutoPkg/autopkglib/__init__.py", line 658, in process
    self.env = processor.process()
Can't lchown /tmp/tmpvgk040r0/payload/usr/local/ant: [Errno 2] No such file or directory: '/tmp/tmpvgk040r0/payload/usr/local/ant'
Failed.
Receipt written to /Users/<user>/Library/AutoPkg/Cache/com.github.n8felton.pkg.Ant/receipts/com.github.n8felton.pkg-receipt-20210217-172829.plist

The following recipes failed:
    com.github.n8felton.pkg.Ant
        Error in com.github.n8felton.pkg.Ant: Processor: PkgCreator: Error: Can't lchown /tmp/tmpvgk040r0/payload/usr/local/ant: [Errno 2] No such file or directory: '/tmp/tmpvgk040r0/payload/usr/local/ant'

Maven

PkgCreator
{'Input': {'pkg_request': {'chown': [{'group': 'wheel',
                                      'mode': '0755',
                                      'path': 'usr',
                                      'user': 'root'}],
                           'id': 'org.apache.maven',
                           'pkgdir': '/Users/<user>/Library/AutoPkg/Cache/com.github.n8felton.pkg.Maven',
                           'pkgname': 'Maven-3.6.3',
                           'pkgroot': '/Users/<user>/Library/AutoPkg/Cache/com.github.n8felton.pkg.Maven/payload',
                           'pkgtype': 'flat',
                           'version': '3.6.3'}}}
PkgCreator: Connecting
PkgCreator: Sending packaging request
PkgCreator: Disconnecting
PkgCreator: Failed to close socket: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 658, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 465, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/PkgCreator.py", line 269, in main
    self.package()
  File "/Library/AutoPkg/autopkglib/PkgCreator.py", line 223, in package
    pkg_path = self.send_request(request)
  File "/Library/AutoPkg/autopkglib/PkgCreator.py", line 258, in send_request
    raise ProcessorError(", ".join([s.replace("ERROR:", "") for s in errors]))
autopkglib.ProcessorError: Can't lchown /tmp/tmp26xo4mhx/payload/usr/local/maven: [Errno 2] No such file or directory: '/tmp/tmp26xo4mhx/payload/usr/local/maven'
  File "/Library/AutoPkg/autopkglib/__init__.py", line 658, in process
    self.env = processor.process()
Can't lchown /tmp/tmp26xo4mhx/payload/usr/local/maven: [Errno 2] No such file or directory: '/tmp/tmp26xo4mhx/payload/usr/local/maven'
Failed.
Receipt written to /Users/<user>/Library/AutoPkg/Cache/com.github.n8felton.pkg.Maven/receipts/com.github.n8felton.pkg-receipt-20210217-174212.plist

The following recipes failed:
    com.github.n8felton.pkg.Maven
        Error in com.github.n8felton.pkg.Maven: Processor: PkgCreator: Error: Can't lchown /tmp/tmp26xo4mhx/payload/usr/local/maven: [Errno 2] No such file or directory: '/tmp/tmp26xo4mhx/payload/usr/local/maven'

If I remove the Symlinker steps, the .pkg successfully completes.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions