first commit: base 2024.08

Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
tao89959
2025-02-12 17:59:29 +08:00
committed by maoxiaochuan
commit f3217a7708
14356 changed files with 572894 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
config BR2_PACKAGE_GITLAB_RUNNER
bool "gitlab-runner"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # git
depends on BR2_USE_WCHAR # tar
select BR2_PACKAGE_BASH # runtime, shells/bash.go probably want to support bashism.
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
select BR2_PACKAGE_CA_CERTIFICATES # runtime
select BR2_PACKAGE_GIT # runtime
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_LIBCURL # runtime
select BR2_PACKAGE_LIBCURL_CURL # runtime
select BR2_PACKAGE_LIBCURL_FORCE_TLS # runtime
select BR2_PACKAGE_OPENSSL # runtime
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL # runtime
select BR2_PACKAGE_LIBOPENSSL_BIN # runtime
select BR2_PACKAGE_TAR # runtime
help
GitLab Runner is the open source project that is used to run
your jobs and send the results back to GitLab. It is used in
conjunction with GitLab CI/CD, the open-source continuous
integration service included with GitLab that coordinates the
jobs.
https://docs.gitlab.com/runner/
comment "gitlab-runner needs a toolchain w/ threads"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS
+64
View File
@@ -0,0 +1,64 @@
#!/bin/sh
DAEMON="gitlab-runner"
PIDFILE="/var/run/$DAEMON.pid"
DAEMON_ARGS="run --syslog --user gitlab-runner -d /var/lib/gitlab-runner -c /etc/gitlab-runner/config.toml"
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon -S -q -m -b -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE" -u "$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
reload() {
printf 'Reloading %s: ' "$DAEMON"
start-stop-daemon -K -s HUP -q -p "$PIDFILE" -u "$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
case "$1" in
start|stop|restart)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 d09aba81c6bb4a55783a45c7bc5d686aa6084e25e27920d2a1004cc4a63f6db7 gitlab-runner-15.5.0-go2.tar.gz
sha256 0ae968b7ddd25da0209c3c6594aac1ac74ddf90385940b02b420463e2e0734de LICENSE
+32
View File
@@ -0,0 +1,32 @@
################################################################################
#
# gitlab-runner
#
################################################################################
GITLAB_RUNNER_VERSION = 15.5.0
GITLAB_RUNNER_SITE = https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$(GITLAB_RUNNER_VERSION)
GITLAB_RUNNER_LICENSE = MIT
GITLAB_RUNNER_LICENSE_FILES = LICENSE
GITLAB_RUNNER_LDFLAGS = \
-X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=$(GITLAB_RUNNER_VERSION)
define GITLAB_RUNNER_USERS
gitlab-runner -1 gitlab-runner -1 * /var/lib/gitlab-runner /bin/false - Gitlab Runner
endef
define GITLAB_RUNNER_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/gitlab-runner/S95gitlab-runner \
$(TARGET_DIR)/etc/init.d/S95gitlab-runner
endef
define GITLAB_RUNNER_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/var/lib/gitlab-runner
$(INSTALL) -D -m 0644 package/gitlab-runner/gitlab-runner.service \
$(TARGET_DIR)/usr/lib/systemd/system/gitlab-runner.service
endef
GITLAB_RUNNER_POST_INSTALL_TARGET_HOOKS += GITLAB_RUNNER_INSTALL_CONFIG
$(eval $(golang-package))
@@ -0,0 +1,18 @@
[Unit]
Description=GitLab Runner
After=network.target
ConditionFileIsExecutable=/usr/bin/gitlab-runner
[Service]
Environment="DAEMON_ARGS=run --working-directory /var/lib/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user gitlab-runner"
EnvironmentFile=-/etc/default/%p
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/bin/gitlab-runner $DAEMON_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target