diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-16 15:31:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-16 15:33:06 +0000 |
commit | 2ac367055cba0c9e8d8d7974497920e6f0225f16 (patch) | |
tree | d6d76643ccce0375d3340c236cffcf6971e1fa3e /main/udev | |
parent | 1ceb9b762ef7463e4553ee3eb7ad0b620c43b593 (diff) | |
download | aports-2ac367055cba0c9e8d8d7974497920e6f0225f16.tar.bz2 aports-2ac367055cba0c9e8d8d7974497920e6f0225f16.tar.xz |
main/udev: fix /dev permissions for musl
musl sysconf(_SC_GETPW_R_SIZE_MAX) returns -1 so we need a fallback
for it.
Diffstat (limited to 'main/udev')
-rw-r--r-- | main/udev/APKBUILD | 21 | ||||
-rw-r--r-- | main/udev/get_pw_r_size.patch | 13 |
2 files changed, 33 insertions, 1 deletions
diff --git a/main/udev/APKBUILD b/main/udev/APKBUILD index 726f2a4307..a9f0b40212 100644 --- a/main/udev/APKBUILD +++ b/main/udev/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=udev pkgver=175 -pkgrel=6 +pkgrel=7 pkgdesc="The userspace dev tools (udev)" url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/" arch="all" @@ -12,6 +12,7 @@ makedepends="gobject-introspection-dev glib-dev gperf acl-dev libusb-compat-dev usbutils pciutils-dev libtool sed" install="" source="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2 + get_pw_r_size.patch write_root_link_rule udev-mount.initd udev-postmount.initd @@ -20,6 +21,11 @@ source="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.ta _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done update_config_sub || return 1 } @@ -81,7 +87,20 @@ libgudev() { } md5sums="2fc9c1efcbde98e3d73ffee7a77aea47 udev-175.tar.bz2 +41e0d72c64f01735e693be79d11c7e3f get_pw_r_size.patch c9de7581099cdfdcd105666cd98a0f0a write_root_link_rule bfc97ba47f6db2b6ae458a65c0b396d5 udev-mount.initd e99c87e62e7cb5acc4c55bf065944a11 udev-postmount.initd c11fb3517a567db9994d5f9dbc88ecae udev.initd" +sha256sums="4c7937fe5a1521316ea571188745b9a00a9fdf314228cffc53a7ba9e5968b7ab udev-175.tar.bz2 +1cd343f5f39d13d6ab1a68b9710be6ee5730ca3f1908898e99b9741a0f14087b get_pw_r_size.patch +f8cff0e73ef40c6a9f642aba35136eac6e60d4cdfb54027aad59f6b770c01915 write_root_link_rule +a9f9befa2d0794c1c114541d58c149f05f4ea82f8e52bb07e518b2e6c814ba16 udev-mount.initd +b58cc450ef2963da59cf1d7b9198bd9268c1637b5b6c72b085304a74e52ae3d6 udev-postmount.initd +4292752cf5780124db7e83f782d393ab32a17b6c30add0ce9414559fac888048 udev.initd" +sha512sums="1e2b3fd385d2b53b42949c83ecad7bd63244f865b6fa4c6fc96fe62b1c23be305f6d47c9c51cdfef4cb3b290f3dbb46b6fea12dfeedc01700fcd07a319c6a7fd udev-175.tar.bz2 +a3f7dab8a3b2593c33c4b90d025a263f6fb2aceed3e233a7a5c9329cf599f43eea6e04bc6defc23e6b8ae69e47c0351d10f3ea07465fb27cf7268e89f48a7191 get_pw_r_size.patch +f3dc810e41e8123a1004108afb98406aa7f44cb69072a6deb0dce75ed2de1d79304b3cbfc38ca3c3d7289db6695f65f3c87162c83f87a2052b404e901a344703 write_root_link_rule +3f06361d0e97a5f583f802b0fc9fbe1d7bdf8ebf0b649b2b9de84b30cf82229d66efe4c5f3ff2333c7ff8916132e652f935893746a4dbc833a6fa4d75f2667d2 udev-mount.initd +28b862c1f1df03b47299476044d734dfe51f274f8a5f29af9427e783cbdf1811343c9d27b941e566451576cf2263d8799262cc9b5c960df855ebab04c372beaa udev-postmount.initd +51d821db817c56b9290290463c5eae19e41d0784389f9c6294f373fc635ffeb1e06ee5e67f0dac38e935b1ae3a285c62e0730bfb2354b2fb2485721aa1d24d0c udev.initd" diff --git a/main/udev/get_pw_r_size.patch b/main/udev/get_pw_r_size.patch new file mode 100644 index 0000000000..9ad9f6c978 --- /dev/null +++ b/main/udev/get_pw_r_size.patch @@ -0,0 +1,13 @@ +--- ./libudev/libudev-util-private.c ++++ ./libudev/libudev-util-private.c.orig +@@ -133,8 +133,8 @@ + uid_t util_lookup_user(struct udev *udev, const char *user) + { + char *endptr; +- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX); +- char buf[buflen]; ++ int buflen = sysconf(_SC_GETPW_R_SIZE_MAX); ++ char buf[buflen>0 ? buflen : 1024]; + struct passwd pwbuf; + struct passwd *pw; + uid_t uid; |