summaryrefslogtreecommitdiff
path: root/user/tlecarrour/auto-apt.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'user/tlecarrour/auto-apt.mdwn')
-rw-r--r--user/tlecarrour/auto-apt.mdwn97
1 files changed, 97 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();
+ + }
+
+