packages: udev/udev-uClibc.patch, udev/udev.spec - updated uClibc patch for...
baggins
baggins at pld-linux.org
Tue Apr 26 02:04:20 CEST 2011
Author: baggins Date: Tue Apr 26 00:04:20 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- updated uClibc patch for real
- fstab_import is gone
---- Files affected:
packages/udev:
udev-uClibc.patch (1.3 -> 1.4) , udev.spec (1.346 -> 1.347)
---- Diffs:
================================================================
Index: packages/udev/udev-uClibc.patch
diff -u packages/udev/udev-uClibc.patch:1.3 packages/udev/udev-uClibc.patch:1.4
--- packages/udev/udev-uClibc.patch:1.3 Tue Apr 26 00:05:53 2011
+++ packages/udev/udev-uClibc.patch Tue Apr 26 02:04:14 2011
@@ -16,26 +16,270 @@
diff -ur udev-150/udev/udevadm-info.c udev-150-uclibc/udev/udevadm-info.c
--- udev-150/udev/udevadm-info.c 2009-12-24 20:40:34.000000000 +0100
+++ udev-150-uclibc/udev/udevadm-info.c 2010-01-19 17:47:00.000000000 +0100
-@@ -203,6 +203,9 @@
- static void cleanup_dir(DIR *dir, mode_t mask, int depth)
- {
- struct dirent *dent;
+@@ -200,8 +200,14 @@
+ return 0;
+ }
+
+#ifdef __UCLIBC__
++static void cleanup_dir(DIR *dir, char *dirname, mode_t mask, int depth)
++{
+ char filename[UTIL_PATH_SIZE];
++#else
+ static void cleanup_dir(DIR *dir, mode_t mask, int depth)
+ {
+#endif
+ struct dirent *dent;
if (depth <= 0)
- return;
@@ -212,7 +215,12 @@
if (dent->d_name[0] == '.')
continue;
+#ifdef __UCLIBC__
-+ util_strscpyl(filename, sizeof(filename), udev_device_get_syspath(device), "/", dent->d_name, NULL);
-+ if (lstat(filename, &statbuf) != 0)
++ util_strscpyl(filename, sizeof(filename), dirname, "/", dent->d_name, NULL);
++ if (lstat(filename, &stats) != 0)
+#else
if (fstatat(dirfd(dir), dent->d_name, &stats, AT_SYMLINK_NOFOLLOW) != 0)
+#endif
continue;
if ((stats.st_mode & mask) != 0)
continue;
+@@ -229,7 +232,11 @@
+
+ dir2 = fdopendir(openat(dirfd(dir), dent->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC));
+ if (dir2 != NULL) {
++#ifdef __UCLIBC__
++ cleanup_dir(dir2, filename, mask, depth-1);
++#else
+ cleanup_dir(dir2, mask, depth-1);
++#endif
+ closedir(dir2);
+ }
+ unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR);
+@@ -250,35 +257,55 @@
+ util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/data", NULL);
+ dir = opendir(filename);
+ if (dir != NULL) {
++#ifdef __UCLIBC__
++ cleanup_dir(dir, filename, S_ISVTX, 1);
++#else
+ cleanup_dir(dir, S_ISVTX, 1);
++#endif
+ closedir(dir);
+ }
+
+ util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/links", NULL);
+ dir = opendir(filename);
+ if (dir != NULL) {
++#ifdef __UCLIBC__
++ cleanup_dir(dir, filename, 0, 2);
++#else
+ cleanup_dir(dir, 0, 2);
++#endif
+ closedir(dir);
+ }
+
+ util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/tags", NULL);
+ dir = opendir(filename);
+ if (dir != NULL) {
++#ifdef __UCLIBC__
++ cleanup_dir(dir, filename, 0, 2);
++#else
+ cleanup_dir(dir, 0, 2);
++#endif
+ closedir(dir);
+ }
+
+ util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/watch", NULL);
+ dir = opendir(filename);
+ if (dir != NULL) {
++#ifdef __UCLIBC__
++ cleanup_dir(dir, filename, 0, 1);
++#else
+ cleanup_dir(dir, 0, 1);
++#endif
+ closedir(dir);
+ }
+
+ util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/firmware-missing", NULL);
+ dir = opendir(filename);
+ if (dir != NULL) {
++#ifdef __UCLIBC__
++ cleanup_dir(dir, filename, 0, 1);
++#else
+ cleanup_dir(dir, 0, 1);
++#endif
+ closedir(dir);
+ }
+ }
+--- udev-168/udev/udev-event.c.orig 2011-04-21 14:05:13.000000000 +0200
++++ udev-168/udev/udev-event.c 2011-04-26 01:09:16.813273489 +0200
+@@ -508,12 +508,19 @@
+ if (fd_stdout < 0 && fd_stderr < 0)
+ return 0;
+
++#ifdef __UCLIBC__
++ fd_ep = epoll_create(1);
++#else
+ fd_ep = epoll_create1(EPOLL_CLOEXEC);
++#endif
+ if (fd_ep < 0) {
+ err = -errno;
+ err(udev, "error creating epoll fd: %m\n");
+ goto out;
+ }
++#ifdef __UCLIBC__
++ fcntl(fd_ep, F_SETFD, FD_CLOEXEC);
++#endif
+
+ if (fd_stdout >= 0) {
+ memset(&ep_outpipe, 0, sizeof(struct epoll_event));
+@@ -698,9 +698,11 @@
+ } else if (WIFSTOPPED(status)) {
+ err(udev, "'%s' [%u] stopped\n", cmd, pid);
+ err = -1;
++#ifdef WIFCONTINUED
+ } else if (WIFCONTINUED(status)) {
+ err(udev, "'%s' [%u] continued\n", cmd, pid);
+ err = -1;
++#endif
+ } else {
+ err(udev, "'%s' [%u] exit with status 0x%04x\n", cmd, pid, status);
+ err = -1;
+@@ -759,18 +759,34 @@
+
+ /* pipes from child to parent */
+ if (result != NULL || udev_get_log_priority(udev) >= LOG_INFO) {
++#ifdef __UCLIBC__
++ if (pipe(outpipe) != 0) {
++#else
+ if (pipe2(outpipe, O_NONBLOCK) != 0) {
++#endif
+ err = -errno;
+ err(udev, "pipe failed: %m\n");
+ goto out;
+ }
++#ifdef __UCLIBC__
++ fcntl(outpipe[0], F_SETFL, O_NONBLOCK);
++ fcntl(outpipe[1], F_SETFL, O_NONBLOCK);
++#endif
+ }
+ if (udev_get_log_priority(udev) >= LOG_INFO) {
++#ifdef __UCLIBC__
++ if (pipe(errpipe) != 0) {
++#else
+ if (pipe2(errpipe, O_NONBLOCK) != 0) {
++#endif
+ err = -errno;
+ err(udev, "pipe failed: %m\n");
+ goto out;
+ }
++#ifdef __UCLIBC__
++ fcntl(errpipe[0], F_SETFL, O_NONBLOCK);
++ fcntl(errpipe[1], F_SETFL, O_NONBLOCK);
++#endif
+ }
+
+ /* allow programs in /lib/udev/ to be called without the path */
+--- udev-168/udev/udevd.c.orig 2011-04-21 14:05:13.000000000 +0200
++++ udev-168/udev/udevd.c 2011-04-26 01:13:39.984103209 +0200
+@@ -256,12 +256,19 @@
+ goto out;
+ }
+
++#ifdef __UCLIBC__
++ fd_ep = epoll_create(1);
++#else
+ fd_ep = epoll_create1(EPOLL_CLOEXEC);
++#endif
+ if (fd_ep < 0) {
+ err(udev, "error creating epoll fd: %m\n");
+ rc = 3;
+ goto out;
+ }
++#ifdef __UCLIBC__
++ fcntl(fd_ep, F_SETFD, FD_CLOEXEC);
++#endif
+
+ memset(&ep_signal, 0, sizeof(struct epoll_event));
+ ep_signal.events = EPOLLIN;
+@@ -826,8 +826,10 @@
+ pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
+ } else if (WIFSTOPPED(status)) {
+ err(udev, "worker [%u] stopped\n", pid);
++#ifdef WIFCONTINUED
+ } else if (WIFCONTINUED(status)) {
+ err(udev, "worker [%u] continued\n", pid);
++#endif
+ } else {
+ err(udev, "worker [%u] exit with status 0x%04x\n", pid, status);
+ }
+@@ -1547,11 +1554,18 @@
+ ep_worker.events = EPOLLIN;
+ ep_worker.data.fd = fd_worker;
+
++#ifdef __UCLIBC__
++ fd_ep = epoll_create(1);
++#else
+ fd_ep = epoll_create1(EPOLL_CLOEXEC);
++#endif
+ if (fd_ep < 0) {
+ err(udev, "error creating epoll fd: %m\n");
+ goto exit;
+ }
++#ifdef __UCLIBC__
++ fcntl(fd_ep, F_SETFD, FD_CLOEXEC);
++#endif
+ if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_ctrl, &ep_ctrl) < 0 ||
+ epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_inotify, &ep_inotify) < 0 ||
+ epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_signal, &ep_signal) < 0 ||
+--- udev-168/libudev/libudev-ctrl.c.orig 2011-04-26 01:20:36.150103207 +0200
++++ udev-168/libudev/libudev-ctrl.c 2011-04-26 01:21:48.940103224 +0200
+@@ -15,6 +15,7 @@
+ #include <stddef.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/poll.h>
+ #include <sys/socket.h>
+@@ -184,11 +185,18 @@
+ conn->refcount = 1;
+ conn->uctrl = uctrl;
+
++#ifdef __UCLIBC__
++ conn->sock = accept(uctrl->sock, NULL, NULL);
++#else
+ conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC);
++#endif
+ if (conn->sock < 0) {
+ free(conn);
+ return NULL;
+ }
++#ifdef __UCLIBC__
++ fcntl(conn->sock, F_SETFD, FD_CLOEXEC);
++#endif
+
+ /* enable receiving of the sender credentials */
+ setsockopt(conn->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+--- udev-168/udev/udevadm-monitor.c.orig 2011-04-26 01:53:44.361103209 +0200
++++ udev-168/udev/udevadm-monitor.c 2011-04-26 01:54:41.946103207 +0200
+@@ -157,11 +157,18 @@
+ sigaddset(&mask, SIGTERM);
+ sigprocmask(SIG_UNBLOCK, &mask, NULL);
+
++#ifdef __UCLIBC__
++ fd_ep = epoll_create(1);
++#else
+ fd_ep = epoll_create1(EPOLL_CLOEXEC);
++#endif
+ if (fd_ep < 0) {
+ err(udev, "error creating epoll fd: %m\n");
+ goto out;
+ }
++#ifdef __UCLIBC__
++ fcntl(fd_ep, F_SETFD, FD_CLOEXEC);
++#endif
+
+ printf("monitor will print the received events for:\n");
+ if (print_udev) {
================================================================
Index: packages/udev/udev.spec
diff -u packages/udev/udev.spec:1.346 packages/udev/udev.spec:1.347
--- packages/udev/udev.spec:1.346 Tue Apr 26 00:08:34 2011
+++ packages/udev/udev.spec Tue Apr 26 02:04:14 2011
@@ -392,7 +392,6 @@
install -p udev-initrd/lib/udev/collect $RPM_BUILD_ROOT%{_libdir}/initrd/udev
install -p udev-initrd/lib/udev/create_floppy_devices $RPM_BUILD_ROOT%{_libdir}/initrd/udev
install -p udev-initrd/lib/udev/firmware $RPM_BUILD_ROOT%{_libdir}/initrd/udev
-install -p udev-initrd/lib/udev/fstab_import $RPM_BUILD_ROOT%{_libdir}/initrd/udev
%endif
%clean
@@ -455,7 +454,6 @@
%attr(755,root,root) /lib/udev/create_floppy_devices
%attr(755,root,root) /lib/udev/collect
%attr(755,root,root) /lib/udev/firmware
-%attr(755,root,root) /lib/udev/fstab_import
%attr(755,root,root) /lib/udev/keyboard-force-release.sh
@@ -521,7 +519,6 @@
# It autogenerates network rules
# /lib/udev/rules.d/75-persistent-net-generator.rules
/lib/udev/rules.d/78-sound-card.rules
-/lib/udev/rules.d/79-fstab_import.rules
/lib/udev/rules.d/80-drivers.rules
/lib/udev/rules.d/95-keyboard-force-release.rules
/lib/udev/rules.d/95-keymap.rules
@@ -584,7 +581,6 @@
%attr(755,root,root) %{_libdir}/initrd/udev/collect
%attr(755,root,root) %{_libdir}/initrd/udev/create_floppy_devices
%attr(755,root,root) %{_libdir}/initrd/udev/firmware
-%attr(755,root,root) %{_libdir}/initrd/udev/fstab_import
%endif
%files initramfs
@@ -599,6 +595,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.347 2011/04/26 00:04:14 baggins
+- updated uClibc patch for real
+- fstab_import is gone
+
Revision 1.346 2011/04/25 22:08:34 baggins
- core R:filesystem with /run
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/udev/udev-uClibc.patch?r1=1.3&r2=1.4&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/udev/udev.spec?r1=1.346&r2=1.347&f=u
More information about the pld-cvs-commit
mailing list