From owner-freebsd-gnome@FreeBSD.ORG Thu May 3 01:21:18 2007 Return-Path: X-Original-To: gnome@FreeBSD.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 746BF16A401 for ; Thu, 3 May 2007 01:21:18 +0000 (UTC) (envelope-from brians@ca.sophos.com) Received: from lightroast.ca.sophos.com (gw.ca.sophos.com [209.17.183.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4C94913C448 for ; Thu, 3 May 2007 01:21:18 +0000 (UTC) (envelope-from brians@ca.sophos.com) Received: from smtp3.ca.sophos.com (smtp3.ca.sophos.com [192.168.3.19]) by lightroast.ca.sophos.com (8.13.8/8.13.8) with ESMTP id l431LFxc014491; Wed, 2 May 2007 18:21:15 -0700 (PDT) (envelope-from brians@ca.sophos.com) Received: from demarc.ca.sophos.com (demarc.ca.sophos.com [192.168.99.136]) by smtp3.ActiveState.com (8.13.4/8.13.4) with ESMTP id l431LFiM017925; Wed, 2 May 2007 18:21:15 -0700 (envelope-from brians@ca.sophos.com) Received: from conflict.ca.sophos.com (conflict.ca.sophos.com [192.168.98.32]) by demarc.ca.sophos.com (8.14.1/8.14.1) with ESMTP id l431LFCT079161; Wed, 2 May 2007 18:21:15 -0700 (PDT) (envelope-from brians@ca.sophos.com) Date: Wed, 2 May 2007 18:21:14 -0700 From: Brian Somers To: "Joe Marcus Clarke" Message-ID: <20070502182114.6c50443c@conflict.ca.sophos.com> In-Reply-To: <1178088063.28923.0.camel@shumai.marcuscom.com> References: <20070501123616.6b43b4de@conflict.ca.sophos.com> <20070501232448.1239bbd3@dev.lan.Awfulhak.org> <1178088063.28923.0.camel@shumai.marcuscom.com> Organization: Sophos X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-PerlMx-Spam: CA, All, Gauge=IIIIIII, Probability=7%, Report='__C230066_P5 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' X-SpamReport: No antispam rules were triggered by this message Cc: gnome@FreeBSD.org Subject: Re: Fix for x11/gnome-screensaver X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2007 01:21:18 -0000 On Wed, 02 May 2007 02:41:03 -0400 "Joe Marcus Clarke" wrote: > On Tue, 2007-05-01 at 23:24 -0700, Brian Somers wrote: > > On Tue, 1 May 2007 12:36:16 -0700 Brian Somers wrote: > > > Hi, > > > > > > Could someone apply the attached patch for x11/gnome-screensaver > > > or approve it for me to commit? > > > > > > TIA. > > > > > > -- > > > Brian Somers Tel: +1 604 484 6434 > > > Mob: +1 604 315 1343 > > > Sophos - security and control Web: www.sophos.com > > > > > > Index: Makefile > > > =================================================================== > > > RCS file: /usr/home/ncvs/ports/x11/gnome-screensaver/Makefile,v > > > retrieving revision 1.23 > > > diff -u -r1.23 Makefile > > > --- Makefile 11 Apr 2007 13:32:59 -0000 1.23 > > > +++ Makefile 1 May 2007 19:34:17 -0000 > > > @@ -47,7 +47,7 @@ > > > CONFIGURE_ARGS+= --disable-pam > > > .endif > > > > > > -pre-install: > > > +pre-su-install: > > > @${CP} ${.CURDIR}/pkg-plist ${PLIST} > > > @cd ${XSCREENSAVER_DIR} && ${FIND} -s * -maxdepth 1 -type f -name "*.xml" | \ > > > ${GREP} -Ev ${XSCREENSAVER_EXCLUDE} | \ > > > @@ -55,7 +55,7 @@ > > > ${SED} -e 's:[.]xml$$:.desktop:' >> ${PLIST} > > > @${ECHO_CMD} @dirrm ${SCREENSAVER_DIR} >> ${PLIST} > > > > > > -post-install: > > > +post-su-install: > > > ${CHOWN} root ${PREFIX}/libexec/gnome-screensaver-dialog > > > ${CHMOD} +s ${PREFIX}/libexec/gnome-screensaver-dialog > > > ${MKDIR} ${PREFIX}/${SCREENSAVER_DIR} > > > > Hmm, it seems that post-su-install doesn't exist and > > post-install is run with root credentials, so please > > disregard the second part of the patch. > > > > The pre-install -> pre-su-install change is still > > required though... > > Please see my earlier response to you. I don't see why pre-su-install > is required here. Oops, your previous reply was delayed at this end - sorry. It turns out that that the problem is this: $ id uid=2021(packages) gid=2021(packages) groups=2021(packages), 0(wheel) $ su - root -c id uid=0(root) gid=0(wheel) groups=0(wheel), 5(operator) $ pwd /usr/ports/x11/gnome-screensaver $ rm -fr work $ make -DBATCH FORCE_PKG_REGISTER=yes PACKAGES=/packages package ..... ===> Installing for gnome-screensaver-2.18.1 ===> gnome-screensaver-2.18.1 depends on executable in : xscreensaver-gl-helper - found ===> gnome-screensaver-2.18.1 depends on file: /usr/local/etc/mtree/BSD.gnome.dist - found ===> gnome-screensaver-2.18.1 depends on file: /usr/local/libdata/pkgconfig/gnome-mime-data-2.0.pc - found ===> gnome-screensaver-2.18.1 depends on executable in : pkg-config - found cannot create /usr/ports/x11/gnome-screensaver/work/pkg-plist: Permission denied *** Error code 2 *** Error code 2 Stop in /usr/ports/x11/gnome-screensaver. $ ls -l work total 7 drwxr-xr-x 7 packages packages 1024 May 3 01:05 gnome-screensaver-2.18.1 -r--r--r-- 1 packages packages 5729 May 3 01:07 pkg-plist $ ls -l pkg-plist -r--r--r-- 1 packages packages 5729 Mar 19 05:13 pkg-plist As you say, I don't need to be root. The problem is that cp is retaining the permissions on pkg-plist (in my environment where we use perforce, this means read-only). How about the attached patch instead? -- Brian Somers Tel: +1 604 484 6434 Mob: +1 604 315 1343 Sophos - security and control Web: www.sophos.com Index: Makefile =================================================================== RCS file: /usr/home/ncvs/ports/x11/gnome-screensaver/Makefile,v retrieving revision 1.23 diff -u -r1.23 Makefile --- Makefile 11 Apr 2007 13:32:59 -0000 1.23 +++ Makefile 3 May 2007 01:18:39 -0000 @@ -48,7 +48,7 @@ .endif pre-install: - @${CP} ${.CURDIR}/pkg-plist ${PLIST} + @${CAT} ${.CURDIR}/pkg-plist >${PLIST} @cd ${XSCREENSAVER_DIR} && ${FIND} -s * -maxdepth 1 -type f -name "*.xml" | \ ${GREP} -Ev ${XSCREENSAVER_EXCLUDE} | \ ${SED} -e 's:^:${SCREENSAVER_DIR}/:' | \