Your message dated Thu, 22 Jul 2010 21:32:19 +0000
with message-id <[email protected]>
and subject line Bug#535771: fixed in edje 0.9.99.49898-1
has caused the Debian Bug report #535771,
regarding edje: FTBFS on hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
535771: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535771
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: edje
Severity: important
Tags: patch
Justification: fails to build from source

Hi,

edje uses the PATH_MAX constant, which is optional according to POSIX, and 
undefined on GNU/Hurd.
I have attached a patch that uses dynamic allocation when PATH_MAX is undefined.


diff -urp edje-0.9.92.060/src/bin/edje_cc.c ../edje-0.9.92.060/src/bin/edje_cc.c
--- edje-0.9.92.060/src/bin/edje_cc.c   2008-10-26 23:42:09.000000000 +0100
+++ ../edje-0.9.92.060/src/bin/edje_cc.c        2009-06-24 14:41:08.000000000 
+0200
@@ -52,7 +52,9 @@ main(int argc, char **argv)
 {
    int i;
    struct stat st;
+#if defined(HAVE_REALPATH) && defined(PATH_MAX)
    char rpath[PATH_MAX], rpath2[PATH_MAX];
+#endif
 
    setlocale(LC_NUMERIC, "C");
 
@@ -130,7 +132,7 @@ main(int argc, char **argv)
    e_prefix_determine(argv[0]);
 
    /* check whether file_in exists */
-#ifdef HAVE_REALPATH
+#if defined(HAVE_REALPATH) && defined(PATH_MAX)
    if (!realpath(file_in, rpath) || stat(rpath, &st) || !S_ISREG(st.st_mode))
 #else
    if (stat(file_in, &st) || !S_ISREG(st.st_mode))
@@ -162,7 +164,7 @@ main(int argc, char **argv)
        exit(-1);
      }
 
-#ifdef HAVE_REALPATH
+#if defined(HAVE_REALPATH) && defined(PATH_MAX)
    if (realpath(file_out, rpath2) && !strcmp (rpath, rpath2))
 #else
    if (!strcmp (file_in, file_out))
diff -urp edje-0.9.92.060/src/bin/edje_cc_out.c 
../edje-0.9.92.060/src/bin/edje_cc_out.c
--- edje-0.9.92.060/src/bin/edje_cc_out.c       2009-02-26 04:13:15.000000000 
+0100
+++ ../edje-0.9.92.060/src/bin/edje_cc_out.c    2009-06-24 11:03:32.000000000 
+0200
@@ -773,8 +773,10 @@ data_write_scripts(Eet_File *ef)
        if ((!cd->shared) && (!cd->programs))
          continue;
 
-       char tmpn[4096];
-       snprintf(tmpn, PATH_MAX, "%s/edje_cc.sma-tmp-XXXXXX", tmpdir);
+       char *tmpsuff = "edje_cc.sma-tmp-XXXXXX";
+       int tmplen = strlen(tmpdir) + 1 + strlen(tmpsuff) + 1;
+       char *tmpn = malloc (tmplen);
+       snprintf(tmpn, tmplen, "%s/edje_cc.sma-tmp-XXXXXX", tmpdir, tmpsuff);
        fd = mkstemp(tmpn);
        if (fd < 0)
          error_and_abort(ef, "Unable to open temp file \"%s\" for script "
@@ -783,8 +785,10 @@ data_write_scripts(Eet_File *ef)
        create_script_file(ef, tmpn, cd);
        close(fd);
 
-       char tmpo[4096];
-       snprintf(tmpo, PATH_MAX, "%s/edje_cc.amx-tmp-XXXXXX", tmpdir);
+       tmpsuff = "edje_cc.amx-tmp-XXXXXX";
+       tmplen = strlen(tmpdir) + 1 + strlen(tmpsuff) + 1;
+       char *tmpo = malloc(tmplen);
+       snprintf(tmpo, tmplen, "%s/%s", tmpdir, tmpsuff);
        fd = mkstemp(tmpo);
        if (fd < 0)
          {
@@ -797,7 +801,9 @@ data_write_scripts(Eet_File *ef)
        close(fd);
 
        unlink(tmpn);
+       free(tmpn);
        unlink(tmpo);
+       free(tmpo);
      }
 }
 
