Package: fakeroot Version: 1.18.4-2 Severity: wishlist Tags: patch Hi Clint,
Upon updating the upstart package in unstable to the new upstream version, I find that the test suite fails because the upstart code, which is designed to run as root, assumes setpriority() can be called to set the process priority - defaulting to 0. It seems that some of the Debian buildds are running with a nice level >0, so setpriority() fails: https://buildd.debian.org/status/fetch.php?pkg=upstart&arch=armhf&ver=1.5-1&stamp=1352766700 I think it makes sense for fakeroot to wrap setpriority(), as a privileged call. The attached patch does this. I'd be happy to upload an SRU for this if you like. Or, if you don't think fakeroot should handle this, I'd appreciate you letting me know so we can address this in upstart. Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru fakeroot-1.18.4/debian/changelog fakeroot-1.18.4/debian/changelog --- fakeroot-1.18.4/debian/changelog 2012-06-06 23:11:40.000000000 +0000 +++ fakeroot-1.18.4/debian/changelog 2012-11-18 04:01:27.000000000 +0000 @@ -1,3 +1,10 @@ +fakeroot (1.18.4-2.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Add support for wrapping setpriority(). + + -- Steve Langasek <vor...@debian.org> Sat, 17 Nov 2012 21:45:18 -0600 + fakeroot (1.18.4-2) unstable; urgency=low * Disable stat64 for FTS functions in a Debian-local patch, diff -Nru fakeroot-1.18.4/debian/patches/series fakeroot-1.18.4/debian/patches/series --- fakeroot-1.18.4/debian/patches/series 2012-06-06 23:12:21.000000000 +0000 +++ fakeroot-1.18.4/debian/patches/series 2012-11-18 04:02:27.000000000 +0000 @@ -1,2 +1,3 @@ eglibc-fts-without-LFS ugh +setpriority-support diff -Nru fakeroot-1.18.4/debian/patches/setpriority-support fakeroot-1.18.4/debian/patches/setpriority-support --- fakeroot-1.18.4/debian/patches/setpriority-support 1970-01-01 00:00:00.000000000 +0000 +++ fakeroot-1.18.4/debian/patches/setpriority-support 2012-11-18 04:02:57.000000000 +0000 @@ -0,0 +1,37 @@ +Description: Add support for wrapping setpriority(). + The upstart test suite relies on calling upstart code which assumes being + able to call setpriority(0); but some Debian buildds run builds with a + higher nice level under fakeroot. So it's useful for fakeroot to wrap + setpriority(). +Author: Steve Langasek <vor...@debian.org> + +Index: fakeroot-1.18.4/libfakeroot.c +=================================================================== +--- fakeroot-1.18.4.orig/libfakeroot.c ++++ fakeroot-1.18.4/libfakeroot.c +@@ -1537,6 +1537,13 @@ + return 0; + } + ++int setpriority(int which, int who, int prio){ ++ if (fakeroot_disabled) ++ return next_setpriority(which, who, prio); ++ next_setpriority(which, who, prio); ++ return 0; ++} ++ + #undef fakeroot_disabled + + int fakeroot_disable(int new) +Index: fakeroot-1.18.4/wrapfunc.inp +=================================================================== +--- fakeroot-1.18.4.orig/wrapfunc.inp ++++ fakeroot-1.18.4/wrapfunc.inp +@@ -145,6 +145,7 @@ + #endif /* HAVE_SETFSGID */ + initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group) + setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list) ++setpriority;int;(int which, int who, int prio);(which, who, prio) + + #ifdef HAVE_FSTATAT + #ifdef HAVE_FCHMODAT
signature.asc
Description: Digital signature