diff --git a/util-linux/2.33.1-cygwin-cpuset.patch b/util-linux/2.33.1-cygwin-cpuset.patch new file mode 100644 index 00000000..a93b82e6 --- /dev/null +++ b/util-linux/2.33.1-cygwin-cpuset.patch @@ -0,0 +1,33 @@ +--- origsrc/util-linux-2.33.1/lib/cpuset.c 2018-06-04 00:57:02.792445800 -0700 ++++ src/util-linux-2.33.1/lib/cpuset.c 2020-01-11 00:37:39.126054200 -0800 +@@ -20,7 +20,9 @@ + #include + #include + #include ++#ifndef __CYGWIN__ + #include ++#endif + + #include "cpuset.h" + #include "c.h" +@@ -60,7 +60,7 @@ static const char *nexttoken(const char + */ + int get_max_number_of_cpus(void) + { +-#ifdef SYS_sched_getaffinity ++#if defined(SYS_sched_getaffinity) || defined(__CYGWIN__) + int n, cpus = 2048; + size_t setsize; + cpu_set_t *set = cpuset_alloc(cpus, &setsize, NULL); +@@ -72,7 +72,11 @@ int get_max_number_of_cpus(void) + CPU_ZERO_S(setsize, set); + + /* the library version does not return size of cpumask_t */ ++#if defined(__CYGWIN__) ++ n = __sched_getaffinity_sys(0, setsize, set); ++#else + n = syscall(SYS_sched_getaffinity, 0, setsize, set); ++#endif + + if (n < 0 && errno == EINVAL && cpus < 1024 * 1024) { + cpuset_free(set); diff --git a/util-linux/2.33.1-cygwin-ionice.patch b/util-linux/2.33.1-cygwin-ionice.patch new file mode 100644 index 00000000..b97ba5f2 --- /dev/null +++ b/util-linux/2.33.1-cygwin-ionice.patch @@ -0,0 +1,18 @@ +--- origsrc/util-linux-2.33.1/configure.ac 2020-03-21 20:19:20.952384000 -0400 ++++ src/util-linux-2.33.1/configure.ac 2020-03-21 20:42:40.640966200 -0400 +@@ -2054,8 +2054,13 @@ + ) + + +-UL_ENABLE_ALIAS([ionice], [schedutils]) +-UL_BUILD_INIT([ionice]) ++AC_ARG_ENABLE([ionice], ++ AS_HELP_STRING([--disable-ionice], [disable ionice even if schedutils is enabled]), ++ [], [UL_DEFAULT_ENABLE([ionice], [check])] ++) ++ ++UL_BUILD_INIT([ionice], [check]) ++UL_REQUIRES_BUILD([ionice], [schedutils]) + UL_REQUIRES_SYSCALL_CHECK([ionice], + [UL_CHECK_SYSCALL([ioprio_set], + [alpha], [442], diff --git a/util-linux/2.33.1-cygwin-taskset.patch b/util-linux/2.33.1-cygwin-taskset.patch new file mode 100644 index 00000000..d41ac74c --- /dev/null +++ b/util-linux/2.33.1-cygwin-taskset.patch @@ -0,0 +1,27 @@ +--- origsrc/util-linux-2.33.1/configure.ac 2020-03-21 23:12:49.481503500 -0400 ++++ src/util-linux-2.33.1/configure.ac 2020-03-21 23:17:20.565468100 -0400 +@@ -2052,6 +2052,7 @@ + AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, taskset]), + [], [UL_DEFAULT_ENABLE([schedutils], [check])] + ) ++UL_BUILD_INIT([schedutils]) + + + UL_ENABLE_ALIAS([ionice], [schedutils]) +@@ -2083,12 +2084,11 @@ + AM_CONDITIONAL([BUILD_IONICE], [test "x$build_ionice" = xyes]) + + +-UL_ENABLE_ALIAS([taskset], [schedutils]) +-UL_BUILD_INIT([taskset]) ++UL_BUILD_INIT([taskset], [check]) ++UL_REQUIRES_BUILD([taskset], [schedutils]) + UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type]) +-UL_REQUIRES_SYSCALL_CHECK([taskset], +- [UL_CHECK_SYSCALL([sched_getaffinity])], +- [sched_getaffinity]) ++AC_CHECK_FUNCS([sched_getaffinity sched_setaffinity], [have_schedaffinity=yes],[have_schedaffinity=no]) ++UL_REQUIRES_HAVE([taskset], [schedaffinity], [sched affinity functions]) + AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_taskset" = xyes]) + + diff --git a/util-linux/PKGBUILD b/util-linux/PKGBUILD index bde9c739..d6adc498 100644 --- a/util-linux/PKGBUILD +++ b/util-linux/PKGBUILD @@ -2,7 +2,7 @@ pkgname=("util-linux" "libutil-linux" "libutil-linux-devel") _pkgmajor=2.35 -pkgver=${_pkgmajor}.1 +pkgver=${_pkgmajor}.2 pkgrel=1 pkgdesc="Miscellaneous system utilities for Linux" arch=('i686' 'x86_64') @@ -14,14 +14,20 @@ source=(https://www.kernel.org/pub/linux/utils/$pkgname/v${_pkgmajor}/${pkgname} 2.24.2-libblkid-topology.patch 2.24.2-libintl.patch 2.25.1-cygwin-include.patch + 2.33.1-cygwin-cpuset.patch + 2.33.1-cygwin-ionice.patch + 2.33.1-cygwin-taskset.patch 2.32.1-testsuite.patch 2.25.1-relocate-sbin-to-usr-bin.patch 2.24.2-msysize.patch) -sha256sums=('d9de3edd287366cd908e77677514b9387b22bc7b88f45b83e1922c3597f1d7f9' +sha256sums=('21b7431e82f6bcd9441a01beeec3d57ed33ee948f8a5b41da577073c372eb58a' '0d6c812fab3deb34842dfb4313ce626e389c0961fe863a653ee1799a16614200' '347ff26c7750ef586dd50c3ac0be0b86604f8c4a4f148a0fc4e49d9ec55e2198' 'a678a08fa18fc2ad34bc2a39bb0ff983f76803d4df742daf9d5e7b0d1d3b76f6' '82545b7762445c5fbd43481f12bc8416f26783a70b3ce6a6ff3f42b2b9a1afc6' + '8826fba4ac3a102f89301fd146a61a8f98d6ae9faae8bdb186bbad28363370c2' + 'e8ee1a1577899d00c6e198cf81cd11af445eb6c906a602559a751c0f4878f248' + 'e355a7c05ad4abc5e6076e047e470b12104f1da1404313258470d404c7c26b38' 'ea33be334f966df7b08b9d4d7b1f10df1c3f3cd08eade156d1f6969f913658d9' 'd6bfc7e34349a98c8d110f1e216bd16d6f1edf45c369cda8c6301fb994986d13' '11563826de30d5e7e372e2901f3fd9d5b86539ae0c38c3d709c16b894b3034e5') @@ -33,6 +39,9 @@ prepare() { patch -p2 -i ${srcdir}/2.24.2-libblkid-topology.patch patch -p2 -i ${srcdir}/2.24.2-libintl.patch patch -p2 -i ${srcdir}/2.25.1-cygwin-include.patch + patch -p2 -i ${srcdir}/2.33.1-cygwin-cpuset.patch + patch -p2 -i ${srcdir}/2.33.1-cygwin-ionice.patch + patch -p2 -i ${srcdir}/2.33.1-cygwin-taskset.patch patch -p2 -i ${srcdir}/2.32.1-testsuite.patch patch -p1 -i ${srcdir}/2.24.2-msysize.patch patch -p1 -i ${srcdir}/2.25.1-relocate-sbin-to-usr-bin.patch @@ -44,6 +53,7 @@ build() { mkdir -p ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST} CPPFLAGS+=" -D__USE_LINUX_IOCTL_DEFS" + ../${pkgname}-${pkgver}/configure \ --build=${CHOST} \ --prefix=/usr \ @@ -54,7 +64,9 @@ build() { --sysconfdir=/etc \ --localstatedir=/var \ --enable-libuuid \ + --enable-libuuid-force-uuidd \ --enable-libblkid \ + --enable-libfdisk \ --disable-libmount \ --disable-mount \ --disable-losetup \ @@ -86,21 +98,19 @@ build() { --disable-mesg \ --disable-raw \ --enable-rename \ - --disable-reset \ --disable-vipw \ --disable-newgrp \ --disable-chfn-chsh \ --disable-login \ - --disable-nologin \ + --enable-nologin \ --disable-sulogin \ --disable-su \ --disable-runuser \ - --disable-uuidd \ --enable-ul \ --enable-more \ --enable-pg \ --disable-setterm \ - --disable-schedutils \ + --enable-schedutils \ --disable-wall \ --disable-write \ --disable-use-tty-group \ @@ -108,8 +118,6 @@ build() { --disable-makeinstall-setuid \ --without-libiconv-prefix \ --without-libintl-prefix \ - --enable-usrdir-path \ - ac_cv_func___fpending=yes \ SOLIB_LDFLAGS=-no-undefined make