Skip to content
Snippets Groups Projects
Commit 3c75478e authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

testing/fisher: new aport

parent 65222a1d
No related branches found
No related tags found
No related merge requests found
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=fisher
pkgver=1.0.0
pkgrel=0
pkgdesc="Simple yet powerful webhooks catcher"
url="https://github.com/pietroalbini/fisher"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust/cargo
license="GPL-3.0-or-later"
makedepends="cargo"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="https://github.com/pietroalbini/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz
config.patch
minimize-size.patch
gitlab-hook-job.patch
$pkgname.initd
$pkgname.logrotate
"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # problems with test dependencies
build() {
cargo build --release --locked
}
package() {
cd "$builddir"
install -m 755 -D target/release/fisher "$pkgdir"/usr/bin/fisher
install -m 644 -D config-example.toml "$pkgdir"/etc/fisher/config.toml
install -m 755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m 644 -D "$srcdir"/$pkgname.logrotate \
"$pkgdir"/etc/logrotate.d/$pkgname
install -d -m 755 "$pkgdir"/etc/fisher/scripts
}
sha512sums="c1f98aefa6f2a5d4ffca37ec4faed192e874bbd62a8eed131081569a23f259781905d1d73735846585c26faf6d0e80860b12c229d8e5cdfc0c4780fd87be6aa6 fisher-1.0.0.tar.gz
3663fef2852bb3d8f706bf1eab881b137b45e2f69eb42657b5d53d1cc6dcab511c8503747c1209b7e4245b249bef0988ee2fc4f8d3f1d49402a8e063f497fd1c config.patch
7b5bfd8a9e5a6bdd8c8ad08bcd0fa0c11ba89ecc9f44ad39e8a327568b3b62da2ce359ea4f1896141e1df5bcc2ddd3821ad207b02100d8536a7918b8d9d82331 minimize-size.patch
f715819d5efb7388ecd898fea58304d9da50a02b7c3db06e5d9f86410be4377d76e8acb70cbb7bad8ed3e0abd192c920a09bc4b99191c88f1c92e6435d1d42bd gitlab-hook-job.patch
93a0ef4af30dbd07ba76f99d6f29d9ac16df9805861239bb658d6d39d69b606cd12611459c0b0fc108ed2b7ecd3dd01e7c64b2a9f1cd8b4eb914fa87261ad261 fisher.initd
5e76707439c2e30c96fd7c94017e9e61f8892e988cb6d3776bf858b5f6e5247b87c35964a1af53c041fe18409eb2b939e5103630216a68d94f3fcce982896660 fisher.logrotate"
--- a/config-example.toml
+++ b/config-example.toml
@@ -27,7 +27,7 @@
# The directory containing all the scripts Fisher will use. Scripts needs to be
# executable in order to be called.
-path = "/srv/fisher-scripts"
+path = "/etc/fisher/scripts"
# If this is set to true, scripts in subdirectories of `scripts.path` will also
# be loaded, including from symlinks (be sure to check permissions before
#!/sbin/openrc-run
extra_started_commands="reload"
: ${command_user:="fisher"}
: ${cfgfile:="/etc/fisher/config.toml"}
: ${logfile:="/var/log/$RC_SVCNAME.log"}
name="fisher"
command="/usr/bin/fisher"
command_args="$cfgfile"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="
--stdout $logfile
--stderr $logfile
--wait 200"
required_files="$cfgfile"
start_pre() {
checkpath -f -m 640 -o "$command_user" "$logfile"
}
reload() {
ebegin "Reloading $name"
start-stop-daemon --pidfile "$pidfile" --signal USR1
eend $?
}
/var/log/fisher.log {
compress
copytruncate
missingok
notifempty
}
#!/bin/sh
addgroup -S fisher 2>/dev/null
adduser -S -D -H -h /dev/null -s /sbin/nologin -G fisher \
-g "added by apk for fisher" fisher 2>/dev/null
exit 0
GitLab 9.4.x has hook event Job.
--- a/src/providers/gitlab.rs
+++ b/src/providers/gitlab.rs
@@ -22,7 +22,7 @@
lazy_static! {
static ref GITLAB_EVENTS: Vec<&'static str> = vec![
"Push", "Tag Push", "Issue", "Note", "Merge Request", "Wiki Page",
- "Build", "Pipeline", "Confidential Issue",
+ "Build", "Pipeline", "Confidential Issue", "Job",
];
static ref GITLAB_HEADERS: Vec<&'static str> = vec![
Minimize binary size.
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,4 +34,7 @@
reqwest = "^0.8"
[profile.release]
+codegen-units = 1
lto = true
+opt-level = "z"
+panic = "abort"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment