Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

apcupsd 3.14.13 (new formula) #45899

Closed
wants to merge 2 commits into from
Closed

apcupsd 3.14.13 (new formula) #45899

wants to merge 2 commits into from

Conversation

reitermarkus
Copy link
Member

No description provided.

@dunn
Copy link
Contributor

dunn commented Nov 11, 2015

It's trying to write directly to /Applications: http://bot.brew.sh/job/Homebrew%20Pull%20Requests/36339/version=yosemite/testReport/junit/brew-test-bot/yosemite/install_apcupsd/

Any way to change that?

@reitermarkus
Copy link
Member Author

Where should it install instead? To prefix?

@dunn
Copy link
Contributor

dunn commented Nov 11, 2015

Yeah, app bundles should be installed to prefix or libexec.

def install
cd "src/apcagent" do
# Install "apcagent" to prefix instead of /Applications
inreplace "Makefile", "Applications", "#{prefix}".gsub(/^\//, "")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the best way to write this without getting audit problems?

@reitermarkus
Copy link
Member Author

Anything else I need to change or can this be merged?


depends_on "libusb-compat"

if build.with?("cgi")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need a block. depends_on "gd" if build.with?("cgi") is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically speaking, depends_on "gd" if build.with? "cgi" is fine as well 😉

@reitermarkus
Copy link
Member Author

Ok, I have removed the --disable options, I think it doesn't hurt building them even if you don't need those options.

Also removed the apcagent option, because on Darwin this can't be disabled.
The all option failed because of the GAPCMON dependency and apparently install-distdir is enabled by default.


option "with-cgi", "Compile CGI programs"
option "with-usb", "Compile USB UPS code"
option "with-modbus-usb", "Compile MODBUS/USB driver code"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it maybe worth just doing these all by default?

@reitermarkus
Copy link
Member Author

Ok, I removed the part about SIP and added a disclaimer.

url "https://downloads.sourceforge.net/project/apcupsd/apcupsd%20-%20Stable/3.14.13/apcupsd-3.14.13.tar.gz"
sha256 "57ecbde01d0448bf8c4dbfe0ad016724ae66ab98adf2de955bf2be553c5d03f9"

option "with-usb", "Build with support for USB UPSes."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just worth enabling this by default?

@MikeMcQuaid
Copy link
Member

Can you suggest how I can test that the kernel module loads correctly on OS X 10.11? Thanks!

@reitermarkus
Copy link
Member Author

I don't know of a way without an actual APC UPS to test with, but here are my test results:

On my Mac mini Server (OS X 10.10), it works without any problems (kext check enabled).

On my iMac (OS X 10.11):

  • SIP disabled: works, but only if you unplug the USB cable and plug it in again
  • SIP enabled: same as with SIP disabled

So it seems as if AppleKextExcludeList.kext is still adhered to by El Capitan.

Just to make sure, I tried if it would work without the kext (It didn't.), so the kext is working, but only partially. Apparently my assumption that SIP is responsible for the kext not working was wrong.

@MikeMcQuaid
Copy link
Member

Thanks for your contribution to Homebrew! Without people like you submitting PRs we couldn't run this project. You rock!

@reitermarkus reitermarkus deleted the apcupsd branch December 8, 2015 17:07
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants