Update to 5.40, add rcscript and a patch to correctly handle hw.disknames

This commit is contained in:
giovanni 2010-11-23 18:21:45 +00:00
parent b0f7716396
commit 2523c6b887
6 changed files with 56 additions and 22 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.11 2010/11/20 17:22:42 espie Exp $
# $OpenBSD: Makefile,v 1.12 2010/11/23 18:21:45 giovanni Exp $
# conservative setting. macppc found to have some issues.
ONLY_FOR_ARCHS= amd64 i386 powerpc
COMMENT= control and monitor storage systems using SMART
DISTNAME= smartmontools-5.39.1
DISTNAME= smartmontools-5.40
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=smartmontools/}
@ -17,13 +16,15 @@ USE_GMAKE= Yes
USE_GROFF = Yes
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --with-docdir=${PREFIX}/share/doc/smartmontools
CONFIGURE_ARGS= --with-docdir=${PREFIX}/share/doc/smartmontools \
--with-libcap-ng=no \
--disable-drivedb
# GPLv2+
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m stdc++ util
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m stdc++ util
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (smartmontools-5.39.1.tar.gz) = 9vc4CuRVhxYcCtrohiEQ6Q==
RMD160 (smartmontools-5.39.1.tar.gz) = KtuMQ+sPI3Ee/OQjwiKBJApu0XI=
SHA1 (smartmontools-5.39.1.tar.gz) = 6gSJySNIMvY6wNS0wL2BEztOuek=
SHA256 (smartmontools-5.39.1.tar.gz) = clz9WbM6l1YTRqmQ4exQsVDbrAHyuQzZzz/XT/HndyA=
SIZE (smartmontools-5.39.1.tar.gz) = 659335
MD5 (smartmontools-5.40.tar.gz) = DwvgI5kUrYeDCk//WUvaWw==
RMD160 (smartmontools-5.40.tar.gz) = /y6/0TAYK6chJI6/69nU1cwyX/Q=
SHA1 (smartmontools-5.40.tar.gz) = CKhqk5ouLNhdLIjAkYjUlPBs4FA=
SHA256 (smartmontools-5.40.tar.gz) = KmjtINXWvRmOGqa/C2A38PIW47FNoCIRUkTxr50ki/0=
SIZE (smartmontools-5.40.tar.gz) = 705592

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile_in,v 1.5 2010/01/11 15:15:28 giovanni Exp $
--- Makefile.in.orig Wed Dec 9 22:01:59 2009
+++ Makefile.in Thu Jan 7 11:53:39 2010
@@ -196,8 +196,8 @@ man5dir = $(mandir)/man5
$OpenBSD: patch-Makefile_in,v 1.6 2010/11/23 18:21:45 giovanni Exp $
--- Makefile.in.orig Sat Oct 16 18:36:17 2010
+++ Makefile.in Thu Oct 28 18:43:44 2010
@@ -219,8 +219,8 @@ man5dir = $(mandir)/man5
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(man_MANS)
@ -12,7 +12,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2010/01/11 15:15:28 giovanni Exp $
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -413,15 +413,7 @@ EXTRA_smartctl_SOURCES = os_linux.cpp os_linux.h os_fr
@@ -442,15 +442,7 @@ EXTRA_smartctl_SOURCES = os_linux.cpp os_linux.h os_fr
@OS_SOLARIS_FALSE@ smartd.8
docsdir = $(docdir)
@ -29,7 +29,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2010/01/11 15:15:28 giovanni Exp $
sysconf_DATA = smartd.conf$(smartd_suffix)
EXTRA_DIST = smartd.initd.in \
@@ -952,16 +944,6 @@ uninstall-savestatesDATA:
@@ -1074,16 +1066,6 @@ uninstall-savestatesDATA:
cd "$(DESTDIR)$(savestatesdir)" && rm -f $$files
install-sysconfDATA: $(sysconf_DATA)
@$(NORMAL_INSTALL)
@ -46,7 +46,7 @@ $OpenBSD: patch-Makefile_in,v 1.5 2010/01/11 15:15:28 giovanni Exp $
uninstall-sysconfDATA:
@$(NORMAL_UNINSTALL)
@@ -1352,7 +1334,7 @@ info: info-recursive
@@ -1475,7 +1457,7 @@ info: info-recursive
info-am:
install-data-am: install-attributelogDATA install-docsDATA \

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-os_openbsd_cpp,v 1.1 2010/11/23 18:21:45 giovanni Exp $
--- os_openbsd.cpp.orig Wed Jul 15 21:59:19 2009
+++ os_openbsd.cpp Mon Nov 15 19:39:48 2010
@@ -92,7 +92,7 @@ guess_device_type(const char *dev_name)
int
get_dev_names(char ***names, const char *prefix)
{
- char *disknames, *p, **mp;
+ char *disknames, *p, *u, **mp;
int n = 0;
int sysctl_mib[2];
size_t sysctl_len;
@@ -121,6 +121,9 @@ get_dev_names(char ***names, const char *prefix)
if (strncmp(p, prefix, strlen(prefix))) {
continue;
}
+ char * u = strchr(p, ':');
+ if (u)
+ *u = 0;
mp[n] = (char *)malloc(strlen(net_dev_prefix) + strlen(p) + 2);
if (!mp[n]) {
pout("Out of memory constructing scan device list\n");

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.4 2010/01/11 15:15:28 giovanni Exp $
@comment $OpenBSD: PLIST,v 1.5 2010/11/23 18:21:45 giovanni Exp $
@man man/man5/smartd.conf.5
@man man/man8/smartctl.8
@man man/man8/smartd.8
@ -13,3 +13,4 @@ share/doc/smartmontools/examplescripts/Example4
share/doc/smartmontools/examplescripts/README
share/doc/smartmontools/smartd.conf
@sample ${SYSCONFDIR}/smartd.conf
@rcscript ${RCDIR}/smartd

View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# $OpenBSD: smartd.rc,v 1.1 2010/11/23 18:21:45 giovanni Exp $
. /etc/rc.d/rc.subr
daemon="${TRUEPREFIX}/sbin/smartd"
pexp="${TRUEPREFIX}/sbin/smartd"
rc_cmd $1