Author: thl
Update of /cvs/free/rpms/buildsys-build-rpmfusion/F-8
In directory se02.es.rpmfusion.net:/tmp/cvs-serv1103
Added Files:
buildsys-build-rpmfusion-README
buildsys-build-rpmfusion-filterfile_i586
buildsys-build-rpmfusion-filterfile_i686
buildsys-build-rpmfusion-filterfile_ppc
buildsys-build-rpmfusion-filterfile_x86_64
buildsys-build-rpmfusion-kerneldevpkgs-current
buildsys-build-rpmfusion-kerneldevpkgs-newest
buildsys-build-rpmfusion-list-kernels.sh
buildsys-build-rpmfusion.spec
Log Message:
import from livna
--- NEW FILE buildsys-build-rpmfusion-README ---
This is a metapackage without payload used by the buildsystem
--- NEW FILE buildsys-build-rpmfusion-filterfile_i586 ---
smp$
PAE$
--- NEW FILE buildsys-build-rpmfusion-filterfile_i686 ---
smp$
--- NEW FILE buildsys-build-rpmfusion-filterfile_ppc ---
PAE$
--- NEW FILE buildsys-build-rpmfusion-filterfile_x86_64 ---
smp$
PAE$
--- NEW FILE buildsys-build-rpmfusion-kerneldevpkgs-current ---
2.6.21.7-5.fc8xen
2.6.26.5-28.fc8
2.6.26.5-28.fc8PAE
2.6.26.5-28.fc8smp
--- NEW FILE buildsys-build-rpmfusion-kerneldevpkgs-newest ---
2.6.26.5-28.fc8
2.6.26.5-28.fc8PAE
2.6.26.5-28.fc8smp
--- NEW FILE buildsys-build-rpmfusion-list-kernels.sh ---
#!/bin/bash
#
# buildsys-build-list-kernels.sh - Helper script for building kernel module RPMs for
Fedora
#
# Copyright (c) 2007 Thorsten Leemhuis <fedora(a)leemhuis.info>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
shopt -s extglob
myver="0.0.7"
repo=rpmfusion
myprog="buildsys-build-${repo}-kerneldevpkgs"
supported_targetarchs="i586 i686 x86_64 ppc ppc64"
if [[ -e ./buildsys-build-${repo}-kerneldevpkgs-current ]]; then
prefix=./buildsys-build-${repo}-
else
prefix=/usr/share/buildsys-build-${repo}/
fi
requires=
filterfile=
target=$(uname -m)
show_kernels="current"
print_kernels ()
{
local this_target=${1}
local this_grepoptions=
local this_command=
local this_kernellistfiles=
# which files to use
if [[ "${show_kernels}" == "newest" ]]; then
this_kernellistfiles="${prefix}kerneldevpkgs-newest"
elif [[ "${show_kernels}" == "current" ]]; then
this_kernellistfiles="${prefix}kerneldevpkgs-current"
fi
# error out if not defined
if (( $(stat -c%s "${this_kernellistfiles}") <= 1 )); then
echo "(no kernels defined)"
return 1
fi
# if there are no newest kernels use current ones for newest
# can happen in rawhide
if [[ "${show_kernels}" == "newest" ]] && [[ -e
"${prefix}kerneldevpkgs-newest" ]] && (( $(stat -c%s
"${prefix}kerneldevpkgs-newest") <= 1 )) ; then
this_kernellistfiles="${prefix}kerneldevpkgs-current"
fi
# target
if [[ "${this_target}" ]] ; then
this_grepoptions="${this_grepoptions} --file
${prefix}filterfile_${this_target}"
fi
# custom filterfile
if [[ "${filterfile}" ]]; then
this_grepoptions="${this_grepoptions} --file ${filterfile}"
fi
# do we need grep at all?
if [[ "${this_grepoptions}" ]]; then
this_command="grep --invert-match --no-filename"
else
this_command="cat"
fi
# go
${this_command} ${this_grepoptions} ${this_kernellistfiles} | while read this_kernel; do
this_kernel_verrel=${this_kernel%%$kernels_known_variants}
this_kernel_variant=${this_kernel##$this_kernel_verrel}
if [[ "${requires}" ]] || [[ "${buildrequires}" ]]; then
if echo ${this_kernel} | grep -- 'default' &> /dev/null; then
if [[ "${requires}" ]]; then
echo "Requires:
kernel${this_kernel_variant:+-${this_kernel_variant}}-devel-${this_target}"
fi
if [[ "${buildrequires}" ]]; then
echo "BuildRequires:
kernel${this_kernel_variant:+-${this_kernel_variant}}-devel-${this_target}"
fi
else
if [[ "${requires}" ]]; then
echo "Requires: kernel-devel-uname-r =
${this_kernel_verrel}.${this_target}${this_kernel_variant:+.${this_kernel_variant}}"
fi
if [[ "${buildrequires}" ]]; then
echo "BuildRequires: kernel-devel-uname-r =
${this_kernel_verrel}.${this_target}${this_kernel_variant:+.${this_kernel_variant}}"
fi
fi
else
echo
${this_kernel_verrel}.${this_target}${this_kernel_variant:+.${this_kernel_variant}}
fi
done
}
print_requires ()
{
local this_kernel_verrel
local this_kernel_variant
for this_arch in ${supported_targetarchs}; do
echo $'\n'"%ifarch ${this_arch}"
print_kernels ${this_arch}
echo "%endif"
done
}
myprog_help ()
{
echo "Usage: $(basename ${0}) [OPTIONS]"
echo $'\n'"Prints a list of all avilable kernel-devel packages in the
buildsys, as"$'\n'"defined by the buildsys-buildkmods-all
package."
echo $'\n'"Available options:"
echo " --filterfile <file> -- filter the results with grep --file
<file>"
echo " --current -- only list current up2date kernels"
# echo " --newest -- only list newly released kernels"
echo " --requires -- print list as requires with ifarch section
for"$'\n'" further use in a RPM spec file package
header"
echo " --prefix <dir> -- look for the data files in <prefix>"
echo " --target <arch> -- target-arch (ignored if --requires is
used)"
echo $'\n'"Supported target archs: ${supported_targetarchs}"
}
while [ "${1}" ] ; do
case "${1}" in
--prefix)
shift
if [[ ! "${1}" ]] ; then
echo "Error: Please provide a prefix where to find data-files together with
--prefix" >&2
exit 2
fi
prefix="${1}"
shift
;;
--filterfile)
shift
if [[ ! "${1}" ]] ; then
echo "Error: Please provide path to a filter-file together with
--filterfile" >&2
exit 2
elif [[ ! -e "${1}" ]]; then
echo "Error: Filterfile ${1} not found" >&2
exit 2
fi
filterfile="${1}"
shift
;;
--target)
shift
if [[ ! "${1}" ]] ; then
echo "Error: Please provide one of the supported targets together with
--target" >&2
exit 2
fi
for this_arch in ${supported_targetarchs}; do
if [[ "${this_arch}" = "${1}" ]]; then
target="${1}"
shift
break
fi
done
if [[ ! "${target}" ]]; then
echo "Error: ${1} is not a supported target" >&2
exit 2
fi
;;
--requires)
shift
requires="true"
;;
--buildrequires)
shift
buildrequires="true"
;;
--current)
shift
show_kernels="current"
;;
--newest)
shift
show_kernels="newest"
;;
--help)
myprog_help
exit 0
;;
--version)
echo "${myprog} ${myver}"
exit 0
;;
*)
echo "Error: Unknown option '${1}'."$'\n' >&2
myprog_help >&2
exit 2
;;
esac
done
# more init after parsing command line parameters
if [[ -e ./kmodtool-kernel-variants ]] ; then
kernels_known_variants="$(cat ./kmodtool-kernel-variants)"
elif [[ -e /usr/share/kmodtool/kernel-variants ]] ; then
kernels_known_variants="$(cat /usr/share/kmodtool/kernel-variants)"
else
echo "Could not find /usr/share/kmodtool/kernel-variants (required)"
>&2
exit 2
fi
# sanity checks
if [[ ! "${kernels_known_variants}" ]] ; then
echo "could not determine known kenrel variants"
exit 2
fi
# go
if [[ "${requires}" ]] || [[ "${buildrequires}" ]] ; then
print_requires
else
print_kernels ${target}
fi
--- NEW FILE buildsys-build-rpmfusion.spec ---
%define repo rpmfusion
Name: buildsys-build-%{repo}
Version: 41
Release: 1%{?dist}
Summary: Tools and files used by the %{repo} buildsys
Group: Development/Tools
License: MIT
URL:
http://rpmfusion.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source2: %{name}-list-kernels.sh
Source5: %{name}-README
Source11: %{name}-kerneldevpkgs-current
Source12: %{name}-kerneldevpkgs-newest
Source20: %{name}-filterfile_i586
Source21: %{name}-filterfile_i686
Source22: %{name}-filterfile_x86_64
Source23: %{name}-filterfile_ppc
# provide this to avoid a error when generating akmods packages
Provides: buildsys-build-rpmfusion-kerneldevpkgs-akmod-%{_target_cpu}
# rpmlint will complain this should be a noarch package; but for
# proper builddeps deps it needs to be a non-noarch package
ExclusiveArch: i586 i686 x86_64 ppc ppc64
# unneeded
%define debug_package %{nil}
%description
This package contains tools and lists of recent kernels that get used when
building kmod-packages.
%package kerneldevpkgs-newest
Summary: Meta-package to get newly released kernel-devel packages into the
buildroot
Group: Development/Tools
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: buildsys-build-newest-kernels-livna < 17
Provides: %{name}-kerneldevpkgs-newest-%{_target_cpu} =
%{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{_bindir}/kmodtool
BuildRequires: %{_bindir}/kmodtool
# we use our own magic here to safe ourself to cut'n'paste the BR
%{expand:%(bash %{SOURCE2} --newest --requires --prefix %{_sourcedir}/%{name}-
2>/dev/null)}
%description kerneldevpkgs-newest
This is a meta-package used by the buildsystem to track the kernel-devel
packages for newly released kernels into the buildroot to build
kmods against them.
%files kerneldevpkgs-newest
%defattr(-,root,root,-)
%doc .tmp/newest/README
%package kerneldevpkgs-current
Summary: Meta-package to get all current kernel-devel packages into the buildroot
Group: Development/Tools
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}-kerneldevpkgs-%{_target_cpu} =
%{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}-kerneldevpkgs-current-%{_target_cpu} =
%{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{_bindir}/kmodtool
BuildRequires: %{_bindir}/kmodtool
# we use our own magic here to safe ourself to cut'n'paste the BR
%{expand:%(bash %{SOURCE2} --current --requires --prefix %{_sourcedir}/%{name}-
2>/dev/null)}
%description kerneldevpkgs-current
This is a meta-package used by the buildsystem to track the kernel-devel
packages for all current up-to-date kernels into the buildroot to build
kmods against them.
%files kerneldevpkgs-current
%defattr(-,root,root,-)
%doc .tmp/current/README
%prep
# for debugging purposes output the stuff we use during the rpm generation
bash %{SOURCE2} --newest --requires --prefix %{_sourcedir}/%{name}-
sleep 2
bash %{SOURCE2} --current --requires --prefix %{_sourcedir}/%{name}-
sleep 2
%build
echo nothing to build
%install
rm -rf $RPM_BUILD_ROOT .tmp/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name} $RPM_BUILD_ROOT/%{_bindir} .tmp/newest
.tmp/current
# install the stuff we need
install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/%{_bindir}/%{name}-kerneldevpkgs
install -p -m 0644 %{SOURCE5} .tmp/newest/README
install -p -m 0644 %{SOURCE5} .tmp/current/README
install -p -m 0644 %{SOURCE11} $RPM_BUILD_ROOT/%{_datadir}/%{name}/kerneldevpkgs-current
install -p -m 0644 %{SOURCE12} $RPM_BUILD_ROOT/%{_datadir}/%{name}/kerneldevpkgs-newest
install -p -m 0644 %{SOURCE20} $RPM_BUILD_ROOT/%{_datadir}/%{name}/filterfile_i586
install -p -m 0644 %{SOURCE21} $RPM_BUILD_ROOT/%{_datadir}/%{name}/filterfile_i686
install -p -m 0644 %{SOURCE22} $RPM_BUILD_ROOT/%{_datadir}/%{name}/filterfile_x86_64
install -p -m 0644 %{SOURCE23} $RPM_BUILD_ROOT/%{_datadir}/%{name}/filterfile_ppc
# adjust default-path
sed -i 's|^default_prefix=.*|default_prefix=%{_datadir}/%{name}/|' \
$RPM_BUILD_ROOT/%{_bindir}/%{name}-kerneldevpkgs
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/%{name}/
%changelog
* Thu Oct 02 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 41-1
- Rebuild for RPM Fusion
* Wed Oct 01 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 40-1
- Update to latest kernels 2.6.26.5-28.fc8 2.6.21.7-5.fc8xen
* Sun Sep 21 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 39-1
- Update to latest kernels 2.6.26.3-14.fc8 2.6.21.7-5.fc8xen
* Sat Aug 16 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 38-1
- Update to latest kernels 2.6.25.14-69.fc8 2.6.21.7-3.fc8xen
* Thu Jul 24 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 37-1
- Update to latest kernels 2.6.25.11-60.fc8 2.6.21.7-3.fc8xen
* Tue Jul 15 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 36-1
- Update to latest kernels 2.6.25.10-47.fc8 2.6.21.7-3.fc8xen
* Thu Jul 03 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 35-1
- Update to latest kernels 2.6.21.7-3.fc8xen 2.6.25.9-40.fc8
* Fri Jun 20 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 34-1
- Update to latest kernels 2.6.25.6-27.fc8 2.6.21.7-3.fc8xen
* Fri Jun 06 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 33-1
- Update to latest kernels 2.6.25.4-10.fc8 2.6.21.7-3.fc8xen
* Thu May 15 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 32-1
- Update to latest kernels 2.6.24.7-92.fc8 2.6.21.7-3.fc8xen
* Fri Apr 25 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 31-1
- Update to latest kernels 2.6.24.5-85.fc8 2.6.21.7-3.fc8xen
* Wed Apr 02 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 30-1
- Update to latest kernels 2.6.24.4-64.fc8 2.6.21.7-3.fc8xen
* Wed Mar 26 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 29-1
- Update to latest kernels 2.6.21.7-2.fc8xen 2.6.24.3-50.fc8
* Sun Mar 16 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 28-1
- Update to latest kernels 2.6.24.3-34.fc8 2.6.21.7-2.fc8xen
* Fri Mar 07 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 27-1
- Update to latest kernels 2.6.24.3-12.fc8 2.6.21.7-2.fc8xen
* Mon Feb 11 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 26-1
- Update to latest kernels 2.6.21-2952.fc8xen 2.6.23.15-137.fc8
* Mon Feb 11 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 25-1
- Update to latest kernels 2.6.21-2952.fc8xen 2.6.23.14-137.fc8
* Wed Feb 06 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 24-1
- Update to latest kernels 2.6.23.14-115.fc8 2.6.21-2952.fc8xen
* Tue Jan 15 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 23-1
- Update to latest kernels 2.6.23.14-107.fc8 2.6.21-2952.fc8xen
* Thu Dec 20 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 22-1
- Update to latest kernels 2.6.21-2952.fc8xen 2.6.23.9-85.fc8
* Mon Dec 03 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 21-1
- Update to latest kernels 2.6.23.8-63.fc8 2.6.21-2952.fc8xen
* Sat Nov 10 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 20-1
- Update to latest kernels 2.6.23.1-49.fc8 2.6.21-2950.fc8xen
* Tue Oct 29 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 19-1
- Update to latest kernels 2.6.23.1-41.fc8 2.6.21-2950.fc8xen
* Tue Oct 28 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 18-1
- Update to latest kernels 2.6.23.1-41.fc8 2.6.21-2950.fc8xen
* Sun Oct 28 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 17-3
- don't include file with know variants and instead properly fix the script
* Sun Oct 28 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 17-2
- include file with know variants as it is needed in buildsys
* Sun Oct 28 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 17-1
- split buildsys stuff out into a seperate package
- rename to buildsys-build-rpmfusion
- add proper obsoletes
- give subpackages and files more sane names and places
* Sat Oct 27 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 16-2
- Update to latest kernels 2.6.23.1-35.fc8 2.6.21-2950.fc8xen
* Sat Oct 27 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 16-1
- Update to latest kernels 2.6.23.1-35.fc8 2.6.21-2949.fc8xen
* Thu Oct 18 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 15-1
- rebuilt for latest kernels
* Thu Oct 18 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 14-1
- rebuilt for latest kernels
* Thu Oct 18 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 13-1
- rebuilt for latest kernels
* Thu Oct 18 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 12-1
- rebuilt for latest kernels
* Fri Oct 12 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 11-1
- rebuilt for latest kernels
* Thu Oct 11 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 10-1
- rebuilt for latest kernels
* Wed Oct 10 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9-2
- fix typo
* Wed Oct 10 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9-1
- rebuilt for latest kernels
* Sun Oct 07 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 8-1
- update for 2.6.23-0.224.rc9.git6.fc8
* Sun Oct 07 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 7-1
- update for 2.6.23-0.222.rc9.git1.fc8
* Wed Oct 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 6-1
- update for 2.6.23-0.217.rc9.git1.fc8 and 2.6.21-2947.fc8xen
* Wed Oct 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 5-1
- disable --all-but-latest stuff -- does not work as expected
- rename up2date list of kernels from "latest" to "current" as latest
and newest are to similar in wording; asjust script as well
- kmodtool: don't provide kernel-modules, not needed anymore with
the new stayle and hurts
* Sun Sep 09 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4-2
- fix typos in spec file and list-kernels script
- interdependencies between the two buildsys-build packages needs to be
arch specific as well
* Sun Sep 09 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4-1
- s/latests/latest/
- update kernel lists for rawhide and test2 kernels
- make kmod-helpers-livna-list-kernels print BuildRequires for all kernels
as well; this is not needed and will slow build a bit as it will track
all the kernel-devel packages in, but that way we make sure they are really
available in the buildsys
* Fri Sep 07 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3-4
- implement proper arch deps
* Fri Sep 07 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3-3
- proper list of todays rawhide-kernels
* Fri Sep 07 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3-2
- fix typo in kmod-helpers-livna-latests-kernels
* Fri Sep 07 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3-1
- adjust for devel
* Sat Sep 01 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2-1
- initial package