Browse Source

Piotr Esden-Tempski <pe1724@bingo-ev.de>:

Yet another big dietlibc patch-set. As usual refer to CHANGELOG-ESDEN for
the details.


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1347 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Piotr Esden-Tempski 21 years ago
parent
commit
82b2ff63cd
10 changed files with 96 additions and 39 deletions
  1. +15
    -0
      Documentation/Developers/CHANGELOG-ESDEN
  2. +1
    -0
      package/base/dialog/dialog.desc
  3. +13
    -34
      package/base/dietlibc/parse-config-9
  4. +22
    -0
      package/base/dietlibc/pkg_patch/pkg_grub.patch
  5. +32
    -0
      package/base/dietlibc/pkg_patch/pkg_util-linux.patch
  6. +3
    -2
      package/base/e2fsprogs/e2fsprogs.conf
  7. +1
    -1
      package/base/gcc3/gcc3.conf
  8. +1
    -1
      package/base/zlib/zlib.conf
  9. +1
    -1
      target/bootdisk/build_stage2.sh
  10. +7
    -0
      target/dietlibc/build.sh

+ 15
- 0
Documentation/Developers/CHANGELOG-ESDEN

@ -6,6 +6,21 @@ does for ROCKLinux ;-)
- added vim to dietlibc target - added vim to dietlibc target
- refixed util-linux package for dietlibc - refixed util-linux package for dietlibc
- added isofs.txt file creation to dietlibc target - added isofs.txt file creation to dietlibc target
- changed "statically" and "dynamically" to "static" "dynamic" in
diet_dynamic_static variable
- cleaned up the include path mess in dietlibc/parse-config-9
- once more fixed util-linux. because of the include path cleanup
- fixed grub for dietlibc
- added dietlibc flag to dialog
- fixed curl for dietlibc running ./reconf in it. Since we have no running
autoconf/automake under dietlibc this change is nicluded as patch. Yes I
know it is ugly big patch.
- fixed dietlibc/parse-config-9 for builds that do not use dietlibc gcc like
bootdisk target
- fixed bootdisk target: it was yelling that syslinux was not included in
package_map and mdlbl version changed and was not updaded in the scripts
- added package.db creation to dietlibc target. forgot it earlier >_<
- made e2fsprogs compile only statically
*) 2003-09-03 (2.0.0-rc1 - 2.0.0-rc2) *) 2003-09-03 (2.0.0-rc1 - 2.0.0-rc2)
- fixed scripts/Build-Tools so that it does not execute backup parse-config - fixed scripts/Build-Tools so that it does not execute backup parse-config

+ 1
- 0
package/base/dialog/dialog.desc

@ -39,6 +39,7 @@
[M] Clifford Wolf <clifford@clifford.at> [M] Clifford Wolf <clifford@clifford.at>
[C] base/tool [C] base/tool
[F] DIETLIBC
[L] GPL [L] GPL
[S] Stable [S] Stable

+ 13
- 34
package/base/dietlibc/parse-config-9

