Date: Wed, 2 May 2007 18:21:14 -0700 From: Brian Somers <brians@ca.sophos.com> To: "Joe Marcus Clarke" <marcus@marcuscom.com> Cc: gnome@FreeBSD.org Subject: Re: Fix for x11/gnome-screensaver 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 02 May 2007 02:41:03 -0400 "Joe Marcus Clarke" <marcus@marcuscom.com> wrote: > On Tue, 2007-05-01 at 23:24 -0700, Brian Somers wrote: > > On Tue, 1 May 2007 12:36:16 -0700 Brian Somers <brians@ca.sophos.com> 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}/:' | \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070502182114.6c50443c>