From 8c5e54b1afbf4f980543e3eccff3495d2fb84419 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 18 Oct 1999 19:10:03 +0000 Subject: Working on being able to cut RPMs. It now appears that the process is working mostly for sparc at least. There is one major problem -- the current process generates a unique source file per RPM when in fact all of the source files are nearly the same -- it is only the spec part of the rpm which differs. The new file mkbinutils_subpackage_version is an attempt to address this. It does part of the job right -- one source file produces multiple binary RPMs. BUT the end user can not produce the resulting RPMS themselves from SRPMS unless they also build all targets. --- scripts/README | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 154 insertions(+), 10 deletions(-) (limited to 'scripts/README') diff --git a/scripts/README b/scripts/README index d202f0fffc..8f6932148b 100644 --- a/scripts/README +++ b/scripts/README @@ -16,20 +16,164 @@ bsp from an rpm-spec template (rtems.spec.in). A second shell script (mkrpms) is a convienience script which invokes a sequence of building rpms for several bsps. + +mkbinutilspec +------------- + +mkbinutilspec takes two arguments: + +$1 ... the target_alias for binutils RPMs of this toolset + +Invoking mkbinutilspec will generate a -binutils.spec either in + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkbinutilspec sparc-rtems generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-binutils.spec +On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-binutils.spec + +mkgccnewlibspec +--------------- + +mkgccnewlibspec takes two arguments: + +$1 ... the target_alias for the gcc/newlib RPMs of this toolset + +Invoking mkgccnewlibspec will generate a -gccnewlibs.spec +either in: + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkgccnewlibspec sparc-rtems generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec +On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-gcc_newlib.spec + +mkgdbspec +--------- + +mkgdbspec takes two arguments: + +$1 ... the target_alias for the gdb RPMs of this toolset + +Invoking mkgdbspec will generate a -gdb.spec +either in: + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkgdbspec sparc-rtems generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec +On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-gcc_newlib.spec + + +# XXX BSPs not tested yet by Joel +# +# mkbspspec +# --------- +# +# mkbspspec takes two arguments: +# $1 ... the target_alias this bsp belongs to +# $2 ... the bsp to be built +# +# Invoking mkbspspec will generate a rtems--.spec either in +# /usr/src/packages/SPECS (SuSE convention) or +# /usr/src/redhat/SPECS (Redhat convention) or +# /usr/src/SPECS +# +# Eg. ./mkspec gensh1 sh-rtemself generates +# /usr/src/packages/SPECS/rtems-sh-rtemself-gensh1.spec on SuSE-6.2. + mkspec ------- +--------- + +mkspec takes two arguments: + +$1 ... the target_alias for the RPMs composing this toolset +$2 ... the bsp to be built + +Invoking mkspec will generate a set of spec files either in: + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkspec sparc-rtems erc32 generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-binutils.spec + /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec + /usr/src/packages/SPECS/sparc-rtems-gdb.spec +On RedHat 6.0: /usr/src/packages/SPECS/sparc-rtems-binutils.spec + /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec + /usr/src/packages/SPECS/sparc-rtems-gdb.spec + -mkspec takes two arguments: -$1 ... the bsp to be built -$2 ... the target_alias this bsp belongs to +Building binutils-rpms +---------------------- -Invoking mkspecs will generate a rtems--.spec either in -/usr/src/packages/SPECS (SuSE convention) or -/usr/src/redhat/SPECS (Redhat convention) or -/usr/src/SPECS +0. Login as root. + +1. Install a tarball of the various tool sources (with the +version number attached!) to /usr/src/[packages|redhat]/SOURCES + + cd /usr/src/[packages|redhat]/SOURCES + cp .../binutils- . + cp .../binutils--rtems-.diff . + +2. Generate and install the required rpm-spec file[s] + +cd rtems-/scripts/ +mkbinutilspec + +where target_alias is of the form sparc-rtems or sh-rtems-elf. + +3. Build the rpms + +Building a binary rpm: + +rpm -bb /usr/src/[packages|redhat]/SPECS/rtems--binutils.spec + +Building a source and binary rpm +rpm -ba /usr/src/[packages|redhat]/SPECS/rtems--binutils.spec + +XXX Note: a BSP's src.rpm contains its spec-file and the tar-archive of the +sources (approx. 4-5MB per BSP). + +Building TOOL-rpms +------------------ -Eg. ./mkspec gensh1 sh-rtemself generates -/usr/src/packages/SPECS/rtems-sh-rtemself-gensh1.spec on SuSE-6.2. +0. Login as root. + +1. Install a tarball of the various tool sources (with the +version number attached!) to /usr/src/[packages|redhat]/SOURCES + + cd /usr/src/[packages|redhat]/SOURCES + cp .../binutils- . + cp .../gcc- . + cp .../newlib- . + +2. Generate and install the required rpm-spec file[s] + +cd rtems-/scripts/ +mktoolspec + +3. Build the rpms + +Building a binary rpm: +rpm -bb /usr/src/[packages|redhat]/SPECS/rtems-.spec + +Building a source and binary rpm +rpm -ba /usr/src/[packages|redhat]/SPECS/rtems-.spec + +XXX Note: a BSP's src.rpm contains its spec-file and the tar-archive of the +sources (approx. 4-5MB per BSP). Building BSP-rpms ----------------- -- cgit v1.2.3