@ -22,13 +22,14 @@
# --- FUNCTIONS-BEGIN --- # --- FUNCTIONS-BEGIN ---
function set_wrapper_and_misc () { function set_wrapper_and_misc () {
if [ "$stagelevel" -le 1 ] ; then
var_append CC_WRAPPER_INSERT " " "-idirafter $root/usr/include"
if [ "$stagelevel" -le 1 -o "$ROCKCFG_DIETLIBC_ALL" -ne 1 ] ; then
var_append CC_WRAPPER_INSERT " " "-nostdinc" var_append CC_WRAPPER_INSERT " " "-nostdinc"
# all dietlibc pathes are redirected into the build system # all dietlibc pathes are redirected into the build system
var_insert CC_WRAPPER_FILTER "|" "sed -e 's,/usr/dietlibc/,$root&,'" var_insert CC_WRAPPER_FILTER "|" "sed -e 's,/usr/dietlibc/,$root&,'"
var_append CC_WRAPPER_OTHERS ":" $dietbin var_append CC_WRAPPER_OTHERS ":" $dietbin
else else
if [ "$diet_dynamic_static" == "statically" ] ; then
if [ "$diet_dynamic_static" == "static" ] ; then
var_append GCC_WRAPPER_INSERT " " "-static" var_append GCC_WRAPPER_INSERT " " "-static"
fi fi
var_append GCC_WRAPPER_INSERT " " "-D__dietlibc__" var_append GCC_WRAPPER_INSERT " " "-D__dietlibc__"
@ -66,10 +67,10 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then
fi fi
if [ "$ROCKCFG_DIETLIBC_DYN" = "1" ] if [ "$ROCKCFG_DIETLIBC_DYN" = "1" ]
then dietbin="diet-dyn" ; diet_dynamic_static="dynamically"
else dietbin="diet" ; diet_dynamic_static="statically" ; fi
then dietbin="diet-dyn" ; diet_dynamic_static="dynamic"
else dietbin="diet" ; diet_dynamic_static="static" ; fi
echo_status "Preparing configuration to build this package with dietlibc ($diet_dynamic_static)."
echo_status "Preparing configuration to build this package with dietlibc ("${diet_dynamic_static}"ally)."
if [ "$stagelevel" -gt 1 ]; then if [ "$stagelevel" -gt 1 ]; then
var_remove CC_WRAPPER_INSERT " " "-pipe" ; var_remove CC_WRAPPER_INSERT " " "-pipe" ;
@ -81,7 +82,6 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then
var_remove KCC_WRAPPER_INSERT " " "-pipe" ; var_remove KCC_WRAPPER_INSERT " " "-pipe" ;
var_append KCC_WRAPPER_REMOVE " " "-pipe" ; var_append KCC_WRAPPER_REMOVE " " "-pipe" ;
# var_append CC_WRAPPER_INSERT " " "-L/usr/i386-pc-linux-gnulibc1/lib"
fi fi
# patch has problems with Plan A patching so we switch with -x 16 to Plan B # patch has problems with Plan A patching so we switch with -x 16 to Plan B
@ -94,27 +94,16 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then
linux*) linux*)
echo_status "This package is currently blacklisted and not build using dietlibc!" echo_status "This package is currently blacklisted and not build using dietlibc!"
[ "$stagelevel" -gt 1 ] && [ "$diet_dynamic_static" == "statically" ] && var_append GCC_WRAPPER_INSERT " " "-static"
[ "$stagelevel" -gt 1 ] && [ "$diet_dynamic_static" == "static" ] && var_append GCC_WRAPPER_INSERT " " "-static"
;; ;;
e2fsprogs) # the packets that have BSD problems and/or GNU problems
e2fsprogs|util-linux|net-tools) # the packets that have BSD problems and/or GNU problems
echo_status "Setting dietlibc special GNU/BSD settings!" echo_status "Setting dietlibc special GNU/BSD settings!"
var_append CC_WRAPPER_INSERT " " "-D_BSD_SOURCE" var_append CC_WRAPPER_INSERT " " "-D_BSD_SOURCE"
var_append CC_WRAPPER_INSERT " " "-D_GNU_SOURCE" var_append CC_WRAPPER_INSERT " " "-D_GNU_SOURCE"
set_wrapper_and_misc set_wrapper_and_misc
;; ;;
util-linux|net-tools) # the packets that have BSD problems and/or GNU
# problems and need tons of linux headers
echo_status "Setting dietlibc special GNU/BSD and linux header settings!"
var_append CC_WRAPPER_INSERT " " "-D_BSD_SOURCE"
var_append CC_WRAPPER_INSERT " " "-D_GNU_SOURCE"
var_append CC_WRAPPER_INSERT " " "-nostdinc"
var_append CC_WRAPPER_APPEND " " "-I$root/usr/dietlibc/include"
var_append CC_WRAPPER_APPEND " " "-I$root/usr/include"
set_wrapper_and_misc
;;
sed) sed)
echo_status "Setting dietlibc special lcompat settings!" echo_status "Setting dietlibc special lcompat settings!"
add_lib "-lcompat" add_lib "-lcompat"
@ -128,19 +117,6 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then
set_wrapper_and_misc set_wrapper_and_misc
;; ;;
iproute2)
echo_status "Allowing default headers from /usr/include!"
# needs to be last since otherwise the (g)libc headers
# in /usr/include would be used instead of the dietlibc
# ones ... - so append instead insert.
# XXX check if it is really needed in that form ...
var_append CC_WRAPPER_APPEND " " "-I$root/usr/include"
var_append CC_WRAPPER_INSERT " " "-I/usr/dietlibc/include"
set_wrapper_and_misc
;;
*) *)
echo_status "Using default dietlibc compiler options!" echo_status "Using default dietlibc compiler options!"
set_wrapper_and_misc set_wrapper_and_misc
@ -152,7 +128,7 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then
var_remove patchfiles " " "*acl-xattr.patch" var_remove patchfiles " " "*acl-xattr.patch"
;; ;;
curl) curl)
[ "$diet_dynamic_static" == "statically" ] && var_append extraconfopt " " "--disable-shared"
[ "$diet_dynamic_static" == "static" ] && var_append extraconfopt " " "--disable-shared"
;; ;;
ncurses) ncurses)
var_append extraconfopt " " "--without-cxx-binding --without-cxx" var_append extraconfopt " " "--without-cxx-binding --without-cxx"
@ -161,9 +137,12 @@ if [ "$pkg_dietlibc_useit" = 1 ]; then
add_lib "-lrpc" add_lib "-lrpc"
add_lib "-lcompat" add_lib "-lcompat"
;; ;;
dump)
var_append extraconfopt " " "--disable-rmt"
;;
esac esac
var_append patchfiles " " `ls $base/package/base/dietlibc/pkg_patch/pkg_$pkg.patch 2>/dev/null` var_append patchfiles " " `ls $base/package/base/dietlibc/pkg_patch/pkg_$pkg.patch 2>/dev/null`
[ "$stagelevel" -ge 1 ] && var_append patchfiles " " `ls $base/package/base/dietlibc/pkg_patch/pkg_$pkg.chroot.patch 2>/dev/null`
[ "$stagelevel" -ge 1 -a "$ROCKCFG_DIETLIBC_ALL" -eq 1 ] && var_append patchfiles " " `ls $base/package/base/dietlibc/pkg_patch/pkg_$pkg.chroot.patch 2>/dev/null`
fi fi

