On Fri, 2006-01-20 at 18:24 +0100, Thorsten Leemhuis wrote: > /me really would like to avoid constructs like > > if [ -n "${kvariant#up}" ] ; then > .... > else > .... > fi > > It looks really a lot nicer without them IMHO. Well, the alternatives with the same functionailty looked much worse in my opinion :) > And, btw, do we really want to support both "up" and "" to build modules > for the standard kernel I don't think that's necessary any more. Maybe some older implementations required it, dunno. Newest versions with "up" == "" support removed and the cleanups made possible by that done (as well as some unneeded bashisms removed): http://cachalot.mine.nu/5/SRPMS/thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4.src.rpm http://cachalot.mine.nu/5/SRPMS/lirc-kmod-0.8.0-1.2.6.15_1.1864_FC5.src.rpm lirc is in much better shape now, it got a upstream version bump and adjustments for 2.6.16-rc. thinkpad still doesn't compile on Rawhide, but diff from it attached because it's more to the point for the purpose of this discussion. Unless there are objections, I'd like to go ahead and commit the above packages plus the -common ones to CVS. Obviously, no builds yet, buildsys still needs some work to be able to produce the kmod packages we're expecting. By the way, in case everyone's not aware of it yet, there are two newish bugs that have an effect on packaging and using the kmod* packages: - yum's installonlyn plugin apparently disregards dependencies: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176257 - missing .kernelrelease file in Rawhide kernel-devel packages: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178491
diff -r -Nu thinkpad-kmod-5.8-8.2.6.14_1.1656_FC4/kmodtool thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4/kmodtool --- thinkpad-kmod-5.8-8.2.6.14_1.1656_FC4/kmodtool 2006-01-17 12:50:47.000000000 +0200 +++ thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4/kmodtool 2006-01-21 22:27:15.000000000 +0200 @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. myprog="kmodtool" -myver="0.10.2" +myver="0.10.3" knownvariants='\(BOOT\|\(big\|huge\)mem\|debug\|enterprise\|kdump\|smp\|uml\|xen\(0\|U\|-\(guest\|hypervisor\)\)\)' kmod_name= kver= @@ -45,8 +45,7 @@ get_variant () { variant="$(echo "${1-$(uname -r)}" | sed 's/^.*'${knownvariants}'$/\1/')" - [ ! "${variant}" = "${1-$(uname -r)}" ] || variant="up" - + [ "${variant}" != "${1-$(uname -r)}" ] || variant='""' } print_variant () @@ -58,14 +57,8 @@ get_rpmtemplate () { - if [[ "${1}" = "up" ]] || [[ "${1}" = "UP" ]] ; then - local variant="" - local dashvariant="" - elif [[ "${1}" ]] ; then - local variant="${1}" - local dashvariant="-${1}" - fi - + local variant="${1}" + local dashvariant="${variant:+-${variant}}" cat <<EOF %package -n kmod-${kmod_name}${dashvariant} Summary: ${kmod_name} kernel module(s) @@ -98,13 +91,13 @@ kver="${1}" get_verrel "${1}" shift - if [[ ! "${kmod_name}" ]]; then + if [ -z "${kmod_name}" ] ; then echo "Please provide the kmodule-name as first parameter." >&2 exit 2 - elif [[ ! "${kver}" ]]; then + elif [ -z "${kver}" ] ; then echo "Please provide the kver as second parameter." >&2 exit 2 - elif [[ ! "${verrel}" ]]; then + elif [ -z "${verrel}" ] ; then echo "Couldn't find out the verrel." >&2 exit 2 fi diff -r -Nu thinkpad-kmod-5.8-8.2.6.14_1.1656_FC4/thinkpad-kmod.spec thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4/thinkpad-kmod.spec --- thinkpad-kmod-5.8-8.2.6.14_1.1656_FC4/thinkpad-kmod.spec 2006-01-17 21:15:56.000000000 +0200 +++ thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4/thinkpad-kmod.spec 2006-01-20 22:37:47.000000000 +0200 @@ -10,7 +10,7 @@ Name: %{kmod_name}-kmod Summary: %{kmod_name} kernel modules Version: 5.8 -Release: 8.%(echo %{kverrel} | tr - _) +Release: 9.%(echo %{kverrel} | tr - _) URL: http://tpctl.sourceforge.net/ Source0: http://download.sf.net/tpctl/thinkpad_%{version}.tar.gz @@ -42,27 +42,22 @@ %patch1 -p0 cd .. for kvariant in %{kvariants} ; do - cp -a %{kmod_name}-%{version}* _kmod_build_${kvariant:-up} + cp -a %{kmod_name}-%{version}* _kmod_build_$kvariant done %build for kvariant in %{kvariants} ; do - if [ -n "${kvariant#up}" ] ; then - ksrc=%{_usrsrc}/kernels/%{kverrel}-$kvariant-%{_target_cpu} - else - kvariant=up - ksrc=%{_usrsrc}/kernels/%{kverrel}-%{_target_cpu} - fi - make %{?_smp_mflags} -C _kmod_build_$kvariant/2.6/drivers V=1 KSRC=$ksrc + make %{?_smp_mflags} -C _kmod_build_$kvariant/2.6/drivers V=1 \ + KSRC=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} done %install rm -rf $RPM_BUILD_ROOT for kvariant in %{kvariants} ; do - make -C _kmod_build_${kvariant:-up}/2.6/drivers install \ - MODULESROOT=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant#up}/extra + make -C _kmod_build_$kvariant/2.6/drivers install \ + MODULESROOT=$RPM_BUILD_ROOT/lib/modules/%{kverrel}$kvariant/extra done chmod u+x $RPM_BUILD_ROOT/lib/modules/*/extra/%{kmod_name}/* @@ -72,6 +67,9 @@ %changelog +* Fri Jan 20 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.8-9 +- Remove "up" == "" support, related cleanups. + * Tue Jan 17 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.8-8 - Add RHEL4 compatibility (packaging, not code).
-- fedora-extras-list mailing list fedora-extras-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-extras-list