From 6a6698de164e968cf1509efaace2389de61b52c4 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Sat, 18 Nov 2006 15:46:39 +0100 Subject: [PATCH 1/5] gawk: added --enable-switch configure option --- gawk/Pkgfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gawk/Pkgfile b/gawk/Pkgfile index d14f5622..8d8c5a42 100644 --- a/gawk/Pkgfile +++ b/gawk/Pkgfile @@ -4,16 +4,22 @@ name=gawk version=3.1.5 -release=1 +release=2 source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz) build() { cd $name-$version - ./configure --prefix=/usr --disable-nls + ./configure --prefix=/usr \ + --enable-switch \ + --disable-nls make make DESTDIR=$PKG install - rm -rf $PKG/usr/info $PKG/usr/share $PKG/usr/libexec - rm $PKG/usr/bin/gawk-$version $PKG/usr/bin/pgawk-$version \ - $PKG/usr/bin/{p,i}gawk $PKG/usr/man/man1/{p,i}gawk.1 + + rm -rf $PKG/usr/{info,share,libexec} + rm $PKG/usr/bin/gawk-$version \ + $PKG/usr/bin/pgawk-$version \ + $PKG/usr/bin/{p,i}gawk \ + $PKG/usr/man/man1/{p,i}gawk.1 + ln -sf gawk.1.gz $PKG/usr/man/man1/awk.1.gz } From b865843d57730ef6698c026c9d24c5e27d029516 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Fri, 24 Nov 2006 13:05:01 +0100 Subject: [PATCH 2/5] gawk: added patch to fix io issues --- gawk/.md5sum | 1 + gawk/Pkgfile | 7 +- gawk/gawk-3.1.5-io.patch | 270 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 276 insertions(+), 2 deletions(-) create mode 100644 gawk/gawk-3.1.5-io.patch diff --git a/gawk/.md5sum b/gawk/.md5sum index eabf45c9..45cfe270 100644 --- a/gawk/.md5sum +++ b/gawk/.md5sum @@ -1 +1,2 @@ +ab4c93ca4e8c5a5e5053003a07822699 gawk-3.1.5-io.patch 4760325489479cac17fe0114b8f62f30 gawk-3.1.5.tar.gz diff --git a/gawk/Pkgfile b/gawk/Pkgfile index 8d8c5a42..39f5512e 100644 --- a/gawk/Pkgfile +++ b/gawk/Pkgfile @@ -4,11 +4,14 @@ name=gawk version=3.1.5 -release=2 -source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz) +release=3 +source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.gz \ + $name-$version-io.patch) build() { cd $name-$version + + patch -p0 -i $SRC/$name-$version-io.patch ./configure --prefix=/usr \ --enable-switch \ --disable-nls diff --git a/gawk/gawk-3.1.5-io.patch b/gawk/gawk-3.1.5-io.patch new file mode 100644 index 00000000..80f2d085 --- /dev/null +++ b/gawk/gawk-3.1.5-io.patch @@ -0,0 +1,270 @@ +# http://thread.gmane.org/gmane.comp.gnu.utils.bugs/13520/ +# http://thread.gmane.org/gmane.comp.gnu.utils.bugs/12433 + +Mon Jul 3 00:27:59 2006 Arnold D. Robbins + + * io.c (INTERNAL_HANDLE): New constant for use by `iop_alloc' + when allocating an internal IOBUF. + (pidopen, useropen): Use it. + (iop_alloc): Add check for it and just return iop. + +Sun Jun 18 22:27:25 2006 Arnold D. Robbins + + Repair internal names like /dev/user, /dev/pid, as well as /dev/fd/N, + which have been broken for a long time but noone noticed. + + * io.c (is_internal): new macro to check for internal file like `/dev/user'. + (spec_setup): Reduce to two parameters, allocate logic is always true. + Add IOP_NO_FREE to flag. + (pidopen, useropen): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + (specfdopen,): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + Don't set IOP_NO_FREE in flag. + (iop_open): Remove `IOBUF iob' field from `struct internal' and its use + and the use of `spec_setup' from the code here. Change the check in the + call to the open function to look for NULL. + (get_a_record): Use `is_internal' in initial check for filling the + buffer to not try to call `read' on internal files. If true, set + the IOP_AT_EOF in the flag and return EOF. + +Fri Aug 12 13:10:33 2005 Arnold D. Robbins + + * io.c (iop_alloc): Only free `iop' if it was malloc'ed in + the first place. + +--- ../gawk-3.1.5/io.c 2005-07-26 21:07:43.000000000 +0300 ++++ io.c 2006-07-03 00:27:51.000000000 +0300 +@@ -103,6 +103,9 @@ + + typedef enum { CLOSE_ALL, CLOSE_TO, CLOSE_FROM } two_way_close_type; + ++/* For internal files, /dev/pid, etc. */ ++#define INTERNAL_HANDLE (-42) ++ + /* Several macros make the code a bit clearer: */ + /* */ + /* */ +@@ -110,6 +113,7 @@ + #define at_eof(iop) ((iop->flag & IOP_AT_EOF) != 0) + #define has_no_data(iop) (iop->dataend == NULL) + #define no_data_left(iop) (iop->off >= iop->dataend) ++#define is_internal(iop) ((iop->flag & IOP_IS_INTERNAL) != 0) + /* The key point to the design is to split out the code that searches through */ + /* a buffer looking for the record and the terminator into separate routines, */ + /* with a higher-level routine doing the reading of data and buffer management. */ +@@ -163,10 +167,10 @@ + static int gawk_pclose P((struct redirect *rp)); + static int do_pathopen P((const char *file)); + static int str2mode P((const char *mode)); +-static void spec_setup P((IOBUF *iop, int len, int allocate)); +-static int specfdopen P((IOBUF *iop, const char *name, const char *mode)); +-static int pidopen P((IOBUF *iop, const char *name, const char *mode)); +-static int useropen P((IOBUF *iop, const char *name, const char *mode)); ++static void spec_setup P((IOBUF *iop, int len)); ++static IOBUF *specfdopen P((IOBUF *iop, const char *name, const char *mode)); ++static IOBUF *pidopen P((IOBUF *iop, const char *name, const char *mode)); ++static IOBUF *useropen P((IOBUF *iop, const char *name, const char *mode)); + static int two_way_open P((const char *str, struct redirect *rp)); + static int pty_vs_pipe P((const char *command)); + +@@ -1422,30 +1426,24 @@ + /* spec_setup --- setup an IOBUF for a special internal file */ + + static void +-spec_setup(IOBUF *iop, int len, int allocate) ++spec_setup(IOBUF *iop, int len) + { + char *cp; + +- if (allocate) { +- emalloc(cp, char *, len+2, "spec_setup"); +- iop->buf = cp; +- } else { +- len = strlen(iop->buf); +- iop->buf[len++] = '\n'; /* get_a_record clobbered it */ +- iop->buf[len] = '\0'; /* just in case */ +- } ++ emalloc(cp, char *, len+2, "spec_setup"); ++ iop->buf = cp; + iop->off = iop->buf; + iop->count = 0; + iop->size = len; + iop->end = iop->buf + len; + iop->dataend = iop->end; + iop->fd = -1; +- iop->flag = IOP_IS_INTERNAL | IOP_AT_START; ++ iop->flag = IOP_IS_INTERNAL | IOP_AT_START | IOP_NO_FREE; + } + + /* specfdopen --- open an fd special file */ + +-static int ++static IOBUF * + specfdopen(IOBUF *iop, const char *name, const char *mode) + { + int fd; +@@ -1453,17 +1451,14 @@ + + fd = devopen(name, mode); + if (fd == INVALID_HANDLE) +- return INVALID_HANDLE; +- tp = iop_alloc(fd, name, NULL); ++ return NULL; ++ tp = iop_alloc(fd, name, iop); + if (tp == NULL) { + /* don't leak fd's */ + close(fd); +- return INVALID_HANDLE; ++ return NULL; + } +- *iop = *tp; +- iop->flag |= IOP_NO_FREE; +- free(tp); +- return 0; ++ return tp; + } + + #ifdef GETPGRP_VOID +@@ -1474,7 +1469,7 @@ + + /* pidopen --- "open" /dev/pid, /dev/ppid, and /dev/pgrpid */ + +-static int ++static IOBUF * + pidopen(IOBUF *iop, const char *name, const char *mode ATTRIBUTE_UNUSED) + { + char tbuf[BUFSIZ]; +@@ -1483,6 +1478,12 @@ + + warning(_("use `PROCINFO[\"%s\"]' instead of `%s'"), cp, name); + ++ if (iop == NULL) { ++ iop = iop_alloc(INTERNAL_HANDLE, name, iop); ++ if (iop == NULL) ++ return NULL; ++ } ++ + if (name[6] == 'g') + sprintf(tbuf, "%d\n", (int) getpgrp(getpgrp_arg())); + else if (name[6] == 'i') +@@ -1490,9 +1491,9 @@ + else + sprintf(tbuf, "%d\n", (int) getppid()); + i = strlen(tbuf); +- spec_setup(iop, i, TRUE); ++ spec_setup(iop, i); + strcpy(iop->buf, tbuf); +- return 0; ++ return iop; + } + + /* useropen --- "open" /dev/user */ +@@ -1507,7 +1508,7 @@ + * supplementary group set. + */ + +-static int ++static IOBUF * + useropen(IOBUF *iop, const char *name ATTRIBUTE_UNUSED, const char *mode ATTRIBUTE_UNUSED) + { + char tbuf[BUFSIZ], *cp; +@@ -1515,6 +1516,12 @@ + + warning(_("use `PROCINFO[...]' instead of `/dev/user'")); + ++ if (iop == NULL) { ++ iop = iop_alloc(INTERNAL_HANDLE, name, iop); ++ if (iop == NULL) ++ return NULL; ++ } ++ + sprintf(tbuf, "%d %d %d %d", (int) getuid(), (int) geteuid(), (int) getgid(), (int) getegid()); + + cp = tbuf + strlen(tbuf); +@@ -1529,9 +1536,9 @@ + *cp++ = '\0'; + + i = strlen(tbuf); +- spec_setup(iop, i, TRUE); ++ spec_setup(iop, i); + strcpy(iop->buf, tbuf); +- return 0; ++ return iop; + } + + /* iop_open --- handle special and regular files for input */ +@@ -1544,8 +1551,7 @@ + static struct internal { + const char *name; + int compare; +- int (*fp) P((IOBUF *, const char *, const char *)); +- IOBUF iob; ++ IOBUF *(*fp) P((IOBUF *, const char *, const char *)); + } table[] = { + { "/dev/fd/", 8, specfdopen }, + { "/dev/stdin", 10, specfdopen }, +@@ -1570,12 +1576,7 @@ + + for (i = 0; i < devcount; i++) { + if (STREQN(name, table[i].name, table[i].compare)) { +- iop = & table[i].iob; +- +- if (iop->buf != NULL) { +- spec_setup(iop, 0, FALSE); +- return iop; +- } else if ((*table[i].fp)(iop, name, mode) == 0) ++ if ((iop = (*table[i].fp)(iop, name, mode)) != NULL) + return iop; + else { + warning(_("could not open `%s', mode `%s'"), +@@ -2480,9 +2481,12 @@ + { + struct stat sbuf; + struct open_hook *oh; ++ int iop_malloced = FALSE; + +- if (iop == NULL) ++ if (iop == NULL) { + emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); ++ iop_malloced = TRUE; ++ } + memset(iop, '\0', sizeof(IOBUF)); + iop->flag = 0; + iop->fd = fd; +@@ -2494,8 +2498,12 @@ + break; + } + ++ if (iop->fd == INTERNAL_HANDLE) ++ return iop; ++ + if (iop->fd == INVALID_HANDLE) { +- free(iop); ++ if (iop_malloced) ++ free(iop); + return NULL; + } + if (isatty(iop->fd)) +@@ -2503,7 +2511,7 @@ + iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf); + iop->sbuf = sbuf; + if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) +- lintwarn(_("data file `%s' is empty"), name); ++ lintwarn(_("data file `%s' is empty"), name); + errno = 0; + iop->count = iop->scanoff = 0; + emalloc(iop->buf, char *, iop->size += 2, "iop_alloc"); +@@ -2906,6 +2914,10 @@ + + /* = */ + if (has_no_data(iop) || no_data_left(iop)) { ++ if (is_internal(iop)) { ++ iop->flag |= IOP_AT_EOF; ++ return EOF; ++ } + iop->count = read(iop->fd, iop->buf, iop->readsize); + if (iop->count == 0) { + iop->flag |= IOP_AT_EOF; + + From 104b0f2620c921980031c4f6ce2ea816d9d30585 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Sun, 26 Nov 2006 12:04:34 +0100 Subject: [PATCH 3/5] man: fixed URL header --- man/Pkgfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/Pkgfile b/man/Pkgfile index e132c21b..6b009831 100644 --- a/man/Pkgfile +++ b/man/Pkgfile @@ -1,5 +1,5 @@ # Description: The man page suite used to read most of the documentation for Linux -# URL: i http://primates.ximian.com/~flucifredi/man/ +# URL: http://primates.ximian.com/~flucifredi/man/ # Maintainer: Per Lidén, core-ports at crux dot nu name=man From 92d2704775190bdc8444f2a2f375de656e22c1cf Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Sun, 26 Nov 2006 12:07:08 +0100 Subject: [PATCH 4/5] man-pages: update to 2.42 --- man-pages/.md5sum | 2 +- man-pages/Pkgfile | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/man-pages/.md5sum b/man-pages/.md5sum index 24cf3fde..7652b78f 100644 --- a/man-pages/.md5sum +++ b/man-pages/.md5sum @@ -1 +1 @@ -8561376c88a1e13af94d1518503fd7ef man-pages-2.41.tar.gz +9e9ca369c2686014eba5db9cf05cb264 man-pages-2.42.tar.gz diff --git a/man-pages/Pkgfile b/man-pages/Pkgfile index a4764108..ef4ef861 100644 --- a/man-pages/Pkgfile +++ b/man-pages/Pkgfile @@ -1,11 +1,10 @@ # Description: The Linux manpages collection # URL: http://www.win.tue.nl/~aeb/linux/man/ # Maintainer: Per Lidén, core-ports at crux dot nu -# Packager: Per Lidén, per at fukt dot bth dot se # Depends on: man name=man-pages -version=2.41 +version=2.42 release=1 source=(ftp://ftp.win.tue.nl/pub/linux-local/manpages/$name-$version.tar.gz) From 0d01421c909de941214d331d4a061b25f4025ca6 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Sun, 26 Nov 2006 12:16:01 +0100 Subject: [PATCH 5/5] findutils: update to 4.2.29 --- findutils/.md5sum | 2 +- findutils/Pkgfile | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/findutils/.md5sum b/findutils/.md5sum index 00c1395f..4bb1fdc7 100644 --- a/findutils/.md5sum +++ b/findutils/.md5sum @@ -1 +1 @@ -f5fb3349354ee3d94fceb81dab5c71fd findutils-4.2.28.tar.gz +24e76434ca74ba3c2c6ad621eb64e1ff findutils-4.2.29.tar.gz diff --git a/findutils/Pkgfile b/findutils/Pkgfile index 9006e592..de76c1fe 100644 --- a/findutils/Pkgfile +++ b/findutils/Pkgfile @@ -3,18 +3,19 @@ # Maintainer: Per Lidén, core-ports at crux dot nu name=findutils -version=4.2.28 +version=4.2.29 release=1 source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.gz) build() { cd $name-$version ./configure --prefix=/usr \ - --disable-nls --mandir=/usr/man + --disable-nls \ + --mandir=/usr/man make make DESTDIR=$PKG install rm -rf $PKG/usr/bin/{updatedb,locate} \ - $PKG/usr/man/man1/{updatedb.1,locate.1} \ - $PKG/usr/man/man5 $PKG/usr/libexec \ - $PKG/usr/share $PKG/usr/var + $PKG/usr/man/man1/{updatedb.1,locate.1} \ + $PKG/usr/man/man5 \ + $PKG/usr/{libexec,share,var} }