+ 22
- 0
package/base/dietlibc/pkg_patch/pkg_grub.patch

@ -0,0 +1,22 @@
--- grub-0.93/lib/device.c.orig Thu Sep 4 16:25:24 2003
+++ grub-0.93/lib/device.c Thu Sep 4 16:23:46 2003
@@ -699,7 +699,7 @@
return 0;
}
-#if defined(__linux__) && (!defined(__GLIBC__) || \
+#if defined(__linux__) && (!defined(__dietlibc__)) && (!defined(__GLIBC__) || \
((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
/* Maybe libc doesn't have large file support. */
{
--- grub-0.93/grub/asmstub.c~ Mon Dec 2 23:20:45 2002
+++ grub-0.93/grub/asmstub.c Thu Sep 4 16:30:09 2003
@@ -934,7 +934,7 @@
return BIOSDISK_ERROR_GEOMETRY;
/* Seek to the specified location. */
-#if defined(__linux__) && (!defined(__GLIBC__) || \
+#if defined(__linux__) && (!defined(__dietlibc__)) && (!defined(__GLIBC__) || \
((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
/* Maybe libc doesn't have large file support. */
{

+ 32
- 0
package/base/dietlibc/pkg_patch/pkg_util-linux.patch

@ -284,3 +284,35 @@ diff -Nur util-linux-2.11q.orig/text-utils/display.c util-linux-2.11q/text-utils
case 0405: case 0405:
case 0411: case 0411:
case 0177545: case 0177545:
diff -Nur util-linux-2.11u.orig/fdisk/cfdisk.c util-linux-2.11u/fdisk/cfdisk.c
--- util-linux-2.11u.orig/fdisk/cfdisk.c 2002-05-09 01:51:47.000000000 +0000
+++ util-linux-2.11u/fdisk/cfdisk.c 2002-09-17 22:01:08.000000000 +0000
@@ -326,7 +326,7 @@
int logical = 0;
int logical_sectors[MAXIMUM_PARTS];
-__sighandler_t old_SIGINT, old_SIGTERM;
+sighandler_t old_SIGINT, old_SIGTERM;
int arrow_cursor = FALSE;
int display_units = MEGABYTES;
diff -Nur util-linux-2.11u.orig/text-utils/pg.c util-linux-2.11u/text-utils/pg.c
--- util-linux-2.11u.orig/text-utils/pg.c 2002-07-07 05:29:12.000000000 +0000
+++ util-linux-2.11u/text-utils/pg.c 2002-09-17 22:01:08.000000000 +0000
@@ -46,7 +46,7 @@
#ifndef TIOCGWINSZ
#include <sys/ioctl.h>
#endif
-#include <sys/termios.h>
+#include <termios.h>
#include <fcntl.h>
#include <regex.h>
#include <stdio.h>
@@ -59,7 +59,6 @@
#include <signal.h>
#include <setjmp.h>
#include <locale.h>
-#include <nl_types.h>
#include <libgen.h>
#include <curses.h>
#include <term.h>

+ 3
- 2
package/base/e2fsprogs/e2fsprogs.conf

@ -21,13 +21,14 @@
# --- ROCK-COPYRIGHT-NOTE-END --- # --- ROCK-COPYRIGHT-NOTE-END ---
confopt="$confopt --enable-fsck --enable-dynamic-e2fsck"
confopt="$confopt --enable-fsck "
[ "$dietlibc_dynamic_static" = "dynamic" ] && confopt="$confopt --enable-dynamic-e2fsck"
confopt="$confopt --libdir=$root/lib --with-root-prefix=$root/" confopt="$confopt --libdir=$root/lib --with-root-prefix=$root/"
MAKE="$MAKE ELF_INSTALL_DIR=$root/lib" MAKE="$MAKE ELF_INSTALL_DIR=$root/lib"
if [ $stagelevel -gt 1 ] if [ $stagelevel -gt 1 ]
then then
confopt="$confopt --enable-elf-shlibs"
[ "$dietlibc_dynamic_static" = "dynamic" ] && confopt="$confopt --enable-elf-shlibs"
makeinstopt="$makeinstopt install-libs" makeinstopt="$makeinstopt install-libs"
fi fi

+ 1
- 1
package/base/gcc3/gcc3.conf

@ -174,7 +174,7 @@ custmain() {
fi fi
# Set enable-shared # Set enable-shared
if [ "$diet_dynamic_static" == "statically" ] ; then
if [ "$diet_dynamic_static" == "static" ] ; then
confopt="$confopt --enable-shared=no" confopt="$confopt --enable-shared=no"
else else
confopt="$confopt --enable-shared=yes" confopt="$confopt --enable-shared=yes"

+ 1
- 1
package/base/zlib/zlib.conf

@ -30,7 +30,7 @@ zlib_pm() {
cp -v algorithm.txt $docdir cp -v algorithm.txt $docdir
} }
[ "$diet_dynamic_static" != "statically" ] && var_insert confopt " " "--shared"
[ "$diet_dynamic_static" != "static" ] && var_insert confopt " " "--shared"
var_insert CC_WRAPPER_INSERT " " "-fPIC" var_insert CC_WRAPPER_INSERT " " "-fPIC"
hook_add preconf 3 "unset AR" hook_add preconf 3 "unset AR"
hook_add postmake 3 "zlib_pm" hook_add postmake 3 "zlib_pm"

+ 1
- 1
target/bootdisk/build_stage2.sh

@ -37,7 +37,7 @@ package_map=' +00-dirtree +glibc22 +glibc23
+sysklogd +devfsd +setserial +iproute2 +sysklogd +devfsd +setserial +iproute2
+netkit-base +netkit-ftp +netkit-telnet +netkit-tftp +netkit-base +netkit-ftp +netkit-telnet +netkit-tftp
+sysfiles +libpcap +iptables +tcp_wrappers +sysfiles +libpcap +iptables +tcp_wrappers
-kiss +kbd'
-kiss +kbd -syslinux'
package_map="+$ROCKCFG_DEFAULT_KERNEL $package_map" package_map="+$ROCKCFG_DEFAULT_KERNEL $package_map"

+ 7
- 0
target/dietlibc/build.sh

@ -5,6 +5,13 @@
# #
pkgloop pkgloop
echo_header "Finishing build."
echo_status "Creating package database ..."
admdir="build/${ROCKCFG_ID}/root/var/adm"
create_package_db $admdir build/${ROCKCFG_ID}/pkgs \
build/${ROCKCFG_ID}/packages.db
echo_status "Creating isofs.txt file .." echo_status "Creating isofs.txt file .."
cat << EOT > build/${ROCKCFG_ID}/isofs.txt cat << EOT > build/${ROCKCFG_ID}/isofs.txt
DISK1 $admdir/cache/ ${ROCKCFG_SHORTID}/info/cache/ DISK1 $admdir/cache/ ${ROCKCFG_SHORTID}/info/cache/

Loading…
Cancel
Save