pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add aws-session-manager-plugin. Needs work.



Module Name:	pkgsrc-wip
Committed By:	Amitai Schleier <schmonz-web-git%schmonz.com@localhost>
Pushed By:	schmonz
Date:		Sat Oct 26 14:53:21 2024 -0400
Changeset:	4c19867993c88f103faf034e751af3dcfd81fe09

Added Files:
	aws-session-manager-plugin/DESCR
	aws-session-manager-plugin/Makefile
	aws-session-manager-plugin/PLIST
	aws-session-manager-plugin/TODO
	aws-session-manager-plugin/distinfo
	aws-session-manager-plugin/patches/patch-makefile

Log Message:
Add aws-session-manager-plugin. Needs work.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4c19867993c88f103faf034e751af3dcfd81fe09

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 aws-session-manager-plugin/DESCR                  |  7 ++++++
 aws-session-manager-plugin/Makefile               | 24 +++++++++++++++++++
 aws-session-manager-plugin/PLIST                  |  3 +++
 aws-session-manager-plugin/TODO                   |  8 +++++++
 aws-session-manager-plugin/distinfo               |  6 +++++
 aws-session-manager-plugin/patches/patch-makefile | 28 +++++++++++++++++++++++
 6 files changed, 76 insertions(+)

diffs:
diff --git a/aws-session-manager-plugin/DESCR b/aws-session-manager-plugin/DESCR
new file mode 100644
index 0000000000..d3f102bd1f
--- /dev/null
+++ b/aws-session-manager-plugin/DESCR
@@ -0,0 +1,7 @@
+Session Manager is a fully managed AWS Systems Manager capability that
+lets you manage your Amazon Elastic Compute Cloud (Amazon EC2)
+instances, on-premises instances and virtual machines. Session Manager
+provides secure and auditable instance management without the need to
+open inbound ports. When you use the Session Manager plugin with the AWS
+CLI to start a session, the plugin builds the websocket connection to
+your managed instances.
diff --git a/aws-session-manager-plugin/Makefile b/aws-session-manager-plugin/Makefile
new file mode 100644
index 0000000000..d0c5049a68
--- /dev/null
+++ b/aws-session-manager-plugin/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD$
+
+DISTNAME=	${GITHUB_PROJECT}-1.2.677.0
+PKGNAME=	aws-${DISTNAME}
+CATEGORIES=	net
+MASTER_SITES=	${MASTER_SITE_GITHUB:=aws/}
+GITHUB_PROJECT=	session-manager-plugin
+GITHUB_TAG=	${PKGVERSION_NOREV}
+
+MAINTAINER=	schmonz%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/aws/session-manager-plugin/
+COMMENT=	AWS CLI plugin to start/end sessions to your instances
+LICENSE=	apache-2.0
+
+USE_TOOLS+=	gmake
+BUILD_TARGET=	build-host-native-pkgsrc
+
+INSTALLATION_DIRS=	bin
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/pkgsrc_host/* ${DESTDIR}${PREFIX}/bin/
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/pkgsrc_host_plugin/* ${DESTDIR}${PREFIX}/bin/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/aws-session-manager-plugin/PLIST b/aws-session-manager-plugin/PLIST
new file mode 100644
index 0000000000..a712d51d8a
--- /dev/null
+++ b/aws-session-manager-plugin/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/session-manager-plugin
+bin/ssmcli
diff --git a/aws-session-manager-plugin/TODO b/aws-session-manager-plugin/TODO
new file mode 100644
index 0000000000..d940993b80
--- /dev/null
+++ b/aws-session-manager-plugin/TODO
@@ -0,0 +1,8 @@
+# TODO
+
+- needs go compiler
+    - can we build more pkgsrc-go-idiomatically?
+- needs docs installed
+- needs paths adjusted (like LOGDIR)
+- lots of warnings at package time
+- hints: <https://github.com/freebsd/freebsd-ports/blob/main/sysutils/amazon-ssm-plugin/Makefile>
diff --git a/aws-session-manager-plugin/distinfo b/aws-session-manager-plugin/distinfo
new file mode 100644
index 0000000000..f3b2362576
--- /dev/null
+++ b/aws-session-manager-plugin/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (session-manager-plugin-1.2.677.0.tar.gz) = 5aba974147146423b0c32ba721c0924278ac4059c558e95e1f77c0ed43410efd
+SHA512 (session-manager-plugin-1.2.677.0.tar.gz) = 695b38fd41da97293eff3e46b13fc73263a32dc48a3d93dfad9fdfaa37dfca87c8841a30dd54c9371033b9e4cdd3e977a8eb5548c73926b50636da0433269c0b
+Size (session-manager-plugin-1.2.677.0.tar.gz) = 35309456 bytes
+SHA1 (patch-makefile) = 7af29d493603e66f8600a0750a6f972d7aa89a65
diff --git a/aws-session-manager-plugin/patches/patch-makefile b/aws-session-manager-plugin/patches/patch-makefile
new file mode 100644
index 0000000000..d31d9e2680
--- /dev/null
+++ b/aws-session-manager-plugin/patches/patch-makefile
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Just do a native build.
+
+--- makefile.orig	2024-10-10 23:37:26.000000000 +0000
++++ makefile
+@@ -1,5 +1,5 @@
+ COPY := cp -p
+-GO_BUILD := go build -i
++GO_BUILD := go build
+ 
+ # Default build configuration, can be overridden at build time.
+ GOARCH?=$(shell go env GOARCH)
+@@ -81,6 +81,14 @@ create-package-folder:
+ 	mkdir -p $(GO_SPACE)/bin/updates/ssmcli/`cat $(GO_SPACE)/VERSION`/
+ 	mkdir -p $(GO_SPACE)/bin/updates/sessionmanagerplugin/`cat $(GO_SPACE)/VERSION`/
+ 
++.PHONY: build-host-native-pkgsrc
++build-host-native-pkgsrc: checkstyle copy-src pre-build
++	@echo "Build for pkgsrc host platform"
++	$(GO_BUILD) -ldflags "-s -w" -o $(GO_SPACE)/bin/pkgsrc_host_plugin/session-manager-plugin -v \
++		$(GO_SPACE)/src/sessionmanagerplugin-main/main.go
++	$(GO_BUILD) -ldflags "-s -w" -o $(GO_SPACE)/bin/pkgsrc_host/ssmcli -v \
++    		$(GO_SPACE)/src/ssmcli-main/main.go
++
+ .PHONY: build-linux-amd64
+ build-linux-amd64: checkstyle copy-src pre-build
+ 	@echo "Build for linux platform"


Home | Main Index | Thread Index | Old Index