public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: Arne Fitzenreiter <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 44cc9a3d57a01dd0ccaa10d4c95f29e86ca0816b
Date: Sat, 11 Jan 2020 20:33:54 +0000	[thread overview]
Message-ID: <47wBQW5XKbz2y1R@people01.haj.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 15831 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  44cc9a3d57a01dd0ccaa10d4c95f29e86ca0816b (commit)
      from  590f879b342e8f960464b0650dbf179ab082c749 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 44cc9a3d57a01dd0ccaa10d4c95f29e86ca0816b
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Tue Dec 24 12:58:52 2019 +0000

    amazon-ssm-agent: New package
    
    AWS Systems Manager Agent (SSM Agent) is Amazon software that can be
    installed and configured on an Amazon EC2 instance, an on-premises
    server, or a virtual machine (VM). SSM Agent makes it possible for
    Systems Manager to update, manage, and configure these resources. The
    agent processes requests from the Systems Manager service in the AWS
    Cloud, and then runs them as specified in the request. SSM Agent then
    sends status and execution information back to the Systems Manager
    service by using the Amazon Message Delivery Service.
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
    Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/backup/includes/amazon-ssm-agent            |  1 +
 config/rootfiles/packages/x86_64/amazon-ssm-agent  | 13 +++++
 lfs/{bird => amazon-ssm-agent}                     | 66 ++++++++++++++--------
 make.sh                                            |  1 +
 .../packages/{sane => amazon-ssm-agent}            | 26 ++++-----
 src/paks/{asterisk => amazon-ssm-agent}/install.sh |  9 +++
 .../{dnsdist => amazon-ssm-agent}/uninstall.sh     |  4 +-
 src/paks/{apcupsd => amazon-ssm-agent}/update.sh   |  0
 8 files changed, 82 insertions(+), 38 deletions(-)
 create mode 100644 config/backup/includes/amazon-ssm-agent
 create mode 100644 config/rootfiles/packages/x86_64/amazon-ssm-agent
 copy lfs/{bird => amazon-ssm-agent} (67%)
 copy src/initscripts/packages/{sane => amazon-ssm-agent} (50%)
 copy src/paks/{asterisk => amazon-ssm-agent}/install.sh (87%)
 copy src/paks/{dnsdist => amazon-ssm-agent}/uninstall.sh (97%)
 copy src/paks/{apcupsd => amazon-ssm-agent}/update.sh (100%)

