]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Kudzu, ReiserFS, uClibc, gettext und Arbeit am Installer
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 20 Nov 2006 19:56:08 +0000 (19:56 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 20 Nov 2006 19:56:08 +0000 (19:56 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@346 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

44 files changed:
config/kernel/kernel.config.i586
config/kernel/kernel.config.i586.smp
config/kernel/syslinux.cfg
config/rootfiles/common/reiserfsprogs [new file with mode: 0644]
config/rootfiles/common/stage2
config/uClibc/buildroot.config-i586
config/uClibc/busybox.config
config/uClibc/uClibc.config-i586
doc/packages-list.txt
langs/de/install/lang_de.c
langs/en/install/lang_en.c
lfs/boot.img
lfs/busybox
lfs/gettext
lfs/hwinfo
lfs/initrd
lfs/installer
lfs/kudzu
lfs/pciutils
lfs/popt
lfs/reiserfsprogs [new file with mode: 0644]
lfs/rsync
lfs/uClibc
lfs/util-linux
make.sh
src/install+setup/install/Makefile
src/install+setup/install/cdrom.c
src/install+setup/install/config.c
src/install+setup/install/main.c
src/install+setup/install/mountsource.sh [new file with mode: 0644]
src/install+setup/install/probehw.sh [new file with mode: 0644]
src/install+setup/install/probescsi.sh [deleted file]
src/install+setup/install/upgrade-v12-v13.c [deleted file]
src/install+setup/install/upgrade-v130-v140.c [deleted file]
src/patches/kudzu-link-lintl.diff [new file with mode: 0644]
src/patches/kudzu-nodiet.patch [new file with mode: 0644]
src/patches/pciutils-2.1.10-scan.patch [new file with mode: 0644]
src/patches/pciutils-2.1.99-gcc4.patch [new file with mode: 0644]
src/patches/pciutils-2.2.1-idpath.patch [new file with mode: 0644]
src/patches/pciutils-2.2.3-multilib.patch [new file with mode: 0644]
src/patches/pciutils-2.2.3-sata.patch [new file with mode: 0644]
src/patches/pciutils-devicetype.patch [new file with mode: 0644]
src/patches/pciutils-havepread.patch [new file with mode: 0644]
src/patches/pciutils-strip.patch [new file with mode: 0644]

index d2de46f496c50a477c7cda5817016c26c49a83ca..664bb02230329d8e62b51616100fcc4dfc544d95 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.16
-# Fri Nov  3 04:37:54 2006
+# Tue Nov 14 22:30:30 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
@@ -585,20 +585,20 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # ATA/ATAPI/MFM/RLL support
 #
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
 # CONFIG_BLK_DEV_IDE_SATA is not set
 # CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=m
+CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
 CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDEFLOPPY=y
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 
@@ -748,6 +748,7 @@ CONFIG_SCSI_SATA_SIS=m
 CONFIG_SCSI_SATA_ULI=m
 CONFIG_SCSI_SATA_VIA=m
 CONFIG_SCSI_SATA_VITESSE=m
+CONFIG_SCSI_SATA_INTEL_COMBINED=y
 CONFIG_SCSI_BUSLOGIC=m
 # CONFIG_SCSI_OMIT_FLASHPOINT is not set
 CONFIG_SCSI_DMX3191D=m
index b5b94c7cd1793abbc5c08116c3c52a3231662d0d..7a5878e7062beeb76733f7537786101697580d14 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.16
-# Thu Oct 12 18:35:42 2006
+# Tue Nov 14 22:39:06 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
@@ -614,20 +614,20 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # ATA/ATAPI/MFM/RLL support
 #
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
 # CONFIG_BLK_DEV_IDE_SATA is not set
 # CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=m
+CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
 CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
+CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDEFLOPPY=y
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 
@@ -777,6 +777,7 @@ CONFIG_SCSI_SATA_SIS=m
 CONFIG_SCSI_SATA_ULI=m
 CONFIG_SCSI_SATA_VIA=m
 CONFIG_SCSI_SATA_VITESSE=m
+CONFIG_SCSI_SATA_INTEL_COMBINED=y
 CONFIG_SCSI_BUSLOGIC=m
 # CONFIG_SCSI_OMIT_FLASHPOINT is not set
 CONFIG_SCSI_DMX3191D=m
@@ -1522,10 +1523,6 @@ CONFIG_VGA_CONSOLE=y
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
 
-#
-# Bootsplash configuration
-#
-
 #
 # Sound
 #
@@ -1729,7 +1726,7 @@ CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=m
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
index db57c6f7f1914d1585b92785c36854979bc4ee09..37c0dbb29aa7f44115112eda9fd16aab56a52b56 100644 (file)
@@ -2,16 +2,16 @@ TIMEOUT 5000
 DISPLAY message
 PROMPT 1
 DEFAULT vmlinuz 
-APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=11264 rw
+APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=16384 rw
 LABEL nopcmcia 
   KERNEL vmlinuz
-  APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=11264 rw nopcmcia
+  APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=16384 rw nopcmcia
 LABEL nousb
   KERNEL vmlinuz
-  APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=11264 rw nousb
+  APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=16384 rw nousb
 LABEL nousborpcmcia
   KERNEL vmlinuz
-  APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=11264 rw nousb nopcmcia
+  APPEND ide=nodma initrd=instroot.gz root=/dev/ram0 ramdisk_size=16384 rw nousb nopcmcia
 LABEL dma
   KERNEL vmlinuz
-  APPEND initrd=instroot.gz root=/dev/ram0 ramdisk_size=11264 rw
+  APPEND initrd=instroot.gz root=/dev/ram0 ramdisk_size=16384 rw
diff --git a/config/rootfiles/common/reiserfsprogs b/config/rootfiles/common/reiserfsprogs
new file mode 100644 (file)
index 0000000..726acf2
--- /dev/null
@@ -0,0 +1,12 @@
+sbin/debugreiserfs
+sbin/fsck.reiserfs
+sbin/mkfs.reiserfs
+sbin/mkreiserfs
+sbin/reiserfsck
+sbin/reiserfstune
+sbin/resize_reiserfs
+#usr/man/man8/debugreiserfs.8
+#usr/man/man8/mkreiserfs.8
+#usr/man/man8/reiserfsck.8
+#usr/man/man8/reiserfstune.8
+#usr/man/man8/resize_reiserfs.8
index 6560425ce04ed12dcb601f5cf0ec5ee634b01026..934e000bedab734bd8d338facbb58a3d4f839c91 100644 (file)
@@ -32,10 +32,10 @@ home/nobody
 media/cdrom
 media/floppy
 mnt
-opt
+#opt
 root
 sbin
-srv
+#srv
 #usr/bin/perl
 #usr/include
 #usr/lib
index 2e351be95daead8b32c3c66eb09144bd12ac22a3..78c095c1969a9f42a3924f9bf9e21c377d1dc39a 100644 (file)
@@ -107,7 +107,8 @@ BR2_GCC_VERSION_4_0_3=y
 BR2_GCC_VERSION="4.0.3"
 # BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
 BR2_EXTRA_GCC_CONFIG_OPTIONS=""
-# BR2_INSTALL_LIBSTDCPP is not set
+BR2_INSTALL_LIBSTDCPP=y
+# BR2_INSTALL_LIBGCJ is not set
 # BR2_INSTALL_OBJC is not set
 BR2_GCC_SHARED_LIBGCC=y
 
index 77448a5c701d4797346dd386977e35f429be45fc..1025da9ba63f9772516a8902c5ac828d642b095a 100644 (file)
@@ -57,7 +57,7 @@ CONFIG_INSTALL_NO_USR=y
 CONFIG_INSTALL_APPLET_SYMLINKS=y
 # CONFIG_INSTALL_APPLET_HARDLINKS is not set
 # CONFIG_INSTALL_APPLET_DONT is not set
-PREFIX="./_install"
+PREFIX="/install/initrd"
 
 #
 # Busybox Library Tuning
@@ -73,13 +73,13 @@ CONFIG_MD5_SIZE_VS_SPEED=3
 #
 # CONFIG_AR is not set
 # CONFIG_FEATURE_AR_LONG_FILENAMES is not set
-CONFIG_BUNZIP2=y
-CONFIG_CPIO=y
+# CONFIG_BUNZIP2 is not set
+# CONFIG_CPIO is not set
 # CONFIG_DPKG is not set
 # CONFIG_DPKG_DEB is not set
 # CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
-CONFIG_GUNZIP=y
-CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y
+# CONFIG_GUNZIP is not set
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
 CONFIG_GZIP=y
 # CONFIG_RPM2CPIO is not set
 # CONFIG_RPM is not set
@@ -114,14 +114,14 @@ CONFIG_BASENAME=y
 CONFIG_CAT=y
 # CONFIG_CATV is not set
 # CONFIG_CHGRP is not set
-# CONFIG_CHMOD is not set
+CONFIG_CHMOD=y
 # CONFIG_CHOWN is not set
 CONFIG_CHROOT=y
 # CONFIG_CKSUM is not set
 # CONFIG_CMP is not set
 # CONFIG_COMM is not set
 CONFIG_CP=y
-# CONFIG_CUT is not set
+CONFIG_CUT=y
 CONFIG_DATE=y
 CONFIG_FEATURE_DATE_ISOFMT=y
 CONFIG_DD=y
@@ -163,14 +163,14 @@ CONFIG_FEATURE_LS_TIMESTAMPS=y
 CONFIG_FEATURE_LS_USERNAME=y
 CONFIG_FEATURE_LS_COLOR=y
 # CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
-# CONFIG_MD5SUM is not set
+CONFIG_MD5SUM=y
 CONFIG_MKDIR=y
 # CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
-# CONFIG_MKFIFO is not set
+CONFIG_MKFIFO=y
 CONFIG_MKNOD=y
 # CONFIG_MV is not set
 # CONFIG_FEATURE_MV_LONG_OPTIONS is not set
-# CONFIG_NICE is not set
+CONFIG_NICE=y
 # CONFIG_NOHUP is not set
 # CONFIG_OD is not set
 # CONFIG_PRINTENV is not set
@@ -183,27 +183,27 @@ CONFIG_MKNOD=y
 # CONFIG_SHA1SUM is not set
 CONFIG_SLEEP=y
 # CONFIG_FEATURE_FANCY_SLEEP is not set
-# CONFIG_SORT is not set
-# CONFIG_FEATURE_SORT_BIG is not set
+CONFIG_SORT=y
+CONFIG_FEATURE_SORT_BIG=y
 # CONFIG_STAT is not set
 # CONFIG_FEATURE_STAT_FORMAT is not set
 # CONFIG_STTY is not set
 # CONFIG_SUM is not set
 CONFIG_SYNC=y
-# CONFIG_TAIL is not set
-# CONFIG_FEATURE_FANCY_TAIL is not set
-# CONFIG_TEE is not set
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
 # CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
 CONFIG_TEST=y
 # CONFIG_FEATURE_TEST_64 is not set
-# CONFIG_TOUCH is not set
+CONFIG_TOUCH=y
 # CONFIG_TR is not set
 # CONFIG_FEATURE_TR_CLASSES is not set
 # CONFIG_FEATURE_TR_EQUIV is not set
 # CONFIG_TRUE is not set
 # CONFIG_TTY is not set
 CONFIG_UNAME=y
-# CONFIG_UNIQ is not set
+CONFIG_UNIQ=y
 # CONFIG_USLEEP is not set
 # CONFIG_UUDECODE is not set
 # CONFIG_UUENCODE is not set
@@ -227,6 +227,10 @@ CONFIG_FEATURE_AUTOWIDTH=y
 # Common options for df, du, ls
 #
 CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
 # CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set
 
 #
@@ -293,9 +297,9 @@ CONFIG_SED=y
 # CONFIG_FEATURE_FIND_INUM is not set
 # CONFIG_FEATURE_FIND_EXEC is not set
 CONFIG_GREP=y
-# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
-# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
-# CONFIG_FEATURE_GREP_CONTEXT is not set
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
 CONFIG_XARGS=y
 # CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
 # CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
@@ -357,8 +361,8 @@ CONFIG_INSMOD=y
 # CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
 # CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
 CONFIG_RMMOD=y
-# CONFIG_LSMOD is not set
-# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+CONFIG_LSMOD=y
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
 CONFIG_MODPROBE=y
 CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
 
@@ -408,8 +412,8 @@ CONFIG_MKFS_MINIX=y
 # CONFIG_FEATURE_MDEV_EXEC is not set
 CONFIG_MKSWAP=y
 # CONFIG_FEATURE_MKSWAP_V0 is not set
-# CONFIG_MORE is not set
-# CONFIG_FEATURE_USE_TERMIOS is not set
+CONFIG_MORE=y
+CONFIG_FEATURE_USE_TERMIOS=y
 CONFIG_MOUNT=y
 # CONFIG_FEATURE_MOUNT_NFS is not set
 CONFIG_PIVOT_ROOT=y
@@ -444,9 +448,9 @@ CONFIG_FEATURE_MOUNT_LOOP=y
 # CONFIG_FEATURE_DEVFS is not set
 # CONFIG_EJECT is not set
 # CONFIG_LAST is not set
-# CONFIG_LESS is not set
-# CONFIG_FEATURE_LESS_BRACKETS is not set
-# CONFIG_FEATURE_LESS_FLAGS is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
 # CONFIG_FEATURE_LESS_FLAGCS is not set
 # CONFIG_FEATURE_LESS_MARKS is not set
 # CONFIG_FEATURE_LESS_REGEXP is not set
@@ -570,7 +574,7 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y
 #
 # Process Utilities
 #
-# CONFIG_FREE is not set
+CONFIG_FREE=y
 # CONFIG_FUSER is not set
 CONFIG_KILL=y
 CONFIG_KILLALL=y
@@ -578,11 +582,11 @@ CONFIG_KILLALL=y
 # CONFIG_FEATURE_PIDOF_SINGLE is not set
 # CONFIG_FEATURE_PIDOF_OMIT is not set
 CONFIG_PS=y
-# CONFIG_FEATURE_PS_WIDE is not set
-# CONFIG_RENICE is not set
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_RENICE=y
 # CONFIG_BB_SYSCTL is not set
-# CONFIG_TOP is not set
-# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
 # CONFIG_UPTIME is not set
 
 #
index 0e990d16390283010414847a780fbf8025c90794..fdf48bc1d72d8afc2f10431d6bb9f616a7403b63 100644 (file)
@@ -51,7 +51,7 @@ ARCH_LITTLE_ENDIAN=y
 ARCH_HAS_MMU=y
 UCLIBC_HAS_FLOATS=y
 HAS_FPU=y
-# DO_C99_MATH is not set
+DO_C99_MATH=y
 KERNEL_SOURCE="/usr/src/buildroot/toolchain_build_i586/linux"
 C_SYMBOL_PREFIX=""
 HAVE_DOT_CONFIG=y
@@ -65,17 +65,17 @@ DOPIC=y
 HAVE_SHARED=y
 # ARCH_HAS_NO_LDSO is not set
 BUILD_UCLIBC_LDSO=y
-# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
+FORCE_SHAREABLE_TEXT_SEGMENTS=y
 LDSO_LDD_SUPPORT=y
-# LDSO_CACHE_SUPPORT is not set
+LDSO_CACHE_SUPPORT=y
 # LDSO_PRELOAD_FILE_SUPPORT is not set
 LDSO_BASE_FILENAME="ld.so"
-# LDSO_RUNPATH is not set
+LDSO_RUNPATH=y
 # DL_FINI_CRT_COMPAT is not set
 UCLIBC_CTOR_DTOR=y
 # HAS_NO_THREADS is not set
-# UCLIBC_HAS_THREADS is not set
-PTHREADS_DEBUG_SUPPORT=y
+UCLIBC_HAS_THREADS=y
+# PTHREADS_DEBUG_SUPPORT is not set
 UCLIBC_HAS_LFS=y
 # UCLIBC_STATIC_LDCONFIG is not set
 # MALLOC is not set
@@ -84,7 +84,7 @@ MALLOC_STANDARD=y
 MALLOC_GLIBC_COMPAT=y
 UCLIBC_DYNAMIC_ATEXIT=y
 HAS_SHADOW=y
-# UNIX98PTY_ONLY is not set
+UNIX98PTY_ONLY=y
 ASSUME_DEVPTS=y
 UCLIBC_HAS_TM_EXTENSIONS=y
 UCLIBC_HAS_TZ_CACHING=y
@@ -105,15 +105,19 @@ UCLIBC_HAS_STRING_GENERIC_OPT=y
 UCLIBC_HAS_STRING_ARCH_OPT=y
 UCLIBC_HAS_CTYPE_TABLES=y
 UCLIBC_HAS_CTYPE_SIGNED=y
-# UCLIBC_HAS_CTYPE_UNSAFE is not set
-UCLIBC_HAS_CTYPE_CHECKED=y
+UCLIBC_HAS_CTYPE_UNSAFE=y
+# UCLIBC_HAS_CTYPE_CHECKED is not set
 # UCLIBC_HAS_CTYPE_ENFORCED is not set
 UCLIBC_HAS_WCHAR=y
-# UCLIBC_HAS_LOCALE is not set
-UCLIBC_HAS_HEXADECIMAL_FLOATS=y
+UCLIBC_HAS_LOCALE=y
+UCLIBC_PREGENERATED_LOCALE_DATA=y
+# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set
+# UCLIBC_HAS_XLOCALE is not set
+# UCLIBC_HAS_HEXADECIMAL_FLOATS is not set
+# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set
 UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
 UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
-UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
+# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
 # UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
 # UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
 # UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
@@ -129,13 +133,13 @@ UCLIBC_HAS_STDIO_GETC_MACRO=y
 UCLIBC_HAS_STDIO_PUTC_MACRO=y
 UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
 # UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
-UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
-UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
-UCLIBC_HAS_PRINTF_M_SPEC=y
+# UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE is not set
+# UCLIBC_HAS_GLIBC_CUSTOM_STREAMS is not set
+# UCLIBC_HAS_PRINTF_M_SPEC is not set
 UCLIBC_HAS_ERRNO_MESSAGES=y
 # UCLIBC_HAS_SYS_ERRLIST is not set
 UCLIBC_HAS_SIGNUM_MESSAGES=y
-# UCLIBC_HAS_SYS_SIGLIST is not set
+UCLIBC_HAS_SYS_SIGLIST=y
 UCLIBC_HAS_GNU_GETOPT=y
 
 #
@@ -143,7 +147,7 @@ UCLIBC_HAS_GNU_GETOPT=y
 #
 UCLIBC_HAS_REGEX=y
 # UCLIBC_HAS_WORDEXP is not set
-# UCLIBC_HAS_FTW is not set
+UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GLOB=y
 
 #
index 17f9f12d0a539984c4e86e97a55e52301f1d3fcf..d73656b80ff16ada2a2205b1c34b47238d74b0d3 100644 (file)
@@ -46,7 +46,6 @@
 * ccache-2.4
 * cdrtools-2.01
 * cftp-0.12
-* clamav-0.88.5
 * clamav-0.88.6
 * coreutils-5.96
 * cups-1.2.2
@@ -92,6 +91,7 @@
 * hdparm-6.6
 * htop-0.6.2
 * httpd-2.2.2
+* hwinfo
 * iana-etc-2.10
 * ibod
 * iftop-0.17
 * java-1.5.0_06-for-ipfire
 * jpegsrc.v6b
 * kbd-1.12
+* kudzu-1.1.95.15
+* kudzu-1.2.60
 * l7-protocols-2006-09-10
 * lame-3.96.1
 * lcms-1.15
 * openssh-4.3p2
 * openssl-0.9.8d
 * openswan-2.4.6
-* openvpn-2.0.7
 * openvpn-2.0.9
 * pam_mysql-0.7RC1
 * patch-2.5.4
 * psmisc-22.2
 * razor-agents-2.81
 * readline-5.1
+* reiserfsprogs-3.6.19
 * rp-pppoe-3.8
 * rrdtool-1.2.15
 * rsync-2.6.8
index 6e0153600b2cf1e0936ff7abec340b9f96c5eed2..2508f0f92e5954f66c25ad22b72117bcace18593 100644 (file)
@@ -323,8 +323,8 @@ char *de_tr[] = {
 "Automatische Erkennung",
 /* TR_PROBE_FAILED */
 "Automatische Erkennung fehlgeschlagen.",
-/* TR_PROBING_SCSI */
-"Suche SCSI-Geräte...",
+/* TR_PROBING_HARDWARE */
+"Hardwareerkennung läuft...",
 /* TR_PROBLEM_SETTING_ADMIN_PASSWORD */
 "Problem beim Setzen des %s Administrator-Passworts.",
 /* TR_PROBLEM_SETTING_ROOT_PASSWORD */
index 107a130483d53479cd81b98907da343dbadfd293..9070b014b5ef4034437bd887501c842644206f8c 100644 (file)
@@ -319,8 +319,8 @@ char *en_tr[] = {
 "Probe",
 /* TR_PROBE_FAILED */
 "Auto detecting failed.",
-/* TR_PROBING_SCSI */
-"Probing SCSI devices...",
+/* TR_PROBING_HARDWARE */
+"Probing hardware...",
 /* TR_PROBLEM_SETTING_ADMIN_PASSWORD */
 "Problem setting %s 'admin' user password.",
 /* TR_PROBLEM_SETTING_ROOT_PASSWORD */
index 2577a3395a9da3aedbca1da70c46a83593baecd1..0ddeb8721b842cd4cf6c90c37f5472d96d5b5d20 100644 (file)
@@ -48,7 +48,7 @@ md5 :
 ###############################################################################
 
 $(TARGET) :
-       if [ "$(MACHINE)" = "i386" ]; then \
+       if [ "$(MACHINE)" = "i586" ]; then \
                dd if=/dev/zero of=/install/images/boot-$(VERSION).img bs=1024 count=1440; \
                mkdosfs -f 1 -r 16 /install/images/boot-$(VERSION).img; \
                syslinux -s /install/images/boot-$(VERSION).img; \
@@ -69,4 +69,3 @@ $(TARGET) :
                umount /install/mnt; \
                losetup -d $$LOOPDEV; \
        fi
-
index 6a6ed0833001038e51f5fd79f6144ff0a52f807a..17ab57706b662d39afafdc6a6bb95bd1943cdfd4 100644 (file)
@@ -72,20 +72,12 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       -mkdir -p /install/initrd/bin
        cd $(DIR_APP) && cp -f $(DIR_SRC)/config/uClibc/busybox.config .config
        cd $(DIR_APP) && make
-       -mkdir -p /install/initrd/bin
-       cd $(DIR_APP) && install -m 0755 busybox /install/initrd/bin
+       cd $(DIR_APP) && make install
        mkdir -p /install/initrd/usr/share/udhcpc
        cd $(DIR_APP) && install -m 0755 examples/udhcp/simple.script \
                /install/initrd/usr/share/udhcpc/default.script
-       cd /install/initrd/bin && for i in [ ash basename cat chroot cp \
-               date dd df dmesg echo gzip gunzip halt hwclock insmod ifconfig \
-               init ls ln mkdir mkswap modprobe mount reboot rmmod lsmod \
-               e2label mke2fs mkfs.minix tftp \
-               sed sh sleep swapon swapoff syslogd tar umount wget env \
-               ping sync udhcpc grep xargs route test uname wc readlink; do \
-                       ln -sf busybox $$i; \
-               done
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 3330715ecd1fcdd382a7b958e32b059cddc86336..d48d609b0910b2b723b0f7bceebbe190510fdeb2 100644 (file)
@@ -36,10 +36,14 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 # Normal build or /tools build.
 #
 ifeq "$(ROOT)" ""
+ifeq "$(LFS_PASS)" "install"
+  TARGET = $(DIR_INFO)/$(THISAPP)-install
+else
   TARGET = $(DIR_INFO)/$(THISAPP)
   EXTRA_CONFIG = --prefix=/usr --disable-nls
-  EXTRA_MAKE =
+  EXTRA_MAKE = $(MAKETUNING)
   EXTRA_INSTALL =
+endif
 else
   TARGET = $(DIR_INFO)/$(THISAPP)-tools
   EXTRA_CONFIG = --prefix=/tools --disable-shared --disable-nls
@@ -86,9 +90,18 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
 ifeq "$(ROOT)" ""
+ifeq "$(LFS_PASS)" "install"
+       cd $(DIR_APP) && ./configure --prefix=/ --libdir=/lib \
+                               --with-included-gettext --disable-rpath \
+                               --enable-relocatable --disable-shared
+       cd $(DIR_APP)/gettext-runtime && make CFLAGS="-Os -fomit-frame-pointer" -C intl/
+       cd $(DIR_APP)/gettext-runtime && make CFLAGS="-Os -fomit-frame-pointer" \
+                               DESTDIR=/opt/$(MACHINE)-uClibc -C intl/ install
+else
        cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
        cd $(DIR_APP) && make $(EXTRA_MAKE)
        cd $(DIR_APP) && make $(EXTRA_INSTALL) install
+endif
 else
        cd $(DIR_APP)/gettext-tools && ./configure $(EXTRA_CONFIG)
        cd $(DIR_APP)/gettext-tools && make -C lib $(MAKETUNING)
index bda26aec74a8f5a0f3b2cc0581e5d7972a2060aa..d9e4500aa52f8389e87a12e56daf33e98fbd32ab 100644 (file)
@@ -53,6 +53,6 @@ $(TARGET) :
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && mkdir $(DIR_APP) && cp -R $(DIR_SRC)/src/hwinfo/* $(DIR_APP)
        cd $(DIR_APP) && make tinystatic
-       cd $(DIR_APP) && DESTDIR="/opt/$(MACHINE)-uClibc" make tinystaticinstall
+       cd $(DIR_APP) && DESTDIR="/install/initrd" make tinystaticinstall
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 3ef0bef885703ca9d16686ed0e715e2cc299c0c2..f3c7b784452303503db1e64765c53a3d2b6b7f2e 100644 (file)
@@ -122,7 +122,7 @@ $(TARGET) :
            losetup -d $$LOOPDEV
        gzip -9 /install/images/fdinitrd
 
-       RAMDISK_SIZE=11264 && \
+       RAMDISK_SIZE=16384 && \
            dd if=/dev/zero of=/install/images/cdinitrd bs=1k count=$${RAMDISK_SIZE}
        for i in `seq 0 7`; do \
            if (! losetup /dev/loop$${i} >/dev/null 2>&1 ); then \
index ba34c89ce240f47902b7a46cabd67cb11b99b19e..3e2b836b23b2b62a3edcbe0342e8f6c864990440 100644 (file)
@@ -61,6 +61,6 @@ $(TARGET) :
        cd $(DIR_APP)/install && make CFLAGS="-Os -fomit-frame-pointer -Wall \
            -DNAME='\"$(NAME)\"' -DSNAME='\"$(SNAME)\"' -DVERSION='\"$(VERSION)\"' \
             -DSLOGAN='\"$(SLOGAN)\"' -DCONFIG_ROOT='\"$(CONFIG_ROOT)\"' -DKERNEL_VERSION='\"$(KVER)\"'"
-       cd $(DIR_APP)/install && install -v -m 0755 install probescsi.sh installbootsplash.sh /install/initrd/bin
+       cd $(DIR_APP)/install && install -v -m 0755 install probehw.sh installbootsplash.sh mountsource.sh /install/initrd/bin
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 81f3d77a867913e37c4a9fd16f41e8760f0fa5f4..68ee3703cc5ad01c687298be4781abdd2733d367 100644 (file)
--- a/lfs/kudzu
+++ b/lfs/kudzu
 
 include Config
 
-VER        = 1.1.67
+VER        = 1.2.60
 
 THISAPP    = kudzu-$(VER)
-DL_FILE    = kudzu_$(VER).orig.tar.gz
+DL_FILE    = kudzu-$(VER).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 ifeq "$(LFS_PASS)" "install"
@@ -46,7 +46,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = bfd122f24d3a6a5b3e63a311d1be492d
+$(DL_FILE)_MD5 = 19db16f10b3a878f6584ab967991d792
 
 install : $(TARGET)
 
@@ -75,12 +75,16 @@ $(subst %,%_MD5,$(objects)) :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
 ifeq "$(LFS_PASS)" "install"
-       cd $(DIR_APP) && make CFLAGS="-Os -fomit-frame-pointer -Wall -D_GNU_SOURCE -I. -I/install/include" libkudzu.a
-       cd $(DIR_APP) && install -m 0644 libkudzu.a /install/lib
-       -mkdir -p /install/include/kudzu
-       cd $(DIR_APP) && install -m 0644 *.h /install/include/kudzu
+       cd $(DIR_APP) && patch -N < $(DIR_SRC)/src/patches/kudzu-link-lintl.diff
+       cd $(DIR_APP) && make RPM_OPT_FLAGS="-Os -fomit-frame-pointer -I/install/include" \
+               ARCH=$(MACHINE)
+       cd $(DIR_APP) && install -m 0755 kudzu /install/initrd/bin/kudzu
+       cd $(DIR_APP) && install -m 0644 libkudzu.a /install/initrd/lib
+       cd $(DIR_APP) && install -m 0644 libkudzu_loader.a /install/initrd/lib
+#      -mkdir -p /install/include/kudzu
+#      cd $(DIR_APP) && install -m 0644 *.h /install/include/kudzu
 else
        cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make
        cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make install
index 9946d732bb109d448317d9525d302a0a2fc74cf7..973a9defd729c770d6b4535b782a135fe6516c31 100644 (file)
@@ -76,15 +76,21 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
-
        cd $(DIR_APP) && sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh
-
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-strip.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-2.1.10-scan.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-havepread.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-devicetype.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-2.2.1-idpath.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-2.1.99-gcc4.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-2.2.3-multilib.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pciutils-2.2.3-sata.patch
 ifeq "$(LFS_PASS)" "install"
        cd $(DIR_APP)/lib && CFLAGS="-Os -fomit-frame-pointer" ./configure
        cd $(DIR_APP)/lib && CFLAGS="-Os -fomit-frame-pointer" make $(MAKETUNING)
        -mkdir -p /opt/$(MACHINE)-uClibc/include/pci
        cd $(DIR_APP) && install -m 0644 lib/libpci.a /opt/$(MACHINE)-uClibc/lib
-       cd $(DIR_APP) && install -m 0644 lib/{config,header,pci}.h /opt/$(MACHINE)-uClibc/include/pci
+       cd $(DIR_APP) && install -m 0644 lib/*.h /opt/$(MACHINE)-uClibc/include/pci
 else
        cd $(DIR_APP) && make PREFIX=/usr $(MAKETUNING)
        cd $(DIR_APP) && make PREFIX=/usr install
index 780f36f11bb43457a01ee934a9fb73755cb76260..0daa5081982a52ea75812131ca78f16ccee2b97b 100644 (file)
--- a/lfs/popt
+++ b/lfs/popt
@@ -32,7 +32,11 @@ THISAPP    = popt-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(THISAPP)
+ifeq "$(LFS_PASS)" "install"
+       TARGET = $(DIR_INFO)/$(THISAPP)-installer
+else
+       TARGET = $(DIR_INFO)/$(THISAPP)
+endif
 
 ###############################################################################
 # Top-level Rules
@@ -72,10 +76,16 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ifeq "$(LFS_PASS)" "install"
+       cd $(DIR_APP) && ./configure --prefix=/ --disable-nls
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make DESTDIR=/opt/$(MACHINE)-uClibc install
+else
        cd $(DIR_APP) && sed -i -e "/*origOptString ==/c 0)" popt.c
        cd $(DIR_APP) && autoreconf -f -i
        cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
+endif
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/lfs/reiserfsprogs b/lfs/reiserfsprogs
new file mode 100644 (file)
index 0000000..c201861
--- /dev/null
@@ -0,0 +1,91 @@
+###############################################################################
+# This file is part of the IPCop Firewall.                                    #
+#                                                                             #
+# IPCop 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.                                         #
+#                                                                             #
+# IPCop 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 IPCop; if not, write to the Free Software                        #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA    #
+#                                                                             #
+# Makefiles are based on LFSMake, which is                                    #
+# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 3.6.19
+
+THISAPP    = reiserfsprogs-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+ifeq "$(LFS_PASS)" "install"
+       TARGET = $(DIR_INFO)/$(THISAPP)-install
+else
+       TARGET = $(DIR_INFO)/$(THISAPP)
+endif
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = b42cf15f6651c3ceff5cb84996c0d539
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ifeq "$(LFS_PASS)" "install"
+       cd $(DIR_APP) && ./configure --prefix=/ --sbindir=/bin
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make DESTDIR=/install/initrd install
+else
+       cd $(DIR_APP) && ./configure --prefix=/usr --sbindir=/sbin
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make install
+       ln -svf reiserfsck /sbin/fsck.reiserfs
+       ln -svf mkreiserfs /sbin/mkfs.reiserfs
+endif
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
index 56f4245a75321fc9940562801d6ecee3e8fcb53c..0d4af74b9e5f476d58cdfa81d6f8e25261902b28 100644 (file)
--- a/lfs/rsync
+++ b/lfs/rsync
 # Makefiles are based on LFSMake, which is                                    #
 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com>                        #
 #                                                                             #
-# Modifications by:                                                           #
-# ??-12-2003 Mark Wormgoor < mark@wormgoor.com>                               #
-#          - Modified Makefile for IPCop build                                #
-#                                                                             #
-# $Id: ntp,v 1.6.2.3 2005/02/05 15:38:15 gespinasse Exp $
-#                                                                             #
 ###############################################################################
 
 ###############################################################################
@@ -36,7 +30,7 @@ VER        = 2.6.8
 
 THISAPP    = rsync-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
-DL_FROM    = ftp://ftp.samba.org/pub/rsync
+DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
index 8eb0831c63f1c1af98c9d537bfe4119ab10967f8..63a312e6a691ba77251b4a441dcdef94f9264aee 100644 (file)
@@ -38,13 +38,15 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 # Top-level Rules
 ###############################################################################
 
-objects = $(DL_FILE) buildroot-snapshot-20061026.tar.bz2
+objects = $(DL_FILE) buildroot-snapshot-20061026.tar.bz2 uClibc-locale-030818.tgz
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 buildroot-snapshot-20061026.tar.bz2 = $(DL_FROM)/buildroot-snapshot-20061026.tar.bz2
+uClibc-locale-030818.tgz = $(DL_FROM)/uClibc-locale-030818.tgz
 
 $(DL_FILE)_MD5 = 1ada58d919a82561061e4741fb6abd29
 buildroot-snapshot-20061026.tar.bz2_MD5 = ecc5d48a780e46a56d1d39207d5868bd
+uClibc-locale-030818.tgz_MD5 = d75b2239b4e27c3c9cbed1c8f6eabba6
 
 install : $(TARGET)
 
@@ -75,11 +77,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) /opt/$(MACHINE)-uClibc $(DIR_SRC)/buildroot
        @cd $(DIR_SRC) && tar xfj $(DIR_DL)/buildroot-snapshot-20061026.tar.bz2
-       sed -e 's/UCLIBC_HAS_THREADS=y/# UCLIBC_HAS_THREADS is not set/' \
-                       -e 's/DO_C99_MATH=y/# DO_C99_MATH is not set/' \
-                       -e 's/LDSO_CACHE_SUPPORT=y/# LDSO_CACHE_SUPPORT is not set/' \
-                       -e 's/UCLIBC_HAS_FTW=y/# UCLIBC_HAS_FTW is not set/' \
-                       -e 's,/usr/src/linux,&-$(KVER),' -i $(DIR_SRC)/config/uClibc/uClibc.config-$(MACHINE)
+       mkdir -p $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale/
+       cp -f $(DIR_DL)/uClibc-locale-030818.tgz \
+               $(DIR_SRC)/buildroot/toolchain_build_$(MACHINE)/$(THISAPP)/extra/locale/
        cp -f $(DIR_SRC)/config/uClibc/uClibc.config-$(MACHINE) $(DIR_SRC)/buildroot/toolchain/uClibc/uClibc.config
        cp -f $(DIR_SRC)/config/uClibc/buildroot.config-$(MACHINE) $(DIR_SRC)/buildroot/.config
        cp -f $(DIR_SRC)/config/uClibc/buildroot.config.cmd $(DIR_SRC)/buildroot/.config.cmd
index 9b0ad5dc5e1cf00bdb4d046724fe986e04d8c6b2..6aeeeebd52da5531a099a86e299ebf85162eb030 100644 (file)
@@ -89,7 +89,9 @@ ifeq "$(LFS_PASS)" "install"
        cd $(DIR_APP) && echo "HAVE_SLANG=yes" >> make_include
        cd $(DIR_APP) && echo "SLANGFLAGS=-I/opt/$(MACHINE)-uClibc/include/slang" >> make_include
        cd $(DIR_APP)/fdisk && make cfdisk
+       cd $(DIR_APP)/fdisk && make sfdisk
        cd $(DIR_APP)/fdisk && install -m 0755 cfdisk /install/initrd/bin
+       cd $(DIR_APP)/fdisk && install -m 0755 sfdisk /install/initrd/bin
        cd $(DIR_APP)/disk-utils && make LDFLAGS=-static mkfs.minix fsck.minix
        cd $(DIR_APP)/disk-utils && install -m 0755 mkfs.minix /sbin/mkfs.minix.static
        cd $(DIR_APP)/disk-utils && install -m 0755 fsck.minix /sbin/fsck.minix.static
diff --git a/make.sh b/make.sh
index 9e48e82ca2c043d8eba52eda7ceaaa1b13d75e84..fd736604caad5ce62cdd6a354285a9bffd614ebf 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -170,7 +170,7 @@ prepareenv() {
     # Setup environment
     set +h
     LC_ALL=POSIX
-    MAKETUNING="-j4"
+    MAKETUNING="-j8"
     export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
     unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
 
@@ -401,6 +401,7 @@ buildipfire() {
   ipfiremake cdrtools
   ipfiremake dnsmasq
   ipfiremake dosfstools
+  ipfiremake reiserfsprogs
   ipfiremake ethtool
   ipfiremake ez-ipupdate
   ipfiremake fcron
@@ -417,7 +418,7 @@ buildipfire() {
   ipfiremake l7-protocols
 #  ipfiremake isapnptools # ERROR :(
 #  ipfiremake isdn4k-utils # What about mISDN???
-#  ipfiremake kudzu # ERROR :(
+  ipfiremake kudzu
   ipfiremake logrotate
   ipfiremake logwatch
   ipfiremake mingetty
@@ -550,16 +551,20 @@ buildinstaller() {
   installmake busybox
   installmake udev
   installmake sysvinit
+  installmake gettext
   installmake e2fsprogs
   installmake misc-progs
   installmake sysfsutils
-#  installmake hwinfo
+  installmake hwinfo
   installmake slang
   installmake util-linux
+  installmake reiserfsprogs
   installmake newt
   installmake pciutils
   installmake pcmciautils
   installmake kbd
+  installmake popt
+  installmake kudzu
   installmake installer
   installmake scsi.img
   installmake driver.img
@@ -620,7 +625,7 @@ buildpackages() {
   rm -f $LFS/install/images/*usb*
   cp $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
 
-  ipfirepackages
+#  ipfirepackages
 
   # Cleanup
   stdumount
@@ -1013,7 +1018,7 @@ uploadsrc)
                grep -q $i /var/tmp/ftplist
                if [ "$?" -ne "0" ]; then
                        echo -ne "$i"
-                       ncftpput -bb -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT $IPFIRE_FTP_URL_INT $IPFIRE_FTP_PATH_INT/ $i > /dev/null 2>&1
+                       ncftpput -bb -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT $IPFIRE_FTP_URL_INT $IPFIRE_FTP_PATH_INT/ $i >> $BASEDIR/log/_build.uploadsrc.log 2>&1
                        if [ "$?" -eq "0" ]; then
                                beautify message DONE
                        else
index 7f5fc6e672c2b28937cba452f652f76cbf72407c..4e29f3114b2c3810773f0a52632dee51a079a3f7 100644 (file)
@@ -24,7 +24,7 @@ clean :
 ######
 
 OBJS=main.o ide.o cdrom.o nic.o net.o config.o ../libsmooth/libsmooth.o \
-       pcmcia.o upgrade-v12-v13.o upgrade-v130-v140.o usb.o scsi.o
+       pcmcia.o usb.o scsi.o
 
 install: $(OBJS)
        $(LINK) $(OBJS) -o $@ $(LIBS)
index f0510e92f72e205b4fcf19c53ef67336e4b25f86..af49061d5f64e043efc4e6ed39d41c2ed8c0e298 100644 (file)
@@ -6,8 +6,6 @@
  * (c) Lawrence Manning, 2001
  * CDROM menu. Get "misc" driver name etc. 
  *
- * $Id: cdrom.c,v 1.6.2.1 2004/04/14 22:05:39 gespinasse Exp $
- *
  */
 
 #include "install.h"
@@ -25,7 +23,7 @@ int ejectcdrom(char *dev)
        if ((fd = open(dev, O_RDONLY|O_NONBLOCK)) == -1)
                return 0;
        
-       if (ioctl(fd, CDROMEJECT) == -1)
+       if (ioctl(fd, 0x5309) == -1)
        {
                close(fd);
                return 0;
index a5baa8d29377122f40a8d6339c9a70f336a22354..d63daa954959fefaa03b67aebbafb680dd1ab213 100644 (file)
@@ -6,8 +6,6 @@
  * (c) Lawrence Manning, 2001
  * Write the config and get password stuff.
  * 
- * $Id: config.c,v 1.6.2.2 2004/08/23 21:09:44 alanh Exp $
- * 
  */
 
 #include "install.h"
index fa0b849e554660313937d1f4161f70030b9ac480..371530da81369cabce1fef91184e644cd626f57c 100644 (file)
@@ -9,9 +9,13 @@
  */
 
 #include "install.h"
-
+#define _GNU_SOURCE
 #define CDROM_INSTALL 0
 #define URL_INSTALL 1
+#define DISK_INSTALL 2
+#define INST_FILECOUNT 6600
+#define UNATTENDED_CONF "/cdrom/data/unattended.conf"
 
 int raid_disk = 0;
 FILE *flog = NULL;
@@ -25,25 +29,229 @@ extern char url[STRING_SIZE];
 extern char *en_tr[];
 extern char *de_tr[];
 
+int detect_smp() {
+       FILE *fd = NULL;
+       char line[STRING_SIZE];
+       int cpu_count = 0;
+
+       if ((fd = fopen("/proc/cpuinfo", "r")) == NULL) {
+               return 0;
+       }
+       while (fgets(line, STRING_SIZE, fd) != NULL) {
+               if (strstr(line, "processor") == line) {
+                       cpu_count++;
+               }
+       }
+       (void)fclose(fd);
+       return (cpu_count > 1);
+}
+
+int generate_packages_list(char *packages, const char *rpmdir, const char *source) {
+
+       FILE *fd=NULL;
+       char buffer[STRING_SIZE];
+       bzero(buffer, sizeof(buffer));
+
+       if ((fd = fopen(source, "r")) == NULL) {
+               (void) fprintf(flog, "Packages file %s not found\n", source);
+               return -1;
+       }
+       while (fgets(buffer, sizeof(buffer), fd) != NULL) {
+               int length = -1;
+               length = strlen(buffer)-1;
+               if (length<=0) {
+                       continue;
+               }
+               if (buffer[length] == '\n') {
+                       buffer[length]='\0';
+               }
+               length = snprintf(packages, STRING_SIZE, "%s %s/%s", strdup(packages), rpmdir, buffer);
+               if ((length <0) || (length >STRING_SIZE)) {
+                       (void) fprintf(flog, "rpm command line too long: %d\n%s", length, packages);
+                       return -1;
+               }
+       }
+       if (ferror(fd)) {
+               (void) fprintf(flog, "Error reading file\n");
+               (void) fclose(fd);
+               return -1;
+       }
+       (void) fclose(fd);
+       return 0;
+}
+
+long calc_swapsize(long memory, long disk) {
+       if (memory < 128) {
+               return 256;
+       }
+       if (memory > 1024) {
+               return 512;
+       }
+
+       return memory*2;
+}
+
+int unattended_setup(struct keyvalue *unattendedkv) {
+    struct keyvalue *mainsettings = initkeyvalues();
+    struct keyvalue *ethernetkv = initkeyvalues();
+    FILE *file, *hosts;
+    char commandstring[STRING_SIZE];
+
+    char domainname[STRING_SIZE];
+    char hostname[STRING_SIZE];
+    char keymap[STRING_SIZE];
+    char language[STRING_SIZE];
+    char timezone[STRING_SIZE];
+    char green_address[STRING_SIZE];
+    char green_netmask[STRING_SIZE];
+    char green_netaddress[STRING_SIZE];
+    char green_broadcast[STRING_SIZE];
+    char root_password[STRING_SIZE];
+    char admin_password[STRING_SIZE];
+    char serial_console[STRING_SIZE];
+    char reversesort[STRING_SIZE];
+
+    findkey(unattendedkv, "DOMAINNAME", domainname);
+    findkey(unattendedkv, "HOSTNAME", hostname);
+    findkey(unattendedkv, "KEYMAP", keymap);
+    findkey(unattendedkv, "LANGUAGE", language);
+    findkey(unattendedkv, "TIMEZONE", timezone);
+    findkey(unattendedkv, "GREEN_ADDRESS", green_address);
+    findkey(unattendedkv, "GREEN_NETMASK", green_netmask);
+    findkey(unattendedkv, "GREEN_NETADDRESS", green_netaddress);
+    findkey(unattendedkv, "GREEN_BROADCAST", green_broadcast);
+    findkey(unattendedkv, "ROOT_PASSWORD", root_password);
+    findkey(unattendedkv, "ADMIN_PASSWORD", admin_password);
+    findkey(unattendedkv, "SERIAL_CONSOLE", serial_console);
+    findkey(unattendedkv, "REVERSE_NICS", reversesort);
+
+    /* write main/settings. */
+    replacekeyvalue(mainsettings, "DOMAINNAME", domainname);
+    replacekeyvalue(mainsettings, "HOSTNAME", hostname);
+    replacekeyvalue(mainsettings, "KEYMAP", keymap);
+    replacekeyvalue(mainsettings, "LANGUAGE", language);
+    replacekeyvalue(mainsettings, "TIMEZONE", timezone);
+    writekeyvalues(mainsettings, "/harddisk" CONFIG_ROOT "/main/settings");
+    freekeyvalues(mainsettings);
+
+    /* do setup stuff */
+    fprintf(flog, "unattended: Starting setup\n");
+
+    /* network */
+
+    fprintf(flog, "unattended: setting up network configuration\n");
+
+    (void) readkeyvalues(ethernetkv, "/harddisk" CONFIG_ROOT "/ethernet/settings");
+    replacekeyvalue(ethernetkv, "GREEN_ADDRESS", green_address);
+    replacekeyvalue(ethernetkv, "GREEN_NETMASK", green_netmask);
+    replacekeyvalue(ethernetkv, "GREEN_NETADDRESS", green_netaddress);
+    replacekeyvalue(ethernetkv, "GREEN_BROADCAST", green_broadcast);
+    replacekeyvalue(ethernetkv, "CONFIG_TYPE", "0");
+    replacekeyvalue(ethernetkv, "GREEN_DEV", "br0");
+    write_ethernet_configs(ethernetkv);
+    freekeyvalues(ethernetkv);
+
+    /* timezone */
+    unlink("/harddisk/etc/localtime");
+    snprintf(commandstring, STRING_SIZE, "/harddisk/%s", timezone);
+    link(commandstring, "/harddisk/etc/localtime");
+
+    /* hostname */
+    fprintf(flog, "unattended: writing hostname.conf\n");
+    if (!(file = fopen("/harddisk" CONFIG_ROOT "/main/hostname.conf", "w")))
+    {
+       errorbox("unattended: ERROR writing hostname.conf");
+       return 0;
+    }
+    fprintf(file, "ServerName %s\n", hostname);
+    fclose(file);                                  
+
+    fprintf(flog, "unattended: writing hosts\n");
+    if (!(hosts = fopen("/harddisk/etc/hosts", "w")))
+    {
+       errorbox("unattended: ERROR writing hosts");
+       return 0;
+    }
+    fprintf(hosts, "127.0.0.1\tlocalhost\n");
+    fprintf(hosts, "%s\t%s.%s\t%s\n", green_address, hostname, domainname, hostname);
+    fclose(hosts);                                                             
+
+    fprintf(flog, "unattended: writing hosts.allow\n");
+    if (!(file = fopen("/harddisk/etc/hosts.allow", "w")))
+    {
+       errorbox("unattended: ERROR writing hosts.allow");
+        return 0;
+    }
+    fprintf(file, "sshd : ALL\n");
+    fprintf(file, "ALL  : localhost\n");
+    fprintf(file, "ALL  : %s/%s\n", green_netaddress, green_netmask);
+    fclose(file);
+
+    fprintf(flog, "unattended: writing hosts.deny\n");
+    if (!(file = fopen("/harddisk/etc/hosts.deny", "w")))
+    {
+       errorbox("unattended: ERROR writing hosts.deny");
+        return 0;
+    }
+    fprintf(file, "ALL : ALL\n");
+    fclose(file);
+
+    if (strcmp(serial_console, "yes") != 0) {
+           snprintf(commandstring, STRING_SIZE,
+                    "/bin/chroot /harddisk /bin/sed -i -e \"s/^s0/#s0/\" /etc/inittab");
+           if (mysystem(commandstring)) {
+                   errorbox("unattended: ERROR modifying inittab");
+                   return 0;    
+           }
+
+           snprintf(commandstring, STRING_SIZE,
+                    "/bin/chroot /harddisk /bin/sed -i -e \"s/^serial/#serial/; s/^terminal/#terminal/\" /boot/grub/grub.conf");
+           if (mysystem(commandstring)) {
+                   errorbox("unattended: ERROR modifying inittab");
+                   return 0;
+           }
+    }
+
+    /* set reverse sorting of interfaces */
+    if (strcmp(reversesort, "yes") == 0) {
+           mysystem("/bin/touch /harddisk/var/ipfire/ethernet/reverse_nics");
+    }
+
+    /* set root password */
+    fprintf(flog, "unattended: setting root password\n");
+    
+    snprintf(commandstring, STRING_SIZE,
+           "/bin/chroot /harddisk /bin/sh -c \"echo 'root:%s' | /usr/sbin/chpasswd\"", root_password);
+    if (mysystem(commandstring)) {
+       errorbox("unattended: ERROR setting root password");
+       return 0;
+    }
+    
+    /* set admin password */
+    fprintf(flog, "unattended: setting admin password\n");
+    snprintf(commandstring, STRING_SIZE,
+           "/bin/chroot /harddisk /usr/bin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", admin_password);
+    if (mysystem(commandstring)) {
+       errorbox("unattended: ERROR setting admin password");
+       return 0;    
+    }
+    
+    return 1;                                                          
+}
+
 int main(int argc, char *argv[])
 {
-#ifdef LANG_EN_ONLY
-        char *langnames[] = { "English", NULL };
-        char *shortlangnames[] = { "en", NULL };
-        char **langtrs[] = { en_tr, NULL };
-#else
        char *langnames[] = { "Deutsch", "English", NULL };
        char *shortlangnames[] = { "de", "en", NULL };
        char **langtrs[] = { de_tr, en_tr, NULL };
-#endif
        char hdletter, cdletter;
-       char harddrive[5], cdromdrive[5];       /* Device holder. */
-       struct devparams hdparams, cdromparams; /* Params for CDROM and HD */
-       int cdmounted = 0;              /* Loop flag for inserting a cd. */ 
-       int rc;
+       char harddrive[5], sourcedrive[5];      /* Device holder. */
+       struct devparams hdparams, cdromparams; /* Params for CDROM and HD */
+       int cdmounted = 0; /* Loop flag for inserting a cd. */
+       int rc = 0;
        char commandstring[STRING_SIZE];
        char *installtypes[] = { "CDROM", "HTTP/FTP", NULL };
-       int installtype = CDROM_INSTALL; 
+       int installtype = CDROM_INSTALL;
        char insertmessage[STRING_SIZE];
        char insertdevnode[STRING_SIZE];
        int choice;
@@ -57,20 +265,28 @@ int main(int argc, char *argv[])
        FILE *handle, *cmdfile;
        char line[STRING_SIZE];
        char string[STRING_SIZE];
-       int maximum_free = 0, current_free;
-       int memory = 0;
-       int log_partition, boot_partition, root_partition, swap_file;
+       long maximum_free = 0, current_free;
+       long memory = 0;
+       long log_partition, boot_partition, root_partition, swap_file;
        int scsi_disk = 0;
        int pcmcia_disk = 0;
        int pcmcia_cdrom = 0;
        int scsi_cdrom = 0;
        int ide_cdrom = 0;
        int fdisk = 0;
-
+       int hardyn = 0;
+       char *yesnoharddisk[] = { "NO", "YES", NULL };
+       char *yesno[] = { "NO", "YES", NULL };
+       char green[STRING_SIZE];
+       int unattended = 0;
+       struct keyvalue *unattendedkv = initkeyvalues();
+       char packages[STRING_SIZE];
+       int serial_console = 0;
+       char megabridge[STRING_SIZE];
 
        setlocale (LC_ALL, "");
        sethostname( SNAME , 10);
-       
+
        memset(&hdparams, 0, sizeof(struct devparams));
        memset(&cdromparams, 0, sizeof(struct devparams));
 
@@ -123,9 +339,18 @@ int main(int argc, char *argv[])
                } else {
                        fprintf(flog, "Skipping USB detection.\n");
                }
+               // check if we have to make an unattended install
+               if (strstr (line, "unattended") != NULL) {              
+                   unattended = 1;
+               }
        }
+
+       // make some beeps before wiping the system :)
+       if (unattended) {
+           runcommandwithstatus("/bin/beep -f 450 -r 10 -D 800 -n -f 900 -l 1000", "WARNING: Unattended installation will start in 10 seconds...");
+       }
        
-       /* Deutsch is the default */
+       /* German is the default */
        for (choice = 0; langnames[choice]; choice++)
        {
                if (strcmp(langnames[choice], "Deutsch") == 0)
@@ -134,33 +359,331 @@ int main(int argc, char *argv[])
        if (!langnames[choice])
                goto EXIT;
 
-#ifdef LANG_EN_ONLY
-       /* No need to ask.  "choice" already has the index for English */
-#else
-       rc = newtWinMenu("Language selection",
-               "Select the language you wish to use for your " NAME ".", 50, 5, 5, 8,
-               langnames, &choice, "OK", NULL);
-#endif
+       if (!unattended) {
+           rc = newtWinMenu("Language selection",
+                   "Select the language you wish to use for the " NAME ".", 50, 5, 5, 8,
+                   langnames, &choice, "Ok", NULL);
+       }
+
        ctr = langtrs[choice];
        strcpy(shortlangname, shortlangnames[choice]);
 
        mysystem("/bin/setfont lat0-16");
-       
+
        newtDrawRootText(14, 0, NAME " v" VERSION " - " SLOGAN );
        newtPushHelpLine(ctr[TR_HELPLINE]);
 
-       sprintf(message, ctr[TR_WELCOME], NAME);
-       sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
-       newtWinMessage(title, ctr[TR_OK], message);
+       if (!unattended) {
+               sprintf(message, ctr[TR_WELCOME], NAME);
+               sprintf (title, "%s %s - %s", NAME, VERSION, SLOGAN);
+               newtWinMessage(title, ctr[TR_OK], message);
 
-       sprintf(message, ctr[TR_SELECT_INSTALLATION_MEDIA_LONG], NAME);
-       rc = newtWinMenu(ctr[TR_SELECT_INSTALLATION_MEDIA], message,
-               50, 5, 5, 6, installtypes, &installtype, ctr[TR_OK],
-               ctr[TR_CANCEL], NULL);
+               sprintf(message, ctr[TR_SELECT_INSTALLATION_MEDIA_LONG], NAME);
+               rc = newtWinMenu(ctr[TR_SELECT_INSTALLATION_MEDIA], message,
+                       50, 5, 5, 6, installtypes, &installtype, ctr[TR_OK],
+                       ctr[TR_CANCEL], NULL);
+       }
+       else {
+           rc = 1;
+           installtype = CDROM_INSTALL;
+       }
 
        if (rc == 2)
                goto EXIT;
-                                       
+
+       // Starting hardware detection
+       runcommandwithstatus("/bin/probehw.sh", ctr[TR_PROBING_HARDWARE]);
+
+       switch (mysystem("/bin/mountsource.sh")) {
+           case 0:
+               installtype = CDROM_INSTALL;
+               cdmounted = 1;
+               break;
+           case 1:
+               installtype = DISK_INSTALL;
+               break;
+           case 10:
+               errorbox(ctr[TR_NO_CDROM]);
+               goto EXIT;
+       }
+
+       /* read source drive letter */
+       if ((handle = fopen("/source_device", "r")) == NULL) {
+           errorbox("ERROR reading source_device");
+       }
+       fgets(sourcedrive, 5, handle);
+       fprintf(flog, "Source drive: %s\n", sourcedrive);
+       fclose(handle);
+       
+       if (installtype == CDROM_INSTALL) {
+           snprintf(cdromparams.devnode, STRING_SIZE, "/dev/%s", sourcedrive);
+           cdromparams.module = 0;
+           fprintf(flog, "Source device: %s\n", cdromparams.devnode);
+       }
+
+       /* Get device for the HD.  This has to succeed. */
+       if (!(hdletter = findidetype(IDE_HD)))
+       {
+               /* Need to clean this up at some point */
+               if (!try_scsi("sda") || strstr(sourcedrive, "sda") != NULL) {
+                       if (!try_scsi("ida/c0d0")) {
+                               if (!try_scsi("cciss/c0d0")) {
+                                       if (!try_scsi("rd/c0d0")) {
+                                               if (!try_scsi("ataraid/d0")) {
+                                                       errorbox(ctr[TR_NO_HARDDISK]);
+                                                       goto EXIT;
+                                               } else {
+                                                       raid_disk = 1;
+                                                       sprintf(harddrive, "ataraid/d0");
+                                               }
+                                       } else {
+                                               raid_disk = 1;
+                                               sprintf(harddrive, "rd/c0d0");
+                                       }
+                               } else {
+                                       raid_disk = 1;
+                                       sprintf(harddrive, "cciss/c0d0");
+                               }
+                       } else {
+                               raid_disk = 1;
+                               sprintf(harddrive, "ida/c0d0");
+                       }
+               } else {
+                   if (strstr(sourcedrive, "sda") != NULL) {
+                       // probably installing from usb stick, try sdb
+                       if (try_scsi("sdb")) {
+                           sprintf(harddrive, "sdb");
+                       }
+                       else {
+                           errorbox(ctr[TR_NO_HARDDISK]);
+                           goto EXIT;
+                       }
+                   }
+                   else {
+                       sprintf(harddrive, "sda");
+                   }
+               }
+               scsi_disk = 1;
+       } else
+               sprintf(harddrive, "hd%c", hdletter);
+
+
+       /* load unattended configuration */
+       if (unattended) {
+           fprintf(flog, "unattended: Reading unattended.conf\n");
+
+           (void) readkeyvalues(unattendedkv, UNATTENDED_CONF);
+       }
+
+       /* Make the hdparms struct and print the contents. */
+       snprintf(hdparams.devnode, STRING_SIZE, "/dev/%s", harddrive);
+       hdparams.module = 0;
+
+       sprintf(message, ctr[TR_PREPARE_HARDDISK], hdparams.devnode);
+       
+       if (unattended) {
+           hardyn = 1;
+       }
+       
+       while (! hardyn) {
+               rc = newtWinMenu(title, message,
+                                50, 5, 5, 6, yesnoharddisk,
+                                &hardyn, ctr[TR_OK],
+                                ctr[TR_CANCEL], NULL);
+               if (rc == 2)
+                       goto EXIT;
+       }
+
+       if (rc == 2)
+               goto EXIT;
+
+       /* Calculate amount of memory in machine */
+        if ((handle = fopen("/proc/meminfo", "r")))
+        {
+            while (fgets(line, STRING_SIZE-1, handle)) {
+                if (sscanf (line, "MemTotal: %s kB", string)) {
+                    memory = atoi(string) / 1024 ;
+                }
+            }
+            fclose(handle);
+        }
+
+       /* Partition, mkswp, mkfs.
+        * before partitioning, first determine the sizes of each
+        * partition.  In order to do that we need to know the size of
+        * the disk. 
+        */
+       /* Don't use mysystem here so we can redirect output */
+       sprintf(commandstring, "/bin/sfdisk -s /dev/%s > /disksize 2> /dev/null", harddrive);
+       system(commandstring);
+
+       /* Calculate amount of disk space */
+        if ((handle = fopen("/disksize", "r")))
+        {
+               fgets(line, STRING_SIZE-1, handle);
+               if (sscanf (line, "%s", string)) {
+                       maximum_free = atoi(string) / 1024;
+               }
+               fclose(handle);
+        }
+       
+       fprintf(flog, "maximum_free = %ld, memory = %ld", 
+               maximum_free, memory);
+       
+       swap_file = calc_swapsize(memory, maximum_free);
+
+       if (maximum_free < 512 + swap_file ) {
+               if (maximum_free < 512) {
+                       errorbox(ctr[TR_DISK_TOO_SMALL]);
+                       goto EXIT;
+               }
+
+               if (!unattended) {
+                   rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], ctr[TR_CONTINUE_NO_SWAP]);
+               }
+               else {
+                   rc = 1;
+               }
+               
+               if (rc != 1)
+                       goto EXIT;
+               swap_file = 0;
+       }
+
+       boot_partition = 10; /* in MB */
+       current_free = maximum_free - boot_partition - swap_file;
+
+       root_partition = current_free / 3 ;
+       if (current_free < 400) {
+               errorbox(ctr[TR_DISK_TOO_SMALL]);
+               goto EXIT;
+       }
+
+       current_free = current_free - root_partition;
+       if (!swap_file) {
+               root_partition = root_partition + swap_file;
+       }
+
+       log_partition = current_free;
+
+       fprintf(flog, "boot = %ld, swap = %ld, mylog = %ld, root = %ld\n",
+               boot_partition, swap_file, log_partition, root_partition);
+
+       handle = fopen("/tmp/partitiontable", "w");
+
+
+       /* Make swapfile */
+       if (swap_file) {
+               fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
+                       boot_partition, swap_file, root_partition);
+       } else {
+               fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
+                       boot_partition, root_partition);
+       }
+
+       fclose(handle);
+
+       snprintf(commandstring, STRING_SIZE, "/bin/sfdisk -L -uM %s < /tmp/partitiontable", hdparams.devnode);
+       if (runcommandwithstatus(commandstring, ctr[TR_PARTITIONING_DISK]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_PARTITION]);
+               goto EXIT;
+       }
+
+       mysystem("/bin/udevstart");
+
+       if (raid_disk)
+               snprintf(commandstring, STRING_SIZE, "/bin/mke2fs -T ext3 -c %sp1", hdparams.devnode);  
+       else
+               snprintf(commandstring, STRING_SIZE, "/bin/mke2fs -T ext3 -c %s1", hdparams.devnode);
+       if (runcommandwithstatus(commandstring, ctr[TR_MAKING_BOOT_FILESYSTEM]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_MAKE_BOOT_FILESYSTEM]);
+               goto EXIT;
+       }
+
+       if (swap_file) {
+               if (raid_disk)
+                       snprintf(commandstring, STRING_SIZE, "/bin/mkswap %sp2", hdparams.devnode);     
+               else
+                       snprintf(commandstring, STRING_SIZE, "/bin/mkswap %s2", hdparams.devnode);
+               if (runcommandwithstatus(commandstring, ctr[TR_MAKING_SWAPSPACE]))
+               {
+                       errorbox(ctr[TR_UNABLE_TO_MAKE_SWAPSPACE]);
+                       goto EXIT;
+               }
+       }
+
+       if (raid_disk)
+               snprintf(commandstring, STRING_SIZE, "/bin/mke2fs -T ext3 %sp3", hdparams.devnode);     
+       else
+               snprintf(commandstring, STRING_SIZE, "/bin/mke2fs -T ext3 %s3", hdparams.devnode);      
+
+       if (runcommandwithstatus(commandstring, ctr[TR_MAKING_ROOT_FILESYSTEM]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_MAKE_ROOT_FILESYSTEM]);
+               goto EXIT;
+       }
+
+       if (raid_disk)
+               snprintf(commandstring, STRING_SIZE, "/bin/mke2fs -T ext3 %sp4", hdparams.devnode);     
+       else
+               snprintf(commandstring, STRING_SIZE, "/bin/mke2fs -T ext3 %s4", hdparams.devnode);      
+
+       if (runcommandwithstatus(commandstring, ctr[TR_MAKING_LOG_FILESYSTEM]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_MAKE_ROOT_FILESYSTEM]);
+               goto EXIT;
+       }
+
+       /* Mount harddisk. */
+       if (raid_disk)
+               snprintf(commandstring, STRING_SIZE, "/sbin/mount %sp3 /harddisk", hdparams.devnode);
+       else
+               snprintf(commandstring, STRING_SIZE, "/sbin/mount %s3 /harddisk", hdparams.devnode);
+       if (runcommandwithstatus(commandstring, ctr[TR_MOUNTING_ROOT_FILESYSTEM]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_MOUNT_ROOT_FILESYSTEM]);
+               goto EXIT;
+       }
+
+       mkdir("/harddisk/boot", S_IRWXU|S_IRWXG|S_IRWXO);
+       mkdir("/harddisk/var", S_IRWXU|S_IRWXG|S_IRWXO);
+       mkdir("/harddisk/var/log", S_IRWXU|S_IRWXG|S_IRWXO);
+       
+       if (raid_disk)
+               snprintf(commandstring, STRING_SIZE, "/sbin/mount %sp1 /harddisk/boot", hdparams.devnode);
+       else
+               snprintf(commandstring, STRING_SIZE, "/sbin/mount %s1 /harddisk/boot", hdparams.devnode);
+
+       if (runcommandwithstatus(commandstring, ctr[TR_MOUNTING_BOOT_FILESYSTEM]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_MOUNT_BOOT_FILESYSTEM]);
+               goto EXIT;
+       }
+       if (swap_file) {
+               if (raid_disk)
+                       snprintf(commandstring, STRING_SIZE, "/bin/swapon %sp2", hdparams.devnode);
+               else
+                       snprintf(commandstring, STRING_SIZE, "/bin/swapon %s2", hdparams.devnode);
+               if (runcommandwithstatus(commandstring, ctr[TR_MOUNTING_SWAP_PARTITION]))
+               {
+                       errorbox(ctr[TR_UNABLE_TO_MOUNT_SWAP_PARTITION]);
+                       goto EXIT;
+               }
+       }
+       if (raid_disk)
+               snprintf(commandstring, STRING_SIZE, "/sbin/mount %sp4 /harddisk/var", hdparams.devnode);
+       else
+               snprintf(commandstring, STRING_SIZE, "/sbin/mount %s4 /harddisk/var", hdparams.devnode);
+       if (runcommandwithstatus(commandstring, ctr[TR_MOUNTING_LOG_FILESYSTEM]))
+       {
+               errorbox(ctr[TR_UNABLE_TO_MOUNT_LOG_FILESYSTEM]);
+               goto EXIT;
+       }
+
+
+
        if (installtype == CDROM_INSTALL)
        {       
                /* First look for an IDE CDROM. */
@@ -198,8 +721,8 @@ int main(int argc, char *argv[])
                                /* try loading all SCSI modules with default options */
                                /* Should expand this to allow options later though */
                                if (!pcmcia_cdrom)
-                                   runcommandwithstatus("/bin/probescsi.sh",
-                                       ctr[TR_PROBING_SCSI]);
+                                   runcommandwithstatus("/bin/probehw.sh",
+                                       ctr[TR_PROBING_HARDWARE]);
        
                                /* If it fails, give up. */
                                if (!(try_scsi("scd0"))) {
@@ -208,14 +731,14 @@ int main(int argc, char *argv[])
                                }
                        }
 
