ports/124290: New port: net/amtterm Intel Advanced Management Technology - Serial over Lan client and remote management script
Jedrzej Kalinowski
Jedrzej.Kalinowski at iem.pw.edu.pl
Wed Jun 4 23:20:02 UTC 2008
>Number: 124290
>Category: ports
>Synopsis: New port: net/amtterm Intel Advanced Management Technology - Serial over Lan client and remote management script
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 04 23:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Jedrzej Kalinowski
>Release: FreeBSD 8.0-CURRENT amd64
>Organization:
Warsaw University of Technology
>Environment:
System: FreeBSD amp2 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Thu May 29 19:35:48 CEST 2008 ato at volt.iem.pw.edu.pl:/tmp/obj/usr/src/sys/AMPER2 amd64
>Description:
Contains: amtterm - serial-over-lan client for Intel Advanced Management Technology (also known as vPro) enabled machines; gamt - gtk version of amtterm.
Also comes with amttool - a perl script that supports remote management of AMT machines. Its functionality allows for checking machine's status, power up, power down, reset, cycle power off-on, network configuration. The port contains patches (submitted to the upstream author) that additionaly let us specify the boot device (HD,CD/DVD,PXE) on the machine's next power up.
>How-To-Repeat:
>Fix:
--- amtterm.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# ports/net/amtterm-1.0
# ports/net/amtterm-1.0/distinfo
# ports/net/amtterm-1.0/Makefile
# ports/net/amtterm-1.0/pkg-descr
# ports/net/amtterm-1.0/files
# ports/net/amtterm-1.0/files/patch-redir.c
# ports/net/amtterm-1.0/files/patch-tcp.c
# ports/net/amtterm-1.0/files/patch-mk-Variables.mk
# ports/net/amtterm-1.0/files/patch-GNUMakefile
# ports/net/amtterm-1.0/files/patch-amttool
# ports/net/amtterm-1.0/files/patch-amttool.man
#
echo c - ports/net/amtterm-1.0
mkdir -p ports/net/amtterm-1.0 > /dev/null 2>&1
echo x - ports/net/amtterm-1.0/distinfo
sed 's/^X//' >ports/net/amtterm-1.0/distinfo << 'eea4dbf8bd74869b952acae01e17d6b8'
XMD5 (amtterm-1.0.tar.gz) = d39d02baae01d22084ffd47837e90d3b
XSHA256 (amtterm-1.0.tar.gz) = 53fea4636c9e9e6cf589644b6dd090f949a6fc281ed03a8032bdfb01a5025443
XSIZE (amtterm-1.0.tar.gz) = 35768
eea4dbf8bd74869b952acae01e17d6b8
echo x - ports/net/amtterm-1.0/Makefile
sed 's/^X//' >ports/net/amtterm-1.0/Makefile << '9aa13d1d145d8af49663e0e080aa8429'
X# New ports collection makefile for: amtterm
X# Date created: 26 May 2008
X# Whom: Jedrzej.Kalinowski at iem.pw.edu.pl
X#
X# $FreeBSD$
X#
X
XPORTNAME= amtterm
XPORTVERSION= 1.0
XCATEGORIES= net
XMASTER_SITES= http://dl.bytesex.org/releases/amtterm/
X
XMAINTAINER= portmgr at FreeBSD.org
XCOMMENT= Intel Advanced Management Technology client
X
XUSE_PERL5_RUN= yes
XRUN_DEPENDS= p5-SOAP-Lite>0.55:${PORTSDIR}/net/p5-SOAP-Lite
X
XUSE_GMAKE= yes
XMAKEFILE= GNUmakefile
XWANT_GNOME= yes
X
XPLIST_FILES= bin/amtterm sbin/amttool
X
XOPTIONS= GTK2 "Enable GTK interface" On
X
XMAN1= amtterm.1
XMAN1= amttool.1
XMAN7= amt-howto.7
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_GTK2)
XLIB_DEPENDS= vte:${PORTSDIR}/x11-toolkits/vte
XUSE_GNOME= gtk20
XPLIST_FILES+= bin/gamt share/applications/gamt.desktop
XMAN1= gamt.1
XMAKE_ENV+= WITH_GAMT="On"
X.endif
X
X.include <bsd.port.post.mk>
9aa13d1d145d8af49663e0e080aa8429
echo x - ports/net/amtterm-1.0/pkg-descr
sed 's/^X//' >ports/net/amtterm-1.0/pkg-descr << '07af81aca4b669a3ab006df562880be1'
XTool for interacting with Intel Advanced Management Technology on
Xremote machines.
XProvides remote power and network management even when machines are powered off.
X
XAuthor: Gerd Hoffmann <kraxel at suse.de>
07af81aca4b669a3ab006df562880be1
echo c - ports/net/amtterm-1.0/files
mkdir -p ports/net/amtterm-1.0/files > /dev/null 2>&1
echo x - ports/net/amtterm-1.0/files/patch-redir.c
sed 's/^X//' >ports/net/amtterm-1.0/files/patch-redir.c << '3a9e5bfd193f903f0729c013ee6b5677'
X--- redir.c.org 2007-08-23 16:38:26.000000000 +0200
X+++ redir.c 2008-05-24 20:43:25.000000000 +0200
X@@ -24,7 +24,7 @@
X #include <string.h>
X #include <ctype.h>
X #include <errno.h>
X-
X+#include <sys/socket.h>
X #include "tcp.h"
X #include "redir.h"
X
3a9e5bfd193f903f0729c013ee6b5677
echo x - ports/net/amtterm-1.0/files/patch-tcp.c
sed 's/^X//' >ports/net/amtterm-1.0/files/patch-tcp.c << 'dbc63b20ff390e8d73a14433b6f2fec2'
X--- tcp.c.orig 2007-08-23 16:38:26.000000000 +0200
X+++ tcp.c 2008-05-24 20:44:11.000000000 +0200
X@@ -24,7 +24,7 @@
X #include <string.h>
X #include <unistd.h>
X #include <fcntl.h>
X-
X+#include <sys/socket.h>
X #include "tcp.h"
X
X int tcp_verbose;
dbc63b20ff390e8d73a14433b6f2fec2
echo x - ports/net/amtterm-1.0/files/patch-mk-Variables.mk
sed 's/^X//' >ports/net/amtterm-1.0/files/patch-mk-Variables.mk << '49fbe8f5d3e160631cf3a518bc041895'
X--- mk/Variables.mk.orig 2008-05-28 01:39:10.000000000 +0200
X+++ mk/Variables.mk 2008-05-28 02:00:00.000000000 +0200
X@@ -6,9 +6,10 @@
X srcdir ?= .
X prefix ?= /usr/local
X bindir = $(DESTDIR)$(prefix)/bin
X+sbindir = $(DESTDIR)$(prefix)/sbin
X libdir = $(DESTDIR)$(prefix)/$(LIB)
X shrdir = $(DESTDIR)$(prefix)/share
X-mandir = $(shrdir)/man
X+mandir = $(DESTDIR)$(prefix)/man
X locdir = $(shrdir)/locale
X appdir = $(shrdir)/applications
X
49fbe8f5d3e160631cf3a518bc041895
echo x - ports/net/amtterm-1.0/files/patch-GNUMakefile
sed 's/^X//' >ports/net/amtterm-1.0/files/patch-GNUMakefile << 'b7f898bed06837442e368aeb01489135'
X--- GNUmakefile.orig 2007-08-24 19:18:57.000000000 +0200
X+++ GNUmakefile 2008-06-04 01:52:21.000000000 +0200
X@@ -26,7 +26,7 @@
X #################################################################
X
X # build gamt?
X-ifeq ($(HAVE_GTK)$(HAVE_VTE),yesyes)
X+ifeq ($(HAVE_GTK)$(HAVE_VTE)$(WITH_GAMT),yesyesOn)
X TARGETS += gamt
X gamt : CFLAGS += -Wno-strict-prototypes
X gamt : pkglst += gtk+-x11-2.0 vte
X@@ -40,17 +40,19 @@
X build: $(TARGETS)
X
X install: build
X- $(INSTALL_DIR) $(bindir) $(appdir) $(mandir)/man1 $(mandir)/man7
X+ $(INSTALL_DIR) $(bindir) $(sbindir) $(appdir) $(mandir)/man1 $(mandir)/man7
X $(INSTALL_BINARY) $(TARGETS) $(bindir)
X- $(INSTALL_SCRIPT) amttool $(bindir)
X+ $(INSTALL_SCRIPT) amttool $(sbindir)
X+ifeq ($(WITH_GAMT),On)
X $(INSTALL_DATA) $(DESKTOP) $(appdir)
X $(INSTALL_DATA) gamt.man $(mandir)/man1/gamt.1
X+endif
X $(INSTALL_DATA) amtterm.man $(mandir)/man1/amtterm.1
X $(INSTALL_DATA) amttool.man $(mandir)/man1/amttool.1
X $(INSTALL_DATA) amt-howto.man $(mandir)/man7/amt-howto.7
X
X clean:
X- rm -f *.o *~
X+ rm -f *.o *~
X rm -f $(TARGETS)
X
X distclean: clean
b7f898bed06837442e368aeb01489135
echo x - ports/net/amtterm-1.0/files/patch-amttool
sed 's/^X//' >ports/net/amtterm-1.0/files/patch-amttool << '5ea92849807454d5e5d08e076f1d5967'
X--- amttool.orig 2008-06-04 19:15:29.000000000 +0200
X+++ amttool 2008-06-04 20:07:19.000000000 +0200
X@@ -13,6 +13,7 @@
X
X my $amt_command = shift;
X $amt_command = "info" if !defined($amt_command);
X+my $amt_special = shift;
X
X my $amt_version;
X
X@@ -27,6 +28,16 @@
X "powercycle" => "19",
X );
X
X+my %rccs = (
X+ "nop" => "0",
X+ "pxe" => "1",
X+ "hd" => "2",
X+ "hdsafe" => "3",
X+ "diag" => "4",
X+ "cd" => "5",
X+);
X+
X+
X # incomplete list
X my %pt_status = (
X 0x0 => "success",
X@@ -112,7 +123,7 @@
X
X This utility can talk to Intel AMT managed machines.
X
X-usage: amttool <hostname> [ <command> ]
X+usage: amttool <hostname> [ <command> ] [ <special> ]
X commands:
X info - print some machine info (default).
X reset - reset machine.
X@@ -120,6 +131,14 @@
X powerdown - turn off machine.
X powercycle - powercycle machine.
X
X+specials:
X+ pxe - set PXE ROM as a default boot device
X+ nop - do nothing
X+ hd - hard drive boot
X+ hdsafe - hard drive boot (Safe Mode)
X+ diag - diagnostic boot
X+ cd - boot from CD/DVD drive
X+
X AMT 2.5+ only:
X netinfo - print network config.
X netconf <args> - configure network (check manpage).
X@@ -266,8 +285,9 @@
X }
X }
X
X-sub remote_control($) {
X+sub remote_control($$) {
X my $command = shift;
X+ my $special = shift;
X my @args;
X
X my $hostname = $nas->GetHostName()->paramsout;
X@@ -278,6 +298,7 @@
X printf "execute: %s\n", $command;
X push (@args, SOAP::Data->name('Command' => $rcc{$command}));
X push (@args, SOAP::Data->name('IanaOemNumber' => 4542));
X+ push (@args, SOAP::Data->name('SpecialCommand' => $rccs{$special})) if exists $rccs{$special};
X do_soap($rcs, "RemoteControl", @args);
X } else {
X printf "canceled\n";
X@@ -368,7 +389,7 @@
X check_amt_version(2,5);
X configure_network(@ARGV);
X } elsif ($amt_command =~ m/^(reset|powerup|powerdown|powercycle)$/) {
X- remote_control($amt_command);
X+ remote_control($amt_command,$amt_special);
X } else {
X print "unknown command: $amt_command\n";
X }
5ea92849807454d5e5d08e076f1d5967
echo x - ports/net/amtterm-1.0/files/patch-amttool.man
sed 's/^X//' >ports/net/amtterm-1.0/files/patch-amttool.man << '77ae46c13ae30b3e3498a5281afd05aa'
X--- amttool.man.orig 2008-06-05 00:01:48.000000000 +0200
X+++ amttool.man 2008-06-04 23:58:54.000000000 +0200
X@@ -2,7 +2,7 @@
X .SH NAME
X amttool - remotely control Intel AMT managed machines.
X .SH SYNOPSIS
X-.B amttool host [ command ]
X+.B amttool host [ command ] [ special ]
X .SH DESCRIPTION
X .B amttool
X is a perl script which speaks SOAP to Intel AMT managed machines.
X@@ -14,11 +14,13 @@
X control.
X .B command
X is an optional command.
X+.B special
X+is an extra option to set computer's default bootup medium.
X .P
X You must set fill AMT_PASSWORD environment variable with the AMT
X password.
X .P
X-For more inforamtions on Intel AMT check amt-howto(7).
X+For more information on Intel AMT check amt-howto(7).
X .SH COMMANDS
X .TP
X .B info
X@@ -59,6 +61,26 @@
X tries to configure the machine in shared mac address mode with dhcp,
X otherwise in separate mac address mode with static IP address.
X Default for dns1 is the gateway address, for dns2 it is 0.0.0.0.
X+.SH SPECIAL
X+These commands set the boot mode on next powerup.
X+.TP
X+.B nop
X+does nothing.
X+.TP
X+.B pxe
X+boots PXE ROM.
X+.TP
X+.B hd
X+boots hard drive.
X+.TP
X+.B hdsafe
X+boots hard drive in safe mode.
X+.TP
X+.B cd
X+boots from CD/DVD removable media.
X+.TP
X+.B diag
X+boots in diagnostics mode.
X .SH ENVIRONMENT
X .TP
X .B AMT_PASSWORD
77ae46c13ae30b3e3498a5281afd05aa
exit
--- amtterm.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list