Difference in files:
diff --git a/config/backup/includes/amazon-ssm-agent b/config/backup/includes/amazon-ssm-agent
new file mode 100644
index 000000000..d202bcf26
--- /dev/null
+++ b/config/backup/includes/amazon-ssm-agent
@@ -0,0 +1 @@
+/etc/amazon/ssm
diff --git a/config/rootfiles/packages/x86_64/amazon-ssm-agent b/config/rootfiles/packages/x86_64/amazon-ssm-agent
new file mode 100644
index 000000000..98f93cdfd
--- /dev/null
+++ b/config/rootfiles/packages/x86_64/amazon-ssm-agent
@@ -0,0 +1,13 @@
+#etc/amazon
+etc/amazon/ssm
+etc/amazon/ssm/amazon-ssm-agent.json
+etc/amazon/ssm/seelog.xml
+etc/rc.d/init.d/amazon-ssm-agent
+usr/bin/amazon-ssm-agent
+usr/bin/ssm-cli
+usr/bin/ssm-document-worker
+usr/bin/ssm-session-logger
+usr/bin/ssm-session-worker
+var/ipfire/backup/addons/includes/amazon-ssm-agent
+#var/lib/amazon
+var/lib/amazon/ssm
diff --git a/lfs/amazon-ssm-agent b/lfs/amazon-ssm-agent
new file mode 100644
index 000000000..da164ced8
--- /dev/null
+++ b/lfs/amazon-ssm-agent
@@ -0,0 +1,118 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2019  IPFire Team  <info(a)ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 2.3.786.0
+SUP_ARCH   = x86_64
+
+THISAPP    = amazon-ssm-agent-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = amazon-ssm-agent
+PAK_VER    = 1
+
+DEPS       = ""
+
+export GOPATH = $(HOME)/gopath
+
+DIR_BUILD  = $(GOPATH)/src/github.com/aws/amazon-ssm-agent
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = a2887445875d335b021c5044eab955dc
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist:
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) $(DIR_BUILD) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+
+	# The build system is searching for code in a certain path
+	mkdir -pv $$(dirname $(DIR_BUILD))
+	ln -svf --relative $(DIR_APP) $(DIR_BUILD)
+
+	# Disable style check
+	cd $(DIR_BUILD) && sed -e "/checkstyle.sh/d" -i makefile
+
+	# Build
+	cd $(DIR_BUILD) && make build-linux
+
+	# Install
+	mkdir -pv /etc/amazon/ssm /usr/bin /var/lib/amazon/ssm
+	cd $(DIR_BUILD) && install -v -m 755 \
+		bin/linux_amd64/amazon-ssm-agent \
+		bin/linux_amd64/ssm-cli \
+		bin/linux_amd64/ssm-document-worker \
+		bin/linux_amd64/ssm-session-worker \
+		bin/linux_amd64/ssm-session-logger \
+		/usr/bin
+	cd $(DIR_BUILD) && install -v -m 644 \
+		seelog_unix.xml /etc/amazon/ssm/seelog.xml
+	cd $(DIR_BUILD) && install -v -m 644 \
+		amazon-ssm-agent.json.template /etc/amazon/ssm/amazon-ssm-agent.json
+
+	# Install initscript
+	$(call INSTALL_INITSCRIPT,amazon-ssm-agent)
+
+	# Install backup include
+	install -v -m 644 $(DIR_SRC)/config/backup/includes/amazon-ssm-agent \
+		/var/ipfire/backup/addons/includes/amazon-ssm-agent
+
+	@rm -rf $(DIR_APP) $(DIR_BUILD)
+	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 43050262c..538d94ace 100755
--- a/make.sh
+++ b/make.sh
@@ -1634,6 +1634,7 @@ buildipfire() {
   lfsmake2 geoip-generator
   lfsmake2 speedtest-cli
   lfsmake2 rfkill
+  lfsmake2 amazon-ssm-agent
 }
 
 buildinstaller() {
diff --git a/src/initscripts/packages/amazon-ssm-agent b/src/initscripts/packages/amazon-ssm-agent
new file mode 100644
index 000000000..c385d890c
--- /dev/null
+++ b/src/initscripts/packages/amazon-ssm-agent
@@ -0,0 +1,42 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/amazon-ssm-agent
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+	start)
+		# Do not launch the agent when we are not running on EC2
+		if ! running_on_ec2; then
+			exit 0
+		fi
+
+		boot_mesg "Starting Amazon SSM Agent..."
+		/usr/bin/amazon-ssm-agent &>/dev/null &
+		evaluate_retval
+		;;
+
+	stop)
+		boot_mesg "Stopping Amazon SSM Agent..."
+		killproc /usr/bin/amazon-ssm-agent
+		;;
+
+	restart)
+		${0} stop
+		sleep 1
+		${0} start
+		;;
+
+	status)
+		statusproc /usr/bin/amazon-ssm-agent
+		;;
+
+	*)
+		echo "Usage: ${0} {start|stop|restart|status}"
+		exit 1
+		;;
+esac
+
+# End $rc_base/init.d/amazon-ssm-agent
diff --git a/src/paks/amazon-ssm-agent/install.sh b/src/paks/amazon-ssm-agent/install.sh
new file mode 100644
index 000000000..b9044906b
--- /dev/null
+++ b/src/paks/amazon-ssm-agent/install.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info(a)ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+
+extract_files
+restore_backup ${NAME}
+
+start_service ${NAME}
+
+# Enable autostart
+ln -sf  ../init.d/amazon-ssm-agent /etc/rc.d/rc0.d/K10amazon-ssm-agent
+ln -sf  ../init.d/amazon-ssm-agent /etc/rc.d/rc3.d/S41amazon-ssm-agent
+ln -sf  ../init.d/amazon-ssm-agent /etc/rc.d/rc6.d/K10amazon-ssm-agent
+
+exit 0
diff --git a/src/paks/amazon-ssm-agent/uninstall.sh b/src/paks/amazon-ssm-agent/uninstall.sh
new file mode 100644
index 000000000..48f160762
--- /dev/null
+++ b/src/paks/amazon-ssm-agent/uninstall.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info(a)ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+
+extract_backup_includes
+
+stop_service ${NAME}
+
+make_backup ${NAME}
+
+remove_files
+
+rm -rfv /etc/rc.d/rc*.d/*amazon-ssm-agent
+
+exit 0
diff --git a/src/paks/amazon-ssm-agent/update.sh b/src/paks/amazon-ssm-agent/update.sh
new file mode 100644
index 000000000..89c40d0d7
--- /dev/null
+++ b/src/paks/amazon-ssm-agent/update.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info(a)ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2020-01-11 20:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47wBQW5XKbz2y1R@people01.haj.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox