BSD Ports

devel/liblockfile 1.16 MidnightBSD

Standard lockfile library

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
gpl2, lgpl2.1
Categories
devel

Description

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.

In the other systems

SystemPortVersion
MidnightBSDdevel/liblockfile1.16
FreeBSDdevel/liblockfile1.17_1
DragonFlydevel/liblockfile1.17_1
HardenedBSDdevel/liblockfile1.17_1
GhostBSDdevel/liblockfile1.17_1

Install

Binary package:

mport install liblockfile

From mports:

cd /usr/mports/devel/liblockfile && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	liblockfile>0:devel/liblockfile
LIB_DEPENDS=	liblockfile.so:devel/liblockfile

Dependencies

Configuration

Options name: devel_liblockfile

OptionDefaultDescription
DOCSoff
Service scripts
none

Files

Manual pages 3
  • dotlockfile(1)
  • lockfile_create(3)
  • maillock(3)
pkg-plist 10
  • @(,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
  • share/man/man1/dotlockfile.1.gz
  • share/man/man3/lockfile_create.3.gz
  • share/man/man3/maillock.3.gz
distinfo 1
FileSizeSHA256
miquels-liblockfile-v1.16_GH0.tar.gz68591dfc552c72a93a28279017e81c9e1924b12cc97e4faca8faf5ddbba6b6f048e01