]> sipb.mit.edu Git - ikiwiki.git/commitdiff
get confused. So it's best for ikiwiki to follow the compatability
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 9 Jul 2007 00:39:55 +0000 (00:39 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 9 Jul 2007 00:39:55 +0000 (00:39 +0000)
* Support building on systems that lack asprintf.
* mercurial getctime is currently broken, apparently by some change in
  mercurial version 0.9.4. Turn the failing test case into a TODO test case.

IkiWiki/Wrapper.pm
debian/changelog
doc/bugs/build_in_opensolaris.mdwn
po/ikiwiki.pot
t/mercurial.t

index 9415d4a17646a47ef41228bf8bada9a3795d8b28..558cdb1cca8c53415358b572664b9a0cca8dad1d 100644 (file)
@@ -33,7 +33,7 @@ sub gen_wrapper () { #{{{
        foreach my $var (@envsave) {
                $envsave.=<<"EOF"
        if ((s=getenv("$var")))
-               asprintf(&newenviron[i++], "%s=%s", "$var", s);
+               addenv("$var", s);
 EOF
        }
        if ($config{rcs} eq "svn" && $config{notify}) {
@@ -41,15 +41,15 @@ EOF
                # $2 in REV in the environment.
                $envsave.=<<"EOF"
        if (argc == 3)
-               asprintf(&newenviron[i++], "REV=%s", argv[2]);
+               addenv("REV", argv[2]);
        else if ((s=getenv("REV")))
-               asprintf(&newenviron[i++], "%s=%s", "REV", s);
+               addenv("REV", s);
 EOF
        }
        if ($config{rcs} eq "tla" && $config{notify}) {
                $envsave.=<<"EOF"
        if ((s=getenv("ARCH_VERSION")))
-               asprintf(&newenviron[i++], "%s=%s", "ARCH_VERSION", s);
+               addenv("ARCH_VERSION", s);
 EOF
        }
        
@@ -64,7 +64,6 @@ EOF
        open(OUT, ">$wrapper.c") || error(sprintf(gettext("failed to write %s: %s"), "$wrapper.c", $!));;
        print OUT <<"EOF";
 /* A wrapper for ikiwiki, can be safely made suid. */
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -72,12 +71,20 @@ EOF
 #include <string.h>
 
 extern char **environ;
+char *newenviron[$#envsave+5];
+int i=0;
+
+addenv(char *var, char *val) {
+       char *s=malloc(strlen(var)+1+strlen(val)+1);
+       if (!s)
+               perror("malloc");
+       sprintf(s, "%s=%s", var, val);
+       newenviron[i++]=s;
+}
 
 int main (int argc, char **argv) {
        /* Sanitize environment. */
        char *s;
-       char *newenviron[$#envsave+5];
-       int i=0;
 $envsave
        newenviron[i++]="HOME=$ENV{HOME}";
        newenviron[i++]="WRAPPED_OPTIONS=$configstring";
@@ -90,7 +97,7 @@ $envsave
        }
 
        execl("$this", "$this", NULL);
-       perror("failed to run $this");
+       perror("exec $this");
        exit(1);
 }
 EOF
index f8b04172a65d1964ddd0ed3daedafd7ed9a0af5b..7c1625a415b9adfb2baa16a5f0ca55714d5bf652 100644 (file)
@@ -2,10 +2,13 @@ ikiwiki (2.4) UNRELEASED; urgency=low
 
   * Make the toc plugin use html-compatible anchors. This is necessary since
     most web sites serve ikiwiki xhtml files as text/html and mozilla browsers
-    get confused. So it's best for ikiwiki to follow the compatability 
+    get confused. So it's best for ikiwiki to follow the compatability
     recommendations in appendix C of the XHTML spec. Closes: #432045
+  * Support building on systems that lack asprintf.
+  * mercurial getctime is currently broken, apparently by some change in
+    mercurial version 0.9.4. Turn the failing test case into a TODO test case.
 
- -- Joey Hess <joeyh@debian.org>  Sun, 08 Jul 2007 12:54:55 -0400
+ -- Joey Hess <joeyh@debian.org>  Sun, 08 Jul 2007 20:25:00 -0400
 
 ikiwiki (2.3) unstable; urgency=low
 
index 4e5b92d2dd36e82712b8c79fceb7a88e2ec273c0..4b738ccffc433feb4c30a11425892f1ce1cbc6f6 100644 (file)
@@ -31,3 +31,5 @@ Thanks, Joey et al., for a really cool tool.
 >> Of the possible patches to make this more portable, I'd generally prefer
 >> one that uses portable functions (safely), rather than one that includes
 >> an asprintf implementation in ikiwiki. --[[Joey]]
+
+[[bugs/done]]
index 4c8756f89670d0af8e55261bb100b33a65b782ca..1b86f0708c018c900258d23c2789cb6df0415855 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-29 20:49-0400\n"
+"POT-Creation-Date: 2007-07-08 20:26-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -548,13 +548,13 @@ msgid "failed to write %s: %s"
 msgstr ""
 
 #. translators: The parameter is a C filename.
-#: ../IkiWiki/Wrapper.pm:100
+#: ../IkiWiki/Wrapper.pm:107
 #, perl-format
 msgid "failed to compile %s"
 msgstr ""
 
 #. translators: The parameter is a filename.
-#: ../IkiWiki/Wrapper.pm:108
+#: ../IkiWiki/Wrapper.pm:115
 #, perl-format
 msgid "successfully generated %s"
 msgstr ""
index da4e2beaa78fc3e46284f8e8b309cbf1d74b9de4..7d6c2eacc3a1daf378ec3b31225629ebb5617c21 100755 (executable)
@@ -56,7 +56,10 @@ is($changes[0]{pages}[0]{"page"}, "test2.mdwn");
 
 is($changes[1]{pages}[0]{"page"}, "test1.mdwn");
 
-my $ctime = IkiWiki::rcs_getctime("test2.mdwn");
-is($ctime, 0);
+TODO: {
+       local $TODO = "hg behavior change seems to have broken this";
+       my $ctime = IkiWiki::rcs_getctime("test2.mdwn");
+       is($ctime, 0);
+}
 
 system "rm -rf $dir";