gnu: Add Aegis.

* gnu/packages/version-control.scm (aegis): New variable.
* gnu/packages/patches/aegis-constness-error.patch: New file.
* gnu/packages/patches/aegis-perl-tempdir1.patch: New file.
* gnu/packages/patches/aegis-perl-tempdir2.patch: New file.
* gnu/packages/patches/aegis-test-fixup-1.patch: New file.
* gnu/packages/patches/aegis-test-fixup-2.patch: New file.
master
John Darrington 2014-01-24 15:01:00 +01:00
parent a4dc3bdb15
commit 0e534e74aa
6 changed files with 175 additions and 0 deletions

View File

@ -0,0 +1,12 @@
Fixes a fatal constness error with g++ 4.8.2.
--- aegis-4.24/common/ac/string/memmem.cc 2008-03-14 07:19:27.000000000 +0100
+++ aegis-4.24/common/ac/string/memmem.cc 2014-01-26 11:17:58.000000000 +0100
@@ -182,7 +182,7 @@
// Use optimizations in memchr when possible.
if (needle_len == 1)
- return memchr(haystack, *needle, haystack_len);
+ return (void *) memchr(haystack, *needle, haystack_len);
// Minimizing the worst-case complexity:
// Let n = haystack_len, m = needle_len.

View File

@ -0,0 +1,14 @@
This patch removes the hard coded temporary directory (which might not exist on the system)
and replaces it using the Perl preferred method.
--- aegis-4.24/script/aebisect.in 2008-03-14 07:19:27.000000000 +0100
+++ aegis-4.24/script/aebisect.in 2014-01-26 11:03:31.000000000 +0100
@@ -34,7 +34,8 @@
# @configure_input@
#
# Configure additions?
-my $TmpDir = "/var/tmp";
+use File::Temp qw/ tempdir /;
+my $TmpDir = tempdir();
my $ProgramName = "aebisect";
require 5.004;

View File

@ -0,0 +1,18 @@
--- aegis-4.24/script/aeintegratq.in 2008-03-14 07:19:27.000000000 +0100
+++ aegis-4.24/script/aeintegratq.in 2014-01-26 16:08:22.000000000 +0100
@@ -49,13 +49,14 @@
#
# @configure_input@
#
+use File::Temp qw/ tempdir /;
# Grab useful locations from configure
$BinDir = "@bindir@";
# configure does not expand @comdir@ directly so use sharedstatedir
$ComDir = "@sharedstatedir@";
# Configure additions?
-$TmpDir = "/var/tmp";
+$TmpDir = tempdir();
# base mail program that takes all info (to: subj: etc) on stdin
$SendMail = "/usr/lib/sendmail";
# Define the preferred integration host

View File

@ -0,0 +1,15 @@
This test fails because it expects a MIME type "Content-Type: image/gif"
whereas that provided by libmagic is "Content-Type: image/gif; charset=binary"
Presumably the test was written against a different version.
--- aegis-4.24/test/02/t0228a-matt.sh 2008-03-14 07:19:27.000000000 +0100
+++ aegis-4.24/test/02/t0228a-matt.sh 2014-01-27 09:43:44.000000000 +0100
@@ -147,7 +147,8 @@
SCRIPT_NAME=/cgi-bin/aeget \
PATH_INFO=icon/rss.gif \
QUERY_STRING= \
-$bin/aeget > rss.served.gif 2>&1
+$bin/aeget \
+| sed -e 's%^Content-Type: image/gif; charset=binary%Content-Type: image/gif%' > rss.served.gif 2>&1
if test $? -ne 0 ; then fail; fi
# Compare the expected and the actual received file.

View File

