diff --git a/rewrite/scratch/buildinstall b/rewrite/scratch/buildinstall deleted file mode 100755 index a4885f05..00000000 --- a/rewrite/scratch/buildinstall +++ /dev/null @@ -1,3 +0,0 @@ -# FIXME: need to update mk-images to take the yumconf -echo "Making images..." -$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf diff --git a/rewrite/scratch/buildinstall.functions b/rewrite/scratch/buildinstall.functions deleted file mode 100755 index e0910c71..00000000 --- a/rewrite/scratch/buildinstall.functions +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -# pulled right out of mkinitrd.... -DSO_DEPS="" -LDSO="" -get_dso_deps() { - root="$1" ; shift - bin="$1" ; shift - DSO_DEPS="" - - declare -a FILES - declare -a NAMES - - # this is a hack, but the only better way requires binutils or elfutils - # be installed. i.e., we need readelf to find the interpretter. - if [ -z "$LDSO" ]; then - for ldso in $root/$LIBDIR/ld*.so* ; do - [ -L $ldso ] && continue - [ -x $ldso ] || continue - $ldso --verify $bin >/dev/null 2>&1 || continue - LDSO=$(echo $ldso |sed -e "s,$root,,") - done - fi - - # I still hate shell. - declare -i n=0 - while read NAME I0 FILE ADDR I1 ; do - [ "$FILE" == "not" ] && FILE="$FILE $ADDR" - NAMES[$n]="$NAME" - FILES[$n]="$FILE" - let n++ - done << EOF - $(/usr/sbin/chroot $root env LD_TRACE_PRELINKING=1 LD_WARN= \ - LD_TRACE_LOADED_OBJECTS=1 $LDSO $bin) -EOF - - [ ${#FILES[*]} -eq 0 ] && return 1 - - # we don't want the name of the binary in the list - if [ "${FILES[0]}" == "$bin" ]; then - FILES[0]="" - NAMES[0]="" - [ ${#FILES[*]} -eq 1 ] && return 1 - fi - - declare -i n=0 - while [ $n -lt ${#FILES[*]} ]; do - FILE="${FILES[$n]}" - if [ "$FILE" == "not found" ]; then - cat 1>&2 <. -# - -perl -e 'while (<>) { if (/\\\n/) { chop; s/\\$//; print;} else { print $_; } }' | grep ':.*ko' | sed -e ' -s/\.ko//g -s,/[^: ]*/,,g -s/[ ][ ]*/ /g' - diff --git a/rewrite/scratch/geninitrdsz.c b/rewrite/scratch/geninitrdsz.c deleted file mode 100644 index 6dfd9761..00000000 --- a/rewrite/scratch/geninitrdsz.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * geninitrdsz.c - * Generate initrd.size file for zSeries platforms. - * Takes an integer argument and writes out the binary representation of - * that value to the initrd.size file. - * https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197773 - * - * Copyright (C) 2007 Red Hat, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc,char **argv) { - unsigned int zero = 0; - int fd; - unsigned int size; - mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH; - - if (argc != 3) { - printf("Usage: %s [integer size] [output file]\n", basename(argv[0])); - printf("Example: %s 12288475 initrd.size\n", basename(argv[0])); - return 0; - } - - size = htonl(atoi(argv[1])); - fd = open(argv[2], O_CREAT | O_RDWR, mode); - - if (write(fd, &zero, sizeof(int)) == -1) { - perror("writing initrd.size (zero)"); - return errno; - } - - if (write(fd, &size, sizeof(int)) == -1) { - perror("writing initrd.size (size)"); - return errno; - } - - close(fd); - return 0; -} diff --git a/rewrite/scratch/genmodinfo b/rewrite/scratch/genmodinfo deleted file mode 100755 index 44c8247d..00000000 --- a/rewrite/scratch/genmodinfo +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/python -# -# genmodinfo -# -# Copyright (C) 2007 Red Hat, Inc. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import commands -import os -import string -import sys - -uname = os.uname()[2] - -if len(sys.argv) > 1: - path = sys.argv[1] -else: - path = '/lib/modules/%s' % (uname,) - -mods = {} -for root, dirs, files in os.walk(path): - for file in files: - mods[file] = os.path.join(root,file) - -modules = { 'scsi_hostadapter' : [ 'block' ], 'eth' : [ 'networking'] } -blacklist = ("floppy", "scsi_mod", "libiscsi") - -list = {} - -for modtype in modules.keys(): - list[modtype] = {} - for file in modules[modtype]: - try: - f = open('%s/modules.%s' % (path,file),'r') - except: - continue - lines = f.readlines() - f.close() - for line in lines: - line = line.strip() - if mods.has_key(line): - desc = commands.getoutput("modinfo -F description %s" % (mods[line])).split("\n")[0] - desc = desc.strip() - modname = line[:-3] - if modname in blacklist: - continue - if desc and len(desc) > 65: - desc = desc[:65] - if not desc: - desc = "%s driver" % (modname,) - modinfo = """ -%s - %s - "%s" -""" % (modname, modtype, desc) - list[modtype][modname] = modinfo - -print "Version 0" -for type in list.keys(): - modlist = list[type].keys() - modlist.sort() - for m in modlist: - print list[type][m] diff --git a/rewrite/scratch/mk-images b/rewrite/scratch/mk-images index 0e72b364..76464378 100755 --- a/rewrite/scratch/mk-images +++ b/rewrite/scratch/mk-images @@ -18,154 +18,6 @@ # along with this program. If not, see . # -LANG=C - -PATH=$PATH:/sbin:/usr/sbin -IMAGEUUID=$(date +%Y%m%d%H%M).$(uname -i) -TMPDIR=${TMPDIR:-/tmp} - -usage () { - echo "usage: mk-images