amazon-ssm-agent icon indicating copy to clipboard operation
amazon-ssm-agent copied to clipboard

merging FreeBSD patches

Open cperciva opened this issue 10 years ago • 7 comments

I've submitted PRs for three of the patches I needed to get the SSM Agent running on FreeBSD -- #19 to work around a signedness difference between Linux and FreeBSD, and #20 and #18 to have the Agent recognize FreeBSD and report the version number (but PlatformTypeLinux since the SSM API doesn't accept that FreeBSD exists).

I will be submitting PRs soon to add FreeBSD build code to the makefile.

This will leave me with just changes to some paths: In agent/appconfig/constants_unix.go, DefaultProgramFolder and DefaultDataStorePath; in agent/log/log_unix.go, DefaultSeelogConfigFilePath. On FreeBSD we put configuration files for such non-base-system software under /usr/local/etc/ rather than /etc/, and we don't have /var/lib/ so I moved DefaultDataStorePath to /var/run/ (although /var/db/ might be more appropriate -- does the information the agent stores here need to persist across reboots?). Since these changes are specific to FreeBSD's filesystem hierarchy you won't want them as they are right now, and it may be easier to carry them as local FreeBSD changes rather than having the Agent pick which variant of the paths to use.

cperciva avatar Oct 18 '16 18:10 cperciva

Thanks @cperciva As discussed, your code has been merged internally, we will have them reviewed and tested. Will update this issue once we completes the release.

Regards, Shihua

shihuazhang avatar Jan 24 '17 00:01 shihuazhang

Hi @cperciva

Please confirm this contribution is under the terms of the Apache 2.0 license. Thanks

shihuazhang avatar Jan 27 '17 21:01 shihuazhang

As far as I'm concerned it's public domain. But we can call it Apache 2.0 if you prefer.

cperciva avatar Jan 27 '17 21:01 cperciva

cool, your code has been merged internally, I got some feedback on the review. We will not take https://github.com/aws/amazon-ssm-agent/pull/22 and this section

+.PHONY: install-freebsd +install-freebsd:

  • @echo "Install for freebsd agent"
  • install -m 555 $(BGO_SPACE)/bin/freebsd_amd64/amazon-ssm-agent $(DESTDIR)$(PREFIX)/sbin/
  • mkdir -p $(DESTDIR)$(PREFIX)/etc/amazon/ssm
  • install -m 644 $(BGO_SPACE)/bin/amazon-ssm-agent.json.template $(DESTDIR)$(PREFIX)/etc/amazon/ssm
  • install -m 644 $(BGO_SPACE)/bin/seelog_unix.xml $(DESTDIR)$(PREFIX)/etc/amazon/ssm/seelog_unix.xml.template

shihuazhang avatar Jan 27 '17 21:01 shihuazhang

Ok, I'll keep those bits as patches in the FreeBSD tree instead.

cperciva avatar Jan 27 '17 21:01 cperciva

Thanks

shihuazhang avatar Jan 27 '17 21:01 shihuazhang

release 672 includes the changes

shihuazhang avatar Feb 17 '17 19:02 shihuazhang