Giter Site home page Giter Site logo

homebrew-rnp's People

Contributors

dewyatt avatar maxirmx avatar ni4 avatar ribose-jeffreylau avatar ronaldtse avatar rrrooommmaaa avatar skalee avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

Forkers

strogonoff

homebrew-rnp's Issues

Provide bottle(s) with rnp brew formulae

          > @maxirmx can't we specify a bottle dependency on the particular botan version? The benefit of the bottle is to allow people not to go through compilation, and it is an important benefit.

My understanding is that botan provides a formula to install only the latest version. Thus, even if we specify a dependency on some other version of botan, it will not be installed.

I believe we can

  • make a formula that uses bottle if botan version matches and builds from source if botan version does not match
  • link botan as static library in homebrew formula. It will eliminate run-time dependency
  • link rnp agains more generic reference (botan-2.dylib instead of botan-2.19.dylib). This will probably work but it is something to be done in core rnp build scripts

Also I guess we will need several bottles to make it effective. Botan provides seven:

  • arm64_ventura
  • arm64_monterey
  • arm64_big_sur
  • ventura
  • monterey
  • big_sur
  • catalina

This may require cross-compile options that will also go to core rnp build scripts

I suggest we release a simple fix first since keeping the bottle does not look like a one-liner fix

Originally posted by @maxirmx in #32 (comment)

Fix `brew` issue in GHA

https://github.com/rnpgp/homebrew-rnp/runs/3028325747

