From 3c423ce17e1511f7b71c05e0f53c5ebc93bd266d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 27 Nov 2012 23:24:42 +0000 Subject: refresh patches --- debian/patches/exec_filename_exec.patch | 4 +- debian/patches/exec_filename_fs.patch | 2 +- debian/patches/ext2fs_large_stores.patch | 58 ++++++------- debian/patches/ext2fs_large_stores_pthread.patch | 105 +++++++---------------- debian/patches/external.patch | 22 ++--- debian/patches/init_try_runsystem.gnu.patch | 68 ++------------- debian/patches/libdde_workqueue.patch | 16 ++-- debian/patches/libports_stability.patch | 12 +-- debian/patches/pfinet_dhcp.patch | 48 +++++------ debian/patches/posix-sigcodes.patch | 4 +- debian/patches/proxy-defpager.diff | 25 +++--- debian/patches/series | 18 ++-- 12 files changed, 146 insertions(+), 236 deletions(-) diff --git a/debian/patches/exec_filename_exec.patch b/debian/patches/exec_filename_exec.patch index 3a4e0357..41b66a82 100644 --- a/debian/patches/exec_filename_exec.patch +++ b/debian/patches/exec_filename_exec.patch @@ -312,8 +312,8 @@ Index: hurd-debian/exec/Makefile $(gzip-objects) $(bzip2-objects) gzip-sources = unzip.c util.c inflate.c gzip-objects = $(gzip-sources:%.c=%.o) -@@ -36,6 +36,7 @@ - HURDLIBS = trivfs fshelp iohelp threads ports ihash shouldbeinlibc +@@ -37,6 +37,7 @@ + OTHERLIBS = -lpthread exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h +exec_experimental-MIGSFLAGS = -imacros $(srcdir)/execmutations.h diff --git a/debian/patches/exec_filename_fs.patch b/debian/patches/exec_filename_fs.patch index 276a8ae5..e41382e5 100644 --- a/debian/patches/exec_filename_fs.patch +++ b/debian/patches/exec_filename_fs.patch @@ -682,7 +682,7 @@ Index: hurd-debian/trans/fakeroot.c This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -28,6 +28,9 @@ - #include + #include #include #include +#ifdef HAVE_FILE_EXEC_FILE_NAME diff --git a/debian/patches/ext2fs_large_stores.patch b/debian/patches/ext2fs_large_stores.patch index 86180a08..f65ec760 100644 --- a/debian/patches/ext2fs_large_stores.patch +++ b/debian/patches/ext2fs_large_stores.patch @@ -139,7 +139,7 @@ Index: hurd-debian/ext2fs/balloc.c for (k = 0; k < groups_count; k++) { @@ -267,7 +272,8 @@ - spin_unlock (&global_lock); + pthread_spin_unlock (&global_lock); return 0; } - bh = bptr (gdp->bg_block_bitmap); @@ -155,7 +155,7 @@ Index: hurd-debian/ext2fs/balloc.c + disk_cache_block_deref (bh); + bh = 0; ext2_error ("free blocks count corrupted for block group %d", i); - spin_unlock (&global_lock); + pthread_spin_unlock (&global_lock); return 0; } @@ -218,7 +218,7 @@ Index: hurd-debian/ext2fs/balloc.c sync_out: + assert (! bh); - spin_unlock (&global_lock); + pthread_spin_unlock (&global_lock); alloc_sync (0); @@ -390,9 +405,12 @@ @@ -312,7 +312,7 @@ Index: hurd-debian/ext2fs/ext2fs.h #include +#include #include - #include + #include #include @@ -195,6 +197,8 @@ /* ---------------------------------------------------------------- */ @@ -697,7 +697,7 @@ Index: hurd-debian/ext2fs/ialloc.c - ext2_debug ("freeing inode %u", inum); + ext2_debug ("freeing inode %Lu", inum); - spin_lock (&global_lock); + pthread_spin_lock (&global_lock); @@ -75,22 +75,25 @@ bit = (inum - 1) % sblock->s_inodes_per_group; @@ -724,7 +724,7 @@ Index: hurd-debian/ext2fs/ialloc.c + disk_cache_block_deref (bh); sblock_dirty = 1; - spin_unlock (&global_lock); + pthread_spin_unlock (&global_lock); alloc_sync(0); @@ -111,14 +114,15 @@ ino_t @@ -736,7 +736,7 @@ Index: hurd-debian/ext2fs/ialloc.c struct ext2_group_desc *gdp; struct ext2_group_desc *tmp; - spin_lock (&global_lock); + pthread_spin_lock (&global_lock); -repeat: + repeat: @@ -783,7 +783,7 @@ Index: hurd-debian/ext2fs/ialloc.c sync_out: + assert (! bh); - spin_unlock (&global_lock); + pthread_spin_unlock (&global_lock); alloc_sync (0); + /* Make sure the coming read_node won't complain about bad @@ -829,12 +829,12 @@ Index: hurd-debian/ext2fs/ialloc.c "stored = %d, counted = %lu", Index: hurd-debian/ext2fs/inode.c =================================================================== ---- hurd-debian.orig/ext2fs/inode.c 2012-07-10 01:36:36.000000000 +0000 -+++ hurd-debian/ext2fs/inode.c 2012-07-10 01:39:22.000000000 +0000 +--- hurd-debian.orig/ext2fs/inode.c 2012-11-26 00:23:28.000000000 +0000 ++++ hurd-debian/ext2fs/inode.c 2012-11-26 00:24:49.000000000 +0000 @@ -92,7 +92,7 @@ dn->dir_idx = 0; dn->pager = 0; - rwlock_init (&dn->alloc_lock); + pthread_rwlock_init (&dn->alloc_lock, NULL); - pokel_init (&dn->indir_pokel, diskfs_disk_pager, disk_image); + pokel_init (&dn->indir_pokel, diskfs_disk_pager, disk_cache); @@ -1040,10 +1040,10 @@ Index: hurd-debian/ext2fs/pager.c -/* Mapped image of the disk. */ -void *disk_image; - - spin_lock_t node_to_page_lock = SPIN_LOCK_INITIALIZER; + pthread_spinlock_t node_to_page_lock = PTHREAD_SPINLOCK_INITIALIZER; - #ifdef DONT_CACHE_MEMORY_OBJECTS -@@ -163,6 +164,9 @@ + +@@ -165,6 +166,9 @@ block_t pending_blocks = 0; int num_pending_blocks = 0; @@ -1745,10 +1745,10 @@ Index: hurd-debian/ext2fs/pokel.c struct poke *pl, *pokes, *last = NULL; - + - spin_lock (&pokel->lock); + pthread_spin_lock (&pokel->lock); pokes = pokel->pokes; pokel->pokes = NULL; - spin_unlock (&pokel->lock); + pthread_spin_unlock (&pokel->lock); for (pl = pokes; pl; last = pl, pl = pl->next) - if (sync) @@ -1900,8 +1900,8 @@ Index: hurd-debian/libdiskfs/disk-pager.c + int may_cache, int notify_on_evict, size_t size, void **image) { - error_t err; -@@ -58,7 +59,8 @@ + pthread_t thread; +@@ -68,7 +69,8 @@ /* Create the pager. */ diskfs_disk_pager = pager_create (upi, pager_bucket, @@ -1927,15 +1927,15 @@ Index: hurd-debian/libdiskfs/diskfs-pager.h extern struct pager *diskfs_disk_pager; Index: hurd-debian/libpager/data-request.c =================================================================== ---- hurd-debian.orig/libpager/data-request.c 2012-07-10 01:33:11.000000000 +0000 -+++ hurd-debian/libpager/data-request.c 2012-07-10 01:39:22.000000000 +0000 +--- hurd-debian.orig/libpager/data-request.c 2012-11-26 00:23:28.000000000 +0000 ++++ hurd-debian/libpager/data-request.c 2012-11-26 00:24:49.000000000 +0000 @@ -40,11 +40,11 @@ if (!p) return EOPNOTSUPP; - /* Acquire the right to meddle with the pagemap */ + /* Acquire the right to meddle with the pagemap. */ - mutex_lock (&p->interlock); + pthread_mutex_lock (&p->interlock); _pager_wait_for_seqno (p, seqno); - /* sanity checks -- we don't do multi-page requests yet. */ @@ -1951,12 +1951,12 @@ Index: hurd-debian/libpager/data-request.c + write_lock ? VM_PROT_WRITE : VM_PROT_NONE, + p->notify_on_evict ? 1 : 0, MACH_PORT_NULL); - mutex_lock (&p->interlock); + pthread_mutex_lock (&p->interlock); _pager_mark_object_error (p, offset, length, 0); Index: hurd-debian/libpager/data-return.c =================================================================== ---- hurd-debian.orig/libpager/data-return.c 2012-07-10 01:33:11.000000000 +0000 -+++ hurd-debian/libpager/data-return.c 2012-07-10 01:39:22.000000000 +0000 +--- hurd-debian.orig/libpager/data-return.c 2012-11-26 00:23:28.000000000 +0000 ++++ hurd-debian/libpager/data-return.c 2012-11-26 00:24:49.000000000 +0000 @@ -39,6 +39,7 @@ struct pager *p; short *pm_entries; @@ -2067,12 +2067,12 @@ Index: hurd-debian/libpager/data-return.c } @@ -198,10 +226,29 @@ if (wakeup) - condition_broadcast (&p->wakeup); + pthread_cond_broadcast (&p->wakeup); + notify: _pager_allow_termination (p); - - mutex_unlock (&p->interlock); + pthread_mutex_unlock (&p->interlock); + for (i = 0; i < npages; i++) + { @@ -2216,11 +2216,11 @@ Index: hurd-debian/storeio/pager.c + 1, MEMORY_OBJECT_COPY_DELAY, 0); if (dev->pager == NULL) { - mutex_unlock (&dev->pager_lock); + pthread_mutex_unlock (&dev->pager_lock); Index: hurd-debian/tmpfs/pager-stubs.c =================================================================== ---- hurd-debian.orig/tmpfs/pager-stubs.c 2012-07-10 01:33:12.000000000 +0000 -+++ hurd-debian/tmpfs/pager-stubs.c 2012-07-10 01:39:22.000000000 +0000 +--- hurd-debian.orig/tmpfs/pager-stubs.c 2012-11-26 00:23:28.000000000 +0000 ++++ hurd-debian/tmpfs/pager-stubs.c 2012-11-26 00:24:49.000000000 +0000 @@ -57,6 +57,14 @@ return EIEIO; } diff --git a/debian/patches/ext2fs_large_stores_pthread.patch b/debian/patches/ext2fs_large_stores_pthread.patch index 88b376b6..d4108381 100644 --- a/debian/patches/ext2fs_large_stores_pthread.patch +++ b/debian/patches/ext2fs_large_stores_pthread.patch @@ -4,20 +4,23 @@ Date: Mon Sep 3 22:19:16 2012 +0200 Move large storage patch to pthreads -diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h -index 71fba04..8cd8c5a 100644 ---- a/ext2fs/ext2fs.h -+++ b/ext2fs/ext2fs.h -@@ -260,7 +260,7 @@ extern hurd_ihash_t disk_cache_bptr; +Index: hurd-debian/ext2fs/ext2fs.h +=================================================================== +--- hurd-debian.orig/ext2fs/ext2fs.h 2012-11-26 00:24:49.000000000 +0000 ++++ hurd-debian/ext2fs/ext2fs.h 2012-11-26 00:24:58.000000000 +0000 +@@ -260,9 +260,9 @@ /* Metadata about cached block. */ extern struct disk_cache_info *disk_cache_info; /* Lock for these mappings */ -extern struct mutex disk_cache_lock; +extern pthread_mutex_t disk_cache_lock; /* Fired when a re-association is done. */ - extern struct condition disk_cache_reassociation; +-extern struct condition disk_cache_reassociation; ++extern pthread_cond_t disk_cache_reassociation; -@@ -345,9 +345,9 @@ EXT2FS_EI char * + void *disk_cache_block_ref (block_t block); + void disk_cache_block_ref_ptr (void *ptr); +@@ -345,9 +345,9 @@ boffs_ptr (off_t offset) { block_t block = boffs_block (offset); @@ -96,25 +99,30 @@ index 2bec88d..67c9922 100644 } /* Satisfy a pager read request for either the disk pager or file pager -@@ -835,7 +835,7 @@ struct disk_cache_info *disk_cache_info; +@@ -836,9 +836,9 @@ /* Hint index for which cache block to reuse next. */ int disk_cache_hint; /* Lock for these structures. */ -struct mutex disk_cache_lock; +pthread_mutex_t disk_cache_lock; /* Fired when a re-association is done. */ - struct condition disk_cache_reassociation; +-struct condition disk_cache_reassociation; ++pthread_cond_t disk_cache_reassociation; -@@ -847,7 +847,7 @@ disk_cache_init (void) + /* Finish mapping initialization. */ + static void +@@ -848,8 +848,8 @@ ext2_panic ("Block size %d != vm_page_size %d", block_size, vm_page_size); - mutex_init (&disk_cache_lock); +- condition_init (&disk_cache_reassociation); + pthread_mutex_init (&disk_cache_lock, NULL); - condition_init (&disk_cache_reassociation); ++ pthread_cond_init (&disk_cache_reassociation, NULL); /* Allocate space for block num -> in-memory pointer mapping. */ -@@ -904,7 +904,7 @@ disk_cache_return_unused (void) + if (hurd_ihash_create (&disk_cache_bptr, HURD_IHASH_NO_LOCP)) +@@ -905,7 +905,7 @@ /* Return unused pages that are in core. */ int pending_begin = -1, pending_end = -1; @@ -157,16 +165,18 @@ index 2bec88d..67c9922 100644 bptr = hurd_ihash_find (disk_cache_bptr, block); if (bptr) -@@ -971,7 +971,7 @@ disk_cache_block_ref (block_t block) +@@ -971,8 +971,8 @@ + if (disk_cache_info[index].flags & DC_UNTOUCHED) { /* Wait re-association to finish. */ - condition_wait (&disk_cache_reassociation, &disk_cache_lock); +- condition_wait (&disk_cache_reassociation, &disk_cache_lock); - mutex_unlock (&disk_cache_lock); ++ pthread_cond_wait (&disk_cache_reassociation, &disk_cache_lock); + pthread_mutex_unlock (&disk_cache_lock); #if 0 printf ("Re-association -- wait finished.\n"); -@@ -991,7 +991,7 @@ disk_cache_block_ref (block_t block) +@@ -992,7 +992,7 @@ disk_cache_info[index].ref_count, disk_cache_info[index].flags, bptr); @@ -249,7 +259,7 @@ index 2bec88d..67c9922 100644 /* Prepare next time association of this page to succeed. */ pager_flush_some (diskfs_disk_pager, bptr - disk_cache, -@@ -1124,7 +1124,7 @@ disk_cache_block_ref (block_t block) +@@ -1124,10 +1124,10 @@ disk_cache_block_ref (block_t block) /* Try again. */ return disk_cache_block_ref (block); /* tail recursion */ } @@ -257,8 +267,12 @@ index 2bec88d..67c9922 100644 + pthread_mutex_unlock (&disk_cache_lock); /* Re-association was successful. */ - condition_broadcast (&disk_cache_reassociation); -@@ -1138,7 +1138,7 @@ disk_cache_block_ref_ptr (void *ptr) +- condition_broadcast (&disk_cache_reassociation); ++ pthread_cond_broadcast (&disk_cache_reassociation); + + ext2_debug ("(%u) = %p", block, bptr); + return bptr; +@@ -1139,7 +1139,7 @@ { int index; @@ -294,7 +308,7 @@ index 2bec88d..67c9922 100644 } /* Not used. */ -@@ -1178,13 +1178,13 @@ disk_cache_block_is_ref (block_t block) +@@ -1179,13 +1179,13 @@ disk_cache_block_is_ref (block_t block) int ref; void *ptr; @@ -344,56 +358,3 @@ index 93c89f0..c022d0c 100644 if (sync) { -diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h -index 8cd8c5a..bb5b3cd 100644 ---- a/ext2fs/ext2fs.h -+++ b/ext2fs/ext2fs.h -@@ -262,7 +262,7 @@ extern struct disk_cache_info *disk_cache_info; - /* Lock for these mappings */ - extern pthread_mutex_t disk_cache_lock; - /* Fired when a re-association is done. */ --extern struct condition disk_cache_reassociation; -+extern pthread_cond_t disk_cache_reassociation; - - void *disk_cache_block_ref (block_t block); - void disk_cache_block_ref_ptr (void *ptr); -diff --git a/ext2fs/pager.c b/ext2fs/pager.c -index 67c9922..4b3a5c4 100644 ---- a/ext2fs/pager.c -+++ b/ext2fs/pager.c -@@ -837,7 +837,7 @@ int disk_cache_hint; - /* Lock for these structures. */ - pthread_mutex_t disk_cache_lock; - /* Fired when a re-association is done. */ --struct condition disk_cache_reassociation; -+pthread_cond_t disk_cache_reassociation; - - /* Finish mapping initialization. */ - static void -@@ -848,7 +848,7 @@ disk_cache_init (void) - block_size, vm_page_size); - - pthread_mutex_init (&disk_cache_lock, NULL); -- condition_init (&disk_cache_reassociation); -+ pthread_cond_init (&disk_cache_reassociation, NULL); - - /* Allocate space for block num -> in-memory pointer mapping. */ - if (hurd_ihash_create (&disk_cache_bptr, HURD_IHASH_NO_LOCP)) -@@ -970,7 +970,7 @@ disk_cache_block_ref (block_t block) - if (disk_cache_info[index].flags & DC_UNTOUCHED) - { - /* Wait re-association to finish. */ -- condition_wait (&disk_cache_reassociation, &disk_cache_lock); -+ pthread_cond_wait (&disk_cache_reassociation, &disk_cache_lock); - pthread_mutex_unlock (&disk_cache_lock); - - #if 0 -@@ -1127,7 +1127,7 @@ disk_cache_block_ref (block_t block) - pthread_mutex_unlock (&disk_cache_lock); - - /* Re-association was successful. */ -- condition_broadcast (&disk_cache_reassociation); -+ pthread_cond_broadcast (&disk_cache_reassociation); - - ext2_debug ("(%u) = %p", block, bptr); - return bptr; diff --git a/debian/patches/external.patch b/debian/patches/external.patch index 19c9b97a..76005f36 100644 --- a/debian/patches/external.patch +++ b/debian/patches/external.patch @@ -53,13 +53,13 @@ index 05b959b..68ec159 100644 Index: hurd-debian/procfs/Makefile =================================================================== ---- hurd-debian.orig/procfs/Makefile 2010-09-27 19:50:41.000000000 +0000 -+++ hurd-debian/procfs/Makefile 2010-09-27 19:50:46.000000000 +0000 +--- hurd-debian.orig/procfs/Makefile 2012-11-26 00:23:22.000000000 +0000 ++++ hurd-debian/procfs/Makefile 2012-11-26 00:25:35.000000000 +0000 @@ -1,26 +1,31 @@ -TARGET = procfs -OBJS = procfs.o netfs.o procfs_dir.o \ - process.o proclist.o rootdir.o dircat.o main.o --LIBS = -lnetfs -lps +-LIBS = -lnetfs -lps -lfshelp +# Makefile - for procfs +# +# Copyright (C) 2008 Free Software Foundation, Inc. @@ -82,24 +82,26 @@ Index: hurd-debian/procfs/Makefile +makemode := server + +target = procfs ++ ++SRCS = procfs.c netfs.c procfs_dir.c process.c proclist.c rootdir.c dircat.c main.c ++LCLHDRS = dircat.h main.h process.h procfs.h procfs_dir.h proclist.h rootdir.h ++ ++OBJS = $(SRCS:.c=.o) ++HURDLIBS = netfs fshelp iohelp ps ports ihash shouldbeinlibc ++OTHERLIBS = -lpthread -CC = gcc -CFLAGS = -Wall -g -CPPFLAGS = -LDFLAGS = -+SRCS = procfs.c netfs.c procfs_dir.c process.c proclist.c rootdir.c dircat.c main.c -+LCLHDRS = dircat.h main.h process.h procfs.h procfs_dir.h proclist.h rootdir.h - +- -ifdef PROFILE -CFLAGS= -g -pg -CPPFLAGS= -DPROFILE -LDFLAGS= -static -LIBS= -lnetfs -lfshelp -liohelp -lps -lports -lthreads -lihash -lshouldbeinlibc -endif -+OBJS = $(SRCS:.c=.o) -+HURDLIBS = netfs fshelp iohelp ps ports ihash shouldbeinlibc -+OTHERLIBS = -lpthread - +- -CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 - -all: $(TARGET) diff --git a/debian/patches/init_try_runsystem.gnu.patch b/debian/patches/init_try_runsystem.gnu.patch index 045bec24..a8389b23 100644 --- a/debian/patches/init_try_runsystem.gnu.patch +++ b/debian/patches/init_try_runsystem.gnu.patch @@ -1,19 +1,15 @@ Also try runsystem.gnu -Almost merged upstream, ony runsystem.gnu remaining --- daemons/console-run.c | 7 +++++++ init/init.c | 24 ++++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) ---- a/init/init.c -+++ b/init/init.c -@@ -1082,10 +1082,12 @@ start_child (const char *prog, char **pr - static void - launch_something (const char *why) - { -+ file_t something; - static unsigned int try; +Index: hurd-debian/init/init.c +=================================================================== +--- hurd-debian.orig/init/init.c 2012-11-26 00:23:25.000000000 +0000 ++++ hurd-debian/init/init.c 2012-11-26 00:25:06.000000000 +0000 +@@ -1087,6 +1087,7 @@ static const char *const tries[] = { "/libexec/runsystem", @@ -21,57 +17,3 @@ Almost merged upstream, ony runsystem.gnu remaining _PATH_BSHELL, "/bin/shd", /* XXX */ }; -@@ -1093,12 +1095,26 @@ launch_something (const char *why) - if (why) - error (0, 0, "%s %s", tries[try - 1], why); - -- if (try == 0 && start_child (tries[try++], &global_argv[1]) == 0) -- return; -+ something = file_name_lookup (tries[try], O_EXEC, 0); -+ if (something != MACH_PORT_NULL) -+ { -+ mach_port_deallocate (mach_task_self (), something); -+ if (try == 0 && start_child (tries[try++], &global_argv[1]) == 0) -+ return; -+ } -+ else -+ try++; - - while (try < sizeof tries / sizeof tries[0]) -- if (start_child (tries[try++], NULL) == 0) -- return; -+ { -+ something = file_name_lookup (tries[try], O_EXEC, 0); -+ if (something != MACH_PORT_NULL) -+ { -+ mach_port_deallocate (mach_task_self (), something); -+ if (start_child (tries[try++], NULL) == 0) -+ return; -+ } -+ } - - crash_system (); - } ---- a/daemons/console-run.c -+++ b/daemons/console-run.c -@@ -49,6 +49,7 @@ int - main (int argc, char **argv) - { - mach_port_t consdev = get_console (); -+ mach_port_t runsystem; - char *consname; - - if (consdev == MACH_PORT_NULL) -@@ -62,6 +63,12 @@ main (int argc, char **argv) - if (argc < 2) - error (1, 0, "Usage: %s PROGRAM [ARG...]", program_invocation_short_name); - -+ /* Check whether runsystem exists before opening a console for it. */ -+ runsystem = file_name_lookup (argv[1], O_RDONLY, 0); -+ if (runsystem == MACH_PORT_NULL) -+ error (127, errno, "cannot open file `%s' for execution", argv[1]); -+ mach_port_deallocate (mach_task_self (), runsystem); -+ - if (open_console (&consname)) - setenv ("FALLBACK_CONSOLE", consname, 1); - diff --git a/debian/patches/libdde_workqueue.patch b/debian/patches/libdde_workqueue.patch index 724f12a2..5ea9b612 100644 --- a/debian/patches/libdde_workqueue.patch +++ b/debian/patches/libdde_workqueue.patch @@ -23,7 +23,7 @@ index 3cd51e5..cf24c20 100644 * assignment of the work data initializer allows the compiler * to generate better code. */ -@@ -202,6 +207,7 @@ extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, +@@ -202,6 +207,7 @@ extern void flush_workqueue(struct workqueue_struct *wq); extern void flush_scheduled_work(void); @@ -31,10 +31,12 @@ index 3cd51e5..cf24c20 100644 extern int schedule_work(struct work_struct *work); extern int schedule_work_on(int cpu, struct work_struct *work); -@@ -235,6 +241,21 @@ static inline int cancel_delayed_work(struct delayed_work *work) +@@ -233,6 +239,21 @@ + if (ret) + work_clear_pending(&work->work); return ret; - } - ++} ++ +/* + * Like above, but uses del_timer() instead of del_timer_sync(). This means, + * if it returns 0 the timer function may be running and the queueing is in @@ -48,8 +50,6 @@ index 3cd51e5..cf24c20 100644 + if (ret) + work_clear_pending(&work->work); + return ret; -+} -+ - extern int cancel_delayed_work_sync(struct delayed_work *work); + } - /* Obsolete. use cancel_delayed_work_sync() */ + extern int cancel_delayed_work_sync(struct delayed_work *work); diff --git a/debian/patches/libports_stability.patch b/debian/patches/libports_stability.patch index 84edc491..4452807c 100644 --- a/debian/patches/libports_stability.patch +++ b/debian/patches/libports_stability.patch @@ -5,14 +5,16 @@ however it makes all threads often wake at the same time and overload Mach. libports/manage-multithread.c | 2 ++ 1 file changed, 2 insertions(+) ---- a/libports/manage-multithread.c -+++ b/libports/manage-multithread.c -@@ -157,6 +157,8 @@ ports_manage_port_operations_multithread - return 0; +Index: hurd-debian/libports/manage-multithread.c +=================================================================== +--- hurd-debian.orig/libports/manage-multithread.c 2012-11-26 00:23:22.000000000 +0000 ++++ hurd-debian/libports/manage-multithread.c 2012-11-26 00:25:28.000000000 +0000 +@@ -243,6 +243,8 @@ + return NULL; } + thread_timeout = global_timeout = 0; /* XXX */ + nreqthreads = 1; totalthreads = 1; - thread_function (1); + thread_function ((void *) 1); diff --git a/debian/patches/pfinet_dhcp.patch b/debian/patches/pfinet_dhcp.patch index 30c0902a..92446267 100644 --- a/debian/patches/pfinet_dhcp.patch +++ b/debian/patches/pfinet_dhcp.patch @@ -247,11 +247,11 @@ + fprintf (stderr, "No prefix-length given, " + "defaulting to %s/64.\n", arg); + } - -- *ptr = 0; ++ + if (inet_pton (AF_INET6, arg, &h->curint->address6.addr) <= 0) + PERR (EINVAL, "Malformed address"); -+ + +- *ptr = 0; + if (IN6_IS_ADDR_MULTICAST (&h->curint->address6.addr)) + FAIL (EINVAL, 1, 0, "%s: Cannot set interface address to " + "multicast address", arg); @@ -320,13 +320,20 @@ #ifdef CONFIG_IPV6 if (!IN6_IS_ADDR_UNSPECIFIED (&in->gateway6)) -@@ -361,15 +454,20 @@ parse_opt (int opt, char *arg, struct ar +@@ -361,15 +454,20 @@ idev = ipv6_find_idev(in->device); #endif - if (in->address != INADDR_NONE || in->netmask != INADDR_NONE) + if (in->address == INADDR_NONE && in->netmask == INADDR_NONE) -+ { + { +- err = configure_device (in->device, in->address, in->netmask, +- in->peer, INADDR_NONE); +- if (err) +- { +- pthread_mutex_unlock (&global_lock); +- FAIL (err, 16, 0, "cannot configure interface"); +- } + h->curint->address = ADDR ("0.0.0.0", "address"); + h->curint->netmask = ADDR ("255.0.0.0", "netmask"); + } @@ -336,20 +343,13 @@ + in->peer, INADDR_NONE); + + if (err) - { -- err = configure_device (in->device, in->address, in->netmask, -- in->peer, INADDR_NONE); -- if (err) -- { -- __mutex_unlock (&global_lock); -- FAIL (err, 16, 0, "cannot configure interface"); -- } -+ __mutex_unlock (&global_lock); ++ { ++ pthread_mutex_unlock (&global_lock); + FAIL (err, 16, 0, "cannot configure interface"); } #ifdef CONFIG_IPV6 -@@ -377,24 +475,25 @@ parse_opt (int opt, char *arg, struct ar +@@ -377,24 +475,25 @@ continue; /* First let's remove all non-local addresses. */ @@ -393,7 +393,7 @@ /* Now assign the new address */ inet6_addr_add (in->device->ifindex, &in->address6.addr, in->address6.prefix_len); -@@ -418,33 +517,40 @@ parse_opt (int opt, char *arg, struct ar +@@ -418,33 +517,40 @@ req.nlh.nlmsg_seq = 0; req.nlh.nlmsg_len = NLMSG_LENGTH (sizeof req.rtm); @@ -418,7 +418,7 @@ - err = - (*tb->tb_delete) (tb, &req.rtm, &rta, &req.nlh, 0); - if (err && err != ESRCH) - { -- __mutex_unlock (&global_lock); +- pthread_mutex_unlock (&global_lock); - FAIL (err, 17, 0, "cannot remove old default gateway"); - } - err = 0; @@ -436,7 +436,7 @@ + (tb, &req.rtm, &rta, &req.nlh, 0); + if (err && err != ESRCH) + { -+ __mutex_unlock (&global_lock); ++ pthread_mutex_unlock (&global_lock); + FAIL (err, 17, 0, + "cannot remove old default gateway"); + } @@ -452,7 +452,7 @@ req.nlh.nlmsg_type = RTM_NEWROUTE; req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE; tb = fib_new_table (req.rtm.rtm_table); -@@ -467,13 +573,77 @@ parse_opt (int opt, char *arg, struct ar +@@ -467,13 +573,77 @@ if (!gw6_in || rt6i->rt6i_dev != gw6_in->device || !IN6_ARE_ADDR_EQUAL (&rt6i->rt6i_gateway, &gw6_in->gateway6)) { @@ -489,13 +489,13 @@ + dst = (struct sockaddr_in *) &route.rt_dst; + if (!in->device->name) + { -+ __mutex_unlock (&global_lock); ++ pthread_mutex_unlock (&global_lock); + FAIL (ENODEV, 17, 0, "unknown device"); + } + dev = dev_get (in->device->name); + if (!dev) + { -+ __mutex_unlock (&global_lock); ++ pthread_mutex_unlock (&global_lock); + FAIL (ENODEV, 17, 0, "unknown device"); + } + @@ -523,15 +523,15 @@ + + if (err) + { -+ __mutex_unlock (&global_lock); ++ pthread_mutex_unlock (&global_lock); + FAIL (err, 17, 0, "cannot add route"); + } + } + - __mutex_unlock (&global_lock); + pthread_mutex_unlock (&global_lock); /* Fall through to free hook. */ -@@ -526,8 +696,9 @@ trivfs_append_args (struct trivfs_contro +@@ -526,8 +696,9 @@ ADD_ADDR_OPT ("netmask", mask); if (peer != addr) ADD_ADDR_OPT ("peer", peer); diff --git a/debian/patches/posix-sigcodes.patch b/debian/patches/posix-sigcodes.patch index 34e089f2..8efb886a 100644 --- a/debian/patches/posix-sigcodes.patch +++ b/debian/patches/posix-sigcodes.patch @@ -214,7 +214,7 @@ index 6fc94e8..332aaf6 100644 if (p->p_parent->p_waiting) { - condition_broadcast (&p->p_parent->p_wakeup); + pthread_cond_broadcast (&p->p_parent->p_wakeup); p->p_parent->p_waiting = 0; } } @@ -241,7 +241,7 @@ index 6fc94e8..332aaf6 100644 if (p->p_parent->p_waiting) { - condition_broadcast (&p->p_parent->p_wakeup); + pthread_cond_broadcast (&p->p_parent->p_wakeup); p->p_parent->p_waiting = 0; } diff --git a/debian/patches/proxy-defpager.diff b/debian/patches/proxy-defpager.diff index 0ba12dee..896b98cc 100644 --- a/debian/patches/proxy-defpager.diff +++ b/debian/patches/proxy-defpager.diff @@ -11,18 +11,20 @@ https://savannah.gnu.org/bugs/?26751 proxy-defpager.c | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) -diff -u -a -r1.40 -r1.40.10.1 ---- a/trans/Makefile 6 Jun 2007 16:08:56 -0000 1.40 -+++ b/trans/Makefile 7 Jun 2009 03:51:49 -0000 1.40.10.1 -@@ -26,13 +26,16 @@ +Index: hurd-debian/trans/Makefile +=================================================================== +--- hurd-debian.orig/trans/Makefile 2012-11-26 00:23:22.000000000 +0000 ++++ hurd-debian/trans/Makefile 2012-11-26 00:25:32.000000000 +0000 +@@ -26,7 +26,7 @@ fakeroot.c proxy-defpager.c OBJS = $(SRCS:.c=.o) fsysServer.o ifsockServer.o passwordServer.o \ crashServer.o crash_replyUser.o msgServer.o \ - default_pagerServer.o default_pagerUser.o \ + ourdefault_pagerServer.o ourdefault_pagerUser.o \ device_replyServer.o elfcore.o - HURDLIBS = threads ports netfs trivfs iohelp fshelp pipe ihash shouldbeinlibc - password-LDLIBS = $(LIBCRYPT) + HURDLIBS = ports netfs trivfs iohelp fshelp pipe ihash shouldbeinlibc + LDLIBS += -lpthread +@@ -34,6 +34,9 @@ include ../Makeconf @@ -32,18 +34,19 @@ diff -u -a -r1.40 -r1.40.10.1 vpath elfcore.c $(top_srcdir)/exec symlink: fsysServer.o -@@ -40,7 +43,7 @@ +@@ -41,7 +44,7 @@ crash: crashServer.o crash_replyUser.o msgServer.o elfcore.o password: passwordServer.o streamio: device_replyServer.o -proxy-defpager: default_pagerServer.o default_pagerUser.o +proxy-defpager: ourdefault_pagerServer.o ourdefault_pagerUser.o - proxy-defpager crash password streamio: ../libthreads/libthreads.a ../libports/libports.a ../libtrivfs/libtrivfs.a ../libthreads/libthreads.a ../libfshelp/libfshelp.a + proxy-defpager crash password streamio: ../libports/libports.a ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a fifo new-fifo: ../libpipe/libpipe.a -diff -u -a -r1.5 -r1.5.10.1 ---- a/trans/proxy-defpager.c 6 Jun 2007 16:08:56 -0000 1.5 -+++ b/trans/proxy-defpager.c 7 Jun 2009 03:51:49 -0000 1.5.10.1 +Index: hurd-debian/trans/proxy-defpager.c +=================================================================== +--- hurd-debian.orig/trans/proxy-defpager.c 2012-11-26 00:23:22.000000000 +0000 ++++ hurd-debian/trans/proxy-defpager.c 2012-11-26 00:25:32.000000000 +0000 @@ -23,9 +23,10 @@ #include #include diff --git a/debian/patches/series b/debian/patches/series index b1769c82..9e653113 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,12 +3,12 @@ ext2fs_large_stores.patch ext2fs_large_stores_pthread.patch hurd_console_startup.patch init_try_runsystem.gnu.patch -install-msgids.diff +#install-msgids.diff makedev.diff pfinet_dhcp.patch -pflocal.patch +#pflocal.patch rc.patch -runsystem_setup_pflocal.patch +#runsystem_setup_pflocal.patch startup-usr-support.patch tmp_exec_startup.patch uptime_w_path_fix.patch @@ -16,13 +16,13 @@ stat_round.patch libports_stability.patch proxy-defpager.diff external.patch -makedev_keep_options.patch -makedev_parted_store.patch +#makedev_keep_options.patch +#makedev_parted_store.patch console_ignore_bdf_err.patch -ext2fs_nowait.patch -libpager_deadlock.patch -libdiskfs_self-reauth.patch -libdiskfs_sync.patch +#ext2fs_nowait.patch +#libpager_deadlock.patch +#libdiskfs_self-reauth.patch +#libdiskfs_sync.patch posix-sigcodes.patch random-default-fast.patch libexec.patch -- cgit v1.2.3