mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-05-18 12:17:17 +00:00
feat(goconserver): Add debian packaging for deb builds
Create debian/ directory and make_deb.sh for building goconserver as a .deb package. Clones upstream, removes etcd backend, builds with CGO_ENABLED=0 for static linking, packages via dpkg-buildpackage. Tested on Ubuntu 22.04, 24.04, and 26.04.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
goconserver (0.3.3-1) unstable; urgency=medium
|
||||
|
||||
* Build v0.3.3 from source for xCAT
|
||||
* Remove RC4 and 3DES ciphers from TLS configuration
|
||||
* Remove etcd storage backend (incompatible with modern Go modules)
|
||||
|
||||
-- Vinicius Ferrao <ferrao@versatushpc.com.br> Sat, 10 May 2025 13:43:11 -0300
|
||||
@@ -0,0 +1 @@
|
||||
13
|
||||
@@ -0,0 +1,14 @@
|
||||
Source: goconserver
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: xCAT <xcat-user@lists.sourceforge.net>
|
||||
Build-Depends: debhelper (>= 13), golang
|
||||
Standards-Version: 4.6.0
|
||||
Homepage: https://github.com/xcat2/goconserver
|
||||
|
||||
Package: goconserver
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}
|
||||
Description: Console server written in Go for xCAT
|
||||
goconserver is a scalable console server written in Go. It provides
|
||||
console logging and management for xCAT cluster nodes.
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/make -f
|
||||
export CGO_ENABLED=0
|
||||
%:
|
||||
dh $@
|
||||
override_dh_auto_configure:
|
||||
override_dh_auto_build:
|
||||
go build -ldflags "-X main.Version=0.3.3" -o goconserver goconserver.go
|
||||
go build -ldflags "-X main.Version=0.3.3" -o congo cmd/congo.go
|
||||
override_dh_auto_install:
|
||||
install -D -m 755 goconserver $(CURDIR)/debian/goconserver/usr/bin/goconserver
|
||||
install -D -m 755 congo $(CURDIR)/debian/goconserver/usr/bin/congo
|
||||
install -D -m 644 etc/goconserver/server.conf $(CURDIR)/debian/goconserver/etc/goconserver/server.conf
|
||||
mkdir -p $(CURDIR)/debian/goconserver/var/log/goconserver
|
||||
override_dh_auto_test:
|
||||
override_dh_auto_clean:
|
||||
rm -f goconserver congo
|
||||
override_dh_dwz:
|
||||
override_dh_strip:
|
||||
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
VERSION=0.3.3
|
||||
REPO=https://github.com/xcat2/goconserver.git
|
||||
REF=master
|
||||
|
||||
WORKDIR=$(mktemp -d)
|
||||
trap "rm -rf $WORKDIR" EXIT
|
||||
|
||||
echo "Cloning goconserver..."
|
||||
git clone --depth 1 --branch "$REF" "$REPO" "$WORKDIR/goconserver-$VERSION"
|
||||
|
||||
cd "$WORKDIR/goconserver-$VERSION"
|
||||
|
||||
# etcd storage backend has broken deps with modern Go modules
|
||||
rm -rf storage/etcd.go storage/etcd/
|
||||
|
||||
export GOPATH="$WORKDIR/gopath"
|
||||
export GOCACHE="$WORKDIR/gocache"
|
||||
export GOMODCACHE="$WORKDIR/gomodcache"
|
||||
export CGO_ENABLED=0
|
||||
|
||||
go mod init github.com/xcat2/goconserver
|
||||
go mod tidy
|
||||
|
||||
cp -rL "$SCRIPT_DIR/debian" .
|
||||
|
||||
dpkg-buildpackage -uc -us
|
||||
|
||||
echo "Built debs:"
|
||||
ls "$WORKDIR"/*.deb
|
||||
cp "$WORKDIR"/*.deb "$SCRIPT_DIR/../"
|
||||
Reference in New Issue
Block a user