All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 05/10] module-init-tools: bump version + convert to autotools
Date: Sun, 13 Jun 2010 20:50:09 +0200	[thread overview]
Message-ID: <788b81e80da5dbfb884cf064b0ddf275c2fe3df0.1276454802.git.thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <cover.1276454802.git.thomas.petazzoni@free-electrons.com>

The "remove-index" patch is no longer needed, the newer version of
module-init-tools correctly uses strchr().

The "module-init-tools" patch, whose main purpose was to disable the
generation of man pages (it requires docbook2man), is replaced by a
simpler implementation,
module-init-tools-3.11-add-manpages-config-option.patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...nit-tools-3.11-add-manpages-config-option.patch |   47 ++++++++++++
 .../module-init-tools-remove-index.patch           |   12 ---
 package/module-init-tools/module-init-tools.mk     |   80 +++-----------------
 package/module-init-tools/module-init-tools.patch  |   77 -------------------
 4 files changed, 57 insertions(+), 159 deletions(-)
 create mode 100644 package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch
 delete mode 100644 package/module-init-tools/module-init-tools-remove-index.patch
 delete mode 100644 package/module-init-tools/module-init-tools.patch

diff --git a/package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch b/package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch
new file mode 100644
index 0000000..28f51de
--- /dev/null
+++ b/package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch
@@ -0,0 +1,47 @@
+Disable manual pages generation when docbook2man is not available.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile.am  |    7 ++++++-
+ configure.ac |    7 +++----
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+Index: module-init-tools-3.11/Makefile.am
+===================================================================
+--- module-init-tools-3.11.orig/Makefile.am
++++ module-init-tools-3.11/Makefile.am
+@@ -39,7 +39,12 @@
+ MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 modprobe.d.5
+ MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
+ SGML = $(addprefix doc/,  $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))
+-dist_man_MANS = $(MAN5) $(MAN8)
++
++if HAVE_DOCBOOKTOMAN
++MANPAGES  = $(MAN5) $(MAN8)
++endif
++dist_man_MANS = $(MANPAGES)
++
+ # If they haven't overridden mandir, fix it (never /man!)
+ mandir =$(shell if [ @mandir@ = $(prefix)/man ]; then if [ $(prefix) = / ]; then echo /usr/share/man; else echo $(prefix)/share/man; fi; else echo @mandir@; fi)
+ 
+Index: module-init-tools-3.11/configure.ac
+===================================================================
+--- module-init-tools-3.11.orig/configure.ac
++++ module-init-tools-3.11/configure.ac
+@@ -29,13 +29,12 @@
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ 
+-AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man, [no],)
+-if test x"$DOCBOOKTOMAN" = xno
++AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man)
++if test x"$DOCBOOKTOMAN" = x
+ then
+ 	AC_MSG_WARN([docbook2man not found])
+-	# fail with a meaningfull error if $DOCBOOKTOMAN called by the makefile
+-	DOCBOOKTOMAN=docbook2man
+ fi
++AM_CONDITIONAL([HAVE_DOCBOOKTOMAN], [test "x$DOCBOOKTOMAN" != "x"])
+  
+ # Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish
+ # between a broken cc and a working cc but missing libz.a.
diff --git a/package/module-init-tools/module-init-tools-remove-index.patch b/package/module-init-tools/module-init-tools-remove-index.patch
deleted file mode 100644
index 1a2da28..0000000
--- a/package/module-init-tools/module-init-tools-remove-index.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2-patched/modprobe.c
---- module-init-tools-3.2.2/modprobe.c	2005-12-01 17:42:09.000000000 -0600
-+++ module-init-tools-3.2.2-patched/modprobe.c	2006-12-04 19:50:50.353237649 -0600
-@@ -270,7 +270,7 @@
- 	char *modname;
- 
- 	/* Ignore lines without : or which start with a # */
--	ptr = index(line, ':');
-+	ptr = strchr(line, ':');
- 	if (ptr == NULL || line[strspn(line, "\t ")] == '#')
- 		return 0;
- 
diff --git a/package/module-init-tools/module-init-tools.mk b/package/module-init-tools/module-init-tools.mk
index 8adb684..3e8b06b 100644
--- a/package/module-init-tools/module-init-tools.mk
+++ b/package/module-init-tools/module-init-tools.mk
@@ -3,77 +3,17 @@
 # module-init-tools
 #
 #############################################################
