mash + koji write-signed-rpm
by Rob Myers
why not have mash write a signed rpm out instead of just warning users
when a package has cached signatures, but no signed rpm?
lightly tested patch attached.
rob.
16 years, 10 months
[PATCH 2/3] mock cvs 2007-03: add SUBDIRS to distclean
by Ken MacLeod
Adds SUBDIRS to the make 'distclean' target and 'distclean' to the
sub-directory Makefiles.
---
Makefile | 3 ++-
docs/Makefile | 2 ++
etc/Makefile | 2 ++
src/Makefile | 2 ++
4 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index f3e7214..0dd1094 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,8 @@ clean:
distclean: clean
rm -rf dist build
- rm *.tar.gz
+ rm -f *.tar.gz
+ for d in $(SUBDIRS); do make -C $$d distclean ; done
subdirs:
for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done
diff --git a/docs/Makefile b/docs/Makefile
index 515cddb..0ebb642 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,6 +4,8 @@ all:
clean:
rm -f *.pyc *.pyo *~
+distclean: clean
+
install:
mkdir -p $(DESTDIR)/usr/share/man/man1
install -m 644 mock.1 $(DESTDIR)/usr/share/man/man1/mock.1
diff --git a/etc/Makefile b/etc/Makefile
index f395a1f..5f83ff0 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -4,6 +4,8 @@ all:
clean:
rm -f *.bak *~
+distclean: clean
+
install:
mkdir -p $(DESTDIR)/etc/mock/
for item in *.cfg; do \
diff --git a/src/Makefile b/src/Makefile
index 8e62ea7..14b30e1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -25,6 +25,8 @@ clean:
rm -f $(EXECUTABLE)
rm -f *~ *.bak *.o *.so
+distclean: clean
+
install:
$(MKDIR) -p $(DESTDIR)/$(SBINDIR) $(DESTDIR)/$(LIBDIR)
$(INSTALL) -m 4750 $(EXECUTABLE) $(DESTDIR)/$(SBINDIR)/$(EXECUTABLE)
16 years, 10 months
[PATCH 0/3] mock cvs 2007-03: cross-compiling
by Ken MacLeod
The first patch that follows adds cross-compilation support based on
the model of a "target filesystem" containing target libraries and
headers and a "cross filesystem" (or cross root) containing
cross-compilers for the target. Examples of a mock cfg that uses this
is in the third patch.
The second patch adds SUBDIRS to the Make 'distclean' targets. This
patch can be applied independently of the other two.
The third patch is a 'contrib' of DENX ELDK 4.0 and 4.1 support as an
example and is what I used to test the first patch.
== What these are ==
I've been working with Wind River Linux, MontaVista, TimeSys,
FreeScale LTIB, and DENX ELDK. Most contain their own implementation
of 'rpmbuild' (like tsrpm and mvlrpm) and most can also be used with
'rpmbuild' with appropriate macros. In all cases the pattern is to
have a "target filesystem" (I use /target in the mock chroot) with
target libraries and headers and set CPPFLAGS, LDFLAGS, and others
appropriately, and a "cross filesystem" or "cross root" (I use /cross
in the chroot) where the host cross-compilers get installed, added to
PATH, and supplied through CC and CXX. There are occasional gotchas
with host includes, libraries, libtool, and pkg-config.
The mock root (-r) config specifies the host build config and a new
option --toolkit gives the toolkit to build with, which corresponds to
a new mock configuration file with the target and cross filesystem
info and any special build options. The goal is for toolkit configs
to be reused with several chroots and different toolkits to be used to
build for different cross distributions.
I used DENX ELDK to initially develop these patches because anyone can
download that toolkit without registration or evaluation license to
work with the patches.
These mock patches require a patch to yum to support installing an
architecture unrelated to the host (the target yum conf specifies the
arch of the target fs). The yum patch is to yum 2.4.3 from CentOS4
since our build system is RHEL4.
https://lists.dulug.duke.edu/pipermail/yum-devel/2007-June/003849.html
I haven't had a chance to update these patches to current CVS, I'm
posting them now in case they're useful with the current interest in
cross-compiling on fedora-devel.
-- Ken
16 years, 10 months
EPEL configs merged
by Michael E Brown
All,
I have merged the EPEL configs into the main git repository. These
are the configs posted to the EPEL devel list a few weeks ago.
They will be part of the 0.7.1 release when it comes.
--
Michael
16 years, 10 months
[PATCH 3/3] mock cvs 2007-03: contrib DENX ELDK cross configs
by Ken MacLeod
Adds configuration files and buildsys-build packages for using the
DENX Embedded Linux Development Kit (ELDK) 4.0 and 4.1 on top of
another base or core distribution like RHEL4. It should work with any
ELDK target architecture with little changes. This patch is based on
a Freescale PPC target.
Includes scripts to build Yum repos for ELDK and a Makefile that runs
through a complete bootstrap build process building buildsys-build for
the cross root and target root.
Requires the distclean and cross patches.
---
Makefile | 2
contrib/Makefile | 14 ++
contrib/eldk/Makefile | 99 +++++++++++++++++
.../eldk/buildsys-build-eldk-4.0-ppc-cross.spec | 68 +++++++++++++
contrib/eldk/buildsys-build-eldk-4.0-ppc.spec | 115 +++++++++++++++++++
.../eldk/buildsys-build-eldk-4.1-ppc-cross.spec | 69 +++++++++++++
.../eldk/buildsys-build-eldk-4.1-ppc-fixup.spec | 19 ++++
contrib/eldk/buildsys-build-eldk-4.1-ppc.spec | 119 ++++++++++++++++++++
contrib/eldk/mk-eldk-4.0-ppc-repo.sh | 18 +++
contrib/eldk/mk-eldk-4.1-ppc-repo.sh | 19 +++
etc/eldk-4.0.cfg | 62 ++++++++++
etc/eldk-4.1.cfg | 72 ++++++++++++
12 files changed, 675 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 0dd1094..aa58a6b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS = etc src docs
+SUBDIRS = etc src docs contrib
PKGNAME = mock
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
diff --git a/contrib/Makefile b/contrib/Makefile
new file mode 100644
index 0000000..b0394f2
--- /dev/null
+++ b/contrib/Makefile
@@ -0,0 +1,14 @@
+SUBDIRS = eldk
+
+all:
+ for d in $(SUBDIRS); do make -C $$d all ; done
+
+clean:
+ $(RM) *~
+ for d in $(SUBDIRS); do make -C $$d clean ; done
+
+distclean: clean
+ for d in $(SUBDIRS); do make -C $$d distclean ; done
+
+install:
+ for d in $(SUBDIRS); do make -C $$d install ; done
diff --git a/contrib/eldk/Makefile b/contrib/eldk/Makefile
new file mode 100644
index 0000000..d3558e9
--- /dev/null
+++ b/contrib/eldk/Makefile
@@ -0,0 +1,99 @@
+MOCKCFG=centos-4-i386
+MOCKROOT=/var/lib/mock/${MOCKCFG}
+MOCKTARGCFG=centos-4-i386-eldk
+MOCKTARGROOT=/var/lib/mock/${MOCKTARGCFG}
+
+TOOLKIT_VERSIONS= 4.0 4.1
+
+TIME=/usr/bin/time
+SUDO=sudo
+
+CROSSREPO=$(HOME)/local-repo/$(MOCKCFG)
+
+all:
+ echo "Nothing to do"
+
+clean:
+ rm -f *~
+
+install:
+ echo "Nothing to do"
+
+distclean: clean
+ $(RM) -r buildsys $(CROSSREPO)/eldk-4.?-* SRPMS
+ $(SUDO) rm -rf buildsys-root
+
+SRPMS/buildsys-build-eldk-4.1-ppc-fixup-1.00-1.src.rpm: buildsys-build-eldk-4.1-ppc-fixup.spec
+ rm -rf buildsys
+ mkdir buildsys
+ mkdir -p SRPMS
+ rpmbuild --define "_sourcedir $(PWD)" \
+ --define "_builddir $(PWD)/buildsys" \
+ --define "_srcrpmdir $(PWD)/SRPMS" \
+ -bs $<
+
+$(CROSSREPO)/%/host/repodata/filelists.xml.gz: SRPMS/buildsys-build-eldk-4.1-ppc-fixup-1.00-1.src.rpm
+ $(TIME) mock --autocache -r ${MOCKCFG} `pwd`/$<
+ mkdir -p `dirname $$(dirname $@)`
+ mv ${MOCKROOT}-${USER}/result/*noarch.rpm `dirname $$(dirname $@)`
+ createrepo `dirname $$(dirname $@)`
+
+fixup-rpm: $(CROSSREPO)/eldk-4.1-ppc/host/repodata/filelists.xml.gz
+
+SRPMS/buildsys-build-%-cross-0.5-1.src.rpm: buildsys-build-%-cross.spec
+ rm -rf buildsys
+ mkdir buildsys
+ mkdir -p SRPMS
+ rpmbuild --define "_sourcedir $(PWD)" \
+ --define "_builddir $(PWD)/buildsys" \
+ --define "_srcrpmdir $(PWD)/SRPMS" \
+ -bs $<
+
+$(CROSSREPO)/%/cross/repodata/filelists.xml.gz: SRPMS/buildsys-build-%-cross-0.5-1.src.rpm
+ $(TIME) mock --autocache -r ${MOCKCFG} `pwd`/$<
+ mkdir -p `dirname $$(dirname $@)`
+ mv ${MOCKROOT}-${USER}/result/*noarch.rpm `dirname $$(dirname $@)`
+ createrepo `dirname $$(dirname $@)`
+
+buildsys-%-cross-check: $(CROSSREPO)/%/cross/repodata/filelists.xml.gz
+ $(SUDO) rm -rf buildsys-root
+ mkdir -p buildsys-root/var/lock/rpm
+ perl -ne 'if (($$in = /tk_cross_yum.conf/../^"""/) && ($$in > 1 && $$in !~ /E0/)) { s/%.root_base.s/$(MOCKCFG)/g; ($$a,$$b,$$c)=split(/-/,"$*"); s/%.toolkit.s/$$a-$$b/g; s/%.base_arch.s/$$c/g; print }' \
+ </etc/mock/`echo $* | sed -e 's/-[^-]*$$//g'`.cfg >buildsys-root/check.yum
+ $(TIME) $(SUDO) yum --installroot=`pwd`/buildsys-root \
+ -c buildsys-root/check.yum \
+ install buildsys-build-$*-cross
+
+buildsys-cross-check: buildsys-eldk-4.0-ppc-cross-check buildsys-eldk-4.1-ppc-cross-check
+
+SRPMS/buildsys-build-%-0.5-1.src.rpm: buildsys-build-%.spec
+ rm -rf buildsys
+ mkdir buildsys
+ mkdir -p SRPMS
+ rpmbuild --define "_sourcedir $(PWD)" \
+ --define "_builddir $(PWD)/buildsys" \
+ --define "_srcrpmdir $(PWD)/SRPMS" \
+ -bs $<
+
+$(CROSSREPO)/%/ppc_85xx/repodata/filelists.xml.gz: SRPMS/buildsys-build-%-0.5-1.src.rpm
+ BUILDSYS_BOOT=true \
+ $(TIME) mock -r ${MOCKTARGCFG} \
+ --toolkit=`echo $@ | egrep --only-matching 'eldk-[0-9.]*'` \
+ `pwd`/$<
+ $(RM) -r `dirname $$(dirname $@)`
+ mkdir `dirname $$(dirname $@)`
+ mv ${MOCKTARGROOT}-${USER}/result/*.[pn]*.rpm `dirname $$(dirname $@)`
+ createrepo `dirname $$(dirname $@)`
+
+buildsys-%-check: $(CROSSREPO)/%/ppc_85xx/repodata/filelists.xml.gz
+ $(SUDO) rm -rf buildsys-root
+ mkdir -p buildsys-root/var/lock/rpm
+ perl -ne 'if (($$in = /tk_target_yum.conf/../^"""/) && ($$in > 1 && $$in !~ /E0/)) { s/%.root_base.s/$(MOCKCFG)/g; ($$a,$$b,$$c)=split(/-/,"$*"); s/%.toolkit.s/$$a-$$b/g; s/%.base_arch.s/$$c/g; s/%.target_arch.s/ppc_85xx/g; print }' \
+ </etc/mock/`echo $* | sed -e 's/-[^-]*$$//g'`.cfg >buildsys-root/check.yum
+ $(TIME) $(SUDO) yum --installroot=`pwd`/buildsys-root \
+ -c buildsys-root/check.yum \
+ install buildsys-build-`basename $*`\*
+
+buildsys-target-check: buildsys-eldk-4.0-ppc-check buildsys-eldk-4.1-ppc-check
+
+buildsys-check: buildsys-cross-check buildsys-target-check
diff --git a/contrib/eldk/buildsys-build-eldk-4.0-ppc-cross.spec b/contrib/eldk/buildsys-build-eldk-4.0-ppc-cross.spec
new file mode 100644
index 0000000..33d43da
--- /dev/null
+++ b/contrib/eldk/buildsys-build-eldk-4.0-ppc-cross.spec
@@ -0,0 +1,68 @@
+Summary: The base set of packages for a mock chroot ELDK cross
+Name: buildsys-build-eldk-4.0-ppc-cross
+Version: 0.5
+Release: 1%{?dist}
+License: GPL
+Group: Development/Build Tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
+
+# packages that populate a buildsys chroot
+Requires: rpm
+Requires: texinfo
+Requires: gdb-ppc
+Requires: make-doc
+Requires: mkimage
+Requires: mtd_utils
+Requires: mkcramfs
+Requires: rpm-build
+Requires: crosstool-powerpc-devel
+Requires: make-ppc
+Requires: ldd-ppc
+Requires: genext2fs
+
+# host provides
+Provides: /bin/bash
+Provides: tetex
+Provides: bash
+Provides: perl(Getopt::Long)
+Provides: /bin/sh
+Provides: perl == 5.006001
+Provides: /usr/bin/perl
+Provides: perl(File::Basename)
+Provides: perl(strict)
+
+%description
+The base set of packages for a mock chroot
+
+%build
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT/usr/bin
+mkdir -p $RPM_BUILD_ROOT/bin
+
+ln -s rpm $RPM_BUILD_ROOT/bin/ppc-linux-rpm
+ln -s rpmbuild $RPM_BUILD_ROOT/usr/bin/ppc-linux-rpmbuild
+
+for target_arch in ppc_6xx ppc_74xx ppc_85xx ppc_8xx; do
+
+ for link in addr2line ar as c++ c++filt cpp g++ gcc gdb ld ldd \
+ make nm objcopy objdump ranlib readelf run size strings strip; \
+ do
+ ln -s ppc-linux-$link $RPM_BUILD_ROOT/usr/bin/${target_arch}-$link
+ done
+
+ ln -s rpm $RPM_BUILD_ROOT/bin/${target_arch}-rpm
+ ln -s ../target $RPM_BUILD_ROOT/$target_arch
+done
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc
+/usr/bin/*
+/bin/*
+/ppc*
diff --git a/contrib/eldk/buildsys-build-eldk-4.0-ppc.spec b/contrib/eldk/buildsys-build-eldk-4.0-ppc.spec
new file mode 100644
index 0000000..83c6431
--- /dev/null
+++ b/contrib/eldk/buildsys-build-eldk-4.0-ppc.spec
@@ -0,0 +1,115 @@
+Summary: The base set of packages for a mock chroot denx target
+Name: buildsys-build-eldk-4.0-ppc
+Version: 0.5
+Release: 1%{?dist}
+License: GPL
+Source0: linux-2.6.15.tar.bz2
+Group: Development/Build Tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
+
+# generic build packages that populate a buildsys chroot
+Requires: bash-ppc_85xx
+#Requires: buildsys-macros
+Requires: bzip2-ppc_85xx
+Requires: coreutils-ppc_85xx
+Requires: cpio-ppc_85xx
+Requires: diffutils-ppc_85xx
+#Requires: fedora-release
+Requires: gcc-ppc_85xx
+Requires: gcc-c++-ppc_85xx
+Requires: gzip-ppc_85xx
+Requires: make-ppc_85xx
+Requires: patch-ppc_85xx
+#Requires: perl
+Requires: rpm-build-ppc_85xx
+#Requires: redhat-rpm-config
+Requires: sed-ppc_85xx
+Requires: tar-ppc_85xx
+#Requires: unzip
+#Requires: which
+
+# ELDK-specific requires
+Requires: crosstool-targetcomponents-ppc_85xx
+Requires: kernel-headers
+
+# broken dependencies in ELDK due to Fedora-repackaging without
+# removing dependent content
+
+Provides: automake-ppc_85xx == 1.4
+Provides: beecrypt-devel-ppc_85xx
+Provides: dev-ppc_85xx
+Provides: elfutils-devel-ppc_85xx
+Provides: /etc/redhat-release
+Provides: ethtool-ppc_85xx == 1.8-2
+Provides: fileutils-ppc_85xx
+Provides: glibc-devel-ppc_85xx == 2.2.90-12
+Provides: hwdata-ppc_85xx
+Provides: info-ppc_85xx
+Provides: kernel-ppc_85xx == 2.6
+Provides: libgcc-ppc_85xx == 4.0.0-1
+Provides: libstdc++-devel-ppc_85xx == 4.0.0
+Provides: libstdc++-ppc_85xx == 4.0.0
+Provides: libtool-libs-ppc_85xx == 1.5.16.multilib2-2_1
+Provides: mount-ppc_85xx == 2.11l
+Provides: nroff-i18n-ppc_85xx
+Provides: /opt/eldk/build/ppc-2006-01-11/work/ppc_85xx/etc/pam.d/system-auth
+Provides: perl(Carp)
+Provides: perl(constant)
+Provides: perl(Cwd)
+Provides: perl(Data::Dumper)
+Provides: perl(DynaLoader)
+Provides: perl(Errno)
+Provides: perl(Exporter)
+Provides: perl(File::Basename)
+Provides: perl(File::Compare)
+Provides: perl(File::Copy)
+Provides: perl(File::Find)
+Provides: perl(File::Spec)
+Provides: perl(File::stat)
+Provides: perl(Getopt::Long)
+Provides: perl(getopts.pl)
+Provides: perl(Getopt::Std)
+Provides: perl(integer)
+Provides: perl(IO::File)
+Provides: perl(Net::SMTP)
+Provides: perl(POSIX)
+Provides: perl-ppc_85xx == 5.006001
+Provides: perl-ppc_85xx == 5.6.1
+Provides: perl(Socket)
+Provides: perl(strict)
+Provides: perl(Term::ReadLine)
+Provides: perl(Text::ParseWords)
+Provides: perl(vars)
+Provides: /sbin/chkconfig
+Provides: /sbin/install-info
+Provides: /sbin/nash
+Provides: /sbin/runuser
+Provides: sh-utils-ppc_85xx
+Provides: textutils-ppc_85xx
+Provides: /usr/bin/perl
+Provides: /usr/sbin/groupadd
+Provides: /usr/sbin/useradd
+
+%description
+The base set of packages for a mock chroot
+
+%prep
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT
+cd $RPM_BUILD_ROOT
+tar xjf %{SOURCE0}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc
+/usr/src/linux-2.6.15
+/usr/src/linux
diff --git a/contrib/eldk/buildsys-build-eldk-4.1-ppc-cross.spec b/contrib/eldk/buildsys-build-eldk-4.1-ppc-cross.spec
new file mode 100644
index 0000000..44f35ef
--- /dev/null
+++ b/contrib/eldk/buildsys-build-eldk-4.1-ppc-cross.spec
@@ -0,0 +1,69 @@
+Summary: The base set of packages for a mock chroot ELDK cross
+Name: buildsys-build-eldk-4.1-ppc-cross
+Version: 0.5
+Release: 1%{?dist}
+License: GPL
+Group: Development/Build Tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
+
+# packages that populate a buildsys chroot
+Requires: crosstool-powerpc-devel
+Requires: gdb-ppc
+Requires: genext2fs
+Requires: ldd-ppc
+Requires: make-doc
+Requires: make-ppc
+Requires: mkcramfs
+Requires: mkimage
+Requires: mtd_utils
+Requires: popt
+Requires: rpm
+Requires: rpm-build
+Requires: texinfo
+
+# host provides
+Provides: /bin/bash
+Provides: tetex
+Provides: bash
+Provides: perl(Getopt::Long)
+Provides: /bin/sh
+Provides: perl == 5.006001
+Provides: /usr/bin/perl
+Provides: perl(File::Basename)
+Provides: perl(strict)
+
+%description
+The base set of packages for a mock chroot
+
+%build
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT/usr/bin
+mkdir -p $RPM_BUILD_ROOT/bin
+
+ln -s rpm $RPM_BUILD_ROOT/bin/ppc-linux-rpm
+ln -s rpmbuild $RPM_BUILD_ROOT/usr/bin/ppc-linux-rpmbuild
+
+for target_arch in ppc_6xx ppc_74xx ppc_85xx ppc_8xx; do
+
+ for link in addr2line ar as c++ c++filt cpp g++ gcc gdb ld ldd \
+ make nm objcopy objdump ranlib readelf run size strings strip; \
+ do
+ ln -s ppc-linux-$link $RPM_BUILD_ROOT/usr/bin/${target_arch}-$link
+ done
+
+ ln -s rpm $RPM_BUILD_ROOT/bin/${target_arch}-rpm
+ ln -s ../target $RPM_BUILD_ROOT/$target_arch
+done
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc
+/usr/bin/*
+/bin/*
+/ppc*
diff --git a/contrib/eldk/buildsys-build-eldk-4.1-ppc-fixup.spec b/contrib/eldk/buildsys-build-eldk-4.1-ppc-fixup.spec
new file mode 100644
index 0000000..3b07b14
--- /dev/null
+++ b/contrib/eldk/buildsys-build-eldk-4.1-ppc-fixup.spec
@@ -0,0 +1,19 @@
+Summary: DENX ELDK 4.1 host chroot setup RPM
+Name: buildsys-build-eldk-4.1-ppc-fixup
+Version: 1.00
+Release: 1
+License: GPL
+Group: Development/Build Tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
+
+%description
+Chroot finalization for cross compiling using the DENX ELDK 4.1
+toolkit.
+
+%post
+cd /usr/src
+ln -s linux-* linux
+
+%files
+%defattr(-,root,root,-)
diff --git a/contrib/eldk/buildsys-build-eldk-4.1-ppc.spec b/contrib/eldk/buildsys-build-eldk-4.1-ppc.spec
new file mode 100644
index 0000000..d0fee0f
--- /dev/null
+++ b/contrib/eldk/buildsys-build-eldk-4.1-ppc.spec
@@ -0,0 +1,119 @@
+Summary: The base set of packages for a mock chroot denx target
+Name: buildsys-build-eldk-4.1-ppc
+Version: 0.5
+Release: 1%{?dist}
+License: GPL
+Group: Development/Build Tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
+
+# generic build packages that populate a buildsys chroot
+Requires: bash-ppc_85xx
+#Requires: buildsys-macros
+Requires: bzip2-ppc_85xx
+Requires: coreutils-ppc_85xx
+Requires: cpio-ppc_85xx
+Requires: diffutils-ppc_85xx
+#Requires: fedora-release
+Requires: gcc-ppc_85xx
+Requires: gcc-c++-ppc_85xx
+Requires: gzip-ppc_85xx
+Requires: make-ppc_85xx
+Requires: patch-ppc_85xx
+#Requires: perl
+Requires: rpm-build-ppc_85xx
+#Requires: redhat-rpm-config
+Requires: sed-ppc_85xx
+Requires: tar-ppc_85xx
+#Requires: unzip
+#Requires: which
+
+# ELDK-specific requires
+Requires: crosstool-targetcomponents-ppc_85xx
+Requires: kernel-headers
+
+# broken dependencies in ELDK due to Fedora-repackaging without
+# removing dependent content
+
+# in 4.1, it looks like dependent packages may be requiring -ppc_85xx
+# or -ppc_4xx versions of the noarch packages
+
+Provides: perl-ppc_4xx
+Provides: autoconf-ppc_85xx == 2.50
+Provides: automake-ppc_85xx == 1.4
+Provides: beecrypt-devel-ppc_85xx
+Provides: dev-ppc_85xx
+Provides: elfutils-devel-ppc_85xx
+Provides: /etc/redhat-release
+Provides: ethtool-ppc_85xx == 1.8-2
+Provides: fileutils-ppc_85xx
+Provides: glibc-devel-ppc_85xx == 2.2.90-12
+Provides: hwdata-ppc_85xx
+Provides: info-ppc_85xx
+Provides: kernel-headers-ppc_85xx
+Provides: kernel-ppc_85xx == 2.6
+Provides: libgcc-ppc_85xx == 4.0.0-4
+Provides: libstdc++-devel-ppc_85xx == 4.0.0
+Provides: libstdc++-ppc_85xx == 4.0.0
+Provides: libtool-libs-ppc_85xx == 1.5.16.multilib2-2_2
+Provides: mount-ppc_85xx == 2.11l
+Provides: nroff-i18n-ppc_85xx
+Provides: /opt/eldk/build/ppc-2006-01-11/work/ppc_85xx/etc/pam.d/system-auth
+Provides: perl(Carp)
+Provides: perl(constant)
+Provides: perl(Cwd)
+Provides: perl(Data::Dumper)
+Provides: perl(DynaLoader)
+Provides: perl(Errno)
+Provides: perl(Exporter)
+Provides: perl(File::Basename)
+Provides: perl(File::Compare)
+Provides: perl(File::Copy)
+Provides: perl(File::Find)
+Provides: perl(File::Spec)
+Provides: perl(File::stat)
+Provides: perl(Getopt::Long)
+Provides: perl(getopts.pl)
+Provides: perl(Getopt::Std)
+Provides: perl(integer)
+Provides: perl(IO::File)
+Provides: perl(Net::SMTP)
+Provides: perl(POSIX)
+Provides: perl-ppc_85xx == 5.006001
+Provides: perl-ppc_85xx == 5.6.1
+Provides: perl(Socket)
+Provides: perl(strict)
+Provides: perl(Term::ReadLine)
+Provides: perl(Text::ParseWords)
+Provides: perl(vars)
+Provides: /sbin/chkconfig
+Provides: /sbin/install-info
+Provides: /sbin/nash
+Provides: /sbin/runuser
+Provides: sh-utils-ppc_85xx
+Provides: textutils-ppc_85xx
+Provides: /usr/bin/perl
+Provides: /usr/bin/python
+Provides: /usr/sbin/groupadd
+Provides: /usr/sbin/useradd
+
+%description
+The base set of packages for a mock chroot
+
+%prep
+
+%build
+
+%install
+
+mkdir -p $RPM_BUILD_ROOT/usr/include
+for ii in asm mtd linux; do
+ ln -s ../src/linux/include/$ii $RPM_BUILD_ROOT/usr/include
+done
+
+%clean
+
+%files
+%defattr(-,root,root,-)
+%doc
+/usr/include/*
diff --git a/contrib/eldk/mk-eldk-4.0-ppc-repo.sh b/contrib/eldk/mk-eldk-4.0-ppc-repo.sh
new file mode 100644
index 0000000..78ed4f4
--- /dev/null
+++ b/contrib/eldk/mk-eldk-4.0-ppc-repo.sh
@@ -0,0 +1,18 @@
+set -ex
+
+ISOTOP=/net/192.168.1.17/../../misc/ppc-denx
+YUMTOP=$HOME/repo/eldk-4.0-ppc
+
+rm -rf $YUMTOP
+
+function mkrepo() {
+ mkdir -p $2
+ cp -as $1/*.rpm $2
+ createrepo $2
+}
+
+mkrepo $ISOTOP/RPMS $YUMTOP/host
+
+for target_arch in ppc_6xx ppc_74xx ppc_85xx ppc_8xx; do
+ mkrepo $ISOTOP/$target_arch/RPMS $YUMTOP/$target_arch
+done
diff --git a/contrib/eldk/mk-eldk-4.1-ppc-repo.sh b/contrib/eldk/mk-eldk-4.1-ppc-repo.sh
new file mode 100644
index 0000000..693250e
--- /dev/null
+++ b/contrib/eldk/mk-eldk-4.1-ppc-repo.sh
@@ -0,0 +1,19 @@
+set -ex
+
+ISOTOP=/net/192.168.1.17/../../misc/eldk-4.1-ppc
+YUMTOP=$HOME/repo/eldk-4.1-ppc
+
+rm -rf $YUMTOP
+
+function mkrepo() {
+ mkdir -p $2
+ cp -as $1/*.rpm $2
+ createrepo $2
+}
+
+mkrepo $ISOTOP/RPMS $YUMTOP/host
+mkrepo $ISOTOP/common/RPMS/noarch $YUMTOP/noarch
+
+for target_arch in ppc_6xx ppc_74xx ppc_85xx ppc_8xx; do
+ mkrepo $ISOTOP/$target_arch/RPMS $YUMTOP/$target_arch
+done
diff --git a/etc/eldk-4.0.cfg b/etc/eldk-4.0.cfg
new file mode 100644
index 0000000..eedbc7b
--- /dev/null
+++ b/etc/eldk-4.0.cfg
@@ -0,0 +1,62 @@
+#!/usr/bin/python -tt
+
+if config_opts['target_arch'][0:3] == 'ppc':
+ config_opts['base_arch'] = 'ppc'
+elif config_opts['target_arch'][0:3] == 'arm':
+ config_opts['base_arch'] = 'arm'
+elif config_opts['target_arch'][0:4] == 'mips':
+ config_opts['base_arch'] = 'mips'
+
+config_opts['macros'] = """
+%%_topdir %s/build
+%%_tmppath /tmp
+%%_rpmfilename %%%%{NAME}-%%%%{VERSION}-%%%%{RELEASE}.%%%%{ARCH}.rpm
+""" % config_opts['chroothome']
+config_opts['tk_env'] = 'PATH=/cross/usr/bin:/cross/bin:$PATH CROSS_COMPILE=%s-' % config_opts['target_arch']
+config_opts['tk_target_option'] = ''
+config_opts['tk_rpmmacros'] = '.eldk_rpmmacros'
+config_opts['tk_cross_chroot_setup_cmd'] = 'install buildsys-build-%(toolkit)s-%(base_arch)s-cross' \
+ % config_opts
+config_opts['tk_cross_yum.conf'] = """
+[main]
+cachdir=/var/cache/yum
+debuglevel=1
+logfile=/var/log/yum.log
+reposdir=/dev/null
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+
+[core]
+name=core
+baseurl=file:///home/ken/repo/%(toolkit)s-%(base_arch)s/host
+
+[local]
+name=local
+baseurl=file:///home/ken/local-repo/%(root_base)s/%(toolkit)s-%(base_arch)s/host
+""" % config_opts
+
+if not os.environ.has_key('BUILDSYS_BOOT'):
+ config_opts['tk_target_chroot_setup_cmd'] = 'install buildsys-build-%s' % config_opts['toolkit']
+ config_opts['tk_target_yum.conf'] = """
+[main]
+cachdir=/var/cache/yum
+debuglevel=1
+logfile=/var/log/yum.log
+reposdir=/dev/null
+retries=20
+obsoletes=1
+gpgcheck=0
+arch=%(base_arch)s
+assumeyes=1
+
+[core]
+name=core
+exclude=libgcc-* popt-*-1.10.1-22_1
+baseurl=file:///home/ken/repo/%(toolkit)s-%(base_arch)s/%(target_arch)s
+
+[local]
+name=local
+baseurl=file:///home/ken/local-repo/%(root_base)s/%(toolkit)s-%(base_arch)s/%(target_arch)s
+""" % config_opts
diff --git a/etc/eldk-4.1.cfg b/etc/eldk-4.1.cfg
new file mode 100644
index 0000000..040773f
--- /dev/null
+++ b/etc/eldk-4.1.cfg
@@ -0,0 +1,72 @@
+#!/usr/bin/python -tt
+
+if config_opts['target_arch'][0:3] == 'ppc':
+ config_opts['base_arch'] = 'ppc'
+elif config_opts['target_arch'][0:3] == 'arm':
+ config_opts['base_arch'] = 'arm'
+elif config_opts['target_arch'][0:4] == 'mips':
+ config_opts['base_arch'] = 'mips'
+
+config_opts['macros'] = """
+%%_topdir %s/build
+%%_tmppath /tmp
+%%_rpmfilename %%%%{NAME}-%%%%{VERSION}-%%%%{RELEASE}.%%%%{ARCH}.rpm
+""" % config_opts['chroothome']
+config_opts['tk_env'] \
+ = 'PATH=/cross/usr/bin:/cross/bin:$PATH CROSS_COMPILE=%s-' \
+ % config_opts['target_arch']
+config_opts['tk_target_option'] = ''
+config_opts['tk_rpmmacros'] = '.eldk_rpmmacros'
+config_opts['tk_fixup_cmd'] \
+ = 'install buildsys-build-%(toolkit)s-%(base_arch)s-fixup' % config_opts
+
+config_opts['tk_cross_chroot_setup_cmd'] \
+ = 'install buildsys-build-%(toolkit)s-%(base_arch)s-cross' % config_opts
+config_opts['tk_cross_yum.conf'] = """
+[main]
+cachdir=/var/cache/yum
+debuglevel=1
+logfile=/var/log/yum.log
+reposdir=/dev/null
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+
+[core]
+name=core
+baseurl=file:///home/ken/repo/%(toolkit)s-%(base_arch)s/host
+
+[local]
+name=local
+baseurl=file:///home/ken/local-repo/%(root_base)s/%(toolkit)s-%(base_arch)s/host
+""" % config_opts
+
+if not os.environ.has_key('BUILDSYS_BOOT'):
+ config_opts['tk_target_chroot_setup_cmd'] \
+ = 'install buildsys-build-%(toolkit)s-%(base_arch)s kernel-source' % config_opts
+ config_opts['tk_target_yum.conf'] = """
+[main]
+cachdir=/var/cache/yum
+debuglevel=1
+logfile=/var/log/yum.log
+reposdir=/dev/null
+retries=20
+obsoletes=1
+gpgcheck=0
+arch=%(base_arch)s
+assumeyes=1
+
+[core]
+name=core
+#exclude=libgcc-* popt-*-1.10.1-22_1
+baseurl=file:///home/ken/repo/%(toolkit)s-%(base_arch)s/%(target_arch)s
+
+[core-noarch]
+name=core noarch
+baseurl=file:///home/ken/repo/%(toolkit)s-%(base_arch)s/noarch
+
+[local]
+name=local
+baseurl=file:///home/ken/local-repo/%(root_base)s/%(toolkit)s-%(base_arch)s/%(target_arch)s
+""" % config_opts
16 years, 10 months
pungi logger
by Joel Andres Granados
Hi list
Referring to ticket #34 at
https://hosted.fedoraproject.org/projects/pungi/ticket/34 stating that
the logger needed a little work so that it didn't depend on the
gather.py (or at least thats what I understood :) I propose either a
new file (pungiLog.py) located in the pypungi directory or a new
function in the "pungi" file that contains the logging stuff. The log
services would be started somewhere before the line containing "#
Actually do work." of the "pungi" file. The logging root would be
called "pungi" and would be called in each file that logging is needed
with the logging.getlogger("pungi") command.
If "quiet" is specified in the config file the logging will be turned off.
*Diff for the pungi file:*
1. Initializes the logger by calling to the new file.
2. specify quiet value.
3. logging function.
*
Diff for pungi.py file:
*1. use the correct logger.
*
Diff for gather.py file:*
change all the if statements for each logging call.
Files attached...
Comments appreciated.
Regards
--- gather.py-original 2007-05-03 17:01:18.000000000 +0200
+++ gather.py-JG 2007-05-03 17:01:18.000000000 +0200
@@ -16,6 +16,9 @@
import os
import shutil
import sys
+import logging
+
+log = logging.getLogger("pungi")
class Gather(yum.YumBase):
def __init__(self, config, pkglist):
@@ -46,7 +49,6 @@
#self.doSackSetup(arches)
self.doSackSetup(archlist=arches) # work around temp break in yum api
self.doSackFilelistPopulate()
- self.logger = yum.logging.getLogger("yum.verbose.pungi")
self.pkglist = pkglist
self.polist = []
self.srpmlist = []
@@ -56,15 +58,8 @@
self.compsobj.add(self.config.get('default', 'comps'))
def doLoggingSetup(self, debuglevel, errorlevel):
- """Setup the logging facility."""
-
-
- logdir = os.path.join(self.config.get('default', 'destdir'), 'logs')
- if not os.path.exists(logdir):
- os.makedirs(logdir)
- logfile = os.path.join(logdir, '%s.%s.log' % (self.config.get('default', 'flavor'),
- self.config.get('default', 'arch')))
- yum.logging.basicConfig(level=yum.logging.DEBUG, filename=logfile)
+ # We want to use our own logger.
+ pass
def doFileLogSetup(self, uid, logfile):
# This function overrides a yum function, allowing pungi to control
@@ -76,8 +71,7 @@
transaction info"""
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Checking deps of %s.%s' % (po.name, po.arch))
+ log.info('Checking deps of %s.%s' % (po.name, po.arch))
reqs = po.requires
provs = po.provides
@@ -93,13 +87,12 @@
deps = self.whatProvides(r, f, v).returnPackages()
if deps is None:
- self.logger.warning("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch))
+ log.warning("Unresolvable dependency %s in %s.%s" % (r, po.name, po.arch))
continue
for dep in deps:
self.tsInfo.addInstall(dep)
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
+ log.info('Added %s.%s for %s.%s' % (dep.name, dep.arch, po.name, po.arch))
self.resolved_deps[req] = None
@@ -124,7 +117,7 @@
# Check if we have the group
if not self.compsobj.has_group(group):
- self.logger.error("Group %s not found in comps!" % group)
+ log.error("Group %s not found in comps!" % group)
return packages
# Get the group object to work with
@@ -175,22 +168,18 @@
for line in self.pkglist:
line = line.strip()
if line.startswith('#'):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Skipping comment: %s' % line)
+ log.info('Skipping comment: %s' % line)
continue
if line.startswith('@'):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Adding group: %s' % line)
+ log.info('Adding group: %s' % line)
grouplist.append(line.strip('@'))
continue
if line.startswith('-'):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Adding exclude: %s' % line)
+ log.info('Adding exclude: %s' % line)
excludelist.append(line.strip('-'))
continue
else:
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Adding package: %s' % line)
+ log.info('Adding package: %s' % line)
addlist.append(line)
# First remove the excludes
@@ -219,12 +208,10 @@
mysack = yum.packageSack.ListPackageSack(matches)
for match in mysack.returnNewestByNameArch():
self.tsInfo.addInstall(match)
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Found %s.%s' % (match.name, match.arch))
+ log.info('Found %s.%s' % (match.name, match.arch))
for pkg in unmatched:
- if not pkg in matchdict.keys():
- self.logger.warn('Could not find a match for %s' % pkg)
+ log.warn('Could not find a match for %s' % pkg)
if len(self.tsInfo) == 0:
raise yum.Errors.MiscError, 'No packages found to download.'
@@ -262,7 +249,7 @@
for pkg in self.polist:
downloads.append('%s.%s' % (pkg.name, pkg.arch))
downloads.sort()
- self.logger.info("Download list: %s" % downloads)
+ log.info("Download list: %s" % downloads)
# Package location within destdir, name subject to change/config
pkgdir = os.path.join(self.config.get('default', 'destdir'), self.config.get('default', 'version'),
@@ -282,8 +269,7 @@
if (os.path.exists(local) and
str(os.path.getsize(local)) == pkg.packagesize):
- if not self.config.has_option('default', 'quiet'):
- self.logger.info("%s already exists and appears to be complete" % local)
+ log.info("%s already exists and appears to be complete" % local)
target = os.path.join(pkgdir, os.path.basename(remote))
if os.path.exists(target):
os.remove(target) # avoid traceback after interrupted download
@@ -292,8 +278,7 @@
# Disable cache otherwise things won't download
repo.cache = 0
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Downloading %s' % os.path.basename(remote))
+ log.info('Downloading %s' % os.path.basename(remote))
pkg.localpath = local # Hack: to set the localpath to what we want.
# do a little dance for file:// repos...
@@ -348,19 +333,16 @@
local = os.path.join(self.config.get('default', 'cachedir'), local)
if os.path.exists(local) and str(os.path.getsize(local)) == pkg.packagesize:
- if not self.config.has_option('default', 'quiet'):
- self.logger.info("%s already exists and appears to be complete" % local)
+ log.info("%s already exists and appears to be complete" % local)
if os.path.exists(os.path.join(pkgdir, os.path.basename(remote))) and str(os.path.getsize(os.path.join(pkgdir, os.path.basename(remote)))) == pkg.packagesize:
- if not self.config.has_option('default', 'quiet'):
- self.logger.info("%s already exists in tree and appears to be complete" % local)
+ log.info("%s already exists in tree and appears to be complete" % local)
else:
os.link(local, os.path.join(pkgdir, os.path.basename(remote)))
continue
# Disable cache otherwise things won't download
repo.cache = 0
- if not self.config.has_option('default', 'quiet'):
- self.logger.info('Downloading %s' % os.path.basename(remote))
+ log.info('Downloading %s' % os.path.basename(remote))
pkg.localpath = local # Hack: to set the localpath to what we want.
# do a little dance for file:// repos...
--- pungi.py-original 2007-05-03 11:01:18.000000000 -0400
+++ pungi.py-JG 2007-05-03 11:17:00.000000000 -0400
@@ -21,7 +21,7 @@
import shutil
import re
-log = logging.getLogger("pypungi.pungi")
+log = logging.getLogger("pungi")
class Pungi:
def __init__(self, config):
--- pungi-original 2007-05-03 11:01:18.000000000 -0400
+++ pungi-JG 2007-05-03 11:47:12.000000000 -0400
@@ -16,6 +16,7 @@
import pypungi.gather
import pypungi.pungi
import yum
+import logging
from ConfigParser import SafeConfigParser
@@ -79,6 +80,16 @@
destdir = config.get('default', 'destdir')
+ if not config.has_option('default', 'quiet'):quiet=False
+ else:quiet=True
+ config.set('default','quiet',str(quiet))
+
+ # initialize logging.
+ initLogger(config.get('default', 'destdir'),
+ '%s.%s.log' % (config.get('default', 'flavor'), config.get('default', 'arch')),
+ quiet=quiet)
+ log = logging.getLogger("pungi")
+
if not os.path.exists(destdir):
try:
os.makedirs(destdir)
@@ -180,4 +190,25 @@
manifestfile.close()
return pkglist
+ def initLogger(path, filename, quiet=True):
+ """Initialize the log stuff so other files can use it.
+
+ path - Is the directory where the log will be located
+ filename - Is the log files name
+ useLogFile - Whether to log to the file or not
+ """
+ logger = logging.getLogger("pungi")
+ if not quiet:
+ logdir = os.path.join(path , 'logs')
+ if not os.path.exists(logdir):
+ os.makedirs(logdir)
+ logfile = os.path.join(logdir, filename)
+
+ fileHandler = logging.FileHandler(logfile)
+ fileHandler.setLevel(logging.DEBUG)
+ logger.addHandler(fileHandler)
+ logger.setLevel(logging.DEBUG)
+ else:
+ logger.disable = 1
+
main()
16 years, 10 months
Installation boot with graphical screen
by Francisco André
Hi ! Let me ask you some thing. It's possible to use a graphical boot
when the installation cd are started??
My objective is to hide the kernel messages of probing devices, because
the users that will use my distribution is very dummy and I know that if
they see a message of probing error by example our technical support
phones will get crazy with so many calls!
Thank's!
16 years, 10 months
Grub install error when the installation Finish
by Francisco André
Hi! It's me again!
I use pungi to create a custom fedora and it runs perfectly even the iso
images was created ok!
So I burn 2 CD and try to install in a new machine. It runs ok, load and
use all the ks.cfg values and the kickstart installation was good.
But when the system show the message that are installing the boot
manager to the disk it stop and in the console window it shows the
following error:
executil.py line 81 in execWithRedirect
bootloader.py lines 958, 1199 e 190
dispatch.py line 203
text.py line 605
anaconda line 955
Errno - File or directory not found
I noticed that it seems that the script are looking for grub in the
folder /sbin/grub but it is on the folder /usr/sbin/grub. I don't know
if it's the problem, but for this time this is the maximum debug that I
can get and show to you ok!
Thank's for all!
16 years, 10 months
Source file not found
by Joel Andres Granados
Hi list:
Been trying to use pungi with the source=yes option and it fails when it
begins to look for the source in the repos.
1. I tried updating my distro
2. I installed a clean f7
3. I have changed yum repos more than once.
But still pungi fails when looking for sources.
I believe the issue is in "pypungi/gather.py" in the downloadSRPMs
function. I'm now looking at the yum code to see if it has something to do.
Is anybody else experiencing this.
am I missing something.
Regards.
--
Joel Andres Granados
16 years, 10 months
Customizing Fedora 7 with revisor
by Francisco André
Hi all, I'm new to this list!
I'm having problems with revisor tool. It runs until the linking release
notes an then stop work. The log did not show anything and only half of
the packages goes to the temp iso dir.
Doesn any body could help me with it, or tell me where should I look for
more information!
Thanks everybody!
16 years, 10 months