[Fakeroot-commits] [SCM] Debian packaging of fakeroot branch, upstream, updated. f7acff932a2930158e3a3d64373a67dc8bf1ebd1

Clint Adams clint at debian.org
Fri Sep 20 13:54:34 UTC 2013


The following commit has been merged in the upstream branch:
commit 5f7d3af8fedadc9cf2a53e997e55cc0e3e7090e6
Author: Clint Adams <clint at debian.org>
Date:   Fri Sep 20 09:39:47 2013 -0400

    Patch from Steve Langasek to add support for wrapping setpriority(). closes: #693580.
    
     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().

diff --git a/libfakeroot.c b/libfakeroot.c
index b0c3f3b..6edcd23 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1894,6 +1894,13 @@ ssize_t fremovexattr(int fd, const char *name)
 }
 #endif /* HAVE_FREMOVEXATTR */
 
+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)
diff --git a/wrapfunc.inp b/wrapfunc.inp
index caab0e1..5eff0cc 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -145,6 +145,7 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid)
 #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_CAPSET
 capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap)
 #endif /* HAVE_CAPSET */

-- 
Debian packaging of fakeroot



More information about the Fakeroot-commits mailing list