-MODULE_INIT_TOOLS_VERSION=3.2.2
+MODULE_INIT_TOOLS_VERSION=3.11
 MODULE_INIT_TOOLS_SOURCE=module-init-tools-$(MODULE_INIT_TOOLS_VERSION).tar.bz2
-MODULE_INIT_TOOLS_CAT:=$(BZCAT)
 MODULE_INIT_TOOLS_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/kernel/module-init-tools/
-MODULE_INIT_TOOLS_DIR=$(BUILD_DIR)/module-init-tools-$(MODULE_INIT_TOOLS_VERSION)
-MODULE_INIT_TOOLS_DIR2=$(TOOLCHAIN_DIR)/module-init-tools-$(MODULE_INIT_TOOLS_VERSION)
-MODULE_INIT_TOOLS_BINARY=depmod
-MODULE_INIT_TOOLS_TARGET_BINARY=$(TARGET_DIR)/sbin/$(MODULE_INIT_TOOLS_BINARY)
+MODULE_INIT_TOOLS_CONF_OPT = \
+	--disable-static-utils \
+	--disable-builddir \
+	--program-transform-name=''
 
-STRIPPROG=$(STRIPCMD)
+# module-init-tools-3.11-add-manpages-config-option.patch is modifying
+# configure.ac and Makefile.am
+MODULE_INIT_TOOLS_AUTORECONF=YES
+HOST_MODULE_INIT_TOOLS_AUTORECONF=YES
 
