Date: Wed, 14 Feb 2018 16:56:29 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r461818 - in head/devel: . liblockfile liblockfile/files Message-ID: <201802141656.w1EGuTU1099585@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Wed Feb 14 16:56:29 2018 New Revision: 461818 URL: https://svnweb.freebsd.org/changeset/ports/461818 Log: New port: devel/liblockfile This library implements a number of functions found in -lmail on SysV systems. These functions are designed to lock the standard mailboxes in /var/mail (or wherever the system puts them). In additions, this library adds a number of functions to create, manage and remove generic lockfiles. The lockfiles are created by this library in an NFS-safe manner, that is by using a tempfile and using link(2) to create the lockfile. It works around several defects in NFS servers to make sure the lockfile is created atomically. The locking strategy is compatible with other well-written NFS-safe programs that create lockfiles - such as procmail, exim and mutt. If you are trying to lock a mailbox in a directory writable for group mail, the locking functions will call a helper application which runs setgid to do the actual locking. The helper application "dotlockfile" can also be used directly, for example for use in shellscripts. This means a program such as a MUA doesn't need to be setgid mail anymore to be able to lock the mailbox. WWW: https://github.com/miquels/liblockfile PR: 224507 Submitted by: Yasuhiro KIMURA <yasu@utahime.org> Added: head/devel/liblockfile/ head/devel/liblockfile/Makefile (contents, props changed) head/devel/liblockfile/distinfo (contents, props changed) head/devel/liblockfile/files/ head/devel/liblockfile/files/patch-Makefile.in (contents, props changed) head/devel/liblockfile/pkg-descr (contents, props changed) head/devel/liblockfile/pkg-plist (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Wed Feb 14 16:51:05 2018 (r461817) +++ head/devel/Makefile Wed Feb 14 16:56:29 2018 (r461818) @@ -1445,6 +1445,7 @@ SUBDIR += liblas12 SUBDIR += libleaftag SUBDIR += liblnk + SUBDIR += liblockfile SUBDIR += liblogging SUBDIR += liblognorm SUBDIR += liblouis Added: head/devel/liblockfile/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/liblockfile/Makefile Wed Feb 14 16:56:29 2018 (r461818) @@ -0,0 +1,35 @@ +# Created by: Yasuhiro KIMURA <yasu@utahime.org> +# $FreeBSD$ + +PORTNAME= liblockfile +PORTVERSION= 1.14 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= yasu@utahime.org +COMMENT= Standard lockfile library + +LICENSE= GPLv2+ LGPL21+ +LICENSE_COMB= multi +LICENSE_FILE_GPLv2+ = ${WRKSRC}/licenses/GPL-2 +LICENSE_FILE_LGPL21+ = ${WRKSRC}/licenses/LGPL-2 + +USE_GITHUB= yes +GH_ACCOUNT= miquels + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-shared --with-mailgroup + +USE_LDCONFIG= yes + +PORTDOCS= Changelog README + +OPTIONS_DEFINE= DOCS + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}/${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} +.endfor + +.include <bsd.port.mk> Added: head/devel/liblockfile/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/liblockfile/distinfo Wed Feb 14 16:56:29 2018 (r461818) @@ -0,0 +1,3 @@ +TIMESTAMP = 1513860470 +SHA256 (miquels-liblockfile-v1.14_GH0.tar.gz) = be85dba347889d9b65cbd361a611e6b88e044fdca9c98e5139d5fbc9ba37ccc8 +SIZE (miquels-liblockfile-v1.14_GH0.tar.gz) = 67813 Added: head/devel/liblockfile/files/patch-Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/liblockfile/files/patch-Makefile.in Wed Feb 14 16:56:29 2018 (r461818) @@ -0,0 +1,53 @@ +--- Makefile.in.orig 2017-01-17 13:21:05 UTC ++++ Makefile.in +@@ -14,7 +14,7 @@ prefix = $(DESTDIR)@prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ + libdir = @libdir@ +-mandir = @mandir@ ++mandir = $(DESTDIR)@mandir@ + nfslockdir = @nfslockdir@ + includedir = @includedir@ + datarootdir = @datarootdir@ +@@ -49,11 +49,11 @@ xlockfile.o: lockfile.c + $(CC) $(CFLAGS) -c lockfile.c -o xlockfile.o + + install_static: static install_common +- install -d -m 755 -g root -p $(libdir) ++ install -d -m 755 -p $(libdir) + install -m 644 liblockfile.a $(libdir) + + install_shared: shared install_static install_common +- install -d -m 755 -g root -p $(libdir) ++ install -d -m 755 -p $(libdir) + install -m 755 liblockfile.so \ + $(libdir)/liblockfile.so.$(SOVER) + ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so.$(MAJOR) +@@ -61,21 +61,17 @@ install_shared: shared install_static in + if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi + + install_common: +- install -d -m 755 -g root -p $(includedir) +- install -d -m 755 -g root -p $(bindir) +- install -d -m 755 -g root -p $(mandir)/man1 +- install -d -m 755 -g root -p $(mandir)/man3 ++ install -d -m 755 -p $(includedir) ++ install -d -m 755 -p $(bindir) ++ install -d -m 755 -p $(mandir)/man1 ++ install -d -m 755 -p $(mandir)/man3 + install -m 644 lockfile.h maillock.h $(includedir) +- if [ "$(MAILGROUP)" != "" ]; then\ +- install -g $(MAILGROUP) -m 2755 dotlockfile $(bindir);\ +- else \ +- install -g root -m 755 dotlockfile $(bindir); \ +- fi ++ install -m 755 dotlockfile $(bindir) + install -m 644 *.1 $(mandir)/man1 + install -m 644 *.3 $(mandir)/man3 + + install_nfslib: nfslib +- install -d -m 755 -g root -p $(nfslockdir) ++ install -d -m 755 -p $(nfslockdir) + install -m 755 nfslock.so.$(NFSVER) $(nfslockdir) + if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi + Added: head/devel/liblockfile/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/liblockfile/pkg-descr Wed Feb 14 16:56:29 2018 (r461818) @@ -0,0 +1,24 @@ +This library implements a number of functions found in -lmail on SysV +systems. These functions are designed to lock the standard mailboxes in +/var/mail (or wherever the system puts them). + +In additions, this library adds a number of functions to create, +manage and remove generic lockfiles. + +The lockfiles are created by this library in an NFS-safe manner, that +is by using a tempfile and using link(2) to create the lockfile. It +works around several defects in NFS servers to make sure the lockfile +is created atomically. + +The locking strategy is compatible with other well-written NFS-safe +programs that create lockfiles - such as procmail, exim and mutt. + +If you are trying to lock a mailbox in a directory writable for group +mail, the locking functions will call a helper application which runs +setgid to do the actual locking. The helper application "dotlockfile" +can also be used directly, for example for use in shellscripts. + +This means a program such as a MUA doesn't need to be setgid mail anymore +to be able to lock the mailbox. + +WWW: https://github.com/miquels/liblockfile Added: head/devel/liblockfile/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/liblockfile/pkg-plist Wed Feb 14 16:56:29 2018 (r461818) @@ -0,0 +1,11 @@ +@comment $FreeBSD$ +@(,mail,2755) bin/dotlockfile +include/lockfile.h +include/maillock.h +lib/liblockfile.a +lib/liblockfile.so +lib/liblockfile.so.1 +lib/liblockfile.so.1.0 +man/man1/dotlockfile.1.gz +man/man3/lockfile_create.3.gz +man/man3/maillock.3.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802141656.w1EGuTU1099585>