Hi, On Sun, Jul 26, 2020 at 01:12:49PM +0200, Caspar Schutijser wrote: > Below is a diff that updates sysutils/monit to 5.27.0. Tested on amd64. > > Some notes: > > 1) I added a patch to make sure the -fcf-protection=full compiler option > is not used. If this option is used, the compiler emits > .note.gnu.property ELF section headers and as a result, the produced > binary does not run: some garbage is printed to the screen and the > output ends as follows if I try to run it: > /usr/local/bin/monit[2]:: not found > /usr/local/bin/monit[2]: L: not found > /usr/local/bin/monit[20]: syntax error: `(' unexpected > I don't know if just patching away the use of this compiler option is > the way to go or that something else would be better. Feedback on that > is appreciated. > > jasper@ helped me figure out that the presence of the > .note.gnu.property section header was to blame, thanks for that. > > 2) I made the use of C99 explicit by appending -std=c99 to CFLAGS since > at least C99 is required now. Borrowed from some commits I've seen > from kmos@. > > 3) The tarball does not contain a README anymore so don't install it > in the post-install target.
Apparently the .note.gnu.property stuff (bullet point #1) is not necessary anymore. I don't know for a fact why that is but my first guess would be the recent upgrade to LLVM 10. Below is an updated diff. Thanks, Caspar Schutijser Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/monit/Makefile,v retrieving revision 1.64 diff -u -p -r1.64 Makefile --- Makefile 14 Sep 2019 21:18:18 -0000 1.64 +++ Makefile 13 Sep 2020 13:58:36 -0000 @@ -2,7 +2,7 @@ COMMENT= monitoring and managing daemons utility -DISTNAME= monit-5.26.0 +DISTNAME= monit-5.27.0 CATEGORIES= sysutils @@ -19,6 +19,9 @@ MASTER_SITES= ${HOMEPAGE}/dist/ CONFIGURE_STYLE=gnu +# Must specify C99 for base-gcc +CFLAGS+= -std=c99 + SUBST_VARS= LOCALSTATEDIR pre-configure: @@ -26,7 +29,6 @@ pre-configure: post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/{doc,examples}/monit - ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/monit ${INSTALL_DATA} ${WRKSRC}/monitrc ${PREFIX}/share/examples/monit .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/sysutils/monit/distinfo,v retrieving revision 1.42 diff -u -p -r1.42 distinfo --- distinfo 14 Sep 2019 21:18:18 -0000 1.42 +++ distinfo 13 Sep 2020 13:58:36 -0000 @@ -1,2 +1,2 @@ -SHA256 (monit-5.26.0.tar.gz) = h/xFaKOvmivokEDvsWnjouR7Ji+Z541d3emd2J8C88I= -SIZE (monit-5.26.0.tar.gz) = 1371327 +SHA256 (monit-5.27.0.tar.gz) = 2MDe72JPGTqVJQL+m6q/pm49jQV99XONpD+aN3kq/KQ= +SIZE (monit-5.27.0.tar.gz) = 1455341 Index: patches/patch-Makefile_in =================================================================== RCS file: /cvs/ports/sysutils/monit/patches/patch-Makefile_in,v retrieving revision 1.4 diff -u -p -r1.4 patch-Makefile_in --- patches/patch-Makefile_in 14 Sep 2019 21:18:18 -0000 1.4 +++ patches/patch-Makefile_in 13 Sep 2020 13:58:36 -0000 @@ -1,12 +1,12 @@ $OpenBSD: patch-Makefile_in,v 1.4 2019/09/14 21:18:18 sthen Exp $ -Using $< in a non-suffix rule context is a GNUmake idiom (Makefile:1279) +Using $< in a non-suffix rule context is a GNUmake idiom. Index: Makefile.in --- Makefile.in.orig +++ Makefile.in -@@ -1297,7 +1297,7 @@ cleanall: clean distclean - -rm -rf m4 config +@@ -1326,7 +1326,7 @@ cleanall: clean distclean + -git clean -fxd monit.1: doc/monit.pod - $(POD2MAN) $(POD2MANFLAGS) $< > $@ @@ -14,3 +14,16 @@ Index: Makefile.in -rm -f pod2* # ------------- +@@ -1337,10 +1337,10 @@ src/y.tab.c src/y.tab.h: run-yacc + + .INTERMEDIATE: run-yacc + run-yacc: src/p.y +- $(YACC) $(YACCFLAGS) -o src/y.tab.c $< ++ $(YACC) $(YACCFLAGS) -o src/y.tab.c src/p.y + + src/lex.yy.c: src/l.l +- $(FLEX) $(FLEXFLAGS) -o$@ $< ++ $(FLEX) $(FLEXFLAGS) -o$@ src/l.l + @WITH_CODESIGN_TRUE@all-local: $(bin_PROGRAMS) + @WITH_CODESIGN_TRUE@ $(foreach file, $(bin_PROGRAMS), codesign -s $(CODESIGN_IDENTITY) -v --deep --timestamp --options runtime $(file)) + Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/sysutils/monit/pkg/PLIST,v retrieving revision 1.11 diff -u -p -r1.11 PLIST --- pkg/PLIST 1 May 2019 19:21:57 -0000 1.11 +++ pkg/PLIST 13 Sep 2020 13:58:36 -0000 @@ -3,7 +3,6 @@ @bin bin/monit @man man/man1/monit.1 share/doc/monit/ -share/doc/monit/README share/examples/monit/ share/examples/monit/monitrc @mode 0600