diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-02-26 21:17:34 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-02-26 21:17:34 +0000 |
commit | dc1a14d9cf44bd8543109ba75f5530684402f882 (patch) | |
tree | 65c1c5873d0d5e8dcfbe0ddecd4fd821b806b277 /sys-fs | |
parent | fix up data directory location (/usr/games/share -> /usr/share/games) (Manife... (diff) | |
download | gentoo-2-dc1a14d9cf44bd8543109ba75f5530684402f882.tar.gz gentoo-2-dc1a14d9cf44bd8543109ba75f5530684402f882.tar.bz2 gentoo-2-dc1a14d9cf44bd8543109ba75f5530684402f882.zip |
Fix build error, bug #42377, thanks Greg KH <greg@kroah.com>.
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/udev/ChangeLog | 8 | ||||
-rw-r--r-- | sys-fs/udev/files/digest-udev-018-r2 | 1 | ||||
-rw-r--r-- | sys-fs/udev/files/udev-018-sysfs-build-fix.patch | 125 | ||||
-rw-r--r-- | sys-fs/udev/udev-018-r2.ebuild | 150 |
4 files changed, 283 insertions, 1 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog index 7dc014d09f4c..b9bffad3d33a 100644 --- a/sys-fs/udev/ChangeLog +++ b/sys-fs/udev/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-fs/udev # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.29 2004/02/26 19:40:43 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.30 2004/02/26 21:17:34 azarah Exp $ + +*udev-018-r2 (26 Feb 2004) + + 26 Feb 2004; Martin Schlemmer <azarah@gentoo.org> udev-018-r2.ebuild, + files/udev-018-sysfs-build-fix.patch: + Fix build error, bug #42377, thanks Greg KH <greg@kroah.com>. 26 Feb 2004; Ciaran McCreesh <ciaranm@gentoo.org> udev-018-r1.ebuild: Works on (most) sparc kit, adding ~sparc to the keywords diff --git a/sys-fs/udev/files/digest-udev-018-r2 b/sys-fs/udev/files/digest-udev-018-r2 new file mode 100644 index 000000000000..79abc30e3a8f --- /dev/null +++ b/sys-fs/udev/files/digest-udev-018-r2 @@ -0,0 +1 @@ +MD5 d09f32eb7916ed86b687675899ee6a02 udev-018.tar.bz2 313898 diff --git a/sys-fs/udev/files/udev-018-sysfs-build-fix.patch b/sys-fs/udev/files/udev-018-sysfs-build-fix.patch new file mode 100644 index 000000000000..e9567660e0d3 --- /dev/null +++ b/sys-fs/udev/files/udev-018-sysfs-build-fix.patch @@ -0,0 +1,125 @@ +# fix up libsysfs header file usage to fix bug reports from users that have sysfsutils installed already. + +diff -Nru a/libsysfs/sysfs/libsysfs.h b/libsysfs/sysfs/libsysfs.h +--- a/libsysfs/sysfs/libsysfs.h Mon Feb 23 16:35:20 2004 ++++ b/libsysfs/sysfs/libsysfs.h Mon Feb 23 16:35:20 2004 +@@ -24,7 +24,6 @@ + #define _LIBSYSFS_H_ + + #include <sys/types.h> +-#include "dlist.h" + + /* + * Generic #defines go here.. +@@ -46,6 +45,8 @@ + + #define SYSFS_METHOD_SHOW 0x01 /* attr can be read by user */ + #define SYSFS_METHOD_STORE 0x02 /* attr can be changed by user */ ++ ++struct dlist; + + struct sysfs_attribute { + unsigned char *value; +diff -Nru a/libsysfs/sysfs.h b/libsysfs/sysfs.h +--- a/libsysfs/sysfs.h Mon Feb 23 16:35:20 2004 ++++ b/libsysfs/sysfs.h Mon Feb 23 16:35:20 2004 +@@ -31,6 +31,7 @@ + #include <sys/stat.h> + #include <fcntl.h> + #include <errno.h> ++#include "dlist.h" + + /* Debugging */ + #ifdef DEBUG +diff -Nru a/namedev.c b/namedev.c +--- a/namedev.c Mon Feb 23 16:35:24 2004 ++++ b/namedev.c Mon Feb 23 16:35:24 2004 +@@ -32,8 +32,8 @@ + #include <time.h> + #include <sys/wait.h> + #include <sys/stat.h> +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" + #include "list.h" + #include "udev.h" + #include "udev_version.h" +diff -Nru a/udev-add.c b/udev-add.c +--- a/udev-add.c Mon Feb 23 16:35:24 2004 ++++ b/udev-add.c Mon Feb 23 16:35:24 2004 +@@ -33,8 +33,8 @@ + #ifndef __KLIBC__ + #include <pwd.h> + #endif +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" + #include "udev.h" + #include "udev_version.h" + #include "udev_dbus.h" +diff -Nru a/udev.c b/udev.c +--- a/udev.c Mon Feb 23 16:35:24 2004 ++++ b/udev.c Mon Feb 23 16:35:24 2004 +@@ -26,8 +26,8 @@ + #include <errno.h> + #include <ctype.h> + #include <signal.h> +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" + #include "udev.h" + #include "udev_version.h" + #include "udev_dbus.h" +diff -Nru a/udev_config.c b/udev_config.c +--- a/udev_config.c Mon Feb 23 16:35:24 2004 ++++ b/udev_config.c Mon Feb 23 16:35:24 2004 +@@ -31,8 +31,8 @@ + #include <unistd.h> + #include <errno.h> + #include <ctype.h> +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" + #include "udev.h" + #include "udev_version.h" + #include "logging.h" +diff -Nru a/udevdb.c b/udevdb.c +--- a/udevdb.c Mon Feb 23 16:35:24 2004 ++++ b/udevdb.c Mon Feb 23 16:35:24 2004 +@@ -32,8 +32,8 @@ + #include <sys/stat.h> + #include <errno.h> + #include <signal.h> +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" + #include "udev_version.h" + #include "udev.h" + #include "logging.h" +diff -Nru a/udevinfo.c b/udevinfo.c +--- a/udevinfo.c Mon Feb 23 16:35:24 2004 ++++ b/udevinfo.c Mon Feb 23 16:35:24 2004 +@@ -26,8 +26,9 @@ + #include <stdarg.h> + #include <unistd.h> + #include <errno.h> +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" ++#include "libsysfs/dlist.h" + #include "udev.h" + #include "udev_version.h" + #include "logging.h" +diff -Nru a/udevtest.c b/udevtest.c +--- a/udevtest.c Mon Feb 23 16:35:24 2004 ++++ b/udevtest.c Mon Feb 23 16:35:24 2004 +@@ -26,8 +26,8 @@ + #include <errno.h> + #include <ctype.h> + #include <signal.h> +-#include <sysfs/libsysfs.h> + ++#include "libsysfs/sysfs/libsysfs.h" + #include "udev.h" + #include "udev_version.h" + #include "logging.h" diff --git a/sys-fs/udev/udev-018-r2.ebuild b/sys-fs/udev/udev-018-r2.ebuild new file mode 100644 index 000000000000..92b7912b3d70 --- /dev/null +++ b/sys-fs/udev/udev-018-r2.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-018-r2.ebuild,v 1.1 2004/02/26 21:17:34 azarah Exp $ + +# Note: Cannot use external libsysfs with klibc .. +USE_KLIBC="no" +USE_EXT_LIBSYSFS="no" + +inherit eutils + +DESCRIPTION="Linux dynamic device naming support (aka userspace devfs)" +HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ" +SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~hppa ~amd64 ~sparc" + +DEPEND="virtual/glibc + >=sys-apps/hotplug-20030805-r1 + >=sys-fs/sysfsutils-0.3.0" + +RDEPEND="${DEPEND} + >=sys-apps/baselayout-1.8.6.12-r3" +# We need some changes for devfs type layout + +pkg_setup() { + [ "${USE_KLIBC}" = "yes" ] && check_KV + + return 0 +} + +src_unpack() { + unpack ${A} + + cd ${S} + # No need to clutter the logs ... + sed -ie '/^DEBUG/ c\DEBUG = false' Makefile + # Do not use optimization flags from the package + sed -ie 's|$(OPTIMIZATION)||g' Makefile + + # Make sure there is no sudden changes to udev.rules.devfs + # (more for my own needs than anything else ...) + if [ "`md5sum < "${S}/etc/udev/udev.rules.devfs"`" != \ + "6cac1f863e51de110aef311301f6d58c -" ] + then + echo + eerror "udev.rules.devfs has been updated, please validate!" + die "udev.rules.devfs has been updated, please validate!" + fi + + # Make sure we do not build included libsysfs, but link to + # one in sysfsutils ... + if [ "${USE_EXT_LIBSYSFS}" = "yes" -a "${USE_KLIBC}" != "yes" ] + then + rm -rf ${S}/libsysfs + cp -Rd ${ROOT}/usr/include/sysfs ${S}/libsysfs + fi + + # Setup things for klibc + if [ "${USE_KLIBC}" = "yes" ] + then + ln -snf ${ROOT}/usr/src/linux ${S}/klibc/linux + fi + + # Fix build problem, bug #42377 + epatch ${FILESDIR}/${P}-sysfs-build-fix.patch +} + +src_compile() { + local myconf= + local extras="extras/scsi_id" + + # DBUS support? + if which pkg-config &>/dev/null && pkg-config dbus-1 &>/dev/null + then + myconf="USE_DBUS=true" + fi + + # Device-mapper support? + if false + then + extras="${extras} extras/multipath" + fi + + # Do not work with emake + if [ "${USE_EXT_LIBSYSFS}" = "yes" -a "${USE_KLIBC}" != "yes" ] + then + make EXTRAS="${extras}" \ + udevdir="/dev/" \ + ARCH_LIB_OBJS="-lsysfs" \ + SYSFS="" \ + ${myconf} || die + else + make EXTRAS="${extras}" \ + udevdir="/dev/" \ + ${myconf} || die + fi +} + +src_install() { + dobin udevinfo + into / + dosbin udev udevd udevsend + dosbin extras/scsi_id/scsi_id + # Device-mapper support? + if false + then + dosbin extras/multipath/{multipath,devmap_name} + exeinto /etc/hotplug.d/scsi/ + doexe extras/multipath/multipath.hotplug + fi + + exeinto /etc/udev/scripts + doexe extras/ide-devfs.sh + + insinto /etc/udev + doins ${FILESDIR}/udev.conf +# newins etc/udev/udev.rules udev.rules.example + # For devfs style layout + newins ${FILESDIR}/udev.rules.post_012 udev.rules + # Our own custom udev.permissions + doins ${FILESDIR}/udev.permissions +# doins etc/udev/udev.permissions + insinto /etc + doins extras/scsi_id/scsi_id.config + # DBUS support? + if which pkg-config &>/dev/null && pkg-config dbus-1 &>/dev/null + then + insinto /etc/dbus-1/system.d + doins etc/dbus-1/system.d/udev_sysbus_policy.conf + fi + + dodir /etc/hotplug.d/default + dosym ../../../sbin/udevsend /etc/hotplug.d/default/udev.hotplug + + doman *.8 + doman extras/scsi_id/scsi_id.8 + + dodoc COPYING ChangeLog FAQ HOWTO-udev_for_dev README TODO + dodoc docs/{overview,udev-OLS2003.pdf,udev_vs_devfs} +} + +pkg_preinst() { + if [ -f "${ROOT}/etc/udev/udev.config" -a \ + ! -f "${ROOT}/etc/udev/udev.rules" ] + then + mv -f ${ROOT}/etc/udev/udev.config ${ROOT}/etc/udev/udev.rules + fi +} |