GithubHelp home page GithubHelp logo

brew-pkg's Introduction

brew-pkg

brew-pkg is a Homebrew external command that builds an OS X installer package from a formula. The formula must first already be installed on the system.

Usage

Assuming nginx is already installed:

brew pkg nginx

==> Creating package staging root using Homebrew prefix /usr/local
==> Staging formula nginx
==> Plist found at homebrew.mxcl.nginx, staging for /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
==> Building package nginx-1.2.6.pkg

It can also automatically include the formula's dependencies:

brew pkg --with-deps --without-kegs ffmpeg

==> Creating package staging root using Homebrew prefix /usr/local
==> Staging formula ffmpeg
==> Staging formula pkg-config
==> Staging formula texi2html
==> Staging formula yasm
==> Staging formula x264
==> Staging formula faac
==> Staging formula lame
==> Staging formula xvid
==> Building package ffmpeg-1.1.pkg

By default behaviour brew pkg include all package kegs located in /usr/local/Cellar/packagename. If you need to exclude it, specify option --without-kegs

Installing it

brew-pkg is available from my formulae tap. Add the tap:

brew tap timsutton/formulae

Then install as any other formula:

brew install brew-pkg

Extras

If a formula has defined a launchd plist, brew-pkg will also install this to the package's root in /Library/LaunchDaemons.

You can also define a custom identifier prefix in the reverse-domain convention with the --identifier-prefix option, ie. brew pkg --identifier-prefix org.nagios nrpe. If there is a launchd plist defined, this same prefix is currently not applied to the plist.

You can set the path to custom preinstall and postinstall scripts with the --scripts option which is just literally passed through to the pkgbuild command.
For more information refer to man pkgbuild which explains that --scripts scripts_path archive the entire contents of scripts-path as the package scripts. If this directory contains scripts named preinstall and/or postinstall, these will be run as the top-level scripts of the package [...].

License

brew-pkg is MIT-licensed.

brew-pkg's People

Contributors

antifuchs avatar fireping32 avatar garnierclement avatar izmal avatar jaknz avatar kaloprominat avatar timsutton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brew-pkg's Issues

