diff options
author | bavery <brian.avery@nokia.com> | 2012-03-16 08:12:16 -0700 |
---|---|---|
committer | Andrew Christian <andrew.christian@nokia.com> | 2012-03-16 19:43:59 +0100 |
commit | 00452624b5005e3ceaaf3dc3933ce5522dc2e141 (patch) | |
tree | c6320b3ab4ae0e161a1808f8cc2358b655d98ed4 | |
parent | 406d104a15fad405fb727662c001de6899c1359d (diff) |
match release_0.1, now limited to making sysroot/rootfs
Change-Id: I2a2984f1b04b86e21b1f122d992452431f484946
Reviewed-by: Andrew Christian <andrew.christian@nokia.com>
34 files changed, 333 insertions, 2535 deletions
diff --git a/etc-zypp-armv5fedora14-upstream.tgz b/etc-zypp-armv5fedora14-upstream.tgz Binary files differnew file mode 100644 index 0000000..3c4faa1 --- /dev/null +++ b/etc-zypp-armv5fedora14-upstream.tgz diff --git a/home/.rpm/armv5tel-gnueabi/Toolchain-cross.cmake b/home/.rpm/armv5tel-gnueabi/Toolchain-cross.cmake deleted file mode 100644 index 461024d..0000000 --- a/home/.rpm/armv5tel-gnueabi/Toolchain-cross.cmake +++ /dev/null @@ -1,17 +0,0 @@ -INCLUDE(CMakeForceCompiler) - -# this one is important -SET(CMAKE_SYSTEM_NAME Linux) - -# specify the cross compiler -CMAKE_FORCE_C_COMPILER(${CROSS_COMPILE}gcc GNU) -CMAKE_FORCE_CXX_COMPILER(${CROSS_COMPILE}g++ GNU) - -# where is the target environment -SET(CMAKE_FIND_ROOT_PATH ${SYSROOT}) - -# search for programs in the build host directories -SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -# for libraries and headers in the target directories -SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
\ No newline at end of file diff --git a/home/.rpm/armv5tel-gnueabi/macros b/home/.rpm/armv5tel-gnueabi/macros deleted file mode 100644 index 7b9cf5b..0000000 --- a/home/.rpm/armv5tel-gnueabi/macros +++ /dev/null @@ -1,236 +0,0 @@ -# Custom RPM macros configuration file for building RPM packages -# as a non-root user. -# -# Author: Mike A. Harris -# Modified by: George France && Col. Pickering -# -# This is a copy of my own personal RPM configuration which I use -# on my workstation for building and testing packages for Red Hat Linux. -# There are many different possibilities on how to configure RPM, so -# feel free to tweak however you desire. Make sure to create any -# directories that are referenced prior to using. RPM will automatically -# create some of them if missing, but not all of them. Which ones it -# auto-creates is only known by the extraterrestrial aliens that have -# created RPM. -# -# For ANY help with anything related to RPM development, packaging, -# or customization, please join the Red Hat RPM mailing list by sending -# an email message to: rpm-list-request@redhat.com with the word -# "subscribe" in the Subject: line. -# -# Any suggestions/comments/ for improvements to this setup appreciated. - - -# %_tmppath is where temporary scripts are placed during the RPM build -# process as well as the %_buildroot where %install normally dumps files -# prior to packaging up the final binary RPM's. -%_tmppath %{_topdir}/tmp - -# %_builddir is where source code tarballs are decompressed, and patches then -# applied when building an RPM package -%_builddir %{_topdir}/BUILD - -# %_buildroot is where files get placed during the %install section of spec -# file processing prior to final packaging into rpms. This is oddly named -# and probably should have been called "%_installroot" back when it was -# initially added to RPM. Alas, it was not. ;o) -#%_buildroot %{_topdir}/BUILDROOT/%{name}-%{version}-root -%_buildroot %{_topdir}/INSTALLROOT - -# %_rpmdir is where binary RPM packages are put after being built. -%_rpmdir %{_topdir}/RPMS - -# %_srcrpmdir is where src.rpm packages are put after being built. -%_srcrpmdir %{_topdir}/SRPMS - -# %_rpmfilename defines the naming convention of the produced RPM packages, -# and should not be modified. It is listed here because I am overriding -# RPM's default behaviour of dropping binary RPM's each in their own -# separate subdirectories. I hate that. Grrr. -%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm - -# Customized tags for local builds -# %packager is the info that will appear in the "Packager:" field in the -# RPM header on built packages. By default I have it read your username -# and hostname. This should be customized appropriately. -# %packager Joe Blow -# %vendor Which -# %distribution Why - -# GNU GPG config below -#%_signature gpg -#%_gpg_name Joe Blow -#%_gpg_path %(echo $HOME)/.gnupg - - -#### stolen from mock-cross -%optflags -O2 -g -march=armv5te -Wl,-Bsymbolic-functions -Wl,--build-id - - - -### random web suggestion -%_host armv5tel-redhat-linux-gnueabi -%_build i686-pc-linux-gnu - - -%_initddir %{_sysconfdir}/rc.d/init.d - - -#### - -######### more puled from mock-cross -#============================================================================== -# Update config.sub files found in build sources. -# -%_update_config \ - for i in $(find . -name config.guess -o -name config.sub) ; do \ - [ -f /etc/mock-cross/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /etc/mock-cross/$(basename $i) $i ; \ - done - - -#============================================================================== -# Override cmake with one which sets up a crossbuild. -%cmake \ - CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ - CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ - FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ - PKG_CONFIG_PATH=%{_sysroot}/usr/lib/pkgconfig \ - %__cmake \\\ - -DCMAKE_VERBOSE_MAKEFILE=ON \\\ - -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ - -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\ - -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ - -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ - -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ - -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ - -DCMAKE_TOOLCHAIN_FILE="~/.rpm/${ARCH}-gnueabi/Toolchain-cross.cmake" \\\ - -DBUILD_SHARED_LIBS:BOOL=ON - - - -#============================================================================== -# Override configure with one which sets up a crossbuild. -# -%_sysroot $SYSROOT - - -%configure \ - [ -f /etc/mock-cross/ac_defines ] && . /etc/mock-cross/ac_defines ; \ - [ -f /etc/mock-cross/arch/ac_defines.%{_arch} ] && . /etc/mock-cross/arch/ac_defines.%{_arch} ; \ - export PKG_CONFIG_LIBDIR=%{_sysroot}%{_libdir}/pkgconfig:%{_sysroot}%{_datadir}/pkgconfig; \ - SYSROOT="%{_sysroot}"; export SYSROOT; \ - AR="${AR:-%{__ar}}"; export AR; \ - AS="${AS:-%{__as}}"; export AS; \ - CC="${CC:-%{__cc}}"; export CC; \ - BUILD_CC=gcc; export BUILD_CC; \ - CC_FOR_BUILD=gcc; export CC_FOR_BUILD; \ - CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD:-%optflags_for_build}" ; export CFLAGS_FOR_BUILD ; \ - LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD:-%optflags_for_build}" ; export LDFLAGS_FOR_BUILD ; \ - CXXFLAGS_FOR_BUILD="${CXXFLAGS_FOR_BUILD:-%optflags_for_build}" ; export CXXFLAGS_BUILD ; \ - CXX="${CXX:-%{__cxx}}"; export CXX; \ - LD="${LD:-%{__ld}}"; export LD; \ - NM="${NM:-%{__nm}}"; export NM; \ - OBJCOPY="${OBJCOPY:-%{__objcopy}}"; export OBJCOPY; \ - OBJDUMP="${OBJDUMP:-%{__objdump}}"; export OBJDUMP; \ - RANLIB="${RANLIB:-%{__ranlib}}"; export RANLIB; \ - STRIP="${STRIP:-%{__strip}}"; export STRIP; \ - CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ - CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ - FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ - %_update_config ; \ - ./configure --target=%{_target_platform} \\\ - --host=%{_target_platform} \\\ - --build=%{_build_platform} \\\ - --program-prefix=%{?_program_prefix} \\\ - --prefix=%{_prefix} \\\ - --exec-prefix=%{_exec_prefix} \\\ - --bindir=%{_bindir} \\\ - --sbindir=%{_sbindir} \\\ - --sysconfdir=%{_sysconfdir} \\\ - --datadir=%{_datadir} \\\ - --includedir=%{_includedir} \\\ - --libdir=%{_libdir} \\\ - --libexecdir=%{_libexecdir} \\\ - --localstatedir=%{_localstatedir} \\\ - --sharedstatedir=%{_sharedstatedir} \\\ - --mandir=%{_mandir} \\\ - --infodir=%{_infodir} - - -#============================================================================== -# Add configure_for_build to configure/build binaries for the build host. -# -%configure_for_build \ - CFLAGS="${CFLAGS_FOR_BUILD:-%optflags_for_build}" ; export CFLAGS ; \ - CXXFLAGS="${CXXFLAGS_FOR_BUILD:-%optflags_for_build}" ; export CXXFLAGS ; \ - FFLAGS="${FFLAGS:-%optflags_for_build -I%_fmoddir}" ; export FFLAGS ; \ - ./configure \\\ - --target=%{_build_platform} \\\ - --build=%{_build_platform} \\\ - --host=%{_build_platform} \\\ - --program-prefix=%{?_program_prefix} \\\ - --prefix=%{_prefix} \\\ - --exec-prefix=%{_exec_prefix} \\\ - --bindir=%{_bindir} \\\ - --sbindir=%{_sbindir} \\\ - --sysconfdir=%{_sysconfdir} \\\ - --datadir=%{_datadir} \\\ - --includedir=%{_includedir} \\\ - --libdir=%{_libdir} \\\ - --libexecdir=%{_libexecdir} \\\ - --localstatedir=%{_localstatedir} \\\ - --sharedstatedir=%{_sharedstatedir} \\\ - --mandir=%{_mandir} \\\ - --infodir=%{_infodir} - - -%_build_platform i686-pc-linux-gnu -%_target_platform arm-linux-gnueabi -%_host_platform arm-linux-gnueabi - - -# define something so we know if we are cross even for noarch builds -%_crossbuild 1 - - -#============================================================================== -# Make specfile %check a no-op when cross-building -# - -%__spec_check_cmd /bin/true -#%__check_files /bin/true - -# bavery different from mock -%_tool_triplet arm-none-linux-gnueabi -#============================================================================== -# Add in tool prefix -# -%__ar %{_tool_triplet}-ar -%__as %{_tool_triplet}-as -%__cc %{_tool_triplet}-gcc -%__cpp %{_tool_triplet}-cpp -%__cxx %{_tool_triplet}-g++ -%__ld %{_tool_triplet}-ld -%__nm %{_tool_triplet}-nm -%__objcopy %{_tool_triplet}-objcopy -%__objdump %{_tool_triplet}-objdump -%__ranlib %{_tool_triplet}-ranlib -%__strip %{_tool_triplet}-strip - - -#============================================================================== - - - - -#========================================= -# sometimes we leave things hanging around.... -%_unpackaged_files_terminate_build 0 - - -# pkg_config helps now that we have the fixer script. -PKG_CONFIG_PATH="%{_sysroot}/usr/lib/pkgconfig" -export PKG_CONFIG_PATH - - -%_IN_PLATFORM_MACRO 1
\ No newline at end of file diff --git a/home/.rpmmacros b/home/.rpmmacros deleted file mode 100644 index db76c4c..0000000 --- a/home/.rpmmacros +++ /dev/null @@ -1,16 +0,0 @@ -# By default, ROOT of the buildsystem -%_topdir %(echo $HOME)/rpmbuild%(echo $PP_ARCH) -%_sourcedir %{_topdir}/SOURCES/%{name}-%{version} -%_specdir %{_sourcedir} - -# to help with check-buildroot, uncomment if needed -# currently needed to build the cross gcc. probably should -# debug this at some point. -#%_unpackaged_files_terminate_build 0 -#%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot - - -# uncomment/fix these for the rpmbumpspec/rpmdevtools to work -#%packager Colonel Pickering -#%vendor MyFairLady -#%distribution TheDance diff --git a/home/bin/cleanOutSysrootPackages.sh b/home/bin/cleanOutSysrootPackages.sh deleted file mode 100755 index 2197520..0000000 --- a/home/bin/cleanOutSysrootPackages.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -ARCH=armv5tel - -# since some of the naming conventions in rpms are a bit unpredictable, -# this script will mv the rpmbuild-$ARCH/SOURCES/foo-version to -# rpmbuild-$ARCH/SOURCES/DONE and the local src rpm to -# ./DONE once we have processed it. - -zypper-${ARCH} refresh - -## first we grab the starting set of sysroot packages so we know what we want to start from -# this is ok, but kept growing over time -#BASE_SYSROOT_PACKAGES=`rpm-${ARCH} -qa ` -BASE_SYSROOT_PACKAGES="libgcc-4.5.1-4.fc14.armv5tel \ -tzdata-2010k-1.fc14.noarch \ -basesystem-10.0-3.noarch \ -nss-softokn-freebl-3.12.10-1.fc14.armv5tel \ -bash-4.1.7-1.fc14.armv5tel \ -coreutils-libs-8.5-7.fc14.armv5tel \ -glibc-headers-2.13-2.1.armv5tel \ -kernel-headers-2.6.35.6-45.fc14.armv5tel \ -glibc-devel-2.13-2.1.armv5tel \ -libstdc++-devel-4.5.1-4.fc14.armv5tel \ -ncurses-base-5.7-8.20100703.fc14.armv5tel \ -setup-2.8.23-1.fc14.noarch \ -filesystem-2.4.35-1.fc14.armv5tel \ -glibc-2.13-2.1.armv5tel \ -ncurses-libs-5.7-8.20100703.fc14.armv5tel \ -glibc-common-2.13-2.1.armv5tel \ -coreutils-8.5-7.fc14.armv5tel \ -zlib-1.2.5-2.fc14.armv5tel \ -info-4.13a-10.fc14.armv5tel \ -libstdc++-4.5.1-4.fc14.armv5tel" - -# removes the offending rpm if its not in the base set -function cleanToBase(){ - RPM=$1 - for k in $BASE_SYSROOT_PACKAGES; do - if [ $RPM = $k ]; then - return 0 - fi - done - echo "cleaning out $RPM" - zypper-${ARCH} -n remove $RPM - -} - -function revertSysroot(){ - CURRENT_SYSROOT_PACKAGES=`rpm-${ARCH} -qa ` - for j in $CURRENT_SYSROOT_PACKAGES; do - echo "checking $j" - cleanToBase $j - done -# for j in $BASE_SYSROOT_PACKAGES; do -# echo "readding $j" -# #zypper-${ARCH} -n install --no-recommends $j -# done -} - -revertSysroot - diff --git a/home/bin/gen-rpm-changelog b/home/bin/gen-rpm-changelog deleted file mode 100755 index 1ff1986..0000000 --- a/home/bin/gen-rpm-changelog +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -if [ ! -d tmp ]; then - mkdir tmp -fi - -git log --since="2 weeks ago" --date-order --format='* %cd <%ce> %h%n- %s' > tmp/changelog.orig -cat tmp/changelog.orig | gawk '$1 ~/^*/ {$5="" ; $7="" ; print} ; $1 !~/^*/ {print}' | sed -e 's/ / /g' > changelog -rm tmp/changelog.orig - diff --git a/home/bin/gitInstallSource b/home/bin/gitInstallSource deleted file mode 100755 index 13f67a8..0000000 --- a/home/bin/gitInstallSource +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/python -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -import os, sys -import subprocess -import re -import glob -import posixpath -from optparse import OptionParser - -tagpattern='(.*)' -pkgname='' -exclude_patterns=[] - -homedir=os.environ['HOME'] -rpmsourcedir=('%s/rpmbuild/SOURCES' % homedir) -rpmreposdir=('%s/rpmbuild/REPOS' % homedir) - -repodir='' - -def obsBuild(): - specfiles=options.spec - specfile=options.spec - branch='master' - print 'specfile=', specfile - proc = subprocess.Popen(['grep', 'Name:', specfile], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() - pkgname=proc[0] - m = re.match("Name:[ \t\n]+(.*)[ \t\n]*", pkgname) - if m: - pkgname = m.group(1) - print pkgname - proc = subprocess.Popen(['grep', '_git', specfile], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() - sourcelines=proc[0].split('\n') - for sourceline in sourcelines: - m = re.match("%define[ \t\n]+_gituri[ \t\n]+(.*)[ \t\n]*", sourceline) - if m: - source = m.group(1) - m = re.match("%define[ \t\n]+_gitbranch[ \t\n]+(.*)[ \t\n]*", sourceline) - if m: - branch = m.group(1) - - repodir = ('%s/%s' % (rpmreposdir, pkgname)) - - print 'source', source - print 'branch', branch - print 'repodir', repodir - if not posixpath.exists(repodir): - subprocess.Popen(['git', 'clone', source, repodir], - stdout=subprocess.PIPE).communicate() - os.chdir(repodir) - proc = subprocess.Popen(['git', 'tag', '-l'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() - ret = proc[0].strip('\n').split('\n') - matches=[] - tags=[] - if len(proc[0]): - for t in ret: - m = re.match(tagpattern, t) - if m: - tags.append(t) - matches.append(m) - lastmatch = matches[-1] - tagversion = lastmatch.group(1) - tag=tags[-1] - else: - tag='' - if len(tags) > 0: - print 'running git cherry' - proc = subprocess.Popen(['git', 'cherry', tag], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() - ret = proc[0].strip('\n').split('\n') - micro = len(ret) - if (micro > 0): - lastcommit = ret[-1].replace(' ', '')[0:12] - else: - lastcommit = '' - else: - proc = subprocess.Popen(['git', 'log'], - stdout=subprocess.PIPE).communicate() - commits=[] - for line in proc[0].split('\n'): - if line: - m = re.match('^commit[ \t](.*)', line) - if m: - commits.append(m.group(1)) - tagversion = 0 - micro = len(commits) - lastcommit=commits[0][0:12] - - version=('%s+%d+git%s' % (tagversion, micro, lastcommit)) - - print 'version', version - - ## clean old files - sourcedir=('%s/%s-%s' % (rpmsourcedir, pkgname,version)) - print 'sourcedir', sourcedir - os.system('rm -fr %s' % sourcedir) - os.system('mkdir -p %s' % sourcedir) - - if options.branch: - branch=options.branch - - bindings = {'sourcedir': sourcedir, 'pkgname': pkgname, 'version': version, 'branch': branch} - os.system('git archive --format tar --prefix %(pkgname)s-%(version)s/ --output %(sourcedir)s/%(pkgname)s-%(version)s.tar.gz %(branch)s' % bindings) - - script_path = os.path.dirname(os.path.realpath(__file__)) - os.system('%s/gen-rpm-changelog; mv changelog %s/%s.changelog;' % (script_path, sourcedir, pkgname)) - gitspecfile=('%s/%s.spec' % (repodir, pkgname)) - - files = glob.glob('%s/*' % posixpath.dirname(specfile)) - for f in files: - if re.match('.*~', f): - continue - if re.match('.spec', f): - continue - os.system('cp -v %s %s' % (f, sourcedir)) - - if posixpath.exists(gitspecfile): - os.system('cp -v %s %s' % (gitspecfile, sourcedir)) - else: - os.system('cp -v %s %s' % (specfile, sourcedir)) - - os.system("sed -i 's/^Version:.*/Version: %(version)s/' %(sourcedir)s/%(pkgname)s.spec" % bindings) - os.system("sed -i 's/^Source:.*/Source: %(pkgname)s-%(version)s.tar.gz/' %(sourcedir)s/%(pkgname)s.spec" % bindings) - os.system("sed -i 's/^Release:.*/Release: 1/' %(sourcedir)s/%(pkgname)s.spec" % bindings) - - -parser = OptionParser() -parser.add_option("-B", "--branch", dest="branch", - help="Git branch to use") -parser.add_option("-e", "--exclude", dest="exclude", action="append", - help="File patterns to exclude") -parser.add_option("-r", "--rpmbuilddir", dest="rpmbuilddir", - help="Defaults to ~/rpmbbuild") -parser.add_option("-s", "--spec", dest="spec", - help="Spec file to use") -parser.add_option("-t", "--tag", dest="tagpattern", - help="Prefix of version tag") -(options, args) = parser.parse_args() -if options.rpmbuilddir: - rpmbuilddir = options.rpmbuilddir - rpmsourcedir = rpmbuilddir + "/SOURCES" - rpmrepodir = rpmbuilddir + "/REPOS" -if options.exclude: - exclude_patterns = options.exclude_patterns -if options.tagpattern: - tagpattern=options.tagpattern -obsBuild() diff --git a/home/bin/goChroot.sh b/home/bin/goChroot.sh deleted file mode 100755 index 27b35cb..0000000 --- a/home/bin/goChroot.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -if [ "$1" == "" ]; then - echo "Usage: $(basename $0) PATH-TO-CHROOT" - exit 1 -fi - -CHROOT_DIR=$(readlink -e $1) - -# Should fix up the bind mounts if they don't already exist -if ! mount | egrep ${CHROOT_DIR}/proc; then - echo "not mounted, rebinding" - rebindChroot.sh ${CHROOT_DIR} -fi - -# so you can run X from w/in the chroot over ssh. -if [ -e ~/.Xauthority ] ; then - cp -f ~/.Xauthority ${CHROOT_DIR}/home/`whoami` -fi - -sudo chroot ${CHROOT_DIR} sudo su - `whoami` - - diff --git a/home/bin/mkFedoraChroot.sh b/home/bin/mkFedoraChroot.sh deleted file mode 100755 index c90c05b..0000000 --- a/home/bin/mkFedoraChroot.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -if [ "$1" == "" ]; then - echo "Usage: $(basename $0) PATH-TO-CHROOT" - exit 1 -fi - -CHROOT_DIR=$(readlink -m $1) - -if [ -d ${CHROOT_DIR} ]; then - echo "chroot dir exists, try again" - exit 1 -fi - -FORCE_DEB="" -# debian/ubuntu want you to really tell it to use rpm -if uname -a | egrep -i ubuntu ; then - echo setting up Ubuntu - FORCE_DEB="--force-debian" - sudo apt-get install yum rpm m2crypto psmisc -fi - -function sadExit -{ - echo $1; - exit -1; -} - -sudo mkdir -p ${CHROOT_DIR}/var/lib/rpm -sudo rpm --root ${CHROOT_DIR} --initdb -rm -f fedora-rel*rpm -# ubuntu doesnt support yum-utils so it doesnt have -# yumdownloader... -#yumdownloader fedora-release | head -1 | awk '{print $1}' -wget http://mt-fedora.nrcc.noklab.com/repos/f14-mirror/all/fedora-release-14-1.noarch.rpm || sadExit "failed to wget fedora release 14" - -echo "FD= $FORCE_DEB" -sudo rpm --root ${CHROOT_DIR} -ivh $FORCE_DEB fedora-rel*rpm - -if [ "$FORCE_DEB" != "" ]; then - sudo mkdir -p /etc/pki/rpm-gpg/ - sudo rsync -av ${CHROOT_DIR}/etc/pki/rpm-gpg/ /etc/pki/rpm-gpg/ -fi - -sudo yum -y --installroot=${CHROOT_DIR} install bash || sadExit "yum install bash failed :(" -sudo yum -y --installroot=${CHROOT_DIR} install util-linux-ng || sadExit "yum install util=linux-ng failed :(" -sudo yum -y --installroot=${CHROOT_DIR} install rpm yum yum-utils git-core || sadExit "yum install git failed :(" -sudo yum -y --installroot=${CHROOT_DIR} install sudo wget || sadExit "yum install wget :(" - -# set up the bind mounts -sudo mkdir -p ${CHROOT_DIR}/dev/pts -sudo mkdir -p ${CHROOT_DIR}/sys -sudo mkdir -p ${CHROOT_DIR}/tmp -sudo mount -o bind /proc/ ${CHROOT_DIR}/proc -sudo mount -o bind /dev/pts ${CHROOT_DIR}/dev/pts -sudo mount -o bind /dev ${CHROOT_DIR}/dev/ -sudo mount -o bind /sys ${CHROOT_DIR}/sys/ -sudo mount -o bind /tmp ${CHROOT_DIR}/tmp - -# for dns -sudo cp /etc/resolv.conf ${CHROOT_DIR}/etc/ -# so we can sudo -sudo cp /etc/sudoers ${CHROOT_DIR}/etc - - -# for convenience.... -MUSER=`whoami` -MUID=`id -u ${USER}` -MGID=`id -g ${USER}` - -sudo chroot ${CHROOT_DIR} groupadd -g $MGID $MUSER -sudo chroot ${CHROOT_DIR} useradd -u $MUID -g $MGID -G wheel $MUSER - -sudo rsync -av ~/.ssh ${CHROOT_DIR}/home/${MUSER} -# so you can run X from w/in the chroot over ssh. -cp -f ~/.Xauthority ${CHROOT_DIR}/home/`whoami` - -echo 'export PS1="\\[\\033[01;31m\\]chroot\\[\\033[0m\\]-\\[\\033[01;32m\\]\\u@\\h\\[\\033[0m\\]:\\[\\033[01;34m\\]\\w\\[\\033[0m\\]$ "' | sudo tee -a ${CHROOT_DIR}/home/${MUSER}/.bashrc - - diff --git a/home/bin/rebindChroot.sh b/home/bin/rebindChroot.sh deleted file mode 100755 index 2f62ced..0000000 --- a/home/bin/rebindChroot.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -# reset up the bind mounts - - -if [ "$1" == "" ]; then - echo "need abs path of chroot" - exit 1 -fi - -CHROOT_DIR=$1 - -# set up the bind mounts -sudo mkdir -p ${CHROOT_DIR}/sys -sudo mount -o bind /proc/ ${CHROOT_DIR}/proc -sudo mount -o bind /dev/pts ${CHROOT_DIR}/dev/pts -sudo mount -o bind /dev ${CHROOT_DIR}/dev/ -sudo mount -o bind /sys ${CHROOT_DIR}/sys/ -sudo mount -o bind /tmp ${CHROOT_DIR}/tmp - -# for dns -sudo cp /etc/resolv.conf ${CHROOT_DIR}/etc/ diff --git a/home/bin/rpm-noarch b/home/bin/rpm-noarch deleted file mode 100755 index 652ccde..0000000 --- a/home/bin/rpm-noarch +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### -# -# Usage: -# -# rpm-noarch ARCH ARGS... -# OR -# rpm-armv5tel ARGS... -# -# The architecture is derived from the name of the shell script, or by -# running the generic script and passing the architecture as the first argument. -# This allows us to create a softlink to the shell script for each possible architecture. -# -# E.g.: ln -s rpm-noarch rpm-armv5tel -# -#export ARCH=armv5tel - -BASENAME=$(basename $0) -ARCH=${BASENAME#*-} -if [ "$ARCH" = "noarch" ] ; then - ARCH=$1 - shift -fi - -export ARCH -export PP_ARCH=-${ARCH} -export SYSROOT=/usr/${ARCH}-redhat-linux-gnueabi/sys-root -export CROSS_COMPILE=arm-none-linux-gnueabi- -export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig -export TARGET=${ARCH}-linux-gnueabi -DIDINSTALL="" -EXTRA_ARGS="--root=${SYSROOT}" - -fixinstall() { - EXTRA_ARGS="$EXTRA_ARGS --ignorearch --noscripts" - DIDINSTALL="yes" -} - -fixerase() { - EXTRA_ARGS="$EXTRA_ARGS --noscripts" -} - -fixverbose() { - VERBOSE="yes" -} - -srpm="\.src\.rpm$" -brpm="\.rpm$" - -ARGS="" -RPMS="" -SRPMS="" - -addarg() { - ARGS="$ARGS $1" -} -addrpm() { - echo "Adding rpm $@ $*" - RPMS="$RPMS $*" - echo $RPMS -} -addsrpm() { - SRPMS="$SRPMS $1" -} - -for arg in "$@" ; do - if [[ $arg =~ ^-- ]] ; then - case $arg in - --install) fixinstall;; - --upgrade*) fixinstall;; - --erase*) fixerase;; - --verbose) fixverbose;; - esac - addarg $arg - elif [[ $arg =~ ^- ]] ; then # Single character arguments - for i in $(seq 2 ${#arg}) ; do - char=$(expr substr "$arg" $i 1) - case $char in - i) fixinstall;; - U) fixinstall;; - e) fixerase;; - v) fixverbose;; - esac - done - addarg $arg - elif [[ $arg =~ $srpm ]] ; then - addsrpm $arg - elif [[ $arg =~ $brpm ]] ; then - addrpm $arg - else - echo "What is $arg doing here?" - addarg $arg - fi -done - -if [ $VERBOSE ] ; then - echo "#### Calling sudo RPM with $EXTRA_ARGS $ARGS $RPMS" - echo "#### Calling RPM with $EXTRA_ARGS $ARGS $SRPMS" - echo "#### ARGS=$ARGS" - echo "#### RPMS=$RPMS" - echo "#### SRPMS=$SRPMS" -fi - -if [ -z "$RPMS" ] || [ "$SRPMS" ] ; then - if [ $VERBOSE ] ; then - echo rpm $ARGS $EXTRA_ARGS $SRPMS - fi - rpm $ARGS $EXTRA_ARGS $SRPMS -fi - -if [ "$RPMS" ] ; then - if [ $VERBOSE ] ; then - echo sudo rpm $ARGS $EXTRA_ARGS $RPMS - fi - sudo rpm $ARGS $EXTRA_ARGS $RPMS -fi - - -if [ "" != "$DIDINSTALL" ]; then -# in case anything we installed added a pkgconfig file, we need to "fix" it to be sysroot friendly -# echo "FIXING pcs" - if [ -d ${PKG_CONFIG_PATH} ]; then - for i in ${PKG_CONFIG_PATH}/*.pc ; do - if [ -f "$i" ]; then - if ! grep ${SYSROOT} $i >> /dev/null ; then - echo Fixing "$i"; - sudo cp $i $i.orig - sudo sed -i -e "s:=/usr:=${SYSROOT}/usr:" $i - sudo sed -i -e "s:=/lib:=${SYSROOT}/lib:" $i - sudo sed -i -e "s:-I/usr/include:-I${SYSROOT}/usr/include:" $i - sudo sed -i -e "s:-L/usr/lib:-L${SYSROOT}/usr/lib:" $i; - sudo sed -i -e "s:=/opt/mt:=${SYSROOT}/opt/mt:" $i - fi - fi - done - fi -fi diff --git a/home/bin/rpmbuild-noarch b/home/bin/rpmbuild-noarch deleted file mode 100755 index a5f7c81..0000000 --- a/home/bin/rpmbuild-noarch +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### -# -# Usage: -# -# rpmbuild-noarch ARCH ARGS... -# OR -# rpmbuild-armv5tel ARGS... -# -# The architecture is derived from the name of the shell script, or by -# running the generic script and passing the architecture as the first argument. -# This allows us to create a softlink to the shell script for each possible architecture. -# -# E.g.: ln -s rpmbuild-noarch rpmbuild-armv5tel -# -#export ARCH=armv5tel - -BASENAME=$(basename $0) -ARCH=${BASENAME#*-} -if [ "$ARCH" = "noarch" ] ; then - ARCH=$1 - shift -fi - -if [ $# -lt 2 ] ; then - echo "Need to specify a build option and a spec file" - exit 1 -fi - -export ARCH -export PP_ARCH=-${ARCH} -export SYSROOT=/usr/${ARCH}-redhat-linux-gnueabi/sys-root -export CROSS_COMPILE=arm-none-linux-gnueabi- -export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig -export TARGET=${ARCH}-linux-gnueabi -export ZYPP_CONF=$SYSROOT/etc/zypp/zypp.conf -export BUILDROOT=$HOME/rpmbuild-${ARCH}/INSTALLROOT - -terminate() { - echo "${BASENAME} does not support $1" - exit 1 -} -# we used to set up the generic arm links in ~/bin with the setupDeveloper script. -# Now that we are actively supporting 2 DIFFERENT architectures, -# we need to set them up on the fly. If you run -# rpmbuild-armv5tel and rpmbuild-armv7hl on 2 diff -# xterms at the same time u r :( -echo "Making ARM links" -pushd ~/bin -base_name=$ARCH-redhat -for newprefix in arm arm-none ; do - for i in /usr/bin/${base_name}*; do - oldname=$(basename $i) - linkname=${newprefix}${oldname#${base_name}} - echo Redirecting to $i from ${linkname} - ln -sf $i ${linkname} - done -done -popd - - -# We assume that the list argument is the target file -# rpmbuild seems to work better if we insert our extra -# arguments BEFORE the target file, but AFTER all of the -# other arguments that were passed on the command line. - -TARGETFILE=${!#} -length=$(($#-1)) - -for arg in "$@" ; do - case $arg in -# -tp|-tc|-ti|-ta|-tb|-ts) terminate $arg;; -# --rebuild|--recompile|--short-circuit) terminate $arg;; - -v|--verbose) VERBOSE="yes";; - esac -done - -EXTRA_ARGS="--rebuild --buildroot=${BUILDROOT} --root=${SYSROOT} --dbpath ${SYSROOT}/var/lib/rpm --target=${TARGET}" - -if [ $VERBOSE ] ; then - echo "#### Calling RPMBUILD with ${@:1:$length} $EXTRA_ARGS $TARGETFILE" -fi - -rpmbuild ${@:1:$length} $EXTRA_ARGS $TARGETFILE diff --git a/home/bin/setupBaseSYSROOT_armv5tel.sh b/home/bin/setupBaseSYSROOT_armv5tel.sh deleted file mode 100755 index 7708759..0000000 --- a/home/bin/setupBaseSYSROOT_armv5tel.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -if [ ! -d "$1"/sysroot ]; then - echo "need dir of mt-cross-tools" - exit 1 -fi - -MT_CROSS_TOOLS=$1 - -TOOLCHAIN_ROOT=/usr/armv5tel-redhat-linux-gnueabi -SYSROOT=${TOOLCHAIN_ROOT}/sys-root -ARCH=armv5tel -# we can add this back in l8r if we need it. -# this armv7l is a softfp version of armv7 -# so it is compatible with the fedora 14 armv5tel -# since we are now targetting armv7hl (hard fp) -# this just confuses things -#EXTRA_ARCHES="armv7l" -EXTRA_ARCHES="" - -echo "#### Setting up XXX-${ARCH} commands for the sys-root" -mkdir -p $HOME/bin -cd $HOME/bin -for t_arch in $ARCH $EXTRA_ARCHES; do - for cmdhead in rpm-noarch rpmbuild-noarch zypper-noarch zypper-download zypper-build-dep ; do - CMD=$(which ${cmdhead}) - if [ ! -e "$CMD" ] ; then - echo "Unable to find ${CMD}. Did you run setupDeveloper.sh and put ~/bin in your path?" - exit 1 - fi - ln -s ${CMD} ${cmdhead%-noarch}-${t_arch} - done -done - -echo "#### Setting up sysroot $SYSROOT" -sudo mkdir -p $SYSROOT -sudo rsync -av $MT_CROSS_TOOLS/sysroot/$ARCH/* $SYSROOT/ -# make a pkgconfig dir, which we will eventually need. -# and put a dummy file in -sudo mkdir -p ${SYSROOT}/usr/lib/pkgconfig -echo $SYSROOT >> /tmp/faux-nrcc.pc -sudo mv /tmp/faux-nrcc.pc ${SYSROOT}/usr/lib/pkgconfig/faux-nrcc.pc - -echo "#### Installing base files into $SYSROOT" -# install a base filesystem -zypper-noarch ${ARCH} refresh -zypper-noarch ${ARCH} lr -zypper-noarch ${ARCH} -n install -n setup glibc - -# some things we need will fail due to scriptlets, so we'll force it -echo "#### Current packages #####" -rpm-noarch ${ARCH} -qa - -for i in coreutils glibc-headers ; do - echo "#### Forcing $i into sysroot" - # zypper-noarch ${ARCH} search $i - zypper-noarch ${ARCH} -n install -d -n $i - rpm=`find $SYSROOT/var/cache/zypp -name "$i*.rpm"` - echo "##### RPM=$rpm" - rpm-noarch ${ARCH} -i --nodeps ${rpm} - sudo rm -fv $rpm -done - -echo "#### Installing setup and base filesystem" -zypper-noarch ${ARCH} -n install -n setup basesystem filesystem - -# this is a workaround for the fact that my target skeleton (phone and qemu) -# and the filesystem rpm clash -#cd /tmp -#wget http://mt-fedora.nrcc.noklab.com/fedora/nrcc/14/armv5tel/filesystem-2.4.35-2.fc14.nrcc.1.armv5tel.rpm -#forceRpmRoot.sh /tmp/filesystem-2.4.35-2.fc14.nrcc.1.armv5tel.rpm -#wget http://mt-fedora.nrcc.noklab.com/fedora/nrcc/14/armv5tel/basesystem-10.0-3.noarch.rpm -#forceRpmRoot.sh /tmp/basesystem-10.0-3.noarch.rpm - -sudo mkdir -p ${SYSROOT}/${HOME} -group=$GROUPS -sudo chown $USER.$GROUP $SYSROOT/$HOME -for t_arch in $ARCH $EXTRA_ARCHES; do - echo "#### Linking $HOME/rpmbuild$-{t_arch} to the sysroot" -# link your rpmbuild to the one the sysroot sees. - mkdir -p $HOME/rpmbuild-${t_arch} - cd $SYSROOT/$HOME - ln -s $HOME/rpmbuild-${t_arch} rpmbuild-${t_arch} - sudo ln -s $HOME/rpmbuild-${t_arch} $SYSROOT/root/rpmbuild-${t_arch} - -done - - -#link the rpm db so it is consistent in and out of the sysroot -# i know this is weird. - -sudo mkdir -p $SYSROOT/$SYSROOT/var/lib -cd $SYSROOT/$SYSROOT/var/lib -sudo ln -s $SYSROOT/var/lib/rpm rpm - -# even wierder, we need the link for all the extra arches. -# this is partly from bad planning early on. the arch in the toolchain -# name is misleading since the arm 4.5.1 cross is happy to compile for -# armv3,4,5,6,7 -for t_arch in $EXTRA_ARCHES; do - extra_toochainroot_dir=`echo $TOOLCHAIN_ROOT | sed -e "s/${ARCH}/${t_arch}/g"` - sudo ln -s $TOOLCHAIN_ROOT $extra_toochainroot_dir - extra_rpmtop_dir=`echo $SYSROOT/var/lib | sed -e "s/${ARCH}/${t_arch}/g"` - extra_rpm_dir=`echo $SYSROOT/$SYSROOT/var/lib | sed -e "s/${ARCH}/${t_arch}/g"` - - sudo mkdir -p $extra_rpm_dir - cd $extra_rpm_dir - sudo ln -s $extra_rpmtop_dir/rpm rpm -done - - - -echo "#### Installing glibc into $SYSROOT" -# install the glibc we need as well as coreutils and bash -zypper-noarch ${ARCH} -n install -n glibc glibc-common glibc-devel glibc-headers bash coreutils kernel-headers libstdc++-devel - diff --git a/home/bin/setupBaseSYSROOT_armv7hl.sh b/home/bin/setupBaseSYSROOT_armv7hl.sh deleted file mode 100755 index 797c157..0000000 --- a/home/bin/setupBaseSYSROOT_armv7hl.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -if [ ! -d "$1"/sysroot ]; then - echo "need dir of mt-cross-tools" - exit 1 -fi - -MT_CROSS_TOOLS=$1 - -TOOLCHAIN_ROOT=/usr/armv7hl-redhat-linux-gnueabi -SYSROOT=${TOOLCHAIN_ROOT}/sys-root -ARCH=armv7hl -EXTRA_ARCHES="" - -echo "#### Setting up XXX-${ARCH} commands for the sys-root" -mkdir -p $HOME/bin -cd $HOME/bin -for t_arch in $ARCH $EXTRA_ARCHES; do - for cmdhead in rpm-noarch rpmbuild-noarch zypper-noarch zypper-download zypper-build-dep ; do - CMD=$(which ${cmdhead}) - if [ ! -e "$CMD" ] ; then - echo "Unable to find ${CMD}. Did you run setupDeveloper.sh and put ~/bin in your path?" - exit 1 - fi - ln -s ${CMD} ${cmdhead%-noarch}-${t_arch} - done -done - -echo "#### Setting up sysroot $SYSROOT" -sudo mkdir -p $SYSROOT -sudo rsync -av $MT_CROSS_TOOLS/sysroot/$ARCH/* $SYSROOT/ -# make a pkgconfig dir, which we will eventually need. -# and put a dummy file in -sudo mkdir -p ${SYSROOT}/usr/lib/pkgconfig -echo $SYSROOT >> /tmp/faux-nrcc.pc -sudo mv /tmp/faux-nrcc.pc ${SYSROOT}/usr/lib/pkgconfig/faux-nrcc.pc - -# add the certificate for the private repo on mt-fedora -curl http://mt-fedora.nrcc.noklab.com/mt-fedora.nrcc.noklab.com.ssl.crt | sudo tee -a /etc/pki/tls/certs/ca-bundle.crt - - -# install a base filesystem -zypper-noarch ${ARCH} refresh -zypper-noarch ${ARCH} lr - - -sudo mkdir -p ${SYSROOT}/${HOME} -group=$GROUPS -sudo chown $USER.$GROUP $SYSROOT/$HOME -for t_arch in $ARCH $EXTRA_ARCHES; do - echo "#### Linking $HOME/rpmbuild$-{t_arch} to the sysroot" -# link your rpmbuild to the one the sysroot sees. - mkdir -p $HOME/rpmbuild-${t_arch} - cd $SYSROOT/$HOME - ln -s $HOME/rpmbuild-${t_arch} rpmbuild-${t_arch} - sudo ln -s $HOME/rpmbuild-${t_arch} $SYSROOT/root/rpmbuild-${t_arch} - -done - - -#link the rpm db so it is consistent in and out of the sysroot -# i know this is weird. - -sudo mkdir -p $SYSROOT/$SYSROOT/var/lib -cd $SYSROOT/$SYSROOT/var/lib -sudo ln -s $SYSROOT/var/lib/rpm rpm - -# even wierder, we need the link for all the extra arches. -# this is partly from bad planning early on. the arch in the toolchain -# name is misleading since the arm 4.5.1 cross is happy to compile for -# armv3,4,5,6,7 -for t_arch in $EXTRA_ARCHES; do - extra_toochainroot_dir=`echo $TOOLCHAIN_ROOT | sed -e "s/${ARCH}/${t_arch}/g"` - sudo ln -s $TOOLCHAIN_ROOT $extra_toochainroot_dir - extra_rpmtop_dir=`echo $SYSROOT/var/lib | sed -e "s/${ARCH}/${t_arch}/g"` - extra_rpm_dir=`echo $SYSROOT/$SYSROOT/var/lib | sed -e "s/${ARCH}/${t_arch}/g"` - - sudo mkdir -p $extra_rpm_dir - cd $extra_rpm_dir - sudo ln -s $extra_rpmtop_dir/rpm rpm -done - - - -echo "#### Installing glibc into $SYSROOT" -# install the glibc we need as well as coreutils and bash -#libstdc++-devel -zypper-noarch ${ARCH} -n install -n setup glibc glibc-common glibc-devel glibc-headers kernel-headers - diff --git a/home/bin/setupDeveloper.sh b/home/bin/setupDeveloper.sh deleted file mode 100755 index 8e55be1..0000000 --- a/home/bin/setupDeveloper.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/sh -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -RPM_SERVER=mt-fedora.nrcc.noklab.com -RPM_CROSS_REPO=repos/f14-cross/ -VERSIONLOCK_FILE=/etc/yum/pluginconf.d/versionlock.list -FRELEASEVER=" --releasever 14" - -# some of these are for documentation, some are because configure is hardcoded to /usr/include. -# sigh. -# needed for docs: -# xmlto -# docbook2ps -# needed to build wayland: -# libffi-devel -# expat-devel - -# -# the rest are needed for cross env/rpmbuild - -# note, tcl is *only* needed if you want to build tcl for arm -YUMLIST_NRCC="zypper \ -cross-rpm-config \ -redhat-rpm-config \ -armv5tel-redhat-linux-gnueabi-binutils \ -armv5tel-redhat-linux-gnueabi-gcc \ -yum-utils \ -xmlto \ -docbook2ps \ -rpmdevtools \ -libffi-devel \ -docbook-utils-pdf \ -chrpath \ -glib2-devel \ -gtk-doc \ -compat-flex \ -linuxdoc-tools \ -w3m \ -docbook-style-xsl \ -docbook-dtds \ -tcl \ -asciidoc \ -sharutils \ -fdupes \ -popt-devel \ -file-devel \ -expat-devel" - - -RPMLIST_NRCC="redhat-rpm-config-9.1.0-5.fc14.nrcc.2 \ -rpm-build-4.8.1-5.fc14.nrcc.9 \ -rpm-4.8.1-5.fc14.nrcc.9 \ -rpm-apidocs-4.8.1-5.fc14.nrcc.9 \ -rpm-devel-4.8.1-5.fc14.nrcc.9 \ -rpm-python-4.8.1-5.fc14.nrcc.9 \ -rpm-cron-4.8.1-5.fc14.nrcc.9 \ -rpm-libs-4.8.1-5.fc14.nrcc.9 " - - -if [ ! -d "$1"/sysroot ]; then - echo "need dir of mt-cross-tools" - exit 1 -fi - -## add in the private repo certificate so zypper will play nice with it. -## this goes in the host machine certs, not the sysroots -curl http://${RPM_SERVER}/mt-fedora.nrcc.noklab.com.ssl.crt | sudo tee -a /etc/pki/tls/certs/ca-bundle.crt - - -SPHONE_DIR=$1 - -mkdir -p ~/bin -rsync -av $SPHONE_DIR/home/.rpm* ~/ - -cd ~/bin -for i in $SPHONE_DIR/home/bin/* ; do - echo "linking $i to $(basename $i) in `pwd`" - ln -sf $i $(basename $i) -done - - - -#force in basic needed packages -echo "Installing Development Tools" -sudo yum ${FRELEASEVER} -y groupinstall "Development Tools" -rpm -q wget || (echo "Installing wget"; sudo yum -y install wget) - -# yum-plugin-versionlock allows pinning for yum -sudo yum -y install yum-plugin-versionlock - -# the doofy plugin doesnt make an empty one nor does it work w/o one -sudo touch $VERSIONLOCK_FILE -sudo chmod 644 $VERSIONLOCK_FILE - -echo "Installing /etc/yum.repos.d/f14-cross.repo" -# grab the nrcc repo -if [ ! -e /etc/yum.repos.d/f14-cross.repo ]; then - cd /tmp - rm -f f14-cross.repo - wget http://$RPM_SERVER/f14-cross.repo - if [ -e /tmp/f14-cross.repo ]; then - sudo mv f14-cross.repo /etc/yum.repos.d/f14-cross.repo - else - echo "Couldnt retrieve the nrcc repo file" - echo "baggin out" - exit 1 - fi -fi - -for i in $YUMLIST_NRCC; do - rpm -q $i || (echo YUMMING $i; sudo yum -y install $i) -done - - - - -echo "Installing and Pinning NRCC Versions" -# we are making a manifest file so dependencies are all resolved at once -RPM_MANIFEST=/tmp/`mktemp RPM_MANIFEST_XXXXX` -for i in $RPMLIST_NRCC; do - cd /tmp - #check for our file in versionlock - BASE_NAME=`echo $i | sed -e 's/-[0-9]/ /' | cut -f1 -d ' '` - BASE_NAME_VERSIONED=`echo $i | sed -e 's/-[0-9]/& /' | cut -f1 -d ' '` - if sudo yum versionlock list | egrep $BASE_NAME_VERSIONED ; then - # remove it from the version lock. so we can grab the one we want. - VENTRY=`sudo yum versionlock list | egrep $BASE_NAME_VERSIONED` - sudo yum versionlock delete $VENTRY - fi - # the doofy plugin *sometimes* reverts the permissions to 600 instead of 644 - sudo chmod 644 $VERSIONLOCK_FILE - # using yumdownloader meand we get i686 or x86_64 whichever is correct - echo "grabbing $i using yumdownloader" - yumdownloader --disablerepo=* --enablerepo=f14-cross $BASE_NAME - echo "$i*rpm" >> $RPM_MANIFEST - echo "rpm manifest now looks like: " `cat $RPM_MANIFEST` - sudo yum versionlock $i -done - -# the doofy plugin *sometimes* reverts the permissions to 600 instead of 644 -sudo chmod 644 $VERSIONLOCK_FILE -echo "Forcing Manifest rpms in" -sudo rpm -Uv --force $RPM_MANIFEST -rm -f $RPM_MANIFEST -rm -rf /tmp/*rpm - - -NUM_CPUS=`grep processor /proc/cpuinfo | tail -1 | cut -f2 -d ':'` - -if [ "$NUM_CPUS" -eq "0" ]; then -echo "%_smp_mflags -j 1" >> ~/.rpmmacros -else -echo "%_smp_mflags -j ${NUM_CPUS}" >> ~/.rpmmacros -fi - - - - diff --git a/home/bin/unbindChroot.sh b/home/bin/unbindChroot.sh deleted file mode 100755 index 6064004..0000000 --- a/home/bin/unbindChroot.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -# unset up the bind mounts - -if [ "$1" == "" ]; then - echo "need abs path of chroot" - exit 1 -fi - -CHROOT_DIR=$1 - -sudo fuser -k ${CHROOT_DIR} - -sudo umount ${CHROOT_DIR}/proc -sudo umount ${CHROOT_DIR}/dev/pts -sudo umount ${CHROOT_DIR}/dev/ -sudo umount ${CHROOT_DIR}/dev/pts -sudo umount ${CHROOT_DIR}/sys -sudo umount ${CHROOT_DIR}/tmp - diff --git a/home/bin/uploadRPMS.sh b/home/bin/uploadRPMS.sh deleted file mode 100755 index 1859447..0000000 --- a/home/bin/uploadRPMS.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -REPO_SERVER=mt-fedora.nrcc.noklab.com -REPO_PATH=/srv/www/repos/f14- - - -USAGE="Usage: $0 [shared|sysroot|platform|private] rpm1 rpm2 rpm3 rpmN" - -if [ "$#" == "0" ]; then - echo "$USAGE" - exit 1 -fi - - - -DEST=$1 -shift - -if [ "$DEST" != "shared" -a "$DEST" != "platform" -a "$DEST" != "sysroot" -a "$DEST" != "private" ]; then - echo "$USAGE" - exit 1 -fi -REPO_PATH="${REPO_PATH}${DEST}/incoming/" - -# copy over the rpms -while (( "$#" )); do - echo "working on $1" - if [ ! -e "$1" ]; then - echo "can't find file $1 to upload" - exit - fi; - rsync -av $1 $REPO_SERVER:$REPO_PATH - shift -done - - -# and make them available -#ssh $REPO_SERVER "sudo /root/bin/make.repos.incoming" >>/dev/null & -# better to know when it is done... -ssh $REPO_SERVER "sudo /root/bin/make.repos.incoming"
\ No newline at end of file diff --git a/home/bin/zypper-build-dep b/home/bin/zypper-build-dep deleted file mode 100755 index 43f5dd8..0000000 --- a/home/bin/zypper-build-dep +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -BASENAME=$(basename $0) -ARCH=${BASENAME##*-} -filetype="package" -usage="$(basename $0) [-a ARCH] [-n] SPEC_FILE+" - -NON_INTERACTIVE="" -QUIET="" -while getopts "a:hqn" opt ; do - case $opt in - a) ARCH="$OPTARG";; - h) echo $usage; exit 0;; - n) NON_INTERACTIVE="--non-interactive";; - q) QUIET="--quiet";; - \?) echo "Bad option"; exit 1;; - esac -done -shift $(($OPTIND-1)) - -VARCACHE="/var/cache/zypp/packages" -ZYPP_CONF="/etc/zypp/zypp.conf" -ZYPPER="zypper" - -if [ "$ARCH" != "build-dep" ] ; then - SYSROOT=/usr/${ARCH}-redhat-linux-gnueabi/sys-root - ZYPP_CONF="${SYSROOT}${ZYPP_CONF}" - VARCACHE="${SYSROOT}${VARCACHE}" - ZYPPER="ZYPP_CONF=${ZYPP_CONF} zypper -R ${SYSROOT}" -fi - - -for i in "$*" ; do - echo "i=$i arch= ${ARCH}" - INSTALL_LIST="" - for j in `rpmbuild-${ARCH} -bp $i 2>&1 | egrep "is needed by" | cut -f1 -d ' '` ; do - INSTALL_LIST=$INSTALL_LIST" $j" - done - if [ "$INSTALL_LIST" != "" ]; then - zypper-${ARCH} $NON_INTERACTIVE $QUIET install --no-recommends $INSTALL_LIST; - fi -done diff --git a/home/bin/zypper-download b/home/bin/zypper-download deleted file mode 100755 index 92a02db..0000000 --- a/home/bin/zypper-download +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### - -BASENAME=$(basename $0) -ARCH=${BASENAME##*-} -filetype="package" -usage="$(basename $0) [-s] [-a ARCH] [-r reponame]+ PACKAGE+" -REPOLIST="" -while getopts "a:r:hs" opt ; do - case $opt in - a) ARCH="$OPTARG";; - r) REPOLIST="$REPOLIST --repo=$OPTARG";; - h) echo $usage; exit 0;; - s) filetype="srcpackage";; - \?) echo "Bad option"; exit 1;; - esac -done -shift $(($OPTIND-1)) - -VARCACHE="/var/cache/zypp/packages" -ZYPP_CONF="/etc/zypp/zypp.conf" -ZYPPER="zypper" - -if [ "$ARCH" != "download" ] ; then - SYSROOT=/usr/${ARCH}-redhat-linux-gnueabi/sys-root - ZYPP_CONF="${SYSROOT}${ZYPP_CONF}" - VARCACHE="${SYSROOT}${VARCACHE}" - ZYPPER="ZYPP_CONF=${ZYPP_CONF} zypper -R ${SYSROOT}" -fi - -for i in "$*" ; do - echo "Searching for $filetype $i" - tmpfile=$(mktemp) - sudo $ZYPPER -n install --force -d $REPOLIST -t $filetype $i > $tmpfile - pkgname=$(awk -F\' '/Forcing installation/ {print $2}' $tmpfile) - reponame=$(awk -F\' '/Forcing installation/ {print $4}' $tmpfile) - rm $tmpfile - if [ "$pkgname" ] ; then - echo "Found package name $pkgname in repo '$reponame'" - awkprog='BEGIN {FS=" *\\| *"} {if ($3=="'$reponame'") print $2}' - repovalue=$(sudo $ZYPPER repos | awk "$awkprog") - filename="${VARCACHE}/${repovalue}/${pkgname}" - if [ "$filetype" = "package" ] ; then - filename="${filename}.rpm" - else - filename="${filename%.noarch}.src.rpm" - fi - if [ -f "$filename" ] ; then - echo "Copying $filename to local directory" - cp $filename $(basename $filename) - else - # epochs in files really really suck for zypper... - # for epoch 6, frex, they add a 6: before the version - # in the rpm data but not in the filename - filename=`echo $filename | sed -e "s/[0-9]*://"` - if [ -f "$filename" ] ; then - echo "Copying $filename to local directory" - cp $filename $(basename $filename) - else - echo "Package '$filename' isn't where I thought it should be!" - fi - fi - fi -done - - - diff --git a/home/bin/zypper-noarch b/home/bin/zypper-noarch deleted file mode 100755 index 3458538..0000000 --- a/home/bin/zypper-noarch +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -#### -# Copyright (c) 2011 Nokia Corporation -# -# 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. -#### -# -# Usage: -# -# zypper-noarch ARCH ARGS... -# OR -# zypper-armv5tel ARGS... -# -# The architecture is derived from the name of the shell script, or by -# running the generic script and passing the architecture as the first argument. -# This allows us to create a softlink to the shell script for each possible architecture. -# -# E.g.: ln -s zypper-noarch zypper-armv5tel -# - -BASENAME=$(basename $0) -ARCH=${BASENAME#*-} -if [ "$ARCH" = "noarch" ] ; then - ARCH=$1 - shift -fi - -export SYSROOT=/usr/${ARCH}-redhat-linux-gnueabi/sys-root -export PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig - -sudo ZYPP_CONF=${SYSROOT}/etc/zypp/zypp.conf zypper -R $SYSROOT $* - -# in case anything we installed added a pkgconfig file, we need to "fix" it to be sysroot friendly - -if [ -d ${PKG_CONFIG_PATH} ]; then - for i in ${PKG_CONFIG_PATH}/*.pc ; do - if [ -f "$i" ]; then - if ! grep ${SYSROOT} $i >> /dev/null ; then - echo Fixing "$i"; - sudo cp $i $i.orig - sudo sed -i -e "s:=/usr:=${SYSROOT}/usr:" $i - sudo sed -i -e "s:=/lib:=${SYSROOT}/lib:" $i - sudo sed -i -e "s:-I/usr/include:-I${SYSROOT}/usr/include:" $i - sudo sed -i -e "s:-L/usr/lib:-L${SYSROOT}/usr/lib:" $i; - sudo sed -i -e "s:=/opt/mt:=${SYSROOT}/opt/mt:" $i - fi - fi - done -fi diff --git a/mkrootfs-rasp-pi b/mkrootfs-rasp-pi new file mode 100755 index 0000000..460431e --- /dev/null +++ b/mkrootfs-rasp-pi @@ -0,0 +1,189 @@ +#!/bin/sh + +ARCH=armv5tel +SYSROOT=/opt/qtonpi/${ARCH}-qtonpi-linux-gnueabi/sys-root +ZYPP_CONF_NAME=etc-zypp-armv5fedora14-upstream.tgz +# set -x +function usage { + echo "usage: sudo $0 ROOTFS_DIR RPM_LIST" + exit +} + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + usage +fi + +if [ $# -ne 2 ] ; then + usage +fi + +if [ "$1" == "" ]; then + echo "need a rootfs dir" + usage +fi + +# where we stage it +if [ -e $1 ] ; then + echo "$1 already exists, try again" + usage +fi + +if [ ! -s "$2" ]; then + echo "need a list of rpms to populate" + usage +fi + +F_RPMLIST=$2 + +function die { + echo $1 + exit +} + +mkdir -p $1/etc/ +# force absolute path, could use readlink -m but not on mac :( +fsdir=`cd $1; pwd` + +# set up our zypper +# just package it here +tar xf $ZYPP_CONF_NAME -C $fsdir/etc +export ZYPP_CONF=$fsdir/etc/zypp/zypp.conf + +echo "using the following repos:" +ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir lr +echo "refreshing the repos, this will take awhile (~ 5min)" +ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir refresh + +# prepare root fs +mkdir -p $fsdir/dev +mkdir -p $fsdir/dev/pts +mkdir -p $fsdir/dev/shm + +mknod -m 0600 $fsdir/dev/console c 5 1 +mknod $fsdir/dev/fb0 c 29 0 +mknod $fsdir/dev/full c 1 7 +mknod -m 0666 $fsdir/dev/null c 1 3 +mknod $fsdir/dev/ptmx c 5 2 +mknod $fsdir/dev/random c 1 8 +mknod $fsdir/dev/urandom c 1 9 +mknod -m 0666 $fsdir/dev/zero c 1 5 + +mknod $fsdir/dev/tty c 4 0 +mknod $fsdir/dev/tty1 c 4 1 +mknod $fsdir/dev/tty2 c 4 2 + +# vchiq dev +mknod $fsdir/dev/vchiq c 253 0 + + +# and autofs for systemd +mknod $fsdir/dev/autofs c 10 235 + +mkdir -p $fsdir/var/lib +mkdir -p $fsdir/var/log + +# we at least need a shell +# install packages +ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir -n install upstart-sysvinit || die "can't install what I can't find: upstart-sysvinit" +for i in `cat $F_RPMLIST| sed '/^ *#/d;s/#.*//' `; do + echo "Working on $i" + echo "calling ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir -n install $i " + ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir -n install $i || die "can't install what I can't find: $i" +done + + +# the Berkelydb datase is VERY sensitive to what tools were last used to access it. +# for the doodad to use rpm, we need to have rpm regenerate the __db.00* files +rm -f $fsdir/var/lib/rpm/__db.00* + +# the standard yum repos don't work for us +# the good ones were insered via etc-raspi-various.tar.bz2 +for i in fedora.repo fedora-updates.repo fedora-updates-testing.repo; do + rm -f $fsdir/etc/yum.repos.d/$i +done +echo "arch=${ARCH}" >> $fsdir/etc/yum.conf + +### +# finally we need a section of rc.local to check and make sure our +# desired services are enabled. This is because the postinstall +# scriplets can't run when we do an x86 install of the +# armpackages. If you want more pkgs, add their rpm to the list and then +# add the chkconfig name to the list that goes into rc.local + +# Currently enabling: +# network, ntpd, sshd +cat >> $fsdir/etc/rc.d/rc.local <<DELIM +# the fs is made on an x86 box so the +# post install scriptlets to add these services +# didnt run +NEED_REBOOT="" +for i in network ntpd sshd messagebus; do + Q=\`/sbin/chkconfig --list \$i\` + if [ "\$Q" == "" ]; then + echo "enabling \$i service" + /sbin/chkconfig --add \$i + /sbin/chkconfig \$i on + NEED_REBOOT="yes" + fi +done +if [ "\$NEED_REBOOT" != "" ]; then + echo "reboot system to finish enabling the new services" > /etc/motd + depmod -a +else + rm /etc/motd + touch /etc/motd +fi +# to install the binary only gles kernel module +/sbin/depmod -a +ldconfig +DELIM + +# make sure we find the qt5 libs +cat >> $fsdir/etc/ld.so.conf.d/qt5.conf <<DELIM2 +/opt/qt5/lib +DELIM2 + +# make sure we find the gles libs +cat >> $fsdir/etc/ld.so.conf.d/gles.conf <<DELIM3 +/opt/vc/lib +DELIM3 + +# the current kernel brings up the usb device at random addresses. +# we'll remap them all to eth0 +cat >> $fsdir/etc/udev/rules.d/70-persistent-net.rules <<DELIM4 +# the current kernel brings up the usb device at random addresses. +# we'll remap them all to eth0 +# This file was automatically generated by the /lib/udev/write_net_rules +# program, run by the persistent-net-generator.rules rules file. +# +# You can modify it, as long as you keep each rule on a single +# line, and change only the value of the NAME= key. + +# USB device 0x0424:0xec00 (usb) +SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:27:eb:*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" + +DELIM4 + +# lastly force in the extra stuff +# the etc files: +# passwd for root is rootme +# also the init.d scripts +echo "unpacking the etc files" +tar xf binaries/etc-raspi-various.tar.bz2 -C $fsdir || die "sad etcfiles" + +# the kernel modules for the 2.6.35.7 kernel +echo "unpacking the kernel modules" +tar xf binaries/rasp-pi-kernel-3.1-modules.tar.bz2 -C $fsdir/lib/modules || die "sad kernel modules" + +# and the binary only gles libraries +echo "unpacking the gles libs" +tar xf binaries/opt-vc-bcom-gles.tar.bz2 -C $fsdir || die "sad gles libs" + +# and qt5 +echo "unpacking qt5" +tar xf ../../app-sdk/opt-qt5-current.tar.bz2 -C $fsdir || die "sad qt5" + +# clean up leftovers +rm -f $fsdir/etc/resolv.conf +touch $fsdir/etc/resolv.conf diff --git a/mksysroot-rasp-pi b/mksysroot-rasp-pi new file mode 100755 index 0000000..11989a3 --- /dev/null +++ b/mksysroot-rasp-pi @@ -0,0 +1,86 @@ +#!/bin/sh + +ARCH=armv5tel +SYSROOT=/opt/qtonpi/${ARCH}-qtonpi-linux-gnueabi/sys-root +ZYPP_CONF_NAME=etc-zypp-armv5fedora14-upstream.tgz +# set -x +function usage { + echo "usage: sudo $0 RPM_LIST" + exit +} + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + usage +fi + +if [ $# -ne 1 ] ; then + usage +fi + +if [ ! -s "$1" ]; then + echo "need a list of rpms to populate" + usage +fi + +F_RPMLIST=$1 + +function die { + echo $1 + exit +} + +# force absolute path, could use readlink -m but not on mac :( +fsdir=$SYSROOT + +if [ -d $fsdir ]; then + echo "$fsdir already exists. I won't overwrite it" + echo "please move/delete your sys-root so can I create a new one" + exit +fi + +mkdir -p $fsdir/etc/ + +# set up our zypper +# just package it here +tar xvf $ZYPP_CONF_NAME -C $fsdir/etc +export ZYPP_CONF=$fsdir/etc/zypp/zypp.conf + +echo "using the following repos:" +ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir lr +echo "refreshing the repos, this will take awhile (~ 5min)" +ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir refresh + +mkdir -p $fsdir/var/lib +mkdir -p $fsdir/var/log + +# install packages +ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir -n install upstart-sysvinit || die "can't install what I can't find: upstart-sysvinit" +for i in `cat $F_RPMLIST| sed '/^ *#/d;s/#.*//' `; do + echo "Working on $i" + echo "calling ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir -n install $i " + ZYPP_CONF=$ZYPP_CONF zypper -R $fsdir -n install $i || die "can't install what I can't find: $i" +done + +# lastly force in the extra stuff +# and the binary only gles libraries +echo "unpacking the gles libs/headers" +tar xf binaries/opt-vc-bcom-gles.tar.bz2 -C $fsdir || die "can't unpack the gles tarfile" +# and qt5 +echo "unpacking qt5" +if [ -d /opt/qt5 ]; then + echo "/opt/qt5 already exists. I won't overwrite it" + if [ "`file /opt/qt5/lib/libQtCore.so.5.0.0| egrep ARM`" != "" ]; then + echo "since /opt/qt5 appears to be an arm install, I will link the sysroot/opt/qt5 to your existing qt5" + cd $fsdir/opt + ln -s /opt/qt5 qt5 + else + echo "/opt/qt5/lib/libQtCore.so.5.0.0 doesn't appear to be an ARM binary; giving up..." + fi + exit +fi + +# no preexisting /opt/qt5, install ours +sudo tar xvf ../../app-sdk/opt-qt5-current.tar.bz2 -C / || die "can't unpack the qt5 tarfile" +cd $fsdir/opt +ln -s /opt/qt5 qt5 diff --git a/rasp-pi-rootfs-list.default b/rasp-pi-rootfs-list.default new file mode 100644 index 0000000..3f006f1 --- /dev/null +++ b/rasp-pi-rootfs-list.default @@ -0,0 +1,39 @@ + +setup +rpm +coreutils +bash +rsync +nano +openssl +openssh +wget +less +strace +udev +dbus +libpng +libjpeg +freetype +libxml2 +evtest +which +e2fsprogs +dhclient +passwd +yum +ntp +ntpdate +openssh-server +openssh-clients +diffutils +glib2 +libpng +libjpeg +libudev +libedit +freetype +libxml2 +libicu +gdb +gdb-gdbserver diff --git a/rasp-pi-sysroot-list.default b/rasp-pi-sysroot-list.default new file mode 100644 index 0000000..bcb8e64 --- /dev/null +++ b/rasp-pi-sysroot-list.default @@ -0,0 +1,19 @@ + +setup +coreutils +bash +openssl-devel +openssh +dbus-devel +glibc-devel +passwd +openssh-server +openssh-clients +libxml2-devel +libicu-devel +libpng-devel +libjpeg-devel +libudev-devel +libedit-devel +freetype-devel +glib2-devel diff --git a/sysroot/armv5tel/etc/zypp/repos.d/f13.repo b/sysroot/armv5tel/etc/zypp/repos.d/f13.repo deleted file mode 100644 index 5ca8a1c..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/f13.repo +++ /dev/null @@ -1,8 +0,0 @@ -[f13-arm] -name=ARM RPM Repository for Fedora13 -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/fedora-secondary/releases/13/Everything/arm/os -type=rpm-md -gpgcheck=0 -keeppackages=0 diff --git a/sysroot/armv5tel/etc/zypp/repos.d/f14-src.repo b/sysroot/armv5tel/etc/zypp/repos.d/f14-src.repo deleted file mode 100644 index b085ee3..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/f14-src.repo +++ /dev/null @@ -1,24 +0,0 @@ -[f14-src] -name=SRC RPM Repository for Fedora14 -enabled=1 -failovermethod=priority -autorefresh=0 -# the mirror server was sometimes giving out broken mirrors. -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch -# mirrors.kernel.org was compromised and is down -#baseurl=http://mirrors.kernel.org/fedora/releases/14/Everything/source/SRPMS/ -#baseurl=http://arm.koji.fedoraproject.org/mash/beta/f13-arm-2011-05-10/f13-arm/arm/os/ -type=rpm-md -gpgcheck=0 -keeppackages=0 - -[f14-updates-src] -name=Fedora $releasever - Updates Source -failovermethod=priority -enabled=0 -autorefresh=0 -#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/SRPMS/ -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch -enabled=0 -gpgcheck=0 - diff --git a/sysroot/armv5tel/etc/zypp/repos.d/f14.repo b/sysroot/armv5tel/etc/zypp/repos.d/f14.repo deleted file mode 100644 index ed3b7eb..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/f14.repo +++ /dev/null @@ -1,8 +0,0 @@ -[f14-arm] -name=ARM RPM Repository for Fedora14 -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-mirror/armv5tel -type=rpm-md -gpgcheck=0 -keeppackages=0 diff --git a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-gumbo.repo b/sysroot/armv5tel/etc/zypp/repos.d/nrcc-gumbo.repo deleted file mode 100644 index 3feadd9..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-gumbo.repo +++ /dev/null @@ -1,19 +0,0 @@ -[nrcc-gumbo] -name=NRCC GUMBO ARM RPM Repository for Fedora -# enable this if we need to add something in here -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-gumbo/armv5tel -type=rpm-md -gpgcheck=0 -keeppackages=0 - -[nrcc-srpm-gumbo] -name=NRCC GUMBO ARM SRPM Repository for Fedora -# enable this if we need to add something in here -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-gumbo/SRPMS -type=rpm-md -gpgcheck=0 -keeppackages=0 diff --git a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-platform.repo b/sysroot/armv5tel/etc/zypp/repos.d/nrcc-platform.repo deleted file mode 100644 index 7f8808c..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-platform.repo +++ /dev/null @@ -1,21 +0,0 @@ -[nrcc-platform] -name=NRCC PLATFORM ARM RPM Repository for Fedora -# enable if you want to pull a platform rpm into your sysroot -# generally a bad idea. -enabled=0 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-platform/armv5tel -type=rpm-md -gpgcheck=0 -keeppackages=0 - -[nrcc-srpm-platform] -name=NRCC PLATFORM ARM SRPM Repository for Fedora -# enable this if we want to work on the SRPMS for -# the platform -enabled=0 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-platform/SRPMS -type=rpm-md -gpgcheck=0 -keeppackages=0 diff --git a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-shared.repo b/sysroot/armv5tel/etc/zypp/repos.d/nrcc-shared.repo deleted file mode 100644 index 45a9c62..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-shared.repo +++ /dev/null @@ -1,19 +0,0 @@ -[nrcc-shared] -name=NRCC SHARED ARM RPM Repository for Fedora -# enable this if we need to add something in here -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-shared/armv5tel -type=rpm-md -gpgcheck=0 -keeppackages=0 - -[nrcc-srpm-shared] -name=NRCC SHARED ARM SRPM Repository for Fedora -# enable this if we need to add something in here -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-shared/SRPMS -type=rpm-md -gpgcheck=0 -keeppackages=0 diff --git a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-sysroot.repo b/sysroot/armv5tel/etc/zypp/repos.d/nrcc-sysroot.repo deleted file mode 100644 index b0d9890..0000000 --- a/sysroot/armv5tel/etc/zypp/repos.d/nrcc-sysroot.repo +++ /dev/null @@ -1,19 +0,0 @@ -[nrcc-sysroot] -name=NRCC SYSROOT ARM RPM Repository for Fedora -# enable this if we need to add something in here -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-sysroot/armv5tel -type=rpm-md -gpgcheck=0 -keeppackages=0 - -[nrcc-srpm-sysroot] -name=NRCC SYSROOT ARM SRPM Repository for Fedora -# enable this if we need to add something in here -enabled=1 -autorefresh=0 -baseurl=http://mt-fedora.nrcc.noklab.com/repos/f14-sysroot/SRPMS -type=rpm-md -gpgcheck=0 -keeppackages=0 diff --git a/sysroot/armv5tel/etc/zypp/systemCheck b/sysroot/armv5tel/etc/zypp/systemCheck deleted file mode 100644 index 4cb60e2..0000000 --- a/sysroot/armv5tel/etc/zypp/systemCheck +++ /dev/null @@ -1,13 +0,0 @@ -## -## This file contains requirements/conflicts which fulfill the -## needs of a running system. -## For example the system would be broken if not glibc or kernel is -## installed. -## So the user will be informed if these packages will be deleted. -## -## format: Each line represents one dependency: -## e.g. -## requires:kernel -## requires:glibc - -requires:glibc diff --git a/sysroot/armv5tel/etc/zypp/zypp.conf b/sysroot/armv5tel/etc/zypp/zypp.conf deleted file mode 100644 index 4fdbea9..0000000 --- a/sysroot/armv5tel/etc/zypp/zypp.conf +++ /dev/null @@ -1,478 +0,0 @@ -## Configuration file for software management -## /etc/zypp/zypp.conf -## -## Boolean values are 0 1 yes no on off true false - - -[main] - - -## -## Override the detected architecture -## -## Valid values: i586, i686, x86_64, ppc, ppc64, ia64, s390, s390x, .. -## Default value: Autodetected -## -## ** CAUTION: Only set if you know what you're doing ! -## ** Changing this needs a full refresh (incl. download) -## ** of all repository data. -## -arch = armv5tel - - -## -## Path where the caches are kept. -## -## Valid values: A directory -## Default value: /var/cache/zypp -## -# cachedir = /var/cache/zypp - - -## -## Path where the repo metadata is downloaded and kept. -## -## Valid values: A directory -## Default value: {cachedir}/raw -## -## Changing this needs a full refresh (incl. download) of all repository data -## -# metadatadir = /var/cache/zypp/raw - - -## -## Path where the repo solv files are created and kept. -## -## Valid values: A directory -## Default value: {cachedir}/solv -## -# solvfilesdir = /var/cache/zypp/solv - - -## -## Path where the repo packages are downloaded and kept. -## -## Valid values: A directory -## Default value: {cachedir}/packages -## -# packagesdir = /var/cache/zypp/packages - - -## -## Path where the configuration files are kept. -## -## Valid values: A directory -## Default value: /etc/zypp -## -# configdir = /etc/zypp - -## -## Path where the known repositories .repo files are kept -## -## Valid values: A directory -## Default value: {configdir}/repos.d -## -## Changing this invalidates all known repositories -## -# reposdir = /etc/zypp/repos.d - -## -## Path where the known services .service files are kept -## -## Valid values: A directory -## Default value: {configdir}/services.d -## -## Changing this invalidates all known services -## -# servicesdir = /etc/zypp/services.d - - -## -## Whether repository urls should be probed when added -## -## Valid values: boolean -## Default value: false -## -## If true, accessability of repositories is checked immediately (when added) -## (e.g. 'zypper ar' will check immediately) -## If false, accessability of repositories is checked when refreshed -## (e.g. 'zypper ar' will delay the check until the next refresh) -## -# repo.add.probe = false - - -## -## Amount of time in minutes that must pass before another refresh. -## -## Valid values: Integer -## Default value: 10 -## -## If you have autorefresh enabled for a repository, it is checked for -## up-to-date metadata not more often than every <repo.refresh.delay> -## minutes. If an automatic request for refresh comes before <repo.refresh.delay> -## minutes passed since the last check, the request is ignored. -## -## A value of 0 means the repository will always be checked. To get the oposite -## effect, disable autorefresh for your repositories. -## -## This option has no effect for repositories with autorefresh disabled, nor for -## user-requested refresh. -## -# repo.refresh.delay = 10 - -## -## Maximum number of concurrent connections to use per transfer -## This setting is only used if more than one is possible -## Setting it to a reasonable number avoids flooding servers -## -# download.max_concurrent_connections = 2 - -## -## Sets the minimum download speed (bytes per second) -## until the connection is dropped -## This can be useful to prevent security attacks on hosts by -## providing updates at very low speeds. -## -## 0 means no limit -## -# download.min_download_speed = 0 - -## Maximum download speed (bytes per second) -## 0 means no limit -# download.max_download_speed = 0 - -## Number of tries per download which will be -## done without user interaction -## 0 means no limit (use with caution) -# download.max_silent_tries = 5 - -## -## Whether to consider using a .delta.rpm when downloading a package -## -## Valid values: boolean -## Default value: true -## -## Using a delta rpm will decrease the download size for package updates -## since it does not contain all files of the package but only the binary -## diff of changed ones. Recreating the rpm package on the local machine -## is an expensive operation (memory,CPU). If your network connection is -## not too slow, you benefit from disabling .delta.rpm. -## -# download.use_deltarpm = true - -## -## Whether to consider using a deltarpm even when rpm is local -## -## Valid values: boolean -## Default value: false -## -## This option has no effect unless download.use_deltarpm is set true. -## -# download.use_deltarpm.always = false - -## -## Hint which media to prefer when installing packages (download vs. CD). -## -## Valid values: download, volatile -## Default value: download -## -## Note that this just a hint. First of all the solver will choose the 'best' -## package according to its repos priority, version and architecture. But if -## there is a choice, we will prefer packages from the desired media. -## -## Packages available locally are always preferred. The question is whether -## you prefer packages being downloaded via FTP/HTTP/HTTPS (download), rather -## than being prompted to insert a CD/DVD (volatile), in case they are available -## on both media. -## -## Name | Priority | URI -## openSUSE-11.1 99 dvd:/// -## openSUSE-11.1-Oss 99 http://download.opensuse.org/distribution/11.1/repo/oss -## -## In the above example 2 repositories with similar content are used. Rather -## than raising the priority of one of them to 'prefer' a certain media, you -## should use the same priority for both and set download.media_preference -## instead. -## -## download.media_preference = download - -## -## Commit download policy to use as default. -## -## DownloadOnly, Just download all packages to the local cache. -## Do not install. Implies a dry-run. -## -## DownloadInAdvance, First download all packages to the local cache. -## Then start to install. -## -## DownloadInHeaps, Similar to DownloadInAdvance, but try to split -## the transaction into heaps, where at the end of -## each heap a consistent system state is reached. -## -## DownloadAsNeeded Alternating download and install. Packages are -## cached just to avid CD/DVD hopping. This is the -## traditional behaviour. -## -## <UNSET> If a value is not set, empty or unknown, we pick -## some sane default. -## -## commit.downloadMode = -commit.downloadMode = DownloadInAdvance - -## -## Defining directory which contains vendor description files. -## -## One file in this directory reflects a group of equivalent vendors. e.G.: -## (filename is "nvidia" but could be any other name): -## ------------------------- file contains begin ----------------------- -## [main] -## -## vendors = nvidia,suse,opensuse -## -## ------------------------- file contains end ----------------------- -## Libzypp makes an string comparision (like strncmp, case-insensitive) -## whereas the beginning of the strings are compared only. -## e.G. vendor "opensuse11.0" is compatible to "openSuSE". -## -## Valid values: A directory -## Default value: {configdir}/vendors.d -## -# vendordir = /etc/zypp/vendors.d - - -## -## Whether required packages are installed ONLY -## So recommended packages, language packages and packages which depend -## on hardware (modalias) will not be regarded. -## -## Valid values: boolean -## Default value: false -## -# solver.onlyRequires = false - -## -## EXPERTS ONLY: Per default the solver will not replace packages of -## different vendors, unless you explicitly ask to do so. Setting this -## option to TRUE will disable this vendor check (unless the application -## explicitly re-enables it). Packages will then be considered based on -## repository priority and version only. This may easily damage your system. -## -## CHANGING THE DEFAULT IS NOT RECOMMENDED. -## -## Valid values: boolean -## Default value: false -## -# solver.allowVendorChange = false - -## -## EXPERTS ONLY: Cleanup when deleting packages. Whether the solver should -## per default try to remove packages exclusively required by the ones he's -## asked to delete. -## -## This option should be used on a case by case basis, enabled via -## command line options or switches the applications offer. Changing -## the global default on a system where unattended actions are performed, -## may easily damage your system. -## -## CHANGING THE DEFAULT IS NOT RECOMMENDED. -## -## Valid values: boolean -## Default value: false -## -# solver.cleandepsOnRemove = false - -## -## This file contains requirements/conflicts which fulfill the -## needs of a running system. -## For example the system would be broken if not glibc or kernel is -## installed. -## So the user will be informed if these packages will be deleted. -## -## Format: Each line represents one dependency: -## e.g. -## requires:kernel -## requires:glibc -## Default value: {configdir}/systemCheck -## -# solver.checkSystemFile = /etc/zypp/systemCheck - -## -## When committing a dist upgrade (e.g. 'zypper dup') a solver testcase -## is written to /var/log/updateTestcase-<date>. It is needed in bugreports. -## This optin returns the number of testcases to keep on the system. Old -## cases will be deleted, as new ones are created. -## -## Use 0 to write no testcase at all, or -1 to keep all testcases. -## -## Valid values: Integer -## Default value: 2 -## -# solver.upgradeTestcasesToKeep = 2 - -## -## Whether dist upgrade should remove a products dropped packages. -## -## A new product may suggest a list of old and no longer supported -## packages (dropped packages). Performing a dist upgrade the solver -## may try to delete them, even if they do not cause any dependency -## problem. -## -## Turning this option off, the solver will not try to remove those -## packages unless they actually do cause dependency trouble. You may -## do the cleanup manually, or simply leave them installed as long -## as you don't need the disk space. -## -## Valid values: Boolean -## Default value: true -## -# solver.upgradeRemoveDroppedPackages = true - -## -## Packages which can be installed in different versions at the same time. -## -## Packages are selected either by name, or by provides. In the later case -## the string must start with "provides:" immediately followed by the capability. -## -## Example: -## kernel - just packages whith name 'kernel' -## provides:multiversion(kernel) - all packages providing 'multiversion(kernel)' -## (kenel and kmp packages should do this) -## Valid values: -## Comma separated list of packages. -## -## Default value: -## empty -## -# multiversion = provides:multiversion(kernel) -multiversion = kernel-ivi,kernel-netbook,kernel-menlow,kernel-mrst - -## -## Path to locks file. If not exist then is create. -## In this file is saved also UI locks. -## -## valid value: path to file or place where file can be created -## default value: {configdir}/locks -## -# locksfile.path = /etc/zypp/locks - -## -## Whetever to apply locks in locks file after zypp start. -## -## Valid values: boolean -## Default value: true -## -# locksfile.apply = true - -## -## Where update items are stored -## (example: scripts, messages) -## -## Valid values: path to directory -## Default value: /var/adm -## -# update.datadir = /var/adm - -## -## Where update messages are stored -## -## Valid values: path to directory -## Default value: {update.datadir}/update-messages -## -# update.messagesdir = /var/adm/update-messages - -## -## Where update scripts are stored -## -## Valid values: path to directory -## Default value: {update.datadir}/update-scripts -## -# update.scriptsdir = /var/adm/update-scripts - -## -## Command to be invoked to send update messages. -## -## Packages may leave an update message file in {update.messagesdir}. -## At the end of each commit, zypp collects those messages and may send -## a notification to the user. -## -## zypp will prepare the update messages according to the selected -## content format and pipe the content to the command. -## -## Format: -## single - For each update message invoke the command and send -## the message. -## none - For each update message invoke the command but don't -## use a pipe to send any data. You probably want to pass -## the message file on the commandline using %P (see -## Substitutions). -## digest - Single invocation of the command, sending the path -## names of all update message. One per line. -## bulk - Single invocation of the command, sending the -## concatenated content of all update messages, separated -## by Ctrl-L. -## -## Substitutions: -## %p - package identification (name-version-release.arch) -## %P - full path to the update message file -## -## Valid values: The value is specified as "format | command". -## An empty value will turn off any notification. -## -## Examples: single | mail -s 'Update message from %p' root -## none | my-send-script -f %P -## -## Default value: single | /usr/lib/zypp/notify-message -p %p -## -# update.messages.notify = single | /usr/lib/zypp/notify-message -p %p - -## -## Options for package installation: excludedocs -## -## Don't install any files which are marked as documentation. -## -## Valid values: boolean -## Default value: no -## -# rpm.install.excludedocs = no - -## -## Location of history log file. -## -## The history log is described at -## http://en.opensuse.org/Libzypp/Package_History -## -## Valid values: absolute path to a file -## Default value: /var/log/zypp/history -## -# history.logfile = /var/log/zypp/history - -## -## Global credentials directory path. -## -## If a URL contains ?credentials=<filename> parameter, the credentials will -## be stored and looked for in a file named <filename> in this directory. -## -## Valid values: absolute path to a directory -## Default value: /etc/zypp/credentials.d -## -# credentials.global.dir = /etc/zypp/credentials.d - -## -## Global credentials catalog file path. -## -## This file contains a catalog of all known user credentials which were -## not stored via the ?credentials=<filename> URL parameter, i.e. passed -## in URL as username:password component, or entered by user in -## an authentication dialog. -## -## Valid values: absolute path to a file -## Default value: /etc/zypp/credentials.cat -## -# credentials.global.file = /etc/zypp/credentials.cat - -### we don't want to run the scripts when we install into the sysroot -### so we turn on the noscript option here -### we also don't need docs in the sysroot so same thing... -### available options are in libzypp/zypp/target/rpm/RpmFlags.h -rpm.install.noscripts = yes -rpm.install.excludedocs = yes
\ No newline at end of file diff --git a/sysroot/armv5tel/etc/zypp/zypper.conf b/sysroot/armv5tel/etc/zypp/zypper.conf deleted file mode 100644 index 802a1cf..0000000 --- a/sysroot/armv5tel/etc/zypp/zypper.conf +++ /dev/null @@ -1,162 +0,0 @@ -## Configuration file for Zypper. -## -## location: /etc/zypp/zypper.conf (system-wide) -## or: $HOME/.zypper.conf (user-specific) -## -## You can edit this file by hand (try to keep the structure) or by using -## 'zypper conf' command (TODO). If you need user-specific configuration -## and you do not have ~/.zypper.conf yet, use /etc/zypp/zypper.conf -## as template (copy it to ~/.zypper.conf) and adjust to your liking. -## -## The options known also to libzypp will be overriden by zypper.conf, if set. -## -## Boolean values are: -## 0 1 yes no on off true false -## Color values are: -## white grey darkgrey black red green blue yellow brown cyan purple -## lightred lightgreen lightblue lightcyan lightpurple - -[main] - -## Show repository alias instead of name. -## -## Alias is an alternative unique name of repository. Some users prefer -## to define short, handy aliases for their repositories and use them -## when specifying repositories instead of number, name, or URI. -## These users might want to set this option to 'true'. -## -## Other users prefer to keep the aliases and names set by installation, -## registration, YaST, or other software managers, or .repo files (most -## software managers even hide the alias from user's view). -## These users might want to see the descriptive names, thus leave this -## option set to 'false'. -## -## Setting this option to 'true' will tell zypper to show repository -## alias instead of the long name wherever it needs to tell the name of -## the repository. -## -## Valid values: true, false -## Default value: false -## -# showAlias = false - -[solver] - -## Do not install soft dependencies (recommended packages) -## -## Valid values: boolean -## Default value: yes -## -# installRecommends = yes - -## Commands in which to force resolution. -## -## Comma-separated list of commands in which the resolution should be forced -## when solving package dependencies. This means the solver -## will automatically opt to remove problematic packages instead -## of asking the user how to resolve the dependency problem. -## -## This is particularly useful in the 'remove' command, since one -## typically wants to remove the requested package and all the packages -## which depend on it, without being asked. But one may find it convenient -## to force the resolution also in the 'install' command, or perhaps even -## others. -## -## This setting can be overridden ad-hoc by the --force-resolution and -## --no-force-resolution command line options. -## -## Valid values: remove, install, update, patch, verify -## Default value: remove -# forceResolutionCommands = remove - - -[color] - -## Whether to use colors -## -## Valid values: always, never, or autodetect -## Default value: never -## -# useColors = never - -## Do you use dark or light terminal background? -## -## Valid values: dark light -## Default value: dark -## -# background = dark - -## Color for displaying results of operations. -## This includes installation summary, tables, and result messages. -## -## Valid values: color -## Default value: white -## -# result = white - -## Color for displaying status and progress messages. -## -## Valid values: color -## Default value: grey -## -# msgStatus = grey - -## Color for displaying error messages. -## -## Valid values: color -## Default value: red -## -# msgError = red - -## Color for displaying warnings. -## -## Valid values: color -## Default value: yellow -## -# msgWarning = yellow - -## Color for highlighting positive information. -## For example, 'done' result of progress indicator. -## (not used yet) -## -## Default value: green -## -# positive = green - -## Color for highlighting negative information. -## For example, 'error' result of progress indicator. -## (not used yet) -## -## Valid values: color -## Default value: red -## -# negative = red - -## Color for highlighting information for easier reading. -## Unlike positive/negative color, this is intended for neutral information, -## like highlighting table column by which the rows are sorted. -## -## Valid values: color -## Default value: lightcyan -## -# highlight = lightcyan - -## Color for user dialog options. -## -## Valid values: color -## Default value: grey -## -# promptOption = grey - -[obs] - -## openSUSE Build Service repository base URL. -## This is used to construct real URL from obs://project/platform URI -## -# baseUrl = http://download.opensuse.org/repositories/ - -## openSUSE Build Service repository target platform. -## This will be used if none is given in the obs://obsrepo/platform URI -## when adding new repository with 'addrepo' command. -## -# platform = openSUSE_11.3 |