Skip to content

Commit 2c2cd4b

Browse files
committed
new changes, openipmi
Signed-off-by: Batuhan Apaydin <[email protected]>
1 parent d4b8384 commit 2c2cd4b

File tree

3 files changed

+156
-37
lines changed

3 files changed

+156
-37
lines changed

collectd.yaml

Lines changed: 64 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@ package:
66
copyright:
77
- license: MIT
88

9-
# NOTE: Commented out packages are ones we don't have today in wolfi
10-
#
11-
# Thus list also uses the alpine package for comparison. HOWEVER there are a lot
12-
# of 'optional' packages listed in the pre-reqisites section of the git repo
13-
# docs which alpine has choosen not to include.
14-
#
15-
# QUESTION: Assume we do the same here and mirror what alpine has done?
16-
#
17-
# References:
18-
# - https://git.alpinelinux.org/aports/tree/community/collectd/APKBUILD#n13
19-
# - https://github.com/collectd/collectd/blob/main/README.md
20-
# - https://www.collectd.org/download.html#source
219
environment:
2210
contents:
2311
packages:
@@ -27,47 +15,52 @@ environment:
2715
- build-base
2816
- busybox
2917
- ca-certificates-bundle
18+
- cairo-dev
3019
- curl-dev
3120
- eudev-dev
3221
- flex
33-
# - gpsd-dev
22+
- gdk-pixbuf-dev
23+
- gpsd-dev
24+
- harfbuzz-dev
3425
- hiredis-dev
35-
# - i2c-tools-dev
26+
- i2c-tools-dev
3627
- iptables-dev
3728
- jansson-dev
3829
- libatasmart-dev
3930
- libdbi-dev
4031
- libgcrypt-dev
41-
# - libmemcached-dev
42-
# - libmicrohttpd-dev
32+
- libmemcached-dev
33+
- libmicrohttpd-dev
4334
- libmnl-dev
44-
# - libmodbus-dev
35+
- libmodbus-dev
4536
- libnotify-dev
46-
# - liboping-dev
37+
- liboping-dev
4738
- libpcap-dev
48-
# - libpq-dev # We have libpq-15, is this the same?
39+
- libpq-16
4940
- librdkafka-dev
5041
- libtool
5142
- libxml2-dev
52-
# - lm-sensors-dev
53-
# - lua-dev
43+
- lm-sensors-dev
5444
- mariadb-connector-c-dev
45+
- mariadb-dev
5546
- mosquitto-dev
56-
# - net-snmp-dev
57-
# - openipmi-dev
47+
- net-snmp-dev
48+
- openipmi-dev
49+
- openjdk-17-default-jdk
5850
- openldap-dev
5951
- openssl-dev>3
60-
# - owfs-dev
52+
- owfs-dev
53+
- pango-dev
6154
- patchelf
6255
- perl-dev
6356
- pkgconf
6457
- pkgconf-dev
65-
- python3-dev
58+
- postgresql-16-dev
6659
- rabbitmq-c
6760
- rabbitmq-c-dev
68-
# - riemann-c-client-dev
69-
# - rrdtool-dev
70-
# - varnish-dev # We have non-dev package, is this the same?
61+
- riemann-c-client-dev
62+
- rrdtool-dev
63+
- varnish
7164
- yajl-dev
7265
- zlib-dev
7366

@@ -79,12 +72,11 @@ pipeline:
7972
expected-commit: 3f935d017e81b7eaf84c9df421490230845dc5c0
8073

