Date: Mon, 29 May 2000 05:07:30 -0700 (PDT) From: Matthew Braithwaite <mab@lathian.com> To: FreeBSD-gnats-submit@freebsd.org Cc: mab@lathian.com Subject: ports/18872: misc/amanda24: add options for GNUPLOT and KERBEROS Message-ID: <20000529120730.5EA95EA3D@pasteur.lathian>
next in thread | raw e-mail | index | archive | help
>Number: 18872 >Category: ports >Synopsis: misc/amanda24: add options for GNUPLOT and KERBEROS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon May 29 05:20:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Matt Braithwaite >Release: FreeBSD 4.0-20000424-STABLE i386 >Organization: >Environment: MIT Kerberos V 1.1.1 port. I don't know whether this will work with the plain old Kerberos 4 that comes with FreeBSD, and unfortunately don't have machines I can test this with. However, I tried to leave the possibility of its working open in the changes I made. >Description: First, please note NEW FILES patches/patch-ai patches/patch-aj files/patch-ah pkg/PLIST.WITH_GNUPLOT. This is really two patches in one. First, take out the execrable Gnuplot requirement, which will cause you to build all of X11 on your backup server if you're not careful. This involves breaking PLIST out into pieces. Second, add a Kerberos option. The Kerberos code says version 2.4.0p1, but it seems to work fine for me. There is a bug in the code, re: which I've also submitted a patch to the Amanda people. It's fixed in patch-ah. I had to modify configure to get it to look for Kerberos in /usr and /usr/local. I know I'm supposed to set USE_AUTOCONF in this situation, but doing so produced weird errors when running `make' that I didn't get when running `autoconf' in WRKDIR, so I contented myself with patching configure.in in the obvious way, in case anybody's of a mind to re-autoconfiscate. >How-To-Repeat: >Fix: diff -ruN misc/amanda24/Makefile misc/amanda24+/Makefile --- misc/amanda24/Makefile Fri Apr 14 01:45:17 2000 +++ misc/amanda24+/Makefile Mon May 29 04:37:30 2000 @@ -13,8 +13,18 @@ MAINTAINER= cwt@FreeBSD.org +.ifdef WITH_GNUPLOT BUILD_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot +.endif + +.if defined(WITH_KERBEROS) +.if ${USA_RESIDENT} == NO || !defined(USA_RESIDENT) +FORBIDDEN= "Kerberos can only be used by USA residents." +.else +DISTFILES= amanda-2.4.1p1.tar.gz hidden/isnt_this_silly/amanda-krb4-2.4.0p1.tar.gz +.endif +.endif WRKSRC= ${WRKDIR}/amanda-2.4.1p1 NO_LATEST_LINK= yes @@ -25,12 +35,29 @@ --with-dump-honor-nodump \ --with-user=operator --with-group=operator +.if defined(WITH_KERBEROS) +CONFIGURE_ARGS+= --with-krb4-security \ + --with-server-principal=amanda \ + --with-server-instance=amanda \ + --with-server-keyfile=${PREFIX}/etc/amanda/clitab \ + --with-client-principal=amanda \ + --with-client-keyfile=${PREFIX}/etc/amanda/srvtab +.endif + PATCH_STRIP= MAN8= amadmin.8 amanda.8 amcheck.8 amcheckdb.8 amcleanup.8 \ amdump.8 amflush.8 amlabel.8 amoverview.8 amplot.8 \ amrecover.8 amreport.8 amrestore.8 amrmtape.8 amstatus.8 \ amtape.8 amtoc.8 amverify.8 +post-extract: +.ifdef WITH_KERBEROS + @echo "Copying the 2.4.0p1 Kerberos code to ${WRKSRC}" + @${TAR} -C ${WRKDIR}/amanda-2.4.0p1 -cf - . | \ + ${TAR} -C ${WRKSRC} -xf - + ${CP} files/patch-ah patches +.endif + post-install: ${MKDIR} ${PREFIX}/share/examples/amanda ${CP} -R ${WRKSRC}/example/amanda.conf \ @@ -38,5 +65,10 @@ ${WRKSRC}/example/chg-scsi.conf \ ${WRKSRC}/example/disklist \ ${PREFIX}/share/examples/amanda +.ifdef WITH_GNUPLOT + @${CAT} pkg/PLIST.WITH_GNUPLOT ${TMPPLIST} > /tmp/plist.$$ + @${CP} /tmp/plist.$$ ${TMPPLIST} + @${RM} /tmp/plist.$$ +.endif .include <bsd.port.mk> diff -ruN misc/amanda24/files/md5 misc/amanda24+/files/md5 --- misc/amanda24/files/md5 Thu Dec 24 16:15:23 1998 +++ misc/amanda24+/files/md5 Mon May 29 04:56:26 2000 @@ -1 +1,2 @@ MD5 (amanda-2.4.1p1.tar.gz) = 13f34dc97c35f85f88e54ca25b2009ed +MD5 (hidden/isnt_this_silly/amanda-krb4-2.4.0p1.tar.gz) = bf0a1c68bafa3345e183fdefcd4108f7 diff -ruN misc/amanda24/files/patch-ah misc/amanda24+/files/patch-ah --- misc/amanda24/files/patch-ah Wed Dec 31 16:00:00 1969 +++ misc/amanda24+/files/patch-ah Mon May 29 02:55:47 2000 @@ -0,0 +1,19 @@ +*** common-src/krb4-security.c Mon Jun 8 19:23:06 1998 +--- common-src/krb4-security.c+ Mon May 29 02:52:47 2000 +*************** +*** 124,129 **** +--- 124,137 ---- + /* get realm name: krb_realmofhost always returns *something* */ + strcpy(realm, krb_realmofhost(hp->h_name)); + ++ if((hp = gethostbyname(alias)) == 0) return 0; ++ ++ /* get inst name: like krb_get_phost, but avoid multiple gethostbyname */ ++ ++ for(s = hp->h_name, d = inst; *s && *s != '.'; s++, d++) ++ *d = isupper(*s)? tolower(*s) : *s; ++ *d = '\0'; ++ + return hp; + } + diff -ruN misc/amanda24/patches/patch-ag misc/amanda24+/patches/patch-ag --- misc/amanda24/patches/patch-ag Wed Dec 31 16:00:00 1969 +++ misc/amanda24+/patches/patch-ag Mon May 29 04:35:49 2000 @@ -0,0 +1,23 @@ +*** server-src/dumper.c Thu Nov 19 15:12:23 1998 +--- server-src/dumper.c.new Wed May 10 22:41:46 2000 +*************** +*** 288,293 **** +--- 288,304 ---- + amfree(q); + break; + } ++ #ifdef UF_NODUMP ++ /* ++ * Do this to make sure this file itself is not backed up ++ * accidentaly. We do not really care for the return value ++ * of fchflags, because the open above would've failed if ++ * anything was wrong. ++ * XXX configure should tell us if fchflags exists on this ++ * platform ++ */ ++ fchflags(outfd, UF_NODUMP); ++ #endif + filename_seq = 0; + + check_options(options); + diff -ruN misc/amanda24/patches/patch-ai misc/amanda24+/patches/patch-ai --- misc/amanda24/patches/patch-ai Wed Dec 31 16:00:00 1969 +++ misc/amanda24+/patches/patch-ai Mon May 29 02:55:55 2000 @@ -0,0 +1,35 @@ +*** configure.in Sat Nov 21 09:05:28 1998 +--- configure.in+ Mon May 29 02:53:46 2000 +*************** +*** 669,678 **** + dnl other than the listed KRB4_SPOTS. We only compile kerberos support in + dnl if the right files are there. + +! : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"} + + AC_ARG_WITH(krb4-security, +! [ --with-krb4-security=DIR Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]], + KRB4_SECURITY="$withval", + : ${KRB4_SECURITY=no} + ) +--- 669,678 ---- + dnl other than the listed KRB4_SPOTS. We only compile kerberos support in + dnl if the right files are there. + +! : ${KRB4_SPOTS="/usr/local /usr /usr/kerberos /usr/cygnus /usr /opt/kerberos"} + + AC_ARG_WITH(krb4-security, +! [ --with-krb4-security=DIR Location of Kerberos software [/usr/local /usr /usr/kerberos /usr/cygnus /usr /opt/kerberos]], + KRB4_SECURITY="$withval", + : ${KRB4_SECURITY=no} + ) +*************** +*** 707,713 **** + KRB4LIBS="-lkrb -ldes" + break + elif test -f ${dir}/lib/libkrb4.a && +- test -f ${dir}/lib/libcrypto.a && + test -f ${dir}/lib/libdes425.a ; then + # + # This is Kerberos 5 with Kerberos 4 back-support. +--- 707,712 ---- diff -ruN misc/amanda24/patches/patch-aj misc/amanda24+/patches/patch-aj --- misc/amanda24/patches/patch-aj Wed Dec 31 16:00:00 1969 +++ misc/amanda24+/patches/patch-aj Mon May 29 02:56:08 2000 @@ -0,0 +1,46 @@ +*** configure Sat Nov 21 09:12:59 1998 +--- configure+ Mon May 29 02:54:39 2000 +*************** +*** 80,86 **** + ac_help="$ac_help + --with-amandahosts use .amandahosts instead of .rhosts" + ac_help="$ac_help +! --with-krb4-security=DIR Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]" + ac_help="$ac_help + --with-server-principal=ARG server host principal ["amanda"]" + ac_help="$ac_help +--- 80,86 ---- + ac_help="$ac_help + --with-amandahosts use .amandahosts instead of .rhosts" + ac_help="$ac_help +! --with-krb4-security=DIR Location of Kerberos software [/usr/local /usr /usr/kerberos /usr/cygnus /usr /opt/kerberos]" + ac_help="$ac_help + --with-server-principal=ARG server host principal ["amanda"]" + ac_help="$ac_help +*************** +*** 1851,1857 **** + esac + + +! : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"} + + # Check whether --with-krb4-security or --without-krb4-security was given. + if test "${with_krb4_security+set}" = set; then +--- 1851,1857 ---- + esac + + +! : ${KRB4_SPOTS="/usr/local /usr /usr/kerberos /usr/cygnus /usr /opt/kerberos"} + + # Check whether --with-krb4-security or --without-krb4-security was given. + if test "${with_krb4_security+set}" = set; then +*************** +*** 1897,1903 **** + KRB4LIBS="-lkrb -ldes" + break + elif test -f ${dir}/lib/libkrb4.a && +- test -f ${dir}/lib/libcrypto.a && + test -f ${dir}/lib/libdes425.a ; then + # + # This is Kerberos 5 with Kerberos 4 back-support. +--- 1897,1902 ---- diff -ruN misc/amanda24/pkg/PLIST misc/amanda24+/pkg/PLIST --- misc/amanda24/pkg/PLIST Sun Feb 20 23:10:26 2000 +++ misc/amanda24+/pkg/PLIST Sun May 28 20:29:15 2000 @@ -13,12 +13,8 @@ @exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m @unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R libexec/amanda/amandad -libexec/amanda/amcat.awk libexec/amanda/amidxtaped libexec/amanda/amindexd -libexec/amanda/amplot.awk -libexec/amanda/amplot.g -libexec/amanda/amplot.gp libexec/amanda/amtrmidx libexec/amanda/calcsize libexec/amanda/chg-chio @@ -49,7 +45,6 @@ sbin/amflush sbin/amlabel sbin/amoverview -sbin/amplot sbin/amrecover sbin/amreport sbin/amrestore diff -ruN misc/amanda24/pkg/PLIST.WITH_GNUPLOT misc/amanda24+/pkg/PLIST.WITH_GNUPLOT --- misc/amanda24/pkg/PLIST.WITH_GNUPLOT Wed Dec 31 16:00:00 1969 +++ misc/amanda24+/pkg/PLIST.WITH_GNUPLOT Sun May 28 20:29:19 2000 @@ -0,0 +1,5 @@ +libexec/amanda/amcat.awk +libexec/amanda/amplot.awk +libexec/amanda/amplot.g +libexec/amanda/amplot.gp +sbin/amplot >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000529120730.5EA95EA3D>