diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/Maksym_Planeta.mdwn | 48 | ||||
-rw-r--r-- | user/jkoenig.mdwn | 12 | ||||
-rw-r--r-- | user/jkoenig/java.mdwn | 15 | ||||
-rw-r--r-- | user/jkoenig/java/report.mdwn | 136 | ||||
-rw-r--r-- | user/tlecarrour.mdwn | 51 | ||||
-rw-r--r-- | user/tlecarrour/auto-apt.mdwn | 97 | ||||
-rw-r--r-- | user/tlecarrour/gphoto2.mdwn | 53 | ||||
-rw-r--r-- | user/tlecarrour/libgphoto2.mdwn | 51 | ||||
-rw-r--r-- | user/tlecarrour/memstat.mdwn | 145 | ||||
-rw-r--r-- | user/tlecarrour/patch_life_cycle.mdwn | 90 | ||||
-rw-r--r-- | user/tlecarrour/pidgin-microblog.mdwn | 57 | ||||
-rw-r--r-- | user/tlecarrour/porting_guide_for_dummies.mdwn | 230 | ||||
-rw-r--r-- | user/tlecarrour/rng-tools.mdwn | 58 | ||||
-rw-r--r-- | user/tlecarrour/sakura.mdwn | 77 | ||||
-rw-r--r-- | user/tlecarrour/schism.mdwn | 116 | ||||
-rw-r--r-- | user/tlecarrour/shush.mdwn | 75 | ||||
-rw-r--r-- | user/tlecarrour/sitecopy.mdwn | 73 | ||||
-rw-r--r-- | user/tlecarrour/suckless-tools.mdwn | 79 | ||||
-rw-r--r-- | user/tlecarrour/up-imapproxy.mdwn | 59 |
19 files changed, 1491 insertions, 31 deletions
diff --git a/user/Maksym_Planeta.mdwn b/user/Maksym_Planeta.mdwn index 4f8ababd..a0a9c788 100644 --- a/user/Maksym_Planeta.mdwn +++ b/user/Maksym_Planeta.mdwn @@ -27,27 +27,31 @@ The same test for tmpfs: Test 1. The test continued about 5 hours and made 18314766 operations. Then this error message appeared: -READ BAD DATA: offset = 0x3317, size = 0x7012 -OFFSET GOOD BAD RANGE -0x 8a93 0x80f8 0x82f8 0x 1 -operation# (mod 256) for the bad data may be 248 -LOG DUMP (18314753 total operations): -18314754(2 mod 256): WRITE 0x38c1a thru 0x3ffff (0x73e6 bytes) -18314755(3 mod 256): READ 0x92c3 thru 0x181b3 (0xeef1 bytes) -18314756(4 mod 256): WRITE 0x138c1 thru 0x1a06b (0x67ab bytes) -18314757(5 mod 256): MAPWRITE 0x2564 thru 0xbc75 (0x9712 bytes) ******WWWW -18314758(6 mod 256): MAPREAD 0x3f4e8 thru 0x3ffff (0xb18 bytes) -18314759(7 mod 256): READ 0x2946a thru 0x30213 (0x6daa bytes) -18314760(8 mod 256): MAPWRITE 0x31fe6 thru 0x3ffff (0xe01a bytes) -18314761(9 mod 256): TRUNCATE DOWN from 0x40000 to 0x145e8 -18314762(10 mod 256): MAPWRITE 0xca89 thru 0x1ba74 (0xefec bytes) -18314763(11 mod 256): MAPWRITE 0xb421 thru 0x11a37 (0x6617 bytes) -18314764(12 mod 256): READ 0x9495 thru 0xaa45 (0x15b1 bytes) -18314765(13 mod 256): TRUNCATE DOWN from 0x1ba75 to 0x66cb ******WWWW -18314766(14 mod 256): READ 0x5fa5 thru 0x66ca (0x726 bytes) + READ BAD DATA: offset = 0x3317, size = 0x7012 + OFFSET GOOD BAD RANGE + 0x 8a93 0x80f8 0x82f8 0x 1 + operation# (mod 256) for the bad data may be 248 + LOG DUMP (18314753 total operations): + 18314754(2 mod 256): WRITE 0x38c1a thru 0x3ffff (0x73e6 bytes) + 18314755(3 mod 256): READ 0x92c3 thru 0x181b3 (0xeef1 bytes) + 18314756(4 mod 256): WRITE 0x138c1 thru 0x1a06b (0x67ab bytes) + 18314757(5 mod 256): MAPWRITE 0x2564 thru 0xbc75 (0x9712 bytes) ******WWWW + 18314758(6 mod 256): MAPREAD 0x3f4e8 thru 0x3ffff (0xb18 bytes) + 18314759(7 mod 256): READ 0x2946a thru 0x30213 (0x6daa bytes) + 18314760(8 mod 256): MAPWRITE 0x31fe6 thru 0x3ffff (0xe01a bytes) + 18314761(9 mod 256): TRUNCATE DOWN from 0x40000 to 0x145e8 + 18314762(10 mod 256): MAPWRITE 0xca89 thru 0x1ba74 (0xefec bytes) + 18314763(11 mod 256): MAPWRITE 0xb421 thru 0x11a37 (0x6617 bytes) + 18314764(12 mod 256): READ 0x9495 thru 0xaa45 (0x15b1 bytes) + 18314765(13 mod 256): TRUNCATE DOWN from 0x1ba75 to 0x66cb ******WWWW + 18314766(14 mod 256): READ 0x5fa5 thru 0x66ca (0x726 bytes) vmstat has broken after about 2 hours, so no leak has been detected. +Test 2. fsx worked about 8 hours, than computer hanged. Log for last 2 hours of vmstat's work has been spoiled. So no vmstat information. + +Test 3. fsx made 7904126 and than data error was occurred. It took about 2 hours, no vmstat was running. + 5.01.12 UPD 26.01: All these bugs are fixed. @@ -180,6 +184,14 @@ For debugging ext2fs: settrans --active --orphan ramdisk0 /usr/bin/env LD_LIBRARY_PATH="$PWD"/lib utils/rpctrace -I /usr/share/msgids/ \ ext2fs/ext2fs.static ramdisk0 +How to install fsx<a id="fsx_install"/>. Get fsx sources using this link: http://codemonkey.org.uk/projects/fsx/fsx-linux.c Than add following line somewhere in code: + + #define msync(...) 0 + +To compile fsx you may use following line: + + gcc fsx-hurd.c -o fsx -Dlinux -g3 -O0 + #Questions 1. What are sequence numbers? What are they used for? diff --git a/user/jkoenig.mdwn b/user/jkoenig.mdwn index d135e0e5..dc6edd4e 100644 --- a/user/jkoenig.mdwn +++ b/user/jkoenig.mdwn @@ -17,9 +17,6 @@ I am a Hurd enthusiast and occasional contributor, currently a M.Sc. student at University of Strasbourg. Among other things I am interested in formal methods, languages and operating system design. -(Shameless plug: -I'll be looking for an internship in a research lab from January to June 2012 -and for a position as a Ph.D. student afterwards.) Contributions include: @@ -28,9 +25,8 @@ Contributions include: * Rewrite the procfs translator ([bug-hurd](http://lists.gnu.org/archive/html/bug-hurd/2010-08/msg00165.html) [thread](http://lists.gnu.org/archive/html/bug-hurd/2010-09/msg00001.html)). - -I am working as a GSoC student this summer again, -for the GNU project, -on [[Java for Hurd|java]]. - + * In 2011 I worked as a GSoC student again, + this time for the GNU project, + on [[improving Java support|java]]. + This work is ongoing. diff --git a/user/jkoenig/java.mdwn b/user/jkoenig/java.mdwn index e5d288cc..fd12987e 100644 --- a/user/jkoenig/java.mdwn +++ b/user/jkoenig/java.mdwn @@ -11,7 +11,7 @@ License|/fdl]]."]]"""]] [[!tag stable_URL]] -# Improve Java on Hurd (GSoC 2011) +# Improve Java on Hurd ## Description @@ -21,14 +21,19 @@ This includes porting OpenJDK, creating low-level Java bindings for Mach and Hurd, as well as creating Java libraries to help with translator development. -For details, see my original [[proposal]]. +I started working on this as a participant in Google Summer of Code 2011, +for the GNU project. +See my original [[proposal]] and final [[report]]. ## Current status -Feeling slightly behind schedule; but project is very ambitious, which has been -known from the beginning, and there is great progress, so there is no problem. ---[[tschwinge]], 2011-06-29. +OpenJDK 7 kindof works, +but there are still imperfections and some integration work remains. + +This page is somewhat out-of-date. +At the moment, +the GSoC [report] is more accurate. ### Apt repository diff --git a/user/jkoenig/java/report.mdwn b/user/jkoenig/java/report.mdwn new file mode 100644 index 00000000..cb1acda9 --- /dev/null +++ b/user/jkoenig/java/report.mdwn @@ -0,0 +1,136 @@ +[[!meta copyright="Copyright © 2011 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]]."]]"""]] + +# GSoC 2011 final report (Java on Hurd) + +This is my final report regarding my work on Java for Hurd +as a Google Summer of Code student for the GNU project. +The work is going on, +for recent status updates, see my [[java]] page. + +## Global signal dispositions and SA_SIGINFO + +Signal delivery was implemented in Hurd before POSIX threads were +defined. As a consequence the current semantics differ from the POSIX +prescriptions, which libgcj relies on. + +On the Hurd, each thread has its own signal dispositions and +process-wide signals are always received by the main thread. +In contrast, POSIX specifies signal dispositions to be global to the +process (although there is still a per-thread blocking mask), and a +global signal can be delivered to any thread which does not block it. + +To further complicate the matter, the Hurd currently has two options for +threads: the cthread library, still used by most of the Hurd code, and +libpthread which was introduced later for compatibility purposes. To +avoid breaking existing code, cthread programs should continue to run +with the historical Hurd signal semantics whereas pthread programs are +expected to rely on the POSIX behavior. + +To address this, the patch series I wrote allows selecting a per-thread +behavior: by default, newly created threads provide historical +semantics, but they can be marked by libpthread as global signal +receivers using the new function `_hurd_sigstate_set_global_rcv()`. +In addition, I refactored some of the signal code to improve +readability, and fixed a couple of bugs I came across in the process. + +Another improvement which was required by OpenJDK was the implementation +of the `SA_SIGINFO` flag for signal handlers. My signal patch series +provides the basic infrastructure. However it is not yet complete, as +some of the information provided by `siginfo_t` structures is not +available to glibc. Making this information available would require a +change in the `msg_sig_post()` RPC. + +### Related Debian changes + +In Debian GNU/Hurd, libpthread is provided the `hurd` package. Hurd also +uses extern inline functions from glibc which are affected by the new +symbols. This means that newer Hurd packages which take advantage of +glibc's support for global signal dispositions cannot run on older C +libraries and some thought had to be given to the way we could ensure +smooth upgrades. + +An early attempt at using weak symbols proved to be impractical. As a +consequence I modified the eglibc source package to enable +dpkg-gensymbols on hurd-i386. This means that packages which are built +against a newer libc and make use of the new symbols will automatically +get an appropriately versionned dependency on libc0.3. + +### Status as of 2012-01-28 + +The patch series has not yet been merged upstream. However, it is now +being used for the Debian package of glibc. + +## $ORIGIN substitution in RPATH + +Another feature used by OpenJDK which was not implemented in Hurd is the +substitution of the special string `$ORIGIN` within the ELF `RPATH` +header. `RPATH` is a per-executable library search path, within which +`$ORIGIN` should be substituted by the directory part of the binary's +canonical file name. + +Currently, a newly executed program has no way of figuring out which +binary it was created from. Actually, even the `_hurd_exec()` function, +which is used in glibc to implement the `exec*()` family, is never +passed the file name of the executable, but only a port to it. +Likewise, the `file_exec()`, `exec_exec()` and `exec_startup_get_info()` +RPCs do not provide a path to transmit the file name from the shell to +the file system server, to the exec server, to the executed program. + +Last year, Emilio Pozuelo Monfort submitted a patch series which fixes +this problem, up to the exec server. The series' original purpose was to +replace the guesswork done by `exec` when running shell scripts. It +provides new versions of `file_exec()` and `exec_exec()` which allow for +passing the file name. I extended Emilio's patches to add the missing +link, namely a new `exec_startup_get_info_2()` RPC. New code in glibc +takes advantage of it to retrieve the file name and use it in a +Hurd-specific `dl-origin.c` to allow for `RPATH` `$ORIGIN` substitution. + +### Status as of 2012-01-28 + +The (hurd and glibc) patch series for `$ORIGIN` are mostly complete. +However, there is still an issue related to the canonicalization of the +executable's file name. Doing it in the dynamic linker (where `$ORIGIN` +is expanded) is complicated due to the limited set of available +functions (`realpath()` is not). Unfortunately canonicalizing in +`_hurd_exec_file_name()` is not an option either because many shell +scripts use `argv[0]` to alter their behavior, but `argv[0]` is replaced +by the shell with the file name it's passed. + +Another issue is that the patches use a fixed-length string buffer to +transmit the file name through RPC. + +## OpenJDK 7 + +With the groundwork above being taken care of, I was able to build +OpenJDK 7 on Hurd, although heavy portability patching was also +necessary. A similar effort for Debian GNU/kFreeBSD was undertaken +around the same time by Damien Raude-Morvan, so I intend to submit a +more general set of "non-Linux" patches. + +Due to the lack of a `libpthread_db` library on the Hurd, I was only +able to build a Zero (interpreter only) virtual machine so far. However, +it should be possible to disable the debugging agent and build Hotspot. + +### Status as of 2012-01-28 + +I have put together generic `nonlinux-*.diff` patches for the `openjdk7` +Debian package, however I have not yet tested them on Linux and kFreeBSD. + +## Java bindings + +Besides improving Java support on Hurd, my original proposal also +included the creation of Java bindings for the Hurd interfaces. +My progress on this front has not been as fast as I would have liked. +However I have started some of the work required to provide safe Java +bindings for Mach system calls. + +See https://github.com/jeremie-koenig/hurd-java. + diff --git a/user/tlecarrour.mdwn b/user/tlecarrour.mdwn new file mode 100644 index 00000000..46ab6c80 --- /dev/null +++ b/user/tlecarrour.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]]."]]"""]] + + +Tanguy LE CARROUR +================= + +Homepage: *none* +E-mail: [tanguy@bioneland.org](mailto:tanguy@bioneland.org) + +I am a Hurd enthusiast and new contributor, mostly working on porting packages +for **Debian GNU/Hurd**. + + +Contributions +------------- + + +### Porting Debian Packages: + +See the [[package porting general introduction|hurd/porting/guidelines]] and +my [[porting guide for dummies|porting_guide_for_dummies]]. + +For each patch make sure to respect the [[patch life cycle|patch_life_cycle]]. + +* Candidates + * [[gphoto2]] (PATH_MAX) + * [[libgphoto2]] (function doesn't accept `NULL` buffer) + * [[pidgin-microblog]] (PATH_MAX) + * [[schism]] (PATH_MAX) + * [[shush]] (PATH_MAX) + * [[sitecopy]] (PATH_MAX) +* Work in progress + * [[auto-apt]] (PATH_MAX), **submitted** + * [[rng-tools]] (PATH_MAX), **discussing** + * [[suckless-tools]] (PATH_MAX), **submitted** + * [[up-imapproxy]] (PATH_MAX), **discussing** + * [[sakura]] (PATH_MAX), **submitted** +* Accepted + * - +* Stopped + * [[memstat]] (PATH_MAX) + + 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. |