FreeBSD Bugzilla – Attachment 170828 Details for
Bug 209852
sysutils/zrep: Update to 1.5.5 and switch to github
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update patch (with LOCALBASE)
zrep-1.5.5.patch (text/plain), 7.91 KB, created by
Jimmy Olgeni
on 2016-05-30 14:11:26 UTC
(
hide
)
Description:
Update patch (with LOCALBASE)
Filename:
MIME Type:
Creator:
Jimmy Olgeni
Created:
2016-05-30 14:11:26 UTC
Size:
7.91 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 416145) >+++ Makefile (working copy) >@@ -1,12 +1,8 @@ > # $FreeBSD$ > > PORTNAME= zrep >-PORTVERSION= 1.0.1 >+PORTVERSION= 1.5.5 > CATEGORIES= sysutils >-MASTER_SITES= http://www.bolthole.com/solaris/zrep/ \ >- http://www.bsdstore.ru/downloads/ >-DISTNAME= ${PORTNAME} >-EXTRACT_SUFX= > > MAINTAINER= olevole@olevole.ru > COMMENT= ZFS based replication and failover solution >@@ -15,16 +11,16 @@ > > PLIST_FILES= bin/zrep > >-NO_BUILD= yes >+ALL_TARGET= ${PORTNAME} >+USE_GITHUB= yes >+GH_ACCOUNT= bolthole >+GH_TAGNAME= 52e66a2 > >-.include <bsd.port.options.mk> >- > post-patch: >- @${REINPLACE_CMD} -e 's|#!/bin/ksh -p|#!${PREFIX}/bin/ksh93 -p|' ${WRKSRC}/zrep >+ @${REINPLACE_CMD} -e 's|#!/bin/ksh -p|#!${LOCALBASE}/bin/ksh93 -p|' ${WRKSRC}/zrep_top > >-do-extract: >- @${MKDIR} ${WRKSRC} >- @${CP} -p ${DISTDIR}/${PORTNAME} ${WRKSRC} >+pre-build: >+ @${RM} ${WRKSRC}/zrep > > do-install: > ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}/${PREFIX}/bin >Index: distinfo >=================================================================== >--- distinfo (revision 416145) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (zrep) = 2156852bfe0e9ed3a220cbb459ffb2b423488de023b03f8f9c8e1af876a44b75 >-SIZE (zrep) = 45158 >+TIMESTAMP = 1464429457 >+SHA256 (bolthole-zrep-1.5.5-52e66a2_GH0.tar.gz) = af389ae9205c45d172907788be73ba4b7fac2848d304c9d950298c81a6c126ba >+SIZE (bolthole-zrep-1.5.5-52e66a2_GH0.tar.gz) = 42336 >Index: files/patch-zrep >=================================================================== >--- files/patch-zrep (revision 416145) >+++ files/patch-zrep (nonexistent) >@@ -1,94 +0,0 @@ >---- zrep.orig 2013-05-13 22:01:15.000000000 +0400 >-+++ zrep 2013-11-19 18:37:52.921978370 +0400 >-@@ -15,7 +15,6 @@ >- ZREP_PATH=${ZREP_PATH:-zrep} #Set to /path/to/zrep, if needed, for remote >- #ZREP_CREATE_FLAGS="-o whatever" #Set for extra options on remote zfs create >- >-- >- ######################################################################### >- # Everyting else below here, should not be touched. First we have autodetect >- # routines, and then internal utilities such as locking functions. >-@@ -35,8 +34,8 @@ >- >- # dump the usage message, and check for capabilities >- # make sure we dont spew for non-root, so that "zrep status" works >--case `id` in >-- *\(root\)) >-+case `whoami` in >-+ root) >- zrep_checkfile=/var/run/zrep.check.$$ >- ;; >- *) >-@@ -109,7 +108,8 @@ >- # Note that we check for "us, OR our global parent", if different >- # >- zrep_has_global_lock(){ >-- lockpid=`ls -l $Z_GLOBAL_LOCKFILE 2>/dev/null |awk -F/ '{print $NF}'` >-+ [ ! -f "${Z_GLOBAL_LOCKFILE}" ] && return 1 >-+ lockpid=`cat ${Z_GLOBAL_LOCKFILE}` >- if [[ "$lockpid" == "" ]] ; then return 1 ; fi >- if [[ "$lockpid" != "$Z_GLOBAL_PID" ]] ; then >- if [[ "$lockpid" != "$$" ]] ; then >-@@ -127,7 +127,10 @@ >- zrep_get_global_lock(){ >- typeset retry_count=$Z_LOCK_RETRY >- >-- ln -s /proc/$Z_GLOBAL_PID $Z_GLOBAL_LOCKFILE && return 0 >-+ if [ ! -f "${Z_GLOBAL_LOCKFILE}" ] ; then >-+ echo $Z_GLOBAL_PID > $Z_GLOBAL_LOCKFILE >-+ return 0 >-+ fi >- >- # otherwise, deal with fail >- # Check for dead old holder first. >-@@ -135,7 +138,10 @@ >- >- while (( retry_count > 0 )); do >- sleep 1 >-- ln -s /proc/$Z_GLOBAL_PID $Z_GLOBAL_LOCKFILE && return 0 >-+ if [ ! -f "${Z_GLOBAL_LOCKFILE}" ] ; then >-+ echo $Z_GLOBAL_PID > $Z_GLOBAL_LOCKFILE >-+ return 0 >-+ fi >- retry_count=$((retry_count-1)) >- done >- >-@@ -178,7 +184,9 @@ >- typeset check=`zrep_fs_lock_pid $1` newcheck >- if [[ "$check" != "-" ]] ; then >- # validate fs lock before giving up >-- ls -d /proc/$check >/dev/null 2>&1 && return 1 >-+ if [ "${check}" != "-" ] ; then >-+ [ -f "${Z_GLOBAL_LOCKFILE}" ] && return 1 >-+ fi >- fi >- >- zrep_get_global_lock || return 1 >-@@ -257,8 +265,7 @@ >- >- zrep_gettimeinseconds(){ >- # unfortunately, solaris date doesnt do '%s', so need to use perl >-- typeset PATH=$PERL_BIN:$PATH >-- perl -e 'print int(time);' >-+ date +%s >- } >- ###### zrep_status >- >-@@ -713,7 +720,7 @@ >- READONLYPROP="-o readonly=on" >- else >- READONLYPROP="" >-- print Ancient local version of ZFS detected. >-+# print Ancient local version of ZFS detected. >- print Creating destination filesystem as separate step >- zrep_ssh $desthost zfs create $ZREP_CREATE_FLAGS -o readonly=on $destfs || zrep_errquit "Cannot create $desthost:$destfs" >- fi >-@@ -757,7 +764,7 @@ >- # Successful initial sync! Woo! okay record that, etc. >- # ... after stupid old-zfs-compat junk, that is >- if (( ! Z_HAS_X )) ; then >-- print Debug: Because you have old zfs support, setting remote properties by hand >-+# print Debug: Because you have old zfs support, setting remote properties by hand >- zrep_ssh $desthost zfs set readonly=on $destfs || >- clearquit Could not set readonly for $desthost:$destfs >- >Index: files/patch-zrep__snap >=================================================================== >--- files/patch-zrep__snap (nonexistent) >+++ files/patch-zrep__snap (working copy) >@@ -0,0 +1,18 @@ >+--- zrep_snap.orig 2016-05-30 08:17:51 UTC >++++ zrep_snap >+@@ -309,7 +309,6 @@ zrep_init(){ >+ READONLYPROP="-o readonly=on" >+ else >+ READONLYPROP="" >+- print Ancient local version of ZFS detected. >+ print Creating destination filesystem as separate step >+ zrep_ssh $desthost zfs create $ZREP_CREATE_FLAGS -o readonly=on $destfs || zrep_errquit "Cannot create $desthost:$destfs" >+ fi >+@@ -359,7 +358,6 @@ zrep_init(){ >+ # Successful initial sync! Woo! okay record that, etc. >+ # ... after stupid old-zfs-compat junk, that is >+ if (( ! Z_HAS_X )) ; then >+- print Debug: Because you have old zfs support, setting remote properties by hand >+ zrep_ssh $desthost zfs set readonly=on $destfs || >+ clearquit Could not set readonly for $desthost:$destfs >+ >Index: files/patch-zrep__vars >=================================================================== >--- files/patch-zrep__vars (nonexistent) >+++ files/patch-zrep__vars (working copy) >@@ -0,0 +1,67 @@ >+--- zrep_vars.orig 2016-05-30 08:14:39 UTC >++++ zrep_vars >+@@ -79,8 +79,8 @@ PROPTYPES="local,received" >+ >+ # dump the usage message, and check for capabilities >+ # make sure we dont spew for non-root, so that "zrep status" works >+-case `id` in >+- *\(root\)) >++case `whoami` in >++ root) >+ zrep_checkfile=/var/run/zrep.check.$$ >+ ;; >+ *) >+@@ -159,7 +159,8 @@ Z_SETHOLD=${Z_SETHOLD:-"zfs hold"} >+ # Note that we check for "us, OR our global parent", if different >+ # >+ zrep_has_global_lock(){ >+- lockpid=`ls -l $Z_GLOBAL_LOCKFILE 2>/dev/null |awk -F/ '{print $NF}'` >++ [ ! -f "${Z_GLOBAL_LOCKFILE}" ] && return 1 >++ lockpid=`cat ${Z_GLOBAL_LOCKFILE}` >+ if [[ "$lockpid" == "" ]] ; then return 1 ; fi >+ if [[ "$lockpid" != "$Z_GLOBAL_PID" ]] ; then >+ if [[ "$lockpid" != "$$" ]] ; then >+@@ -177,7 +178,10 @@ zrep_has_global_lock(){ >+ zrep_get_global_lock(){ >+ typeset retry_count=$Z_LOCK_RETRY >+ >+- ln -s /proc/$Z_GLOBAL_PID $Z_GLOBAL_LOCKFILE && return 0 >++ if [ ! -f "${Z_GLOBAL_LOCKFILE}" ] ; then >++ echo $Z_GLOBAL_PID > $Z_GLOBAL_LOCKFILE >++ return 0 >++ fi >+ >+ # otherwise, deal with fail >+ # Check for dead old holder first. >+@@ -185,7 +189,10 @@ zrep_get_global_lock(){ >+ >+ while (( retry_count > 0 )); do >+ sleep 1 >+- ln -s /proc/$Z_GLOBAL_PID $Z_GLOBAL_LOCKFILE && return 0 >++ if [ ! -f "${Z_GLOBAL_LOCKFILE}" ] ; then >++ echo $Z_GLOBAL_PID > $Z_GLOBAL_LOCKFILE >++ return 0 >++ fi >+ retry_count=$((retry_count-1)) >+ done >+ >+@@ -228,7 +235,9 @@ zrep_lock_fs(){ >+ typeset check=`zrep_fs_lock_pid $1` newcheck >+ if [[ "$check" != "-" ]] ; then >+ # validate fs lock before giving up >+- ls -d /proc/$check >/dev/null 2>&1 && return 1 >++ if [ "${check}" != "-" ] ; then >++ [ -f "${Z_GLOBAL_LOCKFILE}" ] && return 1 >++ fi >+ fi >+ >+ zrep_get_global_lock || return 1 >+@@ -306,7 +315,5 @@ zrep_ssh(){ >+ } >+ >+ zrep_gettimeinseconds(){ >+- # unfortunately, solaris date doesnt do '%s', so need to use perl >+- typeset PATH=$PERL_BIN:$PATH >+- perl -e 'print int(time);' >++ date +%s >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
olgeni
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 209852
:
170818
| 170828