##[group]Run brew bottle --json --force-core-tap ${FORMULA}
�[36;1mbrew bottle --json --force-core-tap ${FORMULA}�[0m
�[36;1msource ci/read_bottle_metadata.sh�[0m
�[36;1mci/build_bintray_descriptor.rb�[0m
shell: /bin/bash -e {0}
env:
  FORMULA: ./Formula/rnp.rb
  OPTS: 
  BINTRAY_PACKAGE: rnp
  BINTRAY_DESCRIPTOR_FILENAME: bintray_descriptor.json
##[endgroup]
�[31mError:�[0m undefined method `path' for nil:NilClass
�[34m==>�[0m �[1mDetermining rnp bottle rebuild...�[0m
/usr/local/Homebrew/Library/Homebrew/formula_versions.rb:25:in `initialize'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:314:in `new'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:314:in `bottle_formula'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:105:in `block in bottle'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:104:in `each'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bottle.rb:104:in `bottle'
/usr/local/Homebrew/Library/Homebrew/brew.rb:122:in `<main>'
##[error]Process completed with exit code 1.

Add Travis build

(Edited by @skalee)

  • Test that formula passes brew audit. (extracted to #8)
  • Test that stable version is installable from source.
  • Test that HEAD version is installable from source.

Create formula to push into homebrew-core

As the RNP repo has over 50 stars, we are allowed to merge into homebrew official.

This task is to create a fork of homebrew-core, and make a PR to merge the RNP formula into Homebrew official.

@rrrooommmaaa could you help us with this? Thanks!

homebrew expects botan2, but botan version is 3.0 now...

Error message

Could NOT find Botan2 (missing: BOTAN2_LIBRARY BOTAN2_INCLUDE_DIR)

Error log

macos@macoss-Mac-mini ~ % brew tap rnpgp/rnp
==> Tapping rnpgp/rnp
Cloning into '/usr/local/Homebrew/Library/Taps/rnpgp/homebrew-rnp'...
remote: Enumerating objects: 387, done.
remote: Counting objects: 100% (167/167), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 387 (delta 65), reused 158 (delta 64), pack-reused 220
Receiving objects: 100% (387/387), 55.94 KiB | 406.00 KiB/s, done.
Resolving deltas: 100% (124/124), done.
Tapped 1 formula (19 files, 87.3KB).
macos@macoss-Mac-mini ~ % brew install rnp
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
==> Fetching dependencies for rnpgp/rnp/rnp: [email protected], botan and json-c
==> Fetching [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/manifests/3.11.4
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/blobs/sha256:c81561
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################### 100.0%
==> Fetching botan
==> Downloading https://ghcr.io/v2/homebrew/core/botan/manifests/3.0.0
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/botan/blobs/sha256:859aab2d6e57
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################### 100.0%
==> Fetching json-c
==> Downloading https://ghcr.io/v2/homebrew/core/json-c/manifests/0.16
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/json-c/blobs/sha256:2d032280aa3
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################### 100.0%
==> Fetching rnpgp/rnp/rnp
==> Downloading https://github.com/rnpgp/rnp/archive/refs/tags/v0.16.3.tar.gz
==> Downloading from https://codeload.github.com/rnpgp/rnp/tar.gz/refs/tags/v0.1
              #    #    #     #                                         -=O=-
==> Installing rnp from rnpgp/rnp
==> Installing dependencies for rnpgp/rnp/rnp: [email protected], botan and json-c
==> Installing rnpgp/rnp/rnp dependency: [email protected]
==> Pouring [email protected]
==> /usr/local/Cellar/[email protected]/3.11.4/bin/python3.11 -m ensurepip
==> /usr/local/Cellar/[email protected]/3.11.4/bin/python3.11 -m pip install -v --no-d
🍺  /usr/local/Cellar/[email protected]/3.11.4: 3,286 files, 61.9MB
==> Installing rnpgp/rnp/rnp dependency: botan
==> Pouring botan--3.0.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/botan/3.0.0: 244 files, 21.0MB
==> Installing rnpgp/rnp/rnp dependency: json-c
==> Pouring json-c--0.16.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/json-c/0.16: 32 files, 320.4KB
==> Installing rnpgp/rnp/rnp
==> cmake -S . -B build
Last 15 lines from /Users/macos/Library/Logs/Homebrew/rnp/01.cmake:
-- Found BZip2: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libbz2.tbd (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Found JSON-C: /usr/local/lib/libjson-c.dylib (found suitable version "0.16", minimum required is "0.11")
CMake Error at /usr/local/Cellar/cmake/3.26.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Botan2 (missing: BOTAN2_LIBRARY BOTAN2_INCLUDE_DIR)
  (Required is at least version "2.14.0")
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.26.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindBotan2.cmake:100 (find_package_handle_standard_args)
  src/lib/CMakeLists.txt:35 (find_package)


-- Configuring incomplete, errors occurred!

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/rnpgp/homebrew-rnp/issues

These open issues may also help:
Provide bottle(s) with rnp brew formulae https://github.com/rnpgp/homebrew-rnp/issues/33
Update formula to install rnp.dylib (or add rnp-dev). https://github.com/rnpgp/homebrew-rnp/issues/29
macos@macoss-Mac-mini ~ % brew untap rnpgp/rnp
Untapping rnpgp/rnp...
Untapped 1 formula (20 files, 88.6KB).

Botan version

macos@macoss-Mac-mini ~ % brew info botan
==> botan: stable 3.0.0 (bottled), HEAD
Cryptographic algorithms and formats library in C++
https://botan.randombit.net/
/usr/local/Cellar/botan/3.0.0 (244 files, 21.0MB) *
  Poured from bottle using the formulae.brew.sh API on 2023-06-17 at 17:34:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/botan.rb
License: BSD-2-Clause
==> Dependencies
Build: pkg-config ✔
Required: [email protected] ✔, sqlite ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 0 (30 days), 0 (90 days), 0 (365 days)
install-on-request: 0 (30 days), 0 (90 days), 0 (365 days)
build-error: 0 (30 days)
macos@macoss-Mac-mini ~ %

Distribute binary packages (a.k.a. bottles)

  • build binary packages (bottles) in GitHub Action
  • upload bottles to Bintray or GitHub releases
  • specify bottle URL in formula definition
  • specify bottle cryptographic hash in formula definition

Fresh installed rnp on macOS fails

Description

I freshly installed RNP on my macOS with brew as described in installation. After the installation I'm not able to run RNP as there's a library missing.

Environment

macOS Ventura 13.3

$ brew info rnp
==> rnpgp/rnp/rnp: stable 0.15.2 (bottled), HEAD
High-performance OpenPGP command-line tools and library
https://github.com/rnpgp/rnp
/usr/local/Cellar/rnp/0.15.2 (16 files, 2.7MB) *
  Poured from bottle on 2023-04-13 at 08:14:34
From: https://github.com/rnpgp/homebrew-rnp/blob/HEAD/Formula/rnp.rb
==> Dependencies
Build: cmake ✔
Required: botan ✔, json-c ✔
==> Options
--HEAD
	Install HEAD version

Steps to Reproduce

  1. Get a freshly installed macOS with homebrew.
  2. Follow the instructions.
  3. Run rnp --version

Expected Behavior

RNP should find the library libbotan and print its version.

Actual Behavior

$ rnp --version
dyld[16402]: Library not loaded: /usr/local/opt/botan/lib/libbotan-2.18.dylib
  Referenced from: <7405531A-B97F-34D4-B9BE-4EB91C570555> /usr/local/Cellar/rnp/0.15.2/bin/rnp
  Reason: tried: '/usr/local/opt/botan/lib/libbotan-2.18.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/botan/lib/libbotan-2.18.dylib' (no such file), '/usr/local/opt/botan/lib/libbotan-2.18.dylib' (no such file), '/usr/local/lib/libbotan-2.18.dylib' (no such file), '/usr/lib/libbotan-2.18.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/botan/2.19.3/lib/libbotan-2.18.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/botan/2.19.3/lib/libbotan-2.18.dylib' (no such file), '/usr/local/Cellar/botan/2.19.3/lib/libbotan-2.18.dylib' (no such file), '/usr/local/lib/libbotan-2.18.dylib' (no such file), '/usr/lib/libbotan-2.18.dylib' (no such file, not in dyld cache)

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.