-                       sprintf(cdromdrive, "scd0");
+                       sprintf(sourcedrive, "scd0");
                        scsi_cdrom = 1;
                } else {
-                       sprintf(cdromdrive, "hd%c", cdletter);
+                       sprintf(sourcedrive, "hd%c", cdletter);
                        ide_cdrom = 1;
                }
 
-               snprintf(cdromparams.devnode, STRING_SIZE, "/dev/%s", cdromdrive);
+               snprintf(cdromparams.devnode, STRING_SIZE, "/dev/%s", sourcedrive);
                cdromparams.module = 0;
                
                sprintf(insertmessage, ctr[TR_INSERT_CDROM], NAME);
@@ -418,8 +941,8 @@ int main(int argc, char *argv[])
                        /* try loading all SCSI modules with default options */
                        /* Should expand this to allow options later though */
                        if (!pcmcia_disk)
-                               runcommandwithstatus("/bin/probescsi.sh",
-                                       ctr[TR_PROBING_SCSI]);
+                               runcommandwithstatus("/bin/probehw.sh",
+                                       ctr[TR_PROBING_HARDWARE]);
                }
        
                /* Need to clean this up at some point */
diff --git a/src/install+setup/install/mountsource.sh b/src/install+setup/install/mountsource.sh
new file mode 100644 (file)
index 0000000..6706cca
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+#
+# to be banished by kudzu!
+#
+
+echo "Scanning source media"
+
+# scan CDROM devices
+
+for DEVICE in $(kudzu -qps  -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
+    mount /dev/${DEVICE} /cdrom 2> /dev/null
+    if [ -e /cdrom/boot ]; then
+       echo -n ${DEVICE} > /source_device
+       exit 0
+    fi
+    umount /cdrom 2> /dev/null
+done
+
+# scan HD device (usb sticks, etc.)
+for DEVICE in $(kudzu -qps  -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
+    mount /dev/${DEVICE}1 /cdrom 2> /dev/null
+    if [ -e /cdrom/boot ]; then
+       echo -n ${DEVICE}1 > /source_device
+       exit 1
+    fi
+    umount /cdrom 2> /dev/null
+done
+
+exit 10
diff --git a/src/install+setup/install/probehw.sh b/src/install+setup/install/probehw.sh
new file mode 100644 (file)
index 0000000..6c9859c
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+#
+# to be banished by kudzu!
+#
+
+echo "Detecting Hardware"
+for MODULE in $(kudzu -qps  -t 30 | grep driver | cut -d ' ' -f 2 | sort | uniq); do
+    if [ "${MODULE}" = "unknown" ] || \
+        [ "${MODULE}" = "ignore" ]; then
+        continue
+    fi
+    if grep -Eqe "^${MODULE} " /proc/modules; then
+        continue
+    fi
+    echo "Loading ${MODULE}"
+    modprobe -k ${MODULE}
+    udevstart
+done
+
+exit 0
diff --git a/src/install+setup/install/probescsi.sh b/src/install+setup/install/probescsi.sh
deleted file mode 100644 (file)
index 54256cd..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-OLDDIR=`pwd`
-cd /lib/modules/*/kernel/drivers/scsi
-/bin/modprobe scsi_mod.o.gz > /dev/null 2>&1
-/bin/modprobe sd_mod.o.gz > /dev/null 2>&1
-/bin/modprobe sr_mod.o.gz > /dev/null 2>&1
-/bin/modprobe sg.o.gz > /dev/null 2>&1
-/bin/modprobe libata.o.gz > /dev/null 2>&1
-echo "Trying cpqarray"; 
-if /bin/modprobe cpqarray > /dev/null 2>&1; then
-       echo "cpqarray.o.gz" > /scsidriver;
-       exit 0;
-fi
-echo "Trying cciss";
-if /bin/modprobe cciss > /dev/null 2>&1; then
-       echo "cciss.o.gz" > /scsidriver;
-       exit 0;
-fi
-echo "Trying DAC960";
-if /bin/modprobe DAC960 > /dev/null 2>&1; then
-       echo "DAC960.o.gz" > /scsidriver;
-       exit 0;
-fi
-/bin/modprobe ataraid.o.gz > /dev/null 2>&1
-echo "Trying medley";
-if /bin/modprobe medley > /dev/null 2>&1; then
-       echo "medley.o.gz" > /scsidriver;
-       exit 0;
-fi
-echo "Trying hptraid";
-if /bin/modprobe hptraid > /dev/null 2>&1; then
-       echo "hptraid.o.gz" > /scsidriver;
-       exit 0;
-fi
-echo "Trying pdcraid";
-if /bin/modprobe pdcraid > /dev/null 2>&1; then
-       echo "pdcraid.o.gz" > /scsidriver;
-       exit 0;
-fi
-echo "Trying silraid";
-if /bin/modprobe silraid > /dev/null 2>&1; then
-       echo "silraid.o.gz" > /scsidriver;
-       exit 0;
-fi
-for i in * message/fusion/mptscsih.o.gz ; 
-do 
-# Skip the generic scsi modules and ancillary support modules
-# Added eata_dma to skip list because it crashes some machines. Probe last.
-if [ $i != "scsi_mod.o.gz" -a $i != "sd_mod.o.gz" -a $i != "sg.o.gz" -a $i != "sr_mod.o.gz" -a $i != "53c700.o.gz" -a $i != "NCR53C9x.o.gz" -a $i != "eata_dma.o.gz" -a $i != "libata.o.gz" ]; then
-       DRIVER=`echo $i | sed 's/.o.gz//'`
-       echo "Trying $DRIVER"; 
-       if /bin/modprobe $DRIVER > /dev/null 2>&1; then
-               echo $i > /scsidriver;
-               /bin/cat /proc/scsi/scsi;
-               exit 0;
-       fi;
-fi;
-done
-echo "Trying eata_dma";
-if /bin/modprobe eata_dma > /dev/null 2>&1; then
-       echo "eata_dma.o.gz" > /scsidriver;
-       exit 0;
-fi
-cd $OLDDIR
diff --git a/src/install+setup/install/upgrade-v12-v13.c b/src/install+setup/install/upgrade-v12-v13.c
deleted file mode 100644 (file)
index 2cbedb8..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * This file is part of the IPCop Firewall.
- *
- * IPCop 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.
- *
- * IPCop 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 IPCop; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- * Copyright 2002: Mark Wormgoor <mark@wormgoor.com>
- * 
- * $Id: upgrade-v12-v13.c,v 1.2.2.3 2004/11/11 09:39:25 alanh Exp $
- * 
- */
-
-#include "install.h"
-
-void _convert_ppp_settings() {
-       DIR *dirp;
-       struct dirent *dp;
-       char filename[STRING_SIZE];
-       
-       dirp = opendir( "/harddisk/var/ipfire/ppp" );
-       while ( (dp = readdir( dirp )) != NULL ) {
-               if ( strstr( dp->d_name, "settings" ) == dp->d_name ) {
-                       snprintf (filename, STRING_SIZE-1, "%s/%s", 
-                               "/harddisk/var/ipfire/ppp", dp->d_name);
-
-                       /* reduce furthur replacements from commands below */
-                       replace (filename, "TYPE=modem", "");
-                       replace (filename, "COMPORT=ttyS0", "TYPE=modem\nCOMPORT=ttyS0");
-                       replace (filename, "COMPORT=ttyS1", "TYPE=modem\nCOMPORT=ttyS1");
-                       replace (filename, "COMPORT=ttyS2", "TYPE=modem\nCOMPORT=ttyS2");
-                       replace (filename, "COMPORT=ttyS3", "TYPE=modem\nCOMPORT=ttyS3");
-                       /* reduce furthur replacements from commands below */
-                       replace (filename, "TYPE=isdn", "");
-                       replace (filename, "COMPORT=isdn1", "TYPE=isdn\nCOMPORT=isdn1");
-                       replace (filename, "COMPORT=isdn2", "TYPE=isdn\nCOMPORT=isdn2");
-                       replace (filename, "COMPORT=pppoe", "TYPE=pppoe");
-                       replace (filename, "COMPORT=pptp", "TYPE=pptp");
-                       replace (filename, "COMPORT=usbadsl", "TYPE=alcatelusb");
-                       replace (filename, "COMPORT=pppoa", "TYPE=pulsardsl");
-
-                       chown (filename, 99, 99);
-               }       
-       }
-       (void) closedir( dirp );
-}
-
-int _convert_xtaccess() {
-       int count=1, count2=0;
-        FILE *portfw1, *portfw2;
-        char portsrctemp[STRING_SIZE], portdsttemp[STRING_SIZE];
-       char *portproto, *portsrcip, *portsrcport, *portdstip, *portdstport, *portenabled, *portremip;
-
-        FILE *xtaccess1, *xtaccess2;
-       char xtsrctemp[STRING_SIZE], xtdsttemp[STRING_SIZE];
-       char *xtproto, *xtsrcip, *xtdstip, *xtdstport, *xtenabled;
-        
-       if (!(portfw1 = fopen ("/harddisk/var/ipfire/portfw/config", "r"))) return 1;
-       if (!(portfw2 = fopen ("/harddisk/var/ipfire/portfw/config.new", "w"))) 
-       {
-               fclose(portfw1);
-               return 1;
-       }
-
-        while (fgets (portsrctemp, STRING_SIZE, portfw1) != NULL) {
-               count2 = 0;
-               portproto   = NULL;
-               portsrcip   = NULL;
-               portsrcport = NULL;
-               portdstip   = NULL;
-               portdstport = NULL;
-               portremip   = NULL;
-               portenabled = NULL;
-               
-               if (!(xtaccess1 = fopen ("/harddisk/var/ipfire/xtaccess/config", "r"))) 
-               {
-                       fclose(portfw1);
-                       fclose(portfw2);
-                       return 1;
-               }
-               if (!(xtaccess2 = fopen ("/harddisk/var/ipfire/xtaccess/config.new", "w"))) 
-               {
-                       fclose(portfw1);
-                       fclose(portfw2);
-                       fclose(xtaccess1);
-                       return 1;
-               }
-
-               if (isdigit (portsrctemp[0])) {
-                       /* Already converted to new format */
-                       fputs(portsrctemp, portfw2);
-                       continue;
-               }
-
-               if (portsrctemp[strlen(portsrctemp) - 1] == '\n')
-                       portsrctemp[strlen(portsrctemp) - 1] = '\0';
-               portproto   = strtok (portsrctemp, ",");
-               portsrcport = strtok (NULL, ",");
-               portdstip   = strtok (NULL, ",");
-               portdstport = strtok (NULL, ",");
-               portenabled = strtok (NULL, ",");
-               portsrcip   = strtok (NULL, ",");
-               portremip   = strtok (NULL, ",");
-               if (!(portproto && portsrcport && portdstip && 
-                       portdstport && portenabled ))
-                       continue;
-
-               if (portsrcip == NULL) portsrcip = strdup ("0.0.0.0");
-
-               while (fgets (xtsrctemp, STRING_SIZE, xtaccess1)) {
-                       xtproto   = NULL;
-                       xtsrcip   = NULL;
-                       xtdstip   = NULL;
-                       xtdstport = NULL;
-                       xtenabled = NULL;
-
-                       if (xtsrctemp[strlen(xtsrctemp) - 1] == '\n')
-                               xtsrctemp[strlen(xtsrctemp) - 1] = '\0';
-                       xtproto   = strtok (xtsrctemp, ",");
-                       xtsrcip   = strtok (NULL, ",");
-                       xtdstport = strtok (NULL, ",");
-                       xtenabled = strtok (NULL, ",");
-                       xtdstip   = strtok (NULL, ",");
-                       if (!(xtproto && xtsrcip && xtdstport && xtenabled)) continue;
-
-                       if (xtdstip == NULL) xtdstip = strdup ("0.0.0.0");
-
-                       if (strcmp (portproto, xtproto) == 0 &&
-                                       strcmp (portsrcport, xtdstport) == 0 &&
-                                       strcmp (portsrcip, xtdstip) == 0) {
-                               portremip = strdup (xtsrcip);
-                               if ((strcmp (portremip, "0.0.0.0/0") == 0) && (count2 == 0)) {
-                                       sprintf (portdsttemp, "%d,%d,%s,%s,%s,%s,%s,%s,%s\n",
-                                               count, count2, portproto, portsrcport, portdstip,
-                                               portdstport, portenabled, portsrcip, portremip);
-                                       fputs(portdsttemp, portfw2);
-                               } else {
-                                       if (count2 == 0) {
-                                               sprintf (portdsttemp, "%d,%d,%s,%s,%s,%s,%s,%s,%d\n",
-                                                       count,count2,portproto, portsrcport, portdstip,
-                                                       portdstport, portenabled, portsrcip, 0);
-                                               fputs(portdsttemp, portfw2);
-                                               count2++;
-                                       }
-                                       sprintf (portdsttemp, "%d,%d,%s,%d,%s,%s,%s,%d,%s\n",
-                                               count,count2,portproto, 0, portdstip,
-                                               portdstport, portenabled, 0, portremip);
-                                       fputs(portdsttemp, portfw2);
-                               }
-                               count2++;
-                       } else {
-                               sprintf (xtdsttemp, "%s,%s,%s,%s,%s\n",
-                                       xtproto, xtsrcip, xtdstport, xtenabled, xtdstip);
-                               fputs(xtdsttemp, xtaccess2);
-                       }
-                }
-
-               /* Close source and destination xtaccess files */
-               fclose (xtaccess1);
-               fclose (xtaccess2);
-
-               /* Move the new xtaccess file */
-               rename ("/harddisk/var/ipfire/xtaccess/config.new",
-                       "/harddisk/var/ipfire/xtaccess/config");
-
-               /* If no external access line existed, add a no access line */
-               if (count2 == 0) {
-                       if (portremip == NULL) portremip = strdup ("127.0.0.1/32");
-
-                       /* Print new port forwarding line to file */
-                       sprintf (portdsttemp, "%d,%d,%s,%s,%s,%s,%s,%s,%s\n",
-                               count, count2, portproto, portsrcport, portdstip, 
-                               portdstport, portenabled, portsrcip, portremip);
-                       fputs(portdsttemp, portfw2);
-               }
-               count++;
-       }
-
-       /* Close source and destination portfw files */
-       fclose (portfw1);
-       fclose (portfw2);
-
-       /* Move the new portfw file */
-       rename ("/harddisk/var/ipfire/portfw/config.new",
-               "/harddisk/var/ipfire/portfw/config");
-       chown  ("/harddisk/var/ipfire/xtaccess/config", 99, 99);
-       chown  ("/harddisk/var/ipfire/portfw/config", 99, 99);
-
-       return 0;
-}
-
-int _convert_pulsardsl() {
-       DIR *dirp;
-       struct dirent *dp;
-       char filename[STRING_SIZE];
-       FILE *settings, *pulsardsl;
-       char line[STRING_SIZE];
-       
-       if (!(pulsardsl = fopen ("/harddisk/var/ipfire/pciadsl/settings", "r"))) return 1;
-       
-       dirp = opendir( "/harddisk/var/ipfire/ppp" );
-       while ( (dp = readdir( dirp )) != NULL ) {
-               if ( strstr( dp->d_name, "settings" ) == dp->d_name ) {
-                       snprintf (filename, STRING_SIZE-1, "%s/%s", 
-                               "/harddisk/var/ipfire/ppp", dp->d_name);
-                       if (!(settings = fopen (filename, "r+"))) {
-                               closedir(dirp);
-                               fclose(pulsardsl);
-                               return 1;
-                       }
-                       while (fgets (line, STRING_SIZE, settings) != NULL) {
-                               if (strstr (line, "TYPE=pulsardsl") == line) {
-                                       fseek(settings,0,SEEK_END);
-                                       rewind(pulsardsl);
-                                       while (fgets(line, STRING_SIZE, pulsardsl) != NULL) {
-                                               fputs (line, settings);
-                                       }
-                                       fclose (settings);
-                                       chown (filename, 99, 99);
-                               }
-                       }
-               }
-       }
-       fclose(pulsardsl);
-       (void) closedir( dirp );
-
-
-       return 0;
-}
-
-int _convert_pulsardsl_ethernet() {
-       DIR *dirp;
-       struct dirent *dp;
-       FILE *ethernet, *settings;
-       char line[STRING_SIZE];
-       char type[STRING_SIZE];
-       char ip[STRING_SIZE];
-       char filename[STRING_SIZE];
-       
-       if (!(ethernet = fopen ("/harddisk/var/ipfire/ethernet/settings", "r"))) return 1;
-
-       while (fgets (line, STRING_SIZE, ethernet) != NULL) {
-               if (strstr (line, "RED_DRIVER=pciadsl") == line) {
-                       rewind (ethernet);
-                       while (fgets (line, STRING_SIZE, ethernet) != NULL) {
-                               if (strstr (line, "RED_TYPE") == line) {
-                                       strcpy (type, line + 9*sizeof(char));
-                                       if (type[strlen(type) - 1] == '\n')
-                                               type[strlen(type) - 1] = '\0';
-                               }
-                               if (strstr (line, "RED_ADDRESS") == line) {
-                                       strcpy (ip, line + 12*sizeof(char));
-                                       if (ip[strlen(ip) - 1] == '\n')
-                                               type[strlen(ip) - 1] = '\0';
-                               }
-                               fclose (ethernet);
-
-                               replace ("/harddisk/var/ipfire/ethernet/settings", "RED_DEV=eth1", "RED_DEV=");
-                               replace ("/harddisk/var/ipfire/ethernet/settings", "CONFIG_TYPE=2", "CONFIG_TYPE=0");
-                               replace ("/harddisk/var/ipfire/ethernet/settings", "CONFIG_TYPE=3", "CONFIG_TYPE=1");
-                               replace ("/harddisk/var/ipfire/ethernet/settings", "RED_DEV=eth2", "RED_DEV=");
-                               chown ("/harddisk/var/ipfire/ethernet/settings", 99, 99);
-                               
-                               dirp = opendir( "/harddisk/var/ipfire/ppp" );
-                               while ( (dp = readdir( dirp )) != NULL ) {
-                                       if ( strstr( dp->d_name, "settings-" ) == dp->d_name ) {
-                                               snprintf (filename, STRING_SIZE-1, "%s/%s", 
-                                                       "/harddisk/var/ipfire/ppp", dp->d_name);
-                                               if (!(settings = fopen (filename, "r+"))) 
-                                               {
-                                                       closedir(dirp);
-                                                       return 1;
-                                               }
-                                               while (fgets (line, STRING_SIZE, settings) != NULL) {
-                                                       if (strstr (line, "TYPE=pulsardsl") == line) {
-                                                               fseek(settings,0,SEEK_END);
-                                                               fprintf (settings, "METHOD=%s\n", type);
-                                                               fprintf (settings, "IP=%s\n", ip);
-                                                               fclose (settings);
-                                                               chown (filename, 99, 99);
-                                                       }
-                                               }
-                                       }
-                               }
-                               (void) closedir( dirp );
-                       }
-               }
-       }
-
-       return 0;
-}
-
-int upgrade_v12_v13() {
-       struct stat s;
-       replace ("/harddisk/var/ipfire/ethernet/settings", "rtl8139", "8139too");
-       replace ("/harddisk/var/ipfire/vpn/ipsec.conf", "auto=add", "auto=start");
-       chown ("/harddisk/var/ipfire/vpn/ipsec.conf", 99, 99);
-       chown ("/harddisk/var/ipfire/ethernet/settings", 99, 99);
-       chown ("/harddisk/var/ipfire/main/settings", 99, 99);
-       _convert_ppp_settings();
-       _convert_xtaccess();
-       _convert_pulsardsl();
-       _convert_pulsardsl_ethernet();
-
-       /* Rename usbadsl directory */
-       stat ("/harddisk/var/ipfire/usbadsl", &s);
-       if (S_ISDIR(s.st_mode)) {
-               remove ("/harddisk/var/ipfire/usbadsl/settings");
-               if (! system("/bin/chroot /harddisk /bin/rm -rf /var/ipfire/alcatelusb"))
-                       rename ("/harddisk/var/ipfire/usbadsl", "/harddisk/var/ipfire/alcatelusb");
-       }
-       
-       /* Rename pciadsl module and directory */
-       remove ("/harddisk/var/ipfire/pulsar/settings");
-       rename ("/harddisk/var/ipfire/pciadsl/pciadsl.o", "/harddisk/var/ipfire/pciadsl/pulsar.o");
-       stat ("/harddisk/var/ipfire/pciadsl", &s);
-       if (S_ISDIR(s.st_mode)) {
-               if (! system("/bin/chroot /harddisk /bin/rm -rf /var/ipfire/pulsardsl"))
-                       rename ("/harddisk/var/ipfire/pciadsl", "/harddisk/var/ipfire/pulsardsl");
-       }
-
-       /* Change squid cache directory */
-       replace ("/harddisk/var/ipfire/proxy/squid.conf", "/var/spool/squid", "/var/log/cache");
-       chown ("/harddisk/var/ipfire/proxy/squid.conf", 99, 99);
-       
-       /* Change setup user shell */
-       replace ("/harddisk/etc/passwd", ":/usr/local/sbin/setup", ":/bin/bash -c /usr/local/sbin/setup");
-       
-       return 0;
-}
diff --git a/src/install+setup/install/upgrade-v130-v140.c b/src/install+setup/install/upgrade-v130-v140.c
deleted file mode 100644 (file)
index 1437877..0000000
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * This file is part of the IPCop Firewall.
- *
- * IPCop 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.
- *
- * IPCop 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 IPCop; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- * Copyright 2002: Mark Wormgoor <mark@wormgoor.com>
- * 
- * $Id: upgrade-v130-v140.c,v 1.12.2.35 2004/11/11 09:40:03 alanh Exp $
- * 
- */
-
-#include "install.h"
-
-extern char **ctr;
-int _handledomainname(void)
-{
-       char domainname[STRING_SIZE] = "localdomain";
-       struct keyvalue *kv = initkeyvalues();
-       char *values[] = { domainname, NULL };  /* pointers for the values. */
-       struct newtWinEntry entries[] =
-               { { "", &values[0], 0,}, { NULL, NULL, 0 } };
-       int rc;
-       int result;
-       
-       if (!(readkeyvalues(kv, "/harddisk" CONFIG_ROOT "/main/settings")))
-       {
-               freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
-               return 0;
-       }       
-       
-       findkey(kv, "DOMAINNAME", domainname);
-
-       /* already have a domainname */
-       if (strlen(domainname))
-               return 0;
-       
-       for (;;)
-       {       
-               rc = newtWinEntries(ctr[TR_DOMAINNAME], ctr[TR_ENTER_DOMAINNAME],
-                       50, 5, 5, 40, entries, ctr[TR_OK], ctr[TR_CANCEL], NULL);       
-               
-               if (rc == 1)
-               {
-                       strcpy(domainname, values[0]);
-                       if (strchr(domainname, ' '))
-                               errorbox(ctr[TR_DOMAINNAME_CANNOT_CONTAIN_SPACES]);
-                       else
-                       {                       
-                               replacekeyvalue(kv, "DOMAINNAME", domainname);
-                               writekeyvalues(kv, "/harddisk" CONFIG_ROOT "/main/settings");
-                               result = 1;
-                               break;
-                       }
-               }
-               else
-               {
-                       result = 0;
-                       break;
-               }
-       }
-       free(values[0]);
-       freekeyvalues(kv);
-       
-       return result;
-}      
-
-int _add_logwatch_user() {
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel logwatch");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel logwatch");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupadd -g 102 logwatch");
-       mysystem("/bin/chroot /harddisk /usr/sbin/useradd  -u 102 -g logwatch -d /var/log/logwatch -s /bin/false logwatch");
-    
-       return 0;
-}
-
-int _fixsquid() {
-       FILE *squidreadfile;
-       FILE *squidwritefile;
-       FILE *aclreadfile;
-       char hostname[STRING_SIZE] = "";
-       char domainname[STRING_SIZE] = "";
-       char squidtemp[STRING_SIZE];
-       struct keyvalue *kv = initkeyvalues();
-       int already_upgraded = 0;
-       int updated = 0;
-
-       if (!(squidreadfile = fopen ("/harddisk" CONFIG_ROOT "/proxy/squid.conf", "r"))) return 1;
-       if (!(squidwritefile = fopen ("/harddisk" CONFIG_ROOT "/proxy/squid.conf.new", "w"))) 
-       {
-               fclose(squidreadfile);
-               return 1;
-       }
-
-       if (!(readkeyvalues(kv, "/harddisk" CONFIG_ROOT "/main/settings")))
-       {
-               fclose (squidwritefile);
-               fclose (squidreadfile);
-               freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
-               return 1;
-       }
-
-       findkey(kv, "HOSTNAME", hostname);
-       findkey(kv, "DOMAINNAME", domainname);
-       freekeyvalues(kv);
-
-        while (fgets (squidtemp, STRING_SIZE, squidreadfile) != NULL) {
-               /* this will fail if we've already been upgraded, which is ok */
-               if (!strncmp(squidtemp, "reply_body_max_size 0 KB", 24)) {
-                       sprintf(squidtemp, "reply_body_max_size 0 allow all\n");
-               }
-               if (!strncmp(squidtemp, "cache_store_log /var/log/squid/store.log", 40)) {
-                       sprintf(squidtemp, "cache_store_log none\n");
-               }
-               fputs(squidtemp, squidwritefile);
-
-               /* so for us developers we skip already upgraded squiddies */
-               if (!strncmp(squidtemp, "visible_hostname", 16)) {
-                       already_upgraded = 1;
-               }
-
-               /* Check for the new acl's */
-               if (!strncmp(squidtemp, "__GREEN_IP__", 12)) {
-                       updated = 1;
-               }
-       }
-       if (!already_upgraded) {
-               sprintf(squidtemp, "visible_hostname %s.%s\n", hostname, domainname);
-               fputs(squidtemp, squidwritefile);
-       }
-
-       fclose (squidwritefile);
-       fclose (squidreadfile);
-
-       rename ("/harddisk" CONFIG_ROOT "/proxy/squid.conf.new",
-               "/harddisk" CONFIG_ROOT "/proxy/squid.conf");
-
-       replace("/harddisk" CONFIG_ROOT "/proxy/squid.conf", "cache_dir ufs", "cache_dir aufs");
-
-       if (!updated) {
-               rename ("/harddisk" CONFIG_ROOT "/proxy/acl",
-                       "/harddisk" CONFIG_ROOT "/proxy/acl.old");
-               rename ("/harddisk" CONFIG_ROOT "/proxy/acl-1.4",
-                       "/harddisk" CONFIG_ROOT "/proxy/acl");
-       } else {
-               if (!(aclreadfile = fopen ("/harddisk" CONFIG_ROOT "/proxy/acl", "r"))) {
-                       rename ("/harddisk" CONFIG_ROOT "/proxy/acl-1.4",
-                               "/harddisk" CONFIG_ROOT "/proxy/acl");
-               } else {
-                       unlink ("/harddisk" CONFIG_ROOT "/proxy/acl-1.4");
-                       fclose(aclreadfile);
-               }
-       }
-
-       chown  ("/harddisk" CONFIG_ROOT "/proxy/squid.conf", 99, 99);
-       chown  ("/harddisk" CONFIG_ROOT "/proxy/acl", 99, 99);
-       return 0;
-}
-
-int _fixeagleusb() {
-       FILE *eaglereadfile;
-       FILE *eaglewritefile;
-       char eagletemp[STRING_SIZE];
-       int already_upgraded = 0;
-
-       if (!(eaglereadfile  = fopen ("/harddisk" CONFIG_ROOT "/eagle-usb/eagle-usb.conf", "r"))) return 1;
-       if (!(eaglewritefile = fopen ("/harddisk" CONFIG_ROOT "/eagle-usb/eagle-usb.conf.new", "w"))) 
-       {
-               fclose(eaglereadfile);
-               return 1;
-       }
-
-        while (fgets (eagletemp, STRING_SIZE, eaglereadfile) != NULL) {
-               /* so for us developers we skip already upgraded configs */
-               if (!strncmp(eagletemp, "<eaglectrl>", 11)) {
-                       already_upgraded = 1;
-               }
-       }
-
-       rewind(eaglereadfile);
-       if (!already_upgraded)
-               fprintf(eaglewritefile, "<eaglectrl>\n");
-       while (fgets (eagletemp, STRING_SIZE, eaglereadfile) != NULL)
-               fputs(eagletemp, eaglewritefile);
-       if (!already_upgraded)
-               fprintf(eaglewritefile, "</eaglectrl>\n");
-
-       fclose (eaglewritefile);
-       fclose (eaglereadfile);
-
-       rename ("/harddisk" CONFIG_ROOT "/eagle-usb/eagle-usb.conf.new",
-               "/harddisk" CONFIG_ROOT "/eagle-usb/eagle-usb.conf");
-
-       replace("/harddisk" CONFIG_ROOT "/eagle-usb/eagle-usb.conf", "Linetype=00000001", "Linetype=0A");
-
-       chown  ("/harddisk" CONFIG_ROOT "/eagle-usb/eagle-usb.conf", 99, 99);
-       unlink("/harddisk" CONFIG_ROOT "/eagle-usb/dsp_code_pots.bin");
-       unlink("/harddisk" CONFIG_ROOT "/eagle-usb/dsp_code_isdn.bin");
-       return 0;
-}
-
-int _fixdhcp_30() {
-       FILE *dhcpreadfile;
-       FILE *dhcpwritefile;
-       char dhcptemp[STRING_SIZE];
-
-       if (!(dhcpreadfile = fopen ("/harddisk" CONFIG_ROOT "/dhcp/dhcpd.conf", "r"))) return 1;
-       if (!(dhcpwritefile = fopen ("/harddisk" CONFIG_ROOT "/dhcp/dhcpd.conf.new", "w"))) 
-       {
-               fclose(dhcpreadfile);
-               return 1;
-       }
-       fprintf (dhcpwritefile, "authoritative;\n");
-       fprintf (dhcpwritefile, "deny bootp;\n");
-       fprintf (dhcpwritefile, "ddns-update-style none;\n");
-       while (fgets (dhcptemp, STRING_SIZE, dhcpreadfile) != NULL) {
-               int write = 1;
-
-               /* so for us developers we skip already upgraded dhcp files */
-               if (!strncmp(dhcptemp, "authoritative", 13)) {
-                       write = 0;
-               }
-               /* so for us developers we skip already upgraded dhcp files */
-               if (!strncmp(dhcptemp, "ddns-update-style", 17)) {
-                       write = 0;
-               }
-               /* so for us developers we skip already upgraded dhcp files */
-               if (!strncmp(dhcptemp, "deny bootp", 10)) {
-                       write = 0;
-               }
-
-               if (write)
-                       fputs(dhcptemp, dhcpwritefile);
-       }
-
-       fclose(dhcpreadfile);
-       fclose(dhcpwritefile);
-
-       rename ("/harddisk" CONFIG_ROOT "/dhcp/dhcpd.conf.new",
-               "/harddisk" CONFIG_ROOT "/dhcp/dhcpd.conf");
-       chown  ("/harddisk" CONFIG_ROOT "/dhcp/dhcpd.conf", 99, 99);
-
-       /* This one will get converted again furthur down */
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "WINS=", "WINS1=");
-
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "START_ADDR=", "START_ADDR_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "END_ADDR=", "END_ADDR_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "DOMAIN_NAME=", "DOMAIN_NAME_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "DEFAULT_LEASE_TIME=", "DEFAULT_LEASE_TIME_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "MAX_LEASE_TIME=", "MAX_LEASE_TIME_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "DNS1=", "DNS1_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "DNS2=", "DNS2_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "WINS1=", "WINS1_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "WINS2=", "WINS2_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "ENABLE=", "ENABLE_GREEN=");
-       replace("/harddisk" CONFIG_ROOT "/dhcp/settings", "range dynamic-bootp", "range");
-       chown  ("/harddisk" CONFIG_ROOT "/dhcp/settings", 99, 99);
-
-       if ((dhcpreadfile = fopen ("/harddisk" CONFIG_ROOT "/dhcp/enable", "r")))
-       {
-               fclose(dhcpreadfile);
-               rename ("/harddisk" CONFIG_ROOT "/dhcp/enable",
-                       "/harddisk" CONFIG_ROOT "/dhcp/enable_green");
-               chown  ("/harddisk" CONFIG_ROOT "/dhcp/enable_green", 99, 99);
-       }
-
-       return 0;
-}
-
-int _add_sshd_user() {
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel sshd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel sshd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupadd -g 74 sshd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/useradd  -u 74 -g sshd -d /var/empty/sshd -s /bin/false -M sshd");
-    
-       return 0;
-}
-
-int _add_dnsmasq_user() {
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel dnsmasq");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel dnsmasq");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupadd -g 103 dnsmasq");
-       mysystem("/bin/chroot /harddisk /usr/sbin/useradd  -u 103 -g dnsmasq -d / -s /bin/false -M dnsmasq");
-    
-       return 0;
-}
-
-int _add_cron_user() {
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel cron");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel cron");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupadd -g 104 cron");
-       mysystem("/bin/chroot /harddisk /usr/sbin/useradd  -u 104 -g cron -d / -s /bin/false -M cron");
-    
-       return 0;
-}
-
-int _add_sysklogd_user() {
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel syslogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel syslogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupadd -g 105 syslogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/useradd  -u 105 -g syslogd -d / -s /bin/false -M syslogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel klogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel klogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupadd -g 106 klogd");
-       mysystem("/bin/chroot /harddisk /usr/sbin/useradd  -u 106 -g klogd -d / -s /bin/false -M klogd");
-    
-       return 0;
-}
-
-int _del_setup_user() {
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel setup");
-    
-       return 0;
-}
-
-int _create_nobody_dir(){
-       mysystem("/bin/chroot /harddisk /usr/sbin/usermod -d /home/nobody nobody");
-
-       return 0;
-}
-
-int _del_useless_user_group()
-{
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel games");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel games");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel news");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel news");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel ftp");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel gopher");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel lp");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel uucp");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel adm");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel adm");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel operator");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel sync");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel shutdown");
-       mysystem("/bin/chroot /harddisk /usr/sbin/userdel halt");
-       mysystem("/bin/chroot /harddisk /usr/sbin/groupdel man");
-       return 0;
-}
-
-void _del_pulsardsl_dir()
-{
-       mysystem("/bin/chroot /harddisk /bin/rm -rf " CONFIG_ROOT "/pulsardsl");
-}
-
-void _del_fritzdsl_dir()
-{
-       mysystem("/bin/chroot /harddisk /bin/rm -rf " CONFIG_ROOT "/fritzdsl");
-}
-
-int _convert_vpn() {
-       int count=1;
-       FILE *vpn1, *vpn2;
-       char vpnip[STRING_SIZE] = "";
-       char greennetaddr[STRING_SIZE] = "";
-       struct keyvalue *kv = initkeyvalues();
-       char vpnsrctemp[STRING_SIZE], vpndsttemp[STRING_SIZE];
-       char *name, *left, *left_nexthop, *left_subnet, *right, *right_nexthop, *right_subnet, *secret, *enabled, *compression;
-
-       if (!(vpn1 = fopen ("/harddisk" CONFIG_ROOT "/vpn/config", "r"))) return 1;
-       if (!(vpn2 = fopen ("/harddisk" CONFIG_ROOT "/vpn/config.new", "w"))) 
-       {
-               fclose(vpn1);
-               return 1;
-       }
-
-       if (!(readkeyvalues(kv, "/harddisk" CONFIG_ROOT "/ethernet/settings")))
-       {
-               fclose (vpn1);
-               fclose (vpn2);
-               freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
-               return 0;
-       }
-
-       findkey(kv, "GREEN_NETADDRESS", greennetaddr);
-       freekeyvalues(kv);
-
-       kv = initkeyvalues();
-       if (!(readkeyvalues(kv, "/harddisk" CONFIG_ROOT "/vpn/settings")))
-       {
-               fclose (vpn1);
-               fclose (vpn2);
-               freekeyvalues(kv);
-               errorbox(ctr[TR_UNABLE_TO_OPEN_SETTINGS_FILE]);
-               return 0;
-       }       
-       
-       /* if no VPN_IP is defined, we must turn it off to force the user
-        * to enter a value once upgraded */
-       findkey(kv, "VPN_IP", vpnip);
-       if (strlen(vpnip) == 0) {
-               replacekeyvalue(kv, "ENABLED", "off");
-               writekeyvalues(kv, "/harddisk" CONFIG_ROOT "/vpn/settings");
-       }
-       freekeyvalues(kv);
-
-        while (fgets (vpnsrctemp, STRING_SIZE, vpn1) != NULL) {
-               if (isdigit (vpnsrctemp[0])) {
-                       /* Already converted to new format */
-                       fputs(vpnsrctemp, vpn2);
-                       continue;
-               }
-
-               name          = NULL;
-               left          = NULL;
-               left_nexthop  = NULL;
-               left_subnet   = NULL;
-               right         = NULL;
-               right_nexthop = NULL;
-               right_subnet  = NULL;
-               secret        = NULL;
-               enabled       = NULL;
-               compression   = NULL;
-               
-               if (vpnsrctemp[strlen(vpnsrctemp) - 1] == '\n')
-                       vpnsrctemp[strlen(vpnsrctemp) - 1] = '\0';
-               name          = strtok (vpnsrctemp, ",");
-               left          = strtok (NULL, ",");
-               left_nexthop  = strtok (NULL, ",");
-               left_subnet   = strtok (NULL, ",");
-               right         = strtok (NULL, ",");
-               right_nexthop = strtok (NULL, ",");
-               right_subnet  = strtok (NULL, ",");
-               secret        = strtok (NULL, ",");
-               enabled       = strtok (NULL, ",");
-               compression   = strtok (NULL, ",");
-               if (!(name && left && left_subnet &&
-                       right && right_subnet &&
-                       secret && enabled && compression ))
-                       continue;
-
-               /* Try and guess what side IPCop is on; defaults to left */
-               if (strstr(greennetaddr, right_subnet)) {
-                       sprintf (vpndsttemp, "%d,%s,%s,,net,psk,%s,right,,%s,,%s,%s,,%s,,,,,,,,,,,,,RED\n",
-                                                       count, enabled, name, secret, right_subnet,
-                                                       left, left_subnet, compression);
-               } else {
-                       sprintf (vpndsttemp, "%d,%s,%s,,net,psk,%s,left,,%s,,%s,%s,,%s,,,,,,,,,,,,,RED\n",
-                                                       count, enabled, name, secret, left_subnet,
-                                                       right, right_subnet, compression);
-               }
-               fputs(vpndsttemp, vpn2);
-
-               count++;
-       }
-
-       /* Close source and destination vpn files */
-       fclose (vpn1);
-       fclose (vpn2);
-
-       /* Move the new vpn file */
-       rename ("/harddisk" CONFIG_ROOT "/vpn/config.new",
-               "/harddisk" CONFIG_ROOT "/vpn/config");
-       chown  ("/harddisk" CONFIG_ROOT "/vpn/config", 99, 99);
-
-       return 0;
-}
-
-void _convert_ppp_settings_V140() {
-       DIR *dirp;
-       struct dirent *dp;
-       char filename[STRING_SIZE];
-       
-       dirp = opendir( "/harddisk" CONFIG_ROOT "/ppp" );
-       while ( (dp = readdir( dirp )) != NULL ) {
-               if ( strstr( dp->d_name, "settings" ) == dp->d_name ) {
-                       snprintf (filename, STRING_SIZE-1, "%s/%s", 
-                               "/harddisk" CONFIG_ROOT "/ppp", dp->d_name);
-                       replace (filename, "PERSISTENT=on", "RECONNECTION=persistent");
-                       replace (filename, "DIALONDEMAND=on", "RECONNECTION=dialondemand");
-                       replace (filename, "MODULATION=GDTM", "MODULATION=GDMT");
-                       chown (filename, 99, 99);
-               }       
-       }
-       (void) closedir( dirp );
-}
-
-void _convert_net_settings_V140(){
-       replace ("/harddisk" CONFIG_ROOT "/ethernet/settings", "eepro100", "e100");
-       chown   ("/harddisk" CONFIG_ROOT "/ethernet/settings", 99, 99);
-}
-
-void _convert_keymap() {
-       replace("/harddisk" CONFIG_ROOT "/main/settings", "KEYMAP=/lib/kbd", "KEYMAP=/usr/share/kbd");
-       replace("/harddisk" CONFIG_ROOT "/main/settings", ".kmap.gz", ".map.gz");
-       chown  ("/harddisk" CONFIG_ROOT "/main/settings", 99, 99);
-}
-
-void _convert_speedtouch() {
-       FILE *speedtchbootfile;
-       FILE *speedtchfirmfile;
-
-       if (( speedtchfirmfile = fopen ("/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v4.bin", "r")))
-       {
-               fclose (speedtchfirmfile);
-               if  ((speedtchbootfile = fopen ("/harddisk" CONFIG_ROOT "/alcatelusb/boot.v4.bin", "r")))  {
-                       fclose (speedtchbootfile);
-                       system("/bin/cat /harddisk" CONFIG_ROOT "/alcatelusb/boot.v4.bin "
-                               "/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v4.bin"
-                               "> /harddisk" CONFIG_ROOT "/alcatelusb/firmware.v4_b.bin");
-                       remove ("/harddisk" CONFIG_ROOT "/alcatelusb/boot.v4.bin");
-                       remove ("/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v4.bin");
-                       chown ("/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v4_b.bin", 99, 99);
-               }
-       }
-
-       if (( speedtchfirmfile = fopen ("/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v123.bin", "r"))) {
-               fclose (speedtchfirmfile);
-               system("/bin/cat /harddisk" CONFIG_ROOT "/alcatelusb/boot.v123.bin "
-                       "/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v123.bin"
-                       "> /harddisk" CONFIG_ROOT "/alcatelusb/firmware.v0123.bin");
-               remove ("/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v123.bin");
-       }
-
-       remove ("/harddisk" CONFIG_ROOT "/alcatelusb/boot.v123.bin");
-
-       rename ("/harddisk" CONFIG_ROOT "/alcatelusb/mgmt.o", "/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v0123.bin");
-       chown ("/harddisk" CONFIG_ROOT "/alcatelusb/firmware.v0123.bin", 99, 99);
-}
-
-void _convert_isapnp() {
-       FILE *isapnpfile;
-
-       mkdir ("/harddisk" CONFIG_ROOT "/isapnp", S_IRWXU|S_IRWXG|S_IRWXO );
-       if (( isapnpfile = fopen ("/harddisk/etc/isapnp.conf", "r"))) {
-               fclose (isapnpfile);
-               rename ("/harddisk/etc/isapnp.conf", "/harddisk" CONFIG_ROOT "/isapnp/isapnp.conf");
-       } else {
-               if (( isapnpfile = fopen ("/harddisk" CONFIG_ROOT "/isapnp/isapnp.conf", "r"))) {
-                       fclose(isapnpfile);
-               } else {
-                       isapnpfile = fopen ("/harddisk" CONFIG_ROOT "/isapnp/isapnp.conf", "w");
-                       fclose(isapnpfile);
-               }
-       }
-}
-
-int upgrade_v130_v140() {
-       _del_setup_user();
-       _del_useless_user_group();
-       _add_logwatch_user();
-       _add_sshd_user();
-       _add_dnsmasq_user();
-       _add_cron_user();
-       _add_sysklogd_user();
-       _del_pulsardsl_dir();
-       _del_fritzdsl_dir();
-       _convert_vpn();
-       _handledomainname();
-       _fixsquid();
-       _fixeagleusb();
-       _create_nobody_dir();
-       _convert_ppp_settings_V140();
-       _convert_net_settings_V140();
-       _fixdhcp_30();
-       _convert_keymap();
-       _convert_speedtouch();
-       _convert_isapnp();
-
-       return 0;
-}
diff --git a/src/patches/kudzu-link-lintl.diff b/src/patches/kudzu-link-lintl.diff
new file mode 100644 (file)
index 0000000..ec3974c
--- /dev/null
@@ -0,0 +1,11 @@
+--- tmp/kudzu-1.2.60/Makefile  2006-09-05 15:56:21.000000000 +0200
++++ build/usr/src/kudzu-1.2.60/Makefile        2006-11-20 15:08:32.000000000 +0100
+@@ -63,7 +63,7 @@
+       $(RANLIB) libkudzu.a
+ kudzu: libkudzu.a $(KUDOBJS) po
+-      $(CC) $(CFLAGS) $(LDFLAGS) $(KUDOBJS) -o kudzu -L. -lkudzu -L. -lpci -Wl,-Bstatic -lpopt -Wl,-Bdynamic
++      $(CC) $(CFLAGS) $(LDFLAGS) $(KUDOBJS) -o kudzu -L. -lkudzu -L. -lpci -L. -lintl -Wl,-Bstatic -lpopt -Wl,-Bdynamic
+ module_upgrade: libkudzu.a module_upgrade.c
+       $(CC) $(CFLAGS) $(LDFLAGS) module_upgrade.c -o module_upgrade -L. -lkudzu -lpci
diff --git a/src/patches/kudzu-nodiet.patch b/src/patches/kudzu-nodiet.patch
new file mode 100644 (file)
index 0000000..e5f2801
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ruN kudzu-1.1.68.2.orig/Makefile kudzu-1.1.68.2/Makefile
+--- kudzu-1.1.68.2.orig/Makefile       2004-09-01 01:11:42.000000000 +0000
++++ kudzu-1.1.68.2/Makefile    2005-04-29 22:43:00.000000000 +0000
+@@ -52,7 +52,7 @@
+ LOADEROBJ += s390.o
+ endif
+-DIET = diet
++DIET = 
+ ifeq (i386,$(ARCH))
+ LOADEROBJS = $(patsubst %.o,%.do,$(LOADEROBJ))
+ else
diff --git a/src/patches/pciutils-2.1.10-scan.patch b/src/patches/pciutils-2.1.10-scan.patch
new file mode 100644 (file)
index 0000000..590c21d
--- /dev/null
@@ -0,0 +1,12 @@
+--- pciutils-2.1.10/lib/access.c.foo   Wed Feb 12 15:44:05 2003
++++ pciutils-2.1.10/lib/access.c       Wed Feb 12 15:44:33 2003
+@@ -180,7 +180,8 @@
+ void
+ pci_scan_bus(struct pci_access *a)
+ {
+-  a->methods->scan(a);
++  if (a->methods)
++    a->methods->scan(a);
+ }
+ struct pci_dev *
diff --git a/src/patches/pciutils-2.1.99-gcc4.patch b/src/patches/pciutils-2.1.99-gcc4.patch
new file mode 100644 (file)
index 0000000..43257d5
--- /dev/null
@@ -0,0 +1,17 @@
+Patch by Robert Scheck <redhat@linuxnetz.de> for pciutils >= 2.1.99, which make pciutils
+rebuildable using gcc 4.
+
+--- pciutils-2.1.99-test8/lib/i386-ports.c             2004-08-13 22:13:11.000000000 +0200
++++ pciutils-2.1.99-test8/lib/i386-ports.c.gcc4                2005-03-14 09:30:06.000000000 +0100
+@@ -57,9 +57,9 @@
+   for(d.dev = 0; d.dev < 32; d.dev++)
+     {
+       u16 class, vendor;
+-      if (m->read(&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
++      if ((m->read) (&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
+         (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST) || class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)) ||
+-        m->read(&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
++        (m->read) (&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
+         (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL) || vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))
+       {
+         a->debug("...outside the Asylum at 0/%02x/0", d.dev);
diff --git a/src/patches/pciutils-2.2.1-idpath.patch b/src/patches/pciutils-2.2.1-idpath.patch
new file mode 100644 (file)
index 0000000..62b57f0
--- /dev/null
@@ -0,0 +1,11 @@
+--- pciutils-2.2.1/Makefile.idpath     2006-02-23 12:24:12.000000000 +0100
++++ pciutils-2.2.1/Makefile    2006-02-23 12:24:18.000000000 +0100
+@@ -10,7 +10,7 @@
+ PREFIX=/usr/local
+ SBINDIR=$(PREFIX)/sbin
+ SHAREDIR=$(PREFIX)/share
+-IDSDIR=$(SHAREDIR)
++IDSDIR=$(SHAREDIR)/hwdata
+ MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
+ INSTALL=install
+ DIRINSTALL=install -d
diff --git a/src/patches/pciutils-2.2.3-multilib.patch b/src/patches/pciutils-2.2.3-multilib.patch
new file mode 100644 (file)
index 0000000..789dee5
--- /dev/null
@@ -0,0 +1,130 @@
+--- pciutils-2.2.3/lib/configure.multilib      2006-05-05 14:25:07.000000000 +0200
++++ pciutils-2.2.3/lib/configure       2006-05-23 15:50:16.000000000 +0200
+@@ -30,8 +30,37 @@
+ echo " $host $rel"
+ c=config.h
+-echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
+-echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
++cm=config.h.mk
++cat >$c <<EOF
++#if defined(__x86_64__)
++#define PCI_ARCH_X86_64
++#elif defined(__ia64__)
++#define PCI_ARCH_IA64
++#elif defined(__i386__)
++#define PCI_ARCH_I386
++#define PCI_HAVE_PM_INTEL_CONF
++#elif defined(__ppc64__) || defined(__powerpc64__)
++#define PCI_ARCH_PPC64
++#elif defined(__ppc__)  || defined(__powerpc__)
++#define PCI_ARCH_PPC
++#elif defined(__s390x__)
++#define PCI_ARCH_S390X
++#elif defined(__s390__)
++#define PCI_ARCH_S390
++#else
++#error Unknown Arch
++#endif
++#define PCI_OS_LINUX
++#define PCI_HAVE_PM_LINUX_SYSFS
++#define PCI_HAVE_PM_LINUX_PROC
++#define PCI_HAVE_LINUX_BYTEORDER_H
++#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"
++#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"
++#define PCI_HAVE_64BIT_ADDRESS
++EOF
++
++echo >$cm "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
++echo >>$cm "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
+ echo_n "Looking for access methods..."
+@@ -39,63 +68,22 @@
+       linux*)
+               case $rel in
+                       2.[1-9]*|[3-9]*)        echo_n " sysfs proc"
+-                                              echo >>$c '#define PCI_HAVE_PM_LINUX_SYSFS'
+-                                              echo >>$c '#define PCI_HAVE_PM_LINUX_PROC'
+-                                              echo >>$c '#define PCI_HAVE_LINUX_BYTEORDER_H'
+-                                              echo >>$c '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
+-                                              echo >>$c '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
+-                                              ok=1
+-                                              ;;
+-              esac
+-              case $cpu in
+-                              i386)           echo_n " i386-ports"
+-                                              echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
++                                              echo >>$cm '#define PCI_HAVE_PM_LINUX_SYSFS'
++                                              echo >>$cm '#define PCI_HAVE_PM_LINUX_PROC'
++                                              echo >>$cm '#define PCI_HAVE_LINUX_BYTEORDER_H'
++                                              echo >>$cm '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
++                                              echo >>$cm '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
+                                               ok=1
+                                               ;;
+               esac
+-              echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
+-              ;;
+-      sunos)
+               case $cpu in
+                               i386)           echo_n " i386-ports"
+-                                              echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
++                                              echo >>$cm '#define PCI_HAVE_PM_INTEL_CONF'
+                                               ok=1
+                                               ;;
+-                              *)
+-                                              echo " The PCI library is does not support Solaris for this architecture: $cpu"
+-                                              exit 1
+-                                              ;;
+               esac
+-              ;;
+-              
+-      freebsd)
+-              echo_n " fbsd-device"
+-              echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
+-              echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
+-              ok=1
+-              ;;
+-        openbsd)
+-              echo_n " obsd-device"
+-              echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
+-              echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
+-              ok=1
+-              ;;
+-      aix)
+-              echo_n " aix-device"
+-              echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
+-              ok=1
+-              ;;
+-      netbsd)
+-              echo_n " nbsd-libpci"
+-              echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI'
+-              echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
+-              ok=1
+-              ;;
+-      gnu)
+-              echo_n " i386-ports"
+-              echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
+-              ok=1
+-              ;;
++              echo >>$cm '#define PCI_HAVE_64BIT_ADDRESS'
++              ;;              
+         *)
+               echo " Unfortunately, your OS is not supported by the PCI Library"
+               exit 1
+@@ -103,10 +91,14 @@
+ esac
+ echo >>$c '#define PCI_HAVE_PM_DUMP'
++echo >>$cm '#define PCI_HAVE_PM_DUMP'
+ echo " dump"
+ if [ -z "$ok" ] ; then
+       echo "WARNING: No real configuration access method is available."
+ fi
+ echo >>$c "#define PCI_PATH_IDS \"$idsdir/pci.ids\""
+ echo >>$c "#define PCILIB_VERSION \"$version\""
+-sed '/^#define [^ ]*$/!d;s/^#define \(.*\)/\1=1/' <$c >config.mk
++
++echo >>$cm "#define PCI_PATH_IDS \"$idsdir/pci.ids\""
++echo >>$cm "#define PCILIB_VERSION \"$version\""
++sed '/^#define [^ ]*$/!d;s/^#define \(.*\)/\1=1/' <$cm >config.mk
diff --git a/src/patches/pciutils-2.2.3-sata.patch b/src/patches/pciutils-2.2.3-sata.patch
new file mode 100644 (file)
index 0000000..14f9f5e
--- /dev/null
@@ -0,0 +1,11 @@
+--- pciutils-2.2.3/lib/header.h.sata   2006-08-09 13:16:07.000000000 -0400
++++ pciutils-2.2.3/lib/header.h        2006-08-09 13:17:45.000000000 -0400
+@@ -855,6 +855,8 @@
+ #define PCI_CLASS_STORAGE_FLOPPY      0x0102
+ #define PCI_CLASS_STORAGE_IPI         0x0103
+ #define PCI_CLASS_STORAGE_RAID                0x0104
++#define PCI_CLASS_STORAGE_ATA         0x0105
++#define PCI_CLASS_STORAGE_SATA                0x0106
+ #define PCI_CLASS_STORAGE_OTHER               0x0180
+ #define PCI_BASE_CLASS_NETWORK                0x02
diff --git a/src/patches/pciutils-devicetype.patch b/src/patches/pciutils-devicetype.patch
new file mode 100644 (file)
index 0000000..87e45b4
--- /dev/null
@@ -0,0 +1,136 @@
+--- pciutils-2.2.1/lib/sysfs.c.devicetype      2005-09-21 07:51:00.000000000 -0400
++++ pciutils-2.2.1/lib/sysfs.c 2005-12-13 17:02:12.000000000 -0500
+@@ -164,7 +164,6 @@
+         sysfs_get_resources(d);
+         d->irq = sysfs_get_value(d, "irq");
+         d->known_fields = PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES;
+-#if 0
+         /*
+          *  We prefer reading these from the config registers, it's faster.
+          *  However, it would be possible and maybe even useful to hack the kernel
+@@ -173,8 +172,8 @@
+          */
+         d->vendor_id = sysfs_get_value(d, "vendor");
+         d->device_id = sysfs_get_value(d, "device");
+-        d->known_fields |= PCI_FILL_IDENT;
+-#endif
++        d->device_class = sysfs_get_value(d, "class") >> 8;
++        d->known_fields |= PCI_FILL_IDENT | PCI_FILL_CLASS;
+       }
+       pci_link_dev(a, d);
+     }
+--- pciutils-2.2.1/lib/pci.h.devicetype        2005-09-10 08:10:54.000000000 -0400
++++ pciutils-2.2.1/lib/pci.h   2005-12-13 17:02:12.000000000 -0500
+@@ -84,6 +84,7 @@
+   /* These fields are set by pci_fill_info() */
+   int known_fields;                   /* Set of info fields already known */
+   u16 vendor_id, device_id;           /* Identity of the device */
++  u16 device_class;                   /* PCI device class */
+   int irq;                            /* IRQ number */
+   pciaddr_t base_addr[6];             /* Base addresses */
+   pciaddr_t size[6];                  /* Region sizes */
+@@ -118,6 +119,7 @@
+ #define PCI_FILL_BASES                4
+ #define PCI_FILL_ROM_BASE     8
+ #define PCI_FILL_SIZES                16
++#define PCI_FILL_CLASS                32
+ #define PCI_FILL_RESCAN               0x10000
+ void pci_setup_cache(struct pci_dev *, u8 *cache, int len);
+--- pciutils-2.2.1/lib/generic.c.devicetype    2004-08-13 16:15:23.000000000 -0400
++++ pciutils-2.2.1/lib/generic.c       2005-12-13 17:02:12.000000000 -0500
+@@ -46,7 +46,8 @@
+         d->func = t->func;
+         d->vendor_id = vd & 0xffff;
+         d->device_id = vd >> 16U;
+-        d->known_fields = PCI_FILL_IDENT;
++        d->device_class = pci_read_byte(t,PCI_CLASS_DEVICE+1) << 8 | pci_read_byte(t, PCI_CLASS_DEVICE);
++        d->known_fields = PCI_FILL_IDENT | PCI_FILL_CLASS;
+         d->hdrtype = ht;
+         pci_link_dev(a, d);
+         switch (ht)
+@@ -86,6 +87,8 @@
+       d->vendor_id = pci_read_word(d, PCI_VENDOR_ID);
+       d->device_id = pci_read_word(d, PCI_DEVICE_ID);
+     }
++  if (flags & PCI_FILL_CLASS)
++      d->device_class = pci_read_byte(d, PCI_CLASS_DEVICE+1) << 8 | pci_read_byte(d, PCI_CLASS_DEVICE);
+   if (flags & PCI_FILL_IRQ)
+     d->irq = pci_read_byte(d, PCI_INTERRUPT_LINE);
+   if (flags & PCI_FILL_BASES)
+--- pciutils-2.2.1/lib/example.c.devicetype    2000-03-09 03:38:33.000000000 -0500
++++ pciutils-2.2.1/lib/example.c       2005-12-13 17:02:12.000000000 -0500
+@@ -21,7 +21,7 @@
+   pci_scan_bus(pacc);         /* We want to get the list of devices */
+   for(dev=pacc->devices; dev; dev=dev->next)  /* Iterate over all devices */
+     {
+-      pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES);    /* Fill in header info we need */
++      pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS);   /* Fill in header info we need */
+       c = pci_read_word(dev, PCI_CLASS_DEVICE);       /* Read config register directly */
+       printf("%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d base0=%lx\n",
+            dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id,
+--- pciutils-2.2.1/lspci.c.devicetype  2005-11-26 06:48:29.000000000 -0500
++++ pciutils-2.2.1/lspci.c     2005-12-13 17:04:39.000000000 -0500
+@@ -123,7 +123,7 @@
+       d->config_cached += 64;
+     }
+   pci_setup_cache(p, d->config, d->config_cached);
+-  pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
++  pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
+   return d;
+ }
+@@ -255,7 +255,7 @@
+   printf(" %s: %s",
+        pci_lookup_name(pacc, classbuf, sizeof(classbuf),
+                        PCI_LOOKUP_CLASS,
+-                       get_conf_word(d, PCI_CLASS_DEVICE)),
++                       p->device_class),
+        pci_lookup_name(pacc, devbuf, sizeof(devbuf),
+                        PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
+                        p->vendor_id, p->device_id));
+@@ -267,7 +267,7 @@
+       c = get_conf_byte(d, PCI_CLASS_PROG);
+       x = pci_lookup_name(pacc, devbuf, sizeof(devbuf),
+                         PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS,
+-                        get_conf_word(d, PCI_CLASS_DEVICE), c);
++                        p->device_class, c);
+       if (c || x)
+       {
+         printf(" (prog-if %02x", c);
+@@ -1585,7 +1585,7 @@
+   struct pci_dev *p = d->dev;
+   word status = get_conf_word(d, PCI_STATUS);
+   word cmd = get_conf_word(d, PCI_COMMAND);
+-  word class = get_conf_word(d, PCI_CLASS_DEVICE);
++  word class = p->device_class;
+   byte bist = get_conf_byte(d, PCI_BIST);
+   byte htype = get_conf_byte(d, PCI_HEADER_TYPE) & 0x7f;
+   byte latency = get_conf_byte(d, PCI_LATENCY_TIMER);
+@@ -1783,7 +1783,7 @@
+       show_slot_name(d);
+       putchar('\n');
+       printf("Class:\t%s\n",
+-           pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, get_conf_word(d, PCI_CLASS_DEVICE)));
++           pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, p->device_class));
+       printf("Vendor:\t%s\n",
+            pci_lookup_name(pacc, vendbuf, sizeof(vendbuf), PCI_LOOKUP_VENDOR, p->vendor_id, p->device_id));
+       printf("Device:\t%s\n",
+@@ -1805,7 +1805,7 @@
+       show_slot_name(d);
+       printf(" \"%s\" \"%s\" \"%s\"",
+            pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS,
+-                           get_conf_word(d, PCI_CLASS_DEVICE)),
++                           p->device_class),
+            pci_lookup_name(pacc, vendbuf, sizeof(vendbuf), PCI_LOOKUP_VENDOR,
+                            p->vendor_id, p->device_id),
+            pci_lookup_name(pacc, devbuf, sizeof(devbuf), PCI_LOOKUP_DEVICE,
+@@ -1929,7 +1929,7 @@
+   last_br = &host_bridge.chain;
+   for(d=first_dev; d; d=d->next)
+     {
+-      word class = get_conf_word(d, PCI_CLASS_DEVICE);
++      word class = d->dev->device_class;
+       byte ht = get_conf_byte(d, PCI_HEADER_TYPE) & 0x7f;
+       if (class == PCI_CLASS_BRIDGE_PCI &&
+         (ht == PCI_HEADER_TYPE_BRIDGE || ht == PCI_HEADER_TYPE_CARDBUS))
diff --git a/src/patches/pciutils-havepread.patch b/src/patches/pciutils-havepread.patch
new file mode 100644 (file)
index 0000000..56fbff3
--- /dev/null
@@ -0,0 +1,57 @@
+--- pciutils-2.1.99-test8/lib/pread.h.pread    2004-08-13 16:15:46.000000000 -0400
++++ pciutils-2.1.99-test8/lib/pread.h  2004-08-31 00:30:03.168157294 -0400
+@@ -12,54 +12,6 @@
+  *  don't define it.
+  */
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
+-/* glibc 2.1 or newer -> pread/pwrite supported automatically */
+-
+-#elif defined(i386) && defined(__GLIBC__)
+-/* glibc 2.0 on i386 -> call syscalls directly */
+-#include <asm/unistd.h>
+-#include <syscall-list.h>
+-#ifndef SYS_pread
+-#define SYS_pread 180
+-#endif
+-static int pread(unsigned int fd, void *buf, size_t size, loff_t where)
+-{ return syscall(SYS_pread, fd, buf, size, where); }
+-#ifndef SYS_pwrite
+-#define SYS_pwrite 181
+-#endif
+-static int pwrite(unsigned int fd, void *buf, size_t size, loff_t where)
+-{ return syscall(SYS_pwrite, fd, buf, size, where); }
+-
+-#elif defined(i386)
+-/* old libc on i386 -> call syscalls directly the old way */
+-#include <asm/unistd.h>
+-static _syscall5(int, pread, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi);
+-static _syscall5(int, pwrite, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi);
+-static int do_read(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pread(fd, buf, size, where, 0); }
+-static int do_write(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pwrite(fd, buf, size, where, 0); }
+-#define PCI_HAVE_DO_READ
+-
+-#else
+-/* In all other cases we use lseek/read/write instead to be safe */
+-#define make_rw_glue(op) \
+-      static int do_##op(struct pci_dev *d, int fd, void *buf, size_t size, int where)        \
+-      {                                                                                       \
+-        struct pci_access *a = d->access;                                                     \
+-        int r;                                                                                \
+-        if (a->fd_pos != where && lseek(fd, where, SEEK_SET) < 0)                             \
+-          return -1;                                                                          \
+-        r = op(fd, buf, size);                                                                \
+-        if (r < 0)                                                                            \
+-          a->fd_pos = -1;                                                                     \
+-        else                                                                                  \
+-          a->fd_pos = where + r;                                                              \
+-        return r;                                                                             \
+-      }
+-make_rw_glue(read)
+-make_rw_glue(write)
+-#define PCI_HAVE_DO_READ
+-#endif
+-
+ #ifndef PCI_HAVE_DO_READ
+ #define do_read(d,f,b,l,p) pread(f,b,l,p)
+ #define do_write(d,f,b,l,p) pwrite(f,b,l,p)
diff --git a/src/patches/pciutils-strip.patch b/src/patches/pciutils-strip.patch
new file mode 100644 (file)
index 0000000..19ca22e
--- /dev/null
@@ -0,0 +1,22 @@
+--- pciutils-2.1.99-test3/Makefile.strip       2004-02-25 01:46:14.315787866 -0500
++++ pciutils-2.1.99-test3/Makefile     2004-02-25 01:47:45.478046260 -0500
+@@ -32,7 +32,7 @@
+ all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
+ $(PCILIB): $(PCIINC) force
+-      $(MAKE) -C lib all
++      CFLAGS="$(CFLAGS) -fPIC" $(MAKE) -C lib all
+ force:
+--- pciutils-2.1.99-test8/Makefile.foo 2005-05-10 15:24:45.000000000 -0400
++++ pciutils-2.1.99-test8/Makefile     2005-05-10 15:24:50.000000000 -0400
+@@ -65,7 +65,7 @@
+ install: all
+ # -c is ignored on Linux, but required on FreeBSD
+       $(DIRINSTALL) -m 755 $(SBINDIR) $(IDSDIR) $(MANDIR)/man8
+-      $(INSTALL) -c -m 755 -s lspci setpci $(SBINDIR)
++      $(INSTALL) -c -m 755 lspci setpci $(SBINDIR)
+       $(INSTALL) -c -m 755 update-pciids $(SBINDIR)
+       $(INSTALL) -c -m 644 pci.ids $(IDSDIR)
+       $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(MANDIR)/man8