summaryrefslogtreecommitdiff
path: root/user/tlecarrour
diff options
context:
space:
mode:
Diffstat (limited to 'user/tlecarrour')
-rw-r--r--user/tlecarrour/auto-apt.mdwn97
-rw-r--r--user/tlecarrour/gphoto2.mdwn53
-rw-r--r--user/tlecarrour/libgphoto2.mdwn51
-rw-r--r--user/tlecarrour/memstat.mdwn145
-rw-r--r--user/tlecarrour/patch_life_cycle.mdwn90
-rw-r--r--user/tlecarrour/pidgin-microblog.mdwn57
-rw-r--r--user/tlecarrour/porting_guide_for_dummies.mdwn230
-rw-r--r--user/tlecarrour/rng-tools.mdwn58
-rw-r--r--user/tlecarrour/sakura.mdwn77
-rw-r--r--user/tlecarrour/schism.mdwn116
-rw-r--r--user/tlecarrour/shush.mdwn75
-rw-r--r--user/tlecarrour/sitecopy.mdwn73
-rw-r--r--user/tlecarrour/suckless-tools.mdwn79
-rw-r--r--user/tlecarrour/up-imapproxy.mdwn59
14 files changed, 1260 insertions, 0 deletions
diff --git a/user/tlecarrour/auto-apt.mdwn b/user/tlecarrour/auto-apt.mdwn
new file mode 100644
index 00000000..cceaee9a
--- /dev/null
+++ b/user/tlecarrour/auto-apt.mdwn
@@ -0,0 +1,97 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+auto-apt
+========
+
+When you want to build a program from source and it fails due to missing headers. Auto-apt can search what package would provide the header files.
+(from [[https://help.ubuntu.com/community/AutoApt]])
+
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: 2012-01-24
+* **Discussed**: [2012-01-26](http://lists.debian.org/debian-hurd/2012/01/msg00129.html)
+* **Draft Submitted**: -
+* **Submitted**: 2012-02-07, Bug#[659025](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659025)
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+The output of `grep -R PATH_MAX auto-apt-0.3.22/*` is a bit long. It contains files that have been patched using `#define PATH_MAX XYZ`.
+Here is the only file of interest:
+
+ pkgcdb/pkgtab.c: char buf[PATH_MAX];
+ pkgcdb/pkgtab.c: assert(p - pkg < PATH_MAX);
+ pkgcdb/pkgtab.c: static char buf[PATH_MAX];
+ pkgcdb/pkgtab.c: assert(len < PATH_MAX);
+
+
+* * *
+
+
+Comments
+--------
+
+ +++ auto-apt-0.3.22/auto-apt-pkgcdb.c 2012-02-03 09:25:54.045858173 +0100
+
+ + unsigned char *buf = NULL;
+
+ + while (!feof(stdin)) {
+ unsigned char *fname, *pkg;
+ unsigned char *p;
+ int nslash = 0;
+
+ + buf = get_line(stdin);
+ + if (buf == NULL)
+ + break;
+
+Reading from `stdin` using the `get_line()` function as explained in the [[porting guide|porting_guide_for_dummies]].
+
+ + free(buf);
+
+ +++ auto-apt-0.3.22/pkgcdb/pkgtab.c 2012-01-30 09:05:07.883096049 +0100
+
+ + char *buf = NULL;
+
+ + buf = (char *)malloc(p - pkg + 1);
+ + if (buf == NULL) {
+ + abort();
+ + }
+
+ + free(buf);
+
+ - static char buf[PATH_MAX];
+ + static char *buf;
+
+ + if (buf != NULL) {
+ + free(buf);
+ + }
+ + buf = (char *)malloc(len + 1);
+ + if (buf == NULL) {
+ + abort();
+ + }
+
+
diff --git a/user/tlecarrour/gphoto2.mdwn b/user/tlecarrour/gphoto2.mdwn
new file mode 100644
index 00000000..e5f80bbf
--- /dev/null
+++ b/user/tlecarrour/gphoto2.mdwn
@@ -0,0 +1,53 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+gphoto2
+=======
+
+The gphoto2 digital camera command-line client.
+**Home page**: [[http://www.gphoto.org/proj/libgphoto2]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: -
+* **Discussed**: -
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Only one file relies on `PATH_MAX`: gphoto2/main.c
+First need to patch [[libgphoto2]] package.
+
+
+* * *
+
+
+Comments
+--------
+
+Not yet started.
+
diff --git a/user/tlecarrour/libgphoto2.mdwn b/user/tlecarrour/libgphoto2.mdwn
new file mode 100644
index 00000000..fd18b7ae
--- /dev/null
+++ b/user/tlecarrour/libgphoto2.mdwn
@@ -0,0 +1,51 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+libgphoto2
+==========
+
+ImpulseTracker clone aiming at providing the same look&feel.
+**Home page**: [[http://www.gphoto.org/proj/libgphoto2]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: -
+* **Discussed**: -
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Fix `gphoto2-settings.c:gp_setting_get()` to accept `NULL` pointer and do the allocation.
+This is a requirement for [[gphoto2]] patch.
+
+* * *
+
+
+Comments
+--------
+
+Not yet started.
diff --git a/user/tlecarrour/memstat.mdwn b/user/tlecarrour/memstat.mdwn
new file mode 100644
index 00000000..fc12bd25
--- /dev/null
+++ b/user/tlecarrour/memstat.mdwn
@@ -0,0 +1,145 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+
+memstat
+=======
+
+Lists all the processes, executables, and shared libraries that are using up virtual memory. It's helpful to see how the shared memory is used and which 'old' libs are loaded.
+**Home page**: [[http://sourceforge.net/projects/memstattool]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: 2012-01-20
+* **Discussed**: [2012-01-21](http://lists.debian.org/debian-hurd/2012/01/msg00081.html)
+* **Draft Submitted**: [2012-01-25](http://lists.debian.org/debian-hurd/2012/01/msg00122.html)
+* **Submitted**: 2012-02-02, Bug#[658384](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658384)
+* **Stopped**: 2012-02-07, depends on `/proc` which is not yet totally implemented on the Hurd.
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX memstat-0.9/*`:
+
+ memstat.c: char *p, major[8], minor[8], buff[PATH_MAX + 300], *path, perm[4];
+ memstat.c: char linkname[PATH_MAX], filename[PATH_MAX];
+ memstat.c: if ((len = readlink(filename, linkname, PATH_MAX)) == -1) {
+
+
+* * *
+
+
+Comments
+--------
+
+Here are comments on the patch...
+
+ +#define FMT_PROC_MAPS "/proc/%d/maps"
+ +#define FMT_PROC_EXE "/proc/%d/exe"
+
+Define string formats.
+
+ static void read_proc(void)
+ {
+ unsigned int nread, pid;
+ unsigned long inode, lo, hi, offs;
+ - char *p, major[8], minor[8], buff[PATH_MAX + 300], *path, perm[4];
+ + char *p, major[8], minor[8], *path, perm[4];
+ + char *buff = NULL;
+ + size_t buff_size = 0;
+
+In this function we turn `buff` into dynamically allocated string.
+
+
+ - sprintf(buff, "/proc/%d/maps", pid);
+ - f = fopen(buff, "r");
+ + char filename[sizeof(FMT_PROC_MAPS) + (sizeof(int) * 3) + 1];
+ + sprintf(filename, FMT_PROC_MAPS, pid);
+ + f = fopen(filename, "r");
+
+Compute the maximum size of `filename` using `sizeof(int) * 3` as explainend in the [[porting guide|porting_guide_for_dummies]].
+
+
+ - while (fgets(buff, sizeof(buff), f)) {
+ + while (!feof(f)) {
+ + buff = get_line(f);
+ + if (buff == NULL)
+ + break;
+
+Read a line from the file using [[get_line()|porting_guide_for_dummies]].
+
+
+ - if ((strlen(buff) == 10) && (strcmp(buff, " (deleted)") == 0))
+ + if ((strlen(buff) == 10) && (strcmp(buff, " (deleted)") == 0)) {
+ + free(buff);
+ continue;
+ + }
+ nread = sscanf(buff, "%lx %lx %4s %lx %s %s %lu %as", &lo, &hi, perm, &offs, major, minor, &inode, &path);
+ + free(buff);
+
+Free the `buff` when it's not used anymore.
+
+
+ + buff_size = 4; /* size of the format string without "%x" expressions */
+ + buff_size += strlen(major);
+ + buff_size += strlen(minor);
+ + buff_size += sizeof(int) * 3 + 1; /* inode */
+ + buff_size += 1; /* '\0' */
+ + buff = malloc(buff_size);
+ + if (buff == NULL) {
+ + perror("Cannot allocate memory!");
+ + exit(1);
+ + }
+
+Compute the size that the `buff` must have.
+
+
+ - char linkname[PATH_MAX], filename[PATH_MAX];
+ - ssize_t len;
+ + char *linkname = NULL;
+ + struct stat sb;
+ + ssize_t len = -1;
+
+In this function we turn linkname into dynamically allocated string.
+filename will be declared later.
+
+
+ - sprintf(filename, "/proc/%d/exe", pid);
+ - if ((len = readlink(filename, linkname, PATH_MAX)) == -1) {
+ + char filename[sizeof(FMT_PROC_EXE) + (sizeof(int) * 3) + 1];
+ + sprintf(filename, FMT_PROC_EXE, pid);
+
+Same as above with `FMT_PROC_MAPS`.
+
+
+ + char filename[sizeof(FMT_PROC_EXE) + (sizeof(int) * 3) + 1];
+ + sprintf(filename, FMT_PROC_EXE, pid);
+ + linkname = readlink_malloc(filename);
+ + if (linkname == NULL) {
+
+Use `readlink_malloc()` as explained in the porting guide because `/proc/PID/exe` doesn't work with `readlink()`
+
+
+ + free(linkname);
+
+Free dynamically allocated variable that is not used anymore.
+
diff --git a/user/tlecarrour/patch_life_cycle.mdwn b/user/tlecarrour/patch_life_cycle.mdwn
new file mode 100644
index 00000000..fd913378
--- /dev/null
+++ b/user/tlecarrour/patch_life_cycle.mdwn
@@ -0,0 +1,90 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+
+Patch Life Cycle
+================
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Start
+-----
+
+Follow the steps listed on the [[package porting page|porting_guide_for_dummies]].
+
+
+Discuss
+-------
+
+Send the patch for review to [debian-hurd@lists.debian.org](mailto:debian-hurd@lists.debian.org).
+**Before** sending the patch, make sure that you've solved all the known problems listed in the [[package porting general introduction|hurd/porting/guidelines]]
+and the [[porting guide for dummies|porting_guide_for_dummies]].
+
+
+Submit Draft
+------------
+
+When the patch is good enough, you can write the draft of the official bug report.
+This draft should first be sent for review to [debian-hurd@lists.debian.org](mailto:debian-hurd@lists.debian.org) with the patch attached.
+
+Here is an example for memstat:
+
+ Source: memstat
+ Version: 0.9
+ Severity: important
+ Tags: patch
+ User: debian-hurd@lists.debian.org
+ Usertags: hurd
+ X-DebBugs-CC: debian-hurd@lists.debian.org
+
+ Hi,
+
+ This patch solves the build problems for GNU/Hurd due to PATH_MAX
+ issues. The solution is to make dynamic string allocations instead of
+ using fixed length buffers. The patch involves one file, and is
+ trivial. Parts of the code have been reviewed by GNU/Hurd developers
+ and Debian GNU/Hurd developers and maintainers.
+
+ FIXME:
+ Is it really useful to check if BUFSIZ is defined?
+
+ TODO:
+ Should the "whole package" be tested with valgrind on GNU/Linux?!
+ If yes, is there a standard procedure to do it?!
+
+ Thanks!
+ Special thanks to Jérémie and Richard for their comments!
+
+ (Not submitted yet, comments are welcome.)
+
+Once it's been approved, you can proceed to the submission.
+
+
+Submit
+------
+
+The bug report is the same as above, with all the **FIXME**, **TODO** and final comment removed.
+Attach the patch and send it to [submit@bugs.debian.org](mailto:submit@bugs.debian.org).
+Convention for the e-mail subject: `memstat: FTBFS on hurd-i386`
+Convention for the attachment name is: `fix_FTBFS4Hurd.patch`
+
+
+Accept
+------
+
+Once the patch has been accepted, update your patch page!
+**Congratulations!**
+
+
+
diff --git a/user/tlecarrour/pidgin-microblog.mdwn b/user/tlecarrour/pidgin-microblog.mdwn
new file mode 100644
index 00000000..13e37c00
--- /dev/null
+++ b/user/tlecarrour/pidgin-microblog.mdwn
@@ -0,0 +1,57 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+pidgin-microblog
+================
+
+Microblogging plugins for Pidgin.
+**Home page**: [[http://code.google.com/p/microblog-purple/]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: -
+* **Discussed**: -
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX pidgin-microblog-0.3.0/*`:
+
+ pidgin-microblog-0.3.0/microblog/mb_cache.c:static char cache_base_dir[PATH_MAX] = "";
+ pidgin-microblog-0.3.0/microblog/mb_cache.c:snprintf(cache_base_dir, PATH_MAX, "%s/mbpurple", user_dir);
+
+The `cache_base_dir` is static but should only be called through a getter.
+If it has not been initialized, return "" from the getter.
+
+* * *
+
+
+Comments
+--------
+
+Not yet started.
+
diff --git a/user/tlecarrour/porting_guide_for_dummies.mdwn b/user/tlecarrour/porting_guide_for_dummies.mdwn
new file mode 100644
index 00000000..64f0ba0d
--- /dev/null
+++ b/user/tlecarrour/porting_guide_for_dummies.mdwn
@@ -0,0 +1,230 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+
+Porting Guide for Dummies
+=========================
+
+The problems addressed here were encountered while working
+on fixing **PATH_MAX** and **MAXPATHLEN**.
+
+[[!toc startlevel=2 levels=3]]
+
+
+* * *
+
+
+Test on Hurd
+------------
+
+
+### Installing the required files
+
+As `apt-get source` will download and extract many files, you may want to create a dedicated folder for the package and work from there.
+
+ mkdir PACKAGE
+ cd PACKAGE
+ sudo apt-get build-dep PACKAGE
+ apt-get source PACKAGE
+
+
+### Trying to build the package
+
+ cd PACKAGE_SOURCE
+ dpkg-buildpackage -us -uc -rfakeroot -tc
+
+
+### Test a quick fix
+
+In all the files that use **PATH_MAX**, include those lines at the beginning.
+
+ #ifndef PATH_MAX
+ #define PATH_MAX 4196
+ #endif
+
+Try to rebuild the package and see if it's solved the problem.
+If yes, you can start working on the package.
+
+
+* * *
+
+
+Basic things
+------------
+
+### Maintaining a original version
+
+ mkdir old
+ cp -r PACKAGE_SOURCE old/
+
+
+### Coding style
+
+Follow the conventions used in the source code!
+
+ if (condition) {
+ do_smthg();
+ }
+
+is not the same as:
+
+ if (condition)
+ {
+ do_smthg();
+ }
+
+and is not the same as:
+
+ if (condition)
+ do_smthg();
+
+Pay attention to spaces surrounding, or not, arithmetic signs and symbols:
+
+ a = do_smthg( b + c );
+ a = do_smthg(b+c);
+
+
+### Indentation
+
+By default use 8 spaces as the size for 1 tab.
+Then figure out if the code uses tab + 1/2 tab:
+
+ ....if (condition) {
+ ------->do_smthg();
+ ....}
+
+or tab only:
+
+ ------->if (condition) {
+ ------->------->do_smthg();
+ ------->}
+
+
+### Creating a patch
+
+ diff -Naur old/PACKAGE-VERSION PACKAGE-VERSION > fix_FTBFS4Hurd.patch
+
+
+* * *
+
+
+Known problems
+--------------
+
+### Dynamically allocated buffer returned by a function
+
+Use a static buffer
+
+### Buffer used to format an expression containing an INTEGER
+
+The length of an INTEGER in a string can be up to sizeof (int) * 3 + 1.
+
+> The usual trick for "%d" is to use the constant 'sizeof (int) * 3 + 1'.
+I included + 1 for the sign, but it's not really necessary
+if we exepect sizeof(int) >= 2, which we probably should.
+**Jérémie Koenig**
+
+ log(MAX_INT)
+ = log(2 ^ 32)
+ = 32 * log(2)
+ = 4 * 8 * log(2)
+ = sizeof(int) * 2.40823997
+ < sizeof(int) * 3
+
+
+### Proper use of realloc()
+
+use a new_buff to check if everything went fine Free buf if realloc failed (and prog doesn't exit)
+
+
+### Reading lines from file
+
+Function to read line (no size limit, ending with "\n") from a file.
+
+ static char *get_line(FILE *f)
+ {
+ char *buff = NULL;
+ char *new_buff = NULL;
+ size_t buff_size = 0;
+ size_t last = 0;
+
+ while (!feof(f)) {
+ buff_size = buff_size ? buff_size * 2 : BUFSIZ;
+ new_buff = realloc(buff, buff_size);
+ if (new_buff == NULL) {
+ free(buff);
+ return NULL;
+ }
+ buff = new_buff;
+ if (fgets(buff + last, buff_size - last, f) == NULL) {
+ free(buff);
+ return NULL;
+ }
+ last = strlen(buff);
+ if (buff[last - 1] == '\n')
+ return buff;
+ }
+ return buff;
+ }
+
+
+### Proper use of readlink()
+
+One has to rely on lstat() to get the size of the link that readlink() returns.
+
+Declare what you need:
+
+ char *linkname = NULL;
+ struct stat sb;
+ ssize_t len = -1;
+
+Call lstat() and check return value:
+
+ if (lstat(filename, &sb) == -1) {
+
+Create a buffer of the appropriate size and check the return value:
+
+ linkname = malloc(sb.st_size + 1);
+ if (linkname == NULL) {
+
+Call readlink(), check return value and set the null char in the linkname:
+
+ len = readlink(filename, linkname, sb.st_size + 1);
+ if (len < 0 || len > sb.st_size) {
+ ...
+ linkname[sb.st_size] = '\0';
+
+
+### Alternative use of readlink(): readlink_malloc()
+
+In some cases the above approch doesn't work.for instance when reading from
+**/proc/*/exe** on Linux. In this case you can try the following function.
+The code comes from [[https://buildsecurityin.us-cert.gov/bsi/articles/knowledge/coding/806-BSI.html]]
+
+ static char *readlink_malloc(const char *filename)
+ {
+ int size = 100;
+
+ while (1) {
+ char *buff = malloc(size);
+ if (buff == NULL)
+ return NULL;
+ int nchars = readlink(filename, buff, size);
+ if (nchars < 0)
+ return NULL;
+ if (nchars < size) {
+ buff[nchars] = '\0';
+ return buff;
+ }
+ free (buff);
+ size *= 2;
+ }
+ }
+
diff --git a/user/tlecarrour/rng-tools.mdwn b/user/tlecarrour/rng-tools.mdwn
new file mode 100644
index 00000000..4ea60ac8
--- /dev/null
+++ b/user/tlecarrour/rng-tools.mdwn
@@ -0,0 +1,58 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+rng-tools
+=========
+
+Daemon to use a Hardware TRNG. The rngd daemon acts as a bridge between a Hardware TRNG (true random number generator) such as the ones in some Intel/AMD/VIA chipsets, and the kernel's PRNG (pseudo-random number generator).
+(from [[http://packages.debian.org/lenny/rng-tools]])
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: 2012-01-28
+* **Discussed**: [2012-01-30](http://lists.debian.org/debian-hurd/2012/01/msg00177.html)
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX rng-tools-2-unofficial-mt.14/*`:
+
+ viapadlock_engine.c:static char cpudev_path[PATH_MAX+1];
+ viapadlock_engine.c:char devpath[PATH_MAX+1];
+
+
+* * *
+
+
+Comments
+--------
+
+Work in progress, see related [thread](http://lists.debian.org/debian-hurd/2012/01/msg00177.html).
+
+Even if the **PATH_MAX** can be easily fixed, some problems remain.
+The code uses `linux/types.h`, that has to be replaced by `sys/types.h`, but also uses `linux/random.h` which has no equivalent I know of.
+At least one source file is named after the OS: `rngd_linux.c`.
diff --git a/user/tlecarrour/sakura.mdwn b/user/tlecarrour/sakura.mdwn
new file mode 100644
index 00000000..d0cd8711
--- /dev/null
+++ b/user/tlecarrour/sakura.mdwn
@@ -0,0 +1,77 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+sakura
+======
+
+Simple but powerful libvte-based terminal emulator.
+**Home page**: [[http://www.pleyades.net/david/sakura.php]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: 2012-02-03
+* **Discussed**: [2012-02-03](http://lists.debian.org/debian-hurd/2012/02/msg00031.html)
+* **Draft Submitted**: -
+* **Submitted**: 2012-02-07, Bug#[659018](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659018)
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX sakura-2.4.2/*`:
+
+ src/sakura.c: char buf[PATH_MAX+1];
+
+
+* * *
+
+
+Comments
+--------
+
+ + char *buf = NULL;
+ + struct stat sb;
+
+Will dynamically allocate the buffer according to information provided by `lstat()`.
+
+ + if (lstat(file, &sb) == -1) {
+ + return cwd;
+ + }
+ + buf = malloc(sb.st_size + 1);
+
+Do the allocation. Don't bother to check for return value as `g_strdup_printf()` doesn't do it.
+
+ + len = readlink (file, buf, sb.st_size + 1);
+
+ + if (len < 0 || len > sb.st_size) {
+ + g_free(buf);
+ + return cwd;
+ + }
+
+Check `realink()` return value.
+
+ + g_free(buf);
+
+Free the dynamically allocated buffer.
+
diff --git a/user/tlecarrour/schism.mdwn b/user/tlecarrour/schism.mdwn
new file mode 100644
index 00000000..3f726832
--- /dev/null
+++ b/user/tlecarrour/schism.mdwn
@@ -0,0 +1,116 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+schism
+======
+
+ImpulseTracker clone aiming at providing the same look&feel.
+**Home page**: [[http://nimh.org/schismtracker]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: -
+* **Discussed**: -
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX schism-0+20110101/*`:
+
+ include/disko.h: char tempname[PATH_MAX];
+ include/disko.h: char filename[PATH_MAX];
+ include/headers.h:# undef PATH_MAX
+ schism/disko.c: if (len + 6 >= PATH_MAX) {
+ schism/audio_loadsave.c:char song_filename[PATH_MAX + 1];
+ schism/audio_loadsave.c: strncpy(song_filename, file, PATH_MAX);
+ schism/audio_loadsave.c: song_filename[PATH_MAX] = '\0';
+ schism/page_loadmodule.c:static char filename_entry[PATH_MAX + 1] = "";
+ schism/page_loadmodule.c:static char dirname_entry[PATH_MAX + 1] = "";
+ schism/page_loadmodule.c:char cfg_module_pattern[PATH_MAX + 1] = GLOB_DEFAULT;
+ schism/page_loadmodule.c:static char glob_list_src[PATH_MAX + 1] = ""; // the pattern used to make glob_list (this is an icky hack)
+ schism/page_loadmodule.c: strncpy(glob_list_src, globspec, PATH_MAX);
+ schism/page_loadmodule.c: glob_list_src[PATH_MAX] = '\0';
+ schism/page_loadmodule.c: strncpy(cfg_dir_modules, ptr, PATH_MAX);
+ schism/page_loadmodule.c: cfg_dir_modules[PATH_MAX] = 0;
+ schism/page_loadmodule.c: create_textentry(widgets_loadmodule + 2, 13, 46, 64, 0, 3, 3, NULL, filename_entry, PATH_MAX);
+ schism/page_loadmodule.c: create_textentry(widgets_loadmodule + 3, 13, 47, 64, 2, 3, 0, NULL, dirname_entry, PATH_MAX);
+ schism/page_loadmodule.c: create_textentry(widgets_exportsave + 2, 13, 46, 64, 0, 3, 3, NULL, filename_entry, PATH_MAX);
+ schism/page_loadmodule.c: create_textentry(widgets_exportsave + 3, 13, 47, 64, 2, 0, 0, NULL, dirname_entry, PATH_MAX);
+ schism/util.c: char buf[PATH_MAX];
+ schism/util.c: if (strlen(filename) > PATH_MAX - 16) {
+ schism/util.c: char buf[PATH_MAX + 1];
+ schism/util.c: if (getcwd(buf, PATH_MAX))
+ schism/util.c: char buf[PATH_MAX + 1];
+ schism/util.c: if (getcwd(buf, PATH_MAX))
+ schism/util.c: char buf[PATH_MAX + 1];
+ schism/util.c: char buf[PATH_MAX];
+ schism/util.c: char buf2[PATH_MAX];
+ schism/util.c: if (!GetCurrentDirectory(PATH_MAX-1,buf)) return 0;
+ schism/util.c: snprintf(buf2, PATH_MAX-2, "%s.bat", name);
+ schism/main.c: strncpy(cfg_dir_modules, initial_dir, PATH_MAX);
+ schism/main.c: cfg_dir_modules[PATH_MAX] = 0;
+ schism/main.c: strncpy(cfg_dir_samples, initial_dir, PATH_MAX);
+ schism/main.c: cfg_dir_samples[PATH_MAX] = 0;
+ schism/main.c: strncpy(cfg_dir_instruments, initial_dir, PATH_MAX);
+ schism/main.c: cfg_dir_instruments[PATH_MAX] = 0;
+ schism/page_loadinst.c:static char inst_cwd[PATH_MAX+1] = "";
+ schism/page_loadinst.c:static char slash_search_str[PATH_MAX];
+ schism/page_loadinst.c: strncpy(cfg_dir_instruments, ptr, PATH_MAX);
+ schism/page_loadinst.c: cfg_dir_instruments[PATH_MAX] = 0;
+ schism/page_loadinst.c: strncpy(inst_cwd, ptr, PATH_MAX);
+ schism/page_loadinst.c: inst_cwd[PATH_MAX] = 0;
+ schism/page_loadinst.c: if (slash_search_mode < PATH_MAX) {
+ schism/config.c:char cfg_dir_modules[PATH_MAX + 1], cfg_dir_samples[PATH_MAX + 1], cfg_dir_instruments[PATH_MAX + 1],
+ schism/config.c: cfg_dir_dotschism[PATH_MAX + 1], cfg_font[NAME_MAX + 1];
+ schism/config.c: strncpy(cfg_dir_dotschism, ptr, PATH_MAX);
+ schism/config.c: cfg_dir_dotschism[PATH_MAX] = 0;
+ schism/config.c: cfg_get_string(&cfg, "Directories", "modules", cfg_dir_modules, PATH_MAX, tmp);
+ schism/config.c: cfg_get_string(&cfg, "Directories", "samples", cfg_dir_samples, PATH_MAX, tmp);
+ schism/config.c: cfg_get_string(&cfg, "Directories", "instruments", cfg_dir_instruments, PATH_MAX, tmp);
+ schism/config.c: strncpy(cfg_module_pattern, ptr, PATH_MAX);
+ schism/config.c: cfg_module_pattern[PATH_MAX] = 0;
+ schism/page_vars.c: cfg_dir_modules, PATH_MAX);
+ schism/page_vars.c: cfg_dir_samples, PATH_MAX);
+ schism/page_vars.c: cfg_dir_instruments, PATH_MAX);
+ schism/page_loadsample.c:static char current_filename[PATH_MAX];
+ schism/page_loadsample.c:static char search_str[PATH_MAX];
+ schism/page_loadsample.c: PATH_MAX-1);
+ schism/page_loadsample.c: PATH_MAX-1);
+ schism/page_loadsample.c: strncpy(cfg_dir_samples, ptr, PATH_MAX);
+ schism/page_loadsample.c: cfg_dir_samples[PATH_MAX] = 0;
+ schism/page_loadsample.c: if (search_pos < PATH_MAX) {
+
+
+* * *
+
+
+Comments
+--------
+
+Not yet started.
+
+Looks like a lot, but most of them, if not all, are trivial.
diff --git a/user/tlecarrour/shush.mdwn b/user/tlecarrour/shush.mdwn
new file mode 100644
index 00000000..68a824f0
--- /dev/null
+++ b/user/tlecarrour/shush.mdwn
@@ -0,0 +1,75 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+shush
+=====
+
+Runs a command and optionally reports its output by mail.
+**Home page**: [[http://web.taranis.org/shush]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: -
+* **Discussed**: -
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX shush-1.2.3/*`:
+
+ src/shush.c: char cfdir[PATH_MAX+1], *slfac, *to[3];
+ src/shush.c: strlcpy(cfdir+1, optarg, PATH_MAX);
+ src/shush.c: snprintf(cfdir+1, PATH_MAX, "%s/.shush", getenv("HOME"));
+ src/crontab.c: static char cfname[PATH_MAX];
+ src/crontab.c: snprintf(cfname, PATH_MAX, "%s/schedule", cfdname);
+ src/crontab.c: snprintf(cfname, PATH_MAX, "%s/%s", cfdname, token);
+ src/crontab.c: snprintf(cfname, PATH_MAX, "%s/%s", cfdname, entry->d_name);
+ src/crontab.c: char tag[PATH_MAX+80], *oldtab, *mytab, newtab[PATH_MAX];
+ src/crontab.c: snprintf(newtab, PATH_MAX, "%s/%s-crontab.XXXXXX",
+ src/state.c:static char statepath[PATH_MAX];
+ src/state.c: snprintf(statepath, PATH_MAX, "%s/.state/shtate-%lu-%s-%s-%u",
+ src/state.c: snprintf(statepath, PATH_MAX, "%s/shtate-%lu-%s-%s-%u",
+ src/run.c: char fname[PATH_MAX], outlog[PATH_MAX], errlog[PATH_MAX], *outstr, *errstr;
+ src/run.c: snprintf(fname, PATH_MAX, "%s/%s", cfdir, job);
+ src/run.c: snprintf(outlog, PATH_MAX, "%s.stdout", cf_getstr(CF_CONFIG));
+ src/run.c: snprintf(errlog, PATH_MAX, "%s.stderr", cf_getstr(CF_CONFIG));
+ src/run.c: snprintf(fname, PATH_MAX, "%s/.%s-%s", cfdir, jid, get_hostname(0));
+ src/run.c: snprintf(outlog, PATH_MAX, "%s/%s-%s.stdout.XXXXXX",
+ src/run.c: snprintf(errlog, PATH_MAX, "%s/%s-%s.stderr.XXXXXX",
+ src/check.c: char fname[PATH_MAX], outre[PATH_MAX], errre[PATH_MAX], *outstr, *errstr;
+ src/check.c: snprintf(fname, PATH_MAX, "%s/%s", cfdir, job);
+ src/check.c: snprintf(outre, PATH_MAX, "%s.stdout", cf_getstr(CF_CONFIG));
+ src/check.c: snprintf(errre, PATH_MAX, "%s.stderr", cf_getstr(CF_CONFIG));
+
+
+* * *
+
+
+Comments
+--------
+
+Not yet started.
diff --git a/user/tlecarrour/sitecopy.mdwn b/user/tlecarrour/sitecopy.mdwn
new file mode 100644
index 00000000..11f512ae
--- /dev/null
+++ b/user/tlecarrour/sitecopy.mdwn
@@ -0,0 +1,73 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+sitecopy
+========
+
+A program for managing a WWW site via FTP, DAV or HTTP.
+**Home page**: [[http://www.manyfish.co.uk/sitecopy]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: -
+* **Discussed**: -
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX sitecopy-0.16.6/*`:
+
+ intl/dcigettext.c: PATH_MAX but might cause redefinition warnings when sys/param.h is
+ intl/dcigettext.c:#ifndef _POSIX_PATH_MAX
+ intl/dcigettext.c:# define _POSIX_PATH_MAX 255
+ intl/dcigettext.c:#if !defined PATH_MAX && defined _PC_PATH_MAX
+ intl/dcigettext.c:# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+ intl/dcigettext.c:#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+ intl/dcigettext.c:#if !defined PATH_MAX && defined MAXPATHLEN
+ intl/dcigettext.c:# define PATH_MAX MAXPATHLEN
+ intl/dcigettext.c:#ifndef PATH_MAX
+ intl/dcigettext.c:# define PATH_MAX _POSIX_PATH_MAX
+ intl/dcigettext.c: path_max = (unsigned int) PATH_MAX;
+ src/ftp.c:#include <limits.h> /* for PATH_MAX */
+ src/ftp.c:#ifndef PATH_MAX
+ src/ftp.c:#define PATH_MAX 2048
+ src/ftp.c: char cwd[PATH_MAX];
+ src/ftp.c: char dir[PATH_MAX];
+ src/ftp.c: if (!sess->use_cwd || fn[0] != '/' || strlen(fn) > PATH_MAX)
+ debian/patches/10_bts410703_preserve_storage_files_sigint.dpatch:+ char filebuf[PATH_MAX];
+ debian/patches/10_bts410703_preserve_storage_files_sigint.dpatch:+ char filebuf[PATH_MAX];
+
+
+* * *
+
+
+Comments
+--------
+
+Not yet started.
+
+One of the PATH_MAX if used in debian patch.
diff --git a/user/tlecarrour/suckless-tools.mdwn b/user/tlecarrour/suckless-tools.mdwn
new file mode 100644
index 00000000..2a3cb5df
--- /dev/null
+++ b/user/tlecarrour/suckless-tools.mdwn
@@ -0,0 +1,79 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+
+suckless-tools
+==============
+
+Home of dwm, dmenu and other quality software with a focus on simplicity, clarity, and frugality.
+**Home page**: [[http://suckless.org]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: 2012-01-31
+* **Discussed**: [2012-01-31](http://lists.debian.org/debian-hurd/2012/01/msg00191.html)
+* **Draft Submitted**: [2012-02-01](http://lists.debian.org/debian-hurd/2012/02/msg00001.html)
+* **Submitted**: 2012-02-02, Bug#[658386](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658386)
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX suckless-tools-38/*`:
+
+ dmenu/dmenu_path.c: char buf[PATH_MAX];
+
+
+* * *
+
+
+Comments
+--------
+
+Here are comments on the patch...
+
+ void
+ scan(void) {
+ - char buf[PATH_MAX];
+ + char *buf = NULL;
+ + char *new_buf = NULL;
+ + size_t buf_size = 0;
+
+In this function we turn `buf` into dynamically allocated string.
+
+
+ while((ent = readdir(dp))) {
+ + buf_size = strlen(dir)+strlen(ent->d_name)+2;
+ + if(!buf || strlen(buf) < buf_size) {
+ + new_buf = realloc(buf, buf_size);
+ + if(!new_buf)
+ + die("realloc failed");
+ + buf = new_buf;
+ + }
+
+For each directory entry we create or adapt the buffer size.
+
+
+ }
+ + free(buf);
+
+We free the buf when done.
+
diff --git a/user/tlecarrour/up-imapproxy.mdwn b/user/tlecarrour/up-imapproxy.mdwn
new file mode 100644
index 00000000..f97207e0
--- /dev/null
+++ b/user/tlecarrour/up-imapproxy.mdwn
@@ -0,0 +1,59 @@
+[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!tag open_issue_porting]]
+
+
+up-imapproxy
+============
+
+SquirrelMail's IMAP Proxy is a caching IMAP proxy server intended for use with webmail clients that cannot maintain persistent connections to an IMAP server.
+**Home page**: [[http://www.imapproxy.org]]
+
+[[!toc startlevel=2]]
+
+
+* * *
+
+
+Log
+---
+
+* **Started**: 2012-01-31
+* **Discussed**: [2012-02-03](http://lists.debian.org/debian-hurd/2012/02/msg00027.html)
+* **Draft Submitted**: -
+* **Submitted**: -
+* **Accepted**: -
+
+
+* * *
+
+
+ToDo
+----
+
+Here is the output of `grep -R PATH_MAX up-imapproxy-1.2.7/*`:
+
+ src/main.c: char f_randfile[ PATH_MAX ];
+
+
+* * *
+
+
+Comments
+--------
+
+Work in progress...
+
+Only the function that fills the buffer knows how long it can be.
+This function is `RAND_file_name()` and is part of **OpenSSL**.
+
+Probably **OpenSSL** function has to be fixed first to accept `NULL` buffer.
+Then fix the up-imapproxy code to use the new version of the function.