diff options
| author | Carlo Lanmdeter <clandmeter@gmail> | 2009-03-05 14:48:30 +0000 |
|---|---|---|
| committer | Carlo Lanmdeter <clandmeter@gmail> | 2009-03-05 14:48:30 +0000 |
| commit | df930dbd9fb00c1c381229a2c5ce68d82eaa53eb (patch) | |
| tree | a90740e8ab2134ad00ecf6ae8b205ec9f7c4990f | |
| parent | 87f8eb8ec3fad06f3d1ab02fc4aa36e4143c3baa (diff) | |
| parent | 739bdededdec7f411de9223fe440fc8141afe80b (diff) | |
| download | aports-df930dbd9fb00c1c381229a2c5ce68d82eaa53eb.tar.bz2 aports-df930dbd9fb00c1c381229a2c5ce68d82eaa53eb.tar.xz | |
Merge commit 'ncopa/master'
54 files changed, 2457 insertions, 105 deletions
diff --git a/core/alpine-baselayout/APKBUILD b/core/alpine-baselayout/APKBUILD index 81b6966237..1083166b04 100644 --- a/core/alpine-baselayout/APKBUILD +++ b/core/alpine-baselayout/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=alpine-baselayout -pkgver=2.0_alpha3 -pkgrel=1 +pkgver=2.0_alpha5 +pkgrel=0 pkgdesc="Alpine base dir structure and init scripts" url=http://git.alpinelinux.org/cgit/alpine-baselayout depends="uclibc" @@ -25,7 +25,5 @@ build() { make make install PREFIX= DESTDIR="$pkgdir" || return 1 - install -d -m1777 "$pkgdir"/tmp - } -md5sums="2ecfbc1e70c0fdffa70bc9c3339ce01b alpine-baselayout-2.0_alpha3.tar.bz2" +md5sums="4ecfe2b52e2a3f84d5c689612a4e39cb alpine-baselayout-2.0_alpha5.tar.bz2" diff --git a/core/apk-tools/APKBUILD b/core/apk-tools/APKBUILD index dc790fb311..d048a3fb90 100644 --- a/core/apk-tools/APKBUILD +++ b/core/apk-tools/APKBUILD @@ -1,5 +1,6 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools -pkgver=2.0_pre8 +pkgver=2.0_pre9 pkgrel=0 pkgdesc="Alpine Package Keeper - package manager for alpine" depends="uclibc" @@ -21,4 +22,4 @@ build() { ln -s apk apk_version } -md5sums="fb6218940fba9dac3ef241c3f87d0d13 apk-tools-2.0_pre8.tar.bz2" +md5sums="c694f45bde3f971a67dc0c0e14b9e82a apk-tools-2.0_pre9.tar.bz2" diff --git a/core/automake/APKBUILD b/core/automake/APKBUILD index 5ac06c46d0..3c7dca7cc2 100644 --- a/core/automake/APKBUILD +++ b/core/automake/APKBUILD @@ -1,12 +1,14 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=automake pkgver=1.10.1 -pkgrel=0 +pkgrel=1 pkgdesc="A GNU tool for automatically creating Makefiles" arch=i486 license=GPL url="http://www.gnu.org/software/automake" source=ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz -makedepends="autoconf perl" +depends="perl" +makedepends="autoconf" subpackages="$pkgname-doc" build() { diff --git a/core/busybox/APKBUILD b/core/busybox/APKBUILD index e3080b6489..523fdd8828 100644 --- a/core/busybox/APKBUILD +++ b/core/busybox/APKBUILD @@ -1,6 +1,7 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=busybox pkgver=1.13.2 -pkgrel=2 +pkgrel=5 pkgdesc="Size optimized toolbox of many common UNIX utilities" url=http://busybox.net license=GPL-2 @@ -12,7 +13,10 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 busybox-1.13.2-init.patch busybox-1.13.2-mdev.patch busybox-1.13.2-modprobe.patch + busybox-1.13.2-modprobe-errormsg.patch + busybox-1.13.2-modprobe-speedup.patch busybox-1.13.2-tar.patch + busybox-1.13.2-depmod2.patch busyboxconfig" build() { @@ -40,5 +44,8 @@ f5a8ae3145aa249868c1a1abc319c228 busybox-1.12.1-vi-path.patch 7afb3a1b474742bc198b3c8450ab9a7e busybox-1.13.2-init.patch a72d169e9545e26257032e0e367feb95 busybox-1.13.2-mdev.patch 6eeb6efcd71e57082d6654a9a6a368eb busybox-1.13.2-modprobe.patch +a743ec04f378b8456a725c7270b0be8b busybox-1.13.2-modprobe-errormsg.patch +2120bc7d9fb4dcbbb94664c9fefa4c8a busybox-1.13.2-modprobe-speedup.patch 90d093817855bc63ad16fbb8524f80df busybox-1.13.2-tar.patch +3c43008545e069749d2d653532e1feb3 busybox-1.13.2-depmod2.patch 7da47c98607834ca9c47a22bf3fe4b6e busyboxconfig" diff --git a/core/busybox/busybox-1.13.2-depmod2.patch b/core/busybox/busybox-1.13.2-depmod2.patch new file mode 100644 index 0000000000..8261fc8890 --- /dev/null +++ b/core/busybox/busybox-1.13.2-depmod2.patch @@ -0,0 +1,21 @@ +--- busybox-1.13.2/modutils/depmod.c.orig 2009-02-25 11:54:02.000000000 +0000 ++++ busybox-1.13.2/modutils/depmod.c 2009-02-25 11:57:33.000000000 +0000 +@@ -36,7 +36,8 @@ + ARG_b = (1<<2), /* base directory when modules are in staging area */ + ARG_e = (1<<3), /* with -F, print unresolved symbols */ + ARG_F = (1<<4), /* System.map that contains the symbols */ +- ARG_n = (1<<5) /* dry-run, print to stdout only */ ++ ARG_n = (1<<5), /* dry-run, print to stdout only */ ++ ARG_r = (1<<6) /* Compat dummy. Linux Makefile uses it */ + }; + + static int FAST_FUNC parse_module(const char *fname, struct stat *sb, +@@ -138,7 +139,7 @@ + struct utsname uts; + int tmp; + +- getopt32(argv, "aAb:eF:n", &moddir_base, NULL); ++ getopt32(argv, "aAb:eF:nr", &moddir_base, NULL); + argv += optind; + + /* goto modules location */ diff --git a/core/busybox/busybox-1.13.2-modprobe-errormsg.patch b/core/busybox/busybox-1.13.2-modprobe-errormsg.patch new file mode 100644 index 0000000000..c2a7ee5b95 --- /dev/null +++ b/core/busybox/busybox-1.13.2-modprobe-errormsg.patch @@ -0,0 +1,20 @@ +--- busybox-1.13.2/modutils/modprobe.c 2008-11-09 19:28:03.000000000 +0200 ++++ busybox/modutils/modprobe.c 2009-02-25 13:19:07.000000000 +0200 +@@ -193,7 +193,7 @@ + if (ENABLE_FEATURE_CLEAN_UP) + RELEASE_CONFIG_BUFFER(modname); + if (rc > 0 && !(option_mask32 & INSMOD_OPT_SILENT)) +- bb_error_msg("Failed to %sload module %s: %s.", ++ bb_error_msg("failed to %sload module %s: %s", + (option_mask32 & MODPROBE_OPT_REMOVE) ? "un" : "", + module, moderror(rc)); + return rc; +@@ -270,7 +270,7 @@ + check_blacklist(conf, conf->probename)) { + rc = do_modprobe(conf, conf->probename); + if (rc < 0 && !(opt & INSMOD_OPT_SILENT)) +- bb_error_msg("Module %s not found.", arg); ++ bb_error_msg("module %s not found", arg); + } + } else { + /* Probe all aliases */ diff --git a/core/busybox/busybox-1.13.2-modprobe-speedup.patch b/core/busybox/busybox-1.13.2-modprobe-speedup.patch new file mode 100644 index 0000000000..94a15d4965 --- /dev/null +++ b/core/busybox/busybox-1.13.2-modprobe-speedup.patch @@ -0,0 +1,445 @@ +Index: modutils/modutils.c +=================================================================== +--- a/modutils/modutils.c (revision 25448) ++++ b/modutils/modutils.c (working copy) +@@ -71,7 +71,7 @@ + if (modname == NULL) + modname = xmalloc(MODULE_NAME_LEN); + from = bb_get_last_path_component_nostrip(filename); +- for (i = 0; i < MODULE_NAME_LEN && from[i] != '\0' && from[i] != '.'; i++) ++ for (i = 0; i < (MODULE_NAME_LEN-1) && from[i] != '\0' && from[i] != '.'; i++) + modname[i] = (from[i] == '-') ? '_' : from[i]; + modname[i] = 0; + +Index: modutils/modutils.h +=================================================================== +--- a/modutils/modutils.h (revision 25448) ++++ b/modutils/modutils.h (working copy) +@@ -15,8 +15,9 @@ + # pragma GCC visibility push(hidden) + #endif + +-/* As defined in linux/include/linux/module.h */ +-#define MODULE_NAME_LEN 64 ++/* linux/include/linux/module.h has 64, but this is also used ++ * internally for the maximum alias name length, which can be quite long */ ++#define MODULE_NAME_LEN 256 + + const char *moderror(int err) FAST_FUNC; + llist_t *llist_find(llist_t *first, const char *str) FAST_FUNC; +Index: modutils/modprobe.c +=================================================================== +--- a/modutils/modprobe.c (revision 25448) ++++ b/modutils/modprobe.c (working copy) +@@ -13,23 +13,26 @@ + #include <sys/utsname.h> + #include <fnmatch.h> + +-struct modprobe_option { ++#define MODULE_FLAG_LOADED 0x0001 ++#define MODULE_FLAG_NEED_DEPS 0x0002 ++#define MODULE_FLAG_EXISTS 0x0004 ++#define MODULE_FLAG_BLACKLISTED 0x0008 ++ ++struct module_entry { + char *module; +- char *option; ++ const char *probe; ++ unsigned int flags; ++ llist_t *aliases; ++ llist_t *options; ++ llist_t *deps; + }; + + struct modprobe_conf { +- char probename[MODULE_NAME_LEN]; ++ llist_t *db; ++ llist_t *probes; + llist_t *options; +- llist_t *aliases; +-#if ENABLE_FEATURE_MODPROBE_BLACKLIST +-#define add_to_blacklist(conf, name) llist_add_to(&conf->blacklist, name) +-#define check_blacklist(conf, name) (llist_find(conf->blacklist, name) == NULL) +- llist_t *blacklist; +-#else +-#define add_to_blacklist(conf, name) do {} while (0) +-#define check_blacklist(conf, name) (1) +-#endif ++ int num_deps; ++ int num_symbols; + }; + + #define MODPROBE_OPTS "acdlnrt:VC:" USE_FEATURE_MODPROBE_BLACKLIST("b") +@@ -46,21 +49,55 @@ + MODPROBE_OPT_BLACKLIST = (INSMOD_OPT_UNUSED << 9) * ENABLE_FEATURE_MODPROBE_BLACKLIST, + }; + +-static llist_t *loaded; +- + static int read_config(struct modprobe_conf *conf, const char *path); + +-static void add_option(llist_t **all_opts, const char *module, const char *opts) ++static struct module_entry *_get_module(struct modprobe_conf *conf, ++ const char *module, int create) + { +- struct modprobe_option *o; ++ char modname[MODULE_NAME_LEN]; ++ struct module_entry *e; ++ llist_t *l; + +- o = xzalloc(sizeof(struct modprobe_option)); +- if (module) +- o->module = filename2modname(module, NULL); +- o->option = xstrdup(opts); +- llist_add_to(all_opts, o); ++ filename2modname(module, modname); ++ for (l = conf->db; l != NULL; l = l->link) { ++ e = (struct module_entry *) l->data; ++ if (strcmp(e->module, modname) == 0) ++ return e; ++ } ++ if (!create) ++ return NULL; ++ ++ e = xzalloc(sizeof(*e)); ++ e->module = xstrdup(modname); ++ llist_add_to(&conf->db, e); ++ ++ return e; + } + ++static struct module_entry *get_module(struct modprobe_conf *conf, ++ const char *module) ++{ ++ return _get_module(conf, module, 1); ++} ++ ++static struct module_entry *add_probe(struct modprobe_conf *conf, ++ const char *name) ++{ ++ struct module_entry *m; ++ ++ m = get_module(conf, name); ++ m->probe = name; ++ m->flags |= MODULE_FLAG_NEED_DEPS; ++ llist_add_to(&conf->probes, m); ++ ++ conf->num_deps++; ++ if (ENABLE_FEATURE_MODUTILS_SYMBOLS && ++ strncmp(m->module, "symbol:", 7) == 0) ++ conf->num_symbols++;; ++ ++ return m; ++} ++ + static int FAST_FUNC config_file_action(const char *filename, + struct stat *statbuf UNUSED_PARAM, + void *userdata, +@@ -68,8 +105,10 @@ + { + struct modprobe_conf *conf = (struct modprobe_conf *) userdata; + RESERVE_CONFIG_BUFFER(modname, MODULE_NAME_LEN); +- char *tokens[3]; ++ char *tokens[3], *rmod; + parser_t *p; ++ llist_t *l; ++ struct module_entry *m; + int rc = TRUE; + + if (bb_basename(filename)[0] == '.') +@@ -84,18 +123,36 @@ + while (config_read(p, tokens, 3, 2, "# \t", PARSE_NORMAL)) { + if (strcmp(tokens[0], "alias") == 0) { + filename2modname(tokens[1], modname); +- if (tokens[2] && +- fnmatch(modname, conf->probename, 0) == 0) +- llist_add_to(&conf->aliases, +- filename2modname(tokens[2], NULL)); ++ if (tokens[2] == NULL) ++ continue; ++ ++ for (l = conf->probes; l != NULL; l = l->link) { ++ m = (struct module_entry *) l->data; ++ if (fnmatch(modname, m->module, 0) != 0) ++ continue; ++ rmod = filename2modname(tokens[2], NULL); ++ llist_add_to(&m->aliases, rmod); ++ ++ if (m->flags & MODULE_FLAG_NEED_DEPS) { ++ m->flags &= ~MODULE_FLAG_NEED_DEPS; ++ conf->num_deps--; ++ } ++ ++ m = get_module(conf, rmod); ++ m->flags |= MODULE_FLAG_NEED_DEPS; ++ conf->num_deps++; ++ } + } else if (strcmp(tokens[0], "options") == 0) { +- if (tokens[2]) +- add_option(&conf->options, tokens[1], tokens[2]); ++ if (tokens[2] == NULL) ++ continue; ++ m = get_module(conf, tokens[1]); ++ llist_add_to(&m->options, xstrdup(tokens[2])); + } else if (strcmp(tokens[0], "include") == 0) { + read_config(conf, tokens[1]); + } else if (ENABLE_FEATURE_MODPROBE_BLACKLIST && + strcmp(tokens[0], "blacklist") == 0) { +- add_to_blacklist(conf, xstrdup(tokens[1])); ++ get_module(conf, tokens[1])->flags ++ |= MODULE_FLAG_BLACKLISTED; + } + } + config_close(p); +@@ -111,74 +168,48 @@ + config_file_action, NULL, conf, 1); + } + +-static char *gather_options(llist_t *first, const char *module, int usecmdline) ++static char *gather_options(char *opts, llist_t *o) + { +- struct modprobe_option *opt; +- llist_t *n; +- char *opts = xstrdup(""); +- int optlen = 0; ++ int optlen; + +- for (n = first; n != NULL; n = n->link) { +- opt = (struct modprobe_option *) n->data; ++ if (opts == NULL) ++ opts = xstrdup(""); ++ optlen = strlen(opts); + +- if (opt->module == NULL && !usecmdline) +- continue; +- if (opt->module != NULL && strcmp(opt->module, module) != 0) +- continue; +- +- opts = xrealloc(opts, optlen + strlen(opt->option) + 2); +- optlen += sprintf(opts + optlen, "%s ", opt->option); ++ for (; o != NULL; o = o->link) { ++ opts = xrealloc(opts, optlen + strlen(o->data) + 2); ++ optlen += sprintf(opts + optlen, "%s ", o->data); + } + return opts; + } + +-static int do_modprobe(struct modprobe_conf *conf, const char *module) ++static int do_modprobe(struct modprobe_conf *conf, struct module_entry *m) + { +- RESERVE_CONFIG_BUFFER(modname, MODULE_NAME_LEN); +- llist_t *deps = NULL; +- char *fn, *options, *colon = NULL, *tokens[2]; +- parser_t *p; ++ struct module_entry *m2; ++ char *fn, *options; + int rc = -1; + +- p = config_open2(CONFIG_DEFAULT_DEPMOD_FILE, fopen_for_read); +- if (p == NULL) +- goto error; ++ if (!(m->flags & MODULE_FLAG_EXISTS)) ++ return -ENOENT; + +- while (config_read(p, tokens, 2, 1, "# \t", PARSE_NORMAL)) { +- colon = last_char_is(tokens[0], ':'); +- if (colon == NULL) +- continue; +- +- filename2modname(tokens[0], modname); +- if (strcmp(modname, module) == 0) +- break; +- +- colon = NULL; +- } +- if (colon == NULL) +- goto error_not_found; +- +- colon[0] = '\0'; +- llist_add_to(&deps, xstrdup(tokens[0])); +- if (tokens[1]) +- string_to_llist(tokens[1], &deps, " "); +- + if (!(option_mask32 & MODPROBE_OPT_REMOVE)) +- deps = llist_rev(deps); ++ m->deps = llist_rev(m->deps); + + rc = 0; +- while (deps && rc == 0) { +- fn = llist_pop(&deps); +- filename2modname(fn, modname); ++ while (m->deps && rc == 0) { ++ fn = llist_pop(&m->deps); ++ m2 = get_module(conf, fn); + if (option_mask32 & MODPROBE_OPT_REMOVE) { +- if (bb_delete_module(modname, O_EXCL) != 0) ++ if (bb_delete_module(m->module, O_EXCL) != 0) + rc = errno; +- } else if (llist_find(loaded, modname) == NULL) { +- options = gather_options(conf->options, modname, +- strcmp(modname, module) == 0); ++ } else if (!(m2->flags & MODULE_FLAG_LOADED)) { ++ options = gather_options(NULL, m2->options); ++ if (m == m2) ++ options = gather_options(options, ++ conf->options); + rc = bb_init_module(fn, options); + if (rc == 0) +- llist_add_to(&loaded, xstrdup(modname)); ++ m2->flags |= MODULE_FLAG_LOADED; + if (ENABLE_FEATURE_CLEAN_UP) + free(options); + } +@@ -187,25 +218,51 @@ + free(fn); + } + +-error_not_found: +- config_close(p); +-error: +- if (ENABLE_FEATURE_CLEAN_UP) +- RELEASE_CONFIG_BUFFER(modname); + if (rc > 0 && !(option_mask32 & INSMOD_OPT_SILENT)) + bb_error_msg("failed to %sload module %s: %s", + (option_mask32 & MODPROBE_OPT_REMOVE) ? "un" : "", +- module, moderror(rc)); ++ m->probe ? m->probe : m->module, moderror(rc)); + return rc; + } + ++static void load_modules_dep(struct modprobe_conf *conf) ++{ ++ struct module_entry *m; ++ char *colon, *tokens[2]; ++ parser_t *p; ++ ++ p = config_open2(CONFIG_DEFAULT_DEPMOD_FILE, xfopen_for_read); ++ while (conf->num_deps && ++ config_read(p, tokens, 2, 1, "# \t", PARSE_NORMAL)) { ++ colon = last_char_is(tokens[0], ':'); ++ if (colon == NULL) ++ continue; ++ *colon = 0; ++ ++ m = _get_module(conf, tokens[0], 0); ++ if (m == NULL) ++ continue; ++ ++ m->flags |= MODULE_FLAG_EXISTS; ++ if ((m->flags & MODULE_FLAG_NEED_DEPS) && (m->deps == NULL)) { ++ conf->num_deps--; ++ llist_add_to(&m->deps, xstrdup(tokens[0])); ++ if (tokens[1]) ++ string_to_llist(tokens[1], ++ &m->deps, " "); ++ } ++ } ++ config_close(p); ++} ++ + int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; + int modprobe_main(int argc UNUSED_PARAM, char **argv) + { + struct utsname uts; + int rc; + unsigned opt; +- llist_t *options = NULL; ++ struct modprobe_conf conf; ++ struct module_entry *m, *m2; + + opt_complementary = "q-v:v-q"; + opt = getopt32(argv, INSMOD_OPTS MODPROBE_OPTS INSMOD_ARGS, +@@ -228,11 +285,17 @@ + } + return EXIT_SUCCESS; + } +- if (!(opt & MODPROBE_OPT_INSERT_ALL)) { +- /* If not -a, we have only one module name, +- * the rest of parameters are options */ +- add_option(&options, NULL, parse_cmdline_module_options(argv)); +- argv[1] = NULL; ++ ++ memset(&conf, 0, sizeof(conf)); ++ if (opt & MODPROBE_OPT_INSERT_ALL) { ++ /* Each argument is a module name */ ++ for (; *argv != NULL; argv++) ++ add_probe(&conf, *argv); ++ conf.probes = llist_rev(conf.probes); ++ } else { ++ /* First argument is module name, rest are parameters */ ++ m = add_probe(&conf, argv[0]); ++ llist_add_to(&conf.options, parse_cmdline_module_options(argv)); + } + + /* cache modules */ +@@ -240,49 +303,42 @@ + char *s; + parser_t *parser = config_open2("/proc/modules", fopen_for_read); + while (config_read(parser, &s, 1, 1, "# \t", PARSE_NORMAL & ~PARSE_GREEDY)) +- llist_add_to(&loaded, xstrdup(s)); ++ get_module(&conf, s)->flags |= MODULE_FLAG_LOADED; + config_close(parser); + } + +- while (*argv) { +- const char *arg = *argv; +- struct modprobe_conf *conf; ++ read_config(&conf, "/etc/modprobe.conf"); ++ read_config(&conf, "/etc/modprobe.d"); ++ if (ENABLE_FEATURE_MODUTILS_SYMBOLS && conf.num_symbols) ++ read_config(&conf, "modules.symbols"); ++ load_modules_dep(&conf); ++ if (ENABLE_FEATURE_MODUTILS_ALIAS && conf.num_deps) { ++ read_config(&conf, "modules.alias"); ++ load_modules_dep(&conf); ++ } + +- conf = xzalloc(sizeof(*conf)); +- conf->options = options; +- filename2modname(arg, conf->probename); +- read_config(conf, "/etc/modprobe.conf"); +- read_config(conf, "/etc/modprobe.d"); +- if (ENABLE_FEATURE_MODUTILS_SYMBOLS +- && conf->aliases == NULL +- && strncmp(arg, "symbol:", 7) == 0 +- ) { +- read_config(conf, "modules.symbols"); +- } +- +- if (ENABLE_FEATURE_MODUTILS_ALIAS && conf->aliases == NULL) +- read_config(conf, "modules.alias"); +- +- if (conf->aliases == NULL) { ++ while ((m = llist_pop(&conf.probes)) != NULL) { ++ if (m->aliases == NULL) { + /* Try if module by literal name is found; literal + * names are blacklist only if '-b' is given. */ + if (!(opt & MODPROBE_OPT_BLACKLIST) || +- check_blacklist(conf, conf->probename)) { +- rc = do_modprobe(conf, conf->probename); ++ !(m->flags & MODULE_FLAG_BLACKLISTED)) { ++ rc = do_modprobe(&conf, m); + if (rc < 0 && !(opt & INSMOD_OPT_SILENT)) +- bb_error_msg("module %s not found", arg); ++ bb_error_msg("module %s not found", ++ m->probe); + } + } else { + /* Probe all aliases */ +- while (conf->aliases != NULL) { +- char *realname = llist_pop(&conf->aliases); +- if (check_blacklist(conf, realname)) +- do_modprobe(conf, realname); ++ while (m->aliases != NULL) { ++ char *realname = llist_pop(&m->aliases); ++ m2 = get_module(&conf, realname); ++ if (!(m2->flags & MODULE_FLAG_BLACKLISTED)) ++ do_modprobe(&conf, m2); + if (ENABLE_FEATURE_CLEAN_UP) + free(realname); + } + } +- argv++; + } + + return EXIT_SUCCESS; diff --git a/core/linux-grsec-sources/APKBUILD b/core/linux-grsec-sources/APKBUILD index b91bbf8e1b..7c408914ef 100644 --- a/core/linux-grsec-sources/APKBUILD +++ b/core/linux-grsec-sources/APKBUILD @@ -1,10 +1,11 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> _suff=grsec pkgname=linux-$_suff-sources -pkgver=2.6.28.5 +pkgver=2.6.28.7 pkgdesc="Linux kernel sources with grsecurity patch" _kernver=2.6.28 -_grsecver=2.1.12-$_kernver.5-200902121552 +_grsecver=2.1.13-$_kernver.7-200902232153 + pkgrel=2 options="!strip" license=GPL-2 @@ -33,7 +34,7 @@ build() { } md5sums="d351e44709c9810b85e29b877f50968a linux-2.6.28.tar.bz2 -7a062fcdec46cec78c3fedbf558e334b patch-2.6.28.5.bz2 -0ff9cf5f9c43797d30a0c90feea94e1e grsecurity-2.1.12-2.6.28.5-200902121552.patch +346c912ebaffcf84361859014009be50 patch-2.6.28.7.bz2 +02cfd67a85d5050c3b8340c2a67b5678 grsecurity-2.1.13-2.6.28.7-200902232153.patch 7673b4521283ad41434a18ca18b16ad8 0001-linux-2.6.28.5-ipgre-strict-binding.patch 8f405c738b150c532c46eaad5390cca2 0002-linux-2.6.28.5-ipgre-optimize-hash-lookup.patch" diff --git a/core/linux-grsec/APKBUILD b/core/linux-grsec/APKBUILD index 678bf97364..74c41c0743 100644 --- a/core/linux-grsec/APKBUILD +++ b/core/linux-grsec/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=linux-grsec -pkgver=2.6.28.5 +pkgver=2.6.28.7 pkgrel=0 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net @@ -31,4 +31,4 @@ dev() { "$subpkgdir"/usr/share/$pkgname/config } -md5sums="ce38feed44b24776e7befb92eedbe959 kernelconfig" +md5sums="5968f907498fd8f2b66ed6ffd7cac6ea kernelconfig" diff --git a/core/linux-grsec/kernelconfig b/core/linux-grsec/kernelconfig index 86590b0c2a..efbfe1dadd 100644 --- a/core/linux-grsec/kernelconfig +++ b/core/linux-grsec/kernelconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.28.5 -# Mon Feb 16 16:14:16 2009 +# Linux kernel version: 2.6.28.7 +# Tue Mar 3 05:58:24 2009 # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -65,7 +65,8 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y # CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=m @@ -247,8 +248,8 @@ CONFIG_MICROCODE_AMD=y CONFIG_MICROCODE_OLD_INTERFACE=y CONFIG_X86_MSR=m CONFIG_X86_CPUID=m -CONFIG_NOHIGHMEM=y -# CONFIG_HIGHMEM4G is not set +# CONFIG_NOHIGHMEM is not set +CONFIG_HIGHMEM4G=y # CONFIG_HIGHMEM64G is not set CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_3G_OPT is not set @@ -256,7 +257,7 @@ CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_2G_OPT is not set # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000 -# CONFIG_X86_PAE is not set +CONFIG_HIGHMEM=y # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y @@ -277,6 +278,7 @@ CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_UNEVICTABLE_LRU=y CONFIG_MMU_NOTIFIER=y +# CONFIG_HIGHPTE is not set # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_X86_RESERVE_LOW_64K=y CONFIG_MATH_EMULATION=y @@ -294,11 +296,13 @@ CONFIG_HZ_300=y CONFIG_HZ=300 CONFIG_SCHED_HRTICK=y # CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x100000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x100000 CONFIG_HOTPLUG_CPU=y # CONFIG_CMDLINE_BOOL is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management and ACPI options @@ -439,8 +443,9 @@ CONFIG_PCMCIA_PROBE=y CONFIG_PCCARD_NONSTATIC=m CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI_FAKE=m -# CONFIG_HOTPLUG_PCI_COMPAQ is not set -# CONFIG_HOTPLUG_PCI_IBM is not set +CONFIG_HOTPLUG_PCI_COMPAQ=m +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set +CONFIG_HOTPLUG_PCI_IBM=m CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI_IBM=m CONFIG_HOTPLUG_PCI_CPCI=y @@ -1258,7 +1263,7 @@ CONFIG_IDE_GENERIC=m CONFIG_BLK_DEV_PLATFORM=m CONFIG_BLK_DEV_CMD640=m # CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_IDEPNP is not set +CONFIG_BLK_DEV_IDEPNP=m CONFIG_BLK_DEV_IDEDMA_SFF=y # @@ -1303,7 +1308,7 @@ CONFIG_BLK_DEV_TC86C001=m # # Note: most of these also require special kernel boot parameters # -# CONFIG_BLK_DEV_4DRIVES is not set +CONFIG_BLK_DEV_4DRIVES=m CONFIG_BLK_DEV_ALI14XX=m CONFIG_BLK_DEV_DTC2278=m CONFIG_BLK_DEV_HT6560B=m @@ -1351,7 +1356,7 @@ CONFIG_SCSI_FC_TGT_ATTRS=y CONFIG_SCSI_ISCSI_ATTRS=m CONFIG_SCSI_SAS_ATTRS=m CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_ATA is not set +CONFIG_SCSI_SAS_ATA=y CONFIG_SCSI_SAS_HOST_SMP=y # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set CONFIG_SCSI_SRP_ATTRS=m @@ -3430,6 +3435,7 @@ CONFIG_USB_HWA_HCD=m # # Enable Host or Gadget support to see Inventra options # +# CONFIG_USB_GADGET_MUSB_HDRC is not set # # USB Device Class drivers @@ -3552,6 +3558,28 @@ CONFIG_USB_CXACRU=m CONFIG_USB_UEAGLEATM=m CONFIG_USB_XUSBATM=m # CONFIG_USB_GADGET is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_PXA25X is not set +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_FSL_QE is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m @@ -3578,7 +3606,6 @@ CONFIG_MMC_SDHCI_PCI=m CONFIG_MMC_RICOH_MMC=m CONFIG_MMC_WBSD=m CONFIG_MMC_TIFM_SD=m -CONFIG_MMC_SPI=m CONFIG_MMC_SDRICOH_CS=m CONFIG_MEMSTICK=m # CONFIG_MEMSTICK_DEBUG is not set diff --git a/core/uclibc++/APKBUILD b/core/uclibc++/APKBUILD index b0769d37fc..98f2d11388 100644 --- a/core/uclibc++/APKBUILD +++ b/core/uclibc++/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=uclibc++ pkgver=0.2.2 -pkgrel=2 +pkgrel=3 pkgdesc="Embedded C++ library" url="http://cxx.uclibc.org/" license='GPL-2' @@ -10,7 +10,7 @@ makedepends="g++" subpackages="$pkgname-dev" source="http://cxx.uclibc.org/src/uClibc++-$pkgver.tar.bz2 associative_base.patch - uclibc++.patch + uclibc++-gcc-4.3.patch uclibc++config " @@ -43,5 +43,5 @@ dev() { md5sums="1ceef3209cca88be8f1bd9de99735954 uClibc++-0.2.2.tar.bz2 5689baa3f3bf8488c0a5d27a690d30fa associative_base.patch -230125c74591ac9afb30fa5ea6efffb8 uclibc++.patch +4c7b499e4697225378acef25f6364e9b uclibc++-gcc-4.3.patch 2f573c1e2a0c7a320ea4685cc3ce9e2a uclibc++config" diff --git a/core/uclibc++/uclibc++.patch b/core/uclibc++/uclibc++-gcc-4.3.patch index 402f25d5b7..37d45a5d5a 100644 --- a/core/uclibc++/uclibc++.patch +++ b/core/uclibc++/uclibc++-gcc-4.3.patch @@ -1,14 +1,6 @@ ---- a/include/associative_base Sun Jun 3 22:51:12 2007 -+++ b/include/associative_base Sun Jan 11 21:50:05 2009 -@@ -74,7 +74,7 @@ - typedef typename std::reverse_iterator<const_iterator> const_reverse_iterator; - - -- explicit __base_associative(const Compare& comp, const Allocator& A, const key_type (*v_to_k)(const value_type)) -+ explicit __base_associative(const Compare& comp, const Allocator& A, key_type (*v_to_k)(const value_type)) - : c(comp), value_to_key(v_to_k) { } - protected: - __base_associative(const associative_type& x) +diff -ru uClibc++-0.2.2.orig/include/associative_base uClibc++-0.2.2/include/associative_base +--- uClibc++-0.2.2.orig/include/associative_base 2009-03-03 14:03:40.000000000 +0000 ++++ uClibc++-0.2.2/include/associative_base 2009-03-03 14:03:52.000000000 +0000 @@ -318,7 +318,7 @@ typedef std::list<ValueType> listtype; @@ -45,26 +37,9 @@ } typename listtype::iterator base_iterator(){ return base_iter; -@@ -498,7 +498,7 @@ - using base::operator==; - using base::operator!=; - -- explicit __single_associative(const Compare& comp, const Allocator& A, const key_type (*v_to_k)(const value_type)) -+ explicit __single_associative(const Compare& comp, const Allocator& A, key_type (*v_to_k)(const value_type)) - : base(comp, A, v_to_k) { } - - template <class InputIterator> __single_associative( -@@ -506,7 +506,7 @@ - InputIterator last, - const Compare& comp, - const Allocator& A, -- const key_type (*v_to_k)(const value_type) -+ key_type (*v_to_k)(const value_type) - ) : base(comp, A, v_to_k) { - insert(first, last); - } ---- a/include/string Sun Jun 3 22:51:12 2007 -+++ b/include/string Sun Jan 11 21:50:18 2009 +diff -ru uClibc++-0.2.2.orig/include/string uClibc++-0.2.2/include/string +--- uClibc++-0.2.2.orig/include/string 2009-03-03 14:03:40.000000000 +0000 ++++ uClibc++-0.2.2/include/string 2009-03-03 14:03:52.000000000 +0000 @@ -1017,11 +1017,11 @@ template <> _UCXXEXPORT bool operator==(const string & lhs, const string & rhs); @@ -79,8 +54,9 @@ template <> _UCXXEXPORT string operator+(const string & lhs, const char* rhs); template <> _UCXXEXPORT string operator+(const char* lhs, const string & rhs); ---- a/src/string.cpp Sun Jun 3 22:51:13 2007 -+++ b/src/string.cpp Sun Jan 11 21:50:33 2009 +diff -ru uClibc++-0.2.2.orig/src/string.cpp uClibc++-0.2.2/src/string.cpp +--- uClibc++-0.2.2.orig/src/string.cpp 2009-03-03 14:03:41.000000000 +0000 ++++ uClibc++-0.2.2/src/string.cpp 2009-03-03 14:03:52.000000000 +0000 @@ -76,11 +76,11 @@ template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs); diff --git a/core/uclibc/APKBUILD b/core/uclibc/APKBUILD index 2e592987a9..0143dabff8 100644 --- a/core/uclibc/APKBUILD +++ b/core/uclibc/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=uclibc pkgver=0.9.30 -pkgrel=4 +pkgrel=5 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" @@ -18,7 +18,7 @@ source="http://uclibc.org/downloads/$_mynamever.tar.bz2 _prepare() { local i gcc_major - cd $srcdir/$_mynamever/ + cd "$srcdir/$_mynamever/" # gcc-3.4.6 is buggy and need -fno-omit-framepointer for lipthreads.old gcc_major=$(gcc --version | head -n1 | awk '{print $3}'|cut -d . -f1) @@ -30,15 +30,16 @@ _prepare() { } _compile() { - cd $srcdir/$_mynamever/ + cd "$srcdir/$_mynamever/" cp ../uclibcconfig .config make silentoldconfig make || return 1 } _install() { - cd $srcdir/$_mynamever/ - make install DESTDIR=$pkgdir + cd "$srcdir/$_mynamever/" + make install DESTDIR="$pkgdir" + install -Dm755 extra/scripts/getent "$pkgdir"/usr/bin/getent } build() { diff --git a/extra/acct/APKBUILD b/extra/acct/APKBUILD index 12a01ee781..73902efe63 100644 --- a/extra/acct/APKBUILD +++ b/extra/acct/APKBUILD @@ -8,18 +8,19 @@ license="GPL" depends="uclibc" makedepends="" install= -subpackages="" +subpackages="$pkgname-doc" source="http://ftp.gnu.org/gnu/acct/${pkgname}-${pkgver}.tar.gz" build() { cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr + # seems like this makefile does not respect DESTDIR + ./configure --prefix=/usr \ + --mandir="$pkgdir"/usr/share/man \ + --infodir="$pkgdir"/usr/share/info + make || return 1 make prefix="$pkgdir/usr" install - mv "$pkgdir/usr/man" "$pkgdir/usr/share/" - mv "$pkgdir/usr/info" "$pkgdir/usr/share/" - } md5sums="da0055b254f7da8b8920db83ef1ebba1 acct-6.3.2.tar.gz" diff --git a/extra/chrony/APKBUILD b/extra/chrony/APKBUILD index 3c3fbce7a6..d6eb661ffb 100644 --- a/extra/chrony/APKBUILD +++ b/extra/chrony/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=chrony pkgver=1.23 -pkgrel=0 +pkgrel=1 pkgdesc="NTP client and server programs" url="http://chrony.sunsite.dk/" license="GPL-2" @@ -13,6 +13,7 @@ source="http://chrony.sunsite.dk/download/$pkgname-$pkgver.tar.gz $pkgname-1.20-chrony.conf.example-gentoo.diff $pkgname-1.21-makefile.diff $pkgname-1.23-sources.diff + $pkgname-1.23-reply-ip.diff chronyd.confd chronyd.initd " @@ -50,5 +51,6 @@ bd6bd57363865d3ed0c3187d0c9f7151 chrony-1.20-conf.c-gentoo.diff b2a23e02f7af50bebdd5d18bccdedbf0 chrony-1.20-chrony.conf.example-gentoo.diff d47015a34b6b2f9eebca77ef939cec72 chrony-1.21-makefile.diff 39cbce9f66638b67623e1ee6bb0f943f chrony-1.23-sources.diff +caa6589a1a1cd56f64957e312d1ef84c chrony-1.23-reply-ip.diff d5c09be46226774d22c08c5a4c28093a chronyd.confd dac8aa4913d7c323abfa1719ddd7e5e4 chronyd.initd" diff --git a/extra/chrony/chrony-1.23-reply-ip.diff b/extra/chrony/chrony-1.23-reply-ip.diff new file mode 100644 index 0000000000..f4e5d8eff4 --- /dev/null +++ b/extra/chrony/chrony-1.23-reply-ip.diff @@ -0,0 +1,242 @@ + +Currently, on multihomed host, when chrony is not bound to a specific +IP address, a query is sent to an interface and the default source IP +hint for the back route differs, the reply will have a source IP +different than where the query was destinied to. This will cause +problems because connection tracking firewalls will drop the replies +and most likely the client program will get confused too. + +This patch uses the IP_PKTINFO mechanism to get the IP address where +received packets where targetted to and use that IP address as source +hint when sending a reply. +--- + addressing.h | 1 + + broadcast.c | 1 + + cmdmon.c | 3 ++ + conf.c | 1 + + ntp_io.c | 92 +++++++++++++++++++++++++++++++++++++++++---------------- + 5 files changed, 72 insertions(+), 26 deletions(-) + +diff --git a/addressing.h b/addressing.h +index aa20ed9..05152f4 100644 +--- a/addressing.h ++++ b/addressing.h +@@ -36,6 +36,7 @@ + typedef struct { + unsigned long ip_addr; + unsigned short port; ++ unsigned long local_ip_addr; + } NTP_Remote_Address; + + #if 0 +diff --git a/broadcast.c b/broadcast.c +index be217e7..c979741 100644 +--- a/broadcast.c ++++ b/broadcast.c +@@ -146,6 +146,7 @@ BRD_AddDestination(unsigned long addr, unsigned short port, int interval) + + destinations[n_destinations].addr.ip_addr = addr; + destinations[n_destinations].addr.port = port; ++ destinations[n_destinations].addr.local_ip_addr = 0; + destinations[n_destinations].interval = interval; + + SCH_AddTimeoutInClass((double) interval, 1.0, +diff --git a/cmdmon.c b/cmdmon.c +index 819977c..8affb0b 100644 +--- a/cmdmon.c ++++ b/cmdmon.c +@@ -1097,6 +1097,7 @@ handle_add_server(CMD_Request *rx_message, CMD_Reply *tx_message) + + rem_addr.ip_addr = ntohl(rx_message->data.ntp_source.ip_addr); + rem_addr.port = (unsigned short)(ntohl(rx_message->data.ntp_source.port)); ++ rem_addr.local_ip_addr = 0; + params.minpoll = ntohl(rx_message->data.ntp_source.minpoll); + params.maxpoll = ntohl(rx_message->data.ntp_source.maxpoll); + params.presend_minpoll = ntohl(rx_message->data.ntp_source.presend_minpoll); +@@ -1133,6 +1134,7 @@ handle_add_peer(CMD_Request *rx_message, CMD_Reply *tx_message) + + rem_addr.ip_addr = ntohl(rx_message->data.ntp_source.ip_addr); + rem_addr.port = (unsigned short)(ntohl(rx_message->data.ntp_source.port)); ++ rem_addr.local_ip_addr = 0; + params.minpoll = ntohl(rx_message->data.ntp_source.minpoll); + params.maxpoll = ntohl(rx_message->data.ntp_source.maxpoll); + params.presend_minpoll = ntohl(rx_message->data.ntp_source.presend_minpoll); +@@ -1167,6 +1169,7 @@ handle_del_source(CMD_Request *rx_message, CMD_Reply *tx_message) + + rem_addr.ip_addr = ntohl(rx_message->data.del_source.ip_addr); + rem_addr.port = 0; ++ rem_addr.local_ip_addr = 0; + + status = NSR_RemoveSource(&rem_addr); + switch (status) { +diff --git a/conf.c b/conf.c +index e34927e..ddd13f1 100644 +--- a/conf.c ++++ b/conf.c +@@ -949,6 +949,7 @@ CNF_AddSources(void) { + for (i=0; i<n_ntp_sources; i++) { + server.ip_addr = ntp_sources[i].ip_addr; + server.port = ntp_sources[i].port; ++ server.local_ip_addr = 0; + + switch (ntp_sources[i].type) { + case SERVER: +diff --git a/ntp_io.c b/ntp_io.c +index afb6ad1..db89758 100644 +--- a/ntp_io.c ++++ b/ntp_io.c +@@ -118,6 +118,12 @@ NIO_Initialise(void) + LOG(LOGS_ERR, LOGF_NtpIO, "Could not set broadcast socket options"); + /* Don't quit - we might survive anyway */ + } ++ /* We want the local IP info too */ ++ if (setsockopt(sock_fd, IPPROTO_IP, IP_PKTINFO, (char *)&on_off, sizeof(on_off)) < 0) { ++ LOG(LOGS_ERR, LOGF_NtpIO, "Could not request packet info using socket option"); ++ /* Don't quit - we might survive anyway */ ++ } ++ + + /* Bind the port */ + my_addr.sin_family = AF_INET; +@@ -182,22 +188,30 @@ read_from_socket(void *anything) + + int status; + ReceiveBuffer message; +- int message_length; + struct sockaddr_in where_from; +- socklen_t from_length; + unsigned int flags = 0; + struct timeval now; + NTP_Remote_Address remote_addr; + double local_clock_err; ++ char cmsgbuf[256]; ++ struct cmsghdr *cmsg; ++ struct msghdr msg; ++ struct iovec iov; + + assert(initialised); + +- from_length = sizeof(where_from); +- message_length = sizeof(message); ++ iov.iov_base = message.arbitrary; ++ iov.iov_len = sizeof(message); ++ msg.msg_name = &where_from; ++ msg.msg_namelen = sizeof(where_from); ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ msg.msg_control = (void *) cmsgbuf; ++ msg.msg_controllen = sizeof(cmsgbuf); ++ msg.msg_flags = 0; + + LCL_ReadCookedTime(&now, &local_clock_err); +- status = recvfrom(sock_fd, (char *)&message, message_length, flags, +- (struct sockaddr *)&where_from, &from_length); ++ status = recvmsg(sock_fd, &msg, flags); + + /* Don't bother checking if read failed or why if it did. More + likely than not, it will be connection refused, resulting from a +@@ -209,6 +223,13 @@ read_from_socket(void *anything) + if (status > 0) { + remote_addr.ip_addr = ntohl(where_from.sin_addr.s_addr); + remote_addr.port = ntohs(where_from.sin_port); ++ remote_addr.local_ip_addr = 0; ++ ++ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { ++ if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_PKTINFO) ++ remote_addr.local_ip_addr = ++ ntohl(((struct in_pktinfo *) CMSG_DATA(cmsg))->ipi_spec_dst.s_addr); ++ } + + if (status == NTP_NORMAL_PACKET_SIZE) { + +@@ -229,21 +250,45 @@ read_from_socket(void *anything) + } + + /* ================================================== */ +-/* Send an unauthenticated packet to a given address */ ++/* Send a packet to given address */ + +-void +-NIO_SendNormalPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr) ++static void ++NIO_SendPacket(NTP_Packet *packet, int packetlen, NTP_Remote_Address *remote_addr) + { + struct sockaddr_in remote; ++ struct msghdr msg; ++ struct iovec iov; ++ struct { ++ struct cmsghdr cm; ++ struct in_pktinfo ipi; ++ } cmsg; + + assert(initialised); + + remote.sin_family = AF_INET; + remote.sin_port = htons(remote_addr->port); + remote.sin_addr.s_addr = htonl(remote_addr->ip_addr); ++ iov.iov_base = (void *) packet; ++ iov.iov_len = packetlen; ++ msg.msg_name = &remote; ++ msg.msg_namelen = sizeof(remote); ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ if (remote_addr->local_ip_addr) { ++ cmsg.cm.cmsg_len = sizeof(cmsg); ++ cmsg.cm.cmsg_level = IPPROTO_IP; ++ cmsg.cm.cmsg_type = IP_PKTINFO; ++ memset(&cmsg.ipi, 0, sizeof(cmsg.ipi)); ++ cmsg.ipi.ipi_spec_dst.s_addr = htonl(remote_addr->local_ip_addr); ++ msg.msg_control = (void *) &cmsg; ++ msg.msg_controllen = sizeof(cmsg); ++ } else { ++ msg.msg_control = NULL; ++ msg.msg_controllen = 0; ++ } ++ msg.msg_flags = 0; + +- if (sendto(sock_fd, (void *) packet, NTP_NORMAL_PACKET_SIZE, 0, +- (struct sockaddr *) &remote, sizeof(remote)) < 0) { ++ if (sendmsg(sock_fd, &msg, 0) < 0) { + LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s", + UTI_IPToDottedQuad(remote_addr->ip_addr), remote_addr->port, strerror(errno)); + } +@@ -252,26 +297,21 @@ NIO_SendNormalPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr) + } + + /* ================================================== */ +-/* Send an authenticated packet to a given address */ ++/* Send an unauthenticated packet to a given address */ + + void +-NIO_SendAuthenticatedPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr) ++NIO_SendNormalPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr) + { +- struct sockaddr_in remote; +- +- assert(initialised); +- +- remote.sin_family = AF_INET; +- remote.sin_port = htons(remote_addr->port); +- remote.sin_addr.s_addr = htonl(remote_addr->ip_addr); ++ NIO_SendPacket(packet, NTP_NORMAL_PACKET_SIZE, remote_addr); ++} + +- if (sendto(sock_fd, (void *) packet, sizeof(NTP_Packet), 0, +- (struct sockaddr *) &remote, sizeof(remote)) < 0) { +- LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s", +- UTI_IPToDottedQuad(remote_addr->ip_addr), remote_addr->port, strerror(errno)); +- } ++/* ================================================== */ ++/* Send an authenticated packet to a given address */ + +- return; ++void ++NIO_SendAuthenticatedPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr) ++{ ++ NIO_SendPacket(packet, sizeof(NTP_Packet), remote_addr); + } + + /* ================================================== */ +-- +1.5.6.3 + diff --git a/extra/cracklib/APKBUILD b/extra/cracklib/APKBUILD new file mode 100644 index 0000000000..e03c6a7700 --- /dev/null +++ b/extra/cracklib/APKBUILD @@ -0,0 +1,31 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Michael Mason <ms13sp@gmail.com> +pkgname=cracklib +pkgver=2.8.13 +pkgrel=0 +pkgdesc="A library used to enforce strong passwords" +url="http://sourceforge.net/projects/cracklib" +license="GPL" +depends="uclibc" +makedepends="" +install= +subpackages="$pkgname-dev" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + " +build() { + + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --without-python \ + --disable-nls \ + --with-default-dict + make -j1 all || return 1 + make -j1 DESTDIR="$pkgdir" install + +} + +md5sums="5beb4c6b3c31c83fc98c4c225b25cd94 cracklib-2.8.13.tar.gz" diff --git a/extra/cutter/APKBUILD b/extra/cutter/APKBUILD new file mode 100644 index 0000000000..be27d880c7 --- /dev/null +++ b/extra/cutter/APKBUILD @@ -0,0 +1,27 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Michael Mason <ms13sp@gmail.com> +pkgname=cutter +pkgver=1.03 +pkgrel=1 +pkgdesc="A program that allows firewall administrators to abort TCP/IP connections." +url="http://www.lowth.com/cutter" +license="GPL" +depends="uclibc" +makedepends="" +install= +subpackages="" +source="http://www.lowth.com/cutter/software/$pkgname-$pkgver.tgz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + #no make install and no configure script + + make || return 1 + + mkdir -p "$pkgdir"/usr/sbin/ + + install -m755 -D cutter "$pkgdir"/usr/sbin/cutter + +} + +md5sums="50093db9b64277643969ee75b83ebbd1 cutter-1.03.tgz" diff --git a/extra/djbdns/APKBUILD b/extra/djbdns/APKBUILD index 46903ebaaf..4449d1d0af 100644 --- a/extra/djbdns/APKBUILD +++ b/extra/djbdns/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=djbdns pkgver=1.05 -pkgrel=21 +pkgrel=22 pkgdesc="Excellent high-performance DNS services" url="http://cr.yp.to/djbdns.html" license="public-domain" @@ -57,7 +57,13 @@ tinydns() { dnscache() { pkgdesc="A recursive resolver" install=dnscache.install - mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/etc/dnscache + mkdir -p "$subpkgdir"/usr/bin \ + "$subpkgdir"/etc/dnscache/ip \ + "$subpkgdir"/etc/dnscache/servers + + cp "$pkgdir"/etc/dnsroots.global "$subpkgdir"/etc/dnscache/servers/@ + touch "$subpkgdir"/etc/dnscache/ip/127 || return 1 + mv "$pkgdir"/usr/bin/dnscache* "$subpkgdir"/usr/bin install -D -m755 "$srcdir"/dnscache.initd \ "$subpkgdir"/etc/init.d/dnscache diff --git a/extra/fcgi/APKBUILD b/extra/fcgi/APKBUILD index ff619df703..fc208006cb 100644 --- a/extra/fcgi/APKBUILD +++ b/extra/fcgi/APKBUILD @@ -21,22 +21,17 @@ build() { patch -p1 < $i || return 1 done - # not sure how to use autotools for this apk - # Removed makefile patch and added libs -lm - #aclocal || return 1 - #autoconf || return 1 - # add missing files so automake doesnt error - #touch NEWS AUTHORS ChangeLog || return 1 - #automake --add-missing || return 1 - #libtoolize || return 1 export LIBS="$LIBS -lm" + # seems like there is no way to disable c++ from configure script + # the row below helps us to build even if g++ is installed on system + export CXX=false + ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ - --enable-shared \ - --enable-static + --enable-shared make || return 1 make DESTDIR="$pkgdir" install diff --git a/extra/fetchmail/APKBUILD b/extra/fetchmail/APKBUILD new file mode 100644 index 0000000000..e04e23c349 --- /dev/null +++ b/extra/fetchmail/APKBUILD @@ -0,0 +1,39 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=fetchmail +pkgver=6.3.9 +pkgrel=0 +pkgdesc="A remote-mail retrieval and forwarding utility" +url="http://fetchmail.berlios.de/" +license="GPL" +depends="openssl uclibc" +makedepends="openssl-dev" +install= +subpackages="$pkgname-doc fetchmailconf" +source="http://download.berlios.de/fetchmail/$pkgname-$pkgver.tar.bz2 + fetchmail.initrd" +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-ssl \ + --disable-nls + make || return 1 + make DESTDIR="$pkgdir" install + install -Dm755 $srcdir/fetchmail.initrd "$pkgdir"/etc/init.d/fetchmail +} + +fetchmailconf() { + depends="python" + pkgdesc="A GUI for generating fetchmail configuration files" + mkdir -p "$subpkgdir"/usr/bin + cd "$pkgdir" + mv usr/bin/fetchmailconf "$subpkgdir"/usr/bin/ + mv usr/lib "$subpkgdir"/usr/ +} + +md5sums="72c20ad2b9629f1a109668b05a84d823 fetchmail-6.3.9.tar.bz2 +b6b95767279d77c98acdc3aa4d00ec89 fetchmail.initrd" diff --git a/extra/fetchmail/fetchmail.initrd b/extra/fetchmail/fetchmail.initrd new file mode 100755 index 0000000000..30eea50369 --- /dev/null +++ b/extra/fetchmail/fetchmail.initrd @@ -0,0 +1,30 @@ +#!/sbin/runscript + +depend() { + need net + use mta +} + +checkconfig() { + if [ ! -f /etc/fetchmailrc ]; then + eerror "Configuration file /etc/fetchmailrc not found" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting fetchmail" + start-stop-daemon --start --quiet --exec /usr/bin/fetchmail \ + --chuid ${USER:-fetchmail}:${GROUP:-fetchmail} \ + -- -d ${polling_period} -f /etc/fetchmailrc + eend ${?} +} + +stop() { + ebegin "Stopping fetchmail" + start-stop-daemon --stop --quiet --pidfile /var/run/fetchmail.pid + eend ${?} +} + diff --git a/extra/gawk/APKBUILD b/extra/gawk/APKBUILD new file mode 100644 index 0000000000..2fc9be58c5 --- /dev/null +++ b/extra/gawk/APKBUILD @@ -0,0 +1,28 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=gawk +pkgver=3.1.6 +pkgrel=0 +pkgdesc="GNU awk pattern-matching language" +url="http://www.gnu.org/software/gawk/gawk.html" +license="GPL" +depends="uclibc" +makedepends="" +install= +subpackages="$pkgname-doc" +source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-nls + make || return 1 + make DESTDIR="$pkgdir" install + +} + +md5sums="b237751aef53c9ead9644e376bc53386 gawk-3.1.6.tar.gz" diff --git a/extra/ghostscript/APKBUILD b/extra/ghostscript/APKBUILD new file mode 100644 index 0000000000..e387f850f3 --- /dev/null +++ b/extra/ghostscript/APKBUILD @@ -0,0 +1,45 @@ +# Contributor: Cameron Banta <cbanta@gmail.com> +# Maintainer: Cameron Banta <cbanta@gmail.com> +pkgname=ghostscript +pkgver=8.64 +pkgrel=0 +pkgdesc="An interpreter for the PostScript language and for PDF" +url="http://ghostscript.com/" +license="GPL" +depends="uclibc" +makedepends="" +install= +subpackages="$pkgname-doc" +source="http://ghostscript.com/releases/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-drivers=FILES \ + --disable-cups --disable-gtk --disable-cairo \ + --docdir=/usr/share/doc/"$pkgname" + make || return 1 + make DESTDIR="$pkgdir" install + + # license and copying + install -m644 -D "$srcdir/$pkgname-$pkgver/LICENSE" \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -m644 -D "$srcdir/$pkgname-$pkgver/doc/COPYING" \ + "$pkgdir/usr/share/licenses/$pkgname/COPYING" + + + + # make the doc and examples more alpine like + # (the --docdir above doesn't seem to work so good) + mkdir -p "$pkgdir/usr/share/doc/$pkgname" + mv "$pkgdir/usr/share/$pkgname/$pkgver/doc" "$pkgdir/usr/share/doc/$pkgname" + mv "$pkgdir/usr/share/$pkgname/$pkgver/examples" "$pkgdir/usr/share/doc/$pkgname" + + +} + +md5sums="dd927ecf7e4db38b62be3dc17b1b04d2 ghostscript-8.64.tar.gz" diff --git a/extra/htop/APKBUILD b/extra/htop/APKBUILD index 4ae195d565..b6e4ee8880 100644 --- a/extra/htop/APKBUILD +++ b/extra/htop/APKBUILD @@ -1,7 +1,7 @@ # Maintainer:Carlo Landmeter pkgname=htop pkgver=0.8.1 -pkgrel=0 +pkgrel=1 pkgdesc="An interactive process viewer for Linux" url="http://htop.sourceforge.net" license='GPL' diff --git a/extra/iaxmodem/APKBUILD b/extra/iaxmodem/APKBUILD new file mode 100644 index 0000000000..86ca156f25 --- /dev/null +++ b/extra/iaxmodem/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Cameron Banta <cbanta@gmail.com> +# Maintainer: Cameron Banta <cbanta@gmail.com> +pkgname=iaxmodem +pkgver=1.2.0 +pkgrel=0 +pkgdesc="Softmodem for hylafax that connects to VOIP gateway with IAX" +url="http://iaxmodem.sourceforge.net/" +license="GPL" +depends="uclibc tiff" +makedepends="tiff-dev" +#install= +#subpackages="$pkgname-doc $pkgname-dev" +subpackages="$pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure + make || return 1 + install -m755 -s -D "$srcdir/$pkgname-$pkgver/iaxmodem" \ + "$pkgdir/sbin/iaxmodem" + mkdir -p "$pkgdir/etc/iaxmodem" + mkdir -p "$pkgdir/var/log/iaxmodem" + + #library licenses + install -m644 -D "$srcdir/$pkgname-$pkgver/lib/libiax2/COPYING" \ + "$pkgdir"/usr/share/licenses/$pkgname/libiax2.COPYING + install -m644 -D "$srcdir/$pkgname-$pkgver/lib/libiax2/COPYING.LIB" \ + "$pkgdir"/usr/share/licenses/$pkgname/libiax2.COPYING.LIB + + install -m644 -D "$srcdir/$pkgname-$pkgver/lib/spandsp/COPYING" \ + "$pkgdir"/usr/share/licenses/$pkgname/libspandsp.COPYING + + #docs + install -m644 -D "$srcdir/$pkgname-$pkgver/README" \ + "$pkgdir/usr/share/doc/$pkgname/README" + install -m644 -D "$srcdir/$pkgname-$pkgver/FAQ" \ + "$pkgdir/usr/share/doc/$pkgname/FAQ" + + install -m644 -D "$srcdir/$pkgname-$pkgver/iaxmodem-cfg.ttyIAX" \ + "$pkgdir/usr/share/doc/$pkgname/iaxmodem-cfg.ttyIAX" + install -m644 -D "$srcdir/$pkgname-$pkgver/iaxmodem.init.debian" \ + "$pkgdir/usr/share/doc/$pkgname/iaxmodem.init.debian" + install -m644 -D "$srcdir/$pkgname-$pkgver/config.ttyIAX" \ + "$pkgdir/usr/share/doc/$pkgname/config.ttyIAX" + + # install -m755 -D "$srcdir"/$pkgname.initd \ + # "$pkgdir"/etc/init.d/$pkgname + # install -m644 -D "$srcdir"/$pkgname.confd \ + # "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="f8b26cfeed188e5c1dcbc5ae5ef923b3 iaxmodem-1.2.0.tar.gz" diff --git a/extra/links/APKBUILD b/extra/links/APKBUILD new file mode 100644 index 0000000000..2d11cf9dba --- /dev/null +++ b/extra/links/APKBUILD @@ -0,0 +1,25 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=links +pkgver=2.2 +pkgrel=0 +pkgdesc="A text WWW browser, similar to Lynx" +url="http://atrey.karlin.mff.cuni.cz/~clock/twibright/links/" +license="GPL" +subpackages="$pkgname-doc" +# the bzip2 lib is linked static so we dont need in depends +depends="zlib openssl" +makedepends="pkgconfig zlib-dev openssl-dev bzip2-dev" +source="http://$pkgname.twibright.com/download/$pkgname-$pkgver.tar.bz2" + +build () { + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --enable-javascript \ + --disable-graphics \ + --without-x \ + --disable-nls || return 1 + make || return 1 + make DESTDIR="$pkgdir" install || return 1 +} +md5sums="bf5b20529a2a811701c5af52b28ebdd4 links-2.2.tar.bz2" diff --git a/extra/lzo/APKBUILD b/extra/lzo/APKBUILD new file mode 100644 index 0000000000..a9f2b912e1 --- /dev/null +++ b/extra/lzo/APKBUILD @@ -0,0 +1,27 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Michael Mason <ms13sp@gmail.com> +pkgname=lzo +pkgver=2.03 +pkgrel=0 +pkgdesc="LZO -- a real-time data compression library" +url="http://www.oberhumer.com/opensource/lzo" +license="GPL" +depends="uclibc" +makedepends="" +install= +subpackages="$pkgname-dev" +source="http://www.oberhumer.com/opensource/lzo/download/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-shared + make || return 1 + make DESTDIR="$pkgdir" install +} + +md5sums="0c3d078c2e8ea5a88971089a2f02a726 lzo-2.03.tar.gz" diff --git a/extra/nano/APKBUILD b/extra/nano/APKBUILD new file mode 100644 index 0000000000..bc911ba7df --- /dev/null +++ b/extra/nano/APKBUILD @@ -0,0 +1,33 @@ +# Contributor: ms13sp <ms13sp@gmail.com> +# Maintainer: ms13sp <ms13sp@gmail.com> +pkgname=nano +pkgver=2.0.9 +pkgmaj=2.0 +pkgrel=0 +pkgdesc="Text Editor. GNU nano is designed to be a free replacement for the Pico text editor." +url="http://www.nano-editor.org/" +license="GPL" +depends="ncurses uclibc" +makedepends="ncurses-dev" +install= +subpackages="$pkgname-doc" +source="http://www.nano-editor.org/dist/v$pkgmaj/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-tiny \ + --disable-nls \ + --disable-speller + make || return 1 + make DESTDIR="$pkgdir" install + + # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="2be94dc43fb60fff4626a2401a977220 nano-2.0.9.tar.gz" diff --git a/extra/nmap/APKBUILD b/extra/nmap/APKBUILD index ae7be5ed19..367523d3ba 100644 --- a/extra/nmap/APKBUILD +++ b/extra/nmap/APKBUILD @@ -2,19 +2,27 @@ # Maintainer: Leonardo Arena <rnalrd@gmail.com> pkgname=nmap pkgver=4.76 -pkgrel=0 +pkgrel=1 pkgdesc="A network exploration tool and security/port scanner" url="http:/nmap.org" license="custom:GPL" -depends="pcre libpcap openssl-dev lua-dev" -makedepends="g++" +depends="pcre libpcap openssl-dev lua-dev uclibc++" +makedepends="uclibc++-dev libpcap-dev" install= subpackages="$pkgname-doc $pkgname-nse" -source="http://nmap.org/dist/$pkgname-$pkgver.tgz" +source="http://nmap.org/dist/$pkgname-$pkgver.tgz + nmap-4.53-uclibc++-output.cc.patch + " build() { cd "$srcdir/$pkgname-$pkgver" + for i in ../*.patch; do + msg "Applying $i..." + patch -p1 < $i || return 1 + done + + export CXX=g++-uc ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ @@ -35,4 +43,5 @@ nse() { mv "$pkgdir"/usr/share/$pkgname/scripts "$subpkgdir"/usr/share/$pkgname/ } -md5sums="54b5c9e3f44c1adde17df68170eb7cfe nmap-4.76.tgz" +md5sums="54b5c9e3f44c1adde17df68170eb7cfe nmap-4.76.tgz +507b0936aaafaeddebad309b0924de39 nmap-4.53-uclibc++-output.cc.patch" diff --git a/extra/nmap/nmap-4.53-uclibc++-output.cc.patch b/extra/nmap/nmap-4.53-uclibc++-output.cc.patch new file mode 100644 index 0000000000..3253fc26b3 --- /dev/null +++ b/extra/nmap/nmap-4.53-uclibc++-output.cc.patch @@ -0,0 +1,11 @@ +--- nmap/output.cc.orig 2007-12-15 09:54:07.000000000 -0800 ++++ nmap/output.cc 2007-12-15 09:54:19.000000000 -0800 +@@ -1904,7 +1904,7 @@ + + /* Compares this record to another. First compare the directory names, then + compare the file names. */ +- bool operator<(const struct data_file_record& other) { ++ bool operator<(const struct data_file_record& other) const { + int cmp; + + cmp = dir.compare(other.dir); diff --git a/extra/pingu/APKBUILD b/extra/pingu/APKBUILD index 244cdf6876..8089c15626 100644 --- a/extra/pingu/APKBUILD +++ b/extra/pingu/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=pingu pkgver=0.2 -pkgrel=0 +pkgrel=1 pkgdesc="Small daemon that pings hosts and executes a script when status change" url="http://git.alpinelinux.org/cgit/pingu" license="GPL" @@ -20,4 +20,4 @@ build() { } md5sums="5f7b72e4eb0af88a5d568b383513591f pingu-0.2.tar.bz2 -2b06ea0dbb9ccfc8e0d5afb7fb6aee6a pingu.initd" +d2162d9c02a66691bb6360f4f2d9d701 pingu.initd" diff --git a/extra/pingu/pingu.initd b/extra/pingu/pingu.initd new file mode 100644 index 0000000000..39301f80e4 --- /dev/null +++ b/extra/pingu/pingu.initd @@ -0,0 +1,27 @@ +#!/sbin/runscript + +# Sample init.d file for alpine linux. + +NAME=pingu +DAEMON=/usr/bin/$NAME + +depend() { + need net +} + +start() { + ebegin "Starting ${NAME}" + start-stop-daemon --start --quiet \ + --pidfile /var/run/${NAME}.pid \ + --exec ${DAEMON} -- -d + eend $? +} + +stop() { + ebegin "Stopping ${NAME}" + start-stop-daemon --stop --quiet \ + --exec ${DAEMON} \ + --pidfile /var/run/${NAME}.pid + eend $? +} + diff --git a/extra/postgresql/APKBUILD b/extra/postgresql/APKBUILD new file mode 100644 index 0000000000..d2cb83a6dc --- /dev/null +++ b/extra/postgresql/APKBUILD @@ -0,0 +1,50 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=postgresql +pkgver=8.3.5 +pkgrel=0 +pkgdesc="A sophisticated object-relational DBMS" +url="http://www.postgresql.org/" +license="BSD" +depends="uclibc openssl libpq bbsuid" +makedepends="readline-dev openssl-dev" +subpackages="$pkgname-dev $pkgname-doc libpq $pkgname-client" +source="ftp://ftp.$pkgname.org/pub/source/v$pkgver/$pkgname-$pkgver.tar.bz2 + $pkgname.initd + $pkgname.confd + " + +build() { + cd "$srcdir"/$pkgname-$pkgver || return 1 + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --with-docdir=/usr/share/doc \ + --with-openssl \ + || return 1 + + make || return 1 + make DESTDIR="$pkgdir" install || return 1 + + install -D -m755 "$srcdir"/postgresql.initd \ + "$pkgdir"/etc/init.d/postgresql + install -D -m644 "$srcdir"/postgresql.confd \ + "$pkgdir"/etc/conf.d/postgresql || return 1 +} + +libpq() { + depends="uclibc openssl" + pkgdesc="PostgreSQL libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libpq.so* "$subpkgdir"/usr/lib/ +} + +client() { + depends="uclibc openssl libpq readline" + pkgdesc="PostgreSQL client" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/psql "$subpkgdir"/usr/bin/ +} + + +md5sums="3bc028774d7a79e926be0c6a9c7ca209 postgresql-8.3.5.tar.bz2 +7ed7e95246798ac3d5474ed12bf98e98 postgresql.initd +ea3320c56a22f5c305199886c2766387 postgresql.confd" diff --git a/extra/postgresql/postgresql.confd b/extra/postgresql/postgresql.confd new file mode 100644 index 0000000000..56561b0c40 --- /dev/null +++ b/extra/postgresql/postgresql.confd @@ -0,0 +1,52 @@ +# PostgreSQL's Database Directory +PGDATA="/var/lib/postgresql/8.3/data" + +# PostgreSQL User +PGUSER="postgres" + +# PostgreSQL Group +PGGROUP="postgres" + +# Extra options to run postmaster with, e.g.: +# -N is the maximal number of client connections +# -B is the number of shared buffers and has to be at least 2x the value for -N +# Please read the man-page to postmaster for more options. Many of these options +# can be set directly in the configuration-file. +#PGOPTS="-N 512 -B 1024" + + +# SERVER SHUTDOWN: +# The server will receive 3 signals in the worst case: +# 1. SIGTERM +# This signals the server to ignore new connections and to +# wait for all clients to end their transactions before shutting down. +# Use WAIT_FOR_DISCONNECT to control how much time the clients +# should have until the next signal is being sent. +# 2. SIGINT +# Tell the server to forcefully disconnect all clients. +# Terminating a client results in a rollback of the open transactions for this client. +# Use WAIT_FOR_CLEANUP to determine how much time the server has +# for cleanup. +# 3. SIGQUIT +# This will terminate the server immediately and results in a recovery run for the next start. + +# Wait for clients to disconnect +WAIT_FOR_DISCONNECT=30 + +# Time the server has to clean up +WAIT_FOR_CLEANUP=60 + +# Time the server has to quit (with a recover-run on next startup) +# Set to 0 to deactivate it +WAIT_FOR_QUIT=60 + +# Comment this out if you don't want to wait for the server to +# startup before continuing. For example, if this server is a +# PITR log shipping based replication standby +WAIT_FOR_START="-w" + +# If you have to export environment variables for the database process, +# this can be done here. +# +# Example: +# export R_HOME="/usr/lib/R" diff --git a/extra/postgresql/postgresql.initd b/extra/postgresql/postgresql.initd new file mode 100644 index 0000000000..bc50ae2f73 --- /dev/null +++ b/extra/postgresql/postgresql.initd @@ -0,0 +1,114 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-8.3,v 1.4 2008/09/28 22:53:02 caleb Exp $ + +opts="${opts} reload setup" + +depend() { + use net + provide postgresql +} + +checkconfig() { + if [ ! -d "$PGDATA" ] ; then + eerror "Directory not found: $PGDATA" + eerror "Please make sure that PGDATA points to the right path." + eerror "You can run '/etc/init.d/postgresql setup' to setup a new database cluster." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting PostgreSQL" + + if [ -f "$PGDATA/postmaster.pid" ] ; then + rm -f "$PGDATA/postmaster.pid" + fi + + local retval + + su -l ${PGUSER} \ + -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl start ${WAIT_FOR_START} -o '--silent-mode=true ${PGOPTS}'" >/dev/null + retval=$? + [ $retval -ne 0 ] && eend $retval && return $retval + + # The following is to catch the case of an already running server + # in which pg_ctl doesn't know to which server it connected to and false reports the server as 'up' + sleep 2 + if [ ! -f "$PGDATA/postmaster.pid" ] ; then + eerror "The pid-file doesn't exist but pg_ctl reported a running server." + eerror "Please check whether there is another server running on the same port or read the log-file." + eend 1 + return 1 + fi + + local pid=$(grep "^[0-9]\+" "$PGDATA/postmaster.pid") + test -d /proc/"${pid}" + eend $? +} + +stop() { + ebegin "Stopping PostgreSQL (this can take up to $(( ${WAIT_FOR_DISCONNECT} + ${WAIT_FOR_CLEANUP} )) seconds)" + + local retval + + su -l ${PGUSER} \ + -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl stop -t ${WAIT_FOR_DISCONNECT} -m smart" >/dev/null + + retval=$? + [ $retval -eq 0 ] && eend $retval && return $retval + + ewarn "Some clients did not disconnect within ${WAIT_FOR_DISCONNECT} seconds." + ewarn "Going to shutdown the server anyway." + + su -l ${PGUSER} \ + -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl stop -m fast" >/dev/null + + retval=$? + [ $retval -eq 0 ] && eend $retval && return $retval + + if [ ${WAIT_FOR_QUIT} -eq 0 ] ; then + eerror "Server did not shut down and sending the SIGQUIT has been disabled." + eend $retval + return $retval + fi + + ewarn "Shutting down the server gracefully failed." + ewarn "Forcing it to shutdown which leads to a recover-run on next startup." + + su -l ${PGUSER} \ + -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl stop -m immediate" >/dev/null + + retval=$? + [ $retval -eq 0 ] && eend $retval && return $retval + + eerror "Forced shutdown failed!!! Something is wrong with your system, please take care of it manually." + eend $? +} + +reload() { + ebegin "Reloading PostgreSQL configuration" + su -l ${PGUSER} \ + -c "env PGDATA=\"${PGDATA}\" /usr/bin/pg_ctl reload" >/dev/null + eend $? +} + +setup() { + ebegin "Creating a new PostgreSQL database cluster" + if [ -d "${PGDATA}" ] ; then + eend 1 "${PGDATA} already exist" + return + fi + mkdir -p "${PGDATA}" + chown -Rf postgres:postgres "${PGDATA}" + chmod 0700 "${PGDATA}" + cd "${PGDATA}" # to avoid the: could not change directory to "/root" + su -c "/usr/bin/initdb --pgdata ${PGDATA}" postgres + einfo "You can use the '/etc/init.d/postgresql' script to run PostgreSQL instead" + einfo "of 'pg_ctl'." + eend $? +} + diff --git a/extra/quagga/APKBUILD b/extra/quagga/APKBUILD index 04f33d4084..e941224ce5 100644 --- a/extra/quagga/APKBUILD +++ b/extra/quagga/APKBUILD @@ -1,11 +1,11 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=quagga pkgver=0.99.11 -pkgrel=4 +pkgrel=7 pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." url="http://quagga.net/" license="GPL-2" -depends="uclibc readline ncurses" +depends="uclibc readline ncurses iproute2" makedepends="readline-dev ncurses-dev autoconf automake libtool" install=quagga.install @@ -76,6 +76,6 @@ cc109a746273bc0d6aee9d758e7524ab bgpd.initd 89b0cf4e70172bfcd195b2869cae28da ospfd.initd 39b8cb21b55de53af38c94c2f5d85917 ripd.initd 120ab1b53975ec86e78266f31e935ab6 ripngd.initd -6d51e9fca8d206a6d9d1d9fde793b48f zebra.initd +3490a10510e416ab83d5b4d767136de8 zebra.initd c38e884372406e9e59616e436cd26388 zebra.confd -6d2ca71d32ed9d9517f7779986db91da quagga.install" +c5c0ae236d32df9e7a000b19f3fc3684 quagga.install" diff --git a/extra/quagga/quagga.install b/extra/quagga/quagga.install index a69fe81a26..52a261a1f7 100644 --- a/extra/quagga/quagga.install +++ b/extra/quagga/quagga.install @@ -4,10 +4,11 @@ case "$1" in pre_install) adduser -H -h /var/empty -s /bin/false -D quagga 2>/dev/null mkdir -p var/empty + ;; + post_install) chown root:root var/empty chown quagga:quagga /var/run/quagga ;; esac exit 0 - diff --git a/extra/quagga/zebra.initd b/extra/quagga/zebra.initd index 5ca8ef58c0..f0cc008432 100644 --- a/extra/quagga/zebra.initd +++ b/extra/quagga/zebra.initd @@ -17,7 +17,7 @@ checkconfig() { cleanup() { ebegin "Cleaning up stale zebra routes..." - ip route flush proto zebra + /usr/sbin/ip route flush proto zebra eend $? } diff --git a/extra/screen/APKBUILD b/extra/screen/APKBUILD new file mode 100644 index 0000000000..ffa48fa208 --- /dev/null +++ b/extra/screen/APKBUILD @@ -0,0 +1,33 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: +pkgname=screen +pkgver=4.0.3 +pkgrel=0 +pkgdesc="A window manager that multiplexes a physical terminal" +url="http://ftp.gnu.org/gnu/screen/" +license="GPL" +depends="uclibc ncurses" +makedepends="" +install= +subpackages="$pkgname-doc" +source="http://ftp.gnu.org/gnu/screen/$pkgname-$pkgver.tar.gz + $pkgname-$pkgver.patch" + +build() { + cd "$srcdir/$pkgname-$pkgver" + for i in ../*.patch; do + msg "Applying $i" + patch -p1 < $i || return 1 + done + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make || return 1 + make DESTDIR="$pkgdir" install + +} + +md5sums="8506fd205028a96c741e4037de6e3c42 screen-4.0.3.tar.gz +243e18daf4b2bbff898fdf0d772fad52 screen-4.0.3.patch" diff --git a/extra/screen/screen-4.0.3.patch b/extra/screen/screen-4.0.3.patch new file mode 100644 index 0000000000..4a90f49b91 --- /dev/null +++ b/extra/screen/screen-4.0.3.patch @@ -0,0 +1,272 @@ +--- screen-4.0.3-orig/acls.h Mon Sep 8 14:23:38 2003 ++++ screen-4.0.3/acls.h Fri Feb 27 18:32:07 2009 +@@ -20,6 +20,8 @@ + * + **************************************************************** + */ ++#ifndef _SCREEN_ACLS_H_ ++#define _SCREEN_ACLS_H_ + + #ifdef MULTIUSER + +@@ -91,3 +93,4 @@ + + extern int DefaultEsc, DefaultMetaEsc; + ++#endif /* define _SCREEN_ACLS_H_ */ +--- screen-4.0.3-orig/ansi.h Mon Feb 24 16:55:08 2003 ++++ screen-4.0.3/ansi.h Fri Feb 27 18:32:49 2009 +@@ -21,6 +21,8 @@ + **************************************************************** + * $Id: ansi.h,v 1.6 1994/05/31 12:31:28 mlschroe Exp $ FAU + */ ++#ifndef _SCREEN_ANSI_H_ ++#define _SCREEN_ANSI_H_ + + #define NATTR 6 + +@@ -168,3 +170,5 @@ + # define dw_left(ml, x, enc) 0 + # define dw_right(ml, x, enc) 0 + #endif ++ ++#endif /* define _SCREEN_ANSI_H_ */ +--- screen-4.0.3-orig/braille.h Sat Apr 28 13:26:42 2001 ++++ screen-4.0.3/braille.h Fri Feb 27 18:33:51 2009 +@@ -24,6 +24,8 @@ + **************************************************************** + * $Id: braille.h,v 1.1 1995/09/06 15:51:18 jnweiger Exp jnweiger $ FAU + */ ++#ifndef _SCREEN_BRAILLE_H_ ++#define _SCREEN_BRAILLE_H_ + + #ifdef HAVE_BRAILLE + +@@ -81,3 +83,5 @@ + #define BD_FORE bd.bd_dpy->d_fore + + #endif ++ ++#endif /* define _SCREEN_BRAILLE_H_ */ +--- screen-4.0.3-orig/display.h Tue Jul 1 14:01:42 2003 ++++ screen-4.0.3/display.h Fri Feb 27 18:34:30 2009 +@@ -21,6 +21,8 @@ + **************************************************************** + * $Id: display.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU + */ ++#ifndef _SCREEN_DISPLAY_H_ ++#define _SCREEN_DISPLAY_H_ + + #ifdef MAPKEYS + +@@ -343,3 +345,5 @@ + #define HSTATUS_MESSAGE 2 + #define HSTATUS_HS 3 + #define HSTATUS_ALWAYS (1<<2) ++ ++#endif /* define _SCREEN_DISPLAY_H_ */ +--- screen-4.0.3-orig/extern.h Fri Aug 22 12:27:57 2003 ++++ screen-4.0.3/extern.h Fri Feb 27 18:35:17 2009 +@@ -21,6 +21,8 @@ + **************************************************************** + * $Id: extern.h,v 1.18 1994/05/31 12:31:57 mlschroe Exp $ FAU + */ ++#ifndef _SCREEN_EXTERN_H_ ++#define _SCREEN_EXTERN_H_ + + #if !defined(__GNUC__) || __GNUC__ < 2 + #undef __attribute__ +@@ -490,3 +492,5 @@ + # endif + #endif + extern int EncodeChar __P((char *, int, int, int *)); ++ ++#endif /* define _SCREEN_EXTERN_H_ */ +--- screen-4.0.3-orig/image.h Fri Dec 5 13:45:41 2003 ++++ screen-4.0.3/image.h Fri Feb 27 18:35:53 2009 +@@ -21,8 +21,9 @@ + **************************************************************** + * $Id: image.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU + */ ++#ifndef _SCREEN_IMAGE_H_ ++#define _SCREEN_IMAGE_H_ + +- + #undef IFFONT + #undef IFCOLOR + +@@ -161,3 +162,5 @@ + # define cole2i(c) ((c) ^ 9) + # endif + #endif ++ ++#endif /* define _SCREEN_IMAGE_H_ */ +--- screen-4.0.3-orig/layer.h Tue Jan 8 15:42:25 2002 ++++ screen-4.0.3/layer.h Fri Feb 27 18:36:50 2009 +@@ -22,6 +22,9 @@ + * $Id: overlay.h,v 1.3 1994/05/31 12:32:31 mlschroe Exp $ FAU + */ + ++#ifndef _SCREEN_LAYER_H_ ++#define _SCREEN_LAYER_H_ ++ + /* + * This is the overlay structure. It is used to create a seperate + * layer over the current windows. +@@ -103,3 +106,4 @@ + display = olddisplay; \ + } while(0) + ++#endif /* define _SCREEN_LAYER_H_ */ +--- screen-4.0.3-orig/logfile.h Tue Jan 8 15:42:27 2002 ++++ screen-4.0.3/logfile.h Fri Feb 27 18:37:29 2009 +@@ -22,6 +22,9 @@ + * $Id: logfile.h,v 1.11 1994/05/31 12:33:27 jnweiger Exp $ FAU + */ + ++#ifndef _SCREEN_LOGFILE_H_ ++#define _SCREEN_LOGFILE_H_ ++ + struct logfile + { + struct logfile *next; +@@ -80,3 +83,5 @@ + * It closes fd and opens wantfd to access whatever fd accessed. + */ + int lf_move_fd __P((int fd, int wantfd)); ++ ++#endif /* define _SCREEN_LOGFILE_H_ */ +--- screen-4.0.3-orig/mark.h Tue Jan 8 15:42:30 2002 ++++ screen-4.0.3/mark.h Fri Feb 27 18:38:02 2009 +@@ -21,6 +21,8 @@ + **************************************************************** + * $Id: mark.h,v 1.1.1.1 1993/06/16 23:51:13 jnweiger Exp $ FAU + */ ++#ifndef _SCREEN_MARK_H_ ++#define _SCREEN_MARK_H_ + + struct markdata + { +@@ -47,3 +49,4 @@ + #define W2D(y) ((y) - markdata->hist_offset) + #define D2W(y) ((y) + markdata->hist_offset) + ++#endif /* define _SCREEN_MARK_H_ */ +--- screen-4.0.3-orig/os.h Tue Jan 8 15:42:33 2002 ++++ screen-4.0.3/os.h Fri Feb 27 18:39:09 2009 +@@ -21,6 +21,8 @@ + **************************************************************** + * $Id: os.h,v 1.10 1994/05/31 12:32:22 mlschroe Exp $ FAU + */ ++#ifndef _SCREEN_OS_H_ ++#define _SCREEN_OS_H_ + + #include <stdio.h> + #include <errno.h> +@@ -531,3 +533,4 @@ + */ + #define IOSIZE 4096 + ++#endif /* define _SCREEN_OS_H_ */ +--- screen-4.0.3-orig/osdef.h.in Sat Apr 28 13:26:43 2001 ++++ screen-4.0.3/osdef.h.in Fri Feb 27 18:38:36 2009 +@@ -27,6 +27,8 @@ + * mangled the screen source through 'gcc -Wall'. + **************************************************************** + */ ++#ifndef _SCREEN_OSDEF_H_ ++#define _SCREEN_OSDEF_H_ + + extern int printf __P((char *, ...)); + extern int fprintf __P((FILE *, char *, ...)); +@@ -199,3 +201,4 @@ + extern int getloadavg(double *, int); + #endif + ++#endif /* define _SCREEN_OSDEF_H_ */ +--- screen-4.0.3-orig/patchlevel.h Mon Oct 23 13:04:11 2006 ++++ screen-4.0.3/patchlevel.h Fri Feb 27 18:40:53 2009 +@@ -523,6 +523,8 @@ + * (cstone & Rich Felker). + * -- DISTRIBUTED + */ ++#ifndef _SCREEN_PATCHLEVEL_H_ ++#define _SCREEN_PATCHLEVEL_H_ + + #define ORIGIN "FAU" + #define REV 4 +@@ -530,3 +532,5 @@ + #define PATCHLEVEL 3 + #define DATE "23-Oct-06" + #define STATE "" ++ ++#endif /* define _SCREEN_PATCHLEVEL_H_ */ +--- screen-4.0.3-orig/pty.c Mon Sep 8 14:26:18 2003 ++++ screen-4.0.3/pty.c Fri Feb 27 19:31:53 2009 +@@ -33,11 +33,6 @@ + # include <sys/ioctl.h> + #endif + +-/* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_SVR4_PTYS +-# include <sys/stropts.h> +-#endif +- + #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) + # include <sys/ttold.h> + #endif +--- screen-4.0.3-orig/sched.h Tue Jan 8 15:42:43 2002 ++++ screen-4.0.3/sched.h Fri Feb 27 19:39:49 2009 +@@ -21,6 +21,9 @@ + **************************************************************** + * $Id: sched.h,v 1.1.1.1 1993/06/16 23:51:13 jnweiger Exp $ FAU + */ ++#ifndef _SCREEN_SCHED_H_ ++#define _SCREEN_SCHED_H_ ++#include <sys/types.h> + + struct event + { +@@ -41,3 +44,5 @@ + #define EV_READ 1 + #define EV_WRITE 2 + #define EV_ALWAYS 3 ++ ++#endif /* define _SCREEN_SCHED_H_ */ +--- screen-4.0.3-orig/screen.h Fri Aug 22 12:28:43 2003 ++++ screen-4.0.3/screen.h Fri Feb 27 18:42:11 2009 +@@ -22,6 +22,9 @@ + * $Id: screen.h,v 1.12 1994/05/31 12:32:54 mlschroe Exp $ FAU + */ + ++#ifndef _SCREEN_SCREEN_H_ ++#define _SCREEN_SCREEN_H_ ++ + #include "os.h" + + #if defined(__STDC__) +@@ -293,3 +296,5 @@ + */ + #define WLIST_NUM 0 + #define WLIST_MRU 1 ++ ++#endif /* define _SCREEN_SCREEN_H_ */ +--- screen-4.0.3-orig/window.h Thu Aug 21 14:57:30 2003 ++++ screen-4.0.3/window.h Fri Feb 27 18:42:45 2009 +@@ -21,8 +21,9 @@ + **************************************************************** + * $Id: window.h,v 1.11 1994/05/31 12:33:27 mlschroe Exp $ FAU + */ ++#ifndef _SCREEN_WINDOW_H_ ++#define _SCREEN_WINDOW_H_ + +- + /* keep this in sync with the initialisations in window.c */ + struct NewWindow + { +@@ -315,3 +316,5 @@ + : &fore->w_mlines[y - fore->w_histheight]) + + #define Layer2Window(l) ((struct win *)(l)->l_bottom->l_data) ++ ++#endif /* define _SCREEN_WINDOW_H_ */ diff --git a/extra/tiff/APKBUILD b/extra/tiff/APKBUILD new file mode 100644 index 0000000000..c580a84a30 --- /dev/null +++ b/extra/tiff/APKBUILD @@ -0,0 +1,26 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Michael Mason <ms13sp@gmail.com> +pkgname=tiff +pkgver=3.8.2 +pkgrel=0 +pkgdesc="Provides support for the Tag Image File Format or TIFF" +url="http://www.libtiff.org/" +license="GPL" +depends="uclibc" +subpackages="$pkgname-doc $pkgname-dev" +source="ftp://ftp.remotesensing.org/pub/lib$pkgname/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-cxx + make || return 1 + make DESTDIR="$pkgdir" install + +} + +md5sums="fbb6f446ea4ed18955e2714934e5b698 tiff-3.8.2.tar.gz" diff --git a/extra/tinyproxy/APKBUILD b/extra/tinyproxy/APKBUILD new file mode 100644 index 0000000000..046daa8307 --- /dev/null +++ b/extra/tinyproxy/APKBUILD @@ -0,0 +1,40 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +# Maintainer: Michael Mason <ms13sp@gmail.com> +pkgname=tinyproxy +pkgver=1.6.3 +pkgrel=0 +pkgdesc="Lightweight HTTP proxy" +url="https://www.banu.com/tinyproxy/" +license="GPL" +depends="uclibc" +makedepends="" +install="tinyproxy.install" +subpackages="$pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + tinyproxy.initd + $install + " + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # set default user to tinyproxy:tinyproxy and correct pidfile + sed -i -e 's:^User.*:User tinyproxy:' \ + -e 's:^Group.*:Group tinyproxy:' \ + -e 's:^PidFile.*:PidFile "/var/run/tinyproxy/tinyproxy.pid":' \ + doc/tinyproxy.conf + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + + make || return 1 + make DESTDIR="$pkgdir" install + mkdir -p "$pkgdir"/var/run/tinyproxy + install -Dm755 "$srcdir"/tinyproxy.initd "$pkgdir"/etc/init.d/tinyproxy +} + +md5sums="bd14d029b12621bcfd7ee71b2f4893da tinyproxy-1.6.3.tar.gz +554da6fc363fbe251f081b342541bef4 tinyproxy.initd +2f5d9f4a8b7f4c7f1f5b9d59d99839e4 tinyproxy.install" diff --git a/extra/tinyproxy/tinyproxy.initd b/extra/tinyproxy/tinyproxy.initd new file mode 100644 index 0000000000..bee5d041fb --- /dev/null +++ b/extra/tinyproxy/tinyproxy.initd @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy.initd,v 1.1 2008/02/16 07:11:25 mrness Exp $ + +CONFFILE="/etc/tinyproxy/${SVCNAME}.conf" + +depend() { + use logger dns + need net +} + +checkconfig() { + if [ ! -f "${CONFFILE}" ]; then + eerror "Configuration file ${CONFFILE} not found!" + return 1 + fi + + PIDFILE=$(sed -n -e 's/^[[:space:]]*PidFile[[:space:]]\+"\(.*\)"[[:space:]]*$/\1/p' "${CONFFILE}") + return 0 +} + +start() { + checkconfig || return 1 + + ebegin "Starting tinyproxy" + if [ -n "${PIDFILE}" ]; then + start-stop-daemon --start --pidfile "${PIDFILE}" --startas /usr/sbin/tinyproxy -- -c "${CONFFILE}" + else + start-stop-daemon --start --exec /usr/sbin/tinyproxy -- -c "${CONFFILE}" + fi + eend $? +} + +stop() { + checkconfig || return 1 + + ebegin "Stopping tinyproxy" + if [ -n "${PIDFILE}" ]; then + start-stop-daemon --stop --pidfile "${PIDFILE}" + else + start-stop-daemon --stop --exec /usr/sbin/tinyproxy + fi + eend $? +} diff --git a/extra/tinyproxy/tinyproxy.install b/extra/tinyproxy/tinyproxy.install new file mode 100644 index 0000000000..5fa366737b --- /dev/null +++ b/extra/tinyproxy/tinyproxy.install @@ -0,0 +1,13 @@ +#!/bin/sh + +case "$1" in + pre_install) + adduser -h /dev/null -s /bin/false -D tinyproxy 2>/dev/null + ;; + post_install) + chown tinyproxy:tinyproxy /var/run/tinyproxy + ;; +esac + +# return with success even if user already exist +exit 0 diff --git a/testing/device-mapper/APKBUILD b/testing/device-mapper/APKBUILD new file mode 100644 index 0000000000..aaca6808fe --- /dev/null +++ b/testing/device-mapper/APKBUILD @@ -0,0 +1,26 @@ +# Contributor: Leonardo Arena <rnalrd@gmail.com> +# Maintainer: Leonardo Arena <rnalrd@gmail.com> +pkgname=device-mapper +pkgver=1.02.28 +pkgrel=0 +pkgdesc="Device mapper ioctl library" +url="http://sources.redhat.com/pub/dm/" +license="GPL-2" +depends="uclibc" +makedepends="" +install= +subpackages="$pkgname-doc $pkgname-dev" +source="ftp://sources.redhat.com/pub/dm/$pkgname.$pkgver.tgz" + +build() { + cd "$srcdir/$pkgname.$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make || return 1 + make DESTDIR="$pkgdir" install +} + +md5sums="c9ae0776994a419f9e1ba842164bb626 device-mapper.1.02.28.tgz" diff --git a/testing/fetch-crl/APKBUILD b/testing/fetch-crl/APKBUILD index 5d1bf5d945..cd4f18c170 100644 --- a/testing/fetch-crl/APKBUILD +++ b/testing/fetch-crl/APKBUILD @@ -2,25 +2,28 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=fetch-crl pkgver=2.7.0 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to keep Certificate Revocation Lists (CRLs) up-to-date" url="http://dist.eugridpma.info/distribution/util/fetch-crl/" license="custom" subpackages="$pkgname-doc" source=" http://dist.eugridpma.info/distribution/util/$pkgname/$pkgname-$pkgver.tar.gz + $pkgname-2.7.0-bb-wget.patch " build() { cd "$srcdir/$pkgname-$pkgver" - sed -i -e 's:etc/sysconfig:etc/conf.d:g' \ + sed -i -e 's:etc/sysconfig:etc/fetch-crl:g' \ edg-fetch-crl fetch-crl.cron fetch-crl.8 sed -i -e 's:bin/bash:bin/sh:' fetch-crl.cron + patch -p1 -i "$srcdir"/$pkgname-2.7.0-bb-wget.patch || return 1 + _r=$pkgname-$pkgver install -m755 -D edg-fetch-crl "$pkgdir"/usr/sbin/fetch-crl - install -m644 -D fetch-crl.sysconfig "$pkgdir"/etc/conf.d/fetch-crl + install -m644 -D fetch-crl.sysconfig "$pkgdir"/etc/fetch-crl/fetch-crl install -m644 -D fetch-crl.8 "$pkgdir"/usr/share/man/man8/fetch-crl.8 install -m644 -D README "$pkgdir"/usr/share/doc/$_r/README @@ -28,4 +31,5 @@ build() { install -m755 -D fetch-crl.cron "$pkgdir"/usr/share/doc/$_r/fetch-crl.periodic } -md5sums="6b0ba042ac3d155f1cd9c7b0baf3c708 fetch-crl-2.7.0.tar.gz" +md5sums="6b0ba042ac3d155f1cd9c7b0baf3c708 fetch-crl-2.7.0.tar.gz +613e4987db52cbd231cd4d7a46070d74 fetch-crl-2.7.0-bb-wget.patch" diff --git a/testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch b/testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch new file mode 100644 index 0000000000..48fa7457e5 --- /dev/null +++ b/testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch @@ -0,0 +1,41 @@ +--- fetch-crl-2.7.0/edg-fetch-crl.orig 2009-02-26 08:54:17 +0000 ++++ fetch-crl-2.7.0/edg-fetch-crl 2009-02-26 09:20:27 +0000 +@@ -94,8 +94,8 @@ + allWarnings=no # warnings follow verbosity + + # get defaults +-WGET_RETRIES=2 +-WGET_TIMEOUT=10 ++#WGET_RETRIES=2 ++#WGET_TIMEOUT=10 + FETCH_CRL_SYSCONFIG="${FETCH_CRL_SYSCONFIG:-/etc/fetch-crl/fetch-crl}" + + # specific work-around for incidental filesystem corruption +@@ -149,7 +149,15 @@ + fi + + # add the other default arguments +- wgetOptions="${wgetOptions} -t $WGET_RETRIES -T $WGET_TIMEOUT " ++ if [ -n "$WGET_RETRIES" ]; then ++ wgetOptions="${wgetOptions} -t $WGET_RETRIES " ++ fi ++ if [ -n "$WGET_TIMEOUT" ]; then ++ wgetOptions="${wgetOptions} -T $WGET_TIMEOUT " ++ fi ++ if [ -n "$WGET_TIMESTAMPING" ] && [ "$WGET_TIMESTAMPING" != "no" ]; then ++ wgetOptions="${wgetOptions} -N " ++ fi + + # only add "-q" if the extra options do not have a -v. They are exclusive + expr match "${wgetAdditionalOptions}" '.*-v' >/dev/null 2>&1 +@@ -175,8 +183,8 @@ + ${rm} -f "${cacheDirectory}/${hash}/pre" + ${cp} "${cacheDirectory}/${hash}/"* \ + "${cacheDirectory}/${hash}/pre" >/dev/null 2>&1 +- PrintDebug ${wget} ${wgetOptions} -N -P "${cacheDirectory}/${hash}" "${url}" +- ${wget} ${wgetOptions} -N -P "${cacheDirectory}/${hash}" "${url}" ++ PrintDebug ${wget} ${wgetOptions} -P "${cacheDirectory}/${hash}" "${url}" ++ ${wget} ${wgetOptions} -P "${cacheDirectory}/${hash}" "${url}" + rc=$? + if [ $rc -ne 0 ]; then + PrintWarning "RetrieveFileByURL: wget download error $rc for ${url}" diff --git a/testing/freeswitch/APKBUILD b/testing/freeswitch/APKBUILD new file mode 100644 index 0000000000..ebb8cb3dd2 --- /dev/null +++ b/testing/freeswitch/APKBUILD @@ -0,0 +1,68 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +pkgname=freeswitch +pkgver=1.0.3 +pkgrel=0 +pkgdesc="A communications platform written in C from the ground up" +url="http://www.freeswitch.org" +license="GPL" +depends="" +makedepends="uclibc++-dev curl-dev unixodbc-dev zlib-dev openssl-dev + autoconf automake libtool" +install= +subpackages="$pkgname-dev" +source="http://files.freeswitch.org/freeswitch-1.0.3.tar.gz + modules.conf + freeswitch-1.0.3-libtool22-2.patch + freeswitch-1.0.3-parallel-build.patch + " + +build() { + cd "$srcdir/$pkgname-$pkgver" + for i in ../*.patch; do + msg "Appling $i..." + patch -p1 < $i || return 1 + done + cp -f "$srcdir/modules.conf" modules.conf || return 1 + + aclocal || return 1 + autoconf || return 1 + automake --add-missing || return 1 + autoheader || return 1 + libtoolize || return 1 + + export CXX=g++-uc + # i think our max cmd len is 32768 + # by specifying it here we save our selves from some CPU cycles + export lt_cv_sys_max_cmd_len=8192 + + ./configure --prefix=/usr \ + --sysconfdir=/etc/freeswitch \ + --with-modinstdir=/usr/lib/freeswitch \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + + # check how/when parallel builds are fixed here: + # http://jira.freeswitch.org/browse/FSBUILD-6 + + # build the libs and prerequisites in parallel first + make libs/apr/libapr-1.la \ + libs/apr-util/libaprutil-1.la \ + libs/speex/libspeex/libspeexdsp.la \ + libs/sqlite/libsqlite3.la \ + libs/pcre/libpcre.la \ + libs/srtp/libsrtp.la \ + src/include/switch_version.h + + # then the rest should build in parallel too + make || return 1 + make -j1 DESTDIR="$pkgdir" install + + # TODO: make and test init.d scripts + # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="9352e159b6067ce15afe50ba45c40df7 freeswitch-1.0.3.tar.gz +c05f2356be159e99b3845f5260a33599 modules.conf +c9dc93ce5cf13b4bc9ca620131709671 freeswitch-1.0.3-libtool22-2.patch +5bd0c33cbd2a0a0ea4c12c0e1083e3a2 freeswitch-1.0.3-parallel-build.patch" diff --git a/testing/freeswitch/freeswitch-1.0.3-libtool22-2.patch b/testing/freeswitch/freeswitch-1.0.3-libtool22-2.patch new file mode 100644 index 0000000000..f36fa45f6e --- /dev/null +++ b/testing/freeswitch/freeswitch-1.0.3-libtool22-2.patch @@ -0,0 +1,240 @@ +This is cooked version of: +5. Text File fs-r11674-libtool22-2.patch (14 kB) +http://jira.freeswitch.org/browse/FSBUILD-82 + +Index: libs/apr/build/config.sub +=================================================================== +--- a/libs/apr/build/config.sub (revision 11675) ++++ b/libs/apr/build/config.sub (working copy) +@@ -1,10 +1,9 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +-# Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +-timestamp='2006-07-02' ++timestamp='2005-12-11' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -241,7 +240,7 @@ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +@@ -249,8 +248,7 @@ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | m32c | m32r | m32rle | m68000 | m68k | m88k \ +- | maxq | mb | microblaze | mcore \ ++ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +@@ -270,17 +268,16 @@ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ +- | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ +- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ +- | spu | strongarm \ ++ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ ++ | sparcv8 | sparcv9 | sparcv9b \ ++ | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ +@@ -288,6 +285,9 @@ + | z8k) + basic_machine=$basic_machine-unknown + ;; ++ m32c) ++ basic_machine=$basic_machine-unknown ++ ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown +@@ -317,7 +317,7 @@ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* | avr32-* \ ++ | avr-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ +@@ -328,7 +328,7 @@ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | m32c-* | m32r-* | m32rle-* \ ++ | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ +@@ -350,18 +350,17 @@ + | mmix-* \ + | mt-* \ + | msp430-* \ +- | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ ++ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ +- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ +@@ -372,6 +371,8 @@ + | ymp-* \ + | z8k-*) + ;; ++ m32c-*) ++ ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) +@@ -817,12 +818,6 @@ + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; +- pc98) +- basic_machine=i386-pc +- ;; +- pc98-*) +- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` +- ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; +@@ -1125,7 +1120,7 @@ + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; +- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) ++ sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) +@@ -1198,8 +1193,7 @@ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ +- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ +- | -openbsd* | -solidbsd* \ ++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ +@@ -1214,7 +1208,7 @@ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku* | -rdos* | -toppers*) ++ | -skyos* | -haiku* | -rdos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1366,9 +1360,6 @@ + # system, and we'll never get to this point. + + case $basic_machine in +- spu-*) +- os=-elf +- ;; + *-acorn) + os=-riscix1.2 + ;; +@@ -1378,9 +1369,9 @@ + arm*-semi) + os=-aout + ;; +- c4x-* | tic4x-*) +- os=-coff +- ;; ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 +Index: build/modmake.rules.in +=================================================================== +--- a/build/modmake.rules.in (revision 11675) ++++ b/build/modmake.rules.in (working copy) +@@ -10,7 +10,7 @@ + INSTALL=@INSTALL@ + GETLIB=@GETLIB@ + LIBTOOL=@LIBTOOL@ +-LTINSTALL=$(LIBTOOL) --mode=install $(INSTALL) ++LTINSTALL=$(LIBTOOL) --quiet --mode=install $(INSTALL) + LTUNINSTALL=$(LIBTOOL) --mode=uninstall rm -f + CCLD = $(CC) + CXXLD = $(CXX) +@@ -29,7 +29,8 @@ + DYLD_LIBRARY_PATH=@libdir@:$DYLD_LIBRARY_PATH + LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH + OSARCH=`uname -s` +-DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@ ++DYNAMIC_LIB_EXTEN = la ++#DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@ + SOLINK = @SOLINK@ + + LDFLAGS=@SWITCH_AM_LDFLAGS@ @LDFLAGS@ $(OUR_LDFLAGS) +@@ -39,11 +40,11 @@ + + COMPILE = $(CC) $(ALL_CFLAGS) $(DEFS) + LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE) +-LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(ALL_CFLAGS) $(LDFLAGS) -o $@ ++LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(ALL_CFLAGS) $(LDFLAGS) -shared -module -avoid-version -rpath $(MODINSTDIR) -o $@ + + CXXCOMPILE = $(CXX) $(ALL_CXXFLAGS) $(DEFS) + LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXXCOMPILE) +-CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ ++CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) -shared -module -avoid-version -rpath $(MODINSTDIR) -o $@ + + CSOURCEFILE=$(MODNAME).c + CXXSOURCEFILE=$(MODNAME).cpp +@@ -107,14 +108,14 @@ + exit 1 ;\ + fi + +-$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(OUR_OBJS) $(SOURCEFILE) $(MODNAME).o ++$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(OUR_OBJS) $(SOURCEFILE) $(MODNAME).lo + @echo Creating $@... + @test -d .libs || mkdir .libs + @error="";\ + if test -f $(CSOURCEFILE); then \ +- $(LINK) $(SOLINK) $(MODNAME).o $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\ ++ $(LINK) $(SOLINK) $(MODNAME).lo $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\ + else \ +- $(CXXLINK) $(SOLINK) $(MODNAME).o $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\ ++ $(CXXLINK) $(SOLINK) $(MODNAME).lo $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\ + fi; + + mod_clean: diff --git a/testing/freeswitch/freeswitch-1.0.3-parallel-build.patch b/testing/freeswitch/freeswitch-1.0.3-parallel-build.patch new file mode 100644 index 0000000000..1e95243931 --- /dev/null +++ b/testing/freeswitch/freeswitch-1.0.3-parallel-build.patch @@ -0,0 +1,11 @@ +--- freeswitch-1.0.3/build/modmake.rules.in.orig 2009-03-04 12:58:46.000000000 +0000 ++++ freeswitch-1.0.3/build/modmake.rules.in 2009-03-04 12:59:10.000000000 +0000 +@@ -57,7 +57,7 @@ + RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi ` + RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) ` + RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) ` +-RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \ ++RECURSE_MAKE=+modname="$(RECURSE_MODNAME)" ; \ + sourcefile="$(RECURSE_SOURCEFILE)" ; \ + osarch=`uname -s` ; \ + ourdefs="$(RECURSE_OUR_DEPS)" ; \ diff --git a/testing/freeswitch/modules.conf b/testing/freeswitch/modules.conf new file mode 100644 index 0000000000..c6f5a05de8 --- /dev/null +++ b/testing/freeswitch/modules.conf @@ -0,0 +1,75 @@ +loggers/mod_console +loggers/mod_logfile +loggers/mod_syslog +applications/mod_commands +applications/mod_conference +applications/mod_dptools +applications/mod_enum +applications/mod_fifo +#applications/mod_fax +applications/mod_voicemail +#applications/mod_lcr +applications/mod_limit +applications/mod_expr +applications/mod_esf +#applications/mod_easyroute +applications/mod_fsv +#applications/mod_soundtouch +#applications/mod_rss +#applications/mod_snom +#applications/mod_vmd +#asr_tts/mod_flite +#asr_tts/mod_pocketsphinx +#asr_tts/mod_cepstral +codecs/mod_g723_1 +codecs/mod_amr +#codecs/mod_amrwb +codecs/mod_g729 +codecs/mod_h26x +codecs/mod_voipcodecs +codecs/mod_ilbc +codecs/mod_speex +#codecs/mod_siren +#codecs/mod_celt +#codecs/mod_dahdi_codec +#dialplans/mod_dialplan_directory +dialplans/mod_dialplan_xml +dialplans/mod_dialplan_asterisk +#directories/mod_ldap +#endpoints/mod_dingaling +endpoints/mod_iax +#endpoints/mod_portaudio +endpoints/mod_sofia +endpoints/mod_loopback +#endpoints/mod_alsa +#endpoints/mod_opal +#../../libs/openzap/mod_openzap +#event_handlers/mod_event_multicast +event_handlers/mod_event_socket +event_handlers/mod_cdr_csv +#event_handlers/mod_radius_cdr +formats/mod_native_file +formats/mod_sndfile +#formats/mod_shout +formats/mod_local_stream +formats/mod_tone_stream +#languages/mod_python +#languages/mod_spidermonkey +#languages/mod_spidermonkey_teletone +#languages/mod_spidermonkey_core_db +#languages/mod_spidermonkey_socket +#languages/mod_spidermonkey_odbc +languages/mod_lua +#languages/mod_perl +#languages/mod_yaml +#xml_int/mod_xml_rpc +#xml_int/mod_xml_curl +#xml_int/mod_xml_cdr +#xml_int/mod_xml_ldap +say/mod_say_en +#say/mod_say_de +#say/mod_say_es +#say/mod_say_fr +#say/mod_say_it +#say/mod_say_nl +#say/mod_say_zh diff --git a/testing/hylafax/APKBUILD b/testing/hylafax/APKBUILD new file mode 100644 index 0000000000..8c10c50448 --- /dev/null +++ b/testing/hylafax/APKBUILD @@ -0,0 +1,79 @@ +# Contributor: Cameron Banta <cbanta@gmail.com> +# Maintainer: Cameron Banta <cbanta@gmail.com> +pkgname=hylafax +pkgver=4.4.4 +pkgrel=0 +pkgdesc="Sends and receives faxes" +url="http://www.hylafax.org/" +license="See COPYING" +#depends on gcc for libgcc_s.so, it's scripts are hardcoded to bash +depends="uclibc uclibc++ zlib tiff ghostscript bash gcc" +makedepends="zlib-dev tiff-dev" +install="hylafax.install" +subpackages="$pkgname-doc" +source="ftp://ftp.hylafax.org/source/$pkgname-$pkgver.tar.gz + $install + " + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # Patch configure c++ problem + sed -i -e 's:"iostream.h":<iostream>\n using namespace std;:g' \ + configure + + + ./configure --nointeractive --disable-pam \ + --with-CXX=/usr/bin/g++-uc \ + --with-DIR_BIN=/usr/bin \ + --with-DIR_SBIN=/usr/sbin \ + --with-DIR_LIB=/usr/lib \ + --with-DIR_LIBEXEC=/usr/sbin \ + --with-DIR_LIBDATA=/var/spool/"$pkgname"/lib \ + --with-DIR_LOCKS=/var/lock \ + --with-DIR_MAN=/usr/share/man \ + --with-DIR_SPOOL=/var/spool/"$pkgname" \ + --with-DIR_HTML=/usr/share/doc/"$pkgname"/html \ + --with-PATH_IMPRIP="" \ + --with-SYSVINIT=no \ + --with-REGEX=yes \ + --with-LIBTIFF="-ltiff -lz" \ + --with-DSO=auto \ + --with-PATH_EGETTY=/bin/false \ + --with-PATH_VGETTY=/bin/false \ + || return 1 + make || return 1 + + # this makefile has issues installing, it doesn't use the standard + # install - but the following seems to work + mkdir -p "${pkgdir}"/usr/bin "${pkgdir}"/usr/sbin + mkdir -p "${pkgdir}"/usr/lib/"$pkgname" "${pkgdir}"/usr/share/man + mkdir -p "${pkgdir}"/var/spool/"$pkgname" + chown uucp:uucp "${pkgdir}"/var/spool/"$pkgname" + chmod 0600 "${pkgdir}"/var/spool/"$pkgname" + + make \ + BIN="${pkgdir}/usr/bin" \ + SBIN="${pkgdir}/usr/sbin" \ + LIBDIR="${pkgdir}/usr/lib" \ + LIB="${pkgdir}/usr/lib" \ + LIBEXEC="${pkgdir}/usr/sbin" \ + LIBDATA="${pkgdir}/usr/lib/$pkgname" \ + MAN="${pkgdir}/usr/share/man" \ + SPOOL="${pkgdir}/var/spool/$pkgname" \ + HTMLDIR="${pkgdir}/usr/share/doc/$pkgname/html" \ + install || return 1 + + + install -m644 -D "$srcdir/$pkgname-$pkgver/COPYRIGHT" \ + "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT + install -m644 -D "$srcdir/$pkgname-$pkgver/README" \ + "$pkgdir"/usr/share/doc/$pkgname/README + + + # init.d script is created by faxsetup + # - which the user runs after install +} + +md5sums="4beb3d438ca6c4f00f1d94f9643e6668 hylafax-4.4.4.tar.gz +bd8760735baeb618b8bd6d6488bb91ac hylafax.install" diff --git a/testing/hylafax/hylafax.install b/testing/hylafax/hylafax.install new file mode 100644 index 0000000000..6e80da2825 --- /dev/null +++ b/testing/hylafax/hylafax.install @@ -0,0 +1,31 @@ +#!/bin/sh + +case "$1" in + pre_install) + # add something which happends before install + # $2 contains package version + ;; + post_install) + # add something which happends after install + # $2 contains package version + echo Please run faxsetup to configure hylafax + ;; + pre_upgrade) + # add something which happends before update + # $2 contains new package version + # $3 contains old package version + ;; + post_upgrade) + # add something which happends after update + # $2 contains new package version + # $3 contains old package version + ;; + pre_deinstall) + # add something which happends before delete + # $2 contains package version + ;; + post_deinstall) + # add something which happends after delete + # $2 contains package version + ;; +esac |
