[packages/systemd] - drop static udev-initrd, it just does not have a chance of building
baggins
baggins at pld-linux.org
Tue Mar 12 13:40:39 CET 2013
commit af5a4d298d2cf7187f3ffaacd9e502aa698c568b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Mar 12 13:39:40 2013 +0100
- drop static udev-initrd, it just does not have a chance of building
static-udev.patch | 216 ----------------------------------------
systemd.spec | 151 +---------------------------
udev-uClibc.patch | 288 ------------------------------------------------------
3 files changed, 1 insertion(+), 654 deletions(-)
---
diff --git a/systemd.spec b/systemd.spec
index 2ff0c51..84bbd64 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -1,5 +1,4 @@
# TODO:
-# - initrd needs love (does not build and is probably completly unusable in current form)
# - merge rpm macros provided by systemd with ours
#
# Conditional build:
@@ -11,29 +10,6 @@
%bcond_without selinux # without SELinux support
%bcond_without tcpd # libwrap (tcp_wrappers) support
-%bcond_with initrd # build without udev-initrd
-%bcond_with uClibc # link initrd version with static uClibc
-%bcond_with klibc # link initrd version with static klibc
-%bcond_with dietlibc # link initrd version with static dietlibc (currently broken and unsupported)
-%bcond_without glibc # link initrd version with static glibc
-
-%ifarch sparc sparc64
-%define with_glibc 1
-%endif
-
-# if one of the *libc is enabled disable default uClibc
-%if %{with dietlibc} && %{with uClibc}
-%undefine with_uClibc
-%endif
-
-%if %{with glibc} && %{with uClibc}
-%undefine with_uClibc
-%endif
-
-%if %{with klibc} && %{with uClibc}
-%undefine with_uClibc
-%endif
-
Summary: A System and Service Manager
Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa
Name: systemd
@@ -76,13 +52,10 @@ Patch2: shut-sysv-up.patch
Patch3: pld-sysv-network.patch
Patch4: tmpfiles-not-fatal.patch
Patch6: udev-so.patch
-Patch7: udev-uClibc.patch
Patch8: udev-ploop-rules.patch
Patch9: udevadm-in-sbin.patch
Patch10: net-rename-revert.patch
Patch11: nss-in-rootlib.patch
-# hack set to allow static udev build
-Patch100: static-udev.patch
URL: http://www.freedesktop.org/wiki/Software/systemd
BuildRequires: acl-devel
%{?with_audit:BuildRequires: audit-libs-devel}
@@ -119,23 +92,6 @@ BuildRequires: sed >= 4.0
BuildRequires: usbutils >= 0.82
BuildRequires: xz-devel
BuildRequires: zlib-devel
-%if %{with initrd}
-BuildRequires: acl-static
-BuildRequires: attr-static
-%{?with_dietlibc:BuildRequires: dietlibc-static}
-BuildRequires: glib2-static >= 1:2.22.0
-%{?with_glibc:BuildRequires: glibc-static}
-%{?with_klibc:BuildRequires: klibc-static}
-BuildRequires: kmod-libs-static >= 5
-BuildRequires: libblkid-static >= 2.20
-%{?with_glibc:BuildRequires: libselinux-static >= 2.1.9}
-%{?with_glibc:BuildRequires: libsepol-static}
-%{?with_klibc:BuildRequires: linux-libc-headers}
-BuildRequires: pcre-static
-%{?with_uClibc:BuildRequires: uClibc-static >= 4:0.9.30.3}
-BuildRequires: xz-static
-BuildRequires: zlib-static
-%endif
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: %{name}-units = %{epoch}:%{version}-%{release}
Requires(postun): /usr/sbin/groupdel
@@ -451,7 +407,7 @@ Conflicts: rc-scripts < 0.4.5.3-1
Conflicts: systemd-units < 1:183
Conflicts: udev < 1:118-1
Obsoletes: udev-compat
-%{!?with_initrd:Obsoletes: udev-initrd < %{epoch}:%{version}-%{release}}
+Obsoletes: udev-initrd < %{epoch}:%{version}-%{release}}
%description -n udev-core
A userspace implementation of devfs - core part of udev.
@@ -558,20 +514,6 @@ libgudev API documentation.
%description -n udev-glib-apidocs -l pl.UTF-8
Dokumentacja API libgudev.
-%package -n udev-initrd
-Summary: A userspace implementation of devfs - static binary for initrd
-Summary(pl.UTF-8): Implementacja devfs w przestrzeni użytkownika - statyczna binarka dla initrd
-Group: Base
-Requires: udev-core = %{epoch}:%{version}-%{release}
-Conflicts: geninitrd < 10000.10
-
-%description -n udev-initrd
-A userspace implementation of devfs - static binary for initrd.
-
-%description -n udev-initrd -l pl.UTF-8
-Implementacja devfs w przestrzeni użytkownika - statyczna binarka dla
-initrd.
-
%package -n bash-completion-udev
Summary: bash-completion for udev
Summary(pl.UTF-8): Bashowe dopełnianie składni dla udev
@@ -607,9 +549,6 @@ Wiązania do Systemd dla Pythona.
%patch3 -p1
%patch4 -p1
%patch6 -p1
-%if %{with uClibc}
-%patch7 -p1
-%endif
%patch8 -p1
%patch9 -p1
%patch10 -p1
@@ -623,69 +562,6 @@ cp -p %{SOURCE2} src/systemd_booted.c
%{__autoconf}
%{__autoheader}
%{__automake}
-%if %{with initrd}
-patch -p1 <%{PATCH100}
-%configure \
-%if "%{?configure_cache}" == "1"
- --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
-%endif
- %{?with_uClibc:CC="%{_target_cpu}-uclibc-gcc"} \
- %{?with_dietlibc:CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -D_BSD_SOURCE"} \
- %{?with_klibc:CC="%{_bindir}/klcc"} \
- %{?debug:--enable-debug} \
- --disable-silent-rules \
- --disable-shared \
- --enable-static \
- --disable-audit \
- --disable-gtk-doc \
- --disable-gudev \
- --disable-introspection \
- --disable-keymap \
- --disable-microhttpd \
- --disable-pam \
- --disable-qrencode \
- --disable-selinux \
- --enable-chkconfig \
- --enable-split-usr \
- --with-kbd-loadkeys=/usr/bin/loadkeys \
- --with-kbd-setfont=/bin/setfont \
- --with-sysvinit-path=/etc/rc.d/init.d \
- --with-sysvrcnd-path=/etc/rc.d \
- --with-rc-local-script-path-start=/etc/rc.d/rc.local \
- --with-rc-local-script-path-stop=/sbin/halt.local \
- --with-rootprefix="" \
- --with-rootlibdir=/%{_lib}
-
-%{__make} \
- libudev-core.la \
- systemd-udevd \
- udevadm \
- ata_id \
- cdrom_id \
- collect \
- scsi_id \
- v4l_id \
- accelerometer \
- mtd_probe \
- LDFLAGS="-all-static" \
- KMOD_LIBS="-lkmod -lz -llzma"
-
-mkdir udev-initrd
-cp -a systemd-udevd \
- udevadm \
- ata_id \
- cdrom_id \
- collect \
- scsi_id \
- v4l_id \
- accelerometer \
- mtd_probe \
- udev-initrd/
-
-%{__make} clean
-patch -p1 -R <%{PATCH100}
-%endif
-
%configure \
QUOTAON=/sbin/quotaon \
QUOTACHECK=/sbin/quotacheck \
@@ -760,18 +636,6 @@ cp -a %{SOURCE121} $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/fbdev-blacklist.conf
mv $RPM_BUILD_ROOT%{_mandir}/man8/{systemd-,}udevd.8
echo ".so man8/udevd.8" >$RPM_BUILD_ROOT%{_mandir}/man8/systemd-udevd.8
-%if %{with initrd}
-install -d $RPM_BUILD_ROOT%{_libdir}/initrd/udev
-install -p udev-initrd/udevadm $RPM_BUILD_ROOT%{_libdir}/initrd
-install -p udev-initrd/systemd-udevd $RPM_BUILD_ROOT%{_libdir}/initrd
-# hardlink udevd -> systemd-udevd
-ln $RPM_BUILD_ROOT%{_libdir}/initrd/{systemd-,}udevd
-ln -s udevd $RPM_BUILD_ROOT%{_libdir}/initrd/udevstart
-install -p udev-initrd/*_id $RPM_BUILD_ROOT%{_libdir}/initrd/udev
-install -p udev-initrd/collect $RPM_BUILD_ROOT%{_libdir}/initrd/udev
-install -p udev-initrd/mtd_probe $RPM_BUILD_ROOT%{_libdir}/initrd/udev
-%endif
-
# Main binary has been moved, but we don't want to break existing installs
ln -s ../lib/systemd/systemd $RPM_BUILD_ROOT/bin/systemd
@@ -1517,19 +1381,6 @@ fi
%defattr(644,root,root,755)
%{_gtkdocdir}/gudev
-%if %{with initrd}
-%files -n udev-initrd
-%defattr(644,root,root,755)
-%dir %{_libdir}/initrd/udev
-%attr(755,root,root) %{_libdir}/initrd/systemd-udevd
-%attr(755,root,root) %{_libdir}/initrd/udevd
-%attr(755,root,root) %{_libdir}/initrd/udevadm
-%attr(755,root,root) %{_libdir}/initrd/udevstart
-%attr(755,root,root) %{_libdir}/initrd/udev/*_id
-%attr(755,root,root) %{_libdir}/initrd/udev/collect
-%attr(755,root,root) %{_libdir}/initrd/udev/mtd_probe
-%endif
-
%files -n bash-completion-udev
%defattr(644,root,root,755)
%{_datadir}/bash-completion/completions/udevadm
diff --git a/static-udev.patch b/static-udev.patch
deleted file mode 100644
index 39f7d9e..0000000
--- a/static-udev.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-diff -ur systemd-183.orig/src/shared/cgroup-util.c systemd-183/src/shared/cgroup-util.c
---- systemd-183.orig/src/shared/cgroup-util.c 2012-05-08 13:54:22.000000000 +0200
-+++ systemd-183/src/shared/cgroup-util.c 2012-05-29 12:17:52.837133271 +0200
-@@ -1046,7 +1046,7 @@
- assert(controller);
- assert(path);
-
-- if (!path_is_absolute(path) ||
-+ if (!sd_path_is_absolute(path) ||
- controller[0] == 0 ||
- strchr(controller, ':') ||
- strchr(controller, '/'))
-diff -ur systemd-183.orig/src/shared/conf-parser.c systemd-183/src/shared/conf-parser.c
---- systemd-183.orig/src/shared/conf-parser.c 2012-05-08 13:54:22.000000000 +0200
-+++ systemd-183/src/shared/conf-parser.c 2012-05-29 12:17:29.397134096 +0200
-@@ -635,7 +635,7 @@
- return 0;
- }
-
-- if (!path_is_absolute(rvalue)) {
-+ if (!sd_path_is_absolute(rvalue)) {
- log_error("[%s:%u] Not an absolute path, ignoring: %s", filename, line, rvalue);
- return 0;
- }
-@@ -768,7 +768,7 @@
- continue;
- }
-
-- if (!path_is_absolute(n[k])) {
-+ if (!sd_path_is_absolute(n[k])) {
- log_error("[%s:%u] Not an absolute path, ignoring: %s", filename, line, rvalue);
- free(n[k]);
- continue;
-diff -ur systemd-183.orig/src/shared/install.c systemd-183/src/shared/install.c
---- systemd-183.orig/src/shared/install.c 2012-05-23 00:50:59.000000000 +0200
-+++ systemd-183/src/shared/install.c 2012-05-29 12:17:43.047133614 +0200
-@@ -461,14 +461,14 @@
-
- /* Check if the symlink itself matches what we
- * are looking for */
-- if (path_is_absolute(name))
-+ if (sd_path_is_absolute(name))
- found_path = path_equal(p, name);
- else
- found_path = streq(de->d_name, name);
-
- /* Check if what the symlink points to
- * matches what we are looking for */
-- if (path_is_absolute(name))
-+ if (sd_path_is_absolute(name))
- found_dest = path_equal(dest, name);
- else
- found_dest = streq(path_get_file_name(dest), name);
-@@ -759,7 +759,7 @@
-
- fn = path_get_file_name(*i);
-
-- if (!path_is_absolute(*i) ||
-+ if (!sd_path_is_absolute(*i) ||
- !unit_name_is_valid(fn, true)) {
- if (r == 0)
- r = -EINVAL;
-@@ -972,7 +972,7 @@
- assert(c);
- assert(name_or_path);
-
-- if (path_is_absolute(name_or_path))
-+ if (sd_path_is_absolute(name_or_path))
- return install_info_add(c, NULL, name_or_path);
- else
- return install_info_add(c, name_or_path, NULL);
-diff -ur systemd-183.orig/src/shared/label.c systemd-183/src/shared/label.c
---- systemd-183.orig/src/shared/label.c 2012-05-08 13:54:22.000000000 +0200
-+++ systemd-183/src/shared/label.c 2012-05-29 12:19:01.103797530 +0200
-@@ -274,12 +274,12 @@
- if (!use_selinux() || !label_hnd)
- goto skipped;
-
-- if (path_is_absolute(path))
-+ if (sd_path_is_absolute(path))
- r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFDIR);
- else {
- char *newpath;
-
-- newpath = path_make_absolute_cwd(path);
-+ newpath = sd_path_make_absolute_cwd(path);
- if (!newpath)
- return -ENOMEM;
-
-@@ -348,12 +348,12 @@
- if (!path)
- return -ENOMEM;
-
-- if (path_is_absolute(path))
-+ if (sd_path_is_absolute(path))
- r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFSOCK);
- else {
- char *newpath;
-
-- newpath = path_make_absolute_cwd(path);
-+ newpath = sd_path_make_absolute_cwd(path);
-
- if (!newpath) {
- free(path);
-diff -ur systemd-183.orig/src/shared/path-util.c systemd-183/src/shared/path-util.c
---- systemd-183.orig/src/shared/path-util.c 2012-05-08 13:54:22.000000000 +0200
-+++ systemd-183/src/shared/path-util.c 2012-05-29 12:19:13.310463764 +0200
-@@ -36,7 +36,7 @@
- #include "strv.h"
- #include "path-util.h"
-
--bool path_is_absolute(const char *p) {
-+bool sd_path_is_absolute(const char *p) {
- return p[0] == '/';
- }
-
-@@ -117,13 +117,13 @@
- /* Makes every item in the list an absolute path by prepending
- * the prefix, if specified and necessary */
-
-- if (path_is_absolute(p) || !prefix)
-+ if (sd_path_is_absolute(p) || !prefix)
- return strdup(p);
-
- return strjoin(prefix, "/", p, NULL);
- }
-
--char *path_make_absolute_cwd(const char *p) {
-+char *sd_path_make_absolute_cwd(const char *p) {
- char *cwd, *r;
-
- assert(p);
-@@ -131,7 +131,7 @@
- /* Similar to path_make_absolute(), but prefixes with the
- * current working directory. */
-
-- if (path_is_absolute(p))
-+ if (sd_path_is_absolute(p))
- return strdup(p);
-
- if (!(cwd = get_current_dir_name()))
-@@ -153,7 +153,7 @@
- STRV_FOREACH(s, l) {
- char *t;
-
-- if (!(t = path_make_absolute_cwd(*s)))
-+ if (!(t = sd_path_make_absolute_cwd(*s)))
- return NULL;
-
- free(*s);
-@@ -178,7 +178,7 @@
- STRV_FOREACH(s, l) {
- char *t, *u;
-
-- t = path_make_absolute_cwd(*s);
-+ t = sd_path_make_absolute_cwd(*s);
- free(*s);
-
- if (!t) {
-diff -ur systemd-183.orig/src/shared/path-util.h systemd-183/src/shared/path-util.h
---- systemd-183.orig/src/shared/path-util.h 2012-05-08 23:35:09.000000000 +0200
-+++ systemd-183/src/shared/path-util.h 2012-05-29 12:19:16.157130332 +0200
-@@ -28,9 +28,9 @@
- char **path_split_and_make_absolute(const char *p);
- char *path_get_file_name(const char *p);
- int path_get_parent(const char *path, char **parent);
--bool path_is_absolute(const char *p);
-+bool sd_path_is_absolute(const char *p);
- char *path_make_absolute(const char *p, const char *prefix);
--char *path_make_absolute_cwd(const char *p);
-+char *sd_path_make_absolute_cwd(const char *p);
- char *path_kill_slashes(char *path);
- bool path_startswith(const char *path, const char *prefix);
- bool path_equal(const char *a, const char *b);
-diff -ur systemd-183.orig/src/shared/util.c systemd-183/src/shared/util.c
---- systemd-183.orig/src/shared/util.c 2012-05-22 16:10:22.000000000 +0200
-+++ systemd-183/src/shared/util.c 2012-05-29 12:18:16.643799096 +0200
-@@ -1380,7 +1380,7 @@
- * filename, unless the latter is absolute anyway or the
- * former isn't */
-
-- if (path_is_absolute(filename))
-+ if (sd_path_is_absolute(filename))
- return strdup(filename);
-
- if (!(e = strrchr(path, '/')))
-@@ -5365,7 +5365,7 @@
-
- }
-
--void* memdup(const void *p, size_t l) {
-+void* sd_memdup(const void *p, size_t l) {
- void *r;
-
- assert(p);
-diff -ur systemd-183.orig/src/shared/util.h systemd-183/src/shared/util.h
---- systemd-183.orig/src/shared/util.h 2012-05-21 18:52:49.000000000 +0200
-+++ systemd-183/src/shared/util.h 2012-05-29 12:15:17.357138754 +0200
-@@ -103,7 +103,7 @@
-
- #define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
-
--#define newdup(t, p, n) ((t*) memdup(p, sizeof(t)*(n)))
-+#define newdup(t, p, n) ((t*) sd_memdup(p, sizeof(t)*(n)))
-
- #define malloc0(n) (calloc((n), 1))
-
-@@ -495,7 +495,7 @@
-
- int fd_wait_for_event(int fd, int event, usec_t timeout);
-
--void* memdup(const void *p, size_t l);
-+void* sd_memdup(const void *p, size_t l);
-
- int is_kernel_thread(pid_t pid);
-
diff --git a/udev-uClibc.patch b/udev-uClibc.patch
deleted file mode 100644
index 6d347e9..0000000
--- a/udev-uClibc.patch
+++ /dev/null
@@ -1,288 +0,0 @@
-diff -ur udev-150/src/ata_id/ata_id.c udev-150-uclibc/src/ata_id/ata_id.c
---- udev-150/src/ata_id/ata_id.c 2009-12-08 18:43:09.000000000 +0100
-+++ udev-150-uclibc/src/ata_id/ata_id.c 2010-01-19 17:10:19.000000000 +0100
-@@ -168,7 +168,11 @@
- uint16_t *p;
-
- p = (uint16_t *) identify;
-+#ifdef __UCLIBC__
-+ p[offset_words] = __le16_to_cpu (p[offset_words]);
-+#else
- p[offset_words] = le16toh (p[offset_words]);
-+#endif
- }
-
- /**
-diff -ur udev-150/src/udevadm-info.c udev-150-uclibc/src/udevadm-info.c
---- udev-150/src/udevadm-info.c 2009-12-24 20:40:34.000000000 +0100
-+++ udev-150-uclibc/src/udevadm-info.c 2010-01-19 17:47:00.000000000 +0100
-@@ -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)
-@@ -212,7 +215,12 @@
-
- if (dent->d_name[0] == '.')
- continue;
-+#ifdef __UCLIBC__
-+ 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/src/udev-event.c.orig 2011-04-21 14:05:13.000000000 +0200
-+++ udev-168/src/udev-event.c 2011-04-26 01:09:16.813273489 +0200
-@@ -508,11 +508,18 @@
- if (fd_stdout < 0 && fd_stderr < 0)
- return;
-
-+#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
-
- 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/src/ to be called without the path */
---- udev-168/src/udevd.c.orig 2011-04-21 14:05:13.000000000 +0200
-+++ udev-168/src/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-172/src/udev-ctrl.c.orig 2011-04-26 01:20:36.150103207 +0200
-+++ udev-172/src/udev-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>
-@@ -187,13 +187,22 @@
- 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|SOCK_NONBLOCK);
-+#endif
- if (conn->sock < 0) {
- if (errno != EINTR)
- err(uctrl->udev, "unable to receive ctrl connection: %m\n");
- goto err;
- }
-
-+#ifdef __UCLIBC__
-+ fcntl(conn->sock, F_SETFD, FD_CLOEXEC);
-+ fcntl(conn->sock, F_SETFL, O_NONBLOCK);
-+#endif
-+
- /* check peer credential of connection */
- slen = sizeof(ucred);
- if (getsockopt(conn->sock, SOL_SOCKET, SO_PEERCRED, &ucred, &slen) < 0) {
---- udev-168/src/udevadm-monitor.c.orig 2011-04-26 01:53:44.361103209 +0200
-+++ udev-168/src/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) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/af5a4d298d2cf7187f3ffaacd9e502aa698c568b
More information about the pld-cvs-commit
mailing list