From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Apr 4 12:40:02 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17177106566C for ; Wed, 4 Apr 2012 12:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DA8CA8FC15 for ; Wed, 4 Apr 2012 12:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q34Ce1Kv070185 for ; Wed, 4 Apr 2012 12:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q34Ce1QP070184; Wed, 4 Apr 2012 12:40:01 GMT (envelope-from gnats) Resent-Date: Wed, 4 Apr 2012 12:40:01 GMT Resent-Message-Id: <201204041240.q34Ce1QP070184@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, Guido Falsi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FE7F1065674 for ; Wed, 4 Apr 2012 12:36:42 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC308FC0C for ; Wed, 4 Apr 2012 12:36:41 +0000 (UTC) Received: from megatron.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 3VN69h0mX6z1pB for ; Wed, 4 Apr 2012 14:36:40 +0200 (CEST) Received: from megatron.madpilot.net ([127.0.0.1]) by megatron.madpilot.net (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7NzvBpAlPpFO for ; Wed, 4 Apr 2012 14:36:34 +0200 (CEST) Received: by megatron.madpilot.net (Postfix, from userid 1000) id 3VN69Z3ZpSz1p9; Wed, 4 Apr 2012 14:36:34 +0200 (CEST) Message-Id: <3VN69Z3ZpSz1p9@megatron.madpilot.net> Date: Wed, 4 Apr 2012 14:36:34 +0200 (CEST) From: Guido Falsi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/166638: [maintainer-update] www/chpasswd: fix build with cland and preserve config file X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Guido Falsi List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 12:40:02 -0000 >Number: 166638 >Category: ports >Synopsis: [maintainer-update] www/chpasswd: fix build with cland and preserve config file >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Apr 04 12:40:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Guido Falsi >Release: FreeBSD 9.0-STABLE amd64 >Organization: none >Environment: System: FreeBSD megatron.madpilot.net 9.0-STABLE FreeBSD 9.0-STABLE #4 r233791: Mon Apr 2 21:14:27 CEST 2012 root@megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON amd64 >Description: Fix build with clang. Modify port to not remove the config file on deinstall. Bumped port revision. Unluckily when upgrading the port the config file will be anyway deleted this time since it is in the installed port plist from the previous version. I don't know how to avoid this. Could this be ignored, or should a warning be added to UPDATING? Added file: files/patch-chpasswd.c >How-To-Repeat: >Fix: diff -ruN chpasswd.old/Makefile chpasswd/Makefile --- chpasswd.old/Makefile 2012-04-04 14:30:20.624062896 +0200 +++ chpasswd/Makefile 2012-04-04 14:30:32.656062622 +0200 @@ -7,6 +7,7 @@ PORTNAME= chpasswd PORTVERSION= 2.2.4 +PORTREVISION= 1 CATEGORIES= www #MASTER_SITES= SF/orsochpasswd/orsochpasswd/chpasswd-2.2.4/ MASTER_SITES= SF/orso${PORTNAME}/orso${PORTNAME}/${PORTNAME}-${PORTVERSION}/ diff -ruN chpasswd.old/files/patch-Makefile.in chpasswd/files/patch-Makefile.in --- chpasswd.old/files/patch-Makefile.in 2012-04-04 14:30:20.623062523 +0200 +++ chpasswd/files/patch-Makefile.in 2012-04-04 14:30:32.655068780 +0200 @@ -1,5 +1,5 @@ ---- Makefile.in.orig Wed Feb 11 14:56:26 2004 -+++ Makefile.in Wed Feb 11 14:57:15 2004 +--- Makefile.in.orig 2009-02-16 18:04:20.000000000 +0100 ++++ Makefile.in 2012-04-04 11:40:46.773080089 +0200 @@ -1,13 +1,13 @@ # Makefile.in for chpasswd.cgi @@ -16,7 +16,15 @@ PREFIX = @prefix@ DEFS = -I. @DEFS@ -DPREFIX=\"@prefix@\" -@@ -43,7 +43,7 @@ +@@ -37,13 +37,13 @@ + echo "cp $(PREFIX)/chpasswd.conf"; \ + cp chpasswd.conf $(PREFIX)/chpasswd.conf; \ + chmod 755 $(PREFIX)/chpasswd.conf; \ +- else \ +- cp chpasswd.conf $(PREFIX)/chpasswd.conf.orig; \ + fi ++ @echo "cp $(PREFIX)/chpasswd.conf.sample" ++ @cp chpasswd.conf $(PREFIX)/chpasswd.conf.sample @if test ! -f $(PREFIX)/chpasswd.log; then \ echo "touch $(PREFIX)/chpasswd.log"; \ touch $(PREFIX)/chpasswd.log; \ diff -ruN chpasswd.old/files/patch-chpasswd.c chpasswd/files/patch-chpasswd.c --- chpasswd.old/files/patch-chpasswd.c 1970-01-01 01:00:00.000000000 +0100 +++ chpasswd/files/patch-chpasswd.c 2012-04-04 14:30:32.656062622 +0200 @@ -0,0 +1,108 @@ +--- chpasswd.c.orig 2012-04-03 23:09:02.516342475 +0200 ++++ chpasswd.c 2012-04-03 23:09:54.396341248 +0200 +@@ -804,7 +804,7 @@ + + if (strcmp(getenv("REQUEST_METHOD"), "GET") == 0) { + UserForm(PwdMinLen,PwdMaxLen,PwdMinChar,PwdMinNum,PwdMinSpec,BgColor,TxColor,TiColor,RuColor,Logo,Width,Height,Header,BgImage,ShowInfo); +- return; ++ return 0; + } + + pContentLength = getenv("CONTENT_LENGTH"); +@@ -852,7 +852,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strlen(New_pw1) < atoi(PwdMinLen)) { +@@ -860,7 +860,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strlen(New_pw1) > atoi(PwdMaxLen)) { +@@ -868,7 +868,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strcmp(Old_pw, New_pw1) == 0) { +@@ -876,7 +876,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strcmp(New_pw1, New_pw2) != 0) { +@@ -884,13 +884,13 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if ((fpw = fopen(PwdFile, "r")) == NULL) { + sprintf(Msg, "%s %s",msg07, PwdFile); + Herror(Msg); +- return; ++ return 0; + } + + fd = mkstemp(template); +@@ -898,7 +898,7 @@ + ((tmp = fdopen (fd, "w+" )) == NULL) ) { /* failure, bail out */ + sprintf(Msg, "%s",msg08); + Herror(Msg); +- return; ++ return 0; + } + while (fgets(buf, MAXLEN, fpw) != NULL) { + if (!ok) { +@@ -918,7 +918,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + (void) srand((int) time((time_t *) NULL)); +@@ -943,13 +943,13 @@ + if ((tmp = fopen(template, "r")) == NULL) { + sprintf(Msg, "%s",msg08); + Herror(Msg); +- return; ++ return 0; + } + + if ((fpw = fopen(PwdFile, "w")) == NULL) { + sprintf(Msg, "%s",msg07); + Herror(Msg); +- return; ++ return 0; + } + + while (fgets(buf, MAXLEN, tmp) != NULL) +@@ -970,8 +970,8 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + } +- return; ++ return 0; + } diff -ruN chpasswd.old/pkg-plist chpasswd/pkg-plist --- chpasswd.old/pkg-plist 2012-04-04 14:30:20.624062896 +0200 +++ chpasswd/pkg-plist 2012-04-04 14:30:32.656062622 +0200 @@ -1,4 +1,6 @@ -etc/chpasswd/chpasswd.conf +@unexec if cmp -s %D/etc/chpasswd/chpasswd.conf.sample %D/etc/chpasswd/chpasswd.conf; then rm -f %D/etc/chpasswd/chpasswd.conf; fi +etc/chpasswd/chpasswd.conf.sample +@exec if [ ! -f %D/etc/chpasswd/chpasswd.conf ] ; then cp -p %D/%F %B/chpasswd/chpasswd.conf; fi etc/chpasswd/chpasswd.log www/cgi-bin/chpasswd.cgi @dirrm etc/chpasswd >Release-Note: >Audit-Trail: >Unformatted: