Zwischencommit fuer LFS.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 14 Oct 2006 12:43:29 +0000 (12:43 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 14 Oct 2006 12:43:29 +0000 (12:43 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@321 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

16 files changed:
doc/ChangeLog
lfs/apache2
lfs/arping
lfs/bind
lfs/capi4k-utils
lfs/cdrtools
lfs/dnsmasq
lfs/dosfstools
lfs/openldap
lfs/pam
lfs/php
lfs/subversion
make.sh
src/patches/cdrtools-2.01-ascii-2.patch [new file with mode: 0644]
src/patches/cdrtools-2.01-mkisofs_iconv-1.patch [new file with mode: 0644]
tools/make-functions

index 12e82c3..02a027e 100644 (file)
@@ -1,3 +1,60 @@
+------------------------------------------------------------------------
+r320 | ms | 2006-10-13 17:35:24 +0200 (Fri, 13 Oct 2006) | 2 lines
+
+Zwischencommit fuer LFS.
+
+------------------------------------------------------------------------
+r319 | ms | 2006-10-13 15:01:14 +0200 (Fri, 13 Oct 2006) | 2 lines
+
+Kleiner Fehler in Python.
+
+------------------------------------------------------------------------
+r318 | ms | 2006-10-13 13:51:11 +0200 (Fri, 13 Oct 2006) | 2 lines
+
+Zwischencommit fuer LFS.
+
+------------------------------------------------------------------------
+r317 | ms | 2006-10-12 22:44:44 +0200 (Thu, 12 Oct 2006) | 3 lines
+
+Zwischencommit fuer LFS.
+EXPERIMENTELLE KERNEL-KONFIGURATION.
+
+------------------------------------------------------------------------
+r316 | ms | 2006-10-12 19:34:35 +0200 (Thu, 12 Oct 2006) | 5 lines
+
+Hinzugefuegt:
+  * Net-Tools
+  * Inetutils
+  * Ed
+
+------------------------------------------------------------------------
+r315 | ms | 2006-10-12 17:57:24 +0200 (Thu, 12 Oct 2006) | 3 lines
+
+EXPERIMENTELLE Konfiguration fuer den Installer-Kernel.
+Die genaue Konfiguration wird am Entwicklertreffen festgelegt.
+
+------------------------------------------------------------------------
+r314 | ms | 2006-10-12 17:52:06 +0200 (Thu, 12 Oct 2006) | 4 lines
+
+Neues Verfahren fuer die Rootfiles.
+Alle liegen in einer einzelnen Datei und die 3 verschiedenen Version koennen unterschiedlich zusammengestellt werden.
+USB-Stick-Images mangels Notwendigkeit entfernt.
+
+------------------------------------------------------------------------
+r313 | ms | 2006-10-12 13:17:13 +0200 (Thu, 12 Oct 2006) | 2 lines
+
+Mehrere Tippfehler in lfs/linux beseitigt.
+
+------------------------------------------------------------------------
+r312 | ms | 2006-10-09 15:09:55 +0200 (Mon, 09 Oct 2006) | 2 lines
+
+Zwischencommit fuer LFS.
+
+------------------------------------------------------------------------
+r311 | ms | 2006-10-09 14:16:52 +0200 (Mon, 09 Oct 2006) | 2 lines
+
+Zwischencommit fuer LFS. Bis Kernel.
+
 ------------------------------------------------------------------------
 r310 | ms | 2006-10-09 00:55:09 +0200 (Mon, 09 Oct 2006) | 2 lines
 
index d4e176e..9581734 100644 (file)
@@ -32,7 +32,7 @@ THISAPP    = httpd-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
-ifeq "$(PASS)" "CONFIG"
+ifeq "$(PASS)" "C"
        TARGET     = $(DIR_INFO)/$(THISAPP)-config
 else
        TARGET     = $(DIR_INFO)/$(THISAPP)
@@ -78,7 +78,7 @@ $(subst %,%_MD5,$(objects)) :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-ifeq "$(PASS)" "CONFIG"
+ifeq "$(PASS)" "C"
        # DO THIS IN AN EXTRA STEP BECAUSE PHP AND SUBVERSION WILL FAIL.
 
        cp -rf $(DIR_CONF)/httpd/* /etc/httpd/conf
@@ -132,7 +132,7 @@ else
 
        cd $(DIR_APP) && ./configure --enable-layout=IPFire \
                                --enable-ssl --enable-mods-shared=all
-       cd $(DIR_APP) && make
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        chown -v root:root /usr/lib/apache/httpd.exp \
            /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
index 086969a..8281129 100644 (file)
@@ -72,7 +72,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && make
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && install -m 0755 arping /usr/sbin
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 4fac607..6ebe3e0 100644 (file)
--- a/lfs/bind
+++ b/lfs/bind
@@ -26,7 +26,7 @@
 
 include Config
 
-VER        = 9.2.5
+VER        = 9.3.2
 
 THISAPP    = bind-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 35a265fb97a068c066e22306ea32fd1f
+$(DL_FILE)_MD5 = 55e709501a7780233c36e25ccd15ece2
 
 install : $(TARGET)
 
@@ -73,12 +73,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
-       cd $(DIR_APP)/lib/isc && make
-       cd $(DIR_APP)/lib/dns && make
-       cd $(DIR_APP)/lib/lwres && make
-       cd $(DIR_APP)/bin/nsupdate && make
-       cd $(DIR_APP)/bin/dig && make
-       cd $(DIR_APP) && install -m 0755 bin/nsupdate/nsupdate /usr/bin
-       cd $(DIR_APP) && install -m 0755 bin/dig/host /usr/bin
+       cd $(DIR_APP) && make -C lib/dns $(MAKETUNING)
+       cd $(DIR_APP) && make -C lib/isc $(MAKETUNING)
+       cd $(DIR_APP) && make -C lib/bind9 $(MAKETUNING)
+       cd $(DIR_APP) && make -C lib/isccfg $(MAKETUNING)
+       cd $(DIR_APP) && make -C lib/lwres $(MAKETUNING)
+       cd $(DIR_APP) && make -C bin/dig $(MAKETUNING)
+       cd $(DIR_APP) && make -C bin/dig install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 02c2587..dd8d21e 100644 (file)
@@ -26,7 +26,7 @@
 
 include Config
 
-VER        = 2004-10-06
+VER        = 2005-07-18
 
 THISAPP    = capi4k-utils-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 54992ff362ca44629fdf59773a6864cd
+$(DL_FILE)_MD5 = c745759b6b3d64e19763727176648cdf
 
 install : $(TARGET)
 
@@ -72,20 +72,19 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/capi4k-utils-2004-10-06_ppp-2.4.3.patch
        cd $(DIR_APP)/avmb1 && ./configure
-       cd $(DIR_APP)/avmb1 && make
+       cd $(DIR_APP)/avmb1 && make $(MAKETUNING)
        cd $(DIR_APP)/avmb1 && make install
        cd $(DIR_APP)/capiinit && ./configure
-       cd $(DIR_APP)/capiinit && make
+       cd $(DIR_APP)/capiinit && make $(MAKETUNING)
        cd $(DIR_APP)/capiinit && make install
        cd $(DIR_APP)/capi20 && SED=sed ./configure
-       cd $(DIR_APP)/capi20 && SED=sed make
+       cd $(DIR_APP)/capi20 && SED=sed make $(MAKETUNING)
        cd $(DIR_APP)/capi20 && make install
-       PPPVER=`grep --max-count=1 VER $(DIR_SRC)/lfs/ppp | awk '{ print $$3 }'` && \
+       PPPVER=2.4.3 && \
                 cd $(DIR_APP)/pppdcapiplugin && PPPVERSIONS="$$PPPVER" make && PPPVERSIONS="$$PPPVER" make install
        cd $(DIR_APP)/capiinfo && ./configure
-       cd $(DIR_APP)/capiinfo && make
+       cd $(DIR_APP)/capiinfo && make $(MAKETUNING)
        cd $(DIR_APP)/capiinfo && make install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index a54fea2..e03fe3b 100644 (file)
@@ -72,6 +72,9 @@ $(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) && ./Gmake.linux GCCOPTOPT="-fno-stack-protector" INS_BASE=/usr install
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-mkisofs_iconv-1.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-ascii-2.patch
+       cd $(DIR_APP) && make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root $(MAKETUNING)
+       cd $(DIR_APP) && make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 77cc431..d831063 100644 (file)
@@ -75,7 +75,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP)/src && sed -i \
                -e 's|^\/\* #define HAVE_ISC_READER .*$$|#define HAVE_ISC_READER\n#define NO_IPV6|' \
                -e 's/^#define CHUSER .*$$/#define CHUSER "dnsmasq"/' config.h
-       cd $(DIR_APP) && make
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && PREFIX=/usr make install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index aca133c..13bdf34 100644 (file)
@@ -72,7 +72,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && make
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 376420d..34f7705 100644 (file)
@@ -30,7 +30,7 @@ VER        = 2.3.20
 
 THISAPP    = openldap-$(VER)
 DL_FILE    = $(THISAPP).tgz
-DL_FROM    = ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/openldap-release
+DL_FROM    = $(UTL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
@@ -52,9 +52,6 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
 
 md5 : $(subst %,%_MD5,$(objects))
 
-dist: 
-       make-packages.sh openldap $(THISAPP)
-
 ###############################################################################
 # Downloading, checking, md5sum
 ###############################################################################
@@ -75,29 +72,23 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && ./configure --prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/var/ipfire --localstatedir=/srv/ldap \
-                               --disable-debug \
-                               --enable-dynamic \
-                               --enable-crypt \
-                               --enable-modules \
-                               --enable-ldap \
-                               --enable-ldbm \
-                               --enable-dyngroup \
-                               --enable-dynlist \
-                               --enable-ppolicy \
-                               --enable-valsort \
-                               --disable-nls \
-                               --enable-perl \
-                               --enable-shell \
-                               --with-cyrus-sasl
+       cd $(DIR_APP) && ./configure --prefix=/usr \
+                           --libexecdir=/usr/sbin \
+                           --sysconfdir=/etc \
+                           --localstatedir=/srv/ldap \
+                           --disable-debug \
+                           --enable-dynamic \
+                           --enable-crypt \
+                           --enable-modules \
+                           --enable-ldap \
+                           --enable-ldbm \
+                           --enable-dyngroup \
+                           --enable-dynlist \
+                           --enable-ppolicy \
+                           --enable-valsort
        cd $(DIR_APP) && make depend
-       cd $(DIR_APP) && make
-#      cd $(DIR_APP) && make test
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
-       chmod -v 755 /usr/lib/libl*-2.3.*
-#      install -v -m755 -d /usr/share/doc/$(THISAPP)/{drafts,guide,rfc}
-#      install -v -m644 doc/drafts/* /usr/share/doc/$(THISAPP)/drafts
-#      install -v -m644 doc/rfc/*    /usr/share/doc/$(THISAPP)/rfc
-#      cp -v -R doc/guide/*          /usr/share/doc/$(THISAPP)/guide
+       chmod -v 755 /usr/lib/libl*-2.3.so.0.2.8
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/lfs/pam b/lfs/pam
index 58662dc..8fde8d0 100644 (file)
--- a/lfs/pam
+++ b/lfs/pam
 # 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 $
-#                                                                             #
 ###############################################################################
 
 ###############################################################################
 
 include Config
 
-VER        = 0.99.3.0
+VER        = 0.99.4.0
 
 THISAPP    = Linux-PAM-$(VER)
-DL_FILE    = $(THISAPP).tar.gz
-DL_FROM    = http://www.kernel.org/pub/linux/libs/pam/pre/library
+DL_FILE    = $(THISAPP).tar.bz2
+DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
@@ -48,7 +42,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = d1511e4e17746eb2e83ab284cca1204b
+$(DL_FILE)_MD5 = 267ea71253615342261f9fc486d06647
 
 install : $(TARGET)
 
@@ -77,19 +71,19 @@ $(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)
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/pam-0.99.3.0-hostname.patch
        cd $(DIR_APP) && ./configure --libdir=/usr/lib \
-                   --sbindir=/lib/security \
-                   --enable-securedir=/lib/security \
-                    --enable-docdir=/usr/share/doc/Linux-PAM-0.99.3.0 \
-                   --enable-read-both-confs --disable-nls
-       cd $(DIR_APP) && make
-       cd $(DIR_APP) && make check
+                           --sbindir=/lib/security \
+                           --enable-securedir=/lib/security \
+                           --enable-docdir=/usr/share/doc/Linux-PAM-$(VER) \
+                           --enable-read-both-confs --disable-nls
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
+       chmod -v 4755 /lib/security/unix_chkpwd
        mv -v /lib/security/pam_tally /sbin
        mv -v /usr/lib/libpam*.so.0* /lib
-       ln -v -sf ../../lib/libpam.so.0.81.2 /usr/lib/libpam.so
+       ln -v -sf ../../lib/libpam.so.0.81.3 /usr/lib/libpam.so
        ln -v -sf ../../lib/libpamc.so.0.81.0 /usr/lib/libpamc.so
        ln -v -sf ../../lib/libpam_misc.so.0.81.2 /usr/lib/libpam_misc.so
        -mkdir -p /etc/pam.d
diff --git a/lfs/php b/lfs/php
index fa0c76c..fa1c6fe 100644 (file)
--- a/lfs/php
+++ b/lfs/php
 
 include Config
 
-VER        = 5.1.4
+VER        = 4.4.4
 
 THISAPP    = php-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
-PROG       = php
-PAK_VER    = 1
 
 ###############################################################################
 # Top-level Rules
@@ -44,7 +42,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 66a806161d4a2d3b5153ebe4cd0f2e1c
+$(DL_FILE)_MD5 = bc6fa8908e2ac36e93bab9f7d42cda3a
 
 install : $(TARGET)
 
@@ -78,31 +76,14 @@ $(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/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c
-       cd $(DIR_APP) && ./configure --prefix=/usr \
-                           --sysconfdir=/etc \
-                           --with-apxs2 \
-                           --enable-force-cgi-redirect \
-                           --enable-discard-path \
-                           --with-config-file-path=/etc \
-                           --with-zlib \
-                           --enable-bcmath \
-                           --with-bz2 \
-                           --enable-calendar \
-                           --enable-dba \
-                           --enable-exif \
-                           --enable-ftp \
-                           --with-gettext \
-                           --enable-mbstring \
-                           --with-ncurses \
-                           --with-readline
-       cd $(DIR_APP) && make
+       cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc \
+                                           --with-apxs2 --with-config-file-path=/etc \
+                                           --with-zlib --with-bz2 --enable-ftp --with-gettext \
+                                           --with-iconv --with-mysql=/usr --with-ncurses
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        cd $(DIR_APP) && install -v -m644 php.ini-recommended /etc/php.ini
-       cd $(DIR_APP) && install -v -m755 -d /usr/share/doc/php-$(VER)
-       cd $(DIR_APP) && install -v -m644 CODING_STANDARDS EXTENSIONS INSTALL NEWS README* TODO* UPGRADING php.gif \
-                       /usr/share/doc/php-$(VER)
-       cd $(DIR_APP) && ln -v -sf /usr/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt /usr/share/doc/php-$(VER)
-       grep -v libphp5.so < /etc/httpd/conf/httpd.conf > /etc/httpd/conf/httpd.conf.bak
+       grep -v libphp4.so < /etc/httpd/conf/httpd.conf > /etc/httpd/conf/httpd.conf.bak
        mv -f /etc/httpd/conf/httpd.conf.bak /etc/httpd/conf/httpd.conf
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 90e0420..c9ef0ca 100644 (file)
@@ -82,7 +82,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                                --with-installbuilddir=/usr/lib/apr-0 \
                                --with-ssl --disable-nls \
                                --disable-mod-activation
-       cd $(DIR_APP) && make
+       cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index b208075..f2eb614 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -365,6 +365,7 @@ buildipfire() {
   ipfiremake expat
   ipfiremake gdbm
   ipfiremake gmp
+  ipfiremake pam
   ipfiremake openssl
   ipfiremake python
   ipfiremake libnet
@@ -385,12 +386,12 @@ buildipfire() {
   ipfiremake BerkeleyDB
   ipfiremake mysql
   ipfiremake cyrus-sasl
-exit 1
   ipfiremake openldap
+#  ipfiremake cyrus-sasl PASS=L # Doesn't work yet. Thereby there's the question: Do we really need this?
   ipfiremake apache2
   ipfiremake php
   ipfiremake subversion
-  ipfiremake apache2 PASS=CONFIG
+  ipfiremake apache2 PASS=C
   ipfiremake arping
   ipfiremake beep
   ipfiremake bind
@@ -398,6 +399,7 @@ exit 1
   ipfiremake cdrtools
   ipfiremake dnsmasq
   ipfiremake dosfstools
+exit 1
   ipfiremake ethtool
   ipfiremake ez-ipupdate
   ipfiremake fcron
@@ -476,7 +478,6 @@ exit 1
   ipfiremake openvpn
   ipfiremake pkg-config
   ipfiremake glib
-  ipfiremake pam
   ipfiremake pammysql
   ipfiremake saslauthd PASS=2
   ipfiremake xinetd
diff --git a/src/patches/cdrtools-2.01-ascii-2.patch b/src/patches/cdrtools-2.01-ascii-2.patch
new file mode 100644 (file)
index 0000000..6b6f22f
--- /dev/null
@@ -0,0 +1,139 @@
+Submitted By: Alexander E. Patrakov
+Date: 2006-06-05
+Initial Package Version: 2.01
+Upstream Status: Knows about a similar RedHat patch, ignores the issue
+Origin: Alexander E. Patrakov; RedHat does something very similar
+        Modified by Andy Benton to fix an issue with it not applying properly
+Description: Replaces hard-coded ISO-8859-1 with ASCII approximations
+To regenerate:
+
+for F in cdrecord/cdrecord.c cdrecord/diskid.c cdrecord/sector.c \
+    readcd/readcd.c scgcheck/scgcheck.c scgskeleton/skel.c ; do
+    LC_ALL=de_DE iconv -f ISO-8859-1 -t US-ASCII//TRANSLIT $F >tmp
+    mv tmp $F
+done
+
+and remove hunks that modify comments.
+
+RedHat converts to UTF-8 instead, but this is unacceptable for LFS because
+not everyone uses UTF-8 based locales.
+
+$Id: cdrtools-2.01-ascii-2.patch 1553 2006-06-05 12:05:57Z randy $
+
+
+diff -urN cdrtools-2.01.orig/cdrecord/cdrecord.c cdrtools-2.01/cdrecord/cdrecord.c
+--- cdrtools-2.01.orig/cdrecord/cdrecord.c     2004-09-08 23:26:35.000000000 +0600
++++ cdrtools-2.01/cdrecord/cdrecord.c  2006-02-13 10:17:29.000000000 +0500
+@@ -297,7 +297,7 @@
+        *
+        * Warning: you are not allowed to modify or to remove the
+        * Copyright and version printing code below!
+-       * See also GPL § 2 subclause c)
++       * See also GPL paragraph 2 subclause c)
+        *
+        * If you modify cdrecord you need to include additional version
+        * printing code that:
+@@ -349,7 +349,7 @@
+ #     define  CLONE_TITLE     ""
+ #endif
+       if ((flags & F_MSINFO) == 0 || lverbose || flags & F_VERSION) {
+-              printf("Cdrecord%s%s %s (%s-%s-%s) Copyright (C) 1995-2004 Jörg Schilling\n",
++              printf("Cdrecord%s%s %s (%s-%s-%s) Copyright (C) 1995-2004 Joerg Schilling\n",
+                                                               PRODVD_TITLE,
+                                                               CLONE_TITLE,
+                                                               cdr_version,
+@@ -1651,7 +1651,7 @@
+       error("\t-xamix         Subsequent tracks are CD-ROM XA mode 2 form 1/2 - 2332 bytes\n");
+       error("\t-cdi           Subsequent tracks are CDI tracks\n");
+       error("\t-isosize       Use iso9660 file system size for next data track\n");
+-      error("\t-preemp                Audio tracks are mastered with 50/15 µs preemphasis\n");
++      error("\t-preemp                Audio tracks are mastered with 50/15 us preemphasis\n");
+       error("\t-nopreemp      Audio tracks are mastered with no preemphasis (default)\n");
+       error("\t-copy          Audio tracks have unlimited copy permission\n");
+       error("\t-nocopy                Audio tracks may only be copied once for personal use (default)\n");
+diff -urN cdrtools-2.01.orig/cdrecord/diskid.c cdrtools-2.01/cdrecord/diskid.c
+--- cdrtools-2.01.orig/cdrecord/diskid.c       2004-03-02 06:14:38.000000000 +0500
++++ cdrtools-2.01/cdrecord/diskid.c    2006-02-13 10:17:35.000000000 +0500
+@@ -112,8 +112,8 @@
+ LOCAL char    m_grandadv[]    = "Grand Advance Technology Ltd.";
+ LOCAL char    m_digitalstor[] = "DIGITAL STORAGE TECHNOLOGY CO.,LTD";
+ LOCAL char    m_matsushita[]  = "Matsushita Electric Industrial Co.,Ltd.";
+-LOCAL char    m_albrechts[]   = "CDA Datenträger Albrechts GmbH.";
+-LOCAL char    m_xalbrechts[]  = "??? CDA Datenträger Albrechts GmbH.";
++LOCAL char    m_albrechts[]   = "CDA Datentraeger Albrechts GmbH.";
++LOCAL char    m_xalbrechts[]  = "??? CDA Datentraeger Albrechts GmbH.";
+ LOCAL char    m_prodisc[]     = "Prodisc Technology Inc.";
+ LOCAL char    m_postech[]     = "POSTECH Corporation";
+@@ -150,7 +150,7 @@
+       {{97, 27, 00}, 81, "ILLEGAL OLD CODE: Old Ritek Co.???" },
+       {{97, 27, 25},  0, m_ill },
+       {{97, 30, 00},  0, m_ill },
+-      {{97, 33, 00}, 82, "ILLEGAL OLD CODE: Old CDA Datenträger Albrechts GmbH." },
++      {{97, 33, 00}, 82, "ILLEGAL OLD CODE: Old CDA Datentraeger Albrechts GmbH." },
+       {{97, 35, 44},  0, m_ill },
+       {{97, 39, 00},  0, m_ill },
+       {{97, 45, 36}, 83, "ILLEGAL OLD CODE: Old Kodak Photo CD" },
+diff -urN cdrtools-2.01.orig/cdrecord/sector.c cdrtools-2.01/cdrecord/sector.c
+--- cdrtools-2.01.orig/cdrecord/sector.c       2004-03-01 14:19:13.000000000 +0500
++++ cdrtools-2.01/cdrecord/sector.c    2006-02-13 10:17:36.000000000 +0500
+@@ -125,7 +125,7 @@
+                       break;
+       }
+       if (be_verbose) {
+-              printf("Encoding speed : %dx (%d sectors/s) for libedc from Heiko Eißfeldt\n",
++              printf("Encoding speed : %dx (%d sectors/s) for libedc from Heiko Eissfeldt\n",
+                               (i+74)/75, i);
+       }
+       return ((i+74)/75);
+diff -urN cdrtools-2.01.orig/readcd/readcd.c cdrtools-2.01/readcd/readcd.c
+--- cdrtools-2.01.orig/readcd/readcd.c 2004-09-08 23:24:14.000000000 +0600
++++ cdrtools-2.01/readcd/readcd.c      2006-02-13 10:17:37.000000000 +0500
+@@ -296,7 +296,7 @@
+       if (help)
+               usage(0);
+       if (pversion) {
+-              printf("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Jörg Schilling\n",
++              printf("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Joerg Schilling\n",
+                                                               cdr_version,
+                                                               HOST_CPU, HOST_VENDOR, HOST_OS);
+               exit(0);
+diff -urN cdrtools-2.01.orig/scgcheck/scgcheck.c cdrtools-2.01/scgcheck/scgcheck.c
+--- cdrtools-2.01.orig/scgcheck/scgcheck.c     2004-09-08 23:49:48.000000000 +0600
++++ cdrtools-2.01/scgcheck/scgcheck.c  2006-02-13 10:17:38.000000000 +0500
+@@ -129,7 +129,7 @@
+       if (help)
+               usage(0);
+       if (pversion) {
+-              printf("scgckeck %s (%s-%s-%s) Copyright (C) 1998-2002 Jörg Schilling\n",
++              printf("scgckeck %s (%s-%s-%s) Copyright (C) 1998-2002 Joerg Schilling\n",
+                                                               scgc_version,
+                                                               HOST_CPU, HOST_VENDOR, HOST_OS);
+               exit(0);
+@@ -153,11 +153,11 @@
+               comerr("Cannot open logfile.\n");
+       printf("Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\
+-Copyright (C) 1998,2001 Jörg Schilling\n",
++Copyright (C) 1998,2001 Joerg Schilling\n",
+                                               scgc_version,
+                                               HOST_CPU, HOST_VENDOR, HOST_OS);
+       fprintf(logfile, "Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\
+-Copyright (C) 1998,2001 Jörg Schilling\n",
++Copyright (C) 1998,2001 Joerg Schilling\n",
+                                               scgc_version,
+                                               HOST_CPU, HOST_VENDOR, HOST_OS);
+       /*
+diff -urN cdrtools-2.01.orig/scgskeleton/skel.c cdrtools-2.01/scgskeleton/skel.c
+--- cdrtools-2.01.orig/scgskeleton/skel.c      2004-07-11 04:57:27.000000000 +0600
++++ cdrtools-2.01/scgskeleton/skel.c   2006-02-13 10:17:39.000000000 +0500
+@@ -155,7 +155,7 @@
+       if (help)
+               usage(0);
+       if (pversion) {
+-              printf("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Jörg Schilling\n",
++              printf("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Joerg Schilling\n",
+                                                               skel_version,
+                                                               HOST_CPU, HOST_VENDOR, HOST_OS);
+               exit(0);
diff --git a/src/patches/cdrtools-2.01-mkisofs_iconv-1.patch b/src/patches/cdrtools-2.01-mkisofs_iconv-1.patch
new file mode 100644 (file)
index 0000000..4f47533
--- /dev/null
@@ -0,0 +1,629 @@
+Submitted By: Alexander E. Patrakov
+Date: 2005-09-30
+Initial Package Version: 2.01
+Origin: RedHat (but maybe they initially obtained the patch from elsewhere)
+Upstream Status: Not applied
+Description: Allows one to specify any glibc-supported source charset
+for Joliet filenames, instead of the very limited choice offered by mkisofs
+itself. Required for writing Windows-readable data CDs in UTF-8 locales when
+filenames contain national characters.
+
+diff -urN --exclude-from=- cdrtools-2.01/include/unls.h cdrtools-2.01-jh/include/unls.h
+--- cdrtools-2.01/include/unls.h       2003-06-16 00:41:23.000000000 +0300
++++ cdrtools-2.01-jh/include/unls.h    2004-02-02 18:31:22.000000000 +0200
+@@ -30,6 +30,10 @@
+ #include <prototyp.h>
+ #endif
++#ifdef USE_ICONV
++#include <iconv.h>
++#endif
++
+ #ifdef        __cplusplus
+ extern "C" {
+ #endif
+@@ -43,6 +47,9 @@
+       char *charset;
+       unsigned char **page_uni2charset;
+       struct nls_unicode *charset2uni;
++#ifdef USE_ICONV
++      iconv_t iconv_d;
++#endif
+       void (*inc_use_count)   __PR((void));
+       void (*dec_use_count)   __PR((void));
+@@ -58,6 +65,9 @@
+ extern void           unload_nls              __PR((struct nls_table *));
+ extern struct nls_table *load_nls_default     __PR((void));
+ extern int            init_nls_file           __PR((char * name));
++#ifdef USE_ICONV
++extern int            init_nls_iconv          __PR((char * name));
++#endif
+ #ifdef        __cplusplus
+ }
+diff -urN --exclude-from=- cdrtools-2.01/libunls/libunls.mk cdrtools-2.01-jh/libunls/libunls.mk
+--- cdrtools-2.01/libunls/libunls.mk   2000-03-25 14:51:56.000000000 +0200
++++ cdrtools-2.01-jh/libunls/libunls.mk        2004-02-02 18:31:22.000000000 +0200
+@@ -8,6 +8,7 @@
+ INSDIR=               lib
+ TARGETLIB=    unls
+ #CPPOPTS +=   -Istdio
++CPPOPTS +=    -DUSE_ICONV
+ include               Targets
+ LIBS=         
+diff -urN --exclude-from=- cdrtools-2.01/libunls/nls.h cdrtools-2.01-jh/libunls/nls.h
+--- cdrtools-2.01/libunls/nls.h        2002-12-03 02:34:27.000000000 +0200
++++ cdrtools-2.01-jh/libunls/nls.h     2004-02-02 18:31:22.000000000 +0200
+@@ -111,5 +111,8 @@
+ extern int init_nls_cp10079   __PR((void));
+ extern int init_nls_cp10081   __PR((void));
+ extern int init_nls_file      __PR((char * name));
++#ifdef USE_ICONV
++extern int init_nls_iconv     __PR((char * name));
++#endif
+ #endif        /* _NLS_H */
+diff -urN --exclude-from=- cdrtools-2.01/libunls/nls_iconv.c cdrtools-2.01-jh/libunls/nls_iconv.c
+--- cdrtools-2.01/libunls/nls_iconv.c  1970-01-01 02:00:00.000000000 +0200
++++ cdrtools-2.01-jh/libunls/nls_iconv.c       2004-02-02 18:31:22.000000000 +0200
+@@ -0,0 +1,96 @@
++/* @(#)nls_iconv.c    1.0 02/04/20 2002 J. Schilling  */
++#ifndef lint
++static        char sccsid[] =
++      "@(#)nls_iconv.c        1.0 02/01/20 2002 J. Schilling";
++#endif
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; see the file COPYING.  If not, write to
++ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++/*
++ *    Modifications to make the code portable Copyright (c) 2000 J. Schilling
++ *
++ * nls_iconv: create a pseudo-charset table to use iconv() provided by C
++ * library or libiconv by Bruno Haible
++ * The Unicode to charset table has only exact mappings.
++ *
++ *
++ * Jungshik Shin (jshin@mailaps.org) 04-Feb-2002
++ */
++
++#ifdef USE_ICONV
++#include <mconfig.h>
++#include <stdio.h>
++#include <stdxlib.h>
++#include <strdefs.h>
++#include "nls.h"
++#include <iconv.h>
++
++static void   inc_use_count   __PR((void));
++static void   dec_use_count   __PR((void));
++
++
++static void
++inc_use_count()
++{
++      MOD_INC_USE_COUNT;
++}
++
++static void
++dec_use_count()
++{
++      MOD_DEC_USE_COUNT;
++}
++
++int
++init_nls_iconv(charset)
++      char    *charset;
++{
++      iconv_t iconv_d;  /* iconv conversion descriptor */
++      struct nls_table *table;
++
++      /* give up if no charset is given */
++      if (charset == NULL)
++              return -1;
++
++      /* see if we already have a table with this name - built in tables
++         have precedence over iconv() - i.e. can't have the name of an
++         existing table. Also, we may have already registered this file
++         table */
++      if (find_nls(charset) != NULL)
++              return -1;
++
++      if ((iconv_d = iconv_open("UCS-2BE", charset)) == (iconv_t) -1)
++              return -1;
++
++
++      /* set up the table */
++      if ((table = (struct nls_table *)malloc(sizeof (struct nls_table)))
++                                                      == NULL) {
++              return -1;
++      }
++
++      /* give the table the file name, so we can find it again if needed */
++      table->charset = strdup(charset);
++      table->iconv_d = iconv_d;
++      table->page_uni2charset = NULL;
++      table->charset2uni = NULL;
++      table->inc_use_count = inc_use_count;
++      table->dec_use_count = dec_use_count;
++      table->next = NULL;
++
++      /* register the table */
++      return register_nls(table);
++}
++#endif
+diff -urN --exclude-from=- cdrtools-2.01/libunls/Targets cdrtools-2.01-jh/libunls/Targets
+--- cdrtools-2.01/libunls/Targets      2002-12-03 02:34:27.000000000 +0200
++++ cdrtools-2.01-jh/libunls/Targets   2004-02-02 18:31:22.000000000 +0200
+@@ -39,4 +39,5 @@
+       nls_cp10029.c \
+       nls_cp10079.c \
+       nls_cp10081.c \
+-      nls_file.c
++      nls_file.c \
++      nls_iconv.c
+diff -urN --exclude-from=- cdrtools-2.01/mkisofs/joliet.c cdrtools-2.01-jh/mkisofs/joliet.c
+--- cdrtools-2.01/mkisofs/joliet.c     2003-04-28 01:36:08.000000000 +0300
++++ cdrtools-2.01-jh/mkisofs/joliet.c  2004-02-03 14:15:17.000000000 +0200
+@@ -90,6 +90,11 @@
+ #include <unls.h>     /* For UNICODE translation */
+ #include <schily.h>
++#ifdef USE_ICONV
++#include <iconv.h>
++#include <errno.h>
++#endif
++
+ static Uint   jpath_table_index;
+ static struct directory **jpathlist;
+ static int    next_jpath_index = 1;
+@@ -103,13 +108,23 @@
+ };
+ #ifdef        UDF
+-      void    convert_to_unicode      __PR((unsigned char *buffer,
++#     ifdef USE_ICONV
++      size_t
++#     else
++      void
++#     endif
++              convert_to_unicode      __PR((unsigned char *buffer,
+               int size, char *source, struct nls_table *inls));
+-      int     joliet_strlen           __PR((const char *string));
++      int     joliet_strlen           __PR((const char *string, struct nls_table *inls));
+ #else
+-static void   convert_to_unicode      __PR((unsigned char *buffer,
++#     ifdef USE_ICONV
++      static size_t
++#     else
++      static void
++#endif
++              convert_to_unicode      __PR((unsigned char *buffer,
+               int size, char *source, struct nls_table *inls));
+-static int    joliet_strlen           __PR((const char *string));
++static int    joliet_strlen           __PR((const char *string, struct nls_table *inls));
+ #endif
+ static void   get_joliet_vol_desc     __PR((struct iso_primary_descriptor *jvol_desc));
+ static void   assign_joliet_directory_addresses __PR((struct directory *node));
+@@ -161,6 +176,20 @@
+       if (inls == onls)
+               return (c);
++#ifdef USE_ICONV
++      if(inls->charset2uni == NULL || onls->page_uni2charset == NULL) {
++              /*
++               * This shouldn't be reached
++               */
++              static BOOL iconv_warned = FALSE;
++              if(!iconv_warned) {
++                      error("Warning: Iconv conversion not supported in conv_charset.\n");
++                      iconv_warned = TRUE;
++              }
++              return (c);
++      }
++#endif
++
+       /* get high and low UNICODE bytes */
+       uh = inls->charset2uni[c].uni2;
+       ul = inls->charset2uni[c].uni1;
+@@ -186,10 +215,18 @@
+  *
+  * Notes:
+  */
+-#ifdef        UDF
+-void
++#ifdef USE_ICONV
++#     if      UDF
++size_t
++#     else
++static size_t
++#     endif
+ #else
++#     if      UDF
++void
++#     else
+ static void
++#     endif
+ #endif
+ convert_to_unicode(buffer, size, source, inls)
+       unsigned char   *buffer;
+@@ -216,6 +253,51 @@
+               tmpbuf = (Uchar *) source;
+       }
++#ifdef USE_ICONV
++      if (inls->iconv_d && inls->charset2uni==NULL &&
++                      inls->page_uni2charset==NULL) {
++              char *inptr = tmpbuf;
++              char *outptr = buffer;
++              size_t inleft = strlen(tmpbuf);
++              size_t inlen = inleft;
++              size_t outleft = size;
++
++              iconv(inls->iconv_d, NULL, NULL, NULL, NULL);
++              if(iconv(inls->iconv_d, &inptr, &inleft, &outptr, &outleft) ==
++                              (size_t)-1 && errno == EILSEQ) {
++                      fprintf(stderr, "Incorrectly encoded string (%s) "
++                              "encountered.\nPossibly creating an invalid "
++                              "Joliet extension. Aborting.\n", source);
++                      exit(1);
++              }
++
++              for (i = 0; (i + 1) < size - outleft; i += 2) { /* Size may be odd!!!*/
++                      if (buffer[i]=='\0') {
++                              switch (buffer[i+1]) {   /* Invalid characters for Joliet */
++                                      case '*':
++                                      case '/':
++                                      case ':':
++                                      case ';':
++                                      case '?':
++                                      case '\\':
++                                              buffer[i+1]='_';
++                                      default:
++                                              if (buffer[i+1] == 0x7f ||
++                                                          buffer[i+1] < 0x20)
++                                                      buffer[i+1]='_';
++                              }
++                      }
++              }
++              if (size & 1) { /* beautification */
++                      buffer[size - 1] = 0;
++              }
++              if (source == NULL) {
++                      free(tmpbuf);
++              }
++              return (inlen - inleft);
++      }
++#endif
++
+       /*
+        * Now start copying characters.  If the size was specified to be 0,
+        * then assume the input was 0 terminated.
+@@ -271,6 +353,9 @@
+       if (source == NULL) {
+               free(tmpbuf);
+       }
++#ifdef USE_ICONV
++      return j;
++#endif
+ }
+ /*
+@@ -287,12 +372,50 @@
+ #else
+ static int
+ #endif
+-joliet_strlen(string)
++joliet_strlen(string, inls)
+       const char      *string;
++      struct nls_table *inls;
+ {
+       int             rtn;
++#ifdef USE_ICONV
++      if (inls->iconv_d && inls->charset2uni==NULL &&
++                      inls->page_uni2charset==NULL) {
++              /*
++               * we const-cast since we're sure iconv won't change
++               * the string itself
++               */
++              char *string_ptr = (char *)string;
++              size_t string_len = strlen(string);
++
++              /*
++               * iconv has no way of finding out the required size
++               * in the target
++               */
++
++              char *tmp, *tmp_ptr;
++              /* we assume that the maximum length is 2 * jlen */
++              size_t tmp_len = (size_t)jlen * 2 + 1;
++              tmp = e_malloc(tmp_len);
++              tmp_ptr = tmp;
++
++              iconv(inls->iconv_d, NULL, NULL, NULL, NULL);
++              iconv(inls->iconv_d, &string_ptr, &string_len, &tmp_ptr,
++                      &tmp_len);
++
++              /*
++               * iconv advanced the tmp pointer with as many chars
++               * as it has written to it, so we add up the delta
++               */
++              rtn = (tmp_ptr - tmp);
++
++              free(tmp);
++      } else {
++              rtn = strlen(string) << 1;
++      }
++#else
+       rtn = strlen(string) << 1;
++#endif
+       /*
+        * We do clamp the maximum length of a Joliet string to be the
+@@ -480,16 +603,33 @@
+       /* compare the Unicode names */
+       while (*rpnt && *lpnt) {
++#ifdef USE_ICONV
++              size_t ri, li;
++
++              ri = convert_to_unicode(rtmp, 2, rpnt, rinls);
++              li = convert_to_unicode(ltmp, 2, lpnt, linls);
++              rpnt += ri;
++              lpnt += li;
++              if(!ri && !li)
++                      return (0);
++              else if(ri && !li)
++                      return (1);
++              else if(!ri && li)
++                      return (-1);
++#else
+               convert_to_unicode(rtmp, 2, rpnt, rinls);
+               convert_to_unicode(ltmp, 2, lpnt, linls);
++#endif
+               if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp))
+                       return (-1);
+               if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp))
+                       return (1);
++#ifndef USE_ICONV
+               rpnt++;
+               lpnt++;
++#endif
+       }
+       if (*rpnt)
+@@ -574,10 +714,10 @@
+               }
+ #ifdef APPLE_HYB
+               if (USE_MAC_NAME(de))
+-                      namelen = joliet_strlen(de->hfs_ent->name);
++                      namelen = joliet_strlen(de->hfs_ent->name, hfs_inls);
+               else
+ #endif        /* APPLE_HYB */
+-                      namelen = joliet_strlen(de->name);
++                      namelen = joliet_strlen(de->name, in_nls);
+               if (dpnt == root) {
+                       jpath_table_l[jpath_table_index] = 1;
+@@ -742,10 +882,10 @@
+ #ifdef APPLE_HYB
+               /* Use the HFS name if it exists */
+               if (USE_MAC_NAME(s_entry1))
+-                      cvt_len = joliet_strlen(s_entry1->hfs_ent->name);
++                      cvt_len = joliet_strlen(s_entry1->hfs_ent->name, hfs_inls);
+               else
+ #endif        /* APPLE_HYB */
+-                      cvt_len = joliet_strlen(s_entry1->name);
++                      cvt_len = joliet_strlen(s_entry1->name, in_nls);
+               /*
+                * Fix the record length
+@@ -891,12 +1031,12 @@
+                               if (USE_MAC_NAME(s_entry))
+                                       /* Use the HFS name if it exists */
+                                       jpath_table_size +=
+-                                              joliet_strlen(s_entry->hfs_ent->name) +
++                                              joliet_strlen(s_entry->hfs_ent->name, hfs_inls) +
+                                               offsetof(struct iso_path_table, name[0]);
+                               else
+ #endif        /* APPLE_HYB */
+                                       jpath_table_size +=
+-                                              joliet_strlen(s_entry->name) +
++                                              joliet_strlen(s_entry->name, in_nls) +
+                                               offsetof(struct iso_path_table, name[0]);
+                               if (jpath_table_size & 1) {
+                                       jpath_table_size++;
+@@ -918,13 +1058,13 @@
+                               /* Use the HFS name if it exists */
+                               s_entry->jreclen =
+                               offsetof(struct iso_directory_record, name[0])
+-                                      + joliet_strlen(s_entry->hfs_ent->name)
++                                      + joliet_strlen(s_entry->hfs_ent->name, hfs_inls)
+                                       + 1;
+                       else
+ #endif        /* APPLE_HYB */
+                               s_entry->jreclen =
+                               offsetof(struct iso_directory_record, name[0])
+-                                      + joliet_strlen(s_entry->name)
++                                      + joliet_strlen(s_entry->name, in_nls)
+                                       + 1;
+               } else {
+                       /*
+@@ -1072,6 +1212,9 @@
+ #endif
+       while (*rpnt && *lpnt) {
++#ifdef USE_ICONV
++              size_t ri, li;
++#endif
+               if (*rpnt == ';' && *lpnt != ';')
+                       return (-1);
+               if (*rpnt != ';' && *lpnt == ';')
+@@ -1092,16 +1235,32 @@
+                       return (1);
+ #endif
++#ifdef USE_ICONV
++
++              ri = convert_to_unicode(rtmp, 2, rpnt, rinls);
++              li = convert_to_unicode(ltmp, 2, lpnt, linls);
++              rpnt += ri;
++              lpnt += li;
++              if(!ri && !li)
++                      return (0);
++              else if(ri && !li)
++                      return (1);
++              else if(!ri && li)
++                      return (-1);
++#else
+               convert_to_unicode(rtmp, 2, rpnt, rinls);
+               convert_to_unicode(ltmp, 2, lpnt, linls);
++#endif
+               if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp))
+                       return (-1);
+               if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp))
+                       return (1);
++#ifndef USE_ICONV
+               rpnt++;
+               lpnt++;
++#endif
+       }
+       if (*rpnt)
+               return (1);
+diff -urN --exclude-from=- cdrtools-2.01/mkisofs/Makefile cdrtools-2.01-jh/mkisofs/Makefile
+--- cdrtools-2.01/mkisofs/Makefile     2004-01-02 17:23:32.000000000 +0200
++++ cdrtools-2.01-jh/mkisofs/Makefile  2004-02-02 18:31:22.000000000 +0200
+@@ -32,6 +32,7 @@
+ CPPOPTS +=    -DUDF
+ CPPOPTS +=    -DDVD_VIDEO
+ CPPOPTS +=    -DSORTING
++CPPOPTS +=    -DUSE_ICONV
+ CPPOPTS +=    -I../libhfs_iso/
+ CPPOPTS       +=      -DHAVE_CONFIG_H -DUSE_LIBSCHILY -DUSE_SCG \
+               '-DAPPID_DEFAULT="MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING"' \
+diff -urN --exclude-from=- cdrtools-2.01/mkisofs/mkisofs.c cdrtools-2.01-jh/mkisofs/mkisofs.c
+--- cdrtools-2.01/mkisofs/mkisofs.c    2004-01-07 01:23:46.000000000 +0200
++++ cdrtools-2.01-jh/mkisofs/mkisofs.c 2004-02-02 18:31:22.000000000 +0200
+@@ -59,6 +59,11 @@
+ #endif
+ #endif        /* no_more_needed */
++#ifdef USE_ICONV
++#include <locale.h>
++#include <langinfo.h>
++#endif
++
+ struct directory *root = NULL;
+ int           path_ind;
+@@ -223,6 +228,10 @@
+ int   do_sort = 0;            /* sort file data */
+ #endif /* SORTING */
++#ifdef USE_ICONV
++int   iconv_possible;
++#endif
++
+ struct nls_table *in_nls = NULL;  /* input UNICODE conversion table */
+ struct nls_table *out_nls = NULL; /* output UNICODE conversion table */
+ #ifdef APPLE_HYB
+@@ -2235,6 +2244,37 @@
+       init_nls_file(hfs_ocharset);
+ #endif /* APPLE_HYB */
++#ifdef USE_ICONV
++      iconv_possible = !(iso9660_level >= 4 || ((ocharset &&
++              strcmp(ocharset, icharset ? icharset : "")) &&
++              use_RockRidge) || apple_ext || apple_hyb);
++
++      setlocale(LC_CTYPE, "");
++      
++      if (icharset == NULL && iconv_possible) {
++              char *charset = nl_langinfo(CODESET);
++              /* set to detected value but only if it is not pure US-ASCII */
++              if(strcmp(charset, "ANSI_X3.4-1968") != 0)
++                      icharset = charset;
++
++              if(icharset && verbose > 0)
++                      fprintf(stderr, "INFO:\t"
++                      "%s character encoding detected by locale settings."
++                      "\n\tAssuming %s encoded filenames on source "
++                      "filesystem,\n"
++                      "\tuse -input-charset to override.\n",
++                      icharset, icharset);
++      }
++
++      if(iconv_possible) {
++              /*
++               * don't care if initialization fails
++               */
++              init_nls_iconv(icharset);
++              init_nls_iconv(ocharset);
++      }
++#endif
++
+       if (icharset == NULL) {
+ #if   (defined(__CYGWIN32__) || defined(__CYGWIN__)) && !defined(IS_CYGWIN_1)
+               in_nls = load_nls("cp437");
+@@ -2262,6 +2302,12 @@
+       if (in_nls == NULL || out_nls == NULL) { /* Unknown charset specified */
+               fprintf(stderr, "Unknown charset\nKnown charsets are:\n");
+               list_nls();     /* List all known charset names */
++#ifdef USE_ICONV
++              if(!iconv_possible)
++                      fprintf(stderr, "Iconv charsets cannot be used with "
++                              "Apple extension, HFS, ISO9660 version 2 or\n"
++                              "Rock Ridge.\n");
++#endif
+               exit(1);
+       }
+diff -urN --exclude-from=- cdrtools-2.01/mkisofs/mkisofs.h cdrtools-2.01-jh/mkisofs/mkisofs.h
+--- cdrtools-2.01/mkisofs/mkisofs.h    2003-12-28 15:38:51.000000000 +0200
++++ cdrtools-2.01-jh/mkisofs/mkisofs.h 2004-02-02 18:31:22.000000000 +0200
+@@ -501,9 +501,14 @@
+ /* joliet.c */
+ #ifdef        UDF
++#     ifdef USE_ICONV
++extern        size_t  convert_to_unicode      __PR((unsigned char *buffer,
++                      int size, char *source, struct nls_table *inls));
++#     else
+ extern        void    convert_to_unicode      __PR((unsigned char *buffer,
+                       int size, char *source, struct nls_table *inls));
+-extern        int     joliet_strlen           __PR((const char *string));
++#     endif
++extern        int     joliet_strlen           __PR((const char *string, struct nls_table *inls));
+ #endif
+ extern unsigned char conv_charset __PR((unsigned char, struct nls_table *,
+                               struct nls_table *));
+diff -urN --exclude-from=- cdrtools-2.01/mkisofs/udf.c cdrtools-2.01-jh/mkisofs/udf.c
+--- cdrtools-2.01/mkisofs/udf.c        2003-04-28 01:34:52.000000000 +0300
++++ cdrtools-2.01-jh/mkisofs/udf.c     2004-02-02 18:31:22.000000000 +0200
+@@ -442,7 +442,7 @@
+       int i;
+       int expanded_length;
+-      expanded_length = joliet_strlen(src);
++      expanded_length = joliet_strlen(src, in_nls);
+       if (expanded_length > 1024)
+               expanded_length = 1024;
+       if (expanded_length > (dst_size-1)*2)
index 147d76b..b81ce3c 100644 (file)
@@ -334,6 +334,7 @@ lfsmake2() {
                                                CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
                                                KVER=$KVER MAKETUNING=$MAKETUNING \
                                                BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
+                                               IPFVER="$IPFVER" \
                                                /tools/bin/bash -x -c "cd /usr/src/lfs && \
                                                make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
        local COMPILE_SUCCESS=$?
@@ -364,6 +365,7 @@ ipfiremake() {
                                                CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
                                                KVER=$KVER MAKETUNING=$MAKETUNING \
                                                BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
+                                               IPFVER="$IPFVER" \
                                                /bin/bash -x -c "cd /usr/src/lfs && \
                                                make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
 
@@ -390,7 +392,7 @@ ipfiredist() {
                                                NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
                                                CFLAGS="$C2FLAGS" CXXFLAGS="$CXX2FLAGS" \
                                                CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
-                                               KVER=$KVER \
+                                               KVER=$KVER IPFVER="$IPFVER" \
                                                BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
                    /bin/bash -x -c "cd /usr/src/lfs && \
                    make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
@@ -423,7 +425,7 @@ installmake() {
                                                NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
                                                CFLAGS="-Os" CXXFLAGS="-Os" \
                                                CCACHE_DIR=/usr/src/ccache CCACHE_HASHDIR=1 \
-                                               KVER=$KVER \
+                                               KVER=$KVER IPFVER="$IPFVER" \
                                                BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
                    /bin/bash -x -c "cd /usr/src/lfs && \
                    make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1