[BUG] Error: undefined method `exists?' for class File

After upgrading Homebrew to 4.3.5-32-g7865cc5, this error is thrown

Error: undefined method `exists?' for class File
/usr/local/bin/brew-pkg.rb:74:in `block in pkg'
/usr/local/bin/brew-pkg.rb:65:in `each'
/usr/local/bin/brew-pkg.rb:65:in `pkg'
/usr/local/bin/brew-pkg.rb:162:in `<top (required)>'
<internal:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/usr/local/Homebrew/Library/Homebrew/extend/kernel.rb:10:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:97:in `<main>'

"Calling bottle "unneeded is deprecated!" when tapping formulae

When installing brew-pkg, I got this message on Terminal:

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the timsutton/formulae tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/timsutton/homebrew-formulae/pngout.rb:7

Couldnt see an issue previously reported / closed & its more for visibility than show stopping.

Missing or wrong installation of dependencies

I'm trying to build a package for ClamAV. Here is what I do for building:

$ brew pkg --with-deps clamav
==> Creating package staging root using Homebrew prefix /usr/local
==> Staging formula clamav
==> Staging directory /usr/local/Cellar/clamav/0.103.0
==> Staging formula pkg-config
==> Staging directory /usr/local/Cellar/pkg-config/0.29.2_3
==> Staging formula gdbm
==> Staging directory /usr/local/Cellar/gdbm/1.18.1_1
==> Staging formula [email protected]
==> Staging formula readline
==> Staging directory /usr/local/Cellar/readline/8.0.4
==> Staging formula sqlite
==> Staging directory /usr/local/Cellar/sqlite/3.33.0
==> Staging formula xz
==> Staging directory /usr/local/Cellar/xz/5.2.5
==> Staging formula [email protected]
==> Staging formula sphinx-doc
==> Staging formula cmake
==> Staging formula json-c
==> Staging directory /usr/local/Cellar/json-c/0.15
==> Staging formula libiconv
==> Staging directory /usr/local/Cellar/libiconv/1.16
==> Staging formula libtool
==> Staging directory /usr/local/Cellar/libtool/2.4.6_2
==> Staging formula pcre2
==> Staging directory /usr/local/Cellar/pcre2/10.35
==> Staging formula autoconf
==> Staging directory /usr/local/Cellar/autoconf/2.69
==> Staging formula automake
==> Staging directory /usr/local/Cellar/automake/1.16.2_1
==> Staging formula jansson
==> Staging directory /usr/local/Cellar/jansson/2.13.1
==> Staging formula libmagic
==> Staging directory /usr/local/Cellar/libmagic/5.39
==> Staging formula protobuf
==> Staging formula protobuf-c
==> Staging directory /usr/local/Cellar/protobuf-c/1.3.3_2
==> Staging formula yara
==> Staging directory /usr/local/Cellar/yara/4.0.2
==> Building package clamav-0.103.0.pkg

But those are the results after running ClamAV:

$ clamdscan    
dyld: Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib
  Referenced from: /usr/local/bin/clamdscan
  Reason: image not found
zsh: abort      clamdscan

I tried it on a fresh macOS 10.15 virtual image. If I install it using brew install clamav, it works as expected:

$ brew install clamav
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 1 formula.

==> Downloading https://homebrew.bintray.com/bottles/json-c-0.15.catalina.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/libiconv-1.16.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/24d81638fcd7416a56c3dbdac7e2265d7b0476b17a71b631045425380122e6b
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_2.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/af317b35d0a394b7ef55fba4950735b0392d9f31bececebf9c412261c23a01f
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/openssl%401.1-1.1.1h.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/4e5357c0cfd55cfa4ef0b632c6fc9f49d39337dd070dc12d3c862e28bd28f07
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/pcre2-10.35.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/6a1e59a5db23d684f92d2bf695601d1b466f3e9d5407f704ba4679d885d13ce
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/jansson-2.13.1.catalina.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/libmagic-5.39.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/90b17cb74e853804227abdd32c6810ff535fb98e8862f946c49860b697faece
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/protobuf-3.13.0_1.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/10df8a94c8077b4d2578e4db9410b586b865e4299cd6e7199993ca1c5a88af9
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/protobuf-c-1.3.3_2.catalina.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/yara-4.0.2.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/e0a9565366bfa84e65ebc338c7862848aac15345570433c632311c5e0c1b781
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/clamav-0.103.0.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/223f07db86b0ed0e4e51db8d634111bb842dcc49c01df6dbe5dedcf46e786e4
######################################################################## 100.0%
==> Installing dependencies for clamav: json-c, libiconv, libtool, [email protected], pcre2, jansson, libmagic, protobuf, protobuf-c and yara
==> Installing clamav dependency: json-c
==> Pouring json-c-0.15.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/json-c/0.15: 32 files, 276.9KB
==> Installing clamav dependency: libiconv
==> Pouring libiconv-1.16.catalina.bottle.tar.gz
==> Caveats
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libiconv first in your PATH run:
  echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.zshrc

For compilers to find libiconv you may need to set:
  export LDFLAGS="-L/usr/local/opt/libiconv/lib"
  export CPPFLAGS="-I/usr/local/opt/libiconv/include"

==> Summary
๐Ÿบ  /usr/local/Cellar/libiconv/1.16: 30 files, 2.4MB
==> Installing clamav dependency: libtool
==> Pouring libtool-2.4.6_2.catalina.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
๐Ÿบ  /usr/local/Cellar/libtool/2.4.6_2: 71 files, 3.7MB
==> Installing clamav dependency: [email protected]
==> Pouring [email protected]
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/[email protected]/certs

and run
  /usr/local/opt/[email protected]/bin/c_rehash

[email protected] is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

==> Summary
๐Ÿบ  /usr/local/Cellar/[email protected]/1.1.1h: 8,067 files, 18.5MB
==> Installing clamav dependency: pcre2
==> Pouring pcre2-10.35.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/pcre2/10.35: 230 files, 6.0MB
==> Installing clamav dependency: jansson
==> Pouring jansson-2.13.1.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/jansson/2.13.1: 11 files, 169KB
==> Installing clamav dependency: libmagic
==> Pouring libmagic-5.39.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/libmagic/5.39: 330 files, 7.9MB
==> Installing clamav dependency: protobuf
==> Pouring protobuf-3.13.0_1.catalina.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/protobuf
==> Summary
๐Ÿบ  /usr/local/Cellar/protobuf/3.13.0_1: 266 files, 19.8MB
==> Installing clamav dependency: protobuf-c
==> Pouring protobuf-c-1.3.3_2.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/protobuf-c/1.3.3_2: 14 files, 303.3KB
==> Installing clamav dependency: yara
==> Pouring yara-4.0.2.catalina.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/yara/4.0.2: 46 files, 1.5MB
==> Installing clamav
==> Pouring clamav-0.103.0.catalina.bottle.tar.gz
==> Caveats
To finish installation & run clamav you will need to edit
the example conf files at /usr/local/etc/clamav/
==> Summary
๐Ÿบ  /usr/local/Cellar/clamav/0.103.0: 57 files, 4.0MB
==> Caveats
==> libiconv
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libiconv first in your PATH run:
  echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.zshrc

For compilers to find libiconv you may need to set:
  export LDFLAGS="-L/usr/local/opt/libiconv/lib"
  export CPPFLAGS="-I/usr/local/opt/libiconv/include"

==> libtool
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> [email protected]
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/[email protected]/certs

and run
  /usr/local/opt/[email protected]/bin/c_rehash

[email protected] is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

==> protobuf
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/protobuf
==> clamav
To finish installation & run clamav you will need to edit
the example conf files at /usr/local/etc/clamav/
$ clamscan
----------- SCAN SUMMARY -----------
Known viruses: 0
Engine version: 0.103.0
Scanned directories: 0
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 0.438 sec (0 m 0 s)
Start Date: 2020:11:12 05:18:05
End Date:   2020:11:12 05:18:06

Any idea of what I'm doing wrong or why the openssl dependency is not installed properly?

incomplete package with git

Hi !
Building pkg for git formula creates package without some necessary git resources.
Packages contains dirs:

.
โ””โ”€โ”€ usr
โ””โ”€โ”€ local
โ”œโ”€โ”€ Library
โ”œโ”€โ”€ bin
โ”œโ”€โ”€ etc
โ”œโ”€โ”€ lib
โ”œโ”€โ”€ libexec
โ””โ”€โ”€ share

when git wants some other files:

Failed to perform checkout on agent: '/usr/local/bin/git init --bare' command failed.
stdout: Initialized empty Git repository in /Users/teamcity/buildAgent/system/git/git-3DEC8E2F.git/
stderr: warning: templates not found /usr/local/Cellar/git/2.0.4/share/git-core/templates

Obviously, package should contain /usr/local/Cellar/git too.

No open source license

Tim:

brew-pkg does not appear to have a license. Could you add one? (we'd like to use it, but can't without an acceptable open source license)

brew pkg fails with undefined method

Hello! I recently installed brew pkg and am experiencing the below error every time I try to use the package. Any idea what's going on here?

Warning: Calling Formula#installed? is deprecated! Use Formula#latest_version_installed? (or Formula#any_version_installed? ) instead.
==> Creating package staging root using Homebrew prefix /usr/local
Error: undefined method `with_deps?' for ["tnef"]:Array
/usr/local/bin/brew-pkg.rb:63:in `pkg'
/usr/local/bin/brew-pkg.rb:162:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:81:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:112:in `<main>'

