Catch up with trunk
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/branches/nooath@736 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
fd3a018fbf
commit
83162901d4
5
TODO
5
TODO
|
@ -9,4 +9,9 @@ Before the next release:
|
||||||
|
|
||||||
- Add loop detection to openpam_load_chain().
|
- Add loop detection to openpam_load_chain().
|
||||||
|
|
||||||
|
- Look into the possibility of implementing a version of (or a
|
||||||
|
wrapper for) openpam_log() which respects the PAM_SILENT flag and
|
||||||
|
the no_warn module option. This would eliminate the need for
|
||||||
|
FreeBSD's _pam_verbose_error().
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
|
|
|
@ -265,7 +265,7 @@ sub parse_source($) {
|
||||||
$man .= ".Bl -tag -width 18n\n";
|
$man .= ".Bl -tag -width 18n\n";
|
||||||
$intaglist = 1;
|
$intaglist = 1;
|
||||||
}
|
}
|
||||||
s/^\.It [=;]([A-Za-z][A-Za-z_]+)$/.It Dv $1/gs;
|
s/^\.It [=;]([A-Za-z][0-9A-Za-z_]+)$/.It Dv $1/gs;
|
||||||
$man .= "$_\n";
|
$man .= "$_\n";
|
||||||
next;
|
next;
|
||||||
} elsif (($inlist || $intaglist) && m/^\S/) {
|
} elsif (($inlist || $intaglist) && m/^\S/) {
|
||||||
|
@ -293,16 +293,16 @@ sub parse_source($) {
|
||||||
s/\s*=($func)\b\s*/\n.Fn $1\n/gs;
|
s/\s*=($func)\b\s*/\n.Fn $1\n/gs;
|
||||||
s/\s*=($argnames)\b\s*/\n.Fa $1\n/gs;
|
s/\s*=($argnames)\b\s*/\n.Fa $1\n/gs;
|
||||||
s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs;
|
s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs;
|
||||||
s/\s*:([a-z_]+)\b\s*/\n.Va $1\n/gs;
|
s/\s*:([a-z][0-9a-z_]+)\b\s*/\n.Va $1\n/gs;
|
||||||
s/\s*;([a-z_]+)\b\s*/\n.Dv $1\n/gs;
|
s/\s*;([a-z][0-9a-z_]+)\b\s*/\n.Dv $1\n/gs;
|
||||||
s/\s*=!([a-z_]+)\b\s*/\n.Xr $1 3\n/gs;
|
s/\s*=!([a-z][0-9a-z_]+)\b\s*/\n.Xr $1 3\n/gs;
|
||||||
while (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/s) {
|
while (s/\s*=([a-z][0-9a-z_]+)\b\s*/\n.Xr $1 3\n/s) {
|
||||||
++$xref{3}->{$1};
|
++$xref{3}->{$1};
|
||||||
}
|
}
|
||||||
s/\s*\"(?=\w)/\n.Do\n/gs;
|
s/\s*\"(?=\w)/\n.Do\n/gs;
|
||||||
s/\"(?!\w)\s*/\n.Dc\n/gs;
|
s/\"(?!\w)\s*/\n.Dc\n/gs;
|
||||||
s/\s*=([A-Z][A-Z_]+)\b\s*(?![\.,:;])/\n.Dv $1\n/gs;
|
s/\s*=([A-Z][0-9A-Z_]+)\b\s*(?![\.,:;])/\n.Dv $1\n/gs;
|
||||||
s/\s*=([A-Z][A-Z_]+)\b([\.,:;]+)\s*/\n.Dv $1 $2\n/gs;
|
s/\s*=([A-Z][0-9A-Z_]+)\b([\.,:;]+)\s*/\n.Dv $1 $2\n/gs;
|
||||||
s/\s*{([A-Z][a-z] .*?)}\s*/\n.$1\n/gs;
|
s/\s*{([A-Z][a-z] .*?)}\s*/\n.$1\n/gs;
|
||||||
$man .= "$_\n";
|
$man .= "$_\n";
|
||||||
}
|
}
|
||||||
|
|
69
mkpkgng.in
69
mkpkgng.in
|
@ -1,4 +1,31 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
#-
|
||||||
|
# Copyright (c) 2013 Dag-Erling Smørgrav
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
@ -42,7 +69,7 @@ cd "$srcdir"
|
||||||
#
|
#
|
||||||
# Determine pkgng version and ABI
|
# Determine pkgng version and ABI
|
||||||
#
|
#
|
||||||
pkgver=$(pkg query %v pkg)
|
pkgver=$(pkg -vv | awk '$1 == "Version:" { print $2 }')
|
||||||
[ -n "$pkgver" ] || error "Unable to determine pkgng version."
|
[ -n "$pkgver" ] || error "Unable to determine pkgng version."
|
||||||
pkgabi=$(pkg -vv | awk '$1 == "ABI:" { print $2 }')
|
pkgabi=$(pkg -vv | awk '$1 == "ABI:" { print $2 }')
|
||||||
[ -n "$pkgabi" ] || error "Unable to determine package ABI."
|
[ -n "$pkgabi" ] || error "Unable to determine package ABI."
|
||||||
|
@ -73,28 +100,29 @@ make="$make --no-print-directory --quiet V=0"
|
||||||
#
|
#
|
||||||
# Create temporary directory
|
# Create temporary directory
|
||||||
#
|
#
|
||||||
info "Creating temporary directory."
|
info "Creating the temporary directory."
|
||||||
tmproot=$(mktemp -d "${TMPDIR:-/tmp}/$package-$version.XXXXXX")
|
tmproot=$(mktemp -d "${TMPDIR:-/tmp}/$package-$version.XXXXXX")
|
||||||
[ -n "$tmproot" -a -d "$tmproot" ] || error "unable to create temporary directory"
|
[ -n "$tmproot" -a -d "$tmproot" ] || \
|
||||||
|
error "Unable to create the temporary directory."
|
||||||
trap "exit 1" INT
|
trap "exit 1" INT
|
||||||
trap "info Deleting temporary directory. ; rm -rf '$tmproot'" EXIT
|
trap "info Deleting the temporary directory. ; rm -rf '$tmproot'" EXIT
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install into tmproot
|
# Install into tmproot
|
||||||
#
|
#
|
||||||
info "Installing into temporary directory."
|
info "Installing into the temporary directory."
|
||||||
$make install DESTDIR="$tmproot"
|
$make install DESTDIR="$tmproot"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate stub manifest
|
# Generate stub manifest
|
||||||
#
|
#
|
||||||
info "Generating stub manifest."
|
info "Generating the stub manifest."
|
||||||
manifest="$tmproot/+MANIFEST"
|
manifest="$tmproot/+MANIFEST"
|
||||||
cat >"$manifest" <<EOF
|
cat >"$manifest" <<EOF
|
||||||
name: $package
|
name: $package
|
||||||
version: $version
|
version: $version
|
||||||
origin: local/openpam
|
origin: local/$package
|
||||||
comment: BSD-licensed PAM implementation
|
comment: BSD-licensed PAM implementation
|
||||||
arch: $pkgabi
|
arch: $pkgabi
|
||||||
www: @PACKAGE_URL@
|
www: @PACKAGE_URL@
|
||||||
|
@ -112,8 +140,10 @@ desc:
|
||||||
categories: local, security
|
categories: local, security
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
#
|
||||||
# Generate file list
|
# Generate file list
|
||||||
info "Generating file list."
|
#
|
||||||
|
info "Generating the file list."
|
||||||
(
|
(
|
||||||
echo "files:"
|
echo "files:"
|
||||||
find "$tmproot" -type f | while read file ; do
|
find "$tmproot" -type f | while read file ; do
|
||||||
|
@ -124,18 +154,13 @@ info "Generating file list."
|
||||||
done
|
done
|
||||||
)>>"$manifest"
|
)>>"$manifest"
|
||||||
|
|
||||||
# As of pkg 1.1.4, the shlib detection logic in "pkg create" only
|
#
|
||||||
# works when tmproot == "/", so instead of creating a package directly
|
# Create the package
|
||||||
# from the contents of $tmproot, we have to install to / and package
|
#
|
||||||
# that.
|
info "Creating the package."
|
||||||
info "Packaging."
|
pkg create -r "$tmproot" -m "$tmproot" -o "$builddir"
|
||||||
if [ "$pkgver" \< "1.1.5" ] ; then
|
|
||||||
info "pkg 1.1.4 or older detected."
|
|
||||||
yesno "We must now install to /. Proceed?" || error "Chicken."
|
|
||||||
$make install
|
|
||||||
pkg create -m "$tmproot" -o "$builddir"
|
|
||||||
else
|
|
||||||
pkg create -r "$tmproot" -m "$tmproot" -o "$builddir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Package created for $package-$version."
|
#
|
||||||
|
# Done
|
||||||
|
#
|
||||||
|
info "Package created for $package-$version."
|
||||||
|
|
Loading…
Reference in New Issue