@ -0,0 +1,24 @@
This test was failing with subversion 1.7.8 because the svn repository structure
was not as the test expected. Presumably the test relies on different version.
--- aegis-4.24/test/02/t0222a-pmil.sh 2008-03-14 07:19:27.000000000 +0100
+++ aegis-4.24/test/02/t0222a-pmil.sh 2014-01-27 19:48:30.000000000 +0100
@@ -268,7 +268,8 @@
-c 10 > log 2>&1
if test $? -ne 0 ; then cat log; fail; fi
-test -f $work/svnroot/db/revs/2 || fail
+activity="check svn db 271"
+test -f $work/svnroot/db/revs/0/2 || test -f $work/svnroot/db/revs/2 || fail
# --------------------------------------------------------------------------
@@ -364,7 +365,8 @@
-c 3 > log 2>&1
if test $? -ne 0 ; then cat log; fail; fi
-test -f $work/svnroot/db/revs/3 || fail
+activity="check svn db 368"
+test -f $work/svnroot/db/revs/0/3 || test -f $work/svnroot/db/revs/3 || fail
#
# Only definite negatives are possible.

View File

@ -29,9 +29,15 @@
#:use-module (guix build-system python)
#:use-module (guix build utils)
#:use-module (gnu packages apr)
#:use-module (gnu packages bison)
#:use-module (gnu packages cook)
#:use-module (gnu packages curl)
#:use-module (gnu packages ed)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages gettext)
#:use-module (gnu packages groff)
#:use-module (gnu packages linux)
;; #:use-module (gnu packages gnutls)
#:use-module (gnu packages nano)
#:use-module (gnu packages openssl)
@ -478,3 +484,89 @@ large, complex patch files.")
code control system SCCS. This allows old code still under that system to be
accessed and migrated on modern systems.")
(license gpl3+)))
;; This package can unfortunately work only in -TEST mode, since Aegis
;; requires that it is installed setuid root.
(define-public aegis
(package
(name "aegis")
(version "4.24")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/aegis/aegis-"
version ".tar.gz"))
(sha256
(base32
"18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
(patches (list (search-patch "aegis-perl-tempdir1.patch")
(search-patch "aegis-perl-tempdir2.patch")
(search-patch "aegis-test-fixup-1.patch")
(search-patch "aegis-test-fixup-2.patch")
(search-patch "aegis-constness-error.patch")))))
(build-system gnu-build-system)
(inputs
`(("e2fsprogs" ,e2fsprogs)
("curl" ,curl)
("file" ,file)
("libxml2" ,libxml2)
("zlib" ,zlib)
("gettext" ,gnu-gettext)))
(native-inputs
`(("bison" ,bison)
("groff" ,groff)
("perl" ,perl)
;; Various tests require the following:
("cvs" ,cvs)
("flex" ,flex)
("cook" ,cook)
("subversion" ,subversion)
("rcs" ,rcs)
("ed" ,ed)))
(arguments
`(#:configure-flags (list "--with-no-aegis-configured"
"--sharedstatedir=/var/com/aegis")
#:parallel-build? #f ; There are some nasty racy rules in the Makefile.
#:phases
(alist-cons-before
'configure 'pre-conf
(lambda _
(substitute* (append '("configure"
"etc/check-tar-gz.sh"
"etc/patches.sh"
"etc/test.sh"
"script/aexver.in"
"script/aebisect.in"
"script/aeintegratq.in"
"script/tkaegis.in"
"script/test_funcs.in"
"web/eg_oss_templ.sh"
"web/webiface.html"
"libaegis/getpw_cache.cc")
(find-files "test" "\\.sh"))
(("/bin/sh") (which "sh")))
(setenv "SH" (which "sh")))
(alist-replace
'check
(lambda _
(let ((home (string-append (getcwd) "/my-new-home")))
;; Some tests need to write to $HOME.
(mkdir home)
(setenv "HOME" home)
;; This test assumes that flex has been symlinked to "lex".
(substitute* "test/00/t0011a.sh"
(("type lex") "type flex"))
;; The author decided to call the check rule "sure".
(zero? (system* "make" "sure"))))
%standard-phases))))
(home-page "http://aegis.sourceforge.net")
(synopsis "Project change supervisor")
(description "Aegis is a project change supervisor, and performs some of
the Software Configuration Management needed in a CASE environment. Aegis
provides a framework within which a team of developers may work on many
changes to a program independently, and Aegis coordinates integrating these
changes back into the master source of the program, with as little disruption
as possible. Resolution of contention for source files, a major headache for
any project with more than one developer, is one of Aegis's major functions.")
(license gpl3+)))