diff -urp edje-0.9.92.060/src/bin/edje_cc_parse.c 
../edje-0.9.92.060/src/bin/edje_cc_parse.c
--- edje-0.9.92.060/src/bin/edje_cc_parse.c     2009-02-26 04:13:15.000000000 
+0100
+++ ../edje-0.9.92.060/src/bin/edje_cc_parse.c  2009-06-24 11:07:23.000000000 
+0200
@@ -637,11 +637,12 @@ compile(void)
 {
    char buf[4096];
    char inc[4096];
-   static char tmpn[4096];
+   static char *tmpn = NULL;
+   int tmplen;
    int fd;
    off_t size;
    char *data, *p;
-   const char *tmpdir;
+   const char *tmpdir, *tmpsuff;
 
 #ifdef HAVE_EVIL
    tmpdir = evil_tmpdir_get();
@@ -654,7 +655,16 @@ compile(void)
    p = strrchr(inc, '/');
    if (!p) strcpy(inc, "./");
    else *p = 0;
-   snprintf (tmpn, PATH_MAX, "%s/edje_cc.edc-tmp-XXXXXX", tmpdir);
+
+   tmpsuff = "edje_cc.edc-tmp-XXXXXX";
+   tmplen = strlen(tmpdir) + 1 + strlen(tmpsuff) + 1;
+   if (tmpn) 
+     {
+       free(tmpn);
+       tmpn = NULL;
+     }
+   tmpn = malloc(tmplen);
+   snprintf (tmpn, tmplen, "%s/%s", tmpdir, tmpsuff);
    fd = mkstemp(tmpn);
    if (fd >= 0)
      {
diff -urp edje-0.9.92.060/src/bin/edje_cc_sources.c 
../edje-0.9.92.060/src/bin/edje_cc_sources.c
--- edje-0.9.92.060/src/bin/edje_cc_sources.c   2008-12-19 00:58:37.000000000 
+0100
+++ ../edje-0.9.92.060/src/bin/edje_cc_sources.c        2009-07-04 
23:11:13.000000000 +0200
@@ -234,15 +234,19 @@ source_fetch_file(const char *fil, const
 void
 source_fetch(void)
 {
-   char buf[PATH_MAX] = {0}, *ptr;
+   char *buf, *ptr;
 
    ptr = strrchr(file_in, '/');
    if (ptr)
      {
-       snprintf(buf, sizeof (buf), "%s", ptr + 1);
+       buf = malloc(strlen(ptr));
+       snprintf(buf, strlen(ptr), "%s", ptr + 1);
      }
 
    source_fetch_file(file_in, buf[0] ? buf : file_in);
+
+   if (ptr)
+     free(buf);
 }
 
 int
diff -urp edje-0.9.92.060/src/lib/edje_edit.c 
../edje-0.9.92.060/src/lib/edje_edit.c
--- edje-0.9.92.060/src/lib/edje_edit.c 2009-02-12 09:35:32.000000000 +0100
+++ ../edje-0.9.92.060/src/lib/edje_edit.c      2009-06-24 14:28:46.000000000 
+0200
@@ -1735,18 +1735,33 @@ edje_edit_part_type_get(Evas_Object *obj
 EAPI const char *
 edje_edit_part_selected_state_get(Evas_Object *obj, const char *part)
 {
+#if !defined(PATH_MAX) && __GLIBC__
+   char *name;
+#else
    char name[PATH_MAX];
+#endif
+   char *ret;
 
    GET_RP_OR_RETURN(NULL);
 
    if (!rp->chosen_description)
      return "default 0.00";
 
+
+#if !defined(PATH_MAX) && __GLIBC__
+   asprintf(name, "%s %.2f", 
+            rp->chosen_description->state.name,
+            rp->chosen_description->state.value);
+   ret = eina_stringshare_add(name);
+   free(name);
+#else
    snprintf(name, PATH_MAX, "%s %.2f",
             rp->chosen_description->state.name,
             rp->chosen_description->state.value);
+   ret = eina_stringshare_add(name);
+#endif
 
-   return eina_stringshare_add(name);
+   return ret;
 }
 
 EAPI unsigned char
@@ -2095,7 +2110,11 @@ edje_edit_part_drag_event_set(Evas_Objec
 EAPI Eina_List *
 edje_edit_part_states_list_get(Evas_Object *obj, const char *part)
 {
+#if !defined(PATH_MAX) && __GLIBC__
+   char *state_name;
+#else
    char state_name[PATH_MAX];
+#endif
    Eina_List *states;
    Eina_List *l;
    Edje_Part_Description *state;
@@ -2111,17 +2130,31 @@ edje_edit_part_states_list_get(Evas_Obje
 
    //append default state
    state = rp->part->default_desc;
+#if !defined(PATH_MAX) && __GLIBC__
+   asprintf(state_name, 
+            "%s %.2f", state->state.name, state->state.value);
+   states = eina_list_append(states, eina_stringshare_add(state_name));
+   free(state_name);
+#else
    snprintf(state_name, PATH_MAX,
             "%s %.2f", state->state.name, state->state.value);
    states = eina_list_append(states, eina_stringshare_add(state_name));
+#endif
    //printf("NEW STATE def: %s\n", state->state.name);
 
    //append other states
    EINA_LIST_FOREACH(rp->part->other_desc, l, state)
      {
+#if !defined(PATH_MAX) && __GLIBC__
+       asprintf(state_name, 
+                "%s %.2f", state->state.name, state->state.value);
+       states = eina_list_append(states, eina_stringshare_add(state_name));
+       free(state_name);
+#else
        snprintf(state_name, sizeof(state_name),
                 "%s %.2f", state->state.name, state->state.value);
        states = eina_list_append(states, eina_stringshare_add(state_name));
+#endif
        //printf("NEW STATE: %s\n", state_name);
      }
    return states;
@@ -3205,7 +3238,8 @@ edje_edit_fonts_list_get(Evas_Object *ob
 EAPI unsigned char
 edje_edit_font_add(Evas_Object *obj, const char* path)
 {
-   char buf[PATH_MAX];
+   char *buf;
+   int buflen = 0;
    Font *fn;
    Edje_Font_Directory_Entry *fnt;
    Eet_File *eetf;
@@ -3279,7 +3313,10 @@ edje_edit_font_add(Evas_Object *obj, con
        fclose(f);
      }
    /* Write font to edje file */
-   snprintf(buf, sizeof(buf), "fonts/%s", fn->name);
+   
+   buflen = strlen("fonts/") + strlen(fn->name);
+   buf = malloc(buflen);
+   snprintf(buf, buflen, "fonts/%s", fn->name);
 
    if (fdata)
      {
@@ -3319,6 +3356,8 @@ edje_edit_font_add(Evas_Object *obj, con
        eina_hash_direct_add(ed->file->font_hash, fnt->entry, fnt);
      }
 
+   free(buf);
+
    return 1;
 }
 
@@ -5277,7 +5316,7 @@ static const char* //return the name of 
 _edje_generate_source(Evas_Object *obj)
 {
    printf("\n****** GENERATE EDC SOURCE *********\n");
-   char tmpn[PATH_MAX];
+   char *tmpn;
    int fd;
    FILE *f;
 
@@ -5288,7 +5327,7 @@ _edje_generate_source(Evas_Object *obj)
    
    /* Open a temp file */
    //TODO this will not work on windows
-   strcpy(tmpn, "/tmp/edje_edit.edc-tmp-XXXXXX");
+   tmpn = "/tmp/edje_edit.edc-tmp-XXXXXX";
    if (!(fd = mkstemp(tmpn))) return NULL;
    printf("*** tmp file: %s\n", tmpn);
    if (!(f = fopen(tmpn, "w"))) return NULL;

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: hurd-i386 (i686-AT386)

Kernel: GNU-Mach 1.3.99/Hurd-0.3
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



--- End Message ---
--- Begin Message ---
Source: edje
Source-Version: 0.9.99.49898-1

We believe that the bug you reported is fixed in the latest version of
edje, which is due to be installed in the Debian FTP archive:

edje_0.9.99.49898-1.debian.tar.gz
  to main/e/edje/edje_0.9.99.49898-1.debian.tar.gz
edje_0.9.99.49898-1.dsc
  to main/e/edje/edje_0.9.99.49898-1.dsc
edje_0.9.99.49898.orig.tar.gz
  to main/e/edje/edje_0.9.99.49898.orig.tar.gz
libedje-bin_0.9.99.49898-1_amd64.deb
  to main/e/edje/libedje-bin_0.9.99.49898-1_amd64.deb
libedje-dbg_0.9.99.49898-1_amd64.deb
  to main/e/edje/libedje-dbg_0.9.99.49898-1_amd64.deb
libedje-dev_0.9.99.49898-1_amd64.deb
  to main/e/edje/libedje-dev_0.9.99.49898-1_amd64.deb
libedje-doc_0.9.99.49898-1_all.deb
  to main/e/edje/libedje-doc_0.9.99.49898-1_all.deb
libedje-svn-06_0.9.99.49898-1_amd64.deb
  to main/e/edje/libedje-svn-06_0.9.99.49898-1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Albin Tonnerre <[email protected]> (supplier of updated edje package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 22 Jul 2010 20:08:29 +0200
Source: edje
Binary: libedje-bin libedje-svn-06 libedje-doc libedje-dev libedje-dbg
Architecture: source all amd64
Version: 0.9.99.49898-1
Distribution: unstable
Urgency: low
Maintainer: Albin Tonnerre <[email protected]>
Changed-By: Albin Tonnerre <[email protected]>
Description: 
 libedje-bin - Various binaries for use with libedje
 libedje-dbg - Debugging symbols for libedje
 libedje-dev - libedje headers and static libraries
 libedje-doc - libedje0 development documentation
 libedje-svn-06 - Graphical layout and animation library
Closes: 535771
Changes: 
 edje (0.9.99.49898-1) unstable; urgency=low
 .
   * New upstream snapshot
     - Fix FTBFS on Hurd (Closes: #535771)
   * Bump Standards-Version, no change required
   * Remove Xavier Oswald from uploaders, he is no longer active
   * Switch to '3.0 (quilt)' source format
   * Add edje_player to libedje-bin
   * Add patches/01_fix_edje_externals_install_path.diff:
     - Make the external modules path versionned
Checksums-Sha1: 
 0289331b3de5bc3e3678290c1c5a951baf31a900 2119 edje_0.9.99.49898-1.dsc
 d988125b53affe40c83d3d2e48ed00e7bdda4a24 690441 edje_0.9.99.49898.orig.tar.gz
 63dd2fe64ca90d41274d0f08580d19267e06baa7 6393 edje_0.9.99.49898-1.debian.tar.gz
 5599885f79841b4fd8f67416c863cc9c454adf8d 256402 
libedje-doc_0.9.99.49898-1_all.deb
 76c1fd706059933a53e281fdc0de9cdb9eab5f44 71776 
libedje-bin_0.9.99.49898-1_amd64.deb
 d9a0a1cbe1c3cee74c90107c8fdf582f234c0dee 197816 
libedje-svn-06_0.9.99.49898-1_amd64.deb
 5e9db5bad202f9a8e459f586c9b0e0b5220ced72 239166 
libedje-dev_0.9.99.49898-1_amd64.deb
 2cc8b91e43af8a00e0b342e6eb1fa8954a611682 497308 
libedje-dbg_0.9.99.49898-1_amd64.deb
Checksums-Sha256: 
 5fd68c9ee2f04394a348dbca926c8d7ac6a200792913f09b48349e87e0a0f1c2 2119 
edje_0.9.99.49898-1.dsc
 f1f18916120e7a74f6e941cbea248ae687ac3736131a34647a195c6238d49dff 690441 
edje_0.9.99.49898.orig.tar.gz
 2ae975141b03624d3a226ab4fda1ef36f66821a322a1dae562eb67a0077ed1b7 6393 
edje_0.9.99.49898-1.debian.tar.gz
 325a12504628c98c9b2a224472ef3888a58c59135037b6b5f015da18406586ab 256402 
libedje-doc_0.9.99.49898-1_all.deb
 f4891bde5f321afefba29b6fd727695ff09cab27abb0913eaae8089c59ad0e8e 71776 
libedje-bin_0.9.99.49898-1_amd64.deb
 2fd0571454dbd2aaa1d6980c5aa3af717c26a42998a11ca977e7dc370a188176 197816 
libedje-svn-06_0.9.99.49898-1_amd64.deb
 0ca2f8c58b0713a0df6d27b09f253cd97c5055328ee9bcec5ae7b71a2ca838be 239166 
libedje-dev_0.9.99.49898-1_amd64.deb
 524f3f155bcf2fea6d7ab7b6fee4ce2605e29a602b8a30652945cb0585f41c62 497308 
libedje-dbg_0.9.99.49898-1_amd64.deb
Files: 
 f5e40bb61a0ac503bd18ea23232bb7c9 2119 libs optional edje_0.9.99.49898-1.dsc
 0756dc5f11a6fb35be9935b3b735e0fe 690441 libs optional 
edje_0.9.99.49898.orig.tar.gz
 b9aa0bd213b24b17710159179d234dda 6393 libs optional 
edje_0.9.99.49898-1.debian.tar.gz
 4a18fa4ec63dad7641d047b1c0d24326 256402 doc optional 
libedje-doc_0.9.99.49898-1_all.deb
 d81e11419cc8ab4662aea2f5c1e3108c 71776 devel optional 
libedje-bin_0.9.99.49898-1_amd64.deb
 55b0853d4dad86c3bcd5c5756a3f2a15 197816 libs optional 
libedje-svn-06_0.9.99.49898-1_amd64.deb
 e409d5c8afa1843fd5e6bddf98d665b2 239166 libdevel optional 
libedje-dev_0.9.99.49898-1_amd64.deb
 773d2a2d3b792ce212b64a0af3d84e36 497308 debug extra 
libedje-dbg_0.9.99.49898-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJMSJZGAAoJEBEG8gBbtuSl3c8P/jjcvk2NI7PnCLvCH/U1ZSDq
5gR/c+aIAY40GG1GcjZamrr2kk/IlPKxiNm5teYtS9C9oQPmUUs8L//Ke6TL0Bwd
dO77GrwZVz3RtFenaTJbEyFinvx/nVar99RyYkuf16kBdZenrjHnchb3EIhFzuCZ
1QvHN9XeQScq1PKEvUOfbPmlRVe95rfXlq8PY0EvJXoGQhWGw1O4COQBb43ikEYd
PHfPEf39W1/R2yoW6FpeFwwsNpeTB5tRxPMwB8Cla/4zmqhffYXuo7c/8d+yZ2ot
iGpaA3df8/NWqMdChH6TBc9t4MYPsloV+uMq5+7EduFrjlnYpf8xHuQeILaD3wkg
0uW4JIAuKi6D5bds4zAHSDX2rrMqzI6oOsp0lJ2H8Vdc/PnW3sKdXYhC3NDpHDC1
LbcDhLdUp8lcUS8zQtcZ1dwJ3AmoyizALabJ2MSGIRiJhdcg2GDWl6stYS3lPZAw
n0wTjxaEYcZpA741IUW9X8dwFRaylnbBUTbbOuqZzP604AoPJHMm8w2srYfhAn0d
sH5yzf4V4jAnHINsm4SfNdpp0plx6xXcVlkFY5zqevRK0qoh+Fdh9LcE6Xn9/LzD
07fXfgdeC4DoeBmAfKDxKX+o3XtXp+OmLAjQT7W3QTFv9HyOtwrglU6UroXuTtxj
0MbUBDHuB7dtip/NPcO3
=ueu8
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to