I tried with multiple forms:
brew pkg ffmpeg
brew pkg tnef
With and without --with-deps and --without-kegs. All of them fail with that same sort of error.

/usr/local/Cellar query

Hello!

As per README.md:

By default behaviour brew pkg include all package kegs located in /usr/local/Cellar/packagename.

I've built some pkgs with brew pkg that don't seem to function as I'd expect, with errors indicating that the required files at /usr/local/Cellar do not exist. For example, I built a package for the the document converter Pandoc as follows:

[me@host] ~ > brew install pandoc
==> Downloading https://homebrew.bintray.com/bottles/pandoc-1.17.2.el_capitan.bottle.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/pandoc-1.17.2.el_capitan.bottle.tar.gz
==> Pouring pandoc-1.17.2.el_capitan.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink etc/bash_completion.d/pandoc
Target /usr/local/etc/bash_completion.d/pandoc
already exists. You may want to remove it:
  rm '/usr/local/etc/bash_completion.d/pandoc'

To force the link and overwrite all conflicting files:
  brew link --overwrite pandoc

To list all files that would be deleted:
  brew link --overwrite --dry-run pandoc

Possible conflicting files are:
/usr/local/etc/bash_completion.d/pandoc
/usr/local/bin/pandoc
/usr/local/share/doc/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/COPYING
/usr/local/share/man/man1/pandoc.1
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/COPYRIGHT
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/README
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/LaTeXMathML.js
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/MathMLinHTML.js
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/bash_completion.tpl
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/[Content_Types].xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/_rels/.rels
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/docProps/app.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/docProps/core.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/_rels/document.xml.rels
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/_rels/footnotes.xml.rels
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/document.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/fontTable.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/footnotes.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/numbering.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/settings.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/styles.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/theme/theme1.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/docx/word/webSettings.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/dzslides/template.html
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/epub.css
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/Configurations2/accelerator/current.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/META-INF/manifest.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/Thumbnails/thumbnail.png
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/content.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/manifest.rdf
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/meta.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/mimetype
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/settings.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/odt/styles.xml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/sample.lua
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.asciidoc
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.beamer
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.commonmark
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.context
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.docbook
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.docbook5
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.dokuwiki
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.dzslides
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.epub
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.epub3
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.haddock
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.html
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.html5
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.icml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.latex
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.man
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.markdown
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.mediawiki
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.opendocument
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.opml
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.org
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.plain
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.revealjs
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.rst
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.rtf
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.s5
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.slideous
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.slidy
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.tei
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.texinfo
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.textile
/usr/local/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.zimwiki
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
๐Ÿบ  /usr/local/Cellar/pandoc/1.17.2: 72 files, 84.8M
[me@host] ~ > brew pkg pandoc
Warning: Calling Formula.factory is deprecated!
Use Formulary.factory instead.
/usr/local/bin/brew-pkg.rb:38:in `pkg'

==> Creating package staging root using Homebrew prefix /usr/local
Warning: Calling Formula.factory is deprecated!
Use Formulary.factory instead.
/usr/local/bin/brew-pkg.rb:65:in `block in pkg'

