Skip to content

Commit

Permalink
sysutils/arc_summary: Match script to FreeBSD version
Browse files Browse the repository at this point in the history
The latest arc_summary from the OpenZFS repository fails to run on
FreeBSD 13.2.  Resolve this by installing arc_summary from a branch of
our src repository that matches the major version of the target system.

PR:		274605
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43070
  • Loading branch information
Jehops committed Dec 15, 2023
1 parent 970e868 commit 99767f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
21 changes: 15 additions & 6 deletions sysutils/arc_summary/Makefile
@@ -1,8 +1,11 @@
PORTNAME= arc_summary
PORTVERSION= 20231023
PORTVERSION= 20231114
CATEGORIES= sysutils
MASTER_SITES= https://raw.githubusercontent.com/openzfs/zfs/${_REV}/cmd/
DISTFILES= ${PORTNAME}?${PORTVERSION}
MASTER_SITES= https://cgit.freebsd.org/src/plain/sys/contrib/openzfs/cmd/ \
https://cgit.freebsd.org/src/plain/sys/contrib/openzfs/cmd/arc_summary/:13
DISTFILES= ${PORTNAME}3?h=releng/13.2:13 \
${PORTNAME}?h=releng/14.0 \
${PORTNAME}

MAINTAINER= jrm@FreeBSD.org
COMMENT= Print ZFS ARC cache statistics and other information
Expand All @@ -21,12 +24,18 @@ NO_BUILD= yes
NO_WRKSUBDIR= yes
PLIST_FILES= bin/arc_summary

_REV= e57909265b4352832d69f5107bac7e56d6a8fbd2
.include <bsd.port.pre.mk>

do-extract:
${CP} ${DISTDIR}/${DISTFILES} ${WRKSRC}/${PORTNAME}
.if ${OSVERSION} < 1400000
${CP} ${DISTDIR}/${PORTNAME}3?h=releng/13.2 ${WRKSRC}/${PORTNAME}
.elif ${OSVERSION} >= 1400000 && ${OSVERSION} < 1500000
${CP} ${DISTDIR}/${PORTNAME}?h=releng/14.0 ${WRKSRC}/${PORTNAME}
.else
${CP} ${DISTDIR}/${PORTNAME} ${WRKSRC}/${PORTNAME}
.endif

do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/

.include <bsd.port.mk>
.include <bsd.port.post.mk>
10 changes: 7 additions & 3 deletions sysutils/arc_summary/distinfo
@@ -1,3 +1,7 @@
TIMESTAMP = 1700833863
SHA256 (arc_summary?20231023) = 44e8d4aec6614aacfece3a12a6953e0f68b4358fa9621415f25200b346020132
SIZE (arc_summary?20231023) = 37268
TIMESTAMP = 1702600566
SHA256 (arc_summary3?h=releng/13.2) = 978d3743bc99a936c05418e3f08d6041535214196d081a6c87938c01a7936da2
SIZE (arc_summary3?h=releng/13.2) = 34365
SHA256 (arc_summary?h=releng/14.0) = 81fc104da57777f45c931c9c2f425f1fe219d12dc61a9d2928a1b03561f9aecb
SIZE (arc_summary?h=releng/14.0) = 37272
SHA256 (arc_summary) = 44e8d4aec6614aacfece3a12a6953e0f68b4358fa9621415f25200b346020132
SIZE (arc_summary) = 37268

0 comments on commit 99767f7

Please sign in to comment.