-$(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE):
-	$(call DOWNLOAD,$(MODULE_INIT_TOOLS_SITE),$(MODULE_INIT_TOOLS_SOURCE))
-
-$(MODULE_INIT_TOOLS_DIR)/.unpacked: $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE)
-	$(MODULE_INIT_TOOLS_CAT) $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
-	toolchain/patch-kernel.sh $(MODULE_INIT_TOOLS_DIR) package/module-init-tools \*.patch
-	$(CONFIG_UPDATE) $(MODULE_INIT_TOOLS_DIR)
-	touch $(MODULE_INIT_TOOLS_DIR)/.unpacked
-
-$(MODULE_INIT_TOOLS_DIR)/.configured: $(MODULE_INIT_TOOLS_DIR)/.unpacked
-	(cd $(MODULE_INIT_TOOLS_DIR); rm -f config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		INSTALL=$(MODULE_INIT_TOOLS_DIR)/install-sh \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/ \
-		--sysconfdir=/etc \
-		--program-transform-name='' \
-	)
-	touch $(MODULE_INIT_TOOLS_DIR)/.configured
-
-$(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY): $(MODULE_INIT_TOOLS_DIR)/.configured
-	$(MAKE) CC=$(TARGET_CC) -C $(MODULE_INIT_TOOLS_DIR)
-	touch -c $(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY)
-
-ifeq ($(BR2_PACKAGE_MODUTILS),y)
-$(MODULE_INIT_TOOLS_TARGET_BINARY): \
-	$(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY) \
-	modutils
-else
-$(MODULE_INIT_TOOLS_TARGET_BINARY): \
-	$(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY)
-endif
-ifeq ($(BR2_PACKAGE_MODUTILS),y)
-	$(MAKE) prefix=$(TARGET_DIR) -C $(MODULE_INIT_TOOLS_DIR) moveold
-endif
-	STRIPPROG='$(STRIPPROG)' \
-	$(MAKE) prefix=$(TARGET_DIR) -C $(MODULE_INIT_TOOLS_DIR) install-exec
-	rm -Rf $(TARGET_DIR)/usr/man
-	rm -f $(TARGET_DIR)/sbin/generate-modprobe.conf
-	rm -f $(TARGET_DIR)/sbin/insmod.static
-	touch -c $(MODULE_INIT_TOOLS_TARGET_BINARY)
-
-module-init-tools: $(MODULE_INIT_TOOLS_TARGET_BINARY)
-
-module-init-tools-clean:
-	$(MAKE) prefix=$(TARGET_DIR)/usr -C $(MODULE_INIT_TOOLS_DIR) uninstall
-	-$(MAKE) -C $(MODULE_INIT_TOOLS_DIR) clean
-
-module-init-tools-dirclean:
-	rm -rf $(MODULE_INIT_TOOLS_DIR)
-
-#############################################################
-#
-## Toplevel Makefile options
-#
-##############################################################
-ifeq ($(BR2_PACKAGE_MODULE_INIT_TOOLS),y)
-TARGETS+=module-init-tools
-endif
+$(eval $(call AUTOTARGETS,package,module-init-tools))
diff --git a/package/module-init-tools/module-init-tools.patch b/package/module-init-tools/module-init-tools.patch
deleted file mode 100644
index 456ef10..0000000
--- a/package/module-init-tools/module-init-tools.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -aur module-init-tools-3.1~orig/Makefile.in module-init-tools-3.1~patched/Makefile.in
---- module-init-tools-3.1~orig/Makefile.in	2004-11-15 01:59:48.000000000 +0100
-+++ module-init-tools-3.1~patched/Makefile.in	2005-03-22 22:10:26.843808464 +0100
-@@ -613,7 +613,7 @@
- check-am: all-am
- 	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
- check: check-am
--all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
-+all-am: Makefile $(PROGRAMS) $(SCRIPTS) 
- 
- installdirs:
- 	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir)
-@@ -760,17 +760,10 @@
- 
- release: check clean tarball testsuite
- 
--moveold: check-for-sbin check-for-old move-old-targets
--
--check-for-sbin:
--	if [ "`echo $(DESTDIR)$(sbindir) | tr -s / /`" = /sbin ]; then :;    \
--	else								     \
--		echo moveold usually only makes sense when installing into /sbin; \
--		exit 1;							     \
--	fi
-+moveold: move-old-targets
- 
- check-for-old:
--	if [ -f /sbin/lsmod.old ]; then					\
-+	if [ -f $(sbindir)/lsmod.old ]; then			\
- 		echo Someone already moved old versions. >&2; exit 1;	\
- 	fi
- 
-@@ -778,27 +771,28 @@
- # RedHat 8.0 doesn't ship with readlink by default.  Use ls -l.
- # Also, make symlink from /bin to /sbin for lsmod (FHS compliant).
- move-old-targets:
-+	if [ ! -f $(sbindir)/lsmod.old ]; then \
- 	for f in lsmod modprobe rmmod depmod insmod modinfo; do		    \
--	    if [ -L /sbin/$$f ]; then					    \
--		ln -sf `ls -l /sbin/$$f | sed 's/.* -> //'`.old /sbin/$$f;  \
-+  	  if [ -L $(sbindir)/$$f ]; then			    \
-+		ln -sf `ls -l $(sbindir)/$$f | sed 's/.* -> //'`.old  $(sbindir)/$$f;  \
- 	    fi;								    \
--	    mv /sbin/$$f /sbin/$$f.old;					    \
--	    if [ -f /usr/share/man/man8/$$f.8.gz ]; then		    \
--		mv /usr/share/man/man8/$$f.8.gz				    \
--			/usr/share/man/man8/$$f.old.8.gz;		    \
--	    elif [ -f /usr/share/man/man8/$$f.8.bz2 ]; then		    \
--	        mv /usr/share/man/man8/$$f.8.bz2			    \
--			/usr/share/man/man8/$$f.old.8.bz2;		    \
--	    else							    \
--	        mv /usr/share/man/man8/$$f.8 /usr/share/man/man8/$$f.old.8; \
-+  	  mv  $(sbindir)/$$f  $(sbindir)/$$f.old;	    \
-+	    if [ -f $(prefix)/usr/share/man/man8/$$f.8.gz ]; then	    \
-+		mv $(prefix)/usr/share/man/man8/$$f.8.gz		    \
-+			$(prefix)/usr/share/man/man8/$$f.old.8.gz;	    \
-+	    elif [ -f $(prefix)/usr/share/man/man8/$$f.8.bz2 ]; then	    \
-+	        mv $(prefix)/usr/share/man/man8/$$f.8.bz2		    \
-+			$(prefix)/usr/share/man/man8/$$f.old.8.bz2;	    \
-+	    elif [ -f $(prefix)/usr/share/man/man8/$$f.8 ]; then	    \
-+	        mv $(prefix)/usr/share/man/man8/$$f.8 /usr/share/man/man8/$$f.old.8; \
- 	    fi;								    \
--	done
-+	done; \
- 	for f in kallsyms ksyms; do					    \
--	    if [ -L /sbin/$$f ]; then					    \
--		ln -sf `ls -l /sbin/$$f | sed 's/.* -> //'`.old /sbin/$$f;  \
-+	    if [ -L $(sbindir)/$$f ]; then			    \
-+		ln -sf `ls -l $(sbindir)/$$f | sed 's/.* -> //'`.old $(sbindir)/$$f;  \
- 	    fi;								    \
--	done
--	ln -s /sbin/lsmod.old /bin/lsmod.old
-+	done; \
-+	fi
- 
- # For installs in /usr/local/sbin
- links:
-- 
1.7.0.4

  parent reply	other threads:[~2010-06-13 18:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-13 18:50 [Buildroot] [pull request] Pull request for branch linux-cleanup Thomas Petazzoni
2010-06-13 18:50 ` [Buildroot] [PATCH 01/10] New, simpler, infrastructure for building the Linux kernel Thomas Petazzoni
2010-06-18 19:30   ` Peter Korsgaard
2010-06-19 14:13     ` Thomas Petazzoni
2010-06-19 19:48       ` Peter Korsgaard
2010-06-20 13:35         ` Thomas Petazzoni
2010-06-20 17:51           ` Peter Korsgaard
2010-06-20 19:22             ` Thomas Petazzoni
2010-06-20 21:08               ` Peter Korsgaard
2010-06-13 18:50 ` [Buildroot] [PATCH 02/10] Remove old Linux infrastructure Thomas Petazzoni
2010-06-13 18:50 ` [Buildroot] [PATCH 03/10] iso9660: take into account the linux changes Thomas Petazzoni
2010-06-18 19:32   ` Peter Korsgaard
2010-06-13 18:50 ` [Buildroot] [PATCH 04/10] module-init-tools: remove support for cross-depmod Thomas Petazzoni
2010-06-13 18:50 ` Thomas Petazzoni [this message]
2010-06-18 19:34   ` [Buildroot] [PATCH 05/10] module-init-tools: bump version + convert to autotools Peter Korsgaard
2010-06-13 18:50 ` [Buildroot] [PATCH 06/10] linux: Add dependency on host-module-init-tools Thomas Petazzoni
2010-06-13 18:50 ` [Buildroot] [PATCH 07/10] Add generic functions to enable/set/disable options in kconfig files Thomas Petazzoni
2010-06-13 18:50 ` [Buildroot] [PATCH 08/10] linux: adjust kernel config according to the Buildroot configuration Thomas Petazzoni
2010-06-18 19:43   ` Peter Korsgaard
2010-06-19 14:24     ` Thomas Petazzoni
2010-06-19 17:45       ` Peter Korsgaard
     [not found]         ` <AANLkTincS1TpfzFUHCVgD5kr8csXcHUuaQzjzOSabD6N@mail.gmail.com>
2010-06-20  7:06           ` Peter Korsgaard
2010-06-13 18:50 ` [Buildroot] [PATCH 09/10] linux: add support for linux26-{menuconfig, xconfig, gconfig} targets Thomas Petazzoni
2010-06-13 18:50 ` [Buildroot] [PATCH 10/10] linux: add support for initramfs Thomas Petazzoni
2010-06-14  1:50 ` [Buildroot] [pull request] Pull request for branch linux-cleanup Paul Jones
2010-06-18  6:46 ` Thomas Petazzoni
2010-06-20 13:37 ` Thomas Petazzoni
2010-06-20 13:51   ` Thomas Petazzoni
2010-06-20 17:52     ` Peter Korsgaard
2010-06-20 19:22       ` Thomas Petazzoni
2010-06-22 20:15         ` Thomas Petazzoni
2010-06-23  9:29           ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=788b81e80da5dbfb884cf064b0ddf275c2fe3df0.1276454802.git.thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.