Author: thl
Update of /cvs/free/rpms/buildsys-build-rpmfusion/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv16114
Modified Files:
Makefile
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_ppc64
buildsys-build-rpmfusion-filterfile_x86_64
buildsys-build-rpmfusion-kerneldevpkgs-current
buildsys-build-rpmfusion-list-kernels.sh
buildsys-build-rpmfusion.spec
Log Message:
initial import
--- 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_ppc64 ---
PAE$
smp$
--- NEW FILE buildsys-build-rpmfusion-filterfile_x86_64 ---
smp$
PAE$
--- NEW FILE buildsys-build-rpmfusion-kerneldevpkgs-current ---
2.6.27-0.352.rc7.git1.fc10
2.6.27-0.352.rc7.git1.fc10-smp
2.6.27-0.352.rc7.git1.fc10-PAE
--- 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}"
fi
if [[ "${buildrequires}" ]]; then
echo "BuildRequires: kernel-devel-uname-r = ${this_kernel}"
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}
Epoch: 10
Version: 10
Release: 0.1
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
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
# unneeded
%define debug_package %{nil}
%description
This package contains tools and lists of recent kernels that get used when
building kmod-packages.
%package kerneldevpkgs-current
Summary: Meta-package to get all current kernel-devel packages into the buildroot
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Provides: %{name}-kerneldevpkgs-%{_target_cpu} =
%{?epoch:%{epoch}:}%{version}-%{release}
Provides: %{name}-kerneldevpkgs-current-%{_target_cpu} =
%{?epoch:%{epoch}:}%{version}-%{release}
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} --current --requires --buildrequires --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} --current --requires --buildrequires --prefix %{_sourcedir}/%{name}- |
grep -v '^Requires'
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/current/README
install -p -m 0644 %{SOURCE11} $RPM_BUILD_ROOT/%{_datadir}/%{name}/kerneldevpkgs-current
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
* Sun May 04 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 10:10-0.1
- adjust things for rawhide
-- no xen kernels anymore, so no need for the whole newest and current handling
-- just require kernels unversioned if buildsys-build-rpmfusion-kerneldevpkgs
contains lines with "default"
* Sun May 04 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9:9.0-3
- adjust output for new kernel scheme
* Sun May 04 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9:9.0-2
- add epoch to provides/requires
* Sun May 04 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9:9.0-1
- Build for F9 kernel
* Mon Mar 31 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 2-2
- Update to latest kernels 2.6.24.4-64.fc8 2.6.21.7-3.fc8xen
* Sat Jan 26 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9:1-2
- s/akmods/akmod/
* Wed Jan 09 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 9:1-3
- Build for rawhide
- disable kerneldevpkgs-newest and kerneldevpkgs-current packages, as we
don't maintain them for rawhide
- add epoch for new versioning scheme
* 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
* 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
Index: Makefile
===================================================================
RCS file: /cvs/free/rpms/buildsys-build-rpmfusion/devel/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile 30 Sep 2008 16:44:34 -0000 1.1
+++ Makefile 2 Oct 2008 17:05:32 -0000 1.2
@@ -1,18 +1,18 @@
-# Makefile for source rpm: buildsys-build-rpmfusion
+# Makefile for source rpm: ntfs-kmod
# $Id$
NAME := buildsys-build-rpmfusion
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f
$$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo
"$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ../../../common ; do if [ -f $$d/Makefile.common ]
; then if [ -f $$d/.svn/entries -a -w $$/Makefile.common ] ; then cd $$d ; svn -q update ;
fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
+MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo
"common/Makefile.common" ; } || { echo "ERROR: I can't figure out how
to checkout the 'common' module." ; exit -1 ; } >&2
+test -f .svn/entries && { svn -q checkout $$(svn info |grep '^URL :'|cut
-d' ' -f 3|cut -d/ -f -4)/common && echo
"common/Makefile.common" ; } || { echo "ERROR: I can't figure out how
to checkout the 'common' directory module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))