Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/module-init-tools: ChangeLog module-init-tools-3.4.ebuild
Date: Mon, 08 Oct 2007 23:02:59
Message-Id: E1If1TS-00022Y-Tl@stork.gentoo.org
1 vapier 07/10/08 22:53:18
2
3 Modified: ChangeLog
4 Added: module-init-tools-3.4.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.1.3.12)
8
9 Revision Changes Path
10 1.128 sys-apps/module-init-tools/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/module-init-tools/ChangeLog?rev=1.128&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/module-init-tools/ChangeLog?rev=1.128&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/module-init-tools/ChangeLog?r1=1.127&r2=1.128
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v
19 retrieving revision 1.127
20 retrieving revision 1.128
21 diff -u -r1.127 -r1.128
22 --- ChangeLog 13 Apr 2007 18:28:43 -0000 1.127
23 +++ ChangeLog 8 Oct 2007 22:53:18 -0000 1.128
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-apps/module-init-tools
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.127 2007/04/13 18:28:43 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.128 2007/10/08 22:53:18 vapier Exp $
29 +
30 +*module-init-tools-3.4 (08 Oct 2007)
31 +
32 + 08 Oct 2007; Mike Frysinger <vapier@g.o>
33 + +module-init-tools-3.4.ebuild:
34 + Version bump.
35
36 *module-init-tools-3.2.2-r3 (13 Apr 2007)
37
38
39
40
41 1.1 sys-apps/module-init-tools/module-init-tools-3.4.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: module-init-tools-3.4.ebuild
47 ===================================================================
48 # Copyright 1999-2007 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.4.ebuild,v 1.1 2007/10/08 22:53:18 vapier Exp $
51
52 inherit flag-o-matic eutils toolchain-funcs fixheadtails
53
54 MODUTILS_PV="2.4.27"
55
56 MY_P="${P/_pre/-pre}"
57 DESCRIPTION="Kernel module tools for the 2.6 kernel"
58 HOMEPAGE="http://kerneltools.org/"
59 SRC_URI="mirror://kernel/linux/kernel/people/jcm/module-init-tools/${MY_P}.tar.bz2
60 old-linux? ( mirror://kernel/linux/utils/kernel/modutils/v2.4/modutils-${MODUTILS_PV}.tar.bz2 )"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
65 IUSE="old-linux"
66 # The test code runs `make clean && configure` and screws up src_compile()
67 RESTRICT="test"
68
69 DEPEND="sys-libs/zlib
70 >=sys-apps/baselayout-1.12.7-r2
71 !virtual/modutils"
72 PROVIDE="virtual/modutils"
73
74 S=${WORKDIR}/${MY_P}
75
76 src_unpack() {
77 unpack ${A}
78
79 # Patches for old modutils
80 if use old-linux ; then
81 cd "${WORKDIR}"/modutils-${MODUTILS_PV}
82 epatch "${FILESDIR}"/modutils-2.4.27-alias.patch
83 epatch "${FILESDIR}"/modutils-2.4.27-gcc.patch
84 epatch "${FILESDIR}"/modutils-2.4.27-flex.patch
85 epatch "${FILESDIR}"/modutils-2.4.27-no-nested-function.patch
86 epatch "${FILESDIR}"/modutils-2.4.27-hppa.patch
87 epatch "${FILESDIR}"/modutils-2.4.27-build.patch #154281
88 fi
89
90 # Fixes for new module-init-tools
91 cd "${S}"
92 ht_fix_file tests/test-depmod/10badcommand.sh
93 # Test fails due since it needs to write to /lib/modules so disable it
94 rm -f tests/test-depmod/01backcompat.sh
95
96 # Fix bug 49926: This patch allows generate-modprobe.conf to
97 # accept the --assume-kernel=x.x.x option for generating livecds.
98 # This is a companion to a patch in baselayout-1.9.0 which allows
99 # the same flag to modules-update.
100 epatch "${FILESDIR}"/${PN}-3.1_generate-modprobe-assume-kernel.patch
101
102 # Abort if we fail to run modprobe, bug #68689
103 epatch "${FILESDIR}"/${PN}-3.2_pre7-abort-on-modprobe-failure.patch
104
105 epatch "${FILESDIR}"/${PN}-3.2.2-handle-dupliate-aliases.patch #149426
106
107 # make sure we link dynamically with zlib; our zlib.so is in /lib vs
108 # /usr/lib so it's safe to link with. fixes ugly textrels as well.
109 sed -i \
110 -e 's:-Wl,-Bstatic -lz -Wl,-Bdynamic:-lz:' \
111 configure || die
112
113 # make sure we don't try to regen the manpages
114 touch *.5
115 }
116
117 src_compile() {
118 # Configure script uses BUILDCFLAGS for cross-compiles but this
119 # defaults to CFLAGS which can be bad mojo
120 export BUILDCFLAGS=-pipe
121 export BUILDCC="$(tc-getBUILD_CC)"
122
123 if use old-linux ; then
124 einfo "Building modutils ..."
125 cd "${WORKDIR}"/modutils-${MODUTILS_PV}
126 econf \
127 --disable-strip \
128 --prefix=/ \
129 --enable-insmod-static \
130 --disable-zlib \
131 || die "econf failed"
132 emake || die "emake modutils failed"
133
134 einfo "Building module-init-tools ..."
135 cd "${S}"
136 fi
137
138 econf \
139 --prefix=/ \
140 --enable-zlib \
141 || die "econf failed"
142 emake || die "emake module-init-tools failed"
143 }
144
145 modutils_src_install() {
146 cd "${WORKDIR}"/modutils-${MODUTILS_PV}
147 einstall prefix="${D}" || die
148 docinto modutils-${MODUTILS_PV}
149 dodoc CREDITS ChangeLog NEWS README TODO
150
151 # remove man pages provided by the man-pages package now #124127
152 rm -r "${D}"/usr/share/man/man2
153
154 cd "${S}"
155 # This copies the old version of modutils to *.old so it still works
156 # with kernels <= 2.4; new versions will execve() the .old version if
157 # a 2.4 kernel is running...
158 # This code was borrowed from the module-init-tools Makefile
159 local runme f
160 for f in lsmod modprobe rmmod depmod insmod insmod.static modinfo ; do
161 if [[ -L ${D}/sbin/${f} ]] ; then
162 einfo "Moving symlink $f to ${f}.old"
163 #runme = the target of the symlink with a .old tagged on.
164 runme=$(ls -l "${D}"/sbin/${f} | sed 's/.* -> //').old
165 [[ ! -e ${D}/sbin/${runme} ]] || einfo "${D}/sbin/${runme} not found"
166 dosym ${runme} /sbin/${f} || die
167 elif [[ -e ${D}/sbin/${f} ]] ; then
168 einfo "Moving executable $f to ${f}.old"
169 fi
170 mv -f "${D}"/sbin/${f} "${D}"/sbin/${f}.old
171 done
172 # Move the man pages as well. We only do this for the man pages of the
173 # tools that module-init-tools will replace.
174 for f in "${D}"/usr/share/man/man8/{lsmod,modprobe,rmmod,depmod,insmod}.8
175 do
176 mv -f ${f} ${f%\.*}.old.${f##*\.}
177 done
178 # Fix the ksyms links #35601
179 for f in ksyms kallsyms ; do
180 dosym insmod.old /sbin/${f}
181 dosym insmod.static.old /sbin/${f}.static
182 done
183 }
184
185 src_install() {
186 use old-linux && modutils_src_install
187
188 cd "${S}"
189 emake install DESTDIR="${D}" || die
190 dosym modprobe.conf.5 /usr/share/man/man5/modprobe.d.5
191
192 # Install compat symlink
193 dosym ../bin/lsmod /sbin/lsmod
194 use old-linux && dosym ../sbin/insmod.old /bin/lsmod.old
195 # Install the modules.conf2modprobe.conf tool, so we can update
196 # modprobe.conf.
197 into /
198 dosbin "${S}"/generate-modprobe.conf "${FILESDIR}"/update-modules || die
199 dosym update-modules /sbin/modules-update
200 doman "${FILESDIR}"/update-modules.8
201
202 doman *.[1-8]
203 docinto /
204 dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
205 }
206
207 pkg_postinst() {
208 # cheat to keep users happy
209 if [[ -e ${ROOT}/etc/init.d/modules ]] ; then
210 sed -i 's:modules-update:update-modules:' "${ROOT}"/etc/init.d/modules
211 fi
212 }
213
214
215
216 --
217 gentoo-commits@g.o mailing list