View | Details | Raw Unified | Return to bug 196185 | Differences between
and this patch

Collapse All | Expand All

(-)hyperv-is_ok/Makefile (-14 / +36 lines)
Lines 1-8 Link Here
1
# $FreeBSD: head/emulators/hyperv-is/Makefile 370396 2014-10-07 20:27:29Z marino $
1
# $FreeBSD: head/emulators/hyperv-is/Makefile 370396 2014-10-07 20:27:29Z marino $
2
2
3
USES=		kmod uidfix
4
3
PORTNAME=	hyperv-is
5
PORTNAME=	hyperv-is
4
PORTVERSION=	1.1
6
PORTVERSION=	2.0
5
PORTREVISION=	2
6
CATEGORIES=	emulators
7
CATEGORIES=	emulators
7
MASTER_SITES=	https://github.com/${MSLINK}/
8
MASTER_SITES=	https://github.com/${MSLINK}/
8
DISTNAME=	${DNAME}
9
DISTNAME=	${DNAME}
Lines 12-17 COMMENT= FreeBSD Integration Service on Link Here
12
13
13
ONLY_FOR_ARCHS=	amd64 i386
14
ONLY_FOR_ARCHS=	amd64 i386
14
15
16
15
USES=		kmod uidfix
17
USES=		kmod uidfix
16
BIS=		${PORTVERSION}
18
BIS=		${PORTVERSION}
17
MSBASE=		FreeBSDonHyper-V/Hyperv-Ports/raw/hyperv-is-master
19
MSBASE=		FreeBSDonHyper-V/Hyperv-Ports/raw/hyperv-is-master
Lines 25-66 PKGMESSAGE= ${FILESDIR}/${PMSG} Link Here
25
IGNORE=		${OPSYS} not supported
27
IGNORE=		${OPSYS} not supported
26
.endif
28
.endif
27
29
30
FILE_84=	hyperv-is-8.4.${BIS}
31
FILE_91=	hyperv-is-9.1.${BIS}
32
FILE_92=	hyperv-is-9.2.${BIS}
33
FILE_93=	hyperv-is-9.3.${BIS}
34
FILE_100=	hv-kvp-${BIS}
35
FILE_101=	hyperv-is-10.1.${BIS}
36
DNAME=		${FILE_${OSREL:S/.//}}
37
38
.if empty(DNAME)
39
IGNORE=	 needless to install on FreeBSD-${OSREL}  
40
.endif
41
28
.if ${OSREL} == "10.0"
42
.if ${OSREL} == "10.0"
29
BIS=		1.0
43
BIS=		1.0
30
PLIST_SUB=	A="@comment " B=""
44
PLIST_SUB=	A="@comment " B="" C="@comment " 
31
PMSG=		pkg-message.B
45
PMSG=		pkg-message.B
32
.else
46
.else
47
.if ${OSREL} ==	"10.1" 
48
PREFIX= /usr/
49
KMODDIR = /boot/kernel/
50
WRKSRC=		${WRKDIR}/hyperv-is-${PORTVERSION}
51
PLIST_SUB=	A="@comment " B="@comment " C=""
52
PMSG=		pkg-message.C
53
.else
33
CC=		gcc -w
54
CC=		gcc -w
34
WRKSRC=		${WRKDIR}/hyperv-is-${PORTVERSION}
55
WRKSRC=		${WRKDIR}/hyperv-is-${PORTVERSION}
35
PLIST_SUB=	B="@comment " A=""
56
PLIST_SUB=	C="@comment " B="@comment " A=""
36
PMSG=		pkg-message.A
57
PMSG=		pkg-message.A
37
.endif
58
.endif
59
.endif
38
60
39
FILE_84=	hyperv-is-8.4.${BIS}
40
FILE_91=	hyperv-is-9.1.${BIS}
41
FILE_92=	hyperv-is-9.2.${BIS}
42
FILE_93=	hyperv-is-9.3.${BIS}
43
FILE_100=	hv-kvp-${BIS}
44
DNAME=		${FILE_${OSREL:S/.//}}
45
61
46
.if empty(DNAME)
47
IGNORE?=	OSREL ${OSREL} not supported
48
.endif
49
62
50
post-patch:
63
post-patch:
64
.if ${OSREL} !=	"10.1" 
51
	@${REINPLACE_CMD} -e "s,/usr/sbin/,${PREFIX}/sbin/,g" \
65
	@${REINPLACE_CMD} -e "s,/usr/sbin/,${PREFIX}/sbin/,g" \
52
		${WRKSRC}/etc/rc.d/hv_kvpd
66
		${WRKSRC}/etc/rc.d/hv_kvpd
67
.endif
53
68
54
pre-install:
69
pre-install:
70
.if ${OSREL} ==	"10.1" 
55
	@${MKDIR} ${STAGEDIR}${PREFIX} \
71
	@${MKDIR} ${STAGEDIR}${PREFIX} \
56
		${STAGEDIR}/etc/rc.d \
72
	     ${STAGEDIR}/var/db/hyperv/scripts
73
.else
74
	@${MKDIR} ${STAGEDIR}${PREFIX} \
75
	        ${STAGEDIR}/etc/rc.d \
57
		${STAGEDIR}/usr/local/hyperv/scripts
76
		${STAGEDIR}/usr/local/hyperv/scripts
77
.endif
58
78
59
post-install:
79
post-install:
80
.if ${OSREL} !=	"10.1" 
60
	${RM} ${STAGEDIR}/boot/kernel/linker.hints
81
	${RM} ${STAGEDIR}/boot/kernel/linker.hints
61
	${MV} ${STAGEDIR}/etc/rc.d/* ${STAGEDIR}${PREFIX}/etc/rc.d
82
	${MV} ${STAGEDIR}/etc/rc.d/* ${STAGEDIR}${PREFIX}/etc/rc.d
62
.if ${PREFIX} != /usr/local
83
.if ${PREFIX} != /usr/local
63
	${MV} ${STAGEDIR}/usr/local/* ${STAGEDIR}${PREFIX}
84
	${MV} ${STAGEDIR}/usr/local/* ${STAGEDIR}${PREFIX}
64
.endif
85
.endif
86
.endif
65
87
66
.include <bsd.port.post.mk>
88
.include <bsd.port.post.mk>
(-)hyperv-is_ok/distinfo (+2 lines)
Lines 1-3 Link Here
1
SHA256 (hyperv-is-10.1.2.0.tar.gz) = 01a9a0f6c737c8d17ece18f6c77f2596b7cd0e01143c1b7f5930025569a54730
2
SIZE (hyperv-is-10.1.2.0.tar.gz) = 106784
1
SHA256 (hyperv-is-8.4.1.1.tar.gz) = 21f21bf8192892b823a63ebcea8cfd916ab0572b965c06471388386765346ae6
3
SHA256 (hyperv-is-8.4.1.1.tar.gz) = 21f21bf8192892b823a63ebcea8cfd916ab0572b965c06471388386765346ae6
2
SIZE (hyperv-is-8.4.1.1.tar.gz) = 94356
4
SIZE (hyperv-is-8.4.1.1.tar.gz) = 94356
3
SHA256 (hyperv-is-9.1.1.1.tar.gz) = ab4dc50d4f66ef983bd0de96388ba95e29d1e987362336bf44e3ff971425245a
5
SHA256 (hyperv-is-9.1.1.1.tar.gz) = ab4dc50d4f66ef983bd0de96388ba95e29d1e987362336bf44e3ff971425245a
(-)hyperv-is_ok/pkg-install (-32 / +52 lines)
Lines 5-10 Link Here
5
# adds hyperv labels in loader.conf 
5
# adds hyperv labels in loader.conf 
6
#
6
#
7
7
8
8
#Check poudriere workdirs
9
#Check poudriere workdirs
9
POD_WRK_HOME=/wrkdirs
10
POD_WRK_HOME=/wrkdirs
10
if [ ! -d ${POD_WRK_HOME} ]; then
11
if [ ! -d ${POD_WRK_HOME} ]; then
Lines 16-55 if [ ! -d ${WRKDIRS} ]; then Link Here
16
   WRKDIRS=/
17
   WRKDIRS=/
17
fi
18
fi
18
19
20
version=`uname -r`
21
19
if [ "$2" = "PRE-INSTALL" ]; then
22
if [ "$2" = "PRE-INSTALL" ]; then
20
echo "===> Pre-install Check"
23
    echo "===> Pre-install Check"
21
24
22
#rootfs check
25
    #rootfs check
23
root_flag=$(mount | awk '/ on \/ / { print $1 }' | cut -d / -f3-)
26
    root_flag=$(mount | awk '/ on \/ / { print $1 }' | cut -d / -f3-)
24
if [ "$root_flag" != "" ]; then
27
    if [ "$root_flag" != "" ]; then
25
   fs_test=$(glabel status | awk '{print $1}' | grep $root_flag)
28
        fs_test=$(glabel status | awk '{print $1}' | grep $root_flag)
26
   if [ "$fs_test" == "" ]; then
29
        if [ "$fs_test" == "" ]; then
27
      echo " xxx rootfs Label/gptid missing in fstab"  
30
            echo " xxx rootfs Label/gptid missing in fstab"  
28
   fi
31
        fi
29
else 
32
    else 
30
   echo " xxx rootfs Label/gptid missing in fstab"
33
        echo " xxx rootfs Label/gptid missing in fstab"
31
fi
34
    fi
32
#swap check
33
[ -f /etc/fstab ] && swap_flag=$(grep swap /etc/fstab | awk '{print $1}' | cut -d / -f3-)
34
if [ "$swap_flag" != "" ]; then
35
   sw_test=$(glabel status | awk '{print $1}' | grep $swap_flag)
36
   if [ "$sw_test" == "" ]; then
37
      echo " xxx swap Label/gptid missing in fstab"  
38
   fi
39
else   
40
   echo " xxx swap Label/gptid missing in fstab "
41
fi
42
35
43
if [ "$fs_test" != "" -a  "$sw_test" != "" ]; then
36
    #swap check
44
   echo "===> Labels/gptids Found"
37
    [ -f /etc/fstab ] && swap_flag=$(grep swap /etc/fstab | awk '{print $1}' | cut -d / -f3-)
45
   echo "===> Hyper-V BIS Installation Continues"
38
    if [ "$swap_flag" != "" ]; then
46
else
39
        sw_test=$(glabel status | awk '{print $1}' | grep $swap_flag)
47
   echo "===> Labels/gptids Not found"
40
    fi
48
   echo "===> Hyper-V BIS Installation Aborted"
41
    if [ "$sw_test" == "" ]; then
49
   echo "===> Refer to Disk UUID section in README document"
42
         echo " xxx swap Label/gptid missing in fstab"  
50
   echo "===> Please refer the Prerequisites page and complete all steps" 
43
    else   
51
   echo "WWW: https://github.com/FreeBSDonHyper-V/Hyperv-Ports/wiki/Prerequisites " 
44
        echo " xxx swap Label/gptid missing in fstab "
52
   exit 1 
45
    fi
53
fi
46
47
    if [ "$fs_test" != "" -a  "$sw_test" != "" ]; then
48
        echo "===> Labels/gptids Found"
49
        echo "===> Hyper-V BIS Installation Continues"
50
    else
51
        if [ $version != "10.1-RELEASE" ]; then
52
           echo "version is $version"
53
           echo "===> Labels/gptids Not found"
54
           echo "===> Hyper-V BIS Installation Aborted"
55
           echo "===> Refer to Disk UUID section in README document"
56
           echo "===> Please refer the Prerequisites page and complete all steps" 
57
           echo "WWW: https://github.com/FreeBSDonHyper-V/Hyperv-Ports/wiki/Prerequisites " 
58
           exit 1 
59
        fi
60
    fi
61
    
62
    kvp_dir="/var/db/hyperv/"
63
    kvp_dir_scripts="/var/db/hyperv/scripts"
64
    if [ -d $kvp_dir ]; then
65
        if [ -d $kvp_dir_scripts ]; then
66
            echo " KVP Directories present "
67
        else
68
            mkdir /var/db/hyperv/scripts
69
        fi
70
    else
71
        mkdir /var/db/hyperv
72
        mkdir /var/db/hyperv/scripts
73
    fi
54
fi
74
fi
55
exit 0
75
exit 0
(-)hyperv-is_ok/pkg-plist (-5 / +15 lines)
Lines 1-17 Link Here
1
hyperv/scripts/hv_get_dhcp_info
1
%%C%%/var/db/hyperv/scripts/hv_get_dhcp_info
2
hyperv/scripts/hv_get_dns_info
2
%%C%%/var/db/hyperv/scripts/hv_get_dns_info
3
hyperv/scripts/hv_set_ifconfig
3
%%C%%/var/db/hyperv/scripts/hv_set_ifconfig
4
%%A%%hyperv/scripts/hv_get_dhcp_info
5
%%A%%hyperv/scripts/hv_get_dns_info
6
%%A%%hyperv/scripts/hv_set_ifconfig
7
%%B%%hyperv/scripts/hv_get_dhcp_info
8
%%B%%hyperv/scripts/hv_get_dns_info
9
%%B%%hyperv/scripts/hv_set_ifconfig
4
%%A%%/boot/modules/hv_ata_pci_disengage.ko
10
%%A%%/boot/modules/hv_ata_pci_disengage.ko
5
%%A%%/boot/modules/hv_netvsc.ko
11
%%A%%/boot/modules/hv_netvsc.ko
6
%%A%%/boot/modules/hv_storvsc.ko
12
%%A%%/boot/modules/hv_storvsc.ko
7
%%A%%/boot/modules/hv_utils.ko
13
%%A%%/boot/modules/hv_utils.ko
8
%%A%%/boot/modules/hv_vmbus.ko
14
%%A%%/boot/modules/hv_vmbus.ko
9
%%B%%/boot/modules/hv_kvp.ko
15
%%B%%/boot/modules/hv_kvp.ko
10
etc/rc.d/hv_kvpd
16
%%C%%/boot/kernel/hv_storvsc_port.ko
17
%%C%%/boot/kernel/hv_utils_port.ko
18
%%A%%etc/rc.d/hv_kvpd
19
%%B%%etc/rc.d/hv_kvpd
11
%%B%%sbin/hv_kvp_daemon
20
%%B%%sbin/hv_kvp_daemon
21
%%C%%sbin/hv_kvp_daemon
12
%%A%%man/man1/hyperv-is.1.gz
22
%%A%%man/man1/hyperv-is.1.gz
13
%%A%%man/man4/hv_ata_pci_disengage.4.gz
23
%%A%%man/man4/hv_ata_pci_disengage.4.gz
14
man/man4/hv_kvp.4.gz
24
%%A%%man/man4/hv_kvp.4.gz
15
%%A%%man/man4/hv_netvsc.4.gz
25
%%A%%man/man4/hv_netvsc.4.gz
16
%%A%%man/man4/hv_storvsc.4.gz
26
%%A%%man/man4/hv_storvsc.4.gz
17
%%A%%man/man4/hv_utils.4.gz
27
%%A%%man/man4/hv_utils.4.gz

Return to bug 196185