Repository navigation
smf manifest for sysutils/apcupsd #398
Description
Activity
Thanks! This will need a bit of work before it can be integrated. pkgsrc supports many different install types, so a lot of this information is extracted to variables so that it works for all builds.
Picking one at random:
https://github.com/NetBSD/pkgsrc/blob/trunk/sysutils/rsyslog/files/smf/manifest.xml
you can see various
@VARIABLE@strings, which are replaced for the target. I'd suggest using all of the ones included in that file, and also switching the group toroot.I'm happy to do this after the Christmas holidays if necessary.
Probably still some stuff missing, but I tweaked it more to match what you shared
<?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="manifest" name="apcupsd" > <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1" > <create_default_instance enabled="true" /> <dependency name="multi-user" grouping="require_all" restart_on="error" type="service" > <service_fmri value="svc:/milestone/multi-user:default" /> </dependency> <dependency name="network" grouping="require_all" restart_on="error" type="service"> <service_fmri value="svc:/milestone/network:default" /> </dependency> <exec_method type="method" name="start" exec="@PREFIX@/sbin/apcupsd -f /opt/tools/etc/apcupsd/apcupsd.conf &" timeout_seconds="10" > <method_context working_directory="@PREFIX@/etc/apcupsd" > <method_credential user="root" group="root" /> </method_context> </exec_method> <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" /> <template > <common_name > <loctext xml:lang="C" >apcupsd</loctext> </common_name> </template> </service> </service_bundle>I'm not sure if that multi-user dependency is necessary. Maybe that dependency was generated because group was staff? I would assume too, looking at the rsyslog example, it could use network the network dependency perhaps. Since some configurations of apcupsd could require networking. I'm connected over USB.
Thank you! Enjoy your Christmas and New Year
- added a commit that references this issue
on Jan 28, 2025 - added a commit that references this issue
on Feb 9, 2025 - added a commit that references this issue
on May 30, 2025 - added a commit that references this issue
on Feb 3, 2026 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on May 14, 2026 - added 13 commits that reference this issue
on May 14, 2026 - added 2 commits that reference this issue
on May 22, 2026 - added a commit that references this issue
on Jun 1, 2026 - added a commit that references this issue
on Jun 23, 2026 - added a commit that references this issue
on Sep 6, 2026
I noticed there's no smf manifest for apcupsd. This is a naive attempt at generating one. This is what I created for the gz, installed apcupsd from the tools pkgsrc path.