==> Staging formula pandoc
==> Building package pandoc-1.17.2.pkg

I then uninstalled the brew package:

[me@host] ~ > brew uninstall pandoc
Uninstalling /usr/local/Cellar/pandoc/1.17.2... (72 files, 84.8M)
[me@host] ~ > brew cleanup
[me@host] ~ > brew prune

And installed the built brew pkg:

[me@host] ~ > sudo installer -pkg pandoc-1.17.2.pkg -target /
Password:
installer: Package name is pandoc-1.17.2
installer: Upgrading at base path /
installer: The upgrade was successful.

I then carried out the test instructions at Pandoc - Getting Started:

[me@host] ~ > touch test1.md
[me@host] ~ > pandoc test1.md -f markdown -t html -s -o test1.html
pandoc: Could not find data file /usr/local/Cellar/pandoc/1.17.2/share/x86_64-osx-ghc-8.0.1/pandoc-1.17.2/data/templates/default.html
[me@host] ~ >

My understanding is that brew pkg includes the package kegs from /usr/local/Cellar for the given formula, but this doesn't seem to be the case in my testing. Have I done something wrong with my initial packaging?

Thanks,

Andrew

brew pkg with saltstack

Hi Tim

I am trying to use brew pkg --with-deps on saltstack
It creates the pkg but seems to not pull in python and has the path set incorrectly, maybe i am doing something wrong

Any help would be great

Thanks

set path for package

I tried to used to package a brew one to distribute to other mac.

When I do brew pkg --with-deps --identifier-prefix org.pass pass
==> Creating package staging root using Homebrew prefix /Users/USER/usr/local

Because my brew is installed on /Users/USER.

How to fix this ? How can I set the install path so the other machines will installed in their /Users/USER2 prefix ?

Package local formula

I have installed encfs using a local formula with the following command:

$ brew install contrib/encfs.rb

but I am not able to package this using brew-pkg:

$ brew pkg --with-deps contrib/encfs.rb
==> Creating package staging root using Homebrew prefix /usr/local
Error: No available formula with the name "encfs"

Is it possible to support creating a pkg from a cask?

I have several packages I need to package up for deployment on student computers and all but one of them is a normal Homebrew recipe. One of them is a cask. So brew-pkg won't package that last one.

Is it possible to support casks? Am I maybe missing something painfully obvious about casks and there's another way to do it?

Thanks in advance.

clamAV

Hi Tim,

I'm hoping to use your brew-pkg tool to make a clamav install package with no dependancy of brew being installed on the client endpoints.

I've stumbled across this project via: https://www.jamf.com/jamf-nation/discussions/6999/deploying-homebrew-through-casper
while looking for a way to install brew silently, and you raise a valid point about not going wild and installing brew everywhere.

I'm new to scripting, forgive me if I'm posting in the wrong section.

While first attempts resulted in an error saying it couldn't access the /var/folders location
I'm not sure whats different now, because I've been able to run $ brew pkg --with-deps --without-kegs --identifier-prefix org.TESTING clamav

and it builds the clam-0.99.2_1pkg installer

Inspecting the pkg file I can't see the conf file /usr/local/etc/clamav/freshclam.conf is included

Making me think this is perhaps not the way.

Any suggestions or guidance to kb articles you're aware of would be amazing

End game: Ultimately, deploying clamav via addigy as we've moved away from Gruntwork. Then run scans on a schedule - not much cashflow for paid software on all the clients.

  • clamav appears to be running fine in the test client VM.
    It will discover EICAR files I've littered around and scan will run, I'm still not sure how to quarantine infected files(but thats a different conversation)

Anyway, Thanks for the info I keep seeing you posting on various sites.
Top work.

Regards,
Miro

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.