Bug 243032 - [NEW] sysutils/perp: Persistent process supervisor & service managment framework
Summary: [NEW] sysutils/perp: Persistent process supervisor & service managment framework
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias C. Berner
URL: http://b0llix.net/perp/
Keywords: feature, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-01-02 09:02 UTC by Jan-Piet Mens
Modified: 2020-01-17 17:23 UTC (History)
2 users (show)

See Also:


Attachments
port files as shar (4.19 KB, text/plain)
2020-01-02 09:02 UTC, Jan-Piet Mens
no flags Details
port files (4.17 KB, text/plain)
2020-01-02 09:31 UTC, Jan-Piet Mens
no flags Details
port files rev 2 (3.51 KB, text/plain)
2020-01-02 10:32 UTC, Jan-Piet Mens
no flags Details
port files, rev 3 (3.46 KB, text/plain)
2020-01-11 09:06 UTC, Jan-Piet Mens
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Piet Mens 2020-01-02 09:02:43 UTC
Created attachment 210381 [details]
port files as shar

The perp package provides a set of daemons and utilities to reliably start,
monitor, log, and control a collection of persistent processes.
Comment 1 Tobias C. Berner freebsd_committer 2020-01-02 09:17:03 UTC
Moin moin 

Is 'un!x' intentional in the COMMENT?

