From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 19 17:00:30 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A47BE16A4DA for ; Thu, 19 Oct 2006 17:00:30 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C76343D45 for ; Thu, 19 Oct 2006 17:00:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9JH0SYA061132 for ; Thu, 19 Oct 2006 17:00:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9JH0SCH061130; Thu, 19 Oct 2006 17:00:28 GMT (envelope-from gnats) Resent-Date: Thu, 19 Oct 2006 17:00:28 GMT Resent-Message-Id: <200610191700.k9JH0SCH061130@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ulrich Spoerlein Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8AA316A412 for ; Thu, 19 Oct 2006 16:51:19 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id B28CD43D49 for ; Thu, 19 Oct 2006 16:51:18 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so439999uge for ; Thu, 19 Oct 2006 09:51:17 -0700 (PDT) Received: by 10.67.119.5 with SMTP id w5mr275425ugm; Thu, 19 Oct 2006 09:51:15 -0700 (PDT) Received: from coyote.q.local ( [85.180.150.183]) by mx.google.com with ESMTP id e23sm230072ugd.2006.10.19.09.51.15; Thu, 19 Oct 2006 09:51:15 -0700 (PDT) Message-Id: <4537ad03.269d1fa8.5013.3580@mx.google.com> Date: Thu, 19 Oct 2006 09:51:15 -0700 (PDT) From: Ulrich Spoerlein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: scott-ports@tummy.com Subject: ports/104577: [PATCH] sysutils/heartbeat: update to 1.2.5 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 17:00:30 -0000 >Number: 104577 >Category: ports >Synopsis: [PATCH] sysutils/heartbeat: update to 1.2.5 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Oct 19 17:00:28 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ulrich Spoerlein >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD coyote 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sun Oct 1 16:34:48 CEST >Description: - Update to 1.2.5, fixing a DoS vulnerability - usr /var for runtime files making it possible to keep /usr mounted r/o - Grab 275 as a reserved UID and GID - Remove old cruft in pkg-install - Make 'make -DBATCH install' work non-interactively - Make 'pkg_add heartbeat-1.2.5' work non-interactively Note: Installation will fail without the user/group, so I simply create them Port maintainer (scott-ports@tummy.com) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- heartbeat-1.2.5.patch begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/sysutils/heartbeat/Makefile,v retrieving revision 1.7 diff -u -p -u -r1.7 Makefile --- Makefile 15 Aug 2006 01:04:51 -0000 1.7 +++ Makefile 19 Oct 2006 16:26:36 -0000 @@ -6,7 +6,7 @@ # PORTNAME= heartbeat -PORTVERSION= 1.2.4 +PORTVERSION= 1.2.5 CATEGORIES= sysutils MASTER_SITES= http://linux-ha.org/download/ @@ -24,7 +24,9 @@ USE_GNOME= glib12 USE_LDCONFIG= yes CONFIGURE_ARGS+= --disable-fatal-warnings \ - --with-initdir=${PREFIX}/etc/rc.d + --with-initdir=${PREFIX}/etc/rc.d \ + --localstatedir=/var \ + --with-group-id=275 --with-ccmuser-id=275 SUB_FILES= pkg-install PKGDEINSTALL= ${PKGINSTALL} @@ -63,11 +65,15 @@ post-patch: ${WRKSRC}/telecom/cms/Makefile.in .endif +.if !defined(BATCH) +BATCH=no +.endif + post-deinstall: - @${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL + @BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL post-install: - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL # some subdirs treat man as documentation, therefor we have to install # those man pages manually if NOPORTDOCS is defined Index: distinfo =================================================================== RCS file: /home/ncvs/ports/sysutils/heartbeat/distinfo,v retrieving revision 1.3 diff -u -p -u -r1.3 distinfo --- distinfo 18 Apr 2006 21:53:58 -0000 1.3 +++ distinfo 19 Oct 2006 16:26:36 -0000 @@ -1,3 +1,3 @@ -MD5 (heartbeat-1.2.4.tar.gz) = 7e3f752af06c25f7141c4b67a538e718 -SHA256 (heartbeat-1.2.4.tar.gz) = cb2516a965582651859ab48a44dd8764332897ef9a81986a0aa25dc9306378cf -SIZE (heartbeat-1.2.4.tar.gz) = 2102978 +MD5 (heartbeat-1.2.5.tar.gz) = d59b021af0e1cbaba56345cc67f6ef12 +SHA256 (heartbeat-1.2.5.tar.gz) = 46f88a69324012317a4426dc93654ab28947b77675826686624d15cd5a4e357f +SIZE (heartbeat-1.2.5.tar.gz) = 2107371 Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/sysutils/heartbeat/pkg-plist,v retrieving revision 1.3 diff -u -p -u -r1.3 pkg-plist --- pkg-plist 18 Apr 2006 21:53:58 -0000 1.3 +++ pkg-plist 19 Oct 2006 16:26:36 -0000 @@ -271,6 +271,6 @@ sbin/supervise-ldirectord-config @dirrmtry etc/ha.d/conf @dirrmtry etc/ha.d @cwd / -@dirrmtry var/lib/heartbeat/ckpt -@dirrmtry var/lib/heartbeat/ccm -@dirrmtry var/lib/heartbeat +@dirrmtry var/lock/subsys +@dirrmtry var/lock +@dirrmtry var/lib Index: files/pkg-install.in =================================================================== RCS file: /home/ncvs/ports/sysutils/heartbeat/files/pkg-install.in,v retrieving revision 1.2 diff -u -p -u -r1.2 pkg-install.in --- files/pkg-install.in 18 Apr 2006 21:53:58 -0000 1.2 +++ files/pkg-install.in 19 Oct 2006 16:26:36 -0000 @@ -1,17 +1,15 @@ #! /bin/sh -BATCH=${BATCH:=no} -base=%%PREFIX%% - ask() { local question default answer question=$1 default=$2 - if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then + # pkg_add fails anyhow, if we do not create the user/group + if [ "x${BATCH}" = xno ]; then read -p "${question} [${default}]? " answer fi - if [ x${answer} = x ]; then + if [ "x${answer}" = x ]; then answer=${default} fi echo ${answer} @@ -33,26 +31,22 @@ yesno() { } make_account() { - local u g gcos homeopt home + local u g uid gid u=$1 g=$2 - gcos=$3 - homeopt=${4:+"-d $4"} + uid=$3 + gid=$4 if pw group show "${g}" >/dev/null 2>&1; then echo "You already have a group \"${g}\", so I will use it." else echo "You need a group \"${g}\"." - if which -s pw && yesno "Would you like me to create it" y; then - pw groupadd ${g} || exit + if yesno "Would you like me to create it" y; then + pw groupadd ${g} -g ${gid} || exit echo "Done." else - echo "Please create it, and try again." - if ! grep -q "^${u}:" /etc/passwd; then - echo "While you're at it, please create a user \"${u}\" too," - echo "with a default group of \"${g}\"." - fi + echo "Please create it manually, and try again." exit 1 fi fi @@ -61,90 +55,52 @@ make_account() { echo "You already have a user \"${u}\", so I will use it." else echo "You need a user \"${u}\"." - if which -s pw && yesno "Would you like me to create it" y; then - pw useradd ${u} -g ${g} -h - ${homeopt} \ - -s /nonexistent -c "${gcos}" || exit + if yesno "Would you like me to create it" y; then + pw useradd ${u} -u ${uid} -g ${g} -h - -d /nonexistant \ + -s /sbin/nologin -c "Heartbeat cluster user" || exit echo "Done." else echo "Please create it, and try again." exit 1 fi fi - - if [ x"$homeopt" = x ]; then - eval home=~${u} - if [ ! -d "${home}" ]; then - if yesno \ - "Would you like me to create ${u}'s home directory (${home})" y - then - mkdir -p ${home} || exit - chown -R ${u}:${g} ${home} || exit - chmod -R go= ${home} || exit - else - echo "Please create it, and try again." - exit 1 - fi - fi - fi } delete_account() { - local u g home + local u g u=$1 g=$2 if yesno "Do you want me to remove group \"${g}\"" y; then + echo "Removing group \"${g}\"" pw groupdel -n ${g} echo "Done." fi if yesno "Do you want me to remove user \"${u}\"" y; then - eval home=~${u} + echo "Removing user \"${u}\"" pw userdel -n ${u} echo "Done." - if [ -d "${home}" ]; then - echo "Please remember to remove the home directory \"${home}\" as" - echo "well as the mirrored files." - fi fi } case $2 in POST-INSTALL) - if which -s pw && which -s lockf; then - : - else - cat <Release-Note: >Audit-Trail: >Unformatted: