Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jan 2014 02:00:01 GMT
From:      Jason Helfman <jgh@FreeBSD.org>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/185460: sysutils/tarsnap: support staging
Message-ID:  <201401050200.s05201ci049547@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/185460; it has been noted by GNATS.

From: Jason Helfman <jgh@FreeBSD.org>
To: Colin Percival <cperciva@tarsnap.com>
Cc: bug-followup <bug-followup@freebsd.org>, Jason Helfman <jgh@freebsd.org>
Subject: Re: ports/185460: sysutils/tarsnap: support staging
Date: Sat, 4 Jan 2014 17:55:02 -0800

 --001a1134ab3c79097e04ef2f6e47
 Content-Type: text/plain; charset=ISO-8859-1
 
 On Sat, Jan 4, 2014 at 4:20 AM, Colin Percival <cperciva@tarsnap.com> wrote:
 
 > I don't think this patch is correct, specifically the bit dealing with
 > copying tarsnap.conf.sample to tarsnap.conf if there is no tarsnap.conf
 > file present yet.  There's *never* going to be such a file in the staging
 > directory.
 >
 > Should the entire post-install be removed?  There's an @exec in pkg-plist
 > which (I think) does the copying if required; is that now guaranteed to
 > be executed even if the port is installed "manually" via staging?
 >
 > --
 > Colin Percival
 > Security Officer Emeritus, FreeBSD | The power to serve
 > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
 >
 >
 Yes, removing the post-install does take care of the configuration file
 just fine. I tested this in using ports, staging, and just using the
 package.
 
 Below is the updated diff.
 
 [jgh@hatter ~/workspace/ports/sysutils/tarsnap]$ svn diff
 Index: pkg-plist
 ===================================================================
 --- pkg-plist    (revision 338623)
 +++ pkg-plist    (working copy)
 @@ -3,6 +3,12 @@
  bin/tarsnap-keymgmt
  bin/tarsnap-keyregen
  bin/tarsnap-recrypt
 +man/man1/tarsnap-keygen.1.gz
 +man/man1/tarsnap-keymgmt.1.gz
 +man/man1/tarsnap-keyregen.1.gz
 +man/man1/tarsnap-recrypt.1.gz
 +man/man1/tarsnap.1.gz
 +man/man5/tarsnap.conf.5.gz
  @unexec if cmp -s %D/etc/tarsnap.conf.sample %D/etc/tarsnap.conf; then rm
 -f %D/etc/tarsnap.conf; fi
  etc/tarsnap.conf.sample
  @exec if [ ! -f %D/etc/tarsnap.conf ] ; then cp -p %D/%F %B/tarsnap.conf;
 fi
 Index: Makefile
 ===================================================================
 --- Makefile    (revision 338623)
 +++ Makefile    (working copy)
 @@ -15,18 +15,12 @@
  GNU_CONFIGURE=    yes
  USES=        gmake
 
 -MAN1=        tarsnap.1 tarsnap-keygen.1 tarsnap-keymgmt.1    \
 -        tarsnap-keyregen.1 tarsnap-recrypt.1
 -MAN5=        tarsnap.conf.5
 -
  OPTIONS_DEFINE=    SSE2
  SSE2_DESC=    Use SSE2-optimized code
 
  SSE2_CONFIGURE_ENABLE=    sse2
  SSE2_CFLAGS=    -msse2
 
 -NO_STAGE=    yes
 -
  .include <bsd.port.pre.mk>
 
  # safety check to ensure that we don't violate the license
 @@ -34,10 +28,4 @@
  RESTRICTED=     license only allows redistribution and use of unmodified
 source and binaries
  .endif
 
 -post-install:
 -    @if [ ! -f ${PREFIX}/etc/tarsnap.conf ]; then \
 -        ${CP} -p ${PREFIX}/etc/tarsnap.conf.sample
 ${PREFIX}/etc/tarsnap.conf ; \
 -    fi
 -    @${CAT} ${PKGDIR}/pkg-message
 -
  .include <bsd.port.post.mk>
 
 -- 
 Jason Helfman          | FreeBSD Committer
 jgh@FreeBSD.org     | http://people.freebsd.org/~jgh  | The Power to Serve
 
 --001a1134ab3c79097e04ef2f6e47
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"ltr">On Sat, Jan 4, 2014 at 4:20 AM, Colin Percival <span dir=
 =3D"ltr">&lt;<a href=3D"mailto:cperciva@tarsnap.com" target=3D"_blank">cper=
 civa@tarsnap.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div c=
 lass=3D"gmail_quote">
 <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
 left:1px solid rgb(204,204,204);padding-left:1ex">I don&#39;t think this pa=
 tch is correct, specifically the bit dealing with<br>
 copying tarsnap.conf.sample to tarsnap.conf if there is no tarsnap.conf<br>
 file present yet. =A0There&#39;s *never* going to be such a file in the sta=
 ging<br>
 directory.<br>
 <br>
 Should the entire post-install be removed? =A0There&#39;s an @exec in pkg-p=
 list<br>
 which (I think) does the copying if required; is that now guaranteed to<br>
 be executed even if the port is installed &quot;manually&quot; via staging?=
 <br>
 <span class=3D""><font color=3D"#888888"><br>
 --<br>
 Colin Percival<br>
 Security Officer Emeritus, FreeBSD | The power to serve<br>
 Founder, Tarsnap | <a href=3D"http://www.tarsnap.com" target=3D"_blank">www=
 .tarsnap.com</a> | Online backups for the truly paranoid<br>
 <br>
 </font></span></blockquote></div><br></div><div class=3D"gmail_extra">Yes, =
 removing the post-install does take care of the configuration file just fin=
 e. I tested this in using ports, staging, and just using the package.<br>
 <br></div><div class=3D"gmail_extra">Below is the updated diff.<br><br>[jgh=
 @hatter ~/workspace/ports/sysutils/tarsnap]$ svn diff<br>Index: pkg-plist<b=
 r>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
 --- pkg-plist=A0=A0=A0 (revision 338623)<br>+++ pkg-plist=A0=A0=A0 (working=
  copy)<br>@@ -3,6 +3,12 @@<br>=A0bin/tarsnap-keymgmt<br>=A0bin/tarsnap-keyr=
 egen<br>=A0bin/tarsnap-recrypt<br>+man/man1/tarsnap-keygen.1.gz<br>+man/man=
 1/tarsnap-keymgmt.1.gz<br>
 +man/man1/tarsnap-keyregen.1.gz<br>+man/man1/tarsnap-recrypt.1.gz<br>+man/m=
 an1/tarsnap.1.gz<br>+man/man5/tarsnap.conf.5.gz<br>=A0@unexec if cmp -s %D/=
 etc/tarsnap.conf.sample %D/etc/tarsnap.conf; then rm -f %D/etc/tarsnap.conf=
 ; fi<br>
 =A0etc/tarsnap.conf.sample<br>=A0@exec if [ ! -f %D/etc/tarsnap.conf ] ; th=
 en cp -p %D/%F %B/tarsnap.conf; fi<br>Index: Makefile<br>=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>--- Makefile=A0=A0=A0 (revision 338623=
 )<br>
 +++ Makefile=A0=A0=A0 (working copy)<br>@@ -15,18 +15,12 @@<br>=A0GNU_CONFI=
 GURE=3D=A0=A0=A0 yes<br>=A0USES=3D=A0=A0=A0 =A0=A0=A0 gmake<br>=A0<br>-MAN1=
 =3D=A0=A0=A0 =A0=A0=A0 tarsnap.1 tarsnap-keygen.1 tarsnap-keymgmt.1=A0=A0=
 =A0 \<br>-=A0=A0=A0 =A0=A0=A0 tarsnap-keyregen.1 tarsnap-recrypt.1<br>
 -MAN5=3D=A0=A0=A0 =A0=A0=A0 tarsnap.conf.5<br>-<br>=A0OPTIONS_DEFINE=3D=A0=
 =A0=A0 SSE2<br>=A0SSE2_DESC=3D=A0=A0=A0 Use SSE2-optimized code<br>=A0<br>=
 =A0SSE2_CONFIGURE_ENABLE=3D=A0=A0=A0 sse2<br>=A0SSE2_CFLAGS=3D=A0=A0=A0 -ms=
 se2<br>=A0<br>-NO_STAGE=3D=A0=A0=A0 yes<br>-<br>=A0.include &lt;<a href=3D"=
 http://bsd.port.pre.mk">bsd.port.pre.mk</a>&gt;<br>;
 =A0<br>=A0# safety check to ensure that we don&#39;t violate the license<br=
 >@@ -34,10 +28,4 @@<br>=A0RESTRICTED=3D=A0=A0=A0=A0 license only allows red=
 istribution and use of unmodified source and binaries<br>=A0.endif<br>=A0<b=
 r>-post-install:<br>
 -=A0=A0=A0 @if [ ! -f ${PREFIX}/etc/tarsnap.conf ]; then \<br>-=A0=A0=A0 =
 =A0=A0=A0 ${CP} -p ${PREFIX}/etc/tarsnap.conf.sample ${PREFIX}/etc/tarsnap.=
 conf ; \<br>-=A0=A0=A0 fi<br>-=A0=A0=A0 @${CAT} ${PKGDIR}/pkg-message<br>-<=
 br>=A0.include &lt;<a href=3D"http://bsd.port.post.mk">bsd.port.post.mk</a>=
 &gt;<br clear=3D"all">
 </div><div class=3D"gmail_extra"><br>-- <br><div dir=3D"ltr">Jason Helfman=
 =A0=A0=A0=A0=A0=A0 =A0=A0 | FreeBSD Committer<br>jgh@FreeBSD.org=A0=A0=A0=
 =A0 | <a href=3D"http://people.freebsd.org/%7Ejgh" target=3D"_blank">http:/=
 /people.freebsd.org/~jgh</a>=A0 | The Power to Serve<br>
 </div>
 </div></div>
 
 --001a1134ab3c79097e04ef2f6e47--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401050200.s05201ci049547>