8174
- runs: |
82-
# As per 'generating the configure script' in docs
83-
# - https://github.com/collectd/collectd/blob/main/README.md
8475
./build.sh
8576
86-
# Configure options, copied from:
87-
# - https://git.alpinelinux.org/aports/tree/community/collectd/APKBUILD#n13
77+
CFLAGS="$CFLAGS -fPIC" \
78+
CPPFLAGS="$CFLAGS" \
79+
CXXFLAGS="$CFLAGS"
8880
./configure \
8981
--build=$CBUILD \
9082
--host=$CHOST \
@@ -131,14 +123,49 @@ pipeline:
131123
--disable-write_prometheus \
132124
--disable-xencpu \
133125
--disable-xmms \
134-
--disable-zone
126+
--disable-virt \
127+
--disable-pinba \
128+
--disable-barometer \
129+
--disable-capabilities \
130+
--disable-turbostat \
131+
--disable-write_riemann \
132+
--disable-ping \
133+
--disable-zone \
134+
--disable-python \
135+
--disable-lua
135136
136-
make
137-
make install DESTDIR="${{targets.destdir}}"
137+
make
138+
make DESTDIR="${{targets.destdir}}" install
139+
find "${{targets.destdir}}" \( -name perllocal.pod -o -name .packlist \) -delete
140+
141+
mkdir -p "${{targets.destdir}}"/etc/collectd.d
142+
mkdir -p "${{targets.destdir}}"/etc/init.d
143+
mkdir -p "${{targets.destdir}}"/usr/include/collectd/core
144+
mkdir -p "${{targets.destdir}}"/usr/include/collectd/liboconfig
145+
146+
install -D -m755 ./${{package.name}}.initd "${{targets.destdir}}"/etc/init.d/${{package.name}}
147+
148+
# Install all header files to allow building out-of-tree plugins.
149+
# This is based on Debian.
150+
for path in $(find src -path src/libcollectdclient -prune \
151+
-o -path src/liboconfig -prune \
152+
-o -name '*.h' -print)
153+
do
154+
install -D -m644 "$path" "${{targets.destdir}}"/usr/include/collectd/core/${path#src/}
155+
done
156+
157+
install -D -m644 ./src/liboconfig/oconfig.h -t "${{targets.destdir}}"/usr/include/collectd/liboconfig/
158+
cd "${{targets.destdir}}"/usr/include/collectd/
159+
# Update include path for collectd core header files.
160+
headers=$(find ./core ./liboconfig -type f -name '*.h')
161+
for path in $headers; do
162+
sed -r -i "s|(include\s+)\".*\<${path##*/}\"|\1\"collectd/${path#./}\"|" $headers
163+
done
164+
165+
- uses: strip
138166

139167
update:
140168
enabled: true
141169
github:
142170
identifier: collectd/collectd
143-
144-
171+
strip-prefix: collectd-

collectd/collectd.initd

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/sbin/openrc-run
2+
3+
COLLECTD_USER=${COLLECTD_USER:-"collectd"}
4+
COLLECTD_GROUP=${COLLECTD_GROUP:-"collectd"}
5+
COLLECTD_ARGS=${COLLECTD_ARGS:-""}
6+
COLLECTD_PIDFILE=${COLLECTD_PIDFILE:-"/run/collectd/collectd.pid"}
7+
8+
command=/usr/sbin/collectd
9+
pidfile="$COLLECTD_PIDFILE"
10+
command_args="${COLLECTD_ARGS} -P $pidfile"
11+
start_stop_daemon_args="--user ${COLLECTD_USER}:${COLLECTD_GROUP}"
12+
retry=${COLLECTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
13+
14+
start_pre() {
15+
checkpath --directory --owner "$COLLECTD_USER":"$COLLECTD_GROUP" \
16+
--mode 0770 "$(dirname $pidfile)" /var/lib/collectd
17+
}

openipmi.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package:
2+
name: openipmi
3+
version: 2.0.34
4+
epoch: 0
5+
description: IPMI (Intelligent Platform Management Interface) library and tools
6+
copyright:
7+
- license: LGPL-2.0-or-later and GPL-2.0-or-later or BSD-3-Clause
8+
9+
environment:
10+
contents:
11+
packages:
12+
- autoconf
13+
- automake
14+
- build-base
15+
- busybox
16+
- ca-certificates-bundle
17+
- glib-dev
18+
- libedit-dev
19+
- linux-headers
20+
- ncurses-dev
21+
- net-snmp-dev
22+
- openssl-dev
23+
- popt-dev
24+
- readline-dev
25+
26+
pipeline:
27+
- uses: fetch
28+
with:
29+
expected-sha256: 93227e43c72b5c3bd5949323e0669aa5527d1a971473a3a365af03fb8284a95f
30+
uri: https://downloads.sourceforge.net/openipmi/OpenIPMI-${{package.version}}.tar.gz
31+
32+
- uses: autoconf/configure
33+
with:
34+
opts: |
35+
--disable-static \
36+
--with-ucdsnmp \
37+
--without-python
38+
39+
- uses: autoconf/make
40+
41+
- uses: autoconf/make-install
42+
43+
- uses: strip
44+
45+
subpackages:
46+
- name: openipmi-dev
47+
pipeline:
48+
- uses: split/dev
49+
dependencies:
50+
runtime:
51+
- openipmi
52+
description: openipmi dev
53+
54+
- name: openipmi-doc
55+
pipeline:
56+
- uses: split/manpages
57+
description: openipmi manpages
58+
59+
- name: openipmi-lanserv
60+
pipeline:
61+
- runs: |
62+
mkdir -p "${{targets.subpkgdir}}"/usr/bin
63+
mkdir -p "${{targets.subpkgdir}}"/usr/lib
64+
mv "${{targets.destdir}}"/etc "${{targets.subpkgdir}}"/
65+
mv "${{targets.destdir}}"/usr/lib/libIPMIlanserv.so.* "${{targets.subpkgdir}}"/usr/lib/
66+
mv "${{targets.destdir}}"/usr/bin/ipmilan \
67+
"${{targets.destdir}}"/usr/bin/ipmi_sim \
68+
"${{targets.destdir}}"/usr/bin/sdrcomp \
69+
"${{targets.subpkgdir}}"/usr/bin/
70+
description: Emulates an IPMI network listener
71+
72+
update:
73+
enabled: true
74+
release-monitor:
75+
identifier: 2549

0 commit comments

Comments
 (0)