mfg Tobias
Comment 2 Jan-Piet Mens 2020-01-02 09:20:24 UTC
(In reply to Tobias C. Berner from comment #1)

It's intentional in as much as I copied the description from the original site 
http://b0llix.net/perp/site.cgi?page=about
Comment 3 Tobias C. Berner freebsd_committer 2020-01-02 09:20:41 UTC
MASTER_SITES looks fishy, and is at the wrong position in the Makefile

mfg Tobias
Comment 4 Jan-Piet Mens 2020-01-02 09:26:49 UTC
(In reply to Tobias C. Berner from comment #3)

I apologize for the fishyness and have just realized: will fix, but:

If I move MASTER_SITES under CATEGORIES (as seen in a few other ports), then portlint(1) complains:

FATAL: Makefile: extra item "MASTER_SITES " placed in the PORTNAME section.

How would you like me to resolve this?
Comment 5 Jan-Piet Mens 2020-01-02 09:31:39 UTC
Created attachment 210382 [details]
port files

I have fixed MASTER_SITES
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-02 09:39:24 UTC
in perp/files/patch-conf.mk:

  +CFLAGS += -Wall -Wextra -Wshadow -DNDEBUG -O2 -DPERP_BASE_DEFAULT="\"/usr/local/etc/perp\""

preferably, set this using MAKE_ARGS|ENV, but at a minimum and fallback: /usr/local/etc/perp needs to be substituted (not hardcoded) 

Same for:

X+BINDIR = /usr/local/bin
X+SBINDIR = /usr/local/sbin
X+MANDIR  = /usr/local/man

Use MAKE_ENV/ARGS over patches where possible
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-02 09:42:36 UTC
Further in perp/files/patch-conf.mk:

-O2 should be removed and it should be checked/confirmed that user CFLAGS are honoured
Comment 8 Jan-Piet Mens 2020-01-02 10:32:08 UTC
Created attachment 210387 [details]
port files rev 2

Issues addressed. Thank you for your input!
Comment 9 Jan-Piet Mens 2020-01-02 14:25:48 UTC
(In reply to Kubilay Kocak from comment #6)

Understood, and I've found how to do so. New .shar attached earlier.
Comment 10 Tobias C. Berner freebsd_committer 2020-01-03 09:29:58 UTC
CFLAGS:=	${CFLAGS:C/-O2//}

that looks wrong.
Comment 11 Jan-Piet Mens 2020-01-03 09:35:07 UTC
(In reply to Tobias C. Berner from comment #10)

I don't understand why "it looks wrong". It removes -O2 from CFLAGS.

Copied from `make' output:

cc -pipe  -I. -I../lasagna -DPERP_BASE_DEFAULT='"/usr/local/etc/perp"' -fstack-protector-strong -fno-strict-aliasing  -c dynbuf/dynbuf_new.c
Comment 12 Dan Langille freebsd_committer 2020-01-03 13:40:18 UTC
I testported this shar and I'm happy to proceed.

re https://services.unixathome.org/poudriere/build.html?mastername=120amd64-dvl-master-list&build=2020-01-03_13h24m13s

root@120amd64-dvl-master-list:/wrkdirs/usr/ports/sysutils/perp # pkg info -l perp
perp-2.07:
	/usr/local/man/man5/perpetrate.5.gz
	/usr/local/man/man8/perp-setup.8.gz
	/usr/local/man/man8/perp_intro.8.gz
	/usr/local/man/man8/perpboot.8.gz
	/usr/local/man/man8/perpctl.8.gz
	/usr/local/man/man8/perpd.8.gz
	/usr/local/man/man8/perpetrate.8.gz
	/usr/local/man/man8/perphup.8.gz
	/usr/local/man/man8/perpls.8.gz
	/usr/local/man/man8/perpok.8.gz
	/usr/local/man/man8/perpstat.8.gz
	/usr/local/man/man8/runargs.8.gz
	/usr/local/man/man8/runargv0.8.gz
	/usr/local/man/man8/runchoom.8.gz
	/usr/local/man/man8/rundetach.8.gz
	/usr/local/man/man8/rundeux.8.gz
	/usr/local/man/man8/runenv.8.gz
	/usr/local/man/man8/runfile.8.gz
	/usr/local/man/man8/runlimit.8.gz
	/usr/local/man/man8/runlock.8.gz
	/usr/local/man/man8/runpause.8.gz
	/usr/local/man/man8/runsession.8.gz
	/usr/local/man/man8/runtool.8.gz
	/usr/local/man/man8/runtools_intro.8.gz
	/usr/local/man/man8/runtrap.8.gz
	/usr/local/man/man8/runuid.8.gz
	/usr/local/man/man8/sissylog.8.gz
	/usr/local/man/man8/tinylog.8.gz
	/usr/local/sbin/perp-setup
	/usr/local/sbin/perpboot
	/usr/local/sbin/perpctl
	/usr/local/sbin/perpd
	/usr/local/sbin/perphup
	/usr/local/sbin/perpls
	/usr/local/sbin/perpok
	/usr/local/sbin/perpstat
	/usr/local/sbin/runargs
	/usr/local/sbin/runargv0
	/usr/local/sbin/runchoom
	/usr/local/sbin/rundetach
	/usr/local/sbin/rundeux
	/usr/local/sbin/runenv
	/usr/local/sbin/runfile
	/usr/local/sbin/runlimit
	/usr/local/sbin/runlock
	/usr/local/sbin/runpause
	/usr/local/sbin/runsession
	/usr/local/sbin/runtool
	/usr/local/sbin/runtrap
	/usr/local/sbin/runuid
	/usr/local/sbin/sissylog
	/usr/local/sbin/tinylog
	/usr/local/sbin/tinylog_run
root@120amd64-dvl-master-list:/wrkdirs/usr/ports/sysutils/perp #
Comment 13 Dan Langille freebsd_committer 2020-01-08 17:11:19 UTC
@Tobias: this PR is assigned to you.

What's up?
Comment 14 Tobias C. Berner freebsd_committer 2020-01-08 17:43:51 UTC
(In reply to Dan Langille from comment #13)
(In reply to Jan-Piet Mens from comment #11)
Why do you remove O2 from the users cflags? -- what you likely want is not to add it in yourself in files/patch-conf.mk ...

Also /usr/local/ should be subbed in from ${LOCALBASE} :)


mfg Tobias
Comment 15 Jan-Piet Mens 2020-01-08 18:25:43 UTC
I remove O2 from the flags because I was instructed to in comment#7

I don't provide a patch, so I don't understand the reference to files/patch*.mk
Comment 16 Tobias C. Berner freebsd_committer 2020-01-08 18:33:47 UTC
Sorry, I still had the patch-conf.mk from the previous version in mind :)
Comment 17 Tobias C. Berner freebsd_committer 2020-01-08 18:37:02 UTC
(In reply to Jan-Piet Mens from comment #15)
The removal of -O2 was concerning the one you added in the patch you had there previously wrt to comment #7
Comment 18 Jan-Piet Mens 2020-01-11 08:56:32 UTC
Hello,

I'm at a loss to understand what is being requested of me:

- the -O2 replacement was in a patch file which is no longer present, so I think that is now ok?
- the sub of LOCALBASE is, I think, not required, because I don't see a hardcoded "/usr/local" anywhere in the files I'm providing, so is that also ok?

Please advise on what I need to do to go forward with this, thank you!
Comment 19 Tobias C. Berner freebsd_committer 2020-01-11 09:00:51 UTC
Remove `CFLAGS:=	${CFLAGS:C/-O2//}` :)
Comment 20 Jan-Piet Mens 2020-01-11 09:06:53 UTC
Created attachment 210611 [details]
port files, rev 3

new port files, removed -O2 CFLAGS
Comment 21 Jan-Piet Mens 2020-01-11 09:07:43 UTC
(In reply to Tobias C. Berner from comment #19)

ah, understood, thank you. :-)
New port shar uploaded.
Comment 22 Tobias C. Berner freebsd_committer 2020-01-17 17:22:43 UTC
Committed -- thank you :)
Comment 23 commit-hook freebsd_committer 2020-01-17 17:23:15 UTC
A commit references this bug:

Author: tcberner
Date: Fri Jan 17 17:22:27 UTC 2020
New revision: 523340
URL: https://svnweb.freebsd.org/changeset/ports/523340

Log:
  New port: sysutils/perp: Persistent process supervisor & service managment framework

  The perp package provides a set of daemons and utilities to reliably start,
  monitor, log, and control a collection of persistent processes.

  A "persistent process" is any program intended to be long-running, highly
  available, and purpose critical. Also known and often described as a "service",
  a persistent process normally provides some essential, on-demand system
  service. Programs that serve email, domain name queries, and http requests are
  all examples of services that are normally run as persistent processes.

  These are the programs that you want to start at system boot, and to continue
  running for as long as the system itself. These are the programs you need
  running in uninterrupted service, day and night, forever and ever.

  perp helps make sure that they do.

  WWW: http://b0llix.net/perp/

  PR:		243032
  Submitted by:	Jan-Piet Mens <ports@jpmens.net>

Changes:
  head/sysutils/Makefile
  head/sysutils/perp/
  head/sysutils/perp/Makefile
  head/sysutils/perp/distinfo
  head/sysutils/perp/pkg-descr
  head/